aclocal.m4 revision 97cf2ee2
1# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_AUTOCONF_VERSION], 15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 17[m4_warning([this file was generated for autoconf 2.68. 18You have another version of autoconf. It may work, but is not guaranteed to. 19If you have problems, you may need to regenerate the build system entirely. 20To do so, use the procedure documented by the package, typically `autoreconf'.])]) 21 22# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23# 24# This file is free software; the Free Software Foundation 25# gives unlimited permission to copy and/or distribute it, 26# with or without modifications, as long as this notice is preserved. 27 28# AM_AUTOMAKE_VERSION(VERSION) 29# ---------------------------- 30# Automake X.Y traces this macro to ensure aclocal.m4 has been 31# generated from the m4 files accompanying Automake X.Y. 32# (This private macro should not be called outside this file.) 33AC_DEFUN([AM_AUTOMAKE_VERSION], 34[am__api_version='1.11' 35dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 36dnl require some minimum version. Point them to the right macro. 37m4_if([$1], [1.11.1], [], 38 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 39]) 40 41# _AM_AUTOCONF_VERSION(VERSION) 42# ----------------------------- 43# aclocal traces this macro to find the Autoconf version. 44# This is a private macro too. Using m4_define simplifies 45# the logic in aclocal, which can simply ignore this definition. 46m4_define([_AM_AUTOCONF_VERSION], []) 47 48# AM_SET_CURRENT_AUTOMAKE_VERSION 49# ------------------------------- 50# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 51# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53[AM_AUTOMAKE_VERSION([1.11.1])dnl 54m4_ifndef([AC_AUTOCONF_VERSION], 55 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 56_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57 58# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59 60# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61# 62# This file is free software; the Free Software Foundation 63# gives unlimited permission to copy and/or distribute it, 64# with or without modifications, as long as this notice is preserved. 65 66# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69# 70# Of course, Automake must honor this variable whenever it calls a 71# tool from the auxiliary directory. The problem is that $srcdir (and 72# therefore $ac_aux_dir as well) can be either absolute or relative, 73# depending on how configure is run. This is pretty annoying, since 74# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75# source directory, any form will work fine, but in subdirectories a 76# relative path needs to be adjusted first. 77# 78# $ac_aux_dir/missing 79# fails when called from a subdirectory if $ac_aux_dir is relative 80# $top_srcdir/$ac_aux_dir/missing 81# fails if $ac_aux_dir is absolute, 82# fails when called from a subdirectory in a VPATH build with 83# a relative $ac_aux_dir 84# 85# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86# are both prefixed by $srcdir. In an in-source build this is usually 87# harmless because $srcdir is `.', but things will broke when you 88# start a VPATH build or use an absolute $srcdir. 89# 90# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93# and then we would define $MISSING as 94# MISSING="\${SHELL} $am_aux_dir/missing" 95# This will work as long as MISSING is not called from configure, because 96# unfortunately $(top_srcdir) has no meaning in configure. 97# However there are other variables, like CC, which are often used in 98# configure, and could therefore not use this "fixed" $ac_aux_dir. 99# 100# Another solution, used here, is to always expand $ac_aux_dir to an 101# absolute PATH. The drawback is that using absolute paths prevent a 102# configured tree to be moved without reconfiguration. 103 104AC_DEFUN([AM_AUX_DIR_EXPAND], 105[dnl Rely on autoconf to set up CDPATH properly. 106AC_PREREQ([2.50])dnl 107# expand $ac_aux_dir to an absolute path 108am_aux_dir=`cd $ac_aux_dir && pwd` 109]) 110 111# AM_CONDITIONAL -*- Autoconf -*- 112 113# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114# Free Software Foundation, Inc. 115# 116# This file is free software; the Free Software Foundation 117# gives unlimited permission to copy and/or distribute it, 118# with or without modifications, as long as this notice is preserved. 119 120# serial 9 121 122# AM_CONDITIONAL(NAME, SHELL-CONDITION) 123# ------------------------------------- 124# Define a conditional. 125AC_DEFUN([AM_CONDITIONAL], 126[AC_PREREQ(2.52)dnl 127 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 128 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 129AC_SUBST([$1_TRUE])dnl 130AC_SUBST([$1_FALSE])dnl 131_AM_SUBST_NOTMAKE([$1_TRUE])dnl 132_AM_SUBST_NOTMAKE([$1_FALSE])dnl 133m4_define([_AM_COND_VALUE_$1], [$2])dnl 134if $2; then 135 $1_TRUE= 136 $1_FALSE='#' 137else 138 $1_TRUE='#' 139 $1_FALSE= 140fi 141AC_CONFIG_COMMANDS_PRE( 142[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 143 AC_MSG_ERROR([[conditional "$1" was never defined. 144Usually this means the macro was only invoked conditionally.]]) 145fi])]) 146 147# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 148# Free Software Foundation, Inc. 149# 150# This file is free software; the Free Software Foundation 151# gives unlimited permission to copy and/or distribute it, 152# with or without modifications, as long as this notice is preserved. 153 154# serial 10 155 156# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157# written in clear, in which case automake, when reading aclocal.m4, 158# will think it sees a *use*, and therefore will trigger all it's 159# C support machinery. Also note that it means that autoscan, seeing 160# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161 162 163# _AM_DEPENDENCIES(NAME) 164# ---------------------- 165# See how the compiler implements dependency checking. 166# NAME is "CC", "CXX", "GCJ", or "OBJC". 167# We try a few techniques and use that to set a single cache variable. 168# 169# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171# dependency, and given that the user is not expected to run this macro, 172# just rely on AC_PROG_CC. 173AC_DEFUN([_AM_DEPENDENCIES], 174[AC_REQUIRE([AM_SET_DEPDIR])dnl 175AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176AC_REQUIRE([AM_MAKE_INCLUDE])dnl 177AC_REQUIRE([AM_DEP_TRACK])dnl 178 179ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180 [$1], CXX, [depcc="$CXX" am_compiler_list=], 181 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 182 [$1], UPC, [depcc="$UPC" am_compiler_list=], 183 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184 [depcc="$$1" am_compiler_list=]) 185 186AC_CACHE_CHECK([dependency style of $depcc], 187 [am_cv_$1_dependencies_compiler_type], 188[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189 # We make a subdir and do the tests there. Otherwise we can end up 190 # making bogus files that we don't know about and never remove. For 191 # instance it was reported that on HP-UX the gcc test will end up 192 # making a dummy file named `D' -- because `-MD' means `put the output 193 # in D'. 194 mkdir conftest.dir 195 # Copy depcomp to subdir because otherwise we won't find it if we're 196 # using a relative directory. 197 cp "$am_depcomp" conftest.dir 198 cd conftest.dir 199 # We will build objects and dependencies in a subdirectory because 200 # it helps to detect inapplicable dependency modes. For instance 201 # both Tru64's cc and ICC support -MD to output dependencies as a 202 # side effect of compilation, but ICC will put the dependencies in 203 # the current directory while Tru64 will put them in the object 204 # directory. 205 mkdir sub 206 207 am_cv_$1_dependencies_compiler_type=none 208 if test "$am_compiler_list" = ""; then 209 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210 fi 211 am__universal=false 212 m4_case([$1], [CC], 213 [case " $depcc " in #( 214 *\ -arch\ *\ -arch\ *) am__universal=true ;; 215 esac], 216 [CXX], 217 [case " $depcc " in #( 218 *\ -arch\ *\ -arch\ *) am__universal=true ;; 219 esac]) 220 221 for depmode in $am_compiler_list; do 222 # Setup a source with many dependencies, because some compilers 223 # like to wrap large dependency lists on column 80 (with \), and 224 # we should not choose a depcomp mode which is confused by this. 225 # 226 # We need to recreate these files for each test, as the compiler may 227 # overwrite some of them when testing with obscure command lines. 228 # This happens at least with the AIX C compiler. 229 : > sub/conftest.c 230 for i in 1 2 3 4 5 6; do 231 echo '#include "conftst'$i'.h"' >> sub/conftest.c 232 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 233 # Solaris 8's {/usr,}/bin/sh. 234 touch sub/conftst$i.h 235 done 236 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237 238 # We check with `-c' and `-o' for the sake of the "dashmstdout" 239 # mode. It turns out that the SunPro C++ compiler does not properly 240 # handle `-M -o', and we need to detect this. Also, some Intel 241 # versions had trouble with output in subdirs 242 am__obj=sub/conftest.${OBJEXT-o} 243 am__minus_obj="-o $am__obj" 244 case $depmode in 245 gcc) 246 # This depmode causes a compiler race in universal mode. 247 test "$am__universal" = false || continue 248 ;; 249 nosideeffect) 250 # after this tag, mechanisms are not by side-effect, so they'll 251 # only be used when explicitly requested 252 if test "x$enable_dependency_tracking" = xyes; then 253 continue 254 else 255 break 256 fi 257 ;; 258 msvisualcpp | msvcmsys) 259 # This compiler won't grok `-c -o', but also, the minuso test has 260 # not run yet. These depmodes are late enough in the game, and 261 # so weak that their functioning should not be impacted. 262 am__obj=conftest.${OBJEXT-o} 263 am__minus_obj= 264 ;; 265 none) break ;; 266 esac 267 if depmode=$depmode \ 268 source=sub/conftest.c object=$am__obj \ 269 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 270 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271 >/dev/null 2>conftest.err && 272 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 274 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276 # icc doesn't choke on unknown options, it will just issue warnings 277 # or remarks (even with -Werror). So we grep stderr for any message 278 # that says an option was ignored or not supported. 279 # When given -MP, icc 7.0 and 7.1 complain thusly: 280 # icc: Command line warning: ignoring option '-M'; no argument required 281 # The diagnosis changed in icc 8.0: 282 # icc: Command line remark: option '-MP' not supported 283 if (grep 'ignoring option' conftest.err || 284 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285 am_cv_$1_dependencies_compiler_type=$depmode 286 break 287 fi 288 fi 289 done 290 291 cd .. 292 rm -rf conftest.dir 293else 294 am_cv_$1_dependencies_compiler_type=none 295fi 296]) 297AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298AM_CONDITIONAL([am__fastdep$1], [ 299 test "x$enable_dependency_tracking" != xno \ 300 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301]) 302 303 304# AM_SET_DEPDIR 305# ------------- 306# Choose a directory name for dependency files. 307# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308AC_DEFUN([AM_SET_DEPDIR], 309[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311]) 312 313 314# AM_DEP_TRACK 315# ------------ 316AC_DEFUN([AM_DEP_TRACK], 317[AC_ARG_ENABLE(dependency-tracking, 318[ --disable-dependency-tracking speeds up one-time build 319 --enable-dependency-tracking do not reject slow dependency extractors]) 320if test "x$enable_dependency_tracking" != xno; then 321 am_depcomp="$ac_aux_dir/depcomp" 322 AMDEPBACKSLASH='\' 323fi 324AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 325AC_SUBST([AMDEPBACKSLASH])dnl 326_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327]) 328 329# Generate code to set up dependency tracking. -*- Autoconf -*- 330 331# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 332# Free Software Foundation, Inc. 333# 334# This file is free software; the Free Software Foundation 335# gives unlimited permission to copy and/or distribute it, 336# with or without modifications, as long as this notice is preserved. 337 338#serial 5 339 340# _AM_OUTPUT_DEPENDENCY_COMMANDS 341# ------------------------------ 342AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 343[{ 344 # Autoconf 2.62 quotes --file arguments for eval, but not when files 345 # are listed without --file. Let's play safe and only enable the eval 346 # if we detect the quoting. 347 case $CONFIG_FILES in 348 *\'*) eval set x "$CONFIG_FILES" ;; 349 *) set x $CONFIG_FILES ;; 350 esac 351 shift 352 for mf 353 do 354 # Strip MF so we end up with the name of the file. 355 mf=`echo "$mf" | sed -e 's/:.*$//'` 356 # Check whether this is an Automake generated Makefile or not. 357 # We used to match only the files named `Makefile.in', but 358 # some people rename them; so instead we look at the file content. 359 # Grep'ing the first line is not enough: some people post-process 360 # each Makefile.in and add a new line on top of each file to say so. 361 # Grep'ing the whole file is not good either: AIX grep has a line 362 # limit of 2048, but all sed's we know have understand at least 4000. 363 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 364 dirpart=`AS_DIRNAME("$mf")` 365 else 366 continue 367 fi 368 # Extract the definition of DEPDIR, am__include, and am__quote 369 # from the Makefile without running `make'. 370 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 371 test -z "$DEPDIR" && continue 372 am__include=`sed -n 's/^am__include = //p' < "$mf"` 373 test -z "am__include" && continue 374 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 375 # When using ansi2knr, U may be empty or an underscore; expand it 376 U=`sed -n 's/^U = //p' < "$mf"` 377 # Find all dependency output files, they are included files with 378 # $(DEPDIR) in their names. We invoke sed twice because it is the 379 # simplest approach to changing $(DEPDIR) to its actual value in the 380 # expansion. 381 for file in `sed -n " 382 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 384 # Make sure the directory exists. 385 test -f "$dirpart/$file" && continue 386 fdir=`AS_DIRNAME(["$file"])` 387 AS_MKDIR_P([$dirpart/$fdir]) 388 # echo "creating $dirpart/$file" 389 echo '# dummy' > "$dirpart/$file" 390 done 391 done 392} 393])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394 395 396# AM_OUTPUT_DEPENDENCY_COMMANDS 397# ----------------------------- 398# This macro should only be invoked once -- use via AC_REQUIRE. 399# 400# This code is only required when automatic dependency tracking 401# is enabled. FIXME. This creates each `.P' file that we will 402# need in order to bootstrap the dependency handling code. 403AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404[AC_CONFIG_COMMANDS([depfiles], 405 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407]) 408 409# Do all the work for Automake. -*- Autoconf -*- 410 411# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 412# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 413# 414# This file is free software; the Free Software Foundation 415# gives unlimited permission to copy and/or distribute it, 416# with or without modifications, as long as this notice is preserved. 417 418# serial 16 419 420# This macro actually does too much. Some checks are only needed if 421# your package does certain things. But this isn't really a big deal. 422 423# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 424# AM_INIT_AUTOMAKE([OPTIONS]) 425# ----------------------------------------------- 426# The call with PACKAGE and VERSION arguments is the old style 427# call (pre autoconf-2.50), which is being phased out. PACKAGE 428# and VERSION should now be passed to AC_INIT and removed from 429# the call to AM_INIT_AUTOMAKE. 430# We support both call styles for the transition. After 431# the next Automake release, Autoconf can make the AC_INIT 432# arguments mandatory, and then we can depend on a new Autoconf 433# release and drop the old call support. 434AC_DEFUN([AM_INIT_AUTOMAKE], 435[AC_PREREQ([2.62])dnl 436dnl Autoconf wants to disallow AM_ names. We explicitly allow 437dnl the ones we care about. 438m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 439AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 440AC_REQUIRE([AC_PROG_INSTALL])dnl 441if test "`cd $srcdir && pwd`" != "`pwd`"; then 442 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 443 # is not polluted with repeated "-I." 444 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 445 # test to see if srcdir already configured 446 if test -f $srcdir/config.status; then 447 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 448 fi 449fi 450 451# test whether we have cygpath 452if test -z "$CYGPATH_W"; then 453 if (cygpath --version) >/dev/null 2>/dev/null; then 454 CYGPATH_W='cygpath -w' 455 else 456 CYGPATH_W=echo 457 fi 458fi 459AC_SUBST([CYGPATH_W]) 460 461# Define the identity of the package. 462dnl Distinguish between old-style and new-style calls. 463m4_ifval([$2], 464[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 465 AC_SUBST([PACKAGE], [$1])dnl 466 AC_SUBST([VERSION], [$2])], 467[_AM_SET_OPTIONS([$1])dnl 468dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 469m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 470 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 471 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 472 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 473 474_AM_IF_OPTION([no-define],, 475[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 476 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 477 478# Some tools Automake needs. 479AC_REQUIRE([AM_SANITY_CHECK])dnl 480AC_REQUIRE([AC_ARG_PROGRAM])dnl 481AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 482AM_MISSING_PROG(AUTOCONF, autoconf) 483AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 484AM_MISSING_PROG(AUTOHEADER, autoheader) 485AM_MISSING_PROG(MAKEINFO, makeinfo) 486AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 487AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 488AC_REQUIRE([AM_PROG_MKDIR_P])dnl 489# We need awk for the "check" target. The system "awk" is bad on 490# some platforms. 491AC_REQUIRE([AC_PROG_AWK])dnl 492AC_REQUIRE([AC_PROG_MAKE_SET])dnl 493AC_REQUIRE([AM_SET_LEADING_DOT])dnl 494_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 495 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 496 [_AM_PROG_TAR([v7])])]) 497_AM_IF_OPTION([no-dependencies],, 498[AC_PROVIDE_IFELSE([AC_PROG_CC], 499 [_AM_DEPENDENCIES(CC)], 500 [define([AC_PROG_CC], 501 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 502AC_PROVIDE_IFELSE([AC_PROG_CXX], 503 [_AM_DEPENDENCIES(CXX)], 504 [define([AC_PROG_CXX], 505 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 506AC_PROVIDE_IFELSE([AC_PROG_OBJC], 507 [_AM_DEPENDENCIES(OBJC)], 508 [define([AC_PROG_OBJC], 509 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 510]) 511_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 512dnl The `parallel-tests' driver may need to know about EXEEXT, so add the 513dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 514dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 515AC_CONFIG_COMMANDS_PRE(dnl 516[m4_provide_if([_AM_COMPILER_EXEEXT], 517 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 518]) 519 520dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 521dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 522dnl mangled by Autoconf and run in a shell conditional statement. 523m4_define([_AC_COMPILER_EXEEXT], 524m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 525 526 527# When config.status generates a header, we must update the stamp-h file. 528# This file resides in the same directory as the config header 529# that is generated. The stamp files are numbered to have different names. 530 531# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 532# loop where config.status creates the headers, so we can generate 533# our stamp files there. 534AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 535[# Compute $1's index in $config_headers. 536_am_arg=$1 537_am_stamp_count=1 538for _am_header in $config_headers :; do 539 case $_am_header in 540 $_am_arg | $_am_arg:* ) 541 break ;; 542 * ) 543 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 544 esac 545done 546echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 547 548# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 549# 550# This file is free software; the Free Software Foundation 551# gives unlimited permission to copy and/or distribute it, 552# with or without modifications, as long as this notice is preserved. 553 554# AM_PROG_INSTALL_SH 555# ------------------ 556# Define $install_sh. 557AC_DEFUN([AM_PROG_INSTALL_SH], 558[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 559if test x"${install_sh}" != xset; then 560 case $am_aux_dir in 561 *\ * | *\ *) 562 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 563 *) 564 install_sh="\${SHELL} $am_aux_dir/install-sh" 565 esac 566fi 567AC_SUBST(install_sh)]) 568 569# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 570# 571# This file is free software; the Free Software Foundation 572# gives unlimited permission to copy and/or distribute it, 573# with or without modifications, as long as this notice is preserved. 574 575# serial 2 576 577# Check whether the underlying file-system supports filenames 578# with a leading dot. For instance MS-DOS doesn't. 579AC_DEFUN([AM_SET_LEADING_DOT], 580[rm -rf .tst 2>/dev/null 581mkdir .tst 2>/dev/null 582if test -d .tst; then 583 am__leading_dot=. 584else 585 am__leading_dot=_ 586fi 587rmdir .tst 2>/dev/null 588AC_SUBST([am__leading_dot])]) 589 590# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 591# From Jim Meyering 592 593# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 594# Free Software Foundation, Inc. 595# 596# This file is free software; the Free Software Foundation 597# gives unlimited permission to copy and/or distribute it, 598# with or without modifications, as long as this notice is preserved. 599 600# serial 5 601 602# AM_MAINTAINER_MODE([DEFAULT-MODE]) 603# ---------------------------------- 604# Control maintainer-specific portions of Makefiles. 605# Default is to disable them, unless `enable' is passed literally. 606# For symmetry, `disable' may be passed as well. Anyway, the user 607# can override the default with the --enable/--disable switch. 608AC_DEFUN([AM_MAINTAINER_MODE], 609[m4_case(m4_default([$1], [disable]), 610 [enable], [m4_define([am_maintainer_other], [disable])], 611 [disable], [m4_define([am_maintainer_other], [enable])], 612 [m4_define([am_maintainer_other], [enable]) 613 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 614AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 615 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 616 AC_ARG_ENABLE([maintainer-mode], 617[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 618 (and sometimes confusing) to the casual installer], 619 [USE_MAINTAINER_MODE=$enableval], 620 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 621 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 622 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 623 MAINT=$MAINTAINER_MODE_TRUE 624 AC_SUBST([MAINT])dnl 625] 626) 627 628AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 629 630# Check to see how 'make' treats includes. -*- Autoconf -*- 631 632# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 633# 634# This file is free software; the Free Software Foundation 635# gives unlimited permission to copy and/or distribute it, 636# with or without modifications, as long as this notice is preserved. 637 638# serial 4 639 640# AM_MAKE_INCLUDE() 641# ----------------- 642# Check to see how make treats includes. 643AC_DEFUN([AM_MAKE_INCLUDE], 644[am_make=${MAKE-make} 645cat > confinc << 'END' 646am__doit: 647 @echo this is the am__doit target 648.PHONY: am__doit 649END 650# If we don't find an include directive, just comment out the code. 651AC_MSG_CHECKING([for style of include used by $am_make]) 652am__include="#" 653am__quote= 654_am_result=none 655# First try GNU make style include. 656echo "include confinc" > confmf 657# Ignore all kinds of additional output from `make'. 658case `$am_make -s -f confmf 2> /dev/null` in #( 659*the\ am__doit\ target*) 660 am__include=include 661 am__quote= 662 _am_result=GNU 663 ;; 664esac 665# Now try BSD make style include. 666if test "$am__include" = "#"; then 667 echo '.include "confinc"' > confmf 668 case `$am_make -s -f confmf 2> /dev/null` in #( 669 *the\ am__doit\ target*) 670 am__include=.include 671 am__quote="\"" 672 _am_result=BSD 673 ;; 674 esac 675fi 676AC_SUBST([am__include]) 677AC_SUBST([am__quote]) 678AC_MSG_RESULT([$_am_result]) 679rm -f confinc confmf 680]) 681 682# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 683 684# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 685# Free Software Foundation, Inc. 686# 687# This file is free software; the Free Software Foundation 688# gives unlimited permission to copy and/or distribute it, 689# with or without modifications, as long as this notice is preserved. 690 691# serial 6 692 693# AM_MISSING_PROG(NAME, PROGRAM) 694# ------------------------------ 695AC_DEFUN([AM_MISSING_PROG], 696[AC_REQUIRE([AM_MISSING_HAS_RUN]) 697$1=${$1-"${am_missing_run}$2"} 698AC_SUBST($1)]) 699 700 701# AM_MISSING_HAS_RUN 702# ------------------ 703# Define MISSING if not defined so far and test if it supports --run. 704# If it does, set am_missing_run to use it, otherwise, to nothing. 705AC_DEFUN([AM_MISSING_HAS_RUN], 706[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 707AC_REQUIRE_AUX_FILE([missing])dnl 708if test x"${MISSING+set}" != xset; then 709 case $am_aux_dir in 710 *\ * | *\ *) 711 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 712 *) 713 MISSING="\${SHELL} $am_aux_dir/missing" ;; 714 esac 715fi 716# Use eval to expand $SHELL 717if eval "$MISSING --run true"; then 718 am_missing_run="$MISSING --run " 719else 720 am_missing_run= 721 AC_MSG_WARN([`missing' script is too old or missing]) 722fi 723]) 724 725# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 726# 727# This file is free software; the Free Software Foundation 728# gives unlimited permission to copy and/or distribute it, 729# with or without modifications, as long as this notice is preserved. 730 731# AM_PROG_MKDIR_P 732# --------------- 733# Check for `mkdir -p'. 734AC_DEFUN([AM_PROG_MKDIR_P], 735[AC_PREREQ([2.60])dnl 736AC_REQUIRE([AC_PROG_MKDIR_P])dnl 737dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 738dnl while keeping a definition of mkdir_p for backward compatibility. 739dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 740dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 741dnl Makefile.ins that do not define MKDIR_P, so we do our own 742dnl adjustment using top_builddir (which is defined more often than 743dnl MKDIR_P). 744AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 745case $mkdir_p in 746 [[\\/$]]* | ?:[[\\/]]*) ;; 747 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 748esac 749]) 750 751# Helper functions for option handling. -*- Autoconf -*- 752 753# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 754# 755# This file is free software; the Free Software Foundation 756# gives unlimited permission to copy and/or distribute it, 757# with or without modifications, as long as this notice is preserved. 758 759# serial 4 760 761# _AM_MANGLE_OPTION(NAME) 762# ----------------------- 763AC_DEFUN([_AM_MANGLE_OPTION], 764[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 765 766# _AM_SET_OPTION(NAME) 767# ------------------------------ 768# Set option NAME. Presently that only means defining a flag for this option. 769AC_DEFUN([_AM_SET_OPTION], 770[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 771 772# _AM_SET_OPTIONS(OPTIONS) 773# ---------------------------------- 774# OPTIONS is a space-separated list of Automake options. 775AC_DEFUN([_AM_SET_OPTIONS], 776[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 777 778# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 779# ------------------------------------------- 780# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 781AC_DEFUN([_AM_IF_OPTION], 782[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 783 784# Check to make sure that the build environment is sane. -*- Autoconf -*- 785 786# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 787# Free Software Foundation, Inc. 788# 789# This file is free software; the Free Software Foundation 790# gives unlimited permission to copy and/or distribute it, 791# with or without modifications, as long as this notice is preserved. 792 793# serial 5 794 795# AM_SANITY_CHECK 796# --------------- 797AC_DEFUN([AM_SANITY_CHECK], 798[AC_MSG_CHECKING([whether build environment is sane]) 799# Just in case 800sleep 1 801echo timestamp > conftest.file 802# Reject unsafe characters in $srcdir or the absolute working directory 803# name. Accept space and tab only in the latter. 804am_lf=' 805' 806case `pwd` in 807 *[[\\\"\#\$\&\'\`$am_lf]]*) 808 AC_MSG_ERROR([unsafe absolute working directory name]);; 809esac 810case $srcdir in 811 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 812 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 813esac 814 815# Do `set' in a subshell so we don't clobber the current shell's 816# arguments. Must try -L first in case configure is actually a 817# symlink; some systems play weird games with the mod time of symlinks 818# (eg FreeBSD returns the mod time of the symlink's containing 819# directory). 820if ( 821 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 822 if test "$[*]" = "X"; then 823 # -L didn't work. 824 set X `ls -t "$srcdir/configure" conftest.file` 825 fi 826 rm -f conftest.file 827 if test "$[*]" != "X $srcdir/configure conftest.file" \ 828 && test "$[*]" != "X conftest.file $srcdir/configure"; then 829 830 # If neither matched, then we have a broken ls. This can happen 831 # if, for instance, CONFIG_SHELL is bash and it inherits a 832 # broken ls alias from the environment. This has actually 833 # happened. Such a system could not be considered "sane". 834 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 835alias in your environment]) 836 fi 837 838 test "$[2]" = conftest.file 839 ) 840then 841 # Ok. 842 : 843else 844 AC_MSG_ERROR([newly created file is older than distributed files! 845Check your system clock]) 846fi 847AC_MSG_RESULT(yes)]) 848 849# Copyright (C) 2009 Free Software Foundation, Inc. 850# 851# This file is free software; the Free Software Foundation 852# gives unlimited permission to copy and/or distribute it, 853# with or without modifications, as long as this notice is preserved. 854 855# serial 1 856 857# AM_SILENT_RULES([DEFAULT]) 858# -------------------------- 859# Enable less verbose build rules; with the default set to DEFAULT 860# (`yes' being less verbose, `no' or empty being verbose). 861AC_DEFUN([AM_SILENT_RULES], 862[AC_ARG_ENABLE([silent-rules], 863[ --enable-silent-rules less verbose build output (undo: `make V=1') 864 --disable-silent-rules verbose build output (undo: `make V=0')]) 865case $enable_silent_rules in 866yes) AM_DEFAULT_VERBOSITY=0;; 867no) AM_DEFAULT_VERBOSITY=1;; 868*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 869esac 870AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 871AM_BACKSLASH='\' 872AC_SUBST([AM_BACKSLASH])dnl 873_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 874]) 875 876# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 877# 878# This file is free software; the Free Software Foundation 879# gives unlimited permission to copy and/or distribute it, 880# with or without modifications, as long as this notice is preserved. 881 882# AM_PROG_INSTALL_STRIP 883# --------------------- 884# One issue with vendor `install' (even GNU) is that you can't 885# specify the program used to strip binaries. This is especially 886# annoying in cross-compiling environments, where the build's strip 887# is unlikely to handle the host's binaries. 888# Fortunately install-sh will honor a STRIPPROG variable, so we 889# always use install-sh in `make install-strip', and initialize 890# STRIPPROG with the value of the STRIP variable (set by the user). 891AC_DEFUN([AM_PROG_INSTALL_STRIP], 892[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 893# Installed binaries are usually stripped using `strip' when the user 894# run `make install-strip'. However `strip' might not be the right 895# tool to use in cross-compilation environments, therefore Automake 896# will honor the `STRIP' environment variable to overrule this program. 897dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 898if test "$cross_compiling" != no; then 899 AC_CHECK_TOOL([STRIP], [strip], :) 900fi 901INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 902AC_SUBST([INSTALL_STRIP_PROGRAM])]) 903 904# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 905# 906# This file is free software; the Free Software Foundation 907# gives unlimited permission to copy and/or distribute it, 908# with or without modifications, as long as this notice is preserved. 909 910# serial 2 911 912# _AM_SUBST_NOTMAKE(VARIABLE) 913# --------------------------- 914# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 915# This macro is traced by Automake. 916AC_DEFUN([_AM_SUBST_NOTMAKE]) 917 918# AM_SUBST_NOTMAKE(VARIABLE) 919# --------------------------- 920# Public sister of _AM_SUBST_NOTMAKE. 921AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 922 923# Check how to create a tarball. -*- Autoconf -*- 924 925# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 926# 927# This file is free software; the Free Software Foundation 928# gives unlimited permission to copy and/or distribute it, 929# with or without modifications, as long as this notice is preserved. 930 931# serial 2 932 933# _AM_PROG_TAR(FORMAT) 934# -------------------- 935# Check how to create a tarball in format FORMAT. 936# FORMAT should be one of `v7', `ustar', or `pax'. 937# 938# Substitute a variable $(am__tar) that is a command 939# writing to stdout a FORMAT-tarball containing the directory 940# $tardir. 941# tardir=directory && $(am__tar) > result.tar 942# 943# Substitute a variable $(am__untar) that extract such 944# a tarball read from stdin. 945# $(am__untar) < result.tar 946AC_DEFUN([_AM_PROG_TAR], 947[# Always define AMTAR for backward compatibility. 948AM_MISSING_PROG([AMTAR], [tar]) 949m4_if([$1], [v7], 950 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 951 [m4_case([$1], [ustar],, [pax],, 952 [m4_fatal([Unknown tar format])]) 953AC_MSG_CHECKING([how to create a $1 tar archive]) 954# Loop over all known methods to create a tar archive until one works. 955_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 956_am_tools=${am_cv_prog_tar_$1-$_am_tools} 957# Do not fold the above two line into one, because Tru64 sh and 958# Solaris sh will not grok spaces in the rhs of `-'. 959for _am_tool in $_am_tools 960do 961 case $_am_tool in 962 gnutar) 963 for _am_tar in tar gnutar gtar; 964 do 965 AM_RUN_LOG([$_am_tar --version]) && break 966 done 967 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 968 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 969 am__untar="$_am_tar -xf -" 970 ;; 971 plaintar) 972 # Must skip GNU tar: if it does not support --format= it doesn't create 973 # ustar tarball either. 974 (tar --version) >/dev/null 2>&1 && continue 975 am__tar='tar chf - "$$tardir"' 976 am__tar_='tar chf - "$tardir"' 977 am__untar='tar xf -' 978 ;; 979 pax) 980 am__tar='pax -L -x $1 -w "$$tardir"' 981 am__tar_='pax -L -x $1 -w "$tardir"' 982 am__untar='pax -r' 983 ;; 984 cpio) 985 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 986 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 987 am__untar='cpio -i -H $1 -d' 988 ;; 989 none) 990 am__tar=false 991 am__tar_=false 992 am__untar=false 993 ;; 994 esac 995 996 # If the value was cached, stop now. We just wanted to have am__tar 997 # and am__untar set. 998 test -n "${am_cv_prog_tar_$1}" && break 999 1000 # tar/untar a dummy directory, and stop if the command works 1001 rm -rf conftest.dir 1002 mkdir conftest.dir 1003 echo GrepMe > conftest.dir/file 1004 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1005 rm -rf conftest.dir 1006 if test -s conftest.tar; then 1007 AM_RUN_LOG([$am__untar <conftest.tar]) 1008 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1009 fi 1010done 1011rm -rf conftest.dir 1012 1013AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1014AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1015AC_SUBST([am__tar]) 1016AC_SUBST([am__untar]) 1017]) # _AM_PROG_TAR 1018 1019m4_include([m4/ax_define_dir.m4]) 1020# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1021# 1022# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1023# 1024# This program is free software; you can redistribute it and/or modify 1025# it under the terms of the GNU General Public License as published by 1026# the Free Software Foundation; either version 2 of the License, or 1027# (at your option) any later version. 1028# 1029# This program is distributed in the hope that it will be useful, but 1030# WITHOUT ANY WARRANTY; without even the implied warranty of 1031# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1032# General Public License for more details. 1033# 1034# You should have received a copy of the GNU General Public License 1035# along with this program; if not, write to the Free Software 1036# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1037# 1038# As a special exception to the GNU General Public License, if you 1039# distribute this file as part of a program that contains a 1040# configuration script generated by Autoconf, you may include it under 1041# the same distribution terms that you use for the rest of that program. 1042 1043# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1044# ---------------------------------- 1045AC_DEFUN([PKG_PROG_PKG_CONFIG], 1046[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1047m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 1048AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 1049if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1050 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1051fi 1052if test -n "$PKG_CONFIG"; then 1053 _pkg_min_version=m4_default([$1], [0.9.0]) 1054 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1055 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1056 AC_MSG_RESULT([yes]) 1057 else 1058 AC_MSG_RESULT([no]) 1059 PKG_CONFIG="" 1060 fi 1061 1062fi[]dnl 1063])# PKG_PROG_PKG_CONFIG 1064 1065# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1066# 1067# Check to see whether a particular set of modules exists. Similar 1068# to PKG_CHECK_MODULES(), but does not set variables or print errors. 1069# 1070# 1071# Similar to PKG_CHECK_MODULES, make sure that the first instance of 1072# this or PKG_CHECK_MODULES is called, or make sure to call 1073# PKG_CHECK_EXISTS manually 1074# -------------------------------------------------------------- 1075AC_DEFUN([PKG_CHECK_EXISTS], 1076[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1077if test -n "$PKG_CONFIG" && \ 1078 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1079 m4_ifval([$2], [$2], [:]) 1080m4_ifvaln([$3], [else 1081 $3])dnl 1082fi]) 1083 1084 1085# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1086# --------------------------------------------- 1087m4_define([_PKG_CONFIG], 1088[if test -n "$$1"; then 1089 pkg_cv_[]$1="$$1" 1090 elif test -n "$PKG_CONFIG"; then 1091 PKG_CHECK_EXISTS([$3], 1092 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 1093 [pkg_failed=yes]) 1094 else 1095 pkg_failed=untried 1096fi[]dnl 1097])# _PKG_CONFIG 1098 1099# _PKG_SHORT_ERRORS_SUPPORTED 1100# ----------------------------- 1101AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1102[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1103if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1104 _pkg_short_errors_supported=yes 1105else 1106 _pkg_short_errors_supported=no 1107fi[]dnl 1108])# _PKG_SHORT_ERRORS_SUPPORTED 1109 1110 1111# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1112# [ACTION-IF-NOT-FOUND]) 1113# 1114# 1115# Note that if there is a possibility the first call to 1116# PKG_CHECK_MODULES might not happen, you should be sure to include an 1117# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1118# 1119# 1120# -------------------------------------------------------------- 1121AC_DEFUN([PKG_CHECK_MODULES], 1122[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1123AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1124AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1125 1126pkg_failed=no 1127AC_MSG_CHECKING([for $1]) 1128 1129_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1130_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1131 1132m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1133and $1[]_LIBS to avoid the need to call pkg-config. 1134See the pkg-config man page for more details.]) 1135 1136if test $pkg_failed = yes; then 1137 _PKG_SHORT_ERRORS_SUPPORTED 1138 if test $_pkg_short_errors_supported = yes; then 1139 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 1140 else 1141 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 1142 fi 1143 # Put the nasty error message in config.log where it belongs 1144 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1145 1146 ifelse([$4], , [AC_MSG_ERROR(dnl 1147[Package requirements ($2) were not met: 1148 1149$$1_PKG_ERRORS 1150 1151Consider adjusting the PKG_CONFIG_PATH environment variable if you 1152installed software in a non-standard prefix. 1153 1154_PKG_TEXT 1155])], 1156 [AC_MSG_RESULT([no]) 1157 $4]) 1158elif test $pkg_failed = untried; then 1159 ifelse([$4], , [AC_MSG_FAILURE(dnl 1160[The pkg-config script could not be found or is too old. Make sure it 1161is in your PATH or set the PKG_CONFIG environment variable to the full 1162path to pkg-config. 1163 1164_PKG_TEXT 1165 1166To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 1167 [$4]) 1168else 1169 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1170 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1171 AC_MSG_RESULT([yes]) 1172 ifelse([$3], , :, [$3]) 1173fi[]dnl 1174])# PKG_CHECK_MODULES 1175 1176# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1177# 1178# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1179# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 1180# Inc. 1181# Written by Gordon Matzigkeit, 1996 1182# 1183# This file is free software; the Free Software Foundation gives 1184# unlimited permission to copy and/or distribute it, with or without 1185# modifications, as long as this notice is preserved. 1186 1187m4_define([_LT_COPYING], [dnl 1188# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1189# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 1190# Inc. 1191# Written by Gordon Matzigkeit, 1996 1192# 1193# This file is part of GNU Libtool. 1194# 1195# GNU Libtool is free software; you can redistribute it and/or 1196# modify it under the terms of the GNU General Public License as 1197# published by the Free Software Foundation; either version 2 of 1198# the License, or (at your option) any later version. 1199# 1200# As a special exception to the GNU General Public License, 1201# if you distribute this file as part of a program or library that 1202# is built using GNU Libtool, you may include this file under the 1203# same distribution terms that you use for the rest of that program. 1204# 1205# GNU Libtool is distributed in the hope that it will be useful, 1206# but WITHOUT ANY WARRANTY; without even the implied warranty of 1207# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1208# GNU General Public License for more details. 1209# 1210# You should have received a copy of the GNU General Public License 1211# along with GNU Libtool; see the file COPYING. If not, a copy 1212# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 1213# obtained by writing to the Free Software Foundation, Inc., 1214# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1215]) 1216 1217# serial 57 LT_INIT 1218 1219 1220# LT_PREREQ(VERSION) 1221# ------------------ 1222# Complain and exit if this libtool version is less that VERSION. 1223m4_defun([LT_PREREQ], 1224[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 1225 [m4_default([$3], 1226 [m4_fatal([Libtool version $1 or higher is required], 1227 63)])], 1228 [$2])]) 1229 1230 1231# _LT_CHECK_BUILDDIR 1232# ------------------ 1233# Complain if the absolute build directory name contains unusual characters 1234m4_defun([_LT_CHECK_BUILDDIR], 1235[case `pwd` in 1236 *\ * | *\ *) 1237 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1238esac 1239]) 1240 1241 1242# LT_INIT([OPTIONS]) 1243# ------------------ 1244AC_DEFUN([LT_INIT], 1245[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 1246AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1247AC_BEFORE([$0], [LT_LANG])dnl 1248AC_BEFORE([$0], [LT_OUTPUT])dnl 1249AC_BEFORE([$0], [LTDL_INIT])dnl 1250m4_require([_LT_CHECK_BUILDDIR])dnl 1251 1252dnl Autoconf doesn't catch unexpanded LT_ macros by default: 1253m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1254m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1255dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1256dnl unless we require an AC_DEFUNed macro: 1257AC_REQUIRE([LTOPTIONS_VERSION])dnl 1258AC_REQUIRE([LTSUGAR_VERSION])dnl 1259AC_REQUIRE([LTVERSION_VERSION])dnl 1260AC_REQUIRE([LTOBSOLETE_VERSION])dnl 1261m4_require([_LT_PROG_LTMAIN])dnl 1262 1263_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1264 1265dnl Parse OPTIONS 1266_LT_SET_OPTIONS([$0], [$1]) 1267 1268# This can be used to rebuild libtool when needed 1269LIBTOOL_DEPS="$ltmain" 1270 1271# Always use our own libtool. 1272LIBTOOL='$(SHELL) $(top_builddir)/libtool' 1273AC_SUBST(LIBTOOL)dnl 1274 1275_LT_SETUP 1276 1277# Only expand once: 1278m4_define([LT_INIT]) 1279])# LT_INIT 1280 1281# Old names: 1282AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1283AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1284dnl aclocal-1.4 backwards compatibility: 1285dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1286dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1287 1288 1289# _LT_CC_BASENAME(CC) 1290# ------------------- 1291# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1292m4_defun([_LT_CC_BASENAME], 1293[for cc_temp in $1""; do 1294 case $cc_temp in 1295 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1296 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1297 \-*) ;; 1298 *) break;; 1299 esac 1300done 1301cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1302]) 1303 1304 1305# _LT_FILEUTILS_DEFAULTS 1306# ---------------------- 1307# It is okay to use these file commands and assume they have been set 1308# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1309m4_defun([_LT_FILEUTILS_DEFAULTS], 1310[: ${CP="cp -f"} 1311: ${MV="mv -f"} 1312: ${RM="rm -f"} 1313])# _LT_FILEUTILS_DEFAULTS 1314 1315 1316# _LT_SETUP 1317# --------- 1318m4_defun([_LT_SETUP], 1319[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1320AC_REQUIRE([AC_CANONICAL_BUILD])dnl 1321AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1322AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1323 1324_LT_DECL([], [host_alias], [0], [The host system])dnl 1325_LT_DECL([], [host], [0])dnl 1326_LT_DECL([], [host_os], [0])dnl 1327dnl 1328_LT_DECL([], [build_alias], [0], [The build system])dnl 1329_LT_DECL([], [build], [0])dnl 1330_LT_DECL([], [build_os], [0])dnl 1331dnl 1332AC_REQUIRE([AC_PROG_CC])dnl 1333AC_REQUIRE([LT_PATH_LD])dnl 1334AC_REQUIRE([LT_PATH_NM])dnl 1335dnl 1336AC_REQUIRE([AC_PROG_LN_S])dnl 1337test -z "$LN_S" && LN_S="ln -s" 1338_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1339dnl 1340AC_REQUIRE([LT_CMD_MAX_LEN])dnl 1341_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1342_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1343dnl 1344m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1345m4_require([_LT_CHECK_SHELL_FEATURES])dnl 1346m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1347m4_require([_LT_CMD_RELOAD])dnl 1348m4_require([_LT_CHECK_MAGIC_METHOD])dnl 1349m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1350m4_require([_LT_CMD_OLD_ARCHIVE])dnl 1351m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1352m4_require([_LT_WITH_SYSROOT])dnl 1353 1354_LT_CONFIG_LIBTOOL_INIT([ 1355# See if we are running on zsh, and set the options which allow our 1356# commands through without removal of \ escapes INIT. 1357if test -n "\${ZSH_VERSION+set}" ; then 1358 setopt NO_GLOB_SUBST 1359fi 1360]) 1361if test -n "${ZSH_VERSION+set}" ; then 1362 setopt NO_GLOB_SUBST 1363fi 1364 1365_LT_CHECK_OBJDIR 1366 1367m4_require([_LT_TAG_COMPILER])dnl 1368 1369case $host_os in 1370aix3*) 1371 # AIX sometimes has problems with the GCC collect2 program. For some 1372 # reason, if we set the COLLECT_NAMES environment variable, the problems 1373 # vanish in a puff of smoke. 1374 if test "X${COLLECT_NAMES+set}" != Xset; then 1375 COLLECT_NAMES= 1376 export COLLECT_NAMES 1377 fi 1378 ;; 1379esac 1380 1381# Global variables: 1382ofile=libtool 1383can_build_shared=yes 1384 1385# All known linkers require a `.a' archive for static linking (except MSVC, 1386# which needs '.lib'). 1387libext=a 1388 1389with_gnu_ld="$lt_cv_prog_gnu_ld" 1390 1391old_CC="$CC" 1392old_CFLAGS="$CFLAGS" 1393 1394# Set sane defaults for various variables 1395test -z "$CC" && CC=cc 1396test -z "$LTCC" && LTCC=$CC 1397test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1398test -z "$LD" && LD=ld 1399test -z "$ac_objext" && ac_objext=o 1400 1401_LT_CC_BASENAME([$compiler]) 1402 1403# Only perform the check for file, if the check method requires it 1404test -z "$MAGIC_CMD" && MAGIC_CMD=file 1405case $deplibs_check_method in 1406file_magic*) 1407 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1408 _LT_PATH_MAGIC 1409 fi 1410 ;; 1411esac 1412 1413# Use C for the default configuration in the libtool script 1414LT_SUPPORTED_TAG([CC]) 1415_LT_LANG_C_CONFIG 1416_LT_LANG_DEFAULT_CONFIG 1417_LT_CONFIG_COMMANDS 1418])# _LT_SETUP 1419 1420 1421# _LT_PREPARE_SED_QUOTE_VARS 1422# -------------------------- 1423# Define a few sed substitution that help us do robust quoting. 1424m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 1425[# Backslashify metacharacters that are still active within 1426# double-quoted strings. 1427sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1428 1429# Same as above, but do not quote variable references. 1430double_quote_subst='s/\([["`\\]]\)/\\\1/g' 1431 1432# Sed substitution to delay expansion of an escaped shell variable in a 1433# double_quote_subst'ed string. 1434delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1435 1436# Sed substitution to delay expansion of an escaped single quote. 1437delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1438 1439# Sed substitution to avoid accidental globbing in evaled expressions 1440no_glob_subst='s/\*/\\\*/g' 1441]) 1442 1443# _LT_PROG_LTMAIN 1444# --------------- 1445# Note that this code is called both from `configure', and `config.status' 1446# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 1447# `config.status' has no value for ac_aux_dir unless we are using Automake, 1448# so we pass a copy along to make sure it has a sensible value anyway. 1449m4_defun([_LT_PROG_LTMAIN], 1450[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 1451_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 1452ltmain="$ac_aux_dir/ltmain.sh" 1453])# _LT_PROG_LTMAIN 1454 1455 1456 1457# So that we can recreate a full libtool script including additional 1458# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 1459# in macros and then make a single call at the end using the `libtool' 1460# label. 1461 1462 1463# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 1464# ---------------------------------------- 1465# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1466m4_define([_LT_CONFIG_LIBTOOL_INIT], 1467[m4_ifval([$1], 1468 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 1469 [$1 1470])])]) 1471 1472# Initialize. 1473m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1474 1475 1476# _LT_CONFIG_LIBTOOL([COMMANDS]) 1477# ------------------------------ 1478# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1479m4_define([_LT_CONFIG_LIBTOOL], 1480[m4_ifval([$1], 1481 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 1482 [$1 1483])])]) 1484 1485# Initialize. 1486m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1487 1488 1489# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 1490# ----------------------------------------------------- 1491m4_defun([_LT_CONFIG_SAVE_COMMANDS], 1492[_LT_CONFIG_LIBTOOL([$1]) 1493_LT_CONFIG_LIBTOOL_INIT([$2]) 1494]) 1495 1496 1497# _LT_FORMAT_COMMENT([COMMENT]) 1498# ----------------------------- 1499# Add leading comment marks to the start of each line, and a trailing 1500# full-stop to the whole comment if one is not present already. 1501m4_define([_LT_FORMAT_COMMENT], 1502[m4_ifval([$1], [ 1503m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 1504 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 1505)]) 1506 1507 1508 1509 1510 1511# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 1512# ------------------------------------------------------------------- 1513# CONFIGNAME is the name given to the value in the libtool script. 1514# VARNAME is the (base) name used in the configure script. 1515# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 1516# VARNAME. Any other value will be used directly. 1517m4_define([_LT_DECL], 1518[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 1519 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 1520 [m4_ifval([$1], [$1], [$2])]) 1521 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 1522 m4_ifval([$4], 1523 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 1524 lt_dict_add_subkey([lt_decl_dict], [$2], 1525 [tagged?], [m4_ifval([$5], [yes], [no])])]) 1526]) 1527 1528 1529# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 1530# -------------------------------------------------------- 1531m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1532 1533 1534# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 1535# ------------------------------------------------ 1536m4_define([lt_decl_tag_varnames], 1537[_lt_decl_filter([tagged?], [yes], $@)]) 1538 1539 1540# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 1541# --------------------------------------------------------- 1542m4_define([_lt_decl_filter], 1543[m4_case([$#], 1544 [0], [m4_fatal([$0: too few arguments: $#])], 1545 [1], [m4_fatal([$0: too few arguments: $#: $1])], 1546 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 1547 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 1548 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1549]) 1550 1551 1552# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 1553# -------------------------------------------------- 1554m4_define([lt_decl_quote_varnames], 1555[_lt_decl_filter([value], [1], $@)]) 1556 1557 1558# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 1559# --------------------------------------------------- 1560m4_define([lt_decl_dquote_varnames], 1561[_lt_decl_filter([value], [2], $@)]) 1562 1563 1564# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 1565# --------------------------------------------------- 1566m4_define([lt_decl_varnames_tagged], 1567[m4_assert([$# <= 2])dnl 1568_$0(m4_quote(m4_default([$1], [[, ]])), 1569 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 1570 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 1571m4_define([_lt_decl_varnames_tagged], 1572[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1573 1574 1575# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 1576# ------------------------------------------------ 1577m4_define([lt_decl_all_varnames], 1578[_$0(m4_quote(m4_default([$1], [[, ]])), 1579 m4_if([$2], [], 1580 m4_quote(lt_decl_varnames), 1581 m4_quote(m4_shift($@))))[]dnl 1582]) 1583m4_define([_lt_decl_all_varnames], 1584[lt_join($@, lt_decl_varnames_tagged([$1], 1585 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 1586]) 1587 1588 1589# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 1590# ------------------------------------ 1591# Quote a variable value, and forward it to `config.status' so that its 1592# declaration there will have the same value as in `configure'. VARNAME 1593# must have a single quote delimited value for this to work. 1594m4_define([_LT_CONFIG_STATUS_DECLARE], 1595[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1596 1597 1598# _LT_CONFIG_STATUS_DECLARATIONS 1599# ------------------------------ 1600# We delimit libtool config variables with single quotes, so when 1601# we write them to config.status, we have to be sure to quote all 1602# embedded single quotes properly. In configure, this macro expands 1603# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1604# 1605# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 1606m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 1607[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 1608 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1609 1610 1611# _LT_LIBTOOL_TAGS 1612# ---------------- 1613# Output comment and list of tags supported by the script 1614m4_defun([_LT_LIBTOOL_TAGS], 1615[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 1616available_tags="_LT_TAGS"dnl 1617]) 1618 1619 1620# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 1621# ----------------------------------- 1622# Extract the dictionary values for VARNAME (optionally with TAG) and 1623# expand to a commented shell variable setting: 1624# 1625# # Some comment about what VAR is for. 1626# visible_name=$lt_internal_name 1627m4_define([_LT_LIBTOOL_DECLARE], 1628[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 1629 [description])))[]dnl 1630m4_pushdef([_libtool_name], 1631 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 1632m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 1633 [0], [_libtool_name=[$]$1], 1634 [1], [_libtool_name=$lt_[]$1], 1635 [2], [_libtool_name=$lt_[]$1], 1636 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 1637m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 1638]) 1639 1640 1641# _LT_LIBTOOL_CONFIG_VARS 1642# ----------------------- 1643# Produce commented declarations of non-tagged libtool config variables 1644# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 1645# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 1646# section) are produced by _LT_LIBTOOL_TAG_VARS. 1647m4_defun([_LT_LIBTOOL_CONFIG_VARS], 1648[m4_foreach([_lt_var], 1649 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 1650 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1651 1652 1653# _LT_LIBTOOL_TAG_VARS(TAG) 1654# ------------------------- 1655m4_define([_LT_LIBTOOL_TAG_VARS], 1656[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 1657 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1658 1659 1660# _LT_TAGVAR(VARNAME, [TAGNAME]) 1661# ------------------------------ 1662m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1663 1664 1665# _LT_CONFIG_COMMANDS 1666# ------------------- 1667# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 1668# variables for single and double quote escaping we saved from calls 1669# to _LT_DECL, we can put quote escaped variables declarations 1670# into `config.status', and then the shell code to quote escape them in 1671# for loops in `config.status'. Finally, any additional code accumulated 1672# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 1673m4_defun([_LT_CONFIG_COMMANDS], 1674[AC_PROVIDE_IFELSE([LT_OUTPUT], 1675 dnl If the libtool generation code has been placed in $CONFIG_LT, 1676 dnl instead of duplicating it all over again into config.status, 1677 dnl then we will have config.status run $CONFIG_LT later, so it 1678 dnl needs to know what name is stored there: 1679 [AC_CONFIG_COMMANDS([libtool], 1680 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 1681 dnl If the libtool generation code is destined for config.status, 1682 dnl expand the accumulated commands and init code now: 1683 [AC_CONFIG_COMMANDS([libtool], 1684 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 1685])#_LT_CONFIG_COMMANDS 1686 1687 1688# Initialize. 1689m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 1690[ 1691 1692# The HP-UX ksh and POSIX shell print the target directory to stdout 1693# if CDPATH is set. 1694(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1695 1696sed_quote_subst='$sed_quote_subst' 1697double_quote_subst='$double_quote_subst' 1698delay_variable_subst='$delay_variable_subst' 1699_LT_CONFIG_STATUS_DECLARATIONS 1700LTCC='$LTCC' 1701LTCFLAGS='$LTCFLAGS' 1702compiler='$compiler_DEFAULT' 1703 1704# A function that is used when there is no print builtin or printf. 1705func_fallback_echo () 1706{ 1707 eval 'cat <<_LTECHO_EOF 1708\$[]1 1709_LTECHO_EOF' 1710} 1711 1712# Quote evaled strings. 1713for var in lt_decl_all_varnames([[ \ 1714]], lt_decl_quote_varnames); do 1715 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1716 *[[\\\\\\\`\\"\\\$]]*) 1717 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 1718 ;; 1719 *) 1720 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1721 ;; 1722 esac 1723done 1724 1725# Double-quote double-evaled strings. 1726for var in lt_decl_all_varnames([[ \ 1727]], lt_decl_dquote_varnames); do 1728 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1729 *[[\\\\\\\`\\"\\\$]]*) 1730 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 1731 ;; 1732 *) 1733 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1734 ;; 1735 esac 1736done 1737 1738_LT_OUTPUT_LIBTOOL_INIT 1739]) 1740 1741# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 1742# ------------------------------------ 1743# Generate a child script FILE with all initialization necessary to 1744# reuse the environment learned by the parent script, and make the 1745# file executable. If COMMENT is supplied, it is inserted after the 1746# `#!' sequence but before initialization text begins. After this 1747# macro, additional text can be appended to FILE to form the body of 1748# the child script. The macro ends with non-zero status if the 1749# file could not be fully written (such as if the disk is full). 1750m4_ifdef([AS_INIT_GENERATED], 1751[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 1752[m4_defun([_LT_GENERATED_FILE_INIT], 1753[m4_require([AS_PREPARE])]dnl 1754[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 1755[lt_write_fail=0 1756cat >$1 <<_ASEOF || lt_write_fail=1 1757#! $SHELL 1758# Generated by $as_me. 1759$2 1760SHELL=\${CONFIG_SHELL-$SHELL} 1761export SHELL 1762_ASEOF 1763cat >>$1 <<\_ASEOF || lt_write_fail=1 1764AS_SHELL_SANITIZE 1765_AS_PREPARE 1766exec AS_MESSAGE_FD>&1 1767_ASEOF 1768test $lt_write_fail = 0 && chmod +x $1[]dnl 1769m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1770 1771# LT_OUTPUT 1772# --------- 1773# This macro allows early generation of the libtool script (before 1774# AC_OUTPUT is called), incase it is used in configure for compilation 1775# tests. 1776AC_DEFUN([LT_OUTPUT], 1777[: ${CONFIG_LT=./config.lt} 1778AC_MSG_NOTICE([creating $CONFIG_LT]) 1779_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 1780[# Run this file to recreate a libtool stub with the current configuration.]) 1781 1782cat >>"$CONFIG_LT" <<\_LTEOF 1783lt_cl_silent=false 1784exec AS_MESSAGE_LOG_FD>>config.log 1785{ 1786 echo 1787 AS_BOX([Running $as_me.]) 1788} >&AS_MESSAGE_LOG_FD 1789 1790lt_cl_help="\ 1791\`$as_me' creates a local libtool stub from the current configuration, 1792for use in further configure time tests before the real libtool is 1793generated. 1794 1795Usage: $[0] [[OPTIONS]] 1796 1797 -h, --help print this help, then exit 1798 -V, --version print version number, then exit 1799 -q, --quiet do not print progress messages 1800 -d, --debug don't remove temporary files 1801 1802Report bugs to <bug-libtool@gnu.org>." 1803 1804lt_cl_version="\ 1805m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 1806m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 1807configured by $[0], generated by m4_PACKAGE_STRING. 1808 1809Copyright (C) 2010 Free Software Foundation, Inc. 1810This config.lt script is free software; the Free Software Foundation 1811gives unlimited permision to copy, distribute and modify it." 1812 1813while test $[#] != 0 1814do 1815 case $[1] in 1816 --version | --v* | -V ) 1817 echo "$lt_cl_version"; exit 0 ;; 1818 --help | --h* | -h ) 1819 echo "$lt_cl_help"; exit 0 ;; 1820 --debug | --d* | -d ) 1821 debug=: ;; 1822 --quiet | --q* | --silent | --s* | -q ) 1823 lt_cl_silent=: ;; 1824 1825 -*) AC_MSG_ERROR([unrecognized option: $[1] 1826Try \`$[0] --help' for more information.]) ;; 1827 1828 *) AC_MSG_ERROR([unrecognized argument: $[1] 1829Try \`$[0] --help' for more information.]) ;; 1830 esac 1831 shift 1832done 1833 1834if $lt_cl_silent; then 1835 exec AS_MESSAGE_FD>/dev/null 1836fi 1837_LTEOF 1838 1839cat >>"$CONFIG_LT" <<_LTEOF 1840_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 1841_LTEOF 1842 1843cat >>"$CONFIG_LT" <<\_LTEOF 1844AC_MSG_NOTICE([creating $ofile]) 1845_LT_OUTPUT_LIBTOOL_COMMANDS 1846AS_EXIT(0) 1847_LTEOF 1848chmod +x "$CONFIG_LT" 1849 1850# configure is writing to config.log, but config.lt does its own redirection, 1851# appending to config.log, which fails on DOS, as config.log is still kept 1852# open by configure. Here we exec the FD to /dev/null, effectively closing 1853# config.log, so it can be properly (re)opened and appended to by config.lt. 1854lt_cl_success=: 1855test "$silent" = yes && 1856 lt_config_lt_args="$lt_config_lt_args --quiet" 1857exec AS_MESSAGE_LOG_FD>/dev/null 1858$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 1859exec AS_MESSAGE_LOG_FD>>config.log 1860$lt_cl_success || AS_EXIT(1) 1861])# LT_OUTPUT 1862 1863 1864# _LT_CONFIG(TAG) 1865# --------------- 1866# If TAG is the built-in tag, create an initial libtool script with a 1867# default configuration from the untagged config vars. Otherwise add code 1868# to config.status for appending the configuration named by TAG from the 1869# matching tagged config vars. 1870m4_defun([_LT_CONFIG], 1871[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1872_LT_CONFIG_SAVE_COMMANDS([ 1873 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 1874 m4_if(_LT_TAG, [C], [ 1875 # See if we are running on zsh, and set the options which allow our 1876 # commands through without removal of \ escapes. 1877 if test -n "${ZSH_VERSION+set}" ; then 1878 setopt NO_GLOB_SUBST 1879 fi 1880 1881 cfgfile="${ofile}T" 1882 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 1883 $RM "$cfgfile" 1884 1885 cat <<_LT_EOF >> "$cfgfile" 1886#! $SHELL 1887 1888# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 1889# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 1890# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1891# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1892# 1893_LT_COPYING 1894_LT_LIBTOOL_TAGS 1895 1896# ### BEGIN LIBTOOL CONFIG 1897_LT_LIBTOOL_CONFIG_VARS 1898_LT_LIBTOOL_TAG_VARS 1899# ### END LIBTOOL CONFIG 1900 1901_LT_EOF 1902 1903 case $host_os in 1904 aix3*) 1905 cat <<\_LT_EOF >> "$cfgfile" 1906# AIX sometimes has problems with the GCC collect2 program. For some 1907# reason, if we set the COLLECT_NAMES environment variable, the problems 1908# vanish in a puff of smoke. 1909if test "X${COLLECT_NAMES+set}" != Xset; then 1910 COLLECT_NAMES= 1911 export COLLECT_NAMES 1912fi 1913_LT_EOF 1914 ;; 1915 esac 1916 1917 _LT_PROG_LTMAIN 1918 1919 # We use sed instead of cat because bash on DJGPP gets confused if 1920 # if finds mixed CR/LF and LF-only lines. Since sed operates in 1921 # text mode, it properly converts lines to CR/LF. This bash problem 1922 # is reportedly fixed, but why not run on old versions too? 1923 sed '$q' "$ltmain" >> "$cfgfile" \ 1924 || (rm -f "$cfgfile"; exit 1) 1925 1926 _LT_PROG_REPLACE_SHELLFNS 1927 1928 mv -f "$cfgfile" "$ofile" || 1929 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 1930 chmod +x "$ofile" 1931], 1932[cat <<_LT_EOF >> "$ofile" 1933 1934dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 1935dnl in a comment (ie after a #). 1936# ### BEGIN LIBTOOL TAG CONFIG: $1 1937_LT_LIBTOOL_TAG_VARS(_LT_TAG) 1938# ### END LIBTOOL TAG CONFIG: $1 1939_LT_EOF 1940])dnl /m4_if 1941], 1942[m4_if([$1], [], [ 1943 PACKAGE='$PACKAGE' 1944 VERSION='$VERSION' 1945 TIMESTAMP='$TIMESTAMP' 1946 RM='$RM' 1947 ofile='$ofile'], []) 1948])dnl /_LT_CONFIG_SAVE_COMMANDS 1949])# _LT_CONFIG 1950 1951 1952# LT_SUPPORTED_TAG(TAG) 1953# --------------------- 1954# Trace this macro to discover what tags are supported by the libtool 1955# --tag option, using: 1956# autoconf --trace 'LT_SUPPORTED_TAG:$1' 1957AC_DEFUN([LT_SUPPORTED_TAG], []) 1958 1959 1960# C support is built-in for now 1961m4_define([_LT_LANG_C_enabled], []) 1962m4_define([_LT_TAGS], []) 1963 1964 1965# LT_LANG(LANG) 1966# ------------- 1967# Enable libtool support for the given language if not already enabled. 1968AC_DEFUN([LT_LANG], 1969[AC_BEFORE([$0], [LT_OUTPUT])dnl 1970m4_case([$1], 1971 [C], [_LT_LANG(C)], 1972 [C++], [_LT_LANG(CXX)], 1973 [Java], [_LT_LANG(GCJ)], 1974 [Fortran 77], [_LT_LANG(F77)], 1975 [Fortran], [_LT_LANG(FC)], 1976 [Windows Resource], [_LT_LANG(RC)], 1977 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 1978 [_LT_LANG($1)], 1979 [m4_fatal([$0: unsupported language: "$1"])])])dnl 1980])# LT_LANG 1981 1982 1983# _LT_LANG(LANGNAME) 1984# ------------------ 1985m4_defun([_LT_LANG], 1986[m4_ifdef([_LT_LANG_]$1[_enabled], [], 1987 [LT_SUPPORTED_TAG([$1])dnl 1988 m4_append([_LT_TAGS], [$1 ])dnl 1989 m4_define([_LT_LANG_]$1[_enabled], [])dnl 1990 _LT_LANG_$1_CONFIG($1)])dnl 1991])# _LT_LANG 1992 1993 1994# _LT_LANG_DEFAULT_CONFIG 1995# ----------------------- 1996m4_defun([_LT_LANG_DEFAULT_CONFIG], 1997[AC_PROVIDE_IFELSE([AC_PROG_CXX], 1998 [LT_LANG(CXX)], 1999 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 2000 2001AC_PROVIDE_IFELSE([AC_PROG_F77], 2002 [LT_LANG(F77)], 2003 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 2004 2005AC_PROVIDE_IFELSE([AC_PROG_FC], 2006 [LT_LANG(FC)], 2007 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 2008 2009dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 2010dnl pulling things in needlessly. 2011AC_PROVIDE_IFELSE([AC_PROG_GCJ], 2012 [LT_LANG(GCJ)], 2013 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 2014 [LT_LANG(GCJ)], 2015 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 2016 [LT_LANG(GCJ)], 2017 [m4_ifdef([AC_PROG_GCJ], 2018 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 2019 m4_ifdef([A][M_PROG_GCJ], 2020 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 2021 m4_ifdef([LT_PROG_GCJ], 2022 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 2023 2024AC_PROVIDE_IFELSE([LT_PROG_RC], 2025 [LT_LANG(RC)], 2026 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 2027])# _LT_LANG_DEFAULT_CONFIG 2028 2029# Obsolete macros: 2030AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 2031AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 2032AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 2033AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 2034AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 2035dnl aclocal-1.4 backwards compatibility: 2036dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 2037dnl AC_DEFUN([AC_LIBTOOL_F77], []) 2038dnl AC_DEFUN([AC_LIBTOOL_FC], []) 2039dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 2040dnl AC_DEFUN([AC_LIBTOOL_RC], []) 2041 2042 2043# _LT_TAG_COMPILER 2044# ---------------- 2045m4_defun([_LT_TAG_COMPILER], 2046[AC_REQUIRE([AC_PROG_CC])dnl 2047 2048_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 2049_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 2050_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 2051_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 2052 2053# If no C compiler was specified, use CC. 2054LTCC=${LTCC-"$CC"} 2055 2056# If no C compiler flags were specified, use CFLAGS. 2057LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2058 2059# Allow CC to be a program name with arguments. 2060compiler=$CC 2061])# _LT_TAG_COMPILER 2062 2063 2064# _LT_COMPILER_BOILERPLATE 2065# ------------------------ 2066# Check for compiler boilerplate output or warnings with 2067# the simple compiler test code. 2068m4_defun([_LT_COMPILER_BOILERPLATE], 2069[m4_require([_LT_DECL_SED])dnl 2070ac_outfile=conftest.$ac_objext 2071echo "$lt_simple_compile_test_code" >conftest.$ac_ext 2072eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2073_lt_compiler_boilerplate=`cat conftest.err` 2074$RM conftest* 2075])# _LT_COMPILER_BOILERPLATE 2076 2077 2078# _LT_LINKER_BOILERPLATE 2079# ---------------------- 2080# Check for linker boilerplate output or warnings with 2081# the simple link test code. 2082m4_defun([_LT_LINKER_BOILERPLATE], 2083[m4_require([_LT_DECL_SED])dnl 2084ac_outfile=conftest.$ac_objext 2085echo "$lt_simple_link_test_code" >conftest.$ac_ext 2086eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2087_lt_linker_boilerplate=`cat conftest.err` 2088$RM -r conftest* 2089])# _LT_LINKER_BOILERPLATE 2090 2091# _LT_REQUIRED_DARWIN_CHECKS 2092# ------------------------- 2093m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 2094 case $host_os in 2095 rhapsody* | darwin*) 2096 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 2097 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 2098 AC_CHECK_TOOL([LIPO], [lipo], [:]) 2099 AC_CHECK_TOOL([OTOOL], [otool], [:]) 2100 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 2101 _LT_DECL([], [DSYMUTIL], [1], 2102 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 2103 _LT_DECL([], [NMEDIT], [1], 2104 [Tool to change global to local symbols on Mac OS X]) 2105 _LT_DECL([], [LIPO], [1], 2106 [Tool to manipulate fat objects and archives on Mac OS X]) 2107 _LT_DECL([], [OTOOL], [1], 2108 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 2109 _LT_DECL([], [OTOOL64], [1], 2110 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2111 2112 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 2113 [lt_cv_apple_cc_single_mod=no 2114 if test -z "${LT_MULTI_MODULE}"; then 2115 # By default we will add the -single_module flag. You can override 2116 # by either setting the environment variable LT_MULTI_MODULE 2117 # non-empty at configure time, or by adding -multi_module to the 2118 # link flags. 2119 rm -rf libconftest.dylib* 2120 echo "int foo(void){return 1;}" > conftest.c 2121 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2122-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 2123 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2124 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 2125 _lt_result=$? 2126 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 2127 lt_cv_apple_cc_single_mod=yes 2128 else 2129 cat conftest.err >&AS_MESSAGE_LOG_FD 2130 fi 2131 rm -rf libconftest.dylib* 2132 rm -f conftest.* 2133 fi]) 2134 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 2135 [lt_cv_ld_exported_symbols_list], 2136 [lt_cv_ld_exported_symbols_list=no 2137 save_LDFLAGS=$LDFLAGS 2138 echo "_main" > conftest.sym 2139 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 2140 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2141 [lt_cv_ld_exported_symbols_list=yes], 2142 [lt_cv_ld_exported_symbols_list=no]) 2143 LDFLAGS="$save_LDFLAGS" 2144 ]) 2145 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 2146 [lt_cv_ld_force_load=no 2147 cat > conftest.c << _LT_EOF 2148int forced_loaded() { return 2;} 2149_LT_EOF 2150 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 2151 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 2152 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 2153 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 2154 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 2155 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 2156 cat > conftest.c << _LT_EOF 2157int main() { return 0;} 2158_LT_EOF 2159 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 2160 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 2161 _lt_result=$? 2162 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 2163 lt_cv_ld_force_load=yes 2164 else 2165 cat conftest.err >&AS_MESSAGE_LOG_FD 2166 fi 2167 rm -f conftest.err libconftest.a conftest conftest.c 2168 rm -rf conftest.dSYM 2169 ]) 2170 case $host_os in 2171 rhapsody* | darwin1.[[012]]) 2172 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 2173 darwin1.*) 2174 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2175 darwin*) # darwin 5.x on 2176 # if running on 10.5 or later, the deployment target defaults 2177 # to the OS version, if on x86, and 10.4, the deployment 2178 # target defaults to 10.4. Don't you love it? 2179 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 2180 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 2181 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2182 10.[[012]]*) 2183 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2184 10.*) 2185 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2186 esac 2187 ;; 2188 esac 2189 if test "$lt_cv_apple_cc_single_mod" = "yes"; then 2190 _lt_dar_single_mod='$single_module' 2191 fi 2192 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 2193 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2194 else 2195 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 2196 fi 2197 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 2198 _lt_dsymutil='~$DSYMUTIL $lib || :' 2199 else 2200 _lt_dsymutil= 2201 fi 2202 ;; 2203 esac 2204]) 2205 2206 2207# _LT_DARWIN_LINKER_FEATURES 2208# -------------------------- 2209# Checks for linker and compiler features on darwin 2210m4_defun([_LT_DARWIN_LINKER_FEATURES], 2211[ 2212 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 2213 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 2214 _LT_TAGVAR(hardcode_direct, $1)=no 2215 _LT_TAGVAR(hardcode_automatic, $1)=yes 2216 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2217 if test "$lt_cv_ld_force_load" = "yes"; then 2218 _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\"`' 2219 else 2220 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 2221 fi 2222 _LT_TAGVAR(link_all_deplibs, $1)=yes 2223 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 2224 case $cc_basename in 2225 ifort*) _lt_dar_can_shared=yes ;; 2226 *) _lt_dar_can_shared=$GCC ;; 2227 esac 2228 if test "$_lt_dar_can_shared" = "yes"; then 2229 output_verbose_link_cmd=func_echo_all 2230 _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}" 2231 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 2232 _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}" 2233 _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}" 2234 m4_if([$1], [CXX], 2235[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 2236 _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}" 2237 _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}" 2238 fi 2239],[]) 2240 else 2241 _LT_TAGVAR(ld_shlibs, $1)=no 2242 fi 2243]) 2244 2245# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 2246# ---------------------------------- 2247# Links a minimal program and checks the executable 2248# for the system default hardcoded library path. In most cases, 2249# this is /usr/lib:/lib, but when the MPI compilers are used 2250# the location of the communication and MPI libs are included too. 2251# If we don't find anything, use the default library path according 2252# to the aix ld manual. 2253# Store the results from the different compilers for each TAGNAME. 2254# Allow to override them for all tags through lt_cv_aix_libpath. 2255m4_defun([_LT_SYS_MODULE_PATH_AIX], 2256[m4_require([_LT_DECL_SED])dnl 2257if test "${lt_cv_aix_libpath+set}" = set; then 2258 aix_libpath=$lt_cv_aix_libpath 2259else 2260 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 2261 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 2262 lt_aix_libpath_sed='[ 2263 /Import File Strings/,/^$/ { 2264 /^0/ { 2265 s/^0 *\([^ ]*\) *$/\1/ 2266 p 2267 } 2268 }]' 2269 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2270 # Check for a 64-bit object if we didn't find anything. 2271 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2272 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2273 fi],[]) 2274 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2275 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 2276 fi 2277 ]) 2278 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2279fi 2280])# _LT_SYS_MODULE_PATH_AIX 2281 2282 2283# _LT_SHELL_INIT(ARG) 2284# ------------------- 2285m4_define([_LT_SHELL_INIT], 2286[m4_divert_text([M4SH-INIT], [$1 2287])])# _LT_SHELL_INIT 2288 2289 2290 2291# _LT_PROG_ECHO_BACKSLASH 2292# ----------------------- 2293# Find how we can fake an echo command that does not interpret backslash. 2294# In particular, with Autoconf 2.60 or later we add some code to the start 2295# of the generated configure script which will find a shell with a builtin 2296# printf (which we can use as an echo command). 2297m4_defun([_LT_PROG_ECHO_BACKSLASH], 2298[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2299ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2300ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2301 2302AC_MSG_CHECKING([how to print strings]) 2303# Test print first, because it will be a builtin if present. 2304if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 2305 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 2306 ECHO='print -r --' 2307elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 2308 ECHO='printf %s\n' 2309else 2310 # Use this function as a fallback that always works. 2311 func_fallback_echo () 2312 { 2313 eval 'cat <<_LTECHO_EOF 2314$[]1 2315_LTECHO_EOF' 2316 } 2317 ECHO='func_fallback_echo' 2318fi 2319 2320# func_echo_all arg... 2321# Invoke $ECHO with all args, space-separated. 2322func_echo_all () 2323{ 2324 $ECHO "$*" 2325} 2326 2327case "$ECHO" in 2328 printf*) AC_MSG_RESULT([printf]) ;; 2329 print*) AC_MSG_RESULT([print -r]) ;; 2330 *) AC_MSG_RESULT([cat]) ;; 2331esac 2332 2333m4_ifdef([_AS_DETECT_SUGGESTED], 2334[_AS_DETECT_SUGGESTED([ 2335 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 2336 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2337 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2338 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2339 PATH=/empty FPATH=/empty; export PATH FPATH 2340 test "X`printf %s $ECHO`" = "X$ECHO" \ 2341 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2342 2343_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 2344_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 2345])# _LT_PROG_ECHO_BACKSLASH 2346 2347 2348# _LT_WITH_SYSROOT 2349# ---------------- 2350AC_DEFUN([_LT_WITH_SYSROOT], 2351[AC_MSG_CHECKING([for sysroot]) 2352AC_ARG_WITH([sysroot], 2353[ --with-sysroot[=DIR] Search for dependent libraries within DIR 2354 (or the compiler's sysroot if not specified).], 2355[], [with_sysroot=no]) 2356 2357dnl lt_sysroot will always be passed unquoted. We quote it here 2358dnl in case the user passed a directory name. 2359lt_sysroot= 2360case ${with_sysroot} in #( 2361 yes) 2362 if test "$GCC" = yes; then 2363 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 2364 fi 2365 ;; #( 2366 /*) 2367 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 2368 ;; #( 2369 no|'') 2370 ;; #( 2371 *) 2372 AC_MSG_RESULT([${with_sysroot}]) 2373 AC_MSG_ERROR([The sysroot must be an absolute path.]) 2374 ;; 2375esac 2376 2377 AC_MSG_RESULT([${lt_sysroot:-no}]) 2378_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 2379[dependent libraries, and in which our libraries should be installed.])]) 2380 2381# _LT_ENABLE_LOCK 2382# --------------- 2383m4_defun([_LT_ENABLE_LOCK], 2384[AC_ARG_ENABLE([libtool-lock], 2385 [AS_HELP_STRING([--disable-libtool-lock], 2386 [avoid locking (might break parallel builds)])]) 2387test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2388 2389# Some flags need to be propagated to the compiler or linker for good 2390# libtool support. 2391case $host in 2392ia64-*-hpux*) 2393 # Find out which ABI we are using. 2394 echo 'int i;' > conftest.$ac_ext 2395 if AC_TRY_EVAL(ac_compile); then 2396 case `/usr/bin/file conftest.$ac_objext` in 2397 *ELF-32*) 2398 HPUX_IA64_MODE="32" 2399 ;; 2400 *ELF-64*) 2401 HPUX_IA64_MODE="64" 2402 ;; 2403 esac 2404 fi 2405 rm -rf conftest* 2406 ;; 2407*-*-irix6*) 2408 # Find out which ABI we are using. 2409 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 2410 if AC_TRY_EVAL(ac_compile); then 2411 if test "$lt_cv_prog_gnu_ld" = yes; then 2412 case `/usr/bin/file conftest.$ac_objext` in 2413 *32-bit*) 2414 LD="${LD-ld} -melf32bsmip" 2415 ;; 2416 *N32*) 2417 LD="${LD-ld} -melf32bmipn32" 2418 ;; 2419 *64-bit*) 2420 LD="${LD-ld} -melf64bmip" 2421 ;; 2422 esac 2423 else 2424 case `/usr/bin/file conftest.$ac_objext` in 2425 *32-bit*) 2426 LD="${LD-ld} -32" 2427 ;; 2428 *N32*) 2429 LD="${LD-ld} -n32" 2430 ;; 2431 *64-bit*) 2432 LD="${LD-ld} -64" 2433 ;; 2434 esac 2435 fi 2436 fi 2437 rm -rf conftest* 2438 ;; 2439 2440x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 2441s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 2442 # Find out which ABI we are using. 2443 echo 'int i;' > conftest.$ac_ext 2444 if AC_TRY_EVAL(ac_compile); then 2445 case `/usr/bin/file conftest.o` in 2446 *32-bit*) 2447 case $host in 2448 x86_64-*kfreebsd*-gnu) 2449 LD="${LD-ld} -m elf_i386_fbsd" 2450 ;; 2451 x86_64-*linux*) 2452 LD="${LD-ld} -m elf_i386" 2453 ;; 2454 ppc64-*linux*|powerpc64-*linux*) 2455 LD="${LD-ld} -m elf32ppclinux" 2456 ;; 2457 s390x-*linux*) 2458 LD="${LD-ld} -m elf_s390" 2459 ;; 2460 sparc64-*linux*) 2461 LD="${LD-ld} -m elf32_sparc" 2462 ;; 2463 esac 2464 ;; 2465 *64-bit*) 2466 case $host in 2467 x86_64-*kfreebsd*-gnu) 2468 LD="${LD-ld} -m elf_x86_64_fbsd" 2469 ;; 2470 x86_64-*linux*) 2471 LD="${LD-ld} -m elf_x86_64" 2472 ;; 2473 ppc*-*linux*|powerpc*-*linux*) 2474 LD="${LD-ld} -m elf64ppc" 2475 ;; 2476 s390*-*linux*|s390*-*tpf*) 2477 LD="${LD-ld} -m elf64_s390" 2478 ;; 2479 sparc*-*linux*) 2480 LD="${LD-ld} -m elf64_sparc" 2481 ;; 2482 esac 2483 ;; 2484 esac 2485 fi 2486 rm -rf conftest* 2487 ;; 2488 2489*-*-sco3.2v5*) 2490 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2491 SAVE_CFLAGS="$CFLAGS" 2492 CFLAGS="$CFLAGS -belf" 2493 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2494 [AC_LANG_PUSH(C) 2495 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2496 AC_LANG_POP]) 2497 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2498 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2499 CFLAGS="$SAVE_CFLAGS" 2500 fi 2501 ;; 2502sparc*-*solaris*) 2503 # Find out which ABI we are using. 2504 echo 'int i;' > conftest.$ac_ext 2505 if AC_TRY_EVAL(ac_compile); then 2506 case `/usr/bin/file conftest.o` in 2507 *64-bit*) 2508 case $lt_cv_prog_gnu_ld in 2509 yes*) LD="${LD-ld} -m elf64_sparc" ;; 2510 *) 2511 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 2512 LD="${LD-ld} -64" 2513 fi 2514 ;; 2515 esac 2516 ;; 2517 esac 2518 fi 2519 rm -rf conftest* 2520 ;; 2521esac 2522 2523need_locks="$enable_libtool_lock" 2524])# _LT_ENABLE_LOCK 2525 2526 2527# _LT_PROG_AR 2528# ----------- 2529m4_defun([_LT_PROG_AR], 2530[AC_CHECK_TOOLS(AR, [ar], false) 2531: ${AR=ar} 2532: ${AR_FLAGS=cru} 2533_LT_DECL([], [AR], [1], [The archiver]) 2534_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 2535 2536AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 2537 [lt_cv_ar_at_file=no 2538 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 2539 [echo conftest.$ac_objext > conftest.lst 2540 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 2541 AC_TRY_EVAL([lt_ar_try]) 2542 if test "$ac_status" -eq 0; then 2543 # Ensure the archiver fails upon bogus file names. 2544 rm -f conftest.$ac_objext libconftest.a 2545 AC_TRY_EVAL([lt_ar_try]) 2546 if test "$ac_status" -ne 0; then 2547 lt_cv_ar_at_file=@ 2548 fi 2549 fi 2550 rm -f conftest.* libconftest.a 2551 ]) 2552 ]) 2553 2554if test "x$lt_cv_ar_at_file" = xno; then 2555 archiver_list_spec= 2556else 2557 archiver_list_spec=$lt_cv_ar_at_file 2558fi 2559_LT_DECL([], [archiver_list_spec], [1], 2560 [How to feed a file listing to the archiver]) 2561])# _LT_PROG_AR 2562 2563 2564# _LT_CMD_OLD_ARCHIVE 2565# ------------------- 2566m4_defun([_LT_CMD_OLD_ARCHIVE], 2567[_LT_PROG_AR 2568 2569AC_CHECK_TOOL(STRIP, strip, :) 2570test -z "$STRIP" && STRIP=: 2571_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2572 2573AC_CHECK_TOOL(RANLIB, ranlib, :) 2574test -z "$RANLIB" && RANLIB=: 2575_LT_DECL([], [RANLIB], [1], 2576 [Commands used to install an old-style archive]) 2577 2578# Determine commands to create old-style static archives. 2579old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 2580old_postinstall_cmds='chmod 644 $oldlib' 2581old_postuninstall_cmds= 2582 2583if test -n "$RANLIB"; then 2584 case $host_os in 2585 openbsd*) 2586 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 2587 ;; 2588 *) 2589 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 2590 ;; 2591 esac 2592 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 2593fi 2594 2595case $host_os in 2596 darwin*) 2597 lock_old_archive_extraction=yes ;; 2598 *) 2599 lock_old_archive_extraction=no ;; 2600esac 2601_LT_DECL([], [old_postinstall_cmds], [2]) 2602_LT_DECL([], [old_postuninstall_cmds], [2]) 2603_LT_TAGDECL([], [old_archive_cmds], [2], 2604 [Commands used to build an old-style archive]) 2605_LT_DECL([], [lock_old_archive_extraction], [0], 2606 [Whether to use a lock for old archive extraction]) 2607])# _LT_CMD_OLD_ARCHIVE 2608 2609 2610# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2611# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2612# ---------------------------------------------------------------- 2613# Check whether the given compiler option works 2614AC_DEFUN([_LT_COMPILER_OPTION], 2615[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2616m4_require([_LT_DECL_SED])dnl 2617AC_CACHE_CHECK([$1], [$2], 2618 [$2=no 2619 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2620 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2621 lt_compiler_flag="$3" 2622 # Insert the option either (1) after the last *FLAGS variable, or 2623 # (2) before a word containing "conftest.", or (3) at the end. 2624 # Note that $ac_compile itself does not contain backslashes and begins 2625 # with a dollar sign (not a hyphen), so the echo should work correctly. 2626 # The option is referenced via a variable to avoid confusing sed. 2627 lt_compile=`echo "$ac_compile" | $SED \ 2628 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2629 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2630 -e 's:$: $lt_compiler_flag:'` 2631 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2632 (eval "$lt_compile" 2>conftest.err) 2633 ac_status=$? 2634 cat conftest.err >&AS_MESSAGE_LOG_FD 2635 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2636 if (exit $ac_status) && test -s "$ac_outfile"; then 2637 # The compiler can only warn and ignore the option if not recognized 2638 # So say no if there are warnings other than the usual output. 2639 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 2640 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2641 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2642 $2=yes 2643 fi 2644 fi 2645 $RM conftest* 2646]) 2647 2648if test x"[$]$2" = xyes; then 2649 m4_if([$5], , :, [$5]) 2650else 2651 m4_if([$6], , :, [$6]) 2652fi 2653])# _LT_COMPILER_OPTION 2654 2655# Old name: 2656AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2657dnl aclocal-1.4 backwards compatibility: 2658dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2659 2660 2661# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2662# [ACTION-SUCCESS], [ACTION-FAILURE]) 2663# ---------------------------------------------------- 2664# Check whether the given linker option works 2665AC_DEFUN([_LT_LINKER_OPTION], 2666[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2667m4_require([_LT_DECL_SED])dnl 2668AC_CACHE_CHECK([$1], [$2], 2669 [$2=no 2670 save_LDFLAGS="$LDFLAGS" 2671 LDFLAGS="$LDFLAGS $3" 2672 echo "$lt_simple_link_test_code" > conftest.$ac_ext 2673 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2674 # The linker can only warn and ignore the option if not recognized 2675 # So say no if there are warnings 2676 if test -s conftest.err; then 2677 # Append any errors to the config.log. 2678 cat conftest.err 1>&AS_MESSAGE_LOG_FD 2679 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 2680 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2681 if diff conftest.exp conftest.er2 >/dev/null; then 2682 $2=yes 2683 fi 2684 else 2685 $2=yes 2686 fi 2687 fi 2688 $RM -r conftest* 2689 LDFLAGS="$save_LDFLAGS" 2690]) 2691 2692if test x"[$]$2" = xyes; then 2693 m4_if([$4], , :, [$4]) 2694else 2695 m4_if([$5], , :, [$5]) 2696fi 2697])# _LT_LINKER_OPTION 2698 2699# Old name: 2700AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2701dnl aclocal-1.4 backwards compatibility: 2702dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2703 2704 2705# LT_CMD_MAX_LEN 2706#--------------- 2707AC_DEFUN([LT_CMD_MAX_LEN], 2708[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2709# find the maximum length of command line arguments 2710AC_MSG_CHECKING([the maximum length of command line arguments]) 2711AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2712 i=0 2713 teststring="ABCD" 2714 2715 case $build_os in 2716 msdosdjgpp*) 2717 # On DJGPP, this test can blow up pretty badly due to problems in libc 2718 # (any single argument exceeding 2000 bytes causes a buffer overrun 2719 # during glob expansion). Even if it were fixed, the result of this 2720 # check would be larger than it should be. 2721 lt_cv_sys_max_cmd_len=12288; # 12K is about right 2722 ;; 2723 2724 gnu*) 2725 # Under GNU Hurd, this test is not required because there is 2726 # no limit to the length of command line arguments. 2727 # Libtool will interpret -1 as no limit whatsoever 2728 lt_cv_sys_max_cmd_len=-1; 2729 ;; 2730 2731 cygwin* | mingw* | cegcc*) 2732 # On Win9x/ME, this test blows up -- it succeeds, but takes 2733 # about 5 minutes as the teststring grows exponentially. 2734 # Worse, since 9x/ME are not pre-emptively multitasking, 2735 # you end up with a "frozen" computer, even though with patience 2736 # the test eventually succeeds (with a max line length of 256k). 2737 # Instead, let's just punt: use the minimum linelength reported by 2738 # all of the supported platforms: 8192 (on NT/2K/XP). 2739 lt_cv_sys_max_cmd_len=8192; 2740 ;; 2741 2742 mint*) 2743 # On MiNT this can take a long time and run out of memory. 2744 lt_cv_sys_max_cmd_len=8192; 2745 ;; 2746 2747 amigaos*) 2748 # On AmigaOS with pdksh, this test takes hours, literally. 2749 # So we just punt and use a minimum line length of 8192. 2750 lt_cv_sys_max_cmd_len=8192; 2751 ;; 2752 2753 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2754 # This has been around since 386BSD, at least. Likely further. 2755 if test -x /sbin/sysctl; then 2756 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2757 elif test -x /usr/sbin/sysctl; then 2758 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2759 else 2760 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2761 fi 2762 # And add a safety zone 2763 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2764 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2765 ;; 2766 2767 interix*) 2768 # We know the value 262144 and hardcode it with a safety zone (like BSD) 2769 lt_cv_sys_max_cmd_len=196608 2770 ;; 2771 2772 osf*) 2773 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2774 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2775 # nice to cause kernel panics so lets avoid the loop below. 2776 # First set a reasonable default. 2777 lt_cv_sys_max_cmd_len=16384 2778 # 2779 if test -x /sbin/sysconfig; then 2780 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2781 *1*) lt_cv_sys_max_cmd_len=-1 ;; 2782 esac 2783 fi 2784 ;; 2785 sco3.2v5*) 2786 lt_cv_sys_max_cmd_len=102400 2787 ;; 2788 sysv5* | sco5v6* | sysv4.2uw2*) 2789 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2790 if test -n "$kargmax"; then 2791 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2792 else 2793 lt_cv_sys_max_cmd_len=32768 2794 fi 2795 ;; 2796 *) 2797 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 2798 if test -n "$lt_cv_sys_max_cmd_len"; then 2799 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2800 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2801 else 2802 # Make teststring a little bigger before we do anything with it. 2803 # a 1K string should be a reasonable start. 2804 for i in 1 2 3 4 5 6 7 8 ; do 2805 teststring=$teststring$teststring 2806 done 2807 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2808 # If test is not a shell built-in, we'll probably end up computing a 2809 # maximum length that is only half of the actual maximum length, but 2810 # we can't tell. 2811 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 2812 = "X$teststring$teststring"; } >/dev/null 2>&1 && 2813 test $i != 17 # 1/2 MB should be enough 2814 do 2815 i=`expr $i + 1` 2816 teststring=$teststring$teststring 2817 done 2818 # Only check the string length outside the loop. 2819 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 2820 teststring= 2821 # Add a significant safety factor because C++ compilers can tack on 2822 # massive amounts of additional arguments before passing them to the 2823 # linker. It appears as though 1/2 is a usable value. 2824 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2825 fi 2826 ;; 2827 esac 2828]) 2829if test -n $lt_cv_sys_max_cmd_len ; then 2830 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2831else 2832 AC_MSG_RESULT(none) 2833fi 2834max_cmd_len=$lt_cv_sys_max_cmd_len 2835_LT_DECL([], [max_cmd_len], [0], 2836 [What is the maximum length of a command?]) 2837])# LT_CMD_MAX_LEN 2838 2839# Old name: 2840AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2841dnl aclocal-1.4 backwards compatibility: 2842dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2843 2844 2845# _LT_HEADER_DLFCN 2846# ---------------- 2847m4_defun([_LT_HEADER_DLFCN], 2848[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 2849])# _LT_HEADER_DLFCN 2850 2851 2852# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2853# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2854# ---------------------------------------------------------------- 2855m4_defun([_LT_TRY_DLOPEN_SELF], 2856[m4_require([_LT_HEADER_DLFCN])dnl 2857if test "$cross_compiling" = yes; then : 2858 [$4] 2859else 2860 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2861 lt_status=$lt_dlunknown 2862 cat > conftest.$ac_ext <<_LT_EOF 2863[#line $LINENO "configure" 2864#include "confdefs.h" 2865 2866#if HAVE_DLFCN_H 2867#include <dlfcn.h> 2868#endif 2869 2870#include <stdio.h> 2871 2872#ifdef RTLD_GLOBAL 2873# define LT_DLGLOBAL RTLD_GLOBAL 2874#else 2875# ifdef DL_GLOBAL 2876# define LT_DLGLOBAL DL_GLOBAL 2877# else 2878# define LT_DLGLOBAL 0 2879# endif 2880#endif 2881 2882/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2883 find out it does not work in some platform. */ 2884#ifndef LT_DLLAZY_OR_NOW 2885# ifdef RTLD_LAZY 2886# define LT_DLLAZY_OR_NOW RTLD_LAZY 2887# else 2888# ifdef DL_LAZY 2889# define LT_DLLAZY_OR_NOW DL_LAZY 2890# else 2891# ifdef RTLD_NOW 2892# define LT_DLLAZY_OR_NOW RTLD_NOW 2893# else 2894# ifdef DL_NOW 2895# define LT_DLLAZY_OR_NOW DL_NOW 2896# else 2897# define LT_DLLAZY_OR_NOW 0 2898# endif 2899# endif 2900# endif 2901# endif 2902#endif 2903 2904/* When -fvisbility=hidden is used, assume the code has been annotated 2905 correspondingly for the symbols needed. */ 2906#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 2907int fnord () __attribute__((visibility("default"))); 2908#endif 2909 2910int fnord () { return 42; } 2911int main () 2912{ 2913 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2914 int status = $lt_dlunknown; 2915 2916 if (self) 2917 { 2918 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2919 else 2920 { 2921 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2922 else puts (dlerror ()); 2923 } 2924 /* dlclose (self); */ 2925 } 2926 else 2927 puts (dlerror ()); 2928 2929 return status; 2930}] 2931_LT_EOF 2932 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2933 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2934 lt_status=$? 2935 case x$lt_status in 2936 x$lt_dlno_uscore) $1 ;; 2937 x$lt_dlneed_uscore) $2 ;; 2938 x$lt_dlunknown|x*) $3 ;; 2939 esac 2940 else : 2941 # compilation failed 2942 $3 2943 fi 2944fi 2945rm -fr conftest* 2946])# _LT_TRY_DLOPEN_SELF 2947 2948 2949# LT_SYS_DLOPEN_SELF 2950# ------------------ 2951AC_DEFUN([LT_SYS_DLOPEN_SELF], 2952[m4_require([_LT_HEADER_DLFCN])dnl 2953if test "x$enable_dlopen" != xyes; then 2954 enable_dlopen=unknown 2955 enable_dlopen_self=unknown 2956 enable_dlopen_self_static=unknown 2957else 2958 lt_cv_dlopen=no 2959 lt_cv_dlopen_libs= 2960 2961 case $host_os in 2962 beos*) 2963 lt_cv_dlopen="load_add_on" 2964 lt_cv_dlopen_libs= 2965 lt_cv_dlopen_self=yes 2966 ;; 2967 2968 mingw* | pw32* | cegcc*) 2969 lt_cv_dlopen="LoadLibrary" 2970 lt_cv_dlopen_libs= 2971 ;; 2972 2973 cygwin*) 2974 lt_cv_dlopen="dlopen" 2975 lt_cv_dlopen_libs= 2976 ;; 2977 2978 darwin*) 2979 # if libdl is installed we need to link against it 2980 AC_CHECK_LIB([dl], [dlopen], 2981 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 2982 lt_cv_dlopen="dyld" 2983 lt_cv_dlopen_libs= 2984 lt_cv_dlopen_self=yes 2985 ]) 2986 ;; 2987 2988 *) 2989 AC_CHECK_FUNC([shl_load], 2990 [lt_cv_dlopen="shl_load"], 2991 [AC_CHECK_LIB([dld], [shl_load], 2992 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 2993 [AC_CHECK_FUNC([dlopen], 2994 [lt_cv_dlopen="dlopen"], 2995 [AC_CHECK_LIB([dl], [dlopen], 2996 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 2997 [AC_CHECK_LIB([svld], [dlopen], 2998 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 2999 [AC_CHECK_LIB([dld], [dld_link], 3000 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 3001 ]) 3002 ]) 3003 ]) 3004 ]) 3005 ]) 3006 ;; 3007 esac 3008 3009 if test "x$lt_cv_dlopen" != xno; then 3010 enable_dlopen=yes 3011 else 3012 enable_dlopen=no 3013 fi 3014 3015 case $lt_cv_dlopen in 3016 dlopen) 3017 save_CPPFLAGS="$CPPFLAGS" 3018 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 3019 3020 save_LDFLAGS="$LDFLAGS" 3021 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 3022 3023 save_LIBS="$LIBS" 3024 LIBS="$lt_cv_dlopen_libs $LIBS" 3025 3026 AC_CACHE_CHECK([whether a program can dlopen itself], 3027 lt_cv_dlopen_self, [dnl 3028 _LT_TRY_DLOPEN_SELF( 3029 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 3030 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 3031 ]) 3032 3033 if test "x$lt_cv_dlopen_self" = xyes; then 3034 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 3035 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 3036 lt_cv_dlopen_self_static, [dnl 3037 _LT_TRY_DLOPEN_SELF( 3038 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 3039 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 3040 ]) 3041 fi 3042 3043 CPPFLAGS="$save_CPPFLAGS" 3044 LDFLAGS="$save_LDFLAGS" 3045 LIBS="$save_LIBS" 3046 ;; 3047 esac 3048 3049 case $lt_cv_dlopen_self in 3050 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 3051 *) enable_dlopen_self=unknown ;; 3052 esac 3053 3054 case $lt_cv_dlopen_self_static in 3055 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 3056 *) enable_dlopen_self_static=unknown ;; 3057 esac 3058fi 3059_LT_DECL([dlopen_support], [enable_dlopen], [0], 3060 [Whether dlopen is supported]) 3061_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 3062 [Whether dlopen of programs is supported]) 3063_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 3064 [Whether dlopen of statically linked programs is supported]) 3065])# LT_SYS_DLOPEN_SELF 3066 3067# Old name: 3068AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 3069dnl aclocal-1.4 backwards compatibility: 3070dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 3071 3072 3073# _LT_COMPILER_C_O([TAGNAME]) 3074# --------------------------- 3075# Check to see if options -c and -o are simultaneously supported by compiler. 3076# This macro does not hard code the compiler like AC_PROG_CC_C_O. 3077m4_defun([_LT_COMPILER_C_O], 3078[m4_require([_LT_DECL_SED])dnl 3079m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3080m4_require([_LT_TAG_COMPILER])dnl 3081AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3082 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3083 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3084 $RM -r conftest 2>/dev/null 3085 mkdir conftest 3086 cd conftest 3087 mkdir out 3088 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3089 3090 lt_compiler_flag="-o out/conftest2.$ac_objext" 3091 # Insert the option either (1) after the last *FLAGS variable, or 3092 # (2) before a word containing "conftest.", or (3) at the end. 3093 # Note that $ac_compile itself does not contain backslashes and begins 3094 # with a dollar sign (not a hyphen), so the echo should work correctly. 3095 lt_compile=`echo "$ac_compile" | $SED \ 3096 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3097 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3098 -e 's:$: $lt_compiler_flag:'` 3099 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3100 (eval "$lt_compile" 2>out/conftest.err) 3101 ac_status=$? 3102 cat out/conftest.err >&AS_MESSAGE_LOG_FD 3103 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3104 if (exit $ac_status) && test -s out/conftest2.$ac_objext 3105 then 3106 # The compiler can only warn and ignore the option if not recognized 3107 # So say no if there are warnings 3108 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 3109 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3110 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3111 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3112 fi 3113 fi 3114 chmod u+w . 2>&AS_MESSAGE_LOG_FD 3115 $RM conftest* 3116 # SGI C++ compiler will create directory out/ii_files/ for 3117 # template instantiation 3118 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 3119 $RM out/* && rmdir out 3120 cd .. 3121 $RM -r conftest 3122 $RM conftest* 3123]) 3124_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 3125 [Does compiler simultaneously support -c and -o options?]) 3126])# _LT_COMPILER_C_O 3127 3128 3129# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 3130# ---------------------------------- 3131# Check to see if we can do hard links to lock some files if needed 3132m4_defun([_LT_COMPILER_FILE_LOCKS], 3133[m4_require([_LT_ENABLE_LOCK])dnl 3134m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3135_LT_COMPILER_C_O([$1]) 3136 3137hard_links="nottested" 3138if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3139 # do not overwrite the value of need_locks provided by the user 3140 AC_MSG_CHECKING([if we can lock with hard links]) 3141 hard_links=yes 3142 $RM conftest* 3143 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3144 touch conftest.a 3145 ln conftest.a conftest.b 2>&5 || hard_links=no 3146 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3147 AC_MSG_RESULT([$hard_links]) 3148 if test "$hard_links" = no; then 3149 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3150 need_locks=warn 3151 fi 3152else 3153 need_locks=no 3154fi 3155_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 3156])# _LT_COMPILER_FILE_LOCKS 3157 3158 3159# _LT_CHECK_OBJDIR 3160# ---------------- 3161m4_defun([_LT_CHECK_OBJDIR], 3162[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3163[rm -f .libs 2>/dev/null 3164mkdir .libs 2>/dev/null 3165if test -d .libs; then 3166 lt_cv_objdir=.libs 3167else 3168 # MS-DOS does not allow filenames that begin with a dot. 3169 lt_cv_objdir=_libs 3170fi 3171rmdir .libs 2>/dev/null]) 3172objdir=$lt_cv_objdir 3173_LT_DECL([], [objdir], [0], 3174 [The name of the directory that contains temporary libtool files])dnl 3175m4_pattern_allow([LT_OBJDIR])dnl 3176AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 3177 [Define to the sub-directory in which libtool stores uninstalled libraries.]) 3178])# _LT_CHECK_OBJDIR 3179 3180 3181# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 3182# -------------------------------------- 3183# Check hardcoding attributes. 3184m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 3185[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3186_LT_TAGVAR(hardcode_action, $1)= 3187if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 3188 test -n "$_LT_TAGVAR(runpath_var, $1)" || 3189 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3190 3191 # We can hardcode non-existent directories. 3192 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 3193 # If the only mechanism to avoid hardcoding is shlibpath_var, we 3194 # have to relink, otherwise we might link with an installed library 3195 # when we should be linking with a yet-to-be-installed one 3196 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3197 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 3198 # Linking always hardcodes the temporary library directory. 3199 _LT_TAGVAR(hardcode_action, $1)=relink 3200 else 3201 # We can link without hardcoding, and we can hardcode nonexisting dirs. 3202 _LT_TAGVAR(hardcode_action, $1)=immediate 3203 fi 3204else 3205 # We cannot hardcode anything, or else we can only hardcode existing 3206 # directories. 3207 _LT_TAGVAR(hardcode_action, $1)=unsupported 3208fi 3209AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3210 3211if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 3212 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 3213 # Fast installation is not supported 3214 enable_fast_install=no 3215elif test "$shlibpath_overrides_runpath" = yes || 3216 test "$enable_shared" = no; then 3217 # Fast installation is not necessary 3218 enable_fast_install=needless 3219fi 3220_LT_TAGDECL([], [hardcode_action], [0], 3221 [How to hardcode a shared library path into an executable]) 3222])# _LT_LINKER_HARDCODE_LIBPATH 3223 3224 3225# _LT_CMD_STRIPLIB 3226# ---------------- 3227m4_defun([_LT_CMD_STRIPLIB], 3228[m4_require([_LT_DECL_EGREP]) 3229striplib= 3230old_striplib= 3231AC_MSG_CHECKING([whether stripping libraries is possible]) 3232if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 3233 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3234 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3235 AC_MSG_RESULT([yes]) 3236else 3237# FIXME - insert some real tests, host_os isn't really good enough 3238 case $host_os in 3239 darwin*) 3240 if test -n "$STRIP" ; then 3241 striplib="$STRIP -x" 3242 old_striplib="$STRIP -S" 3243 AC_MSG_RESULT([yes]) 3244 else 3245 AC_MSG_RESULT([no]) 3246 fi 3247 ;; 3248 *) 3249 AC_MSG_RESULT([no]) 3250 ;; 3251 esac 3252fi 3253_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 3254_LT_DECL([], [striplib], [1]) 3255])# _LT_CMD_STRIPLIB 3256 3257 3258# _LT_SYS_DYNAMIC_LINKER([TAG]) 3259# ----------------------------- 3260# PORTME Fill in your ld.so characteristics 3261m4_defun([_LT_SYS_DYNAMIC_LINKER], 3262[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3263m4_require([_LT_DECL_EGREP])dnl 3264m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3265m4_require([_LT_DECL_OBJDUMP])dnl 3266m4_require([_LT_DECL_SED])dnl 3267m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3268AC_MSG_CHECKING([dynamic linker characteristics]) 3269m4_if([$1], 3270 [], [ 3271if test "$GCC" = yes; then 3272 case $host_os in 3273 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 3274 *) lt_awk_arg="/^libraries:/" ;; 3275 esac 3276 case $host_os in 3277 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 3278 *) lt_sed_strip_eq="s,=/,/,g" ;; 3279 esac 3280 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 3281 case $lt_search_path_spec in 3282 *\;*) 3283 # if the path contains ";" then we assume it to be the separator 3284 # otherwise default to the standard path separator (i.e. ":") - it is 3285 # assumed that no part of a normal pathname contains ";" but that should 3286 # okay in the real world where ";" in dirpaths is itself problematic. 3287 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3288 ;; 3289 *) 3290 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 3291 ;; 3292 esac 3293 # Ok, now we have the path, separated by spaces, we can step through it 3294 # and add multilib dir if necessary. 3295 lt_tmp_lt_search_path_spec= 3296 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 3297 for lt_sys_path in $lt_search_path_spec; do 3298 if test -d "$lt_sys_path/$lt_multi_os_dir"; then 3299 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 3300 else 3301 test -d "$lt_sys_path" && \ 3302 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 3303 fi 3304 done 3305 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 3306BEGIN {RS=" "; FS="/|\n";} { 3307 lt_foo=""; 3308 lt_count=0; 3309 for (lt_i = NF; lt_i > 0; lt_i--) { 3310 if ($lt_i != "" && $lt_i != ".") { 3311 if ($lt_i == "..") { 3312 lt_count++; 3313 } else { 3314 if (lt_count == 0) { 3315 lt_foo="/" $lt_i lt_foo; 3316 } else { 3317 lt_count--; 3318 } 3319 } 3320 } 3321 } 3322 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 3323 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 3324}'` 3325 # AWK program above erroneously prepends '/' to C:/dos/paths 3326 # for these hosts. 3327 case $host_os in 3328 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 3329 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3330 esac 3331 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3332else 3333 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3334fi]) 3335library_names_spec= 3336libname_spec='lib$name' 3337soname_spec= 3338shrext_cmds=".so" 3339postinstall_cmds= 3340postuninstall_cmds= 3341finish_cmds= 3342finish_eval= 3343shlibpath_var= 3344shlibpath_overrides_runpath=unknown 3345version_type=none 3346dynamic_linker="$host_os ld.so" 3347sys_lib_dlsearch_path_spec="/lib /usr/lib" 3348need_lib_prefix=unknown 3349hardcode_into_libs=no 3350 3351# when you set need_version to no, make sure it does not cause -set_version 3352# flags to be left without arguments 3353need_version=unknown 3354 3355case $host_os in 3356aix3*) 3357 version_type=linux 3358 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3359 shlibpath_var=LIBPATH 3360 3361 # AIX 3 has no versioning support, so we append a major version to the name. 3362 soname_spec='${libname}${release}${shared_ext}$major' 3363 ;; 3364 3365aix[[4-9]]*) 3366 version_type=linux 3367 need_lib_prefix=no 3368 need_version=no 3369 hardcode_into_libs=yes 3370 if test "$host_cpu" = ia64; then 3371 # AIX 5 supports IA64 3372 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3373 shlibpath_var=LD_LIBRARY_PATH 3374 else 3375 # With GCC up to 2.95.x, collect2 would create an import file 3376 # for dependence libraries. The import file would start with 3377 # the line `#! .'. This would cause the generated library to 3378 # depend on `.', always an invalid library. This was fixed in 3379 # development snapshots of GCC prior to 3.0. 3380 case $host_os in 3381 aix4 | aix4.[[01]] | aix4.[[01]].*) 3382 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3383 echo ' yes ' 3384 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 3385 : 3386 else 3387 can_build_shared=no 3388 fi 3389 ;; 3390 esac 3391 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3392 # soname into executable. Probably we can add versioning support to 3393 # collect2, so additional links can be useful in future. 3394 if test "$aix_use_runtimelinking" = yes; then 3395 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3396 # instead of lib<name>.a to let people know that these are not 3397 # typical AIX shared libraries. 3398 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3399 else 3400 # We preserve .a as extension for shared libraries through AIX4.2 3401 # and later when we are not doing run time linking. 3402 library_names_spec='${libname}${release}.a $libname.a' 3403 soname_spec='${libname}${release}${shared_ext}$major' 3404 fi 3405 shlibpath_var=LIBPATH 3406 fi 3407 ;; 3408 3409amigaos*) 3410 case $host_cpu in 3411 powerpc) 3412 # Since July 2007 AmigaOS4 officially supports .so libraries. 3413 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 3414 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3415 ;; 3416 m68k) 3417 library_names_spec='$libname.ixlibrary $libname.a' 3418 # Create ${libname}_ixlibrary.a entries in /sys/libs. 3419 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' 3420 ;; 3421 esac 3422 ;; 3423 3424beos*) 3425 library_names_spec='${libname}${shared_ext}' 3426 dynamic_linker="$host_os ld.so" 3427 shlibpath_var=LIBRARY_PATH 3428 ;; 3429 3430bsdi[[45]]*) 3431 version_type=linux 3432 need_version=no 3433 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3434 soname_spec='${libname}${release}${shared_ext}$major' 3435 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3436 shlibpath_var=LD_LIBRARY_PATH 3437 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3438 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3439 # the default ld.so.conf also contains /usr/contrib/lib and 3440 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3441 # libtool to hard-code these into programs 3442 ;; 3443 3444cygwin* | mingw* | pw32* | cegcc*) 3445 version_type=windows 3446 shrext_cmds=".dll" 3447 need_version=no 3448 need_lib_prefix=no 3449 3450 case $GCC,$cc_basename in 3451 yes,*) 3452 # gcc 3453 library_names_spec='$libname.dll.a' 3454 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3455 postinstall_cmds='base_file=`basename \${file}`~ 3456 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3457 dldir=$destdir/`dirname \$dlpath`~ 3458 test -d \$dldir || mkdir -p \$dldir~ 3459 $install_prog $dir/$dlname \$dldir/$dlname~ 3460 chmod a+x \$dldir/$dlname~ 3461 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3462 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3463 fi' 3464 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3465 dlpath=$dir/\$dldll~ 3466 $RM \$dlpath' 3467 shlibpath_overrides_runpath=yes 3468 3469 case $host_os in 3470 cygwin*) 3471 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3472 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3473m4_if([$1], [],[ 3474 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 3475 ;; 3476 mingw* | cegcc*) 3477 # MinGW DLLs use traditional 'lib' prefix 3478 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3479 ;; 3480 pw32*) 3481 # pw32 DLLs use 'pw' prefix rather than 'lib' 3482 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3483 ;; 3484 esac 3485 dynamic_linker='Win32 ld.exe' 3486 ;; 3487 3488 *,cl*) 3489 # Native MSVC 3490 libname_spec='$name' 3491 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3492 library_names_spec='${libname}.dll.lib' 3493 3494 case $build_os in 3495 mingw*) 3496 sys_lib_search_path_spec= 3497 lt_save_ifs=$IFS 3498 IFS=';' 3499 for lt_path in $LIB 3500 do 3501 IFS=$lt_save_ifs 3502 # Let DOS variable expansion print the short 8.3 style file name. 3503 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 3504 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 3505 done 3506 IFS=$lt_save_ifs 3507 # Convert to MSYS style. 3508 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 3509 ;; 3510 cygwin*) 3511 # Convert to unix form, then to dos form, then back to unix form 3512 # but this time dos style (no spaces!) so that the unix form looks 3513 # like /cygdrive/c/PROGRA~1:/cygdr... 3514 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 3515 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 3516 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3517 ;; 3518 *) 3519 sys_lib_search_path_spec="$LIB" 3520 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 3521 # It is most probably a Windows format PATH. 3522 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3523 else 3524 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3525 fi 3526 # FIXME: find the short name or the path components, as spaces are 3527 # common. (e.g. "Program Files" -> "PROGRA~1") 3528 ;; 3529 esac 3530 3531 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3532 postinstall_cmds='base_file=`basename \${file}`~ 3533 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3534 dldir=$destdir/`dirname \$dlpath`~ 3535 test -d \$dldir || mkdir -p \$dldir~ 3536 $install_prog $dir/$dlname \$dldir/$dlname' 3537 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3538 dlpath=$dir/\$dldll~ 3539 $RM \$dlpath' 3540 shlibpath_overrides_runpath=yes 3541 dynamic_linker='Win32 link.exe' 3542 ;; 3543 3544 *) 3545 # Assume MSVC wrapper 3546 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3547 dynamic_linker='Win32 ld.exe' 3548 ;; 3549 esac 3550 # FIXME: first we should search . and the directory the executable is in 3551 shlibpath_var=PATH 3552 ;; 3553 3554darwin* | rhapsody*) 3555 dynamic_linker="$host_os dyld" 3556 version_type=darwin 3557 need_lib_prefix=no 3558 need_version=no 3559 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3560 soname_spec='${libname}${release}${major}$shared_ext' 3561 shlibpath_overrides_runpath=yes 3562 shlibpath_var=DYLD_LIBRARY_PATH 3563 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3564m4_if([$1], [],[ 3565 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 3566 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3567 ;; 3568 3569dgux*) 3570 version_type=linux 3571 need_lib_prefix=no 3572 need_version=no 3573 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3574 soname_spec='${libname}${release}${shared_ext}$major' 3575 shlibpath_var=LD_LIBRARY_PATH 3576 ;; 3577 3578freebsd1*) 3579 dynamic_linker=no 3580 ;; 3581 3582freebsd* | dragonfly*) 3583 # DragonFly does not have aout. When/if they implement a new 3584 # versioning mechanism, adjust this. 3585 if test -x /usr/bin/objformat; then 3586 objformat=`/usr/bin/objformat` 3587 else 3588 case $host_os in 3589 freebsd[[123]]*) objformat=aout ;; 3590 *) objformat=elf ;; 3591 esac 3592 fi 3593 version_type=freebsd-$objformat 3594 case $version_type in 3595 freebsd-elf*) 3596 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3597 need_version=no 3598 need_lib_prefix=no 3599 ;; 3600 freebsd-*) 3601 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3602 need_version=yes 3603 ;; 3604 esac 3605 shlibpath_var=LD_LIBRARY_PATH 3606 case $host_os in 3607 freebsd2*) 3608 shlibpath_overrides_runpath=yes 3609 ;; 3610 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3611 shlibpath_overrides_runpath=yes 3612 hardcode_into_libs=yes 3613 ;; 3614 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3615 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3616 shlibpath_overrides_runpath=no 3617 hardcode_into_libs=yes 3618 ;; 3619 *) # from 4.6 on, and DragonFly 3620 shlibpath_overrides_runpath=yes 3621 hardcode_into_libs=yes 3622 ;; 3623 esac 3624 ;; 3625 3626gnu*) 3627 version_type=linux 3628 need_lib_prefix=no 3629 need_version=no 3630 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3631 soname_spec='${libname}${release}${shared_ext}$major' 3632 shlibpath_var=LD_LIBRARY_PATH 3633 hardcode_into_libs=yes 3634 ;; 3635 3636haiku*) 3637 version_type=linux 3638 need_lib_prefix=no 3639 need_version=no 3640 dynamic_linker="$host_os runtime_loader" 3641 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3642 soname_spec='${libname}${release}${shared_ext}$major' 3643 shlibpath_var=LIBRARY_PATH 3644 shlibpath_overrides_runpath=yes 3645 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 3646 hardcode_into_libs=yes 3647 ;; 3648 3649hpux9* | hpux10* | hpux11*) 3650 # Give a soname corresponding to the major version so that dld.sl refuses to 3651 # link against other versions. 3652 version_type=sunos 3653 need_lib_prefix=no 3654 need_version=no 3655 case $host_cpu in 3656 ia64*) 3657 shrext_cmds='.so' 3658 hardcode_into_libs=yes 3659 dynamic_linker="$host_os dld.so" 3660 shlibpath_var=LD_LIBRARY_PATH 3661 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3663 soname_spec='${libname}${release}${shared_ext}$major' 3664 if test "X$HPUX_IA64_MODE" = X32; then 3665 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3666 else 3667 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3668 fi 3669 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3670 ;; 3671 hppa*64*) 3672 shrext_cmds='.sl' 3673 hardcode_into_libs=yes 3674 dynamic_linker="$host_os dld.sl" 3675 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3676 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3677 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3678 soname_spec='${libname}${release}${shared_ext}$major' 3679 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3680 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3681 ;; 3682 *) 3683 shrext_cmds='.sl' 3684 dynamic_linker="$host_os dld.sl" 3685 shlibpath_var=SHLIB_PATH 3686 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3687 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3688 soname_spec='${libname}${release}${shared_ext}$major' 3689 ;; 3690 esac 3691 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 3692 postinstall_cmds='chmod 555 $lib' 3693 # or fails outright, so override atomically: 3694 install_override_mode=555 3695 ;; 3696 3697interix[[3-9]]*) 3698 version_type=linux 3699 need_lib_prefix=no 3700 need_version=no 3701 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3702 soname_spec='${libname}${release}${shared_ext}$major' 3703 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3704 shlibpath_var=LD_LIBRARY_PATH 3705 shlibpath_overrides_runpath=no 3706 hardcode_into_libs=yes 3707 ;; 3708 3709irix5* | irix6* | nonstopux*) 3710 case $host_os in 3711 nonstopux*) version_type=nonstopux ;; 3712 *) 3713 if test "$lt_cv_prog_gnu_ld" = yes; then 3714 version_type=linux 3715 else 3716 version_type=irix 3717 fi ;; 3718 esac 3719 need_lib_prefix=no 3720 need_version=no 3721 soname_spec='${libname}${release}${shared_ext}$major' 3722 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3723 case $host_os in 3724 irix5* | nonstopux*) 3725 libsuff= shlibsuff= 3726 ;; 3727 *) 3728 case $LD in # libtool.m4 will add one of these switches to LD 3729 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3730 libsuff= shlibsuff= libmagic=32-bit;; 3731 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3732 libsuff=32 shlibsuff=N32 libmagic=N32;; 3733 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3734 libsuff=64 shlibsuff=64 libmagic=64-bit;; 3735 *) libsuff= shlibsuff= libmagic=never-match;; 3736 esac 3737 ;; 3738 esac 3739 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3740 shlibpath_overrides_runpath=no 3741 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3742 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3743 hardcode_into_libs=yes 3744 ;; 3745 3746# No shared lib support for Linux oldld, aout, or coff. 3747linux*oldld* | linux*aout* | linux*coff*) 3748 dynamic_linker=no 3749 ;; 3750 3751# This must be Linux ELF. 3752linux* | k*bsd*-gnu | kopensolaris*-gnu) 3753 version_type=linux 3754 need_lib_prefix=no 3755 need_version=no 3756 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3757 soname_spec='${libname}${release}${shared_ext}$major' 3758 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3759 shlibpath_var=LD_LIBRARY_PATH 3760 shlibpath_overrides_runpath=no 3761 3762 # Some binutils ld are patched to set DT_RUNPATH 3763 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 3764 [lt_cv_shlibpath_overrides_runpath=no 3765 save_LDFLAGS=$LDFLAGS 3766 save_libdir=$libdir 3767 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 3768 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 3769 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3770 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 3771 [lt_cv_shlibpath_overrides_runpath=yes])]) 3772 LDFLAGS=$save_LDFLAGS 3773 libdir=$save_libdir 3774 ]) 3775 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3776 3777 # This implies no fast_install, which is unacceptable. 3778 # Some rework will be needed to allow for fast_install 3779 # before this can be enabled. 3780 hardcode_into_libs=yes 3781 3782 # Append ld.so.conf contents to the search path 3783 if test -f /etc/ld.so.conf; then 3784 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' ' '` 3785 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3786 fi 3787 3788 # We used to test for /lib/ld.so.1 and disable shared libraries on 3789 # powerpc, because MkLinux only supported shared libraries with the 3790 # GNU dynamic linker. Since this was broken with cross compilers, 3791 # most powerpc-linux boxes support dynamic linking these days and 3792 # people can always --disable-shared, the test was removed, and we 3793 # assume the GNU/Linux dynamic linker is in use. 3794 dynamic_linker='GNU/Linux ld.so' 3795 ;; 3796 3797netbsd*) 3798 version_type=sunos 3799 need_lib_prefix=no 3800 need_version=no 3801 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3802 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3803 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3804 dynamic_linker='NetBSD (a.out) ld.so' 3805 else 3806 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3807 soname_spec='${libname}${release}${shared_ext}$major' 3808 dynamic_linker='NetBSD ld.elf_so' 3809 fi 3810 shlibpath_var=LD_LIBRARY_PATH 3811 shlibpath_overrides_runpath=yes 3812 hardcode_into_libs=yes 3813 ;; 3814 3815newsos6) 3816 version_type=linux 3817 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3818 shlibpath_var=LD_LIBRARY_PATH 3819 shlibpath_overrides_runpath=yes 3820 ;; 3821 3822*nto* | *qnx*) 3823 version_type=qnx 3824 need_lib_prefix=no 3825 need_version=no 3826 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3827 soname_spec='${libname}${release}${shared_ext}$major' 3828 shlibpath_var=LD_LIBRARY_PATH 3829 shlibpath_overrides_runpath=no 3830 hardcode_into_libs=yes 3831 dynamic_linker='ldqnx.so' 3832 ;; 3833 3834openbsd*) 3835 version_type=sunos 3836 sys_lib_dlsearch_path_spec="/usr/lib" 3837 need_lib_prefix=no 3838 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3839 case $host_os in 3840 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3841 *) need_version=no ;; 3842 esac 3843 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3844 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3845 shlibpath_var=LD_LIBRARY_PATH 3846 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3847 case $host_os in 3848 openbsd2.[[89]] | openbsd2.[[89]].*) 3849 shlibpath_overrides_runpath=no 3850 ;; 3851 *) 3852 shlibpath_overrides_runpath=yes 3853 ;; 3854 esac 3855 else 3856 shlibpath_overrides_runpath=yes 3857 fi 3858 ;; 3859 3860os2*) 3861 libname_spec='$name' 3862 shrext_cmds=".dll" 3863 need_lib_prefix=no 3864 library_names_spec='$libname${shared_ext} $libname.a' 3865 dynamic_linker='OS/2 ld.exe' 3866 shlibpath_var=LIBPATH 3867 ;; 3868 3869osf3* | osf4* | osf5*) 3870 version_type=osf 3871 need_lib_prefix=no 3872 need_version=no 3873 soname_spec='${libname}${release}${shared_ext}$major' 3874 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3875 shlibpath_var=LD_LIBRARY_PATH 3876 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3877 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3878 ;; 3879 3880rdos*) 3881 dynamic_linker=no 3882 ;; 3883 3884solaris*) 3885 version_type=linux 3886 need_lib_prefix=no 3887 need_version=no 3888 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3889 soname_spec='${libname}${release}${shared_ext}$major' 3890 shlibpath_var=LD_LIBRARY_PATH 3891 shlibpath_overrides_runpath=yes 3892 hardcode_into_libs=yes 3893 # ldd complains unless libraries are executable 3894 postinstall_cmds='chmod +x $lib' 3895 ;; 3896 3897sunos4*) 3898 version_type=sunos 3899 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3900 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3901 shlibpath_var=LD_LIBRARY_PATH 3902 shlibpath_overrides_runpath=yes 3903 if test "$with_gnu_ld" = yes; then 3904 need_lib_prefix=no 3905 fi 3906 need_version=yes 3907 ;; 3908 3909sysv4 | sysv4.3*) 3910 version_type=linux 3911 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3912 soname_spec='${libname}${release}${shared_ext}$major' 3913 shlibpath_var=LD_LIBRARY_PATH 3914 case $host_vendor in 3915 sni) 3916 shlibpath_overrides_runpath=no 3917 need_lib_prefix=no 3918 runpath_var=LD_RUN_PATH 3919 ;; 3920 siemens) 3921 need_lib_prefix=no 3922 ;; 3923 motorola) 3924 need_lib_prefix=no 3925 need_version=no 3926 shlibpath_overrides_runpath=no 3927 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3928 ;; 3929 esac 3930 ;; 3931 3932sysv4*MP*) 3933 if test -d /usr/nec ;then 3934 version_type=linux 3935 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3936 soname_spec='$libname${shared_ext}.$major' 3937 shlibpath_var=LD_LIBRARY_PATH 3938 fi 3939 ;; 3940 3941sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3942 version_type=freebsd-elf 3943 need_lib_prefix=no 3944 need_version=no 3945 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3946 soname_spec='${libname}${release}${shared_ext}$major' 3947 shlibpath_var=LD_LIBRARY_PATH 3948 shlibpath_overrides_runpath=yes 3949 hardcode_into_libs=yes 3950 if test "$with_gnu_ld" = yes; then 3951 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3952 else 3953 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3954 case $host_os in 3955 sco3.2v5*) 3956 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3957 ;; 3958 esac 3959 fi 3960 sys_lib_dlsearch_path_spec='/usr/lib' 3961 ;; 3962 3963tpf*) 3964 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3965 version_type=linux 3966 need_lib_prefix=no 3967 need_version=no 3968 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3969 shlibpath_var=LD_LIBRARY_PATH 3970 shlibpath_overrides_runpath=no 3971 hardcode_into_libs=yes 3972 ;; 3973 3974uts4*) 3975 version_type=linux 3976 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3977 soname_spec='${libname}${release}${shared_ext}$major' 3978 shlibpath_var=LD_LIBRARY_PATH 3979 ;; 3980 3981*) 3982 dynamic_linker=no 3983 ;; 3984esac 3985AC_MSG_RESULT([$dynamic_linker]) 3986test "$dynamic_linker" = no && can_build_shared=no 3987 3988variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3989if test "$GCC" = yes; then 3990 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3991fi 3992 3993if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 3994 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 3995fi 3996if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 3997 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 3998fi 3999 4000_LT_DECL([], [variables_saved_for_relink], [1], 4001 [Variables whose values should be saved in libtool wrapper scripts and 4002 restored at link time]) 4003_LT_DECL([], [need_lib_prefix], [0], 4004 [Do we need the "lib" prefix for modules?]) 4005_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 4006_LT_DECL([], [version_type], [0], [Library versioning type]) 4007_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 4008_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 4009_LT_DECL([], [shlibpath_overrides_runpath], [0], 4010 [Is shlibpath searched before the hard-coded library search path?]) 4011_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 4012_LT_DECL([], [library_names_spec], [1], 4013 [[List of archive names. First name is the real one, the rest are links. 4014 The last name is the one that the linker finds with -lNAME]]) 4015_LT_DECL([], [soname_spec], [1], 4016 [[The coded name of the library, if different from the real name]]) 4017_LT_DECL([], [install_override_mode], [1], 4018 [Permission mode override for installation of shared libraries]) 4019_LT_DECL([], [postinstall_cmds], [2], 4020 [Command to use after installation of a shared archive]) 4021_LT_DECL([], [postuninstall_cmds], [2], 4022 [Command to use after uninstallation of a shared archive]) 4023_LT_DECL([], [finish_cmds], [2], 4024 [Commands used to finish a libtool library installation in a directory]) 4025_LT_DECL([], [finish_eval], [1], 4026 [[As "finish_cmds", except a single script fragment to be evaled but 4027 not shown]]) 4028_LT_DECL([], [hardcode_into_libs], [0], 4029 [Whether we should hardcode library paths into libraries]) 4030_LT_DECL([], [sys_lib_search_path_spec], [2], 4031 [Compile-time system search path for libraries]) 4032_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 4033 [Run-time system search path for libraries]) 4034])# _LT_SYS_DYNAMIC_LINKER 4035 4036 4037# _LT_PATH_TOOL_PREFIX(TOOL) 4038# -------------------------- 4039# find a file program which can recognize shared library 4040AC_DEFUN([_LT_PATH_TOOL_PREFIX], 4041[m4_require([_LT_DECL_EGREP])dnl 4042AC_MSG_CHECKING([for $1]) 4043AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 4044[case $MAGIC_CMD in 4045[[\\/*] | ?:[\\/]*]) 4046 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4047 ;; 4048*) 4049 lt_save_MAGIC_CMD="$MAGIC_CMD" 4050 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4051dnl $ac_dummy forces splitting on constant user-supplied paths. 4052dnl POSIX.2 word splitting is done only on the output of word expansions, 4053dnl not every word. This closes a longstanding sh security hole. 4054 ac_dummy="m4_if([$2], , $PATH, [$2])" 4055 for ac_dir in $ac_dummy; do 4056 IFS="$lt_save_ifs" 4057 test -z "$ac_dir" && ac_dir=. 4058 if test -f $ac_dir/$1; then 4059 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4060 if test -n "$file_magic_test_file"; then 4061 case $deplibs_check_method in 4062 "file_magic "*) 4063 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 4064 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4065 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4066 $EGREP "$file_magic_regex" > /dev/null; then 4067 : 4068 else 4069 cat <<_LT_EOF 1>&2 4070 4071*** Warning: the command libtool uses to detect shared libraries, 4072*** $file_magic_cmd, produces output that libtool cannot recognize. 4073*** The result is that libtool may fail to recognize shared libraries 4074*** as such. This will affect the creation of libtool libraries that 4075*** depend on shared libraries, but programs linked with such libtool 4076*** libraries will work regardless of this problem. Nevertheless, you 4077*** may want to report the problem to your system manager and/or to 4078*** bug-libtool@gnu.org 4079 4080_LT_EOF 4081 fi ;; 4082 esac 4083 fi 4084 break 4085 fi 4086 done 4087 IFS="$lt_save_ifs" 4088 MAGIC_CMD="$lt_save_MAGIC_CMD" 4089 ;; 4090esac]) 4091MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4092if test -n "$MAGIC_CMD"; then 4093 AC_MSG_RESULT($MAGIC_CMD) 4094else 4095 AC_MSG_RESULT(no) 4096fi 4097_LT_DECL([], [MAGIC_CMD], [0], 4098 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4099])# _LT_PATH_TOOL_PREFIX 4100 4101# Old name: 4102AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4103dnl aclocal-1.4 backwards compatibility: 4104dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4105 4106 4107# _LT_PATH_MAGIC 4108# -------------- 4109# find a file program which can recognize a shared library 4110m4_defun([_LT_PATH_MAGIC], 4111[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4112if test -z "$lt_cv_path_MAGIC_CMD"; then 4113 if test -n "$ac_tool_prefix"; then 4114 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4115 else 4116 MAGIC_CMD=: 4117 fi 4118fi 4119])# _LT_PATH_MAGIC 4120 4121 4122# LT_PATH_LD 4123# ---------- 4124# find the pathname to the GNU or non-GNU linker 4125AC_DEFUN([LT_PATH_LD], 4126[AC_REQUIRE([AC_PROG_CC])dnl 4127AC_REQUIRE([AC_CANONICAL_HOST])dnl 4128AC_REQUIRE([AC_CANONICAL_BUILD])dnl 4129m4_require([_LT_DECL_SED])dnl 4130m4_require([_LT_DECL_EGREP])dnl 4131m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4132 4133AC_ARG_WITH([gnu-ld], 4134 [AS_HELP_STRING([--with-gnu-ld], 4135 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4136 [test "$withval" = no || with_gnu_ld=yes], 4137 [with_gnu_ld=no])dnl 4138 4139ac_prog=ld 4140if test "$GCC" = yes; then 4141 # Check if gcc -print-prog-name=ld gives a path. 4142 AC_MSG_CHECKING([for ld used by $CC]) 4143 case $host in 4144 *-*-mingw*) 4145 # gcc leaves a trailing carriage return which upsets mingw 4146 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4147 *) 4148 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4149 esac 4150 case $ac_prog in 4151 # Accept absolute paths. 4152 [[\\/]]* | ?:[[\\/]]*) 4153 re_direlt='/[[^/]][[^/]]*/\.\./' 4154 # Canonicalize the pathname of ld 4155 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4156 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4157 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 4158 done 4159 test -z "$LD" && LD="$ac_prog" 4160 ;; 4161 "") 4162 # If it fails, then pretend we aren't using GCC. 4163 ac_prog=ld 4164 ;; 4165 *) 4166 # If it is relative, then search for the first ld in PATH. 4167 with_gnu_ld=unknown 4168 ;; 4169 esac 4170elif test "$with_gnu_ld" = yes; then 4171 AC_MSG_CHECKING([for GNU ld]) 4172else 4173 AC_MSG_CHECKING([for non-GNU ld]) 4174fi 4175AC_CACHE_VAL(lt_cv_path_LD, 4176[if test -z "$LD"; then 4177 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4178 for ac_dir in $PATH; do 4179 IFS="$lt_save_ifs" 4180 test -z "$ac_dir" && ac_dir=. 4181 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4182 lt_cv_path_LD="$ac_dir/$ac_prog" 4183 # Check to see if the program is GNU ld. I'd rather use --version, 4184 # but apparently some variants of GNU ld only accept -v. 4185 # Break only if it was the GNU/non-GNU ld that we prefer. 4186 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4187 *GNU* | *'with BFD'*) 4188 test "$with_gnu_ld" != no && break 4189 ;; 4190 *) 4191 test "$with_gnu_ld" != yes && break 4192 ;; 4193 esac 4194 fi 4195 done 4196 IFS="$lt_save_ifs" 4197else 4198 lt_cv_path_LD="$LD" # Let the user override the test with a path. 4199fi]) 4200LD="$lt_cv_path_LD" 4201if test -n "$LD"; then 4202 AC_MSG_RESULT($LD) 4203else 4204 AC_MSG_RESULT(no) 4205fi 4206test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4207_LT_PATH_LD_GNU 4208AC_SUBST([LD]) 4209 4210_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4211])# LT_PATH_LD 4212 4213# Old names: 4214AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4215AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4216dnl aclocal-1.4 backwards compatibility: 4217dnl AC_DEFUN([AM_PROG_LD], []) 4218dnl AC_DEFUN([AC_PROG_LD], []) 4219 4220 4221# _LT_PATH_LD_GNU 4222#- -------------- 4223m4_defun([_LT_PATH_LD_GNU], 4224[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4225[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4226case `$LD -v 2>&1 </dev/null` in 4227*GNU* | *'with BFD'*) 4228 lt_cv_prog_gnu_ld=yes 4229 ;; 4230*) 4231 lt_cv_prog_gnu_ld=no 4232 ;; 4233esac]) 4234with_gnu_ld=$lt_cv_prog_gnu_ld 4235])# _LT_PATH_LD_GNU 4236 4237 4238# _LT_CMD_RELOAD 4239# -------------- 4240# find reload flag for linker 4241# -- PORTME Some linkers may need a different reload flag. 4242m4_defun([_LT_CMD_RELOAD], 4243[AC_CACHE_CHECK([for $LD option to reload object files], 4244 lt_cv_ld_reload_flag, 4245 [lt_cv_ld_reload_flag='-r']) 4246reload_flag=$lt_cv_ld_reload_flag 4247case $reload_flag in 4248"" | " "*) ;; 4249*) reload_flag=" $reload_flag" ;; 4250esac 4251reload_cmds='$LD$reload_flag -o $output$reload_objs' 4252case $host_os in 4253 cygwin* | mingw* | pw32* | cegcc*) 4254 if test "$GCC" != yes; then 4255 reload_cmds=false 4256 fi 4257 ;; 4258 darwin*) 4259 if test "$GCC" = yes; then 4260 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4261 else 4262 reload_cmds='$LD$reload_flag -o $output$reload_objs' 4263 fi 4264 ;; 4265esac 4266_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 4267_LT_TAGDECL([], [reload_cmds], [2])dnl 4268])# _LT_CMD_RELOAD 4269 4270 4271# _LT_CHECK_MAGIC_METHOD 4272# ---------------------- 4273# how to check for library dependencies 4274# -- PORTME fill in with the dynamic library characteristics 4275m4_defun([_LT_CHECK_MAGIC_METHOD], 4276[m4_require([_LT_DECL_EGREP]) 4277m4_require([_LT_DECL_OBJDUMP]) 4278AC_CACHE_CHECK([how to recognize dependent libraries], 4279lt_cv_deplibs_check_method, 4280[lt_cv_file_magic_cmd='$MAGIC_CMD' 4281lt_cv_file_magic_test_file= 4282lt_cv_deplibs_check_method='unknown' 4283# Need to set the preceding variable on all platforms that support 4284# interlibrary dependencies. 4285# 'none' -- dependencies not supported. 4286# `unknown' -- same as none, but documents that we really don't know. 4287# 'pass_all' -- all dependencies passed with no checks. 4288# 'test_compile' -- check by making test program. 4289# 'file_magic [[regex]]' -- check by looking for files in library path 4290# which responds to the $file_magic_cmd with a given extended regex. 4291# If you have `file' or equivalent on your system and you're not sure 4292# whether `pass_all' will *always* work, you probably want this one. 4293 4294case $host_os in 4295aix[[4-9]]*) 4296 lt_cv_deplibs_check_method=pass_all 4297 ;; 4298 4299beos*) 4300 lt_cv_deplibs_check_method=pass_all 4301 ;; 4302 4303bsdi[[45]]*) 4304 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4305 lt_cv_file_magic_cmd='/usr/bin/file -L' 4306 lt_cv_file_magic_test_file=/shlib/libc.so 4307 ;; 4308 4309cygwin*) 4310 # func_win32_libid is a shell function defined in ltmain.sh 4311 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4312 lt_cv_file_magic_cmd='func_win32_libid' 4313 ;; 4314 4315mingw* | pw32*) 4316 # Base MSYS/MinGW do not provide the 'file' command needed by 4317 # func_win32_libid shell function, so use a weaker test based on 'objdump', 4318 # unless we find 'file', for example because we are cross-compiling. 4319 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 4320 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 4321 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4322 lt_cv_file_magic_cmd='func_win32_libid' 4323 else 4324 # Keep this pattern in sync with the one in func_win32_libid. 4325 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 4326 lt_cv_file_magic_cmd='$OBJDUMP -f' 4327 fi 4328 ;; 4329 4330cegcc*) 4331 # use the weaker test based on 'objdump'. See mingw*. 4332 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4333 lt_cv_file_magic_cmd='$OBJDUMP -f' 4334 ;; 4335 4336darwin* | rhapsody*) 4337 lt_cv_deplibs_check_method=pass_all 4338 ;; 4339 4340freebsd* | dragonfly*) 4341 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4342 case $host_cpu in 4343 i*86 ) 4344 # Not sure whether the presence of OpenBSD here was a mistake. 4345 # Let's accept both of them until this is cleared up. 4346 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4347 lt_cv_file_magic_cmd=/usr/bin/file 4348 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4349 ;; 4350 esac 4351 else 4352 lt_cv_deplibs_check_method=pass_all 4353 fi 4354 ;; 4355 4356gnu*) 4357 lt_cv_deplibs_check_method=pass_all 4358 ;; 4359 4360haiku*) 4361 lt_cv_deplibs_check_method=pass_all 4362 ;; 4363 4364hpux10.20* | hpux11*) 4365 lt_cv_file_magic_cmd=/usr/bin/file 4366 case $host_cpu in 4367 ia64*) 4368 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4369 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4370 ;; 4371 hppa*64*) 4372 [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]'] 4373 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4374 ;; 4375 *) 4376 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 4377 lt_cv_file_magic_test_file=/usr/lib/libc.sl 4378 ;; 4379 esac 4380 ;; 4381 4382interix[[3-9]]*) 4383 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4384 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4385 ;; 4386 4387irix5* | irix6* | nonstopux*) 4388 case $LD in 4389 *-32|*"-32 ") libmagic=32-bit;; 4390 *-n32|*"-n32 ") libmagic=N32;; 4391 *-64|*"-64 ") libmagic=64-bit;; 4392 *) libmagic=never-match;; 4393 esac 4394 lt_cv_deplibs_check_method=pass_all 4395 ;; 4396 4397# This must be Linux ELF. 4398linux* | k*bsd*-gnu | kopensolaris*-gnu) 4399 lt_cv_deplibs_check_method=pass_all 4400 ;; 4401 4402netbsd*) 4403 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4404 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4405 else 4406 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4407 fi 4408 ;; 4409 4410newos6*) 4411 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4412 lt_cv_file_magic_cmd=/usr/bin/file 4413 lt_cv_file_magic_test_file=/usr/lib/libnls.so 4414 ;; 4415 4416*nto* | *qnx*) 4417 lt_cv_deplibs_check_method=pass_all 4418 ;; 4419 4420openbsd*) 4421 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4422 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4423 else 4424 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4425 fi 4426 ;; 4427 4428osf3* | osf4* | osf5*) 4429 lt_cv_deplibs_check_method=pass_all 4430 ;; 4431 4432rdos*) 4433 lt_cv_deplibs_check_method=pass_all 4434 ;; 4435 4436solaris*) 4437 lt_cv_deplibs_check_method=pass_all 4438 ;; 4439 4440sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4441 lt_cv_deplibs_check_method=pass_all 4442 ;; 4443 4444sysv4 | sysv4.3*) 4445 case $host_vendor in 4446 motorola) 4447 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]]' 4448 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4449 ;; 4450 ncr) 4451 lt_cv_deplibs_check_method=pass_all 4452 ;; 4453 sequent) 4454 lt_cv_file_magic_cmd='/bin/file' 4455 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4456 ;; 4457 sni) 4458 lt_cv_file_magic_cmd='/bin/file' 4459 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4460 lt_cv_file_magic_test_file=/lib/libc.so 4461 ;; 4462 siemens) 4463 lt_cv_deplibs_check_method=pass_all 4464 ;; 4465 pc) 4466 lt_cv_deplibs_check_method=pass_all 4467 ;; 4468 esac 4469 ;; 4470 4471tpf*) 4472 lt_cv_deplibs_check_method=pass_all 4473 ;; 4474esac 4475]) 4476 4477file_magic_glob= 4478want_nocaseglob=no 4479if test "$build" = "$host"; then 4480 case $host_os in 4481 mingw* | pw32*) 4482 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4483 want_nocaseglob=yes 4484 else 4485 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4486 fi 4487 ;; 4488 esac 4489fi 4490 4491file_magic_cmd=$lt_cv_file_magic_cmd 4492deplibs_check_method=$lt_cv_deplibs_check_method 4493test -z "$deplibs_check_method" && deplibs_check_method=unknown 4494 4495_LT_DECL([], [deplibs_check_method], [1], 4496 [Method to check whether dependent libraries are shared objects]) 4497_LT_DECL([], [file_magic_cmd], [1], 4498 [Command to use when deplibs_check_method = "file_magic"]) 4499_LT_DECL([], [file_magic_glob], [1], 4500 [How to find potential files when deplibs_check_method = "file_magic"]) 4501_LT_DECL([], [want_nocaseglob], [1], 4502 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4503])# _LT_CHECK_MAGIC_METHOD 4504 4505 4506# LT_PATH_NM 4507# ---------- 4508# find the pathname to a BSD- or MS-compatible name lister 4509AC_DEFUN([LT_PATH_NM], 4510[AC_REQUIRE([AC_PROG_CC])dnl 4511AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4512[if test -n "$NM"; then 4513 # Let the user override the test. 4514 lt_cv_path_NM="$NM" 4515else 4516 lt_nm_to_check="${ac_tool_prefix}nm" 4517 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4518 lt_nm_to_check="$lt_nm_to_check nm" 4519 fi 4520 for lt_tmp_nm in $lt_nm_to_check; do 4521 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4522 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4523 IFS="$lt_save_ifs" 4524 test -z "$ac_dir" && ac_dir=. 4525 tmp_nm="$ac_dir/$lt_tmp_nm" 4526 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4527 # Check to see if the nm accepts a BSD-compat flag. 4528 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4529 # nm: unknown option "B" ignored 4530 # Tru64's nm complains that /dev/null is an invalid object file 4531 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4532 */dev/null* | *'Invalid file or object type'*) 4533 lt_cv_path_NM="$tmp_nm -B" 4534 break 4535 ;; 4536 *) 4537 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4538 */dev/null*) 4539 lt_cv_path_NM="$tmp_nm -p" 4540 break 4541 ;; 4542 *) 4543 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4544 continue # so that we can try to find one that supports BSD flags 4545 ;; 4546 esac 4547 ;; 4548 esac 4549 fi 4550 done 4551 IFS="$lt_save_ifs" 4552 done 4553 : ${lt_cv_path_NM=no} 4554fi]) 4555if test "$lt_cv_path_NM" != "no"; then 4556 NM="$lt_cv_path_NM" 4557else 4558 # Didn't find any BSD compatible name lister, look for dumpbin. 4559 if test -n "$DUMPBIN"; then : 4560 # Let the user override the test. 4561 else 4562 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 4563 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 4564 *COFF*) 4565 DUMPBIN="$DUMPBIN -symbols" 4566 ;; 4567 *) 4568 DUMPBIN=: 4569 ;; 4570 esac 4571 fi 4572 AC_SUBST([DUMPBIN]) 4573 if test "$DUMPBIN" != ":"; then 4574 NM="$DUMPBIN" 4575 fi 4576fi 4577test -z "$NM" && NM=nm 4578AC_SUBST([NM]) 4579_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4580 4581AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4582 [lt_cv_nm_interface="BSD nm" 4583 echo "int some_variable = 0;" > conftest.$ac_ext 4584 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4585 (eval "$ac_compile" 2>conftest.err) 4586 cat conftest.err >&AS_MESSAGE_LOG_FD 4587 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4588 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4589 cat conftest.err >&AS_MESSAGE_LOG_FD 4590 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4591 cat conftest.out >&AS_MESSAGE_LOG_FD 4592 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4593 lt_cv_nm_interface="MS dumpbin" 4594 fi 4595 rm -f conftest*]) 4596])# LT_PATH_NM 4597 4598# Old names: 4599AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4600AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4601dnl aclocal-1.4 backwards compatibility: 4602dnl AC_DEFUN([AM_PROG_NM], []) 4603dnl AC_DEFUN([AC_PROG_NM], []) 4604 4605# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4606# -------------------------------- 4607# how to determine the name of the shared library 4608# associated with a specific link library. 4609# -- PORTME fill in with the dynamic library characteristics 4610m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4611[m4_require([_LT_DECL_EGREP]) 4612m4_require([_LT_DECL_OBJDUMP]) 4613m4_require([_LT_DECL_DLLTOOL]) 4614AC_CACHE_CHECK([how to associate runtime and link libraries], 4615lt_cv_sharedlib_from_linklib_cmd, 4616[lt_cv_sharedlib_from_linklib_cmd='unknown' 4617 4618case $host_os in 4619cygwin* | mingw* | pw32* | cegcc*) 4620 # two different shell functions defined in ltmain.sh 4621 # decide which to use based on capabilities of $DLLTOOL 4622 case `$DLLTOOL --help 2>&1` in 4623 *--identify-strict*) 4624 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4625 ;; 4626 *) 4627 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4628 ;; 4629 esac 4630 ;; 4631*) 4632 # fallback: assume linklib IS sharedlib 4633 lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4634 ;; 4635esac 4636]) 4637sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4638test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4639 4640_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4641 [Command to associate shared and link libraries]) 4642])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4643 4644 4645# _LT_PATH_MANIFEST_TOOL 4646# ---------------------- 4647# locate the manifest tool 4648m4_defun([_LT_PATH_MANIFEST_TOOL], 4649[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4650test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4651AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4652 [lt_cv_path_mainfest_tool=no 4653 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4654 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4655 cat conftest.err >&AS_MESSAGE_LOG_FD 4656 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4657 lt_cv_path_mainfest_tool=yes 4658 fi 4659 rm -f conftest*]) 4660if test "x$lt_cv_path_mainfest_tool" != xyes; then 4661 MANIFEST_TOOL=: 4662fi 4663_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4664])# _LT_PATH_MANIFEST_TOOL 4665 4666 4667# LT_LIB_M 4668# -------- 4669# check for math library 4670AC_DEFUN([LT_LIB_M], 4671[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4672LIBM= 4673case $host in 4674*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4675 # These system don't have libm, or don't need it 4676 ;; 4677*-ncr-sysv4.3*) 4678 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4679 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4680 ;; 4681*) 4682 AC_CHECK_LIB(m, cos, LIBM="-lm") 4683 ;; 4684esac 4685AC_SUBST([LIBM]) 4686])# LT_LIB_M 4687 4688# Old name: 4689AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4690dnl aclocal-1.4 backwards compatibility: 4691dnl AC_DEFUN([AC_CHECK_LIBM], []) 4692 4693 4694# _LT_COMPILER_NO_RTTI([TAGNAME]) 4695# ------------------------------- 4696m4_defun([_LT_COMPILER_NO_RTTI], 4697[m4_require([_LT_TAG_COMPILER])dnl 4698 4699_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4700 4701if test "$GCC" = yes; then 4702 case $cc_basename in 4703 nvcc*) 4704 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4705 *) 4706 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4707 esac 4708 4709 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4710 lt_cv_prog_compiler_rtti_exceptions, 4711 [-fno-rtti -fno-exceptions], [], 4712 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4713fi 4714_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4715 [Compiler flag to turn off builtin functions]) 4716])# _LT_COMPILER_NO_RTTI 4717 4718 4719# _LT_CMD_GLOBAL_SYMBOLS 4720# ---------------------- 4721m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4722[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4723AC_REQUIRE([AC_PROG_CC])dnl 4724AC_REQUIRE([AC_PROG_AWK])dnl 4725AC_REQUIRE([LT_PATH_NM])dnl 4726AC_REQUIRE([LT_PATH_LD])dnl 4727m4_require([_LT_DECL_SED])dnl 4728m4_require([_LT_DECL_EGREP])dnl 4729m4_require([_LT_TAG_COMPILER])dnl 4730 4731# Check for command to grab the raw symbol name followed by C symbol from nm. 4732AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4733AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4734[ 4735# These are sane defaults that work on at least a few old systems. 4736# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4737 4738# Character class describing NM global symbol codes. 4739symcode='[[BCDEGRST]]' 4740 4741# Regexp to match symbols that can be accessed directly from C. 4742sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4743 4744# Define system-specific variables. 4745case $host_os in 4746aix*) 4747 symcode='[[BCDT]]' 4748 ;; 4749cygwin* | mingw* | pw32* | cegcc*) 4750 symcode='[[ABCDGISTW]]' 4751 ;; 4752hpux*) 4753 if test "$host_cpu" = ia64; then 4754 symcode='[[ABCDEGRST]]' 4755 fi 4756 ;; 4757irix* | nonstopux*) 4758 symcode='[[BCDEGRST]]' 4759 ;; 4760osf*) 4761 symcode='[[BCDEGQRST]]' 4762 ;; 4763solaris*) 4764 symcode='[[BDRT]]' 4765 ;; 4766sco3.2v5*) 4767 symcode='[[DT]]' 4768 ;; 4769sysv4.2uw2*) 4770 symcode='[[DT]]' 4771 ;; 4772sysv5* | sco5v6* | unixware* | OpenUNIX*) 4773 symcode='[[ABDT]]' 4774 ;; 4775sysv4) 4776 symcode='[[DFNSTU]]' 4777 ;; 4778esac 4779 4780# If we're using GNU nm, then use its standard symbol codes. 4781case `$NM -V 2>&1` in 4782*GNU* | *'with BFD'*) 4783 symcode='[[ABCDGIRSTW]]' ;; 4784esac 4785 4786# Transform an extracted symbol line into a proper C declaration. 4787# Some systems (esp. on ia64) link data and code symbols differently, 4788# so use this general approach. 4789lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4790 4791# Transform an extracted symbol line into symbol name and symbol address 4792lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 4793lt_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'" 4794 4795# Handle CRLF in mingw tool chain 4796opt_cr= 4797case $build_os in 4798mingw*) 4799 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4800 ;; 4801esac 4802 4803# Try without a prefix underscore, then with it. 4804for ac_symprfx in "" "_"; do 4805 4806 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4807 symxfrm="\\1 $ac_symprfx\\2 \\2" 4808 4809 # Write the raw and C identifiers. 4810 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4811 # Fake it for dumpbin and say T for any non-static function 4812 # and D for any global variable. 4813 # Also find C++ and __fastcall symbols from MSVC++, 4814 # which start with @ or ?. 4815 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4816" {last_section=section; section=\$ 3};"\ 4817" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4818" \$ 0!~/External *\|/{next};"\ 4819" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4820" {if(hide[section]) next};"\ 4821" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 4822" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 4823" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 4824" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 4825" ' prfx=^$ac_symprfx]" 4826 else 4827 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4828 fi 4829 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4830 4831 # Check to see that the pipe works correctly. 4832 pipe_works=no 4833 4834 rm -f conftest* 4835 cat > conftest.$ac_ext <<_LT_EOF 4836#ifdef __cplusplus 4837extern "C" { 4838#endif 4839char nm_test_var; 4840void nm_test_func(void); 4841void nm_test_func(void){} 4842#ifdef __cplusplus 4843} 4844#endif 4845int main(){nm_test_var='a';nm_test_func();return(0);} 4846_LT_EOF 4847 4848 if AC_TRY_EVAL(ac_compile); then 4849 # Now try to grab the symbols. 4850 nlist=conftest.nm 4851 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4852 # Try sorting and uniquifying the output. 4853 if sort "$nlist" | uniq > "$nlist"T; then 4854 mv -f "$nlist"T "$nlist" 4855 else 4856 rm -f "$nlist"T 4857 fi 4858 4859 # Make sure that we snagged all the symbols we need. 4860 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4861 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4862 cat <<_LT_EOF > conftest.$ac_ext 4863/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4864#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 4865/* DATA imports from DLLs on WIN32 con't be const, because runtime 4866 relocations are performed -- see ld's documentation on pseudo-relocs. */ 4867# define LT@&t@_DLSYM_CONST 4868#elif defined(__osf__) 4869/* This system does not cope well with relocations in const data. */ 4870# define LT@&t@_DLSYM_CONST 4871#else 4872# define LT@&t@_DLSYM_CONST const 4873#endif 4874 4875#ifdef __cplusplus 4876extern "C" { 4877#endif 4878 4879_LT_EOF 4880 # Now generate the symbol file. 4881 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4882 4883 cat <<_LT_EOF >> conftest.$ac_ext 4884 4885/* The mapping between symbol names and symbols. */ 4886LT@&t@_DLSYM_CONST struct { 4887 const char *name; 4888 void *address; 4889} 4890lt__PROGRAM__LTX_preloaded_symbols[[]] = 4891{ 4892 { "@PROGRAM@", (void *) 0 }, 4893_LT_EOF 4894 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4895 cat <<\_LT_EOF >> conftest.$ac_ext 4896 {0, (void *) 0} 4897}; 4898 4899/* This works around a problem in FreeBSD linker */ 4900#ifdef FREEBSD_WORKAROUND 4901static const void *lt_preloaded_setup() { 4902 return lt__PROGRAM__LTX_preloaded_symbols; 4903} 4904#endif 4905 4906#ifdef __cplusplus 4907} 4908#endif 4909_LT_EOF 4910 # Now try linking the two files. 4911 mv conftest.$ac_objext conftstm.$ac_objext 4912 lt_globsym_save_LIBS=$LIBS 4913 lt_globsym_save_CFLAGS=$CFLAGS 4914 LIBS="conftstm.$ac_objext" 4915 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4916 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4917 pipe_works=yes 4918 fi 4919 LIBS=$lt_globsym_save_LIBS 4920 CFLAGS=$lt_globsym_save_CFLAGS 4921 else 4922 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4923 fi 4924 else 4925 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4926 fi 4927 else 4928 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4929 fi 4930 else 4931 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4932 cat conftest.$ac_ext >&5 4933 fi 4934 rm -rf conftest* conftst* 4935 4936 # Do not use the global_symbol_pipe unless it works. 4937 if test "$pipe_works" = yes; then 4938 break 4939 else 4940 lt_cv_sys_global_symbol_pipe= 4941 fi 4942done 4943]) 4944if test -z "$lt_cv_sys_global_symbol_pipe"; then 4945 lt_cv_sys_global_symbol_to_cdecl= 4946fi 4947if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4948 AC_MSG_RESULT(failed) 4949else 4950 AC_MSG_RESULT(ok) 4951fi 4952 4953# Response file support. 4954if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4955 nm_file_list_spec='@' 4956elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4957 nm_file_list_spec='@' 4958fi 4959 4960_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4961 [Take the output of nm and produce a listing of raw symbols and C names]) 4962_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4963 [Transform the output of nm in a proper C declaration]) 4964_LT_DECL([global_symbol_to_c_name_address], 4965 [lt_cv_sys_global_symbol_to_c_name_address], [1], 4966 [Transform the output of nm in a C name address pair]) 4967_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4968 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4969 [Transform the output of nm in a C name address pair when lib prefix is needed]) 4970_LT_DECL([], [nm_file_list_spec], [1], 4971 [Specify filename containing input files for $NM]) 4972]) # _LT_CMD_GLOBAL_SYMBOLS 4973 4974 4975# _LT_COMPILER_PIC([TAGNAME]) 4976# --------------------------- 4977m4_defun([_LT_COMPILER_PIC], 4978[m4_require([_LT_TAG_COMPILER])dnl 4979_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4980_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4981_LT_TAGVAR(lt_prog_compiler_static, $1)= 4982 4983m4_if([$1], [CXX], [ 4984 # C++ specific cases for pic, static, wl, etc. 4985 if test "$GXX" = yes; then 4986 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4987 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4988 4989 case $host_os in 4990 aix*) 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 fi 4996 ;; 4997 4998 amigaos*) 4999 case $host_cpu in 5000 powerpc) 5001 # see comment about AmigaOS4 .so support 5002 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5003 ;; 5004 m68k) 5005 # FIXME: we need at least 68020 code to build shared libraries, but 5006 # adding the `-m68020' flag to GCC prevents building anything better, 5007 # like `-m68040'. 5008 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5009 ;; 5010 esac 5011 ;; 5012 5013 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5014 # PIC is the default for these OSes. 5015 ;; 5016 mingw* | cygwin* | os2* | pw32* | cegcc*) 5017 # This hack is so that the source file can tell whether it is being 5018 # built for inclusion in a dll (and should export symbols for example). 5019 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5020 # (--disable-auto-import) libraries 5021 m4_if([$1], [GCJ], [], 5022 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5023 ;; 5024 darwin* | rhapsody*) 5025 # PIC is the default on this platform 5026 # Common symbols not allowed in MH_DYLIB files 5027 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5028 ;; 5029 *djgpp*) 5030 # DJGPP does not support shared libraries at all 5031 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5032 ;; 5033 haiku*) 5034 # PIC is the default for Haiku. 5035 # The "-static" flag exists, but is broken. 5036 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5037 ;; 5038 interix[[3-9]]*) 5039 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5040 # Instead, we relocate shared libraries at runtime. 5041 ;; 5042 sysv4*MP*) 5043 if test -d /usr/nec; then 5044 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5045 fi 5046 ;; 5047 hpux*) 5048 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5049 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5050 # sets the default TLS model and affects inlining. 5051 case $host_cpu in 5052 hppa*64*) 5053 ;; 5054 *) 5055 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5056 ;; 5057 esac 5058 ;; 5059 *qnx* | *nto*) 5060 # QNX uses GNU C++, but need to define -shared option too, otherwise 5061 # it will coredump. 5062 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5063 ;; 5064 *) 5065 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5066 ;; 5067 esac 5068 else 5069 case $host_os in 5070 aix[[4-9]]*) 5071 # All AIX code is PIC. 5072 if test "$host_cpu" = ia64; then 5073 # AIX 5 now supports IA64 processor 5074 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5075 else 5076 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5077 fi 5078 ;; 5079 chorus*) 5080 case $cc_basename in 5081 cxch68*) 5082 # Green Hills C++ Compiler 5083 # _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" 5084 ;; 5085 esac 5086 ;; 5087 mingw* | cygwin* | os2* | pw32* | cegcc*) 5088 # This hack is so that the source file can tell whether it is being 5089 # built for inclusion in a dll (and should export symbols for example). 5090 m4_if([$1], [GCJ], [], 5091 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5092 ;; 5093 dgux*) 5094 case $cc_basename in 5095 ec++*) 5096 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5097 ;; 5098 ghcx*) 5099 # Green Hills C++ Compiler 5100 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5101 ;; 5102 *) 5103 ;; 5104 esac 5105 ;; 5106 freebsd* | dragonfly*) 5107 # FreeBSD uses GNU C++ 5108 ;; 5109 hpux9* | hpux10* | hpux11*) 5110 case $cc_basename in 5111 CC*) 5112 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5113 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5114 if test "$host_cpu" != ia64; then 5115 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5116 fi 5117 ;; 5118 aCC*) 5119 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5120 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5121 case $host_cpu in 5122 hppa*64*|ia64*) 5123 # +Z the default 5124 ;; 5125 *) 5126 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5127 ;; 5128 esac 5129 ;; 5130 *) 5131 ;; 5132 esac 5133 ;; 5134 interix*) 5135 # This is c89, which is MS Visual C++ (no shared libs) 5136 # Anyone wants to do a port? 5137 ;; 5138 irix5* | irix6* | nonstopux*) 5139 case $cc_basename in 5140 CC*) 5141 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5142 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5143 # CC pic flag -KPIC is the default. 5144 ;; 5145 *) 5146 ;; 5147 esac 5148 ;; 5149 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5150 case $cc_basename in 5151 KCC*) 5152 # KAI C++ Compiler 5153 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5154 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5155 ;; 5156 ecpc* ) 5157 # old Intel C++ for x86_64 which still supported -KPIC. 5158 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5159 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5160 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5161 ;; 5162 icpc* ) 5163 # Intel C++, used to be incompatible with GCC. 5164 # ICC 10 doesn't accept -KPIC any more. 5165 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5166 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5167 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5168 ;; 5169 pgCC* | pgcpp*) 5170 # Portland Group C++ compiler 5171 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5172 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5173 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5174 ;; 5175 cxx*) 5176 # Compaq C++ 5177 # Make sure the PIC flag is empty. It appears that all Alpha 5178 # Linux and Compaq Tru64 Unix objects are PIC. 5179 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5180 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5181 ;; 5182 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5183 # IBM XL 8.0, 9.0 on PPC and BlueGene 5184 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5185 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5186 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5187 ;; 5188 *) 5189 case `$CC -V 2>&1 | sed 5q` in 5190 *Sun\ C*) 5191 # Sun C++ 5.9 5192 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5193 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5194 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5195 ;; 5196 esac 5197 ;; 5198 esac 5199 ;; 5200 lynxos*) 5201 ;; 5202 m88k*) 5203 ;; 5204 mvs*) 5205 case $cc_basename in 5206 cxx*) 5207 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5208 ;; 5209 *) 5210 ;; 5211 esac 5212 ;; 5213 netbsd*) 5214 ;; 5215 *qnx* | *nto*) 5216 # QNX uses GNU C++, but need to define -shared option too, otherwise 5217 # it will coredump. 5218 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5219 ;; 5220 osf3* | osf4* | osf5*) 5221 case $cc_basename in 5222 KCC*) 5223 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5224 ;; 5225 RCC*) 5226 # Rational C++ 2.4.1 5227 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5228 ;; 5229 cxx*) 5230 # Digital/Compaq C++ 5231 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5232 # Make sure the PIC flag is empty. It appears that all Alpha 5233 # Linux and Compaq Tru64 Unix objects are PIC. 5234 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5235 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5236 ;; 5237 *) 5238 ;; 5239 esac 5240 ;; 5241 psos*) 5242 ;; 5243 solaris*) 5244 case $cc_basename in 5245 CC* | sunCC*) 5246 # Sun C++ 4.2, 5.x and Centerline C++ 5247 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5248 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5249 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5250 ;; 5251 gcx*) 5252 # Green Hills C++ Compiler 5253 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5254 ;; 5255 *) 5256 ;; 5257 esac 5258 ;; 5259 sunos4*) 5260 case $cc_basename in 5261 CC*) 5262 # Sun C++ 4.x 5263 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5264 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5265 ;; 5266 lcc*) 5267 # Lucid 5268 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5269 ;; 5270 *) 5271 ;; 5272 esac 5273 ;; 5274 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5275 case $cc_basename in 5276 CC*) 5277 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5278 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5279 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5280 ;; 5281 esac 5282 ;; 5283 tandem*) 5284 case $cc_basename in 5285 NCC*) 5286 # NonStop-UX NCC 3.20 5287 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5288 ;; 5289 *) 5290 ;; 5291 esac 5292 ;; 5293 vxworks*) 5294 ;; 5295 *) 5296 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5297 ;; 5298 esac 5299 fi 5300], 5301[ 5302 if test "$GCC" = yes; then 5303 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5304 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5305 5306 case $host_os in 5307 aix*) 5308 # All AIX code is PIC. 5309 if test "$host_cpu" = ia64; then 5310 # AIX 5 now supports IA64 processor 5311 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5312 fi 5313 ;; 5314 5315 amigaos*) 5316 case $host_cpu in 5317 powerpc) 5318 # see comment about AmigaOS4 .so support 5319 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5320 ;; 5321 m68k) 5322 # FIXME: we need at least 68020 code to build shared libraries, but 5323 # adding the `-m68020' flag to GCC prevents building anything better, 5324 # like `-m68040'. 5325 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5326 ;; 5327 esac 5328 ;; 5329 5330 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5331 # PIC is the default for these OSes. 5332 ;; 5333 5334 mingw* | cygwin* | pw32* | os2* | cegcc*) 5335 # This hack is so that the source file can tell whether it is being 5336 # built for inclusion in a dll (and should export symbols for example). 5337 # Although the cygwin gcc ignores -fPIC, still need this for old-style 5338 # (--disable-auto-import) libraries 5339 m4_if([$1], [GCJ], [], 5340 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5341 ;; 5342 5343 darwin* | rhapsody*) 5344 # PIC is the default on this platform 5345 # Common symbols not allowed in MH_DYLIB files 5346 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5347 ;; 5348 5349 haiku*) 5350 # PIC is the default for Haiku. 5351 # The "-static" flag exists, but is broken. 5352 _LT_TAGVAR(lt_prog_compiler_static, $1)= 5353 ;; 5354 5355 hpux*) 5356 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5357 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5358 # sets the default TLS model and affects inlining. 5359 case $host_cpu in 5360 hppa*64*) 5361 # +Z the default 5362 ;; 5363 *) 5364 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5365 ;; 5366 esac 5367 ;; 5368 5369 interix[[3-9]]*) 5370 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5371 # Instead, we relocate shared libraries at runtime. 5372 ;; 5373 5374 msdosdjgpp*) 5375 # Just because we use GCC doesn't mean we suddenly get shared libraries 5376 # on systems that don't support them. 5377 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5378 enable_shared=no 5379 ;; 5380 5381 *nto* | *qnx*) 5382 # QNX uses GNU C++, but need to define -shared option too, otherwise 5383 # it will coredump. 5384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5385 ;; 5386 5387 sysv4*MP*) 5388 if test -d /usr/nec; then 5389 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5390 fi 5391 ;; 5392 5393 *) 5394 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5395 ;; 5396 esac 5397 5398 case $cc_basename in 5399 nvcc*) # Cuda Compiler Driver 2.2 5400 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5401 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 5402 ;; 5403 esac 5404 else 5405 # PORTME Check for flag to pass linker flags through the system compiler. 5406 case $host_os in 5407 aix*) 5408 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5409 if test "$host_cpu" = ia64; then 5410 # AIX 5 now supports IA64 processor 5411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5412 else 5413 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5414 fi 5415 ;; 5416 5417 mingw* | cygwin* | pw32* | os2* | cegcc*) 5418 # This hack is so that the source file can tell whether it is being 5419 # built for inclusion in a dll (and should export symbols for example). 5420 m4_if([$1], [GCJ], [], 5421 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5422 ;; 5423 5424 hpux9* | hpux10* | hpux11*) 5425 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5426 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5427 # not for PA HP-UX. 5428 case $host_cpu in 5429 hppa*64*|ia64*) 5430 # +Z the default 5431 ;; 5432 *) 5433 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5434 ;; 5435 esac 5436 # Is there a better lt_prog_compiler_static that works with the bundled CC? 5437 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5438 ;; 5439 5440 irix5* | irix6* | nonstopux*) 5441 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5442 # PIC (with -KPIC) is the default. 5443 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5444 ;; 5445 5446 linux* | k*bsd*-gnu | kopensolaris*-gnu) 5447 case $cc_basename in 5448 # old Intel for x86_64 which still supported -KPIC. 5449 ecc*) 5450 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5451 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5452 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5453 ;; 5454 # icc used to be incompatible with GCC. 5455 # ICC 10 doesn't accept -KPIC any more. 5456 icc* | ifort*) 5457 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5458 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5459 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5460 ;; 5461 # Lahey Fortran 8.1. 5462 lf95*) 5463 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5464 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5465 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5466 ;; 5467 nagfor*) 5468 # NAG Fortran compiler 5469 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5470 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5471 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5472 ;; 5473 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5474 # Portland Group compilers (*not* the Pentium gcc compiler, 5475 # which looks to be a dead project) 5476 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5477 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5478 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5479 ;; 5480 ccc*) 5481 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5482 # All Alpha code is PIC. 5483 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5484 ;; 5485 xl* | bgxl* | bgf* | mpixl*) 5486 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5487 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5490 ;; 5491 *) 5492 case `$CC -V 2>&1 | sed 5q` in 5493 *Sun\ F* | *Sun*Fortran*) 5494 # Sun Fortran 8.3 passes all unrecognized flags to the linker 5495 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5496 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5497 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5498 ;; 5499 *Sun\ C*) 5500 # Sun C 5.9 5501 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5502 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5503 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5504 ;; 5505 esac 5506 ;; 5507 esac 5508 ;; 5509 5510 newsos6) 5511 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5512 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5513 ;; 5514 5515 *nto* | *qnx*) 5516 # QNX uses GNU C++, but need to define -shared option too, otherwise 5517 # it will coredump. 5518 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5519 ;; 5520 5521 osf3* | osf4* | osf5*) 5522 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5523 # All OSF/1 code is PIC. 5524 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5525 ;; 5526 5527 rdos*) 5528 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5529 ;; 5530 5531 solaris*) 5532 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5533 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5534 case $cc_basename in 5535 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5536 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5537 *) 5538 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5539 esac 5540 ;; 5541 5542 sunos4*) 5543 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5544 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5545 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5546 ;; 5547 5548 sysv4 | sysv4.2uw2* | sysv4.3*) 5549 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5550 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5551 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5552 ;; 5553 5554 sysv4*MP*) 5555 if test -d /usr/nec ;then 5556 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5557 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5558 fi 5559 ;; 5560 5561 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5562 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5563 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5564 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5565 ;; 5566 5567 unicos*) 5568 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5569 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5570 ;; 5571 5572 uts4*) 5573 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5574 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5575 ;; 5576 5577 *) 5578 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5579 ;; 5580 esac 5581 fi 5582]) 5583case $host_os in 5584 # For platforms which do not support PIC, -DPIC is meaningless: 5585 *djgpp*) 5586 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5587 ;; 5588 *) 5589 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5590 ;; 5591esac 5592 5593AC_CACHE_CHECK([for $compiler option to produce PIC], 5594 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5595 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5596_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5597 5598# 5599# Check to make sure the PIC flag actually works. 5600# 5601if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5602 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5603 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5604 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5605 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5606 "" | " "*) ;; 5607 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5608 esac], 5609 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5610 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5611fi 5612_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5613 [Additional compiler flags for building library objects]) 5614 5615_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5616 [How to pass a linker flag through the compiler]) 5617# 5618# Check to make sure the static flag actually works. 5619# 5620wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5621_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5622 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5623 $lt_tmp_static_flag, 5624 [], 5625 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5626_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5627 [Compiler flag to prevent dynamic linking]) 5628])# _LT_COMPILER_PIC 5629 5630 5631# _LT_LINKER_SHLIBS([TAGNAME]) 5632# ---------------------------- 5633# See if the linker supports building shared libraries. 5634m4_defun([_LT_LINKER_SHLIBS], 5635[AC_REQUIRE([LT_PATH_LD])dnl 5636AC_REQUIRE([LT_PATH_NM])dnl 5637m4_require([_LT_PATH_MANIFEST_TOOL])dnl 5638m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5639m4_require([_LT_DECL_EGREP])dnl 5640m4_require([_LT_DECL_SED])dnl 5641m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5642m4_require([_LT_TAG_COMPILER])dnl 5643AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5644m4_if([$1], [CXX], [ 5645 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5646 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5647 case $host_os in 5648 aix[[4-9]]*) 5649 # If we're using GNU nm, then we don't want the "-C" option. 5650 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5651 # Also, AIX nm treats weak defined symbols like other global defined 5652 # symbols, whereas GNU nm marks them as "W". 5653 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5654 _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' 5655 else 5656 _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' 5657 fi 5658 ;; 5659 pw32*) 5660 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5661 ;; 5662 cygwin* | mingw* | cegcc*) 5663 case $cc_basename in 5664 cl*) ;; 5665 *) 5666 _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' 5667 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5668 ;; 5669 esac 5670 ;; 5671 *) 5672 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5673 ;; 5674 esac 5675], [ 5676 runpath_var= 5677 _LT_TAGVAR(allow_undefined_flag, $1)= 5678 _LT_TAGVAR(always_export_symbols, $1)=no 5679 _LT_TAGVAR(archive_cmds, $1)= 5680 _LT_TAGVAR(archive_expsym_cmds, $1)= 5681 _LT_TAGVAR(compiler_needs_object, $1)=no 5682 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5683 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5684 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5685 _LT_TAGVAR(hardcode_automatic, $1)=no 5686 _LT_TAGVAR(hardcode_direct, $1)=no 5687 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5688 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5689 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5690 _LT_TAGVAR(hardcode_libdir_separator, $1)= 5691 _LT_TAGVAR(hardcode_minus_L, $1)=no 5692 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5693 _LT_TAGVAR(inherit_rpath, $1)=no 5694 _LT_TAGVAR(link_all_deplibs, $1)=unknown 5695 _LT_TAGVAR(module_cmds, $1)= 5696 _LT_TAGVAR(module_expsym_cmds, $1)= 5697 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5698 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5699 _LT_TAGVAR(thread_safe_flag_spec, $1)= 5700 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5701 # include_expsyms should be a list of space-separated symbols to be *always* 5702 # included in the symbol list 5703 _LT_TAGVAR(include_expsyms, $1)= 5704 # exclude_expsyms can be an extended regexp of symbols to exclude 5705 # it will be wrapped by ` (' and `)$', so one must not match beginning or 5706 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5707 # as well as any symbol that contains `d'. 5708 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5709 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5710 # platforms (ab)use it in PIC code, but their linkers get confused if 5711 # the symbol is explicitly referenced. Since portable code cannot 5712 # rely on this symbol name, it's probably fine to never include it in 5713 # preloaded symbol tables. 5714 # Exclude shared library initialization/finalization symbols. 5715dnl Note also adjust exclude_expsyms for C++ above. 5716 extract_expsyms_cmds= 5717 5718 case $host_os in 5719 cygwin* | mingw* | pw32* | cegcc*) 5720 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5721 # When not using gcc, we currently assume that we are using 5722 # Microsoft Visual C++. 5723 if test "$GCC" != yes; then 5724 with_gnu_ld=no 5725 fi 5726 ;; 5727 interix*) 5728 # we just hope/assume this is gcc and not c89 (= MSVC++) 5729 with_gnu_ld=yes 5730 ;; 5731 openbsd*) 5732 with_gnu_ld=no 5733 ;; 5734 esac 5735 5736 _LT_TAGVAR(ld_shlibs, $1)=yes 5737 5738 # On some targets, GNU ld is compatible enough with the native linker 5739 # that we're better off using the native interface for both. 5740 lt_use_gnu_ld_interface=no 5741 if test "$with_gnu_ld" = yes; then 5742 case $host_os in 5743 aix*) 5744 # The AIX port of GNU ld has always aspired to compatibility 5745 # with the native linker. However, as the warning in the GNU ld 5746 # block says, versions before 2.19.5* couldn't really create working 5747 # shared libraries, regardless of the interface used. 5748 case `$LD -v 2>&1` in 5749 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5750 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5751 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5752 *) 5753 lt_use_gnu_ld_interface=yes 5754 ;; 5755 esac 5756 ;; 5757 *) 5758 lt_use_gnu_ld_interface=yes 5759 ;; 5760 esac 5761 fi 5762 5763 if test "$lt_use_gnu_ld_interface" = yes; then 5764 # If archive_cmds runs LD, not CC, wlarc should be empty 5765 wlarc='${wl}' 5766 5767 # Set some defaults for GNU ld with shared library support. These 5768 # are reset later if shared libraries are not supported. Putting them 5769 # here allows them to be overridden if necessary. 5770 runpath_var=LD_RUN_PATH 5771 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5772 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5773 # ancient GNU ld didn't support --whole-archive et. al. 5774 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5775 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5776 else 5777 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5778 fi 5779 supports_anon_versioning=no 5780 case `$LD -v 2>&1` in 5781 *GNU\ gold*) supports_anon_versioning=yes ;; 5782 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5783 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5784 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5785 *\ 2.11.*) ;; # other 2.11 versions 5786 *) supports_anon_versioning=yes ;; 5787 esac 5788 5789 # See if GNU ld supports shared libraries. 5790 case $host_os in 5791 aix[[3-9]]*) 5792 # On AIX/PPC, the GNU linker is very broken 5793 if test "$host_cpu" != ia64; then 5794 _LT_TAGVAR(ld_shlibs, $1)=no 5795 cat <<_LT_EOF 1>&2 5796 5797*** Warning: the GNU linker, at least up to release 2.19, is reported 5798*** to be unable to reliably create shared libraries on AIX. 5799*** Therefore, libtool is disabling shared libraries support. If you 5800*** really care for shared libraries, you may want to install binutils 5801*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5802*** You will then need to restart the configuration process. 5803 5804_LT_EOF 5805 fi 5806 ;; 5807 5808 amigaos*) 5809 case $host_cpu in 5810 powerpc) 5811 # see comment about AmigaOS4 .so support 5812 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5813 _LT_TAGVAR(archive_expsym_cmds, $1)='' 5814 ;; 5815 m68k) 5816 _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)' 5817 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5818 _LT_TAGVAR(hardcode_minus_L, $1)=yes 5819 ;; 5820 esac 5821 ;; 5822 5823 beos*) 5824 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5825 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5826 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5827 # support --undefined. This deserves some investigation. FIXME 5828 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5829 else 5830 _LT_TAGVAR(ld_shlibs, $1)=no 5831 fi 5832 ;; 5833 5834 cygwin* | mingw* | pw32* | cegcc*) 5835 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5836 # as there is no search path for DLLs. 5837 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5838 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5839 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5840 _LT_TAGVAR(always_export_symbols, $1)=no 5841 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5842 _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' 5843 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5844 5845 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5846 _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' 5847 # If the export-symbols file already is a .def file (1st line 5848 # is EXPORTS), use it as is; otherwise, prepend... 5849 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5850 cp $export_symbols $output_objdir/$soname.def; 5851 else 5852 echo EXPORTS > $output_objdir/$soname.def; 5853 cat $export_symbols >> $output_objdir/$soname.def; 5854 fi~ 5855 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5856 else 5857 _LT_TAGVAR(ld_shlibs, $1)=no 5858 fi 5859 ;; 5860 5861 haiku*) 5862 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5863 _LT_TAGVAR(link_all_deplibs, $1)=yes 5864 ;; 5865 5866 interix[[3-9]]*) 5867 _LT_TAGVAR(hardcode_direct, $1)=no 5868 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5869 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5870 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5871 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5872 # Instead, shared libraries are loaded at an image base (0x10000000 by 5873 # default) and relocated if they conflict, which is a slow very memory 5874 # consuming and fragmenting process. To avoid this, we pick a random, 5875 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5876 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5877 _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' 5878 _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' 5879 ;; 5880 5881 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5882 tmp_diet=no 5883 if test "$host_os" = linux-dietlibc; then 5884 case $cc_basename in 5885 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5886 esac 5887 fi 5888 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5889 && test "$tmp_diet" = no 5890 then 5891 tmp_addflag=' $pic_flag' 5892 tmp_sharedflag='-shared' 5893 case $cc_basename,$host_cpu in 5894 pgcc*) # Portland Group C compiler 5895 _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' 5896 tmp_addflag=' $pic_flag' 5897 ;; 5898 pgf77* | pgf90* | pgf95* | pgfortran*) 5899 # Portland Group f77 and f90 compilers 5900 _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' 5901 tmp_addflag=' $pic_flag -Mnomain' ;; 5902 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5903 tmp_addflag=' -i_dynamic' ;; 5904 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5905 tmp_addflag=' -i_dynamic -nofor_main' ;; 5906 ifc* | ifort*) # Intel Fortran compiler 5907 tmp_addflag=' -nofor_main' ;; 5908 lf95*) # Lahey Fortran 8.1 5909 _LT_TAGVAR(whole_archive_flag_spec, $1)= 5910 tmp_sharedflag='--shared' ;; 5911 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5912 tmp_sharedflag='-qmkshrobj' 5913 tmp_addflag= ;; 5914 nvcc*) # Cuda Compiler Driver 2.2 5915 _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' 5916 _LT_TAGVAR(compiler_needs_object, $1)=yes 5917 ;; 5918 esac 5919 case `$CC -V 2>&1 | sed 5q` in 5920 *Sun\ C*) # Sun C 5.9 5921 _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' 5922 _LT_TAGVAR(compiler_needs_object, $1)=yes 5923 tmp_sharedflag='-G' ;; 5924 *Sun\ F*) # Sun Fortran 8.3 5925 tmp_sharedflag='-G' ;; 5926 esac 5927 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5928 5929 if test "x$supports_anon_versioning" = xyes; then 5930 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5931 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5932 echo "local: *; };" >> $output_objdir/$libname.ver~ 5933 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5934 fi 5935 5936 case $cc_basename in 5937 xlf* | bgf* | bgxlf* | mpixlf*) 5938 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5939 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5940 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5941 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 5942 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5943 if test "x$supports_anon_versioning" = xyes; then 5944 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5945 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5946 echo "local: *; };" >> $output_objdir/$libname.ver~ 5947 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5948 fi 5949 ;; 5950 esac 5951 else 5952 _LT_TAGVAR(ld_shlibs, $1)=no 5953 fi 5954 ;; 5955 5956 netbsd*) 5957 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5958 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5959 wlarc= 5960 else 5961 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5962 _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' 5963 fi 5964 ;; 5965 5966 solaris*) 5967 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5968 _LT_TAGVAR(ld_shlibs, $1)=no 5969 cat <<_LT_EOF 1>&2 5970 5971*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5972*** create shared libraries on Solaris systems. Therefore, libtool 5973*** is disabling shared libraries support. We urge you to upgrade GNU 5974*** binutils to release 2.9.1 or newer. Another option is to modify 5975*** your PATH or compiler configuration so that the native linker is 5976*** used, and then restart. 5977 5978_LT_EOF 5979 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5980 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5981 _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' 5982 else 5983 _LT_TAGVAR(ld_shlibs, $1)=no 5984 fi 5985 ;; 5986 5987 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5988 case `$LD -v 2>&1` in 5989 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5990 _LT_TAGVAR(ld_shlibs, $1)=no 5991 cat <<_LT_EOF 1>&2 5992 5993*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5994*** reliably create shared libraries on SCO systems. Therefore, libtool 5995*** is disabling shared libraries support. We urge you to upgrade GNU 5996*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5997*** your PATH or compiler configuration so that the native linker is 5998*** used, and then restart. 5999 6000_LT_EOF 6001 ;; 6002 *) 6003 # For security reasons, it is highly recommended that you always 6004 # use absolute paths for naming shared libraries, and exclude the 6005 # DT_RUNPATH tag from executables and libraries. But doing so 6006 # requires that you compile everything twice, which is a pain. 6007 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6008 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6009 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6010 _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' 6011 else 6012 _LT_TAGVAR(ld_shlibs, $1)=no 6013 fi 6014 ;; 6015 esac 6016 ;; 6017 6018 sunos4*) 6019 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6020 wlarc= 6021 _LT_TAGVAR(hardcode_direct, $1)=yes 6022 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6023 ;; 6024 6025 *) 6026 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6027 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6028 _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' 6029 else 6030 _LT_TAGVAR(ld_shlibs, $1)=no 6031 fi 6032 ;; 6033 esac 6034 6035 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6036 runpath_var= 6037 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6038 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6039 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6040 fi 6041 else 6042 # PORTME fill in a description of your system's linker (not GNU ld) 6043 case $host_os in 6044 aix3*) 6045 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6046 _LT_TAGVAR(always_export_symbols, $1)=yes 6047 _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' 6048 # Note: this linker hardcodes the directories in LIBPATH if there 6049 # are no directories specified by -L. 6050 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6051 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6052 # Neither direct hardcoding nor static linking is supported with a 6053 # broken collect2. 6054 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6055 fi 6056 ;; 6057 6058 aix[[4-9]]*) 6059 if test "$host_cpu" = ia64; then 6060 # On IA64, the linker does run time linking by default, so we don't 6061 # have to do anything special. 6062 aix_use_runtimelinking=no 6063 exp_sym_flag='-Bexport' 6064 no_entry_flag="" 6065 else 6066 # If we're using GNU nm, then we don't want the "-C" option. 6067 # -C means demangle to AIX nm, but means don't demangle with GNU nm 6068 # Also, AIX nm treats weak defined symbols like other global 6069 # defined symbols, whereas GNU nm marks them as "W". 6070 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6071 _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' 6072 else 6073 _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' 6074 fi 6075 aix_use_runtimelinking=no 6076 6077 # Test if we are trying to use run time linking or normal 6078 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6079 # need to do runtime linking. 6080 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6081 for ld_flag in $LDFLAGS; do 6082 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6083 aix_use_runtimelinking=yes 6084 break 6085 fi 6086 done 6087 ;; 6088 esac 6089 6090 exp_sym_flag='-bexport' 6091 no_entry_flag='-bnoentry' 6092 fi 6093 6094 # When large executables or shared objects are built, AIX ld can 6095 # have problems creating the table of contents. If linking a library 6096 # or program results in "error TOC overflow" add -mminimal-toc to 6097 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6098 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6099 6100 _LT_TAGVAR(archive_cmds, $1)='' 6101 _LT_TAGVAR(hardcode_direct, $1)=yes 6102 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6103 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6104 _LT_TAGVAR(link_all_deplibs, $1)=yes 6105 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6106 6107 if test "$GCC" = yes; then 6108 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6109 # We only want to do this on AIX 4.2 and lower, the check 6110 # below for broken collect2 doesn't work under 4.3+ 6111 collect2name=`${CC} -print-prog-name=collect2` 6112 if test -f "$collect2name" && 6113 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6114 then 6115 # We have reworked collect2 6116 : 6117 else 6118 # We have old collect2 6119 _LT_TAGVAR(hardcode_direct, $1)=unsupported 6120 # It fails to find uninstalled libraries when the uninstalled 6121 # path is not listed in the libpath. Setting hardcode_minus_L 6122 # to unsupported forces relinking 6123 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6124 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6125 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6126 fi 6127 ;; 6128 esac 6129 shared_flag='-shared' 6130 if test "$aix_use_runtimelinking" = yes; then 6131 shared_flag="$shared_flag "'${wl}-G' 6132 fi 6133 else 6134 # not using gcc 6135 if test "$host_cpu" = ia64; then 6136 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6137 # chokes on -Wl,-G. The following line is correct: 6138 shared_flag='-G' 6139 else 6140 if test "$aix_use_runtimelinking" = yes; then 6141 shared_flag='${wl}-G' 6142 else 6143 shared_flag='${wl}-bM:SRE' 6144 fi 6145 fi 6146 fi 6147 6148 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6149 # It seems that -bexpall does not export symbols beginning with 6150 # underscore (_), so it is better to generate a list of symbols to export. 6151 _LT_TAGVAR(always_export_symbols, $1)=yes 6152 if test "$aix_use_runtimelinking" = yes; then 6153 # Warning - without using the other runtime loading flags (-brtl), 6154 # -berok will link without error, but may produce a broken library. 6155 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6156 # Determine the default libpath from the value encoded in an 6157 # empty executable. 6158 _LT_SYS_MODULE_PATH_AIX([$1]) 6159 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6160 _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" 6161 else 6162 if test "$host_cpu" = ia64; then 6163 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6164 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6165 _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" 6166 else 6167 # Determine the default libpath from the value encoded in an 6168 # empty executable. 6169 _LT_SYS_MODULE_PATH_AIX([$1]) 6170 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6171 # Warning - without using the other run time loading flags, 6172 # -berok will link without error, but may produce a broken library. 6173 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6174 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6175 if test "$with_gnu_ld" = yes; then 6176 # We only use this code for GNU lds that support --whole-archive. 6177 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6178 else 6179 # Exported symbols can be pulled into shared objects from archives 6180 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6181 fi 6182 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6183 # This is similar to how AIX traditionally builds its shared libraries. 6184 _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' 6185 fi 6186 fi 6187 ;; 6188 6189 amigaos*) 6190 case $host_cpu in 6191 powerpc) 6192 # see comment about AmigaOS4 .so support 6193 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6194 _LT_TAGVAR(archive_expsym_cmds, $1)='' 6195 ;; 6196 m68k) 6197 _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)' 6198 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6199 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6200 ;; 6201 esac 6202 ;; 6203 6204 bsdi[[45]]*) 6205 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6206 ;; 6207 6208 cygwin* | mingw* | pw32* | cegcc*) 6209 # When not using gcc, we currently assume that we are using 6210 # Microsoft Visual C++. 6211 # hardcode_libdir_flag_spec is actually meaningless, as there is 6212 # no search path for DLLs. 6213 case $cc_basename in 6214 cl*) 6215 # Native MSVC 6216 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6217 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6218 _LT_TAGVAR(always_export_symbols, $1)=yes 6219 _LT_TAGVAR(file_list_spec, $1)='@' 6220 # Tell ltmain to make .lib files, not .a files. 6221 libext=lib 6222 # Tell ltmain to make .dll files, not .so files. 6223 shrext_cmds=".dll" 6224 # FIXME: Setting linknames here is a bad hack. 6225 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6226 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6227 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6228 else 6229 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6230 fi~ 6231 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6232 linknames=' 6233 # The linker will not automatically build a static lib if we build a DLL. 6234 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6235 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6236 _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' 6237 # Don't use ranlib 6238 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6239 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6240 lt_tool_outputfile="@TOOL_OUTPUT@"~ 6241 case $lt_outputfile in 6242 *.exe|*.EXE) ;; 6243 *) 6244 lt_outputfile="$lt_outputfile.exe" 6245 lt_tool_outputfile="$lt_tool_outputfile.exe" 6246 ;; 6247 esac~ 6248 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6249 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6250 $RM "$lt_outputfile.manifest"; 6251 fi' 6252 ;; 6253 *) 6254 # Assume MSVC wrapper 6255 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6256 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6257 # Tell ltmain to make .lib files, not .a files. 6258 libext=lib 6259 # Tell ltmain to make .dll files, not .so files. 6260 shrext_cmds=".dll" 6261 # FIXME: Setting linknames here is a bad hack. 6262 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6263 # The linker will automatically build a .lib file if we build a DLL. 6264 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6265 # FIXME: Should let the user specify the lib program. 6266 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6267 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6268 ;; 6269 esac 6270 ;; 6271 6272 darwin* | rhapsody*) 6273 _LT_DARWIN_LINKER_FEATURES($1) 6274 ;; 6275 6276 dgux*) 6277 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6278 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6279 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6280 ;; 6281 6282 freebsd1*) 6283 _LT_TAGVAR(ld_shlibs, $1)=no 6284 ;; 6285 6286 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6287 # support. Future versions do this automatically, but an explicit c++rt0.o 6288 # does not break anything, and helps significantly (at the cost of a little 6289 # extra space). 6290 freebsd2.2*) 6291 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6292 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6293 _LT_TAGVAR(hardcode_direct, $1)=yes 6294 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6295 ;; 6296 6297 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6298 freebsd2*) 6299 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6300 _LT_TAGVAR(hardcode_direct, $1)=yes 6301 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6302 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6303 ;; 6304 6305 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6306 freebsd* | dragonfly*) 6307 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6308 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6309 _LT_TAGVAR(hardcode_direct, $1)=yes 6310 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6311 ;; 6312 6313 hpux9*) 6314 if test "$GCC" = yes; then 6315 _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' 6316 else 6317 _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' 6318 fi 6319 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6320 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6321 _LT_TAGVAR(hardcode_direct, $1)=yes 6322 6323 # hardcode_minus_L: Not really in the search PATH, 6324 # but as the default location of the library. 6325 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6326 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6327 ;; 6328 6329 hpux10*) 6330 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6331 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6332 else 6333 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6334 fi 6335 if test "$with_gnu_ld" = no; then 6336 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6337 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6338 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6339 _LT_TAGVAR(hardcode_direct, $1)=yes 6340 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6341 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6342 # hardcode_minus_L: Not really in the search PATH, 6343 # but as the default location of the library. 6344 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6345 fi 6346 ;; 6347 6348 hpux11*) 6349 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6350 case $host_cpu in 6351 hppa*64*) 6352 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6353 ;; 6354 ia64*) 6355 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6356 ;; 6357 *) 6358 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6359 ;; 6360 esac 6361 else 6362 case $host_cpu in 6363 hppa*64*) 6364 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6365 ;; 6366 ia64*) 6367 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6368 ;; 6369 *) 6370 m4_if($1, [], [ 6371 # Older versions of the 11.00 compiler do not understand -b yet 6372 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 6373 _LT_LINKER_OPTION([if $CC understands -b], 6374 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 6375 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 6376 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 6377 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6378 ;; 6379 esac 6380 fi 6381 if test "$with_gnu_ld" = no; then 6382 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6383 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6384 6385 case $host_cpu in 6386 hppa*64*|ia64*) 6387 _LT_TAGVAR(hardcode_direct, $1)=no 6388 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6389 ;; 6390 *) 6391 _LT_TAGVAR(hardcode_direct, $1)=yes 6392 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6393 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6394 6395 # hardcode_minus_L: Not really in the search PATH, 6396 # but as the default location of the library. 6397 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6398 ;; 6399 esac 6400 fi 6401 ;; 6402 6403 irix5* | irix6* | nonstopux*) 6404 if test "$GCC" = yes; then 6405 _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' 6406 # Try to use the -exported_symbol ld option, if it does not 6407 # work, assume that -exports_file does not work either and 6408 # implicitly export all symbols. 6409 # This should be the same for all languages, so no per-tag cache variable. 6410 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6411 [lt_cv_irix_exported_symbol], 6412 [save_LDFLAGS="$LDFLAGS" 6413 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 6414 AC_LINK_IFELSE( 6415 [AC_LANG_SOURCE( 6416 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6417 [C++], [[int foo (void) { return 0; }]], 6418 [Fortran 77], [[ 6419 subroutine foo 6420 end]], 6421 [Fortran], [[ 6422 subroutine foo 6423 end]])])], 6424 [lt_cv_irix_exported_symbol=yes], 6425 [lt_cv_irix_exported_symbol=no]) 6426 LDFLAGS="$save_LDFLAGS"]) 6427 if test "$lt_cv_irix_exported_symbol" = yes; then 6428 _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' 6429 fi 6430 else 6431 _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' 6432 _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' 6433 fi 6434 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6435 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6436 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6437 _LT_TAGVAR(inherit_rpath, $1)=yes 6438 _LT_TAGVAR(link_all_deplibs, $1)=yes 6439 ;; 6440 6441 netbsd*) 6442 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6443 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6444 else 6445 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6446 fi 6447 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6448 _LT_TAGVAR(hardcode_direct, $1)=yes 6449 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6450 ;; 6451 6452 newsos6) 6453 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6454 _LT_TAGVAR(hardcode_direct, $1)=yes 6455 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6456 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6457 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6458 ;; 6459 6460 *nto* | *qnx*) 6461 ;; 6462 6463 openbsd*) 6464 if test -f /usr/libexec/ld.so; then 6465 _LT_TAGVAR(hardcode_direct, $1)=yes 6466 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6467 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6468 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6469 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6470 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6471 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6472 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6473 else 6474 case $host_os in 6475 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6476 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6477 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6478 ;; 6479 *) 6480 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6481 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6482 ;; 6483 esac 6484 fi 6485 else 6486 _LT_TAGVAR(ld_shlibs, $1)=no 6487 fi 6488 ;; 6489 6490 os2*) 6491 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6492 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6493 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6494 _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' 6495 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6496 ;; 6497 6498 osf3*) 6499 if test "$GCC" = yes; then 6500 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6501 _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' 6502 else 6503 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6504 _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' 6505 fi 6506 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6507 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6508 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6509 ;; 6510 6511 osf4* | osf5*) # as osf3* with the addition of -msym flag 6512 if test "$GCC" = yes; then 6513 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6514 _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' 6515 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6516 else 6517 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6518 _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' 6519 _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~ 6520 $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' 6521 6522 # Both c and cxx compiler support -rpath directly 6523 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6524 fi 6525 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6526 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6527 ;; 6528 6529 solaris*) 6530 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6531 if test "$GCC" = yes; then 6532 wlarc='${wl}' 6533 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6534 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6535 $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' 6536 else 6537 case `$CC -V 2>&1` in 6538 *"Compilers 5.0"*) 6539 wlarc='' 6540 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6541 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6542 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6543 ;; 6544 *) 6545 wlarc='${wl}' 6546 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6547 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6548 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6549 ;; 6550 esac 6551 fi 6552 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6553 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6554 case $host_os in 6555 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6556 *) 6557 # The compiler driver will combine and reorder linker options, 6558 # but understands `-z linker_flag'. GCC discards it without `$wl', 6559 # but is careful enough not to reorder. 6560 # Supported since Solaris 2.6 (maybe 2.5.1?) 6561 if test "$GCC" = yes; then 6562 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6563 else 6564 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6565 fi 6566 ;; 6567 esac 6568 _LT_TAGVAR(link_all_deplibs, $1)=yes 6569 ;; 6570 6571 sunos4*) 6572 if test "x$host_vendor" = xsequent; then 6573 # Use $CC to link under sequent, because it throws in some extra .o 6574 # files that make .init and .fini sections work. 6575 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6576 else 6577 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6578 fi 6579 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6580 _LT_TAGVAR(hardcode_direct, $1)=yes 6581 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6582 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6583 ;; 6584 6585 sysv4) 6586 case $host_vendor in 6587 sni) 6588 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6589 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6590 ;; 6591 siemens) 6592 ## LD is ld it makes a PLAMLIB 6593 ## CC just makes a GrossModule. 6594 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6595 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6596 _LT_TAGVAR(hardcode_direct, $1)=no 6597 ;; 6598 motorola) 6599 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6600 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6601 ;; 6602 esac 6603 runpath_var='LD_RUN_PATH' 6604 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6605 ;; 6606 6607 sysv4.3*) 6608 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6609 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6610 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6611 ;; 6612 6613 sysv4*MP*) 6614 if test -d /usr/nec; then 6615 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6616 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6617 runpath_var=LD_RUN_PATH 6618 hardcode_runpath_var=yes 6619 _LT_TAGVAR(ld_shlibs, $1)=yes 6620 fi 6621 ;; 6622 6623 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6624 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6625 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6626 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6627 runpath_var='LD_RUN_PATH' 6628 6629 if test "$GCC" = yes; then 6630 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6631 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6632 else 6633 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6634 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6635 fi 6636 ;; 6637 6638 sysv5* | sco3.2v5* | sco5v6*) 6639 # Note: We can NOT use -z defs as we might desire, because we do not 6640 # link with -lc, and that would cause any symbols used from libc to 6641 # always be unresolved, which means just about no library would 6642 # ever link correctly. If we're not using GNU ld we use -z text 6643 # though, which does catch some bad symbols but isn't as heavy-handed 6644 # as -z defs. 6645 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6646 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6647 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6648 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6649 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6650 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6651 _LT_TAGVAR(link_all_deplibs, $1)=yes 6652 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6653 runpath_var='LD_RUN_PATH' 6654 6655 if test "$GCC" = yes; then 6656 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6657 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6658 else 6659 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6660 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6661 fi 6662 ;; 6663 6664 uts4*) 6665 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6666 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6667 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6668 ;; 6669 6670 *) 6671 _LT_TAGVAR(ld_shlibs, $1)=no 6672 ;; 6673 esac 6674 6675 if test x$host_vendor = xsni; then 6676 case $host in 6677 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6678 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 6679 ;; 6680 esac 6681 fi 6682 fi 6683]) 6684AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6685test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6686 6687_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6688 6689_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6690_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6691_LT_DECL([], [extract_expsyms_cmds], [2], 6692 [The commands to extract the exported symbol list from a shared archive]) 6693 6694# 6695# Do we need to explicitly link libc? 6696# 6697case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6698x|xyes) 6699 # Assume -lc should be added 6700 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6701 6702 if test "$enable_shared" = yes && test "$GCC" = yes; then 6703 case $_LT_TAGVAR(archive_cmds, $1) in 6704 *'~'*) 6705 # FIXME: we may have to deal with multi-command sequences. 6706 ;; 6707 '$CC '*) 6708 # Test whether the compiler implicitly links with -lc since on some 6709 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6710 # to ld, don't add -lc before -lgcc. 6711 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6712 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6713 [$RM conftest* 6714 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6715 6716 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6717 soname=conftest 6718 lib=conftest 6719 libobjs=conftest.$ac_objext 6720 deplibs= 6721 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6722 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6723 compiler_flags=-v 6724 linker_flags=-v 6725 verstring= 6726 output_objdir=. 6727 libname=conftest 6728 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6729 _LT_TAGVAR(allow_undefined_flag, $1)= 6730 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6731 then 6732 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6733 else 6734 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6735 fi 6736 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6737 else 6738 cat conftest.err 1>&5 6739 fi 6740 $RM conftest* 6741 ]) 6742 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6743 ;; 6744 esac 6745 fi 6746 ;; 6747esac 6748 6749_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6750 [Whether or not to add -lc for building shared libraries]) 6751_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6752 [enable_shared_with_static_runtimes], [0], 6753 [Whether or not to disallow shared libs when runtime libs are static]) 6754_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6755 [Compiler flag to allow reflexive dlopens]) 6756_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6757 [Compiler flag to generate shared objects directly from archives]) 6758_LT_TAGDECL([], [compiler_needs_object], [1], 6759 [Whether the compiler copes with passing no objects directly]) 6760_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6761 [Create an old-style archive from a shared archive]) 6762_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6763 [Create a temporary old-style archive to link instead of a shared archive]) 6764_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6765_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6766_LT_TAGDECL([], [module_cmds], [2], 6767 [Commands used to build a loadable module if different from building 6768 a shared archive.]) 6769_LT_TAGDECL([], [module_expsym_cmds], [2]) 6770_LT_TAGDECL([], [with_gnu_ld], [1], 6771 [Whether we are building with GNU ld or not]) 6772_LT_TAGDECL([], [allow_undefined_flag], [1], 6773 [Flag that allows shared libraries with undefined symbols to be built]) 6774_LT_TAGDECL([], [no_undefined_flag], [1], 6775 [Flag that enforces no undefined symbols]) 6776_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6777 [Flag to hardcode $libdir into a binary during linking. 6778 This must work even if $libdir does not exist]) 6779_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 6780 [[If ld is used when linking, flag to hardcode $libdir into a binary 6781 during linking. This must work even if $libdir does not exist]]) 6782_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6783 [Whether we need a single "-rpath" flag with a separated argument]) 6784_LT_TAGDECL([], [hardcode_direct], [0], 6785 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6786 DIR into the resulting binary]) 6787_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6788 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6789 DIR into the resulting binary and the resulting library dependency is 6790 "absolute", i.e impossible to change by setting ${shlibpath_var} if the 6791 library is relocated]) 6792_LT_TAGDECL([], [hardcode_minus_L], [0], 6793 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6794 into the resulting binary]) 6795_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6796 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6797 into the resulting binary]) 6798_LT_TAGDECL([], [hardcode_automatic], [0], 6799 [Set to "yes" if building a shared library automatically hardcodes DIR 6800 into the library and all subsequent libraries and executables linked 6801 against it]) 6802_LT_TAGDECL([], [inherit_rpath], [0], 6803 [Set to yes if linker adds runtime paths of dependent libraries 6804 to runtime path list]) 6805_LT_TAGDECL([], [link_all_deplibs], [0], 6806 [Whether libtool must link a program against all its dependency libraries]) 6807_LT_TAGDECL([], [always_export_symbols], [0], 6808 [Set to "yes" if exported symbols are required]) 6809_LT_TAGDECL([], [export_symbols_cmds], [2], 6810 [The commands to list exported symbols]) 6811_LT_TAGDECL([], [exclude_expsyms], [1], 6812 [Symbols that should not be listed in the preloaded symbols]) 6813_LT_TAGDECL([], [include_expsyms], [1], 6814 [Symbols that must always be exported]) 6815_LT_TAGDECL([], [prelink_cmds], [2], 6816 [Commands necessary for linking programs (against libraries) with templates]) 6817_LT_TAGDECL([], [postlink_cmds], [2], 6818 [Commands necessary for finishing linking programs]) 6819_LT_TAGDECL([], [file_list_spec], [1], 6820 [Specify filename containing input files]) 6821dnl FIXME: Not yet implemented 6822dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6823dnl [Compiler flag to generate thread safe objects]) 6824])# _LT_LINKER_SHLIBS 6825 6826 6827# _LT_LANG_C_CONFIG([TAG]) 6828# ------------------------ 6829# Ensure that the configuration variables for a C compiler are suitably 6830# defined. These variables are subsequently used by _LT_CONFIG to write 6831# the compiler configuration to `libtool'. 6832m4_defun([_LT_LANG_C_CONFIG], 6833[m4_require([_LT_DECL_EGREP])dnl 6834lt_save_CC="$CC" 6835AC_LANG_PUSH(C) 6836 6837# Source file extension for C test sources. 6838ac_ext=c 6839 6840# Object file extension for compiled C test sources. 6841objext=o 6842_LT_TAGVAR(objext, $1)=$objext 6843 6844# Code to be used in simple compile tests 6845lt_simple_compile_test_code="int some_variable = 0;" 6846 6847# Code to be used in simple link tests 6848lt_simple_link_test_code='int main(){return(0);}' 6849 6850_LT_TAG_COMPILER 6851# Save the default compiler, since it gets overwritten when the other 6852# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6853compiler_DEFAULT=$CC 6854 6855# save warnings/boilerplate of simple test code 6856_LT_COMPILER_BOILERPLATE 6857_LT_LINKER_BOILERPLATE 6858 6859if test -n "$compiler"; then 6860 _LT_COMPILER_NO_RTTI($1) 6861 _LT_COMPILER_PIC($1) 6862 _LT_COMPILER_C_O($1) 6863 _LT_COMPILER_FILE_LOCKS($1) 6864 _LT_LINKER_SHLIBS($1) 6865 _LT_SYS_DYNAMIC_LINKER($1) 6866 _LT_LINKER_HARDCODE_LIBPATH($1) 6867 LT_SYS_DLOPEN_SELF 6868 _LT_CMD_STRIPLIB 6869 6870 # Report which library types will actually be built 6871 AC_MSG_CHECKING([if libtool supports shared libraries]) 6872 AC_MSG_RESULT([$can_build_shared]) 6873 6874 AC_MSG_CHECKING([whether to build shared libraries]) 6875 test "$can_build_shared" = "no" && enable_shared=no 6876 6877 # On AIX, shared libraries and static libraries use the same namespace, and 6878 # are all built from PIC. 6879 case $host_os in 6880 aix3*) 6881 test "$enable_shared" = yes && enable_static=no 6882 if test -n "$RANLIB"; then 6883 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6884 postinstall_cmds='$RANLIB $lib' 6885 fi 6886 ;; 6887 6888 aix[[4-9]]*) 6889 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6890 test "$enable_shared" = yes && enable_static=no 6891 fi 6892 ;; 6893 esac 6894 AC_MSG_RESULT([$enable_shared]) 6895 6896 AC_MSG_CHECKING([whether to build static libraries]) 6897 # Make sure either enable_shared or enable_static is yes. 6898 test "$enable_shared" = yes || enable_static=yes 6899 AC_MSG_RESULT([$enable_static]) 6900 6901 _LT_CONFIG($1) 6902fi 6903AC_LANG_POP 6904CC="$lt_save_CC" 6905])# _LT_LANG_C_CONFIG 6906 6907 6908# _LT_LANG_CXX_CONFIG([TAG]) 6909# -------------------------- 6910# Ensure that the configuration variables for a C++ compiler are suitably 6911# defined. These variables are subsequently used by _LT_CONFIG to write 6912# the compiler configuration to `libtool'. 6913m4_defun([_LT_LANG_CXX_CONFIG], 6914[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6915m4_require([_LT_DECL_EGREP])dnl 6916m4_require([_LT_PATH_MANIFEST_TOOL])dnl 6917if test -n "$CXX" && ( test "X$CXX" != "Xno" && 6918 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 6919 (test "X$CXX" != "Xg++"))) ; then 6920 AC_PROG_CXXCPP 6921else 6922 _lt_caught_CXX_error=yes 6923fi 6924 6925AC_LANG_PUSH(C++) 6926_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6927_LT_TAGVAR(allow_undefined_flag, $1)= 6928_LT_TAGVAR(always_export_symbols, $1)=no 6929_LT_TAGVAR(archive_expsym_cmds, $1)= 6930_LT_TAGVAR(compiler_needs_object, $1)=no 6931_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6932_LT_TAGVAR(hardcode_direct, $1)=no 6933_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6934_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6935_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6936_LT_TAGVAR(hardcode_libdir_separator, $1)= 6937_LT_TAGVAR(hardcode_minus_L, $1)=no 6938_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6939_LT_TAGVAR(hardcode_automatic, $1)=no 6940_LT_TAGVAR(inherit_rpath, $1)=no 6941_LT_TAGVAR(module_cmds, $1)= 6942_LT_TAGVAR(module_expsym_cmds, $1)= 6943_LT_TAGVAR(link_all_deplibs, $1)=unknown 6944_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6945_LT_TAGVAR(reload_flag, $1)=$reload_flag 6946_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6947_LT_TAGVAR(no_undefined_flag, $1)= 6948_LT_TAGVAR(whole_archive_flag_spec, $1)= 6949_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6950 6951# Source file extension for C++ test sources. 6952ac_ext=cpp 6953 6954# Object file extension for compiled C++ test sources. 6955objext=o 6956_LT_TAGVAR(objext, $1)=$objext 6957 6958# No sense in running all these tests if we already determined that 6959# the CXX compiler isn't working. Some variables (like enable_shared) 6960# are currently assumed to apply to all compilers on this platform, 6961# and will be corrupted by setting them based on a non-working compiler. 6962if test "$_lt_caught_CXX_error" != yes; then 6963 # Code to be used in simple compile tests 6964 lt_simple_compile_test_code="int some_variable = 0;" 6965 6966 # Code to be used in simple link tests 6967 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6968 6969 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6970 _LT_TAG_COMPILER 6971 6972 # save warnings/boilerplate of simple test code 6973 _LT_COMPILER_BOILERPLATE 6974 _LT_LINKER_BOILERPLATE 6975 6976 # Allow CC to be a program name with arguments. 6977 lt_save_CC=$CC 6978 lt_save_CFLAGS=$CFLAGS 6979 lt_save_LD=$LD 6980 lt_save_GCC=$GCC 6981 GCC=$GXX 6982 lt_save_with_gnu_ld=$with_gnu_ld 6983 lt_save_path_LD=$lt_cv_path_LD 6984 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6985 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6986 else 6987 $as_unset lt_cv_prog_gnu_ld 6988 fi 6989 if test -n "${lt_cv_path_LDCXX+set}"; then 6990 lt_cv_path_LD=$lt_cv_path_LDCXX 6991 else 6992 $as_unset lt_cv_path_LD 6993 fi 6994 test -z "${LDCXX+set}" || LD=$LDCXX 6995 CC=${CXX-"c++"} 6996 CFLAGS=$CXXFLAGS 6997 compiler=$CC 6998 _LT_TAGVAR(compiler, $1)=$CC 6999 _LT_CC_BASENAME([$compiler]) 7000 7001 if test -n "$compiler"; then 7002 # We don't want -fno-exception when compiling C++ code, so set the 7003 # no_builtin_flag separately 7004 if test "$GXX" = yes; then 7005 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7006 else 7007 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7008 fi 7009 7010 if test "$GXX" = yes; then 7011 # Set up default GNU C++ configuration 7012 7013 LT_PATH_LD 7014 7015 # Check if GNU C++ uses GNU ld as the underlying linker, since the 7016 # archiving commands below assume that GNU ld is being used. 7017 if test "$with_gnu_ld" = yes; then 7018 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7019 _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' 7020 7021 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7022 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7023 7024 # If archive_cmds runs LD, not CC, wlarc should be empty 7025 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7026 # investigate it a little bit more. (MM) 7027 wlarc='${wl}' 7028 7029 # ancient GNU ld didn't support --whole-archive et. al. 7030 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 7031 $GREP 'no-whole-archive' > /dev/null; then 7032 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7033 else 7034 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7035 fi 7036 else 7037 with_gnu_ld=no 7038 wlarc= 7039 7040 # A generic and very simple default shared library creation 7041 # command for GNU C++ for the case where it uses the native 7042 # linker, instead of GNU ld. If possible, this setting should 7043 # overridden to take advantage of the native linker features on 7044 # the platform it is being used on. 7045 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7046 fi 7047 7048 # Commands to make compiler produce verbose output that lists 7049 # what "hidden" libraries, object files and flags are used when 7050 # linking a shared library. 7051 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7052 7053 else 7054 GXX=no 7055 with_gnu_ld=no 7056 wlarc= 7057 fi 7058 7059 # PORTME: fill in a description of your system's C++ link characteristics 7060 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7061 _LT_TAGVAR(ld_shlibs, $1)=yes 7062 case $host_os in 7063 aix3*) 7064 # FIXME: insert proper C++ library support 7065 _LT_TAGVAR(ld_shlibs, $1)=no 7066 ;; 7067 aix[[4-9]]*) 7068 if test "$host_cpu" = ia64; then 7069 # On IA64, the linker does run time linking by default, so we don't 7070 # have to do anything special. 7071 aix_use_runtimelinking=no 7072 exp_sym_flag='-Bexport' 7073 no_entry_flag="" 7074 else 7075 aix_use_runtimelinking=no 7076 7077 # Test if we are trying to use run time linking or normal 7078 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7079 # need to do runtime linking. 7080 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7081 for ld_flag in $LDFLAGS; do 7082 case $ld_flag in 7083 *-brtl*) 7084 aix_use_runtimelinking=yes 7085 break 7086 ;; 7087 esac 7088 done 7089 ;; 7090 esac 7091 7092 exp_sym_flag='-bexport' 7093 no_entry_flag='-bnoentry' 7094 fi 7095 7096 # When large executables or shared objects are built, AIX ld can 7097 # have problems creating the table of contents. If linking a library 7098 # or program results in "error TOC overflow" add -mminimal-toc to 7099 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7100 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7101 7102 _LT_TAGVAR(archive_cmds, $1)='' 7103 _LT_TAGVAR(hardcode_direct, $1)=yes 7104 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7105 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7106 _LT_TAGVAR(link_all_deplibs, $1)=yes 7107 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7108 7109 if test "$GXX" = yes; then 7110 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7111 # We only want to do this on AIX 4.2 and lower, the check 7112 # below for broken collect2 doesn't work under 4.3+ 7113 collect2name=`${CC} -print-prog-name=collect2` 7114 if test -f "$collect2name" && 7115 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7116 then 7117 # We have reworked collect2 7118 : 7119 else 7120 # We have old collect2 7121 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7122 # It fails to find uninstalled libraries when the uninstalled 7123 # path is not listed in the libpath. Setting hardcode_minus_L 7124 # to unsupported forces relinking 7125 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7126 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7127 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7128 fi 7129 esac 7130 shared_flag='-shared' 7131 if test "$aix_use_runtimelinking" = yes; then 7132 shared_flag="$shared_flag "'${wl}-G' 7133 fi 7134 else 7135 # not using gcc 7136 if test "$host_cpu" = ia64; then 7137 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7138 # chokes on -Wl,-G. The following line is correct: 7139 shared_flag='-G' 7140 else 7141 if test "$aix_use_runtimelinking" = yes; then 7142 shared_flag='${wl}-G' 7143 else 7144 shared_flag='${wl}-bM:SRE' 7145 fi 7146 fi 7147 fi 7148 7149 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7150 # It seems that -bexpall does not export symbols beginning with 7151 # underscore (_), so it is better to generate a list of symbols to 7152 # export. 7153 _LT_TAGVAR(always_export_symbols, $1)=yes 7154 if test "$aix_use_runtimelinking" = yes; then 7155 # Warning - without using the other runtime loading flags (-brtl), 7156 # -berok will link without error, but may produce a broken library. 7157 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7158 # Determine the default libpath from the value encoded in an empty 7159 # executable. 7160 _LT_SYS_MODULE_PATH_AIX([$1]) 7161 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7162 7163 _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" 7164 else 7165 if test "$host_cpu" = ia64; then 7166 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7167 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7168 _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" 7169 else 7170 # Determine the default libpath from the value encoded in an 7171 # empty executable. 7172 _LT_SYS_MODULE_PATH_AIX([$1]) 7173 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7174 # Warning - without using the other run time loading flags, 7175 # -berok will link without error, but may produce a broken library. 7176 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7177 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7178 if test "$with_gnu_ld" = yes; then 7179 # We only use this code for GNU lds that support --whole-archive. 7180 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7181 else 7182 # Exported symbols can be pulled into shared objects from archives 7183 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7184 fi 7185 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7186 # This is similar to how AIX traditionally builds its shared 7187 # libraries. 7188 _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' 7189 fi 7190 fi 7191 ;; 7192 7193 beos*) 7194 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7195 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7196 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7197 # support --undefined. This deserves some investigation. FIXME 7198 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7199 else 7200 _LT_TAGVAR(ld_shlibs, $1)=no 7201 fi 7202 ;; 7203 7204 chorus*) 7205 case $cc_basename in 7206 *) 7207 # FIXME: insert proper C++ library support 7208 _LT_TAGVAR(ld_shlibs, $1)=no 7209 ;; 7210 esac 7211 ;; 7212 7213 cygwin* | mingw* | pw32* | cegcc*) 7214 case $GXX,$cc_basename in 7215 ,cl* | no,cl*) 7216 # Native MSVC 7217 # hardcode_libdir_flag_spec is actually meaningless, as there is 7218 # no search path for DLLs. 7219 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7220 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7221 _LT_TAGVAR(always_export_symbols, $1)=yes 7222 _LT_TAGVAR(file_list_spec, $1)='@' 7223 # Tell ltmain to make .lib files, not .a files. 7224 libext=lib 7225 # Tell ltmain to make .dll files, not .so files. 7226 shrext_cmds=".dll" 7227 # FIXME: Setting linknames here is a bad hack. 7228 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7229 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7230 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7231 else 7232 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7233 fi~ 7234 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7235 linknames=' 7236 # The linker will not automatically build a static lib if we build a DLL. 7237 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7238 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7239 # Don't use ranlib 7240 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7241 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7242 lt_tool_outputfile="@TOOL_OUTPUT@"~ 7243 case $lt_outputfile in 7244 *.exe|*.EXE) ;; 7245 *) 7246 lt_outputfile="$lt_outputfile.exe" 7247 lt_tool_outputfile="$lt_tool_outputfile.exe" 7248 ;; 7249 esac~ 7250 func_to_tool_file "$lt_outputfile"~ 7251 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7252 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7253 $RM "$lt_outputfile.manifest"; 7254 fi' 7255 ;; 7256 *) 7257 # g++ 7258 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7259 # as there is no search path for DLLs. 7260 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7261 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7262 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7263 _LT_TAGVAR(always_export_symbols, $1)=no 7264 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7265 7266 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7267 _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' 7268 # If the export-symbols file already is a .def file (1st line 7269 # is EXPORTS), use it as is; otherwise, prepend... 7270 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7271 cp $export_symbols $output_objdir/$soname.def; 7272 else 7273 echo EXPORTS > $output_objdir/$soname.def; 7274 cat $export_symbols >> $output_objdir/$soname.def; 7275 fi~ 7276 $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' 7277 else 7278 _LT_TAGVAR(ld_shlibs, $1)=no 7279 fi 7280 ;; 7281 esac 7282 ;; 7283 darwin* | rhapsody*) 7284 _LT_DARWIN_LINKER_FEATURES($1) 7285 ;; 7286 7287 dgux*) 7288 case $cc_basename in 7289 ec++*) 7290 # FIXME: insert proper C++ library support 7291 _LT_TAGVAR(ld_shlibs, $1)=no 7292 ;; 7293 ghcx*) 7294 # Green Hills C++ Compiler 7295 # FIXME: insert proper C++ library support 7296 _LT_TAGVAR(ld_shlibs, $1)=no 7297 ;; 7298 *) 7299 # FIXME: insert proper C++ library support 7300 _LT_TAGVAR(ld_shlibs, $1)=no 7301 ;; 7302 esac 7303 ;; 7304 7305 freebsd[[12]]*) 7306 # C++ shared libraries reported to be fairly broken before 7307 # switch to ELF 7308 _LT_TAGVAR(ld_shlibs, $1)=no 7309 ;; 7310 7311 freebsd-elf*) 7312 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7313 ;; 7314 7315 freebsd* | dragonfly*) 7316 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7317 # conventions 7318 _LT_TAGVAR(ld_shlibs, $1)=yes 7319 ;; 7320 7321 gnu*) 7322 ;; 7323 7324 haiku*) 7325 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7326 _LT_TAGVAR(link_all_deplibs, $1)=yes 7327 ;; 7328 7329 hpux9*) 7330 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7331 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7332 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7333 _LT_TAGVAR(hardcode_direct, $1)=yes 7334 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7335 # but as the default 7336 # location of the library. 7337 7338 case $cc_basename in 7339 CC*) 7340 # FIXME: insert proper C++ library support 7341 _LT_TAGVAR(ld_shlibs, $1)=no 7342 ;; 7343 aCC*) 7344 _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' 7345 # Commands to make compiler produce verbose output that lists 7346 # what "hidden" libraries, object files and flags are used when 7347 # linking a shared library. 7348 # 7349 # There doesn't appear to be a way to prevent this compiler from 7350 # explicitly linking system object files so we need to strip them 7351 # from the output so that they don't get included in the library 7352 # dependencies. 7353 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $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"' 7354 ;; 7355 *) 7356 if test "$GXX" = yes; then 7357 _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' 7358 else 7359 # FIXME: insert proper C++ library support 7360 _LT_TAGVAR(ld_shlibs, $1)=no 7361 fi 7362 ;; 7363 esac 7364 ;; 7365 7366 hpux10*|hpux11*) 7367 if test $with_gnu_ld = no; then 7368 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7369 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7370 7371 case $host_cpu in 7372 hppa*64*|ia64*) 7373 ;; 7374 *) 7375 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7376 ;; 7377 esac 7378 fi 7379 case $host_cpu in 7380 hppa*64*|ia64*) 7381 _LT_TAGVAR(hardcode_direct, $1)=no 7382 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7383 ;; 7384 *) 7385 _LT_TAGVAR(hardcode_direct, $1)=yes 7386 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7387 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7388 # but as the default 7389 # location of the library. 7390 ;; 7391 esac 7392 7393 case $cc_basename in 7394 CC*) 7395 # FIXME: insert proper C++ library support 7396 _LT_TAGVAR(ld_shlibs, $1)=no 7397 ;; 7398 aCC*) 7399 case $host_cpu in 7400 hppa*64*) 7401 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7402 ;; 7403 ia64*) 7404 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7405 ;; 7406 *) 7407 _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' 7408 ;; 7409 esac 7410 # Commands to make compiler produce verbose output that lists 7411 # what "hidden" libraries, object files and flags are used when 7412 # linking a shared library. 7413 # 7414 # There doesn't appear to be a way to prevent this compiler from 7415 # explicitly linking system object files so we need to strip them 7416 # from the output so that they don't get included in the library 7417 # dependencies. 7418 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"' 7419 ;; 7420 *) 7421 if test "$GXX" = yes; then 7422 if test $with_gnu_ld = no; then 7423 case $host_cpu in 7424 hppa*64*) 7425 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7426 ;; 7427 ia64*) 7428 _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' 7429 ;; 7430 *) 7431 _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' 7432 ;; 7433 esac 7434 fi 7435 else 7436 # FIXME: insert proper C++ library support 7437 _LT_TAGVAR(ld_shlibs, $1)=no 7438 fi 7439 ;; 7440 esac 7441 ;; 7442 7443 interix[[3-9]]*) 7444 _LT_TAGVAR(hardcode_direct, $1)=no 7445 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7446 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7447 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7448 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7449 # Instead, shared libraries are loaded at an image base (0x10000000 by 7450 # default) and relocated if they conflict, which is a slow very memory 7451 # consuming and fragmenting process. To avoid this, we pick a random, 7452 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7453 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7454 _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' 7455 _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' 7456 ;; 7457 irix5* | irix6*) 7458 case $cc_basename in 7459 CC*) 7460 # SGI C++ 7461 _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' 7462 7463 # Archives containing C++ object files must be created using 7464 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7465 # necessary to make sure instantiated templates are included 7466 # in the archive. 7467 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7468 ;; 7469 *) 7470 if test "$GXX" = yes; then 7471 if test "$with_gnu_ld" = no; then 7472 _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' 7473 else 7474 _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' 7475 fi 7476 fi 7477 _LT_TAGVAR(link_all_deplibs, $1)=yes 7478 ;; 7479 esac 7480 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7481 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7482 _LT_TAGVAR(inherit_rpath, $1)=yes 7483 ;; 7484 7485 linux* | k*bsd*-gnu | kopensolaris*-gnu) 7486 case $cc_basename in 7487 KCC*) 7488 # Kuck and Associates, Inc. (KAI) C++ Compiler 7489 7490 # KCC will only create a shared library if the output file 7491 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7492 # to its proper name (with version) after linking. 7493 _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' 7494 _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' 7495 # Commands to make compiler produce verbose output that lists 7496 # what "hidden" libraries, object files and flags are used when 7497 # linking a shared library. 7498 # 7499 # There doesn't appear to be a way to prevent this compiler from 7500 # explicitly linking system object files so we need to strip them 7501 # from the output so that they don't get included in the library 7502 # dependencies. 7503 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"' 7504 7505 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7506 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7507 7508 # Archives containing C++ object files must be created using 7509 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7510 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7511 ;; 7512 icpc* | ecpc* ) 7513 # Intel C++ 7514 with_gnu_ld=yes 7515 # version 8.0 and above of icpc choke on multiply defined symbols 7516 # if we add $predep_objects and $postdep_objects, however 7.1 and 7517 # earlier do not add the objects themselves. 7518 case `$CC -V 2>&1` in 7519 *"Version 7."*) 7520 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7521 _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' 7522 ;; 7523 *) # Version 8.0 or newer 7524 tmp_idyn= 7525 case $host_cpu in 7526 ia64*) tmp_idyn=' -i_dynamic';; 7527 esac 7528 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7529 _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' 7530 ;; 7531 esac 7532 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7533 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7534 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7535 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7536 ;; 7537 pgCC* | pgcpp*) 7538 # Portland Group C++ compiler 7539 case `$CC -V` in 7540 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7541 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7542 rm -rf $tpldir~ 7543 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7544 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7545 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7546 rm -rf $tpldir~ 7547 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7548 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7549 $RANLIB $oldlib' 7550 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7551 rm -rf $tpldir~ 7552 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7553 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7554 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7555 rm -rf $tpldir~ 7556 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7557 $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' 7558 ;; 7559 *) # Version 6 and above use weak symbols 7560 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7561 _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' 7562 ;; 7563 esac 7564 7565 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7566 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7567 _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' 7568 ;; 7569 cxx*) 7570 # Compaq C++ 7571 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7572 _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' 7573 7574 runpath_var=LD_RUN_PATH 7575 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7576 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7577 7578 # Commands to make compiler produce verbose output that lists 7579 # what "hidden" libraries, object files and flags are used when 7580 # linking a shared library. 7581 # 7582 # There doesn't appear to be a way to prevent this compiler from 7583 # explicitly linking system object files so we need to strip them 7584 # from the output so that they don't get included in the library 7585 # dependencies. 7586 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' 7587 ;; 7588 xl* | mpixl* | bgxl*) 7589 # IBM XL 8.0 on PPC, with GNU ld 7590 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7591 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7592 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7593 if test "x$supports_anon_versioning" = xyes; then 7594 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7595 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7596 echo "local: *; };" >> $output_objdir/$libname.ver~ 7597 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7598 fi 7599 ;; 7600 *) 7601 case `$CC -V 2>&1 | sed 5q` in 7602 *Sun\ C*) 7603 # Sun C++ 5.9 7604 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7605 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7606 _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' 7607 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7608 _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' 7609 _LT_TAGVAR(compiler_needs_object, $1)=yes 7610 7611 # Not sure whether something based on 7612 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7613 # would be better. 7614 output_verbose_link_cmd='func_echo_all' 7615 7616 # Archives containing C++ object files must be created using 7617 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7618 # necessary to make sure instantiated templates are included 7619 # in the archive. 7620 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7621 ;; 7622 esac 7623 ;; 7624 esac 7625 ;; 7626 7627 lynxos*) 7628 # FIXME: insert proper C++ library support 7629 _LT_TAGVAR(ld_shlibs, $1)=no 7630 ;; 7631 7632 m88k*) 7633 # FIXME: insert proper C++ library support 7634 _LT_TAGVAR(ld_shlibs, $1)=no 7635 ;; 7636 7637 mvs*) 7638 case $cc_basename in 7639 cxx*) 7640 # FIXME: insert proper C++ library support 7641 _LT_TAGVAR(ld_shlibs, $1)=no 7642 ;; 7643 *) 7644 # FIXME: insert proper C++ library support 7645 _LT_TAGVAR(ld_shlibs, $1)=no 7646 ;; 7647 esac 7648 ;; 7649 7650 netbsd*) 7651 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7652 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7653 wlarc= 7654 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7655 _LT_TAGVAR(hardcode_direct, $1)=yes 7656 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7657 fi 7658 # Workaround some broken pre-1.5 toolchains 7659 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7660 ;; 7661 7662 *nto* | *qnx*) 7663 _LT_TAGVAR(ld_shlibs, $1)=yes 7664 ;; 7665 7666 openbsd2*) 7667 # C++ shared libraries are fairly broken 7668 _LT_TAGVAR(ld_shlibs, $1)=no 7669 ;; 7670 7671 openbsd*) 7672 if test -f /usr/libexec/ld.so; then 7673 _LT_TAGVAR(hardcode_direct, $1)=yes 7674 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7675 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7676 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7677 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7678 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7679 _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' 7680 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7681 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7682 fi 7683 output_verbose_link_cmd=func_echo_all 7684 else 7685 _LT_TAGVAR(ld_shlibs, $1)=no 7686 fi 7687 ;; 7688 7689 osf3* | osf4* | osf5*) 7690 case $cc_basename in 7691 KCC*) 7692 # Kuck and Associates, Inc. (KAI) C++ Compiler 7693 7694 # KCC will only create a shared library if the output file 7695 # ends with ".so" (or ".sl" for HP-UX), so rename the library 7696 # to its proper name (with version) after linking. 7697 _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' 7698 7699 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7700 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7701 7702 # Archives containing C++ object files must be created using 7703 # the KAI C++ compiler. 7704 case $host in 7705 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7706 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7707 esac 7708 ;; 7709 RCC*) 7710 # Rational C++ 2.4.1 7711 # FIXME: insert proper C++ library support 7712 _LT_TAGVAR(ld_shlibs, $1)=no 7713 ;; 7714 cxx*) 7715 case $host in 7716 osf3*) 7717 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7718 _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' 7719 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7720 ;; 7721 *) 7722 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7723 _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' 7724 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7725 echo "-hidden">> $lib.exp~ 7726 $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~ 7727 $RM $lib.exp' 7728 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7729 ;; 7730 esac 7731 7732 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7733 7734 # Commands to make compiler produce verbose output that lists 7735 # what "hidden" libraries, object files and flags are used when 7736 # linking a shared library. 7737 # 7738 # There doesn't appear to be a way to prevent this compiler from 7739 # explicitly linking system object files so we need to strip them 7740 # from the output so that they don't get included in the library 7741 # dependencies. 7742 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"' 7743 ;; 7744 *) 7745 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7746 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7747 case $host in 7748 osf3*) 7749 _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' 7750 ;; 7751 *) 7752 _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' 7753 ;; 7754 esac 7755 7756 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7757 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7758 7759 # Commands to make compiler produce verbose output that lists 7760 # what "hidden" libraries, object files and flags are used when 7761 # linking a shared library. 7762 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7763 7764 else 7765 # FIXME: insert proper C++ library support 7766 _LT_TAGVAR(ld_shlibs, $1)=no 7767 fi 7768 ;; 7769 esac 7770 ;; 7771 7772 psos*) 7773 # FIXME: insert proper C++ library support 7774 _LT_TAGVAR(ld_shlibs, $1)=no 7775 ;; 7776 7777 sunos4*) 7778 case $cc_basename in 7779 CC*) 7780 # Sun C++ 4.x 7781 # FIXME: insert proper C++ library support 7782 _LT_TAGVAR(ld_shlibs, $1)=no 7783 ;; 7784 lcc*) 7785 # Lucid 7786 # FIXME: insert proper C++ library support 7787 _LT_TAGVAR(ld_shlibs, $1)=no 7788 ;; 7789 *) 7790 # FIXME: insert proper C++ library support 7791 _LT_TAGVAR(ld_shlibs, $1)=no 7792 ;; 7793 esac 7794 ;; 7795 7796 solaris*) 7797 case $cc_basename in 7798 CC* | sunCC*) 7799 # Sun C++ 4.2, 5.x and Centerline C++ 7800 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7801 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7802 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7803 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7804 $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' 7805 7806 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7807 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7808 case $host_os in 7809 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7810 *) 7811 # The compiler driver will combine and reorder linker options, 7812 # but understands `-z linker_flag'. 7813 # Supported since Solaris 2.6 (maybe 2.5.1?) 7814 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7815 ;; 7816 esac 7817 _LT_TAGVAR(link_all_deplibs, $1)=yes 7818 7819 output_verbose_link_cmd='func_echo_all' 7820 7821 # Archives containing C++ object files must be created using 7822 # "CC -xar", where "CC" is the Sun C++ compiler. This is 7823 # necessary to make sure instantiated templates are included 7824 # in the archive. 7825 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7826 ;; 7827 gcx*) 7828 # Green Hills C++ Compiler 7829 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7830 7831 # The C++ compiler must be used to create the archive. 7832 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7833 ;; 7834 *) 7835 # GNU C++ compiler with Solaris linker 7836 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7837 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7838 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7839 _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' 7840 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7841 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7842 7843 # Commands to make compiler produce verbose output that lists 7844 # what "hidden" libraries, object files and flags are used when 7845 # linking a shared library. 7846 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7847 else 7848 # g++ 2.7 appears to require `-G' NOT `-shared' on this 7849 # platform. 7850 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7851 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7852 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7853 7854 # Commands to make compiler produce verbose output that lists 7855 # what "hidden" libraries, object files and flags are used when 7856 # linking a shared library. 7857 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7858 fi 7859 7860 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7861 case $host_os in 7862 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7863 *) 7864 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7865 ;; 7866 esac 7867 fi 7868 ;; 7869 esac 7870 ;; 7871 7872 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7873 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7874 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7875 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7876 runpath_var='LD_RUN_PATH' 7877 7878 case $cc_basename in 7879 CC*) 7880 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7881 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7882 ;; 7883 *) 7884 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7885 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7886 ;; 7887 esac 7888 ;; 7889 7890 sysv5* | sco3.2v5* | sco5v6*) 7891 # Note: We can NOT use -z defs as we might desire, because we do not 7892 # link with -lc, and that would cause any symbols used from libc to 7893 # always be unresolved, which means just about no library would 7894 # ever link correctly. If we're not using GNU ld we use -z text 7895 # though, which does catch some bad symbols but isn't as heavy-handed 7896 # as -z defs. 7897 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7898 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7899 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7900 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7901 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7902 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7903 _LT_TAGVAR(link_all_deplibs, $1)=yes 7904 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7905 runpath_var='LD_RUN_PATH' 7906 7907 case $cc_basename in 7908 CC*) 7909 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7910 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7911 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7912 '"$_LT_TAGVAR(old_archive_cmds, $1)" 7913 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7914 '"$_LT_TAGVAR(reload_cmds, $1)" 7915 ;; 7916 *) 7917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7918 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7919 ;; 7920 esac 7921 ;; 7922 7923 tandem*) 7924 case $cc_basename in 7925 NCC*) 7926 # NonStop-UX NCC 3.20 7927 # FIXME: insert proper C++ library support 7928 _LT_TAGVAR(ld_shlibs, $1)=no 7929 ;; 7930 *) 7931 # FIXME: insert proper C++ library support 7932 _LT_TAGVAR(ld_shlibs, $1)=no 7933 ;; 7934 esac 7935 ;; 7936 7937 vxworks*) 7938 # FIXME: insert proper C++ library support 7939 _LT_TAGVAR(ld_shlibs, $1)=no 7940 ;; 7941 7942 *) 7943 # FIXME: insert proper C++ library support 7944 _LT_TAGVAR(ld_shlibs, $1)=no 7945 ;; 7946 esac 7947 7948 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7949 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7950 7951 _LT_TAGVAR(GCC, $1)="$GXX" 7952 _LT_TAGVAR(LD, $1)="$LD" 7953 7954 ## CAVEAT EMPTOR: 7955 ## There is no encapsulation within the following macros, do not change 7956 ## the running order or otherwise move them around unless you know exactly 7957 ## what you are doing... 7958 _LT_SYS_HIDDEN_LIBDEPS($1) 7959 _LT_COMPILER_PIC($1) 7960 _LT_COMPILER_C_O($1) 7961 _LT_COMPILER_FILE_LOCKS($1) 7962 _LT_LINKER_SHLIBS($1) 7963 _LT_SYS_DYNAMIC_LINKER($1) 7964 _LT_LINKER_HARDCODE_LIBPATH($1) 7965 7966 _LT_CONFIG($1) 7967 fi # test -n "$compiler" 7968 7969 CC=$lt_save_CC 7970 CFLAGS=$lt_save_CFLAGS 7971 LDCXX=$LD 7972 LD=$lt_save_LD 7973 GCC=$lt_save_GCC 7974 with_gnu_ld=$lt_save_with_gnu_ld 7975 lt_cv_path_LDCXX=$lt_cv_path_LD 7976 lt_cv_path_LD=$lt_save_path_LD 7977 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7978 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7979fi # test "$_lt_caught_CXX_error" != yes 7980 7981AC_LANG_POP 7982])# _LT_LANG_CXX_CONFIG 7983 7984 7985# _LT_FUNC_STRIPNAME_CNF 7986# ---------------------- 7987# func_stripname_cnf prefix suffix name 7988# strip PREFIX and SUFFIX off of NAME. 7989# PREFIX and SUFFIX must not contain globbing or regex special 7990# characters, hashes, percent signs, but SUFFIX may contain a leading 7991# dot (in which case that matches only a dot). 7992# 7993# This function is identical to the (non-XSI) version of func_stripname, 7994# except this one can be used by m4 code that may be executed by configure, 7995# rather than the libtool script. 7996m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7997AC_REQUIRE([_LT_DECL_SED]) 7998AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7999func_stripname_cnf () 8000{ 8001 case ${2} in 8002 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 8003 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 8004 esac 8005} # func_stripname_cnf 8006])# _LT_FUNC_STRIPNAME_CNF 8007 8008# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8009# --------------------------------- 8010# Figure out "hidden" library dependencies from verbose 8011# compiler output when linking a shared library. 8012# Parse the compiler output and extract the necessary 8013# objects, libraries and library flags. 8014m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8015[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8016AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 8017# Dependencies to place before and after the object being linked: 8018_LT_TAGVAR(predep_objects, $1)= 8019_LT_TAGVAR(postdep_objects, $1)= 8020_LT_TAGVAR(predeps, $1)= 8021_LT_TAGVAR(postdeps, $1)= 8022_LT_TAGVAR(compiler_lib_search_path, $1)= 8023 8024dnl we can't use the lt_simple_compile_test_code here, 8025dnl because it contains code intended for an executable, 8026dnl not a library. It's possible we should let each 8027dnl tag define a new lt_????_link_test_code variable, 8028dnl but it's only used here... 8029m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8030int a; 8031void foo (void) { a = 0; } 8032_LT_EOF 8033], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8034class Foo 8035{ 8036public: 8037 Foo (void) { a = 0; } 8038private: 8039 int a; 8040}; 8041_LT_EOF 8042], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8043 subroutine foo 8044 implicit none 8045 integer*4 a 8046 a=0 8047 return 8048 end 8049_LT_EOF 8050], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8051 subroutine foo 8052 implicit none 8053 integer a 8054 a=0 8055 return 8056 end 8057_LT_EOF 8058], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8059public class foo { 8060 private int a; 8061 public void bar (void) { 8062 a = 0; 8063 } 8064}; 8065_LT_EOF 8066]) 8067 8068_lt_libdeps_save_CFLAGS=$CFLAGS 8069case "$CC $CFLAGS " in #( 8070*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 8071*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8072esac 8073 8074dnl Parse the compiler output and extract the necessary 8075dnl objects, libraries and library flags. 8076if AC_TRY_EVAL(ac_compile); then 8077 # Parse the compiler output and extract the necessary 8078 # objects, libraries and library flags. 8079 8080 # Sentinel used to keep track of whether or not we are before 8081 # the conftest object file. 8082 pre_test_object_deps_done=no 8083 8084 for p in `eval "$output_verbose_link_cmd"`; do 8085 case ${prev}${p} in 8086 8087 -L* | -R* | -l*) 8088 # Some compilers place space between "-{L,R}" and the path. 8089 # Remove the space. 8090 if test $p = "-L" || 8091 test $p = "-R"; then 8092 prev=$p 8093 continue 8094 fi 8095 8096 # Expand the sysroot to ease extracting the directories later. 8097 if test -z "$prev"; then 8098 case $p in 8099 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 8100 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 8101 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 8102 esac 8103 fi 8104 case $p in 8105 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 8106 esac 8107 if test "$pre_test_object_deps_done" = no; then 8108 case ${prev} in 8109 -L | -R) 8110 # Internal compiler library paths should come after those 8111 # provided the user. The postdeps already come after the 8112 # user supplied libs so there is no need to process them. 8113 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8114 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8115 else 8116 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8117 fi 8118 ;; 8119 # The "-l" case would never come before the object being 8120 # linked, so don't bother handling this case. 8121 esac 8122 else 8123 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8124 _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8125 else 8126 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8127 fi 8128 fi 8129 prev= 8130 ;; 8131 8132 *.lto.$objext) ;; # Ignore GCC LTO objects 8133 *.$objext) 8134 # This assumes that the test object file only shows up 8135 # once in the compiler output. 8136 if test "$p" = "conftest.$objext"; then 8137 pre_test_object_deps_done=yes 8138 continue 8139 fi 8140 8141 if test "$pre_test_object_deps_done" = no; then 8142 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8143 _LT_TAGVAR(predep_objects, $1)="$p" 8144 else 8145 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8146 fi 8147 else 8148 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8149 _LT_TAGVAR(postdep_objects, $1)="$p" 8150 else 8151 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8152 fi 8153 fi 8154 ;; 8155 8156 *) ;; # Ignore the rest. 8157 8158 esac 8159 done 8160 8161 # Clean up. 8162 rm -f a.out a.exe 8163else 8164 echo "libtool.m4: error: problem compiling $1 test program" 8165fi 8166 8167$RM -f confest.$objext 8168CFLAGS=$_lt_libdeps_save_CFLAGS 8169 8170# PORTME: override above test on systems where it is broken 8171m4_if([$1], [CXX], 8172[case $host_os in 8173interix[[3-9]]*) 8174 # Interix 3.5 installs completely hosed .la files for C++, so rather than 8175 # hack all around it, let's just trust "g++" to DTRT. 8176 _LT_TAGVAR(predep_objects,$1)= 8177 _LT_TAGVAR(postdep_objects,$1)= 8178 _LT_TAGVAR(postdeps,$1)= 8179 ;; 8180 8181linux*) 8182 case `$CC -V 2>&1 | sed 5q` in 8183 *Sun\ C*) 8184 # Sun C++ 5.9 8185 8186 # The more standards-conforming stlport4 library is 8187 # incompatible with the Cstd library. Avoid specifying 8188 # it if it's in CXXFLAGS. Ignore libCrun as 8189 # -library=stlport4 depends on it. 8190 case " $CXX $CXXFLAGS " in 8191 *" -library=stlport4 "*) 8192 solaris_use_stlport4=yes 8193 ;; 8194 esac 8195 8196 if test "$solaris_use_stlport4" != yes; then 8197 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8198 fi 8199 ;; 8200 esac 8201 ;; 8202 8203solaris*) 8204 case $cc_basename in 8205 CC* | sunCC*) 8206 # The more standards-conforming stlport4 library is 8207 # incompatible with the Cstd library. Avoid specifying 8208 # it if it's in CXXFLAGS. Ignore libCrun as 8209 # -library=stlport4 depends on it. 8210 case " $CXX $CXXFLAGS " in 8211 *" -library=stlport4 "*) 8212 solaris_use_stlport4=yes 8213 ;; 8214 esac 8215 8216 # Adding this requires a known-good setup of shared libraries for 8217 # Sun compiler versions before 5.6, else PIC objects from an old 8218 # archive will be linked into the output, leading to subtle bugs. 8219 if test "$solaris_use_stlport4" != yes; then 8220 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8221 fi 8222 ;; 8223 esac 8224 ;; 8225esac 8226]) 8227 8228case " $_LT_TAGVAR(postdeps, $1) " in 8229*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8230esac 8231 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8232if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8233 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8234fi 8235_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8236 [The directories searched by this compiler when creating a shared library]) 8237_LT_TAGDECL([], [predep_objects], [1], 8238 [Dependencies to place before and after the objects being linked to 8239 create a shared library]) 8240_LT_TAGDECL([], [postdep_objects], [1]) 8241_LT_TAGDECL([], [predeps], [1]) 8242_LT_TAGDECL([], [postdeps], [1]) 8243_LT_TAGDECL([], [compiler_lib_search_path], [1], 8244 [The library search path used internally by the compiler when linking 8245 a shared library]) 8246])# _LT_SYS_HIDDEN_LIBDEPS 8247 8248 8249# _LT_LANG_F77_CONFIG([TAG]) 8250# -------------------------- 8251# Ensure that the configuration variables for a Fortran 77 compiler are 8252# suitably defined. These variables are subsequently used by _LT_CONFIG 8253# to write the compiler configuration to `libtool'. 8254m4_defun([_LT_LANG_F77_CONFIG], 8255[AC_LANG_PUSH(Fortran 77) 8256if test -z "$F77" || test "X$F77" = "Xno"; then 8257 _lt_disable_F77=yes 8258fi 8259 8260_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8261_LT_TAGVAR(allow_undefined_flag, $1)= 8262_LT_TAGVAR(always_export_symbols, $1)=no 8263_LT_TAGVAR(archive_expsym_cmds, $1)= 8264_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8265_LT_TAGVAR(hardcode_direct, $1)=no 8266_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8267_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8268_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 8269_LT_TAGVAR(hardcode_libdir_separator, $1)= 8270_LT_TAGVAR(hardcode_minus_L, $1)=no 8271_LT_TAGVAR(hardcode_automatic, $1)=no 8272_LT_TAGVAR(inherit_rpath, $1)=no 8273_LT_TAGVAR(module_cmds, $1)= 8274_LT_TAGVAR(module_expsym_cmds, $1)= 8275_LT_TAGVAR(link_all_deplibs, $1)=unknown 8276_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8277_LT_TAGVAR(reload_flag, $1)=$reload_flag 8278_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8279_LT_TAGVAR(no_undefined_flag, $1)= 8280_LT_TAGVAR(whole_archive_flag_spec, $1)= 8281_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8282 8283# Source file extension for f77 test sources. 8284ac_ext=f 8285 8286# Object file extension for compiled f77 test sources. 8287objext=o 8288_LT_TAGVAR(objext, $1)=$objext 8289 8290# No sense in running all these tests if we already determined that 8291# the F77 compiler isn't working. Some variables (like enable_shared) 8292# are currently assumed to apply to all compilers on this platform, 8293# and will be corrupted by setting them based on a non-working compiler. 8294if test "$_lt_disable_F77" != yes; then 8295 # Code to be used in simple compile tests 8296 lt_simple_compile_test_code="\ 8297 subroutine t 8298 return 8299 end 8300" 8301 8302 # Code to be used in simple link tests 8303 lt_simple_link_test_code="\ 8304 program t 8305 end 8306" 8307 8308 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8309 _LT_TAG_COMPILER 8310 8311 # save warnings/boilerplate of simple test code 8312 _LT_COMPILER_BOILERPLATE 8313 _LT_LINKER_BOILERPLATE 8314 8315 # Allow CC to be a program name with arguments. 8316 lt_save_CC="$CC" 8317 lt_save_GCC=$GCC 8318 lt_save_CFLAGS=$CFLAGS 8319 CC=${F77-"f77"} 8320 CFLAGS=$FFLAGS 8321 compiler=$CC 8322 _LT_TAGVAR(compiler, $1)=$CC 8323 _LT_CC_BASENAME([$compiler]) 8324 GCC=$G77 8325 if test -n "$compiler"; then 8326 AC_MSG_CHECKING([if libtool supports shared libraries]) 8327 AC_MSG_RESULT([$can_build_shared]) 8328 8329 AC_MSG_CHECKING([whether to build shared libraries]) 8330 test "$can_build_shared" = "no" && enable_shared=no 8331 8332 # On AIX, shared libraries and static libraries use the same namespace, and 8333 # are all built from PIC. 8334 case $host_os in 8335 aix3*) 8336 test "$enable_shared" = yes && enable_static=no 8337 if test -n "$RANLIB"; then 8338 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8339 postinstall_cmds='$RANLIB $lib' 8340 fi 8341 ;; 8342 aix[[4-9]]*) 8343 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8344 test "$enable_shared" = yes && enable_static=no 8345 fi 8346 ;; 8347 esac 8348 AC_MSG_RESULT([$enable_shared]) 8349 8350 AC_MSG_CHECKING([whether to build static libraries]) 8351 # Make sure either enable_shared or enable_static is yes. 8352 test "$enable_shared" = yes || enable_static=yes 8353 AC_MSG_RESULT([$enable_static]) 8354 8355 _LT_TAGVAR(GCC, $1)="$G77" 8356 _LT_TAGVAR(LD, $1)="$LD" 8357 8358 ## CAVEAT EMPTOR: 8359 ## There is no encapsulation within the following macros, do not change 8360 ## the running order or otherwise move them around unless you know exactly 8361 ## what you are doing... 8362 _LT_COMPILER_PIC($1) 8363 _LT_COMPILER_C_O($1) 8364 _LT_COMPILER_FILE_LOCKS($1) 8365 _LT_LINKER_SHLIBS($1) 8366 _LT_SYS_DYNAMIC_LINKER($1) 8367 _LT_LINKER_HARDCODE_LIBPATH($1) 8368 8369 _LT_CONFIG($1) 8370 fi # test -n "$compiler" 8371 8372 GCC=$lt_save_GCC 8373 CC="$lt_save_CC" 8374 CFLAGS="$lt_save_CFLAGS" 8375fi # test "$_lt_disable_F77" != yes 8376 8377AC_LANG_POP 8378])# _LT_LANG_F77_CONFIG 8379 8380 8381# _LT_LANG_FC_CONFIG([TAG]) 8382# ------------------------- 8383# Ensure that the configuration variables for a Fortran compiler are 8384# suitably defined. These variables are subsequently used by _LT_CONFIG 8385# to write the compiler configuration to `libtool'. 8386m4_defun([_LT_LANG_FC_CONFIG], 8387[AC_LANG_PUSH(Fortran) 8388 8389if test -z "$FC" || test "X$FC" = "Xno"; then 8390 _lt_disable_FC=yes 8391fi 8392 8393_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8394_LT_TAGVAR(allow_undefined_flag, $1)= 8395_LT_TAGVAR(always_export_symbols, $1)=no 8396_LT_TAGVAR(archive_expsym_cmds, $1)= 8397_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8398_LT_TAGVAR(hardcode_direct, $1)=no 8399_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8400_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8401_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 8402_LT_TAGVAR(hardcode_libdir_separator, $1)= 8403_LT_TAGVAR(hardcode_minus_L, $1)=no 8404_LT_TAGVAR(hardcode_automatic, $1)=no 8405_LT_TAGVAR(inherit_rpath, $1)=no 8406_LT_TAGVAR(module_cmds, $1)= 8407_LT_TAGVAR(module_expsym_cmds, $1)= 8408_LT_TAGVAR(link_all_deplibs, $1)=unknown 8409_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8410_LT_TAGVAR(reload_flag, $1)=$reload_flag 8411_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8412_LT_TAGVAR(no_undefined_flag, $1)= 8413_LT_TAGVAR(whole_archive_flag_spec, $1)= 8414_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8415 8416# Source file extension for fc test sources. 8417ac_ext=${ac_fc_srcext-f} 8418 8419# Object file extension for compiled fc test sources. 8420objext=o 8421_LT_TAGVAR(objext, $1)=$objext 8422 8423# No sense in running all these tests if we already determined that 8424# the FC compiler isn't working. Some variables (like enable_shared) 8425# are currently assumed to apply to all compilers on this platform, 8426# and will be corrupted by setting them based on a non-working compiler. 8427if test "$_lt_disable_FC" != yes; then 8428 # Code to be used in simple compile tests 8429 lt_simple_compile_test_code="\ 8430 subroutine t 8431 return 8432 end 8433" 8434 8435 # Code to be used in simple link tests 8436 lt_simple_link_test_code="\ 8437 program t 8438 end 8439" 8440 8441 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8442 _LT_TAG_COMPILER 8443 8444 # save warnings/boilerplate of simple test code 8445 _LT_COMPILER_BOILERPLATE 8446 _LT_LINKER_BOILERPLATE 8447 8448 # Allow CC to be a program name with arguments. 8449 lt_save_CC="$CC" 8450 lt_save_GCC=$GCC 8451 lt_save_CFLAGS=$CFLAGS 8452 CC=${FC-"f95"} 8453 CFLAGS=$FCFLAGS 8454 compiler=$CC 8455 GCC=$ac_cv_fc_compiler_gnu 8456 8457 _LT_TAGVAR(compiler, $1)=$CC 8458 _LT_CC_BASENAME([$compiler]) 8459 8460 if test -n "$compiler"; then 8461 AC_MSG_CHECKING([if libtool supports shared libraries]) 8462 AC_MSG_RESULT([$can_build_shared]) 8463 8464 AC_MSG_CHECKING([whether to build shared libraries]) 8465 test "$can_build_shared" = "no" && enable_shared=no 8466 8467 # On AIX, shared libraries and static libraries use the same namespace, and 8468 # are all built from PIC. 8469 case $host_os in 8470 aix3*) 8471 test "$enable_shared" = yes && enable_static=no 8472 if test -n "$RANLIB"; then 8473 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8474 postinstall_cmds='$RANLIB $lib' 8475 fi 8476 ;; 8477 aix[[4-9]]*) 8478 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8479 test "$enable_shared" = yes && enable_static=no 8480 fi 8481 ;; 8482 esac 8483 AC_MSG_RESULT([$enable_shared]) 8484 8485 AC_MSG_CHECKING([whether to build static libraries]) 8486 # Make sure either enable_shared or enable_static is yes. 8487 test "$enable_shared" = yes || enable_static=yes 8488 AC_MSG_RESULT([$enable_static]) 8489 8490 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 8491 _LT_TAGVAR(LD, $1)="$LD" 8492 8493 ## CAVEAT EMPTOR: 8494 ## There is no encapsulation within the following macros, do not change 8495 ## the running order or otherwise move them around unless you know exactly 8496 ## what you are doing... 8497 _LT_SYS_HIDDEN_LIBDEPS($1) 8498 _LT_COMPILER_PIC($1) 8499 _LT_COMPILER_C_O($1) 8500 _LT_COMPILER_FILE_LOCKS($1) 8501 _LT_LINKER_SHLIBS($1) 8502 _LT_SYS_DYNAMIC_LINKER($1) 8503 _LT_LINKER_HARDCODE_LIBPATH($1) 8504 8505 _LT_CONFIG($1) 8506 fi # test -n "$compiler" 8507 8508 GCC=$lt_save_GCC 8509 CC=$lt_save_CC 8510 CFLAGS=$lt_save_CFLAGS 8511fi # test "$_lt_disable_FC" != yes 8512 8513AC_LANG_POP 8514])# _LT_LANG_FC_CONFIG 8515 8516 8517# _LT_LANG_GCJ_CONFIG([TAG]) 8518# -------------------------- 8519# Ensure that the configuration variables for the GNU Java Compiler 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_GCJ_CONFIG], 8523[AC_REQUIRE([LT_PROG_GCJ])dnl 8524AC_LANG_SAVE 8525 8526# Source file extension for Java test sources. 8527ac_ext=java 8528 8529# Object file extension for compiled Java 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="class foo {}" 8535 8536# Code to be used in simple link tests 8537lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 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=${GCJ-"gcj"} 8552CFLAGS=$GCJFLAGS 8553compiler=$CC 8554_LT_TAGVAR(compiler, $1)=$CC 8555_LT_TAGVAR(LD, $1)="$LD" 8556_LT_CC_BASENAME([$compiler]) 8557 8558# GCJ 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_GCJ_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_RC 8654# ---------- 8655AC_DEFUN([LT_PROG_RC], 8656[AC_CHECK_TOOL(RC, windres,) 8657]) 8658 8659# Old name: 8660AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8661dnl aclocal-1.4 backwards compatibility: 8662dnl AC_DEFUN([LT_AC_PROG_RC], []) 8663 8664 8665# _LT_DECL_EGREP 8666# -------------- 8667# If we don't have a new enough Autoconf to choose the best grep 8668# available, choose the one first in the user's PATH. 8669m4_defun([_LT_DECL_EGREP], 8670[AC_REQUIRE([AC_PROG_EGREP])dnl 8671AC_REQUIRE([AC_PROG_FGREP])dnl 8672test -z "$GREP" && GREP=grep 8673_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8674_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8675_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8676dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8677AC_SUBST([GREP]) 8678]) 8679 8680 8681# _LT_DECL_OBJDUMP 8682# -------------- 8683# If we don't have a new enough Autoconf to choose the best objdump 8684# available, choose the one first in the user's PATH. 8685m4_defun([_LT_DECL_OBJDUMP], 8686[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8687test -z "$OBJDUMP" && OBJDUMP=objdump 8688_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8689AC_SUBST([OBJDUMP]) 8690]) 8691 8692# _LT_DECL_DLLTOOL 8693# ---------------- 8694# Ensure DLLTOOL variable is set. 8695m4_defun([_LT_DECL_DLLTOOL], 8696[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8697test -z "$DLLTOOL" && DLLTOOL=dlltool 8698_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8699AC_SUBST([DLLTOOL]) 8700]) 8701 8702# _LT_DECL_SED 8703# ------------ 8704# Check for a fully-functional sed program, that truncates 8705# as few characters as possible. Prefer GNU sed if found. 8706m4_defun([_LT_DECL_SED], 8707[AC_PROG_SED 8708test -z "$SED" && SED=sed 8709Xsed="$SED -e 1s/^X//" 8710_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8711_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8712 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8713])# _LT_DECL_SED 8714 8715m4_ifndef([AC_PROG_SED], [ 8716# NOTE: This macro has been submitted for inclusion into # 8717# GNU Autoconf as AC_PROG_SED. When it is available in # 8718# a released version of Autoconf we should remove this # 8719# macro and use it instead. # 8720 8721m4_defun([AC_PROG_SED], 8722[AC_MSG_CHECKING([for a sed that does not truncate output]) 8723AC_CACHE_VAL(lt_cv_path_SED, 8724[# Loop through the user's path and test for sed and gsed. 8725# Then use that list of sed's as ones to test for truncation. 8726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8727for as_dir in $PATH 8728do 8729 IFS=$as_save_IFS 8730 test -z "$as_dir" && as_dir=. 8731 for lt_ac_prog in sed gsed; do 8732 for ac_exec_ext in '' $ac_executable_extensions; do 8733 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8734 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8735 fi 8736 done 8737 done 8738done 8739IFS=$as_save_IFS 8740lt_ac_max=0 8741lt_ac_count=0 8742# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8743# along with /bin/sed that truncates output. 8744for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8745 test ! -f $lt_ac_sed && continue 8746 cat /dev/null > conftest.in 8747 lt_ac_count=0 8748 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8749 # Check for GNU sed and select it if it is found. 8750 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8751 lt_cv_path_SED=$lt_ac_sed 8752 break 8753 fi 8754 while true; do 8755 cat conftest.in conftest.in >conftest.tmp 8756 mv conftest.tmp conftest.in 8757 cp conftest.in conftest.nl 8758 echo >>conftest.nl 8759 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8760 cmp -s conftest.out conftest.nl || break 8761 # 10000 chars as input seems more than enough 8762 test $lt_ac_count -gt 10 && break 8763 lt_ac_count=`expr $lt_ac_count + 1` 8764 if test $lt_ac_count -gt $lt_ac_max; then 8765 lt_ac_max=$lt_ac_count 8766 lt_cv_path_SED=$lt_ac_sed 8767 fi 8768 done 8769done 8770]) 8771SED=$lt_cv_path_SED 8772AC_SUBST([SED]) 8773AC_MSG_RESULT([$SED]) 8774])#AC_PROG_SED 8775])#m4_ifndef 8776 8777# Old name: 8778AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8779dnl aclocal-1.4 backwards compatibility: 8780dnl AC_DEFUN([LT_AC_PROG_SED], []) 8781 8782 8783# _LT_CHECK_SHELL_FEATURES 8784# ------------------------ 8785# Find out whether the shell is Bourne or XSI compatible, 8786# or has some other useful features. 8787m4_defun([_LT_CHECK_SHELL_FEATURES], 8788[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8789# Try some XSI features 8790xsi_shell=no 8791( _lt_dummy="a/b/c" 8792 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 8793 = c,a/b,b/c, \ 8794 && eval 'test $(( 1 + 1 )) -eq 2 \ 8795 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8796 && xsi_shell=yes 8797AC_MSG_RESULT([$xsi_shell]) 8798_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8799 8800AC_MSG_CHECKING([whether the shell understands "+="]) 8801lt_shell_append=no 8802( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8803 >/dev/null 2>&1 \ 8804 && lt_shell_append=yes 8805AC_MSG_RESULT([$lt_shell_append]) 8806_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8807 8808if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8809 lt_unset=unset 8810else 8811 lt_unset=false 8812fi 8813_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8814 8815# test EBCDIC or ASCII 8816case `echo X|tr X '\101'` in 8817 A) # ASCII based system 8818 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8819 lt_SP2NL='tr \040 \012' 8820 lt_NL2SP='tr \015\012 \040\040' 8821 ;; 8822 *) # EBCDIC based system 8823 lt_SP2NL='tr \100 \n' 8824 lt_NL2SP='tr \r\n \100\100' 8825 ;; 8826esac 8827_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8828_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8829])# _LT_CHECK_SHELL_FEATURES 8830 8831 8832# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 8833# ------------------------------------------------------ 8834# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 8835# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 8836m4_defun([_LT_PROG_FUNCTION_REPLACE], 8837[dnl { 8838sed -e '/^$1 ()$/,/^} # $1 /c\ 8839$1 ()\ 8840{\ 8841m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 8842} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 8843 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8844 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8845test 0 -eq $? || _lt_function_replace_fail=: 8846]) 8847 8848 8849# _LT_PROG_REPLACE_SHELLFNS 8850# ------------------------- 8851# Replace existing portable implementations of several shell functions with 8852# equivalent extended shell implementations where those features are available.. 8853m4_defun([_LT_PROG_REPLACE_SHELLFNS], 8854[if test x"$xsi_shell" = xyes; then 8855 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 8856 case ${1} in 8857 */*) func_dirname_result="${1%/*}${2}" ;; 8858 * ) func_dirname_result="${3}" ;; 8859 esac]) 8860 8861 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 8862 func_basename_result="${1##*/}"]) 8863 8864 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 8865 case ${1} in 8866 */*) func_dirname_result="${1%/*}${2}" ;; 8867 * ) func_dirname_result="${3}" ;; 8868 esac 8869 func_basename_result="${1##*/}"]) 8870 8871 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 8872 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 8873 # positional parameters, so assign one to ordinary parameter first. 8874 func_stripname_result=${3} 8875 func_stripname_result=${func_stripname_result#"${1}"} 8876 func_stripname_result=${func_stripname_result%"${2}"}]) 8877 8878 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 8879 func_split_long_opt_name=${1%%=*} 8880 func_split_long_opt_arg=${1#*=}]) 8881 8882 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 8883 func_split_short_opt_arg=${1#??} 8884 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 8885 8886 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 8887 case ${1} in 8888 *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 8889 *) func_lo2o_result=${1} ;; 8890 esac]) 8891 8892 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 8893 8894 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 8895 8896 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 8897fi 8898 8899if test x"$lt_shell_append" = xyes; then 8900 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 8901 8902 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 8903 func_quote_for_eval "${2}" 8904dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 8905 eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 8906 8907 # Save a `func_append' function call where possible by direct use of '+=' 8908 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 8909 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8910 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8911 test 0 -eq $? || _lt_function_replace_fail=: 8912else 8913 # Save a `func_append' function call even when '+=' is not available 8914 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 8915 && mv -f "$cfgfile.tmp" "$cfgfile" \ 8916 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8917 test 0 -eq $? || _lt_function_replace_fail=: 8918fi 8919 8920if test x"$_lt_function_replace_fail" = x":"; then 8921 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 8922fi 8923]) 8924 8925# _LT_PATH_CONVERSION_FUNCTIONS 8926# ----------------------------- 8927# Determine which file name conversion functions should be used by 8928# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8929# for certain cross-compile configurations and native mingw. 8930m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8931[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8932AC_REQUIRE([AC_CANONICAL_BUILD])dnl 8933AC_MSG_CHECKING([how to convert $build file names to $host format]) 8934AC_CACHE_VAL(lt_cv_to_host_file_cmd, 8935[case $host in 8936 *-*-mingw* ) 8937 case $build in 8938 *-*-mingw* ) # actually msys 8939 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8940 ;; 8941 *-*-cygwin* ) 8942 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8943 ;; 8944 * ) # otherwise, assume *nix 8945 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8946 ;; 8947 esac 8948 ;; 8949 *-*-cygwin* ) 8950 case $build in 8951 *-*-mingw* ) # actually msys 8952 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8953 ;; 8954 *-*-cygwin* ) 8955 lt_cv_to_host_file_cmd=func_convert_file_noop 8956 ;; 8957 * ) # otherwise, assume *nix 8958 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8959 ;; 8960 esac 8961 ;; 8962 * ) # unhandled hosts (and "normal" native builds) 8963 lt_cv_to_host_file_cmd=func_convert_file_noop 8964 ;; 8965esac 8966]) 8967to_host_file_cmd=$lt_cv_to_host_file_cmd 8968AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8969_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8970 [0], [convert $build file names to $host format])dnl 8971 8972AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8973AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8974[#assume ordinary cross tools, or native build. 8975lt_cv_to_tool_file_cmd=func_convert_file_noop 8976case $host in 8977 *-*-mingw* ) 8978 case $build in 8979 *-*-mingw* ) # actually msys 8980 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8981 ;; 8982 esac 8983 ;; 8984esac 8985]) 8986to_tool_file_cmd=$lt_cv_to_tool_file_cmd 8987AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8988_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8989 [0], [convert $build files to toolchain format])dnl 8990])# _LT_PATH_CONVERSION_FUNCTIONS 8991 8992# Helper functions for option handling. -*- Autoconf -*- 8993# 8994# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 8995# Inc. 8996# Written by Gary V. Vaughan, 2004 8997# 8998# This file is free software; the Free Software Foundation gives 8999# unlimited permission to copy and/or distribute it, with or without 9000# modifications, as long as this notice is preserved. 9001 9002# serial 7 ltoptions.m4 9003 9004# This is to help aclocal find these macros, as it can't see m4_define. 9005AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9006 9007 9008# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9009# ------------------------------------------ 9010m4_define([_LT_MANGLE_OPTION], 9011[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9012 9013 9014# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9015# --------------------------------------- 9016# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9017# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9018# saved as a flag. 9019m4_define([_LT_SET_OPTION], 9020[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9021m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9022 _LT_MANGLE_DEFUN([$1], [$2]), 9023 [m4_warning([Unknown $1 option `$2'])])[]dnl 9024]) 9025 9026 9027# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9028# ------------------------------------------------------------ 9029# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9030m4_define([_LT_IF_OPTION], 9031[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9032 9033 9034# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9035# ------------------------------------------------------- 9036# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9037# are set. 9038m4_define([_LT_UNLESS_OPTIONS], 9039[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9040 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9041 [m4_define([$0_found])])])[]dnl 9042m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9043])[]dnl 9044]) 9045 9046 9047# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9048# ---------------------------------------- 9049# OPTION-LIST is a space-separated list of Libtool options associated 9050# with MACRO-NAME. If any OPTION has a matching handler declared with 9051# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9052# the unknown option and exit. 9053m4_defun([_LT_SET_OPTIONS], 9054[# Set options 9055m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9056 [_LT_SET_OPTION([$1], _LT_Option)]) 9057 9058m4_if([$1],[LT_INIT],[ 9059 dnl 9060 dnl Simply set some default values (i.e off) if boolean options were not 9061 dnl specified: 9062 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9063 ]) 9064 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9065 ]) 9066 dnl 9067 dnl If no reference was made to various pairs of opposing options, then 9068 dnl we run the default mode handler for the pair. For example, if neither 9069 dnl `shared' nor `disable-shared' was passed, we enable building of shared 9070 dnl archives by default: 9071 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9072 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9073 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9074 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9075 [_LT_ENABLE_FAST_INSTALL]) 9076 ]) 9077])# _LT_SET_OPTIONS 9078 9079 9080 9081# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9082# ----------------------------------------- 9083m4_define([_LT_MANGLE_DEFUN], 9084[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9085 9086 9087# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9088# ----------------------------------------------- 9089m4_define([LT_OPTION_DEFINE], 9090[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9091])# LT_OPTION_DEFINE 9092 9093 9094# dlopen 9095# ------ 9096LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9097]) 9098 9099AU_DEFUN([AC_LIBTOOL_DLOPEN], 9100[_LT_SET_OPTION([LT_INIT], [dlopen]) 9101AC_DIAGNOSE([obsolete], 9102[$0: Remove this warning and the call to _LT_SET_OPTION when you 9103put the `dlopen' option into LT_INIT's first parameter.]) 9104]) 9105 9106dnl aclocal-1.4 backwards compatibility: 9107dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9108 9109 9110# win32-dll 9111# --------- 9112# Declare package support for building win32 dll's. 9113LT_OPTION_DEFINE([LT_INIT], [win32-dll], 9114[enable_win32_dll=yes 9115 9116case $host in 9117*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9118 AC_CHECK_TOOL(AS, as, false) 9119 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9120 AC_CHECK_TOOL(OBJDUMP, objdump, false) 9121 ;; 9122esac 9123 9124test -z "$AS" && AS=as 9125_LT_DECL([], [AS], [1], [Assembler program])dnl 9126 9127test -z "$DLLTOOL" && DLLTOOL=dlltool 9128_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9129 9130test -z "$OBJDUMP" && OBJDUMP=objdump 9131_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9132])# win32-dll 9133 9134AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9135[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9136_LT_SET_OPTION([LT_INIT], [win32-dll]) 9137AC_DIAGNOSE([obsolete], 9138[$0: Remove this warning and the call to _LT_SET_OPTION when you 9139put the `win32-dll' option into LT_INIT's first parameter.]) 9140]) 9141 9142dnl aclocal-1.4 backwards compatibility: 9143dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9144 9145 9146# _LT_ENABLE_SHARED([DEFAULT]) 9147# ---------------------------- 9148# implement the --enable-shared flag, and supports the `shared' and 9149# `disable-shared' LT_INIT options. 9150# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9151m4_define([_LT_ENABLE_SHARED], 9152[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9153AC_ARG_ENABLE([shared], 9154 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9155 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9156 [p=${PACKAGE-default} 9157 case $enableval in 9158 yes) enable_shared=yes ;; 9159 no) enable_shared=no ;; 9160 *) 9161 enable_shared=no 9162 # Look at the argument we got. We use all the common list separators. 9163 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9164 for pkg in $enableval; do 9165 IFS="$lt_save_ifs" 9166 if test "X$pkg" = "X$p"; then 9167 enable_shared=yes 9168 fi 9169 done 9170 IFS="$lt_save_ifs" 9171 ;; 9172 esac], 9173 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9174 9175 _LT_DECL([build_libtool_libs], [enable_shared], [0], 9176 [Whether or not to build shared libraries]) 9177])# _LT_ENABLE_SHARED 9178 9179LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9180LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9181 9182# Old names: 9183AC_DEFUN([AC_ENABLE_SHARED], 9184[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9185]) 9186 9187AC_DEFUN([AC_DISABLE_SHARED], 9188[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9189]) 9190 9191AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9192AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9193 9194dnl aclocal-1.4 backwards compatibility: 9195dnl AC_DEFUN([AM_ENABLE_SHARED], []) 9196dnl AC_DEFUN([AM_DISABLE_SHARED], []) 9197 9198 9199 9200# _LT_ENABLE_STATIC([DEFAULT]) 9201# ---------------------------- 9202# implement the --enable-static flag, and support the `static' and 9203# `disable-static' LT_INIT options. 9204# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9205m4_define([_LT_ENABLE_STATIC], 9206[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9207AC_ARG_ENABLE([static], 9208 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9209 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9210 [p=${PACKAGE-default} 9211 case $enableval in 9212 yes) enable_static=yes ;; 9213 no) enable_static=no ;; 9214 *) 9215 enable_static=no 9216 # Look at the argument we got. We use all the common list separators. 9217 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9218 for pkg in $enableval; do 9219 IFS="$lt_save_ifs" 9220 if test "X$pkg" = "X$p"; then 9221 enable_static=yes 9222 fi 9223 done 9224 IFS="$lt_save_ifs" 9225 ;; 9226 esac], 9227 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9228 9229 _LT_DECL([build_old_libs], [enable_static], [0], 9230 [Whether or not to build static libraries]) 9231])# _LT_ENABLE_STATIC 9232 9233LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9234LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9235 9236# Old names: 9237AC_DEFUN([AC_ENABLE_STATIC], 9238[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9239]) 9240 9241AC_DEFUN([AC_DISABLE_STATIC], 9242[_LT_SET_OPTION([LT_INIT], [disable-static]) 9243]) 9244 9245AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9246AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9247 9248dnl aclocal-1.4 backwards compatibility: 9249dnl AC_DEFUN([AM_ENABLE_STATIC], []) 9250dnl AC_DEFUN([AM_DISABLE_STATIC], []) 9251 9252 9253 9254# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9255# ---------------------------------- 9256# implement the --enable-fast-install flag, and support the `fast-install' 9257# and `disable-fast-install' LT_INIT options. 9258# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9259m4_define([_LT_ENABLE_FAST_INSTALL], 9260[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9261AC_ARG_ENABLE([fast-install], 9262 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9263 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9264 [p=${PACKAGE-default} 9265 case $enableval in 9266 yes) enable_fast_install=yes ;; 9267 no) enable_fast_install=no ;; 9268 *) 9269 enable_fast_install=no 9270 # Look at the argument we got. We use all the common list separators. 9271 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9272 for pkg in $enableval; do 9273 IFS="$lt_save_ifs" 9274 if test "X$pkg" = "X$p"; then 9275 enable_fast_install=yes 9276 fi 9277 done 9278 IFS="$lt_save_ifs" 9279 ;; 9280 esac], 9281 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9282 9283_LT_DECL([fast_install], [enable_fast_install], [0], 9284 [Whether or not to optimize for fast installation])dnl 9285])# _LT_ENABLE_FAST_INSTALL 9286 9287LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9288LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9289 9290# Old names: 9291AU_DEFUN([AC_ENABLE_FAST_INSTALL], 9292[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9293AC_DIAGNOSE([obsolete], 9294[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9295the `fast-install' option into LT_INIT's first parameter.]) 9296]) 9297 9298AU_DEFUN([AC_DISABLE_FAST_INSTALL], 9299[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9300AC_DIAGNOSE([obsolete], 9301[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9302the `disable-fast-install' option into LT_INIT's first parameter.]) 9303]) 9304 9305dnl aclocal-1.4 backwards compatibility: 9306dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9307dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9308 9309 9310# _LT_WITH_PIC([MODE]) 9311# -------------------- 9312# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9313# LT_INIT options. 9314# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9315m4_define([_LT_WITH_PIC], 9316[AC_ARG_WITH([pic], 9317 [AS_HELP_STRING([--with-pic], 9318 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9319 [pic_mode="$withval"], 9320 [pic_mode=default]) 9321 9322test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9323 9324_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9325])# _LT_WITH_PIC 9326 9327LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9328LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9329 9330# Old name: 9331AU_DEFUN([AC_LIBTOOL_PICMODE], 9332[_LT_SET_OPTION([LT_INIT], [pic-only]) 9333AC_DIAGNOSE([obsolete], 9334[$0: Remove this warning and the call to _LT_SET_OPTION when you 9335put the `pic-only' option into LT_INIT's first parameter.]) 9336]) 9337 9338dnl aclocal-1.4 backwards compatibility: 9339dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9340 9341 9342m4_define([_LTDL_MODE], []) 9343LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9344 [m4_define([_LTDL_MODE], [nonrecursive])]) 9345LT_OPTION_DEFINE([LTDL_INIT], [recursive], 9346 [m4_define([_LTDL_MODE], [recursive])]) 9347LT_OPTION_DEFINE([LTDL_INIT], [subproject], 9348 [m4_define([_LTDL_MODE], [subproject])]) 9349 9350m4_define([_LTDL_TYPE], []) 9351LT_OPTION_DEFINE([LTDL_INIT], [installable], 9352 [m4_define([_LTDL_TYPE], [installable])]) 9353LT_OPTION_DEFINE([LTDL_INIT], [convenience], 9354 [m4_define([_LTDL_TYPE], [convenience])]) 9355 9356# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9357# 9358# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9359# Written by Gary V. Vaughan, 2004 9360# 9361# This file is free software; the Free Software Foundation gives 9362# unlimited permission to copy and/or distribute it, with or without 9363# modifications, as long as this notice is preserved. 9364 9365# serial 6 ltsugar.m4 9366 9367# This is to help aclocal find these macros, as it can't see m4_define. 9368AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9369 9370 9371# lt_join(SEP, ARG1, [ARG2...]) 9372# ----------------------------- 9373# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9374# associated separator. 9375# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9376# versions in m4sugar had bugs. 9377m4_define([lt_join], 9378[m4_if([$#], [1], [], 9379 [$#], [2], [[$2]], 9380 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9381m4_define([_lt_join], 9382[m4_if([$#$2], [2], [], 9383 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9384 9385 9386# lt_car(LIST) 9387# lt_cdr(LIST) 9388# ------------ 9389# Manipulate m4 lists. 9390# These macros are necessary as long as will still need to support 9391# Autoconf-2.59 which quotes differently. 9392m4_define([lt_car], [[$1]]) 9393m4_define([lt_cdr], 9394[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9395 [$#], 1, [], 9396 [m4_dquote(m4_shift($@))])]) 9397m4_define([lt_unquote], $1) 9398 9399 9400# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9401# ------------------------------------------ 9402# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 9403# Note that neither SEPARATOR nor STRING are expanded; they are appended 9404# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9405# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9406# than defined and empty). 9407# 9408# This macro is needed until we can rely on Autoconf 2.62, since earlier 9409# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9410m4_define([lt_append], 9411[m4_define([$1], 9412 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9413 9414 9415 9416# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9417# ---------------------------------------------------------- 9418# Produce a SEP delimited list of all paired combinations of elements of 9419# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9420# has the form PREFIXmINFIXSUFFIXn. 9421# Needed until we can rely on m4_combine added in Autoconf 2.62. 9422m4_define([lt_combine], 9423[m4_if(m4_eval([$# > 3]), [1], 9424 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9425[[m4_foreach([_Lt_prefix], [$2], 9426 [m4_foreach([_Lt_suffix], 9427 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9428 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9429 9430 9431# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9432# ----------------------------------------------------------------------- 9433# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9434# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9435m4_define([lt_if_append_uniq], 9436[m4_ifdef([$1], 9437 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9438 [lt_append([$1], [$2], [$3])$4], 9439 [$5])], 9440 [lt_append([$1], [$2], [$3])$4])]) 9441 9442 9443# lt_dict_add(DICT, KEY, VALUE) 9444# ----------------------------- 9445m4_define([lt_dict_add], 9446[m4_define([$1($2)], [$3])]) 9447 9448 9449# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9450# -------------------------------------------- 9451m4_define([lt_dict_add_subkey], 9452[m4_define([$1($2:$3)], [$4])]) 9453 9454 9455# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9456# ---------------------------------- 9457m4_define([lt_dict_fetch], 9458[m4_ifval([$3], 9459 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9460 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9461 9462 9463# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9464# ----------------------------------------------------------------- 9465m4_define([lt_if_dict_fetch], 9466[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9467 [$5], 9468 [$6])]) 9469 9470 9471# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9472# -------------------------------------------------------------- 9473m4_define([lt_dict_filter], 9474[m4_if([$5], [], [], 9475 [lt_join(m4_quote(m4_default([$4], [[, ]])), 9476 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9477 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9478]) 9479 9480# ltversion.m4 -- version numbers -*- Autoconf -*- 9481# 9482# Copyright (C) 2004 Free Software Foundation, Inc. 9483# Written by Scott James Remnant, 2004 9484# 9485# This file is free software; the Free Software Foundation gives 9486# unlimited permission to copy and/or distribute it, with or without 9487# modifications, as long as this notice is preserved. 9488 9489# @configure_input@ 9490 9491# serial 3293 ltversion.m4 9492# This file is part of GNU Libtool 9493 9494m4_define([LT_PACKAGE_VERSION], [2.4]) 9495m4_define([LT_PACKAGE_REVISION], [1.3293]) 9496 9497AC_DEFUN([LTVERSION_VERSION], 9498[macro_version='2.4' 9499macro_revision='1.3293' 9500_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9501_LT_DECL(, macro_revision, 0) 9502]) 9503 9504# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9505# 9506# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 9507# Written by Scott James Remnant, 2004. 9508# 9509# This file is free software; the Free Software Foundation gives 9510# unlimited permission to copy and/or distribute it, with or without 9511# modifications, as long as this notice is preserved. 9512 9513# serial 5 lt~obsolete.m4 9514 9515# These exist entirely to fool aclocal when bootstrapping libtool. 9516# 9517# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 9518# which have later been changed to m4_define as they aren't part of the 9519# exported API, or moved to Autoconf or Automake where they belong. 9520# 9521# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9522# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9523# using a macro with the same name in our local m4/libtool.m4 it'll 9524# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9525# and doesn't know about Autoconf macros at all.) 9526# 9527# So we provide this file, which has a silly filename so it's always 9528# included after everything else. This provides aclocal with the 9529# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9530# because those macros already exist, or will be overwritten later. 9531# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9532# 9533# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9534# Yes, that means every name once taken will need to remain here until 9535# we give up compatibility with versions before 1.7, at which point 9536# we need to keep only those names which we still refer to. 9537 9538# This is to help aclocal find these macros, as it can't see m4_define. 9539AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9540 9541m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9542m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9543m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9544m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9545m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9546m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9547m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9548m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9549m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9550m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9551m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9552m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9553m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9554m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9555m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9556m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9557m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9558m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9559m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9560m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9561m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9562m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9563m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9564m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9565m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9566m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9567m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9568m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9569m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9570m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9571m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9572m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9573m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9574m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9575m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9576m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9577m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9578m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9579m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9580m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9581m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9582m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9583m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9584m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9585m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9586m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9587m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9588m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9589m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9590m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9591m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9592m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9593m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9594m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9595m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9596m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9597m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9598m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9599m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9600m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9601m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9602 9603dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9604dnl 9605dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9606dnl 9607dnl Permission is hereby granted, free of charge, to any person obtaining a 9608dnl copy of this software and associated documentation files (the "Software"), 9609dnl to deal in the Software without restriction, including without limitation 9610dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9611dnl and/or sell copies of the Software, and to permit persons to whom the 9612dnl Software is furnished to do so, subject to the following conditions: 9613dnl 9614dnl The above copyright notice and this permission notice (including the next 9615dnl paragraph) shall be included in all copies or substantial portions of the 9616dnl Software. 9617dnl 9618dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9619dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9620dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9621dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9622dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9623dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9624dnl DEALINGS IN THE SOFTWARE. 9625 9626# XORG_MACROS_VERSION(required-version) 9627# ------------------------------------- 9628# Minimum version: 1.1.0 9629# 9630# If you're using a macro added in Version 1.1 or newer, include this in 9631# your configure.ac with the minimum required version, such as: 9632# XORG_MACROS_VERSION(1.1) 9633# 9634# To ensure that this macro is defined, also add: 9635# m4_ifndef([XORG_MACROS_VERSION], 9636# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9637# 9638# 9639# See the "minimum version" comment for each macro you use to see what 9640# version you require. 9641m4_defun([XORG_MACROS_VERSION],[ 9642m4_define([vers_have], [1.16.2]) 9643m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9644m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9645m4_if(m4_cmp(maj_have, maj_needed), 0,, 9646 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9647m4_if(m4_version_compare(vers_have, [$1]), -1, 9648 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9649m4_undefine([vers_have]) 9650m4_undefine([maj_have]) 9651m4_undefine([maj_needed]) 9652]) # XORG_MACROS_VERSION 9653 9654# XORG_PROG_RAWCPP() 9655# ------------------ 9656# Minimum version: 1.0.0 9657# 9658# Find cpp program and necessary flags for use in pre-processing text files 9659# such as man pages and config files 9660AC_DEFUN([XORG_PROG_RAWCPP],[ 9661AC_REQUIRE([AC_PROG_CPP]) 9662AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9663 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9664 9665# Check for flag to avoid builtin definitions - assumes unix is predefined, 9666# which is not the best choice for supporting other OS'es, but covers most 9667# of the ones we need for now. 9668AC_MSG_CHECKING([if $RAWCPP requires -undef]) 9669AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9670if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9671 AC_MSG_RESULT([no]) 9672else 9673 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9674 RAWCPPFLAGS=-undef 9675 AC_MSG_RESULT([yes]) 9676 # under Cygwin unix is still defined even with -undef 9677 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9678 RAWCPPFLAGS="-undef -ansi" 9679 AC_MSG_RESULT([yes, with -ansi]) 9680 else 9681 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9682 fi 9683fi 9684rm -f conftest.$ac_ext 9685 9686AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9687AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9688if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9689 AC_MSG_RESULT([no]) 9690else 9691 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9692 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9693 AC_MSG_RESULT([yes]) 9694 else 9695 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9696 fi 9697fi 9698rm -f conftest.$ac_ext 9699AC_SUBST(RAWCPPFLAGS) 9700]) # XORG_PROG_RAWCPP 9701 9702# XORG_MANPAGE_SECTIONS() 9703# ----------------------- 9704# Minimum version: 1.0.0 9705# 9706# Determine which sections man pages go in for the different man page types 9707# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9708# Not sure if there's any better way than just hardcoding by OS name. 9709# Override default settings by setting environment variables 9710# Added MAN_SUBSTS in version 1.8 9711# Added AC_PROG_SED in version 1.8 9712 9713AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9714AC_REQUIRE([AC_CANONICAL_HOST]) 9715AC_REQUIRE([AC_PROG_SED]) 9716 9717if test x$APP_MAN_SUFFIX = x ; then 9718 APP_MAN_SUFFIX=1 9719fi 9720if test x$APP_MAN_DIR = x ; then 9721 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9722fi 9723 9724if test x$LIB_MAN_SUFFIX = x ; then 9725 LIB_MAN_SUFFIX=3 9726fi 9727if test x$LIB_MAN_DIR = x ; then 9728 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9729fi 9730 9731if test x$FILE_MAN_SUFFIX = x ; then 9732 case $host_os in 9733 solaris*) FILE_MAN_SUFFIX=4 ;; 9734 *) FILE_MAN_SUFFIX=5 ;; 9735 esac 9736fi 9737if test x$FILE_MAN_DIR = x ; then 9738 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9739fi 9740 9741if test x$MISC_MAN_SUFFIX = x ; then 9742 case $host_os in 9743 solaris*) MISC_MAN_SUFFIX=5 ;; 9744 *) MISC_MAN_SUFFIX=7 ;; 9745 esac 9746fi 9747if test x$MISC_MAN_DIR = x ; then 9748 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9749fi 9750 9751if test x$DRIVER_MAN_SUFFIX = x ; then 9752 case $host_os in 9753 solaris*) DRIVER_MAN_SUFFIX=7 ;; 9754 *) DRIVER_MAN_SUFFIX=4 ;; 9755 esac 9756fi 9757if test x$DRIVER_MAN_DIR = x ; then 9758 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9759fi 9760 9761if test x$ADMIN_MAN_SUFFIX = x ; then 9762 case $host_os in 9763 solaris*) ADMIN_MAN_SUFFIX=1m ;; 9764 *) ADMIN_MAN_SUFFIX=8 ;; 9765 esac 9766fi 9767if test x$ADMIN_MAN_DIR = x ; then 9768 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9769fi 9770 9771 9772AC_SUBST([APP_MAN_SUFFIX]) 9773AC_SUBST([LIB_MAN_SUFFIX]) 9774AC_SUBST([FILE_MAN_SUFFIX]) 9775AC_SUBST([MISC_MAN_SUFFIX]) 9776AC_SUBST([DRIVER_MAN_SUFFIX]) 9777AC_SUBST([ADMIN_MAN_SUFFIX]) 9778AC_SUBST([APP_MAN_DIR]) 9779AC_SUBST([LIB_MAN_DIR]) 9780AC_SUBST([FILE_MAN_DIR]) 9781AC_SUBST([MISC_MAN_DIR]) 9782AC_SUBST([DRIVER_MAN_DIR]) 9783AC_SUBST([ADMIN_MAN_DIR]) 9784 9785XORG_MAN_PAGE="X Version 11" 9786AC_SUBST([XORG_MAN_PAGE]) 9787MAN_SUBSTS="\ 9788 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9789 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9790 -e 's|__xservername__|Xorg|g' \ 9791 -e 's|__xconfigfile__|xorg.conf|g' \ 9792 -e 's|__projectroot__|\$(prefix)|g' \ 9793 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9794 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9795 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9796 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9797 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9798 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9799 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9800AC_SUBST([MAN_SUBSTS]) 9801 9802]) # XORG_MANPAGE_SECTIONS 9803 9804# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9805# ------------------------ 9806# Minimum version: 1.7.0 9807# 9808# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9809# provided by xorg-sgml-doctools, if installed. 9810AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9811AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9812XORG_SGML_PATH= 9813PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9814 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9815 [m4_ifval([$1],[:], 9816 [if test x"$cross_compiling" != x"yes" ; then 9817 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9818 [XORG_SGML_PATH=$prefix/share/sgml]) 9819 fi]) 9820 ]) 9821 9822# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9823# the path and the name of the doc stylesheet 9824if test "x$XORG_SGML_PATH" != "x" ; then 9825 AC_MSG_RESULT([$XORG_SGML_PATH]) 9826 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9827 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9828else 9829 AC_MSG_RESULT([no]) 9830fi 9831 9832AC_SUBST(XORG_SGML_PATH) 9833AC_SUBST(STYLESHEET_SRCDIR) 9834AC_SUBST(XSL_STYLESHEET) 9835AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9836]) # XORG_CHECK_SGML_DOCTOOLS 9837 9838# XORG_CHECK_LINUXDOC 9839# ------------------- 9840# Minimum version: 1.0.0 9841# 9842# Defines the variable MAKE_TEXT if the necessary tools and 9843# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9844# Whether or not the necessary tools and files are found can be checked 9845# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9846AC_DEFUN([XORG_CHECK_LINUXDOC],[ 9847AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9848AC_REQUIRE([XORG_WITH_PS2PDF]) 9849 9850AC_PATH_PROG(LINUXDOC, linuxdoc) 9851 9852AC_MSG_CHECKING([whether to build documentation]) 9853 9854if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9855 BUILDDOC=yes 9856else 9857 BUILDDOC=no 9858fi 9859 9860AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9861 9862AC_MSG_RESULT([$BUILDDOC]) 9863 9864AC_MSG_CHECKING([whether to build pdf documentation]) 9865 9866if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9867 BUILDPDFDOC=yes 9868else 9869 BUILDPDFDOC=no 9870fi 9871 9872AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9873 9874AC_MSG_RESULT([$BUILDPDFDOC]) 9875 9876MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9877MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9878MAKE_PDF="$PS2PDF" 9879MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9880 9881AC_SUBST(MAKE_TEXT) 9882AC_SUBST(MAKE_PS) 9883AC_SUBST(MAKE_PDF) 9884AC_SUBST(MAKE_HTML) 9885]) # XORG_CHECK_LINUXDOC 9886 9887# XORG_CHECK_DOCBOOK 9888# ------------------- 9889# Minimum version: 1.0.0 9890# 9891# Checks for the ability to build output formats from SGML DocBook source. 9892# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9893# indicates whether the necessary tools and files are found and, if set, 9894# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9895AC_DEFUN([XORG_CHECK_DOCBOOK],[ 9896AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9897 9898BUILDTXTDOC=no 9899BUILDPDFDOC=no 9900BUILDPSDOC=no 9901BUILDHTMLDOC=no 9902 9903AC_PATH_PROG(DOCBOOKPS, docbook2ps) 9904AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9905AC_PATH_PROG(DOCBOOKHTML, docbook2html) 9906AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9907 9908AC_MSG_CHECKING([whether to build text documentation]) 9909if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9910 test x$BUILD_TXTDOC != xno; then 9911 BUILDTXTDOC=yes 9912fi 9913AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9914AC_MSG_RESULT([$BUILDTXTDOC]) 9915 9916AC_MSG_CHECKING([whether to build PDF documentation]) 9917if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9918 test x$BUILD_PDFDOC != xno; then 9919 BUILDPDFDOC=yes 9920fi 9921AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9922AC_MSG_RESULT([$BUILDPDFDOC]) 9923 9924AC_MSG_CHECKING([whether to build PostScript documentation]) 9925if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9926 test x$BUILD_PSDOC != xno; then 9927 BUILDPSDOC=yes 9928fi 9929AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9930AC_MSG_RESULT([$BUILDPSDOC]) 9931 9932AC_MSG_CHECKING([whether to build HTML documentation]) 9933if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9934 test x$BUILD_HTMLDOC != xno; then 9935 BUILDHTMLDOC=yes 9936fi 9937AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9938AC_MSG_RESULT([$BUILDHTMLDOC]) 9939 9940MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9941MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9942MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9943MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9944 9945AC_SUBST(MAKE_TEXT) 9946AC_SUBST(MAKE_PS) 9947AC_SUBST(MAKE_PDF) 9948AC_SUBST(MAKE_HTML) 9949]) # XORG_CHECK_DOCBOOK 9950 9951# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9952# ---------------- 9953# Minimum version: 1.5.0 9954# Minimum version for optional DEFAULT argument: 1.11.0 9955# 9956# Documentation tools are not always available on all platforms and sometimes 9957# not at the appropriate level. This macro enables a module to test for the 9958# presence of the tool and obtain it's path in separate variables. Coupled with 9959# the --with-xmlto option, it allows maximum flexibilty in making decisions 9960# as whether or not to use the xmlto package. When DEFAULT is not specified, 9961# --with-xmlto assumes 'auto'. 9962# 9963# Interface to module: 9964# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9965# XMLTO: returns the path of the xmlto program found 9966# returns the path set by the user in the environment 9967# --with-xmlto: 'yes' user instructs the module to use xmlto 9968# 'no' user instructs the module not to use xmlto 9969# 9970# Added in version 1.10.0 9971# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9972# xmlto for text output requires either lynx, links, or w3m browsers 9973# 9974# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9975# 9976AC_DEFUN([XORG_WITH_XMLTO],[ 9977AC_ARG_VAR([XMLTO], [Path to xmlto command]) 9978m4_define([_defopt], m4_default([$2], [auto])) 9979AC_ARG_WITH(xmlto, 9980 AS_HELP_STRING([--with-xmlto], 9981 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9982 [use_xmlto=$withval], [use_xmlto=]_defopt) 9983m4_undefine([_defopt]) 9984 9985if test "x$use_xmlto" = x"auto"; then 9986 AC_PATH_PROG([XMLTO], [xmlto]) 9987 if test "x$XMLTO" = "x"; then 9988 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9989 have_xmlto=no 9990 else 9991 have_xmlto=yes 9992 fi 9993elif test "x$use_xmlto" = x"yes" ; then 9994 AC_PATH_PROG([XMLTO], [xmlto]) 9995 if test "x$XMLTO" = "x"; then 9996 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9997 fi 9998 have_xmlto=yes 9999elif test "x$use_xmlto" = x"no" ; then 10000 if test "x$XMLTO" != "x"; then 10001 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10002 fi 10003 have_xmlto=no 10004else 10005 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10006fi 10007 10008# Test for a minimum version of xmlto, if provided. 10009m4_ifval([$1], 10010[if test "$have_xmlto" = yes; then 10011 # scrape the xmlto version 10012 AC_MSG_CHECKING([the xmlto version]) 10013 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10014 AC_MSG_RESULT([$xmlto_version]) 10015 AS_VERSION_COMPARE([$xmlto_version], [$1], 10016 [if test "x$use_xmlto" = xauto; then 10017 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10018 have_xmlto=no 10019 else 10020 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10021 fi]) 10022fi]) 10023 10024# Test for the ability of xmlto to generate a text target 10025have_xmlto_text=no 10026cat > conftest.xml << "EOF" 10027EOF 10028AS_IF([test "$have_xmlto" = yes], 10029 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10030 [have_xmlto_text=yes], 10031 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10032rm -f conftest.xml 10033AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10034AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10035]) # XORG_WITH_XMLTO 10036 10037# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10038# -------------------------------------------- 10039# Minimum version: 1.12.0 10040# Minimum version for optional DEFAULT argument: 1.12.0 10041# 10042# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10043# XML-based language used for the transformation of XML documents. 10044# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10045# It is used under the cover by xmlto to generate html files from DocBook/XML. 10046# The XSLT processor is often used as a standalone tool for transformations. 10047# It should not be assumed that this tool is used only to work with documnetation. 10048# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10049# 10050# Interface to module: 10051# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10052# XSLTPROC: returns the path of the xsltproc program found 10053# returns the path set by the user in the environment 10054# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10055# 'no' user instructs the module not to use xsltproc 10056# have_xsltproc: returns yes if xsltproc found in PATH or no 10057# 10058# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10059# 10060AC_DEFUN([XORG_WITH_XSLTPROC],[ 10061AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10062# Preserves the interface, should it be implemented later 10063m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10064m4_define([_defopt], m4_default([$2], [auto])) 10065AC_ARG_WITH(xsltproc, 10066 AS_HELP_STRING([--with-xsltproc], 10067 [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10068 [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10069m4_undefine([_defopt]) 10070 10071if test "x$use_xsltproc" = x"auto"; then 10072 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10073 if test "x$XSLTPROC" = "x"; then 10074 AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10075 have_xsltproc=no 10076 else 10077 have_xsltproc=yes 10078 fi 10079elif test "x$use_xsltproc" = x"yes" ; then 10080 AC_PATH_PROG([XSLTPROC], [xsltproc]) 10081 if test "x$XSLTPROC" = "x"; then 10082 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10083 fi 10084 have_xsltproc=yes 10085elif test "x$use_xsltproc" = x"no" ; then 10086 if test "x$XSLTPROC" != "x"; then 10087 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10088 fi 10089 have_xsltproc=no 10090else 10091 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10092fi 10093 10094AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10095]) # XORG_WITH_XSLTPROC 10096 10097# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10098# ---------------------------------------- 10099# Minimum version: 1.15.0 10100# 10101# PERL (Practical Extraction and Report Language) is a language optimized for 10102# scanning arbitrary text files, extracting information from those text files, 10103# and printing reports based on that information. 10104# 10105# When DEFAULT is not specified, --with-perl assumes 'auto'. 10106# 10107# Interface to module: 10108# HAVE_PERL: used in makefiles to conditionally scan text files 10109# PERL: returns the path of the perl program found 10110# returns the path set by the user in the environment 10111# --with-perl: 'yes' user instructs the module to use perl 10112# 'no' user instructs the module not to use perl 10113# have_perl: returns yes if perl found in PATH or no 10114# 10115# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10116# 10117AC_DEFUN([XORG_WITH_PERL],[ 10118AC_ARG_VAR([PERL], [Path to perl command]) 10119# Preserves the interface, should it be implemented later 10120m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10121m4_define([_defopt], m4_default([$2], [auto])) 10122AC_ARG_WITH(perl, 10123 AS_HELP_STRING([--with-perl], 10124 [Use perl for extracting information from files (default: ]_defopt[)]), 10125 [use_perl=$withval], [use_perl=]_defopt) 10126m4_undefine([_defopt]) 10127 10128if test "x$use_perl" = x"auto"; then 10129 AC_PATH_PROG([PERL], [perl]) 10130 if test "x$PERL" = "x"; then 10131 AC_MSG_WARN([perl not found - cannot extract information and report]) 10132 have_perl=no 10133 else 10134 have_perl=yes 10135 fi 10136elif test "x$use_perl" = x"yes" ; then 10137 AC_PATH_PROG([PERL], [perl]) 10138 if test "x$PERL" = "x"; then 10139 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10140 fi 10141 have_perl=yes 10142elif test "x$use_perl" = x"no" ; then 10143 if test "x$PERL" != "x"; then 10144 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10145 fi 10146 have_perl=no 10147else 10148 AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10149fi 10150 10151AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10152]) # XORG_WITH_PERL 10153 10154# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10155# ---------------- 10156# Minimum version: 1.5.0 10157# Minimum version for optional DEFAULT argument: 1.11.0 10158# 10159# Documentation tools are not always available on all platforms and sometimes 10160# not at the appropriate level. This macro enables a module to test for the 10161# presence of the tool and obtain it's path in separate variables. Coupled with 10162# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10163# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10164# --with-asciidoc assumes 'auto'. 10165# 10166# Interface to module: 10167# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10168# ASCIIDOC: returns the path of the asciidoc program found 10169# returns the path set by the user in the environment 10170# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10171# 'no' user instructs the module not to use asciidoc 10172# 10173# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10174# 10175AC_DEFUN([XORG_WITH_ASCIIDOC],[ 10176AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10177m4_define([_defopt], m4_default([$2], [auto])) 10178AC_ARG_WITH(asciidoc, 10179 AS_HELP_STRING([--with-asciidoc], 10180 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10181 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10182m4_undefine([_defopt]) 10183 10184if test "x$use_asciidoc" = x"auto"; then 10185 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10186 if test "x$ASCIIDOC" = "x"; then 10187 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10188 have_asciidoc=no 10189 else 10190 have_asciidoc=yes 10191 fi 10192elif test "x$use_asciidoc" = x"yes" ; then 10193 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10194 if test "x$ASCIIDOC" = "x"; then 10195 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10196 fi 10197 have_asciidoc=yes 10198elif test "x$use_asciidoc" = x"no" ; then 10199 if test "x$ASCIIDOC" != "x"; then 10200 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10201 fi 10202 have_asciidoc=no 10203else 10204 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10205fi 10206m4_ifval([$1], 10207[if test "$have_asciidoc" = yes; then 10208 # scrape the asciidoc version 10209 AC_MSG_CHECKING([the asciidoc version]) 10210 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10211 AC_MSG_RESULT([$asciidoc_version]) 10212 AS_VERSION_COMPARE([$asciidoc_version], [$1], 10213 [if test "x$use_asciidoc" = xauto; then 10214 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10215 have_asciidoc=no 10216 else 10217 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10218 fi]) 10219fi]) 10220AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10221]) # XORG_WITH_ASCIIDOC 10222 10223# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10224# -------------------------------- 10225# Minimum version: 1.5.0 10226# Minimum version for optional DEFAULT argument: 1.11.0 10227# 10228# Documentation tools are not always available on all platforms and sometimes 10229# not at the appropriate level. This macro enables a module to test for the 10230# presence of the tool and obtain it's path in separate variables. Coupled with 10231# the --with-doxygen option, it allows maximum flexibilty in making decisions 10232# as whether or not to use the doxygen package. When DEFAULT is not specified, 10233# --with-doxygen assumes 'auto'. 10234# 10235# Interface to module: 10236# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10237# DOXYGEN: returns the path of the doxygen program found 10238# returns the path set by the user in the environment 10239# --with-doxygen: 'yes' user instructs the module to use doxygen 10240# 'no' user instructs the module not to use doxygen 10241# 10242# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10243# 10244AC_DEFUN([XORG_WITH_DOXYGEN],[ 10245AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10246m4_define([_defopt], m4_default([$2], [auto])) 10247AC_ARG_WITH(doxygen, 10248 AS_HELP_STRING([--with-doxygen], 10249 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10250 [use_doxygen=$withval], [use_doxygen=]_defopt) 10251m4_undefine([_defopt]) 10252 10253if test "x$use_doxygen" = x"auto"; then 10254 AC_PATH_PROG([DOXYGEN], [doxygen]) 10255 if test "x$DOXYGEN" = "x"; then 10256 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10257 have_doxygen=no 10258 else 10259 have_doxygen=yes 10260 fi 10261elif test "x$use_doxygen" = x"yes" ; then 10262 AC_PATH_PROG([DOXYGEN], [doxygen]) 10263 if test "x$DOXYGEN" = "x"; then 10264 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10265 fi 10266 have_doxygen=yes 10267elif test "x$use_doxygen" = x"no" ; then 10268 if test "x$DOXYGEN" != "x"; then 10269 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10270 fi 10271 have_doxygen=no 10272else 10273 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10274fi 10275m4_ifval([$1], 10276[if test "$have_doxygen" = yes; then 10277 # scrape the doxygen version 10278 AC_MSG_CHECKING([the doxygen version]) 10279 doxygen_version=`$DOXYGEN --version 2>/dev/null` 10280 AC_MSG_RESULT([$doxygen_version]) 10281 AS_VERSION_COMPARE([$doxygen_version], [$1], 10282 [if test "x$use_doxygen" = xauto; then 10283 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10284 have_doxygen=no 10285 else 10286 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10287 fi]) 10288fi]) 10289AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10290]) # XORG_WITH_DOXYGEN 10291 10292# XORG_WITH_GROFF([DEFAULT]) 10293# ---------------- 10294# Minimum version: 1.6.0 10295# Minimum version for optional DEFAULT argument: 1.11.0 10296# 10297# Documentation tools are not always available on all platforms and sometimes 10298# not at the appropriate level. This macro enables a module to test for the 10299# presence of the tool and obtain it's path in separate variables. Coupled with 10300# the --with-groff option, it allows maximum flexibilty in making decisions 10301# as whether or not to use the groff package. When DEFAULT is not specified, 10302# --with-groff assumes 'auto'. 10303# 10304# Interface to module: 10305# HAVE_GROFF: used in makefiles to conditionally generate documentation 10306# HAVE_GROFF_MM: the memorandum macros (-mm) package 10307# HAVE_GROFF_MS: the -ms macros package 10308# GROFF: returns the path of the groff program found 10309# returns the path set by the user in the environment 10310# --with-groff: 'yes' user instructs the module to use groff 10311# 'no' user instructs the module not to use groff 10312# 10313# Added in version 1.9.0: 10314# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10315# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10316# psselect from the psutils package. 10317# the ghostcript package. Refer to the grohtml man pages 10318# 10319# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10320# 10321# OS and distros often splits groff in a basic and full package, the former 10322# having the groff program and the later having devices, fonts and macros 10323# Checking for the groff executable is not enough. 10324# 10325# If macros are missing, we cannot assume that groff is useless, so we don't 10326# unset HAVE_GROFF or GROFF env variables. 10327# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10328# 10329AC_DEFUN([XORG_WITH_GROFF],[ 10330AC_ARG_VAR([GROFF], [Path to groff command]) 10331m4_define([_defopt], m4_default([$1], [auto])) 10332AC_ARG_WITH(groff, 10333 AS_HELP_STRING([--with-groff], 10334 [Use groff to regenerate documentation (default: ]_defopt[)]), 10335 [use_groff=$withval], [use_groff=]_defopt) 10336m4_undefine([_defopt]) 10337 10338if test "x$use_groff" = x"auto"; then 10339 AC_PATH_PROG([GROFF], [groff]) 10340 if test "x$GROFF" = "x"; then 10341 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10342 have_groff=no 10343 else 10344 have_groff=yes 10345 fi 10346elif test "x$use_groff" = x"yes" ; then 10347 AC_PATH_PROG([GROFF], [groff]) 10348 if test "x$GROFF" = "x"; then 10349 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10350 fi 10351 have_groff=yes 10352elif test "x$use_groff" = x"no" ; then 10353 if test "x$GROFF" != "x"; then 10354 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10355 fi 10356 have_groff=no 10357else 10358 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10359fi 10360 10361# We have groff, test for the presence of the macro packages 10362if test "x$have_groff" = x"yes"; then 10363 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10364 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10365 groff_ms_works=yes 10366 else 10367 groff_ms_works=no 10368 fi 10369 AC_MSG_RESULT([$groff_ms_works]) 10370 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10371 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10372 groff_mm_works=yes 10373 else 10374 groff_mm_works=no 10375 fi 10376 AC_MSG_RESULT([$groff_mm_works]) 10377fi 10378 10379# We have groff, test for HTML dependencies, one command per package 10380if test "x$have_groff" = x"yes"; then 10381 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10382 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10383 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10384 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10385 have_groff_html=yes 10386 else 10387 have_groff_html=no 10388 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10389 fi 10390fi 10391 10392# Set Automake conditionals for Makefiles 10393AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10394AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10395AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10396AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10397]) # XORG_WITH_GROFF 10398 10399# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10400# --------------------------------------- 10401# Minimum version: 1.6.0 10402# Minimum version for optional DEFAULT argument: 1.11.0 10403# Minimum version for optional MIN-VERSION argument: 1.15.0 10404# 10405# Documentation tools are not always available on all platforms and sometimes 10406# not at the appropriate level. This macro enables a module to test for the 10407# presence of the tool and obtain it's path in separate variables. Coupled with 10408# the --with-fop option, it allows maximum flexibilty in making decisions 10409# as whether or not to use the fop package. When DEFAULT is not specified, 10410# --with-fop assumes 'auto'. 10411# 10412# Interface to module: 10413# HAVE_FOP: used in makefiles to conditionally generate documentation 10414# FOP: returns the path of the fop program found 10415# returns the path set by the user in the environment 10416# --with-fop: 'yes' user instructs the module to use fop 10417# 'no' user instructs the module not to use fop 10418# 10419# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10420# 10421AC_DEFUN([XORG_WITH_FOP],[ 10422AC_ARG_VAR([FOP], [Path to fop command]) 10423m4_define([_defopt], m4_default([$2], [auto])) 10424AC_ARG_WITH(fop, 10425 AS_HELP_STRING([--with-fop], 10426 [Use fop to regenerate documentation (default: ]_defopt[)]), 10427 [use_fop=$withval], [use_fop=]_defopt) 10428m4_undefine([_defopt]) 10429 10430if test "x$use_fop" = x"auto"; then 10431 AC_PATH_PROG([FOP], [fop]) 10432 if test "x$FOP" = "x"; then 10433 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10434 have_fop=no 10435 else 10436 have_fop=yes 10437 fi 10438elif test "x$use_fop" = x"yes" ; then 10439 AC_PATH_PROG([FOP], [fop]) 10440 if test "x$FOP" = "x"; then 10441 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10442 fi 10443 have_fop=yes 10444elif test "x$use_fop" = x"no" ; then 10445 if test "x$FOP" != "x"; then 10446 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10447 fi 10448 have_fop=no 10449else 10450 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10451fi 10452 10453# Test for a minimum version of fop, if provided. 10454m4_ifval([$1], 10455[if test "$have_fop" = yes; then 10456 # scrape the fop version 10457 AC_MSG_CHECKING([for fop minimum version]) 10458 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10459 AC_MSG_RESULT([$fop_version]) 10460 AS_VERSION_COMPARE([$fop_version], [$1], 10461 [if test "x$use_fop" = xauto; then 10462 AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10463 have_fop=no 10464 else 10465 AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10466 fi]) 10467fi]) 10468AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10469]) # XORG_WITH_FOP 10470 10471# XORG_WITH_PS2PDF([DEFAULT]) 10472# ---------------- 10473# Minimum version: 1.6.0 10474# Minimum version for optional DEFAULT argument: 1.11.0 10475# 10476# Documentation tools are not always available on all platforms and sometimes 10477# not at the appropriate level. This macro enables a module to test for the 10478# presence of the tool and obtain it's path in separate variables. Coupled with 10479# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10480# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10481# --with-ps2pdf assumes 'auto'. 10482# 10483# Interface to module: 10484# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10485# PS2PDF: returns the path of the ps2pdf program found 10486# returns the path set by the user in the environment 10487# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10488# 'no' user instructs the module not to use ps2pdf 10489# 10490# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10491# 10492AC_DEFUN([XORG_WITH_PS2PDF],[ 10493AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10494m4_define([_defopt], m4_default([$1], [auto])) 10495AC_ARG_WITH(ps2pdf, 10496 AS_HELP_STRING([--with-ps2pdf], 10497 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10498 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10499m4_undefine([_defopt]) 10500 10501if test "x$use_ps2pdf" = x"auto"; then 10502 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10503 if test "x$PS2PDF" = "x"; then 10504 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10505 have_ps2pdf=no 10506 else 10507 have_ps2pdf=yes 10508 fi 10509elif test "x$use_ps2pdf" = x"yes" ; then 10510 AC_PATH_PROG([PS2PDF], [ps2pdf]) 10511 if test "x$PS2PDF" = "x"; then 10512 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10513 fi 10514 have_ps2pdf=yes 10515elif test "x$use_ps2pdf" = x"no" ; then 10516 if test "x$PS2PDF" != "x"; then 10517 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10518 fi 10519 have_ps2pdf=no 10520else 10521 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10522fi 10523AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10524]) # XORG_WITH_PS2PDF 10525 10526# XORG_ENABLE_DOCS (enable_docs=yes) 10527# ---------------- 10528# Minimum version: 1.6.0 10529# 10530# Documentation tools are not always available on all platforms and sometimes 10531# not at the appropriate level. This macro enables a builder to skip all 10532# documentation targets except traditional man pages. 10533# Combined with the specific tool checking macros XORG_WITH_*, it provides 10534# maximum flexibilty in controlling documentation building. 10535# Refer to: 10536# XORG_WITH_XMLTO --with-xmlto 10537# XORG_WITH_ASCIIDOC --with-asciidoc 10538# XORG_WITH_DOXYGEN --with-doxygen 10539# XORG_WITH_FOP --with-fop 10540# XORG_WITH_GROFF --with-groff 10541# XORG_WITH_PS2PDF --with-ps2pdf 10542# 10543# Interface to module: 10544# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10545# --enable-docs: 'yes' user instructs the module to generate docs 10546# 'no' user instructs the module not to generate docs 10547# parm1: specify the default value, yes or no. 10548# 10549AC_DEFUN([XORG_ENABLE_DOCS],[ 10550m4_define([docs_default], m4_default([$1], [yes])) 10551AC_ARG_ENABLE(docs, 10552 AS_HELP_STRING([--enable-docs], 10553 [Enable building the documentation (default: ]docs_default[)]), 10554 [build_docs=$enableval], [build_docs=]docs_default) 10555m4_undefine([docs_default]) 10556AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10557AC_MSG_CHECKING([whether to build documentation]) 10558AC_MSG_RESULT([$build_docs]) 10559]) # XORG_ENABLE_DOCS 10560 10561# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10562# ---------------- 10563# Minimum version: 1.6.0 10564# 10565# This macro enables a builder to skip all developer documentation. 10566# Combined with the specific tool checking macros XORG_WITH_*, it provides 10567# maximum flexibilty in controlling documentation building. 10568# Refer to: 10569# XORG_WITH_XMLTO --with-xmlto 10570# XORG_WITH_ASCIIDOC --with-asciidoc 10571# XORG_WITH_DOXYGEN --with-doxygen 10572# XORG_WITH_FOP --with-fop 10573# XORG_WITH_GROFF --with-groff 10574# XORG_WITH_PS2PDF --with-ps2pdf 10575# 10576# Interface to module: 10577# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10578# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10579# 'no' user instructs the module not to generate developer docs 10580# parm1: specify the default value, yes or no. 10581# 10582AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10583m4_define([devel_default], m4_default([$1], [yes])) 10584AC_ARG_ENABLE(devel-docs, 10585 AS_HELP_STRING([--enable-devel-docs], 10586 [Enable building the developer documentation (default: ]devel_default[)]), 10587 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10588m4_undefine([devel_default]) 10589AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10590AC_MSG_CHECKING([whether to build developer documentation]) 10591AC_MSG_RESULT([$build_devel_docs]) 10592]) # XORG_ENABLE_DEVEL_DOCS 10593 10594# XORG_ENABLE_SPECS (enable_specs=yes) 10595# ---------------- 10596# Minimum version: 1.6.0 10597# 10598# This macro enables a builder to skip all functional specification targets. 10599# Combined with the specific tool checking macros XORG_WITH_*, it provides 10600# maximum flexibilty in controlling documentation building. 10601# Refer to: 10602# XORG_WITH_XMLTO --with-xmlto 10603# XORG_WITH_ASCIIDOC --with-asciidoc 10604# XORG_WITH_DOXYGEN --with-doxygen 10605# XORG_WITH_FOP --with-fop 10606# XORG_WITH_GROFF --with-groff 10607# XORG_WITH_PS2PDF --with-ps2pdf 10608# 10609# Interface to module: 10610# ENABLE_SPECS: used in makefiles to conditionally generate specs 10611# --enable-specs: 'yes' user instructs the module to generate specs 10612# 'no' user instructs the module not to generate specs 10613# parm1: specify the default value, yes or no. 10614# 10615AC_DEFUN([XORG_ENABLE_SPECS],[ 10616m4_define([spec_default], m4_default([$1], [yes])) 10617AC_ARG_ENABLE(specs, 10618 AS_HELP_STRING([--enable-specs], 10619 [Enable building the specs (default: ]spec_default[)]), 10620 [build_specs=$enableval], [build_specs=]spec_default) 10621m4_undefine([spec_default]) 10622AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10623AC_MSG_CHECKING([whether to build functional specifications]) 10624AC_MSG_RESULT([$build_specs]) 10625]) # XORG_ENABLE_SPECS 10626 10627# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10628# ---------------------------------------------- 10629# Minimum version: 1.13.0 10630# 10631# This macro enables a builder to enable/disable unit testing 10632# It makes no assumption about the test cases implementation 10633# Test cases may or may not use Automake "Support for test suites" 10634# They may or may not use the software utility library GLib 10635# 10636# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10637# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10638# The variable enable_unit_tests is used by other macros in this file. 10639# 10640# Interface to module: 10641# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10642# enable_unit_tests: used in configure.ac for additional configuration 10643# --enable-unit-tests: 'yes' user instructs the module to build tests 10644# 'no' user instructs the module not to build tests 10645# parm1: specify the default value, yes or no. 10646# 10647AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10648AC_BEFORE([$0], [XORG_WITH_GLIB]) 10649AC_BEFORE([$0], [XORG_LD_WRAP]) 10650AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10651m4_define([_defopt], m4_default([$1], [auto])) 10652AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10653 [Enable building unit test cases (default: ]_defopt[)]), 10654 [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10655m4_undefine([_defopt]) 10656AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10657AC_MSG_CHECKING([whether to build unit test cases]) 10658AC_MSG_RESULT([$enable_unit_tests]) 10659]) # XORG_ENABLE_UNIT_TESTS 10660 10661# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10662# ---------------------------------------- 10663# Minimum version: 1.13.0 10664# 10665# GLib is a library which provides advanced data structures and functions. 10666# This macro enables a module to test for the presence of Glib. 10667# 10668# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10669# Otherwise the value of $enable_unit_tests is blank. 10670# 10671# Interface to module: 10672# HAVE_GLIB: used in makefiles to conditionally build targets 10673# with_glib: used in configure.ac to know if GLib has been found 10674# --with-glib: 'yes' user instructs the module to use glib 10675# 'no' user instructs the module not to use glib 10676# 10677AC_DEFUN([XORG_WITH_GLIB],[ 10678AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10679m4_define([_defopt], m4_default([$2], [auto])) 10680AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10681 [Use GLib library for unit testing (default: ]_defopt[)]), 10682 [with_glib=$withval], [with_glib=]_defopt) 10683m4_undefine([_defopt]) 10684 10685have_glib=no 10686# Do not probe GLib if user explicitly disabled unit testing 10687if test "x$enable_unit_tests" != x"no"; then 10688 # Do not probe GLib if user explicitly disabled it 10689 if test "x$with_glib" != x"no"; then 10690 m4_ifval( 10691 [$1], 10692 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10693 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10694 ) 10695 fi 10696fi 10697 10698# Not having GLib when unit testing has been explicitly requested is an error 10699if test "x$enable_unit_tests" = x"yes"; then 10700 if test "x$have_glib" = x"no"; then 10701 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10702 fi 10703fi 10704 10705# Having unit testing disabled when GLib has been explicitly requested is an error 10706if test "x$enable_unit_tests" = x"no"; then 10707 if test "x$with_glib" = x"yes"; then 10708 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10709 fi 10710fi 10711 10712# Not having GLib when it has been explicitly requested is an error 10713if test "x$with_glib" = x"yes"; then 10714 if test "x$have_glib" = x"no"; then 10715 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10716 fi 10717fi 10718 10719AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10720]) # XORG_WITH_GLIB 10721 10722# XORG_LD_WRAP([required|optional]) 10723# --------------------------------- 10724# Minimum version: 1.13.0 10725# 10726# Check if linker supports -wrap, passed via compiler flags 10727# 10728# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10729# Otherwise the value of $enable_unit_tests is blank. 10730# 10731# Argument added in 1.16.0 - default is "required", to match existing behavior 10732# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10733# available, an argument of "optional" allows use when some unit tests require 10734# ld -wrap and others do not. 10735# 10736AC_DEFUN([XORG_LD_WRAP],[ 10737XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10738 [AC_LANG_PROGRAM([#include <stdlib.h> 10739 void __wrap_exit(int status) { return; }], 10740 [exit(0);])]) 10741# Not having ld wrap when unit testing has been explicitly requested is an error 10742if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10743 if test "x$have_ld_wrap" = x"no"; then 10744 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10745 fi 10746fi 10747AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10748# 10749]) # XORG_LD_WRAP 10750 10751# XORG_CHECK_LINKER_FLAGS 10752# ----------------------- 10753# SYNOPSIS 10754# 10755# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10756# 10757# DESCRIPTION 10758# 10759# Check whether the given linker FLAGS work with the current language's 10760# linker, or whether they give an error. 10761# 10762# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10763# success/failure. 10764# 10765# PROGRAM-SOURCE is the program source to link with, if needed 10766# 10767# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10768# 10769# LICENSE 10770# 10771# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10772# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10773# Copyright (c) 2009 Matteo Frigo 10774# 10775# This program is free software: you can redistribute it and/or modify it 10776# under the terms of the GNU General Public License as published by the 10777# Free Software Foundation, either version 3 of the License, or (at your 10778# option) any later version. 10779# 10780# This program is distributed in the hope that it will be useful, but 10781# WITHOUT ANY WARRANTY; without even the implied warranty of 10782# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10783# Public License for more details. 10784# 10785# You should have received a copy of the GNU General Public License along 10786# with this program. If not, see <http://www.gnu.org/licenses/>. 10787# 10788# As a special exception, the respective Autoconf Macro's copyright owner 10789# gives unlimited permission to copy, distribute and modify the configure 10790# scripts that are the output of Autoconf when processing the Macro. You 10791# need not follow the terms of the GNU General Public License when using 10792# or distributing such scripts, even though portions of the text of the 10793# Macro appear in them. The GNU General Public License (GPL) does govern 10794# all other use of the material that constitutes the Autoconf Macro. 10795# 10796# This special exception to the GPL applies to versions of the Autoconf 10797# Macro released by the Autoconf Archive. When you make and distribute a 10798# modified version of the Autoconf Macro, you may extend this special 10799# exception to the GPL to apply to your modified version as well.# 10800AC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10801[AC_MSG_CHECKING([whether the linker accepts $1]) 10802dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10803AS_LITERAL_IF([$1], 10804 [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10805 ax_save_FLAGS=$LDFLAGS 10806 LDFLAGS="$1" 10807 AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10808 AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10809 AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10810 LDFLAGS=$ax_save_FLAGS])], 10811 [ax_save_FLAGS=$LDFLAGS 10812 LDFLAGS="$1" 10813 AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10814 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10815 eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10816 LDFLAGS=$ax_save_FLAGS]) 10817eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10818AC_MSG_RESULT($xorg_check_linker_flags) 10819if test "x$xorg_check_linker_flags" = xyes; then 10820 m4_default([$2], :) 10821else 10822 m4_default([$3], :) 10823fi 10824]) # XORG_CHECK_LINKER_FLAGS 10825 10826# XORG_MEMORY_CHECK_FLAGS 10827# ----------------------- 10828# Minimum version: 1.16.0 10829# 10830# This macro attempts to find appropriate memory checking functionality 10831# for various platforms which unit testing code may use to catch various 10832# forms of memory allocation and access errors in testing. 10833# 10834# Interface to module: 10835# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10836# Usually added to TESTS_ENVIRONMENT in Makefile.am 10837# 10838# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10839# 10840AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10841 10842AC_REQUIRE([AC_CANONICAL_HOST]) 10843AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10844 [Environment variables to enable memory checking in tests]) 10845 10846# Check for different types of support on different platforms 10847case $host_os in 10848 solaris*) 10849 AC_CHECK_LIB([umem], [umem_alloc], 10850 [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10851 ;; 10852 *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10853 # both directly and inverted, so should not be 0 or 255. 10854 malloc_debug_env='MALLOC_PERTURB_=15' 10855 ;; 10856 darwin*) 10857 malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10858 ;; 10859 *bsd*) 10860 malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10861 ;; 10862esac 10863 10864# User supplied flags override default flags 10865if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10866 malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10867fi 10868 10869AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10870]) # XORG_WITH_LINT 10871 10872# XORG_CHECK_MALLOC_ZERO 10873# ---------------------- 10874# Minimum version: 1.0.0 10875# 10876# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10877# malloc(0) returns NULL. Packages should add one of these cflags to 10878# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10879AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10880AC_ARG_ENABLE(malloc0returnsnull, 10881 AS_HELP_STRING([--enable-malloc0returnsnull], 10882 [malloc(0) returns NULL (default: auto)]), 10883 [MALLOC_ZERO_RETURNS_NULL=$enableval], 10884 [MALLOC_ZERO_RETURNS_NULL=auto]) 10885 10886AC_MSG_CHECKING([whether malloc(0) returns NULL]) 10887if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10888 AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10889#include <stdlib.h> 10890],[ 10891 char *m0, *r0, *c0, *p; 10892 m0 = malloc(0); 10893 p = malloc(10); 10894 r0 = realloc(p,0); 10895 c0 = calloc(0,10); 10896 exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10897])], 10898 [MALLOC_ZERO_RETURNS_NULL=yes], 10899 [MALLOC_ZERO_RETURNS_NULL=no], 10900 [MALLOC_ZERO_RETURNS_NULL=yes]) 10901fi 10902AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10903 10904if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10905 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10906 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10907 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10908else 10909 MALLOC_ZERO_CFLAGS="" 10910 XMALLOC_ZERO_CFLAGS="" 10911 XTMALLOC_ZERO_CFLAGS="" 10912fi 10913 10914AC_SUBST([MALLOC_ZERO_CFLAGS]) 10915AC_SUBST([XMALLOC_ZERO_CFLAGS]) 10916AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10917]) # XORG_CHECK_MALLOC_ZERO 10918 10919# XORG_WITH_LINT() 10920# ---------------- 10921# Minimum version: 1.1.0 10922# 10923# This macro enables the use of a tool that flags some suspicious and 10924# non-portable constructs (likely to be bugs) in C language source code. 10925# It will attempt to locate the tool and use appropriate options. 10926# There are various lint type tools on different platforms. 10927# 10928# Interface to module: 10929# LINT: returns the path to the tool found on the platform 10930# or the value set to LINT on the configure cmd line 10931# also an Automake conditional 10932# LINT_FLAGS: an Automake variable with appropriate flags 10933# 10934# --with-lint: 'yes' user instructs the module to use lint 10935# 'no' user instructs the module not to use lint (default) 10936# 10937# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10938# If the user sets the value of LINT_FLAGS, they are used verbatim. 10939# 10940AC_DEFUN([XORG_WITH_LINT],[ 10941 10942AC_ARG_VAR([LINT], [Path to a lint-style command]) 10943AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10944AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10945 [Use a lint-style source code checker (default: disabled)])], 10946 [use_lint=$withval], [use_lint=no]) 10947 10948# Obtain platform specific info like program name and options 10949# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10950case $host_os in 10951 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10952 lint_name=splint 10953 lint_options="-badflag" 10954 ;; 10955 *freebsd* | *netbsd*) 10956 lint_name=lint 10957 lint_options="-u -b" 10958 ;; 10959 *solaris*) 10960 lint_name=lint 10961 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10962 ;; 10963esac 10964 10965# Test for the presence of the program (either guessed by the code or spelled out by the user) 10966if test "x$use_lint" = x"yes" ; then 10967 AC_PATH_PROG([LINT], [$lint_name]) 10968 if test "x$LINT" = "x"; then 10969 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10970 fi 10971elif test "x$use_lint" = x"no" ; then 10972 if test "x$LINT" != "x"; then 10973 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10974 fi 10975else 10976 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10977fi 10978 10979# User supplied flags override default flags 10980if test "x$LINT_FLAGS" != "x"; then 10981 lint_options=$LINT_FLAGS 10982fi 10983 10984AC_SUBST([LINT_FLAGS],[$lint_options]) 10985AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10986 10987]) # XORG_WITH_LINT 10988 10989# XORG_LINT_LIBRARY(LIBNAME) 10990# -------------------------- 10991# Minimum version: 1.1.0 10992# 10993# Sets up flags for building lint libraries for checking programs that call 10994# functions in the library. 10995# 10996# Interface to module: 10997# LINTLIB - Automake variable with the name of lint library file to make 10998# MAKE_LINT_LIB - Automake conditional 10999# 11000# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11001# - 'no' user instructs the module not to create a lint library (default) 11002 11003AC_DEFUN([XORG_LINT_LIBRARY],[ 11004AC_REQUIRE([XORG_WITH_LINT]) 11005AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11006 [Create lint library (default: disabled)])], 11007 [make_lint_lib=$enableval], [make_lint_lib=no]) 11008 11009if test "x$make_lint_lib" = x"yes" ; then 11010 LINTLIB=llib-l$1.ln 11011 if test "x$LINT" = "x"; then 11012 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11013 fi 11014elif test "x$make_lint_lib" != x"no" ; then 11015 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11016fi 11017 11018AC_SUBST(LINTLIB) 11019AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11020 11021]) # XORG_LINT_LIBRARY 11022 11023# XORG_COMPILER_BRAND 11024# ------------------- 11025# Minimum version: 1.14.0 11026# 11027# Checks for various brands of compilers and sets flags as appropriate: 11028# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11029# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11030# clang compiler - sets CLANGCC to "yes" 11031# Intel compiler - sets INTELCC to "yes" 11032# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11033# 11034AC_DEFUN([XORG_COMPILER_BRAND], [ 11035AC_LANG_CASE( 11036 [C], [ 11037 AC_REQUIRE([AC_PROG_CC_C99]) 11038 ], 11039 [C++], [ 11040 AC_REQUIRE([AC_PROG_CXX]) 11041 ] 11042) 11043AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11044AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11045AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11046]) # XORG_COMPILER_BRAND 11047 11048# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11049# --------------- 11050# Minimum version: 1.16.0 11051# 11052# Test if the compiler works when passed the given flag as a command line argument. 11053# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11054# next flag in the list until there are no more options. 11055# 11056# Note that this does not guarantee that the compiler supports the flag as some 11057# compilers will simply ignore arguments that they do not understand, but we do 11058# attempt to weed out false positives by using -Werror=unknown-warning-option and 11059# -Werror=unused-command-line-argument 11060# 11061AC_DEFUN([XORG_TESTSET_CFLAG], [ 11062m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11063m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11064 11065AC_LANG_COMPILER_REQUIRE 11066 11067AC_LANG_CASE( 11068 [C], [ 11069 AC_REQUIRE([AC_PROG_CC_C99]) 11070 define([PREFIX], [C]) 11071 ], 11072 [C++], [ 11073 define([PREFIX], [CXX]) 11074 ] 11075) 11076 11077[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11078 11079if test "x$xorg_testset_unknown_warning_option" = "x" ; then 11080 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11081 AC_CACHE_CHECK([if compiler supports -Werror=unknown-warning-option], 11082 xorg_cv_compiler_flag_unknown_warning_option, 11083 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11084 [xorg_cv_compiler_flag_unknown_warning_option=yes], 11085 [xorg_cv_compiler_flag_unknown_warning_option=no])) 11086 xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option 11087 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11088fi 11089 11090if test "x$xorg_testset_unused_command_line_argument" = "x" ; then 11091 if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 11092 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11093 fi 11094 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11095 AC_CACHE_CHECK([if compiler supports -Werror=unused-command-line-argument], 11096 xorg_cv_compiler_flag_unused_command_line_argument, 11097 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11098 [xorg_cv_compiler_flag_unused_command_line_argument=yes], 11099 [xorg_cv_compiler_flag_unused_command_line_argument=no])) 11100 xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument 11101 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11102fi 11103 11104found="no" 11105m4_foreach([flag], m4_cdr($@), [ 11106 if test $found = "no" ; then 11107 if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 11108 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11109 fi 11110 11111 if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 11112 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11113 fi 11114 11115 PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11116 11117dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11118 AC_MSG_CHECKING([if $CC supports ]flag[]) 11119 cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])` 11120 AC_CACHE_VAL(AS_TR_SH($cacheid), 11121 [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11122 [eval AS_TR_SH($cacheid)=yes], 11123 [eval AS_TR_SH($cacheid)=no])]) 11124 11125 PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11126 11127 eval supported=$AS_TR_SH($cacheid) 11128 AC_MSG_RESULT([$supported]) 11129 if test "$supported" = "yes" ; then 11130 $1="$$1 ]flag[" 11131 found="yes" 11132 fi 11133 fi 11134]) 11135]) # XORG_TESTSET_CFLAG 11136 11137# XORG_COMPILER_FLAGS 11138# --------------- 11139# Minimum version: 1.16.0 11140# 11141# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11142# arguments supported by the selected compiler which do NOT alter the generated 11143# code. These arguments will cause the compiler to print various warnings 11144# during compilation AND turn a conservative set of warnings into errors. 11145# 11146# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11147# future versions of util-macros as options are added to new compilers. 11148# 11149AC_DEFUN([XORG_COMPILER_FLAGS], [ 11150AC_REQUIRE([XORG_COMPILER_BRAND]) 11151 11152AC_ARG_ENABLE(selective-werror, 11153 AS_HELP_STRING([--disable-selective-werror], 11154 [Turn off selective compiler errors. (default: enabled)]), 11155 [SELECTIVE_WERROR=$enableval], 11156 [SELECTIVE_WERROR=yes]) 11157 11158AC_LANG_CASE( 11159 [C], [ 11160 define([PREFIX], [C]) 11161 ], 11162 [C++], [ 11163 define([PREFIX], [CXX]) 11164 ] 11165) 11166# -v is too short to test reliably with XORG_TESTSET_CFLAG 11167if test "x$SUNCC" = "xyes"; then 11168 [BASE_]PREFIX[FLAGS]="-v" 11169else 11170 [BASE_]PREFIX[FLAGS]="" 11171fi 11172 11173# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11174XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11175XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11176XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11177XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11178 11179AC_LANG_CASE( 11180 [C], [ 11181 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11182 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11183 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11184 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11185 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 11186 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11187 ] 11188) 11189 11190# This chunk adds additional warnings that could catch undesired effects. 11191XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11192XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11193XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11194XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11195XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11196XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11197XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11198 11199# These are currently disabled because they are noisy. They will be enabled 11200# in the future once the codebase is sufficiently modernized to silence 11201# them. For now, I don't want them to drown out the other warnings. 11202# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11203# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11204# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11205 11206# Turn some warnings into errors, so we don't accidently get successful builds 11207# when there are problems that should be fixed. 11208 11209if test "x$SELECTIVE_WERROR" = "xyes" ; then 11210XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11211XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11212XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11213XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11214XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11215XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11216XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11217XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11218XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11219XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11220XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11221XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11222XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11223else 11224AC_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]) 11225XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11226XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11227XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11228XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11229XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11230XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11231XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11232XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11233XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11234XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11235XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11236XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11237XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11238fi 11239 11240AC_SUBST([BASE_]PREFIX[FLAGS]) 11241]) # XORG_COMPILER_FLAGS 11242 11243# XORG_CWARNFLAGS 11244# --------------- 11245# Minimum version: 1.2.0 11246# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11247# 11248# Defines CWARNFLAGS to enable C compiler warnings. 11249# 11250# This function is deprecated because it defines -fno-strict-aliasing 11251# which alters the code generated by the compiler. If -fno-strict-aliasing 11252# is needed, then it should be added explicitly in the module when 11253# it is updated to use BASE_CFLAGS. 11254# 11255AC_DEFUN([XORG_CWARNFLAGS], [ 11256AC_REQUIRE([XORG_COMPILER_FLAGS]) 11257AC_REQUIRE([XORG_COMPILER_BRAND]) 11258AC_LANG_CASE( 11259 [C], [ 11260 CWARNFLAGS="$BASE_CFLAGS" 11261 if test "x$GCC" = xyes ; then 11262 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11263 fi 11264 AC_SUBST(CWARNFLAGS) 11265 ] 11266) 11267]) # XORG_CWARNFLAGS 11268 11269# XORG_STRICT_OPTION 11270# ----------------------- 11271# Minimum version: 1.3.0 11272# 11273# Add configure option to enable strict compilation flags, such as treating 11274# warnings as fatal errors. 11275# If --enable-strict-compilation is passed to configure, adds strict flags to 11276# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11277# 11278# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11279# when strict compilation is unconditionally desired. 11280AC_DEFUN([XORG_STRICT_OPTION], [ 11281AC_REQUIRE([XORG_CWARNFLAGS]) 11282AC_REQUIRE([XORG_COMPILER_FLAGS]) 11283 11284AC_ARG_ENABLE(strict-compilation, 11285 AS_HELP_STRING([--enable-strict-compilation], 11286 [Enable all warnings from compiler and make them errors (default: disabled)]), 11287 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11288 11289AC_LANG_CASE( 11290 [C], [ 11291 define([PREFIX], [C]) 11292 ], 11293 [C++], [ 11294 define([PREFIX], [CXX]) 11295 ] 11296) 11297 11298[STRICT_]PREFIX[FLAGS]="" 11299XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11300XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11301 11302# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11303# activate it with -Werror, so we add it here explicitly. 11304XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11305 11306if test "x$STRICT_COMPILE" = "xyes"; then 11307 [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11308 AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11309fi 11310AC_SUBST([STRICT_]PREFIX[FLAGS]) 11311AC_SUBST([BASE_]PREFIX[FLAGS]) 11312AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11313]) # XORG_STRICT_OPTION 11314 11315# XORG_DEFAULT_OPTIONS 11316# -------------------- 11317# Minimum version: 1.3.0 11318# 11319# Defines default options for X.Org modules. 11320# 11321AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11322AC_REQUIRE([AC_PROG_INSTALL]) 11323XORG_COMPILER_FLAGS 11324XORG_CWARNFLAGS 11325XORG_STRICT_OPTION 11326XORG_RELEASE_VERSION 11327XORG_CHANGELOG 11328XORG_INSTALL 11329XORG_MANPAGE_SECTIONS 11330m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11331 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11332]) # XORG_DEFAULT_OPTIONS 11333 11334# XORG_INSTALL() 11335# ---------------- 11336# Minimum version: 1.4.0 11337# 11338# Defines the variable INSTALL_CMD as the command to copy 11339# INSTALL from $prefix/share/util-macros. 11340# 11341AC_DEFUN([XORG_INSTALL], [ 11342AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11343macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11344INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11345mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11346|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11347echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11348AC_SUBST([INSTALL_CMD]) 11349]) # XORG_INSTALL 11350dnl Copyright 2005 Red Hat, Inc 11351dnl 11352dnl Permission to use, copy, modify, distribute, and sell this software and its 11353dnl documentation for any purpose is hereby granted without fee, provided that 11354dnl the above copyright notice appear in all copies and that both that 11355dnl copyright notice and this permission notice appear in supporting 11356dnl documentation. 11357dnl 11358dnl The above copyright notice and this permission notice shall be included 11359dnl in all copies or substantial portions of the Software. 11360dnl 11361dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11362dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11363dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11364dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11365dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11366dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11367dnl OTHER DEALINGS IN THE SOFTWARE. 11368dnl 11369dnl Except as contained in this notice, the name of the copyright holders shall 11370dnl not be used in advertising or otherwise to promote the sale, use or 11371dnl other dealings in this Software without prior written authorization 11372dnl from the copyright holders. 11373dnl 11374 11375# XORG_RELEASE_VERSION 11376# -------------------- 11377# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11378 11379AC_DEFUN([XORG_RELEASE_VERSION],[ 11380 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11381 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11382 [Major version of this package]) 11383 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11384 if test "x$PVM" = "x"; then 11385 PVM="0" 11386 fi 11387 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11388 [$PVM], 11389 [Minor version of this package]) 11390 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11391 if test "x$PVP" = "x"; then 11392 PVP="0" 11393 fi 11394 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11395 [$PVP], 11396 [Patch version of this package]) 11397]) 11398 11399# XORG_CHANGELOG() 11400# ---------------- 11401# Minimum version: 1.2.0 11402# 11403# Defines the variable CHANGELOG_CMD as the command to generate 11404# ChangeLog from git. 11405# 11406# 11407AC_DEFUN([XORG_CHANGELOG], [ 11408CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11409mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11410|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11411echo 'git directory not found: installing possibly empty changelog.' >&2)" 11412AC_SUBST([CHANGELOG_CMD]) 11413]) # XORG_CHANGELOG 11414 11415