aclocal.m4 revision e120bd27
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# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 410# Free Software Foundation, Inc. 411# 412# This file is free software; the Free Software Foundation 413# gives unlimited permission to copy and/or distribute it, 414# with or without modifications, as long as this notice is preserved. 415 416# serial 8 417 418# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 419AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 420 421# Do all the work for Automake. -*- Autoconf -*- 422 423# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 424# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 425# 426# This file is free software; the Free Software Foundation 427# gives unlimited permission to copy and/or distribute it, 428# with or without modifications, as long as this notice is preserved. 429 430# serial 16 431 432# This macro actually does too much. Some checks are only needed if 433# your package does certain things. But this isn't really a big deal. 434 435# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 436# AM_INIT_AUTOMAKE([OPTIONS]) 437# ----------------------------------------------- 438# The call with PACKAGE and VERSION arguments is the old style 439# call (pre autoconf-2.50), which is being phased out. PACKAGE 440# and VERSION should now be passed to AC_INIT and removed from 441# the call to AM_INIT_AUTOMAKE. 442# We support both call styles for the transition. After 443# the next Automake release, Autoconf can make the AC_INIT 444# arguments mandatory, and then we can depend on a new Autoconf 445# release and drop the old call support. 446AC_DEFUN([AM_INIT_AUTOMAKE], 447[AC_PREREQ([2.62])dnl 448dnl Autoconf wants to disallow AM_ names. We explicitly allow 449dnl the ones we care about. 450m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 451AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 452AC_REQUIRE([AC_PROG_INSTALL])dnl 453if test "`cd $srcdir && pwd`" != "`pwd`"; then 454 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 455 # is not polluted with repeated "-I." 456 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 457 # test to see if srcdir already configured 458 if test -f $srcdir/config.status; then 459 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 460 fi 461fi 462 463# test whether we have cygpath 464if test -z "$CYGPATH_W"; then 465 if (cygpath --version) >/dev/null 2>/dev/null; then 466 CYGPATH_W='cygpath -w' 467 else 468 CYGPATH_W=echo 469 fi 470fi 471AC_SUBST([CYGPATH_W]) 472 473# Define the identity of the package. 474dnl Distinguish between old-style and new-style calls. 475m4_ifval([$2], 476[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 477 AC_SUBST([PACKAGE], [$1])dnl 478 AC_SUBST([VERSION], [$2])], 479[_AM_SET_OPTIONS([$1])dnl 480dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 481m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 482 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 483 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 484 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 485 486_AM_IF_OPTION([no-define],, 487[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 488 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 489 490# Some tools Automake needs. 491AC_REQUIRE([AM_SANITY_CHECK])dnl 492AC_REQUIRE([AC_ARG_PROGRAM])dnl 493AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 494AM_MISSING_PROG(AUTOCONF, autoconf) 495AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 496AM_MISSING_PROG(AUTOHEADER, autoheader) 497AM_MISSING_PROG(MAKEINFO, makeinfo) 498AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 499AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 500AC_REQUIRE([AM_PROG_MKDIR_P])dnl 501# We need awk for the "check" target. The system "awk" is bad on 502# some platforms. 503AC_REQUIRE([AC_PROG_AWK])dnl 504AC_REQUIRE([AC_PROG_MAKE_SET])dnl 505AC_REQUIRE([AM_SET_LEADING_DOT])dnl 506_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 507 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 508 [_AM_PROG_TAR([v7])])]) 509_AM_IF_OPTION([no-dependencies],, 510[AC_PROVIDE_IFELSE([AC_PROG_CC], 511 [_AM_DEPENDENCIES(CC)], 512 [define([AC_PROG_CC], 513 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 514AC_PROVIDE_IFELSE([AC_PROG_CXX], 515 [_AM_DEPENDENCIES(CXX)], 516 [define([AC_PROG_CXX], 517 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 518AC_PROVIDE_IFELSE([AC_PROG_OBJC], 519 [_AM_DEPENDENCIES(OBJC)], 520 [define([AC_PROG_OBJC], 521 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 522]) 523_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 524dnl The `parallel-tests' driver may need to know about EXEEXT, so add the 525dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 526dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 527AC_CONFIG_COMMANDS_PRE(dnl 528[m4_provide_if([_AM_COMPILER_EXEEXT], 529 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 530]) 531 532dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 533dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 534dnl mangled by Autoconf and run in a shell conditional statement. 535m4_define([_AC_COMPILER_EXEEXT], 536m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 537 538 539# When config.status generates a header, we must update the stamp-h file. 540# This file resides in the same directory as the config header 541# that is generated. The stamp files are numbered to have different names. 542 543# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 544# loop where config.status creates the headers, so we can generate 545# our stamp files there. 546AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 547[# Compute $1's index in $config_headers. 548_am_arg=$1 549_am_stamp_count=1 550for _am_header in $config_headers :; do 551 case $_am_header in 552 $_am_arg | $_am_arg:* ) 553 break ;; 554 * ) 555 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 556 esac 557done 558echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 559 560# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 561# 562# This file is free software; the Free Software Foundation 563# gives unlimited permission to copy and/or distribute it, 564# with or without modifications, as long as this notice is preserved. 565 566# AM_PROG_INSTALL_SH 567# ------------------ 568# Define $install_sh. 569AC_DEFUN([AM_PROG_INSTALL_SH], 570[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 571if test x"${install_sh}" != xset; then 572 case $am_aux_dir in 573 *\ * | *\ *) 574 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 575 *) 576 install_sh="\${SHELL} $am_aux_dir/install-sh" 577 esac 578fi 579AC_SUBST(install_sh)]) 580 581# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 582# 583# This file is free software; the Free Software Foundation 584# gives unlimited permission to copy and/or distribute it, 585# with or without modifications, as long as this notice is preserved. 586 587# serial 2 588 589# Check whether the underlying file-system supports filenames 590# with a leading dot. For instance MS-DOS doesn't. 591AC_DEFUN([AM_SET_LEADING_DOT], 592[rm -rf .tst 2>/dev/null 593mkdir .tst 2>/dev/null 594if test -d .tst; then 595 am__leading_dot=. 596else 597 am__leading_dot=_ 598fi 599rmdir .tst 2>/dev/null 600AC_SUBST([am__leading_dot])]) 601 602# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 603# From Jim Meyering 604 605# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 606# Free Software Foundation, Inc. 607# 608# This file is free software; the Free Software Foundation 609# gives unlimited permission to copy and/or distribute it, 610# with or without modifications, as long as this notice is preserved. 611 612# serial 5 613 614# AM_MAINTAINER_MODE([DEFAULT-MODE]) 615# ---------------------------------- 616# Control maintainer-specific portions of Makefiles. 617# Default is to disable them, unless `enable' is passed literally. 618# For symmetry, `disable' may be passed as well. Anyway, the user 619# can override the default with the --enable/--disable switch. 620AC_DEFUN([AM_MAINTAINER_MODE], 621[m4_case(m4_default([$1], [disable]), 622 [enable], [m4_define([am_maintainer_other], [disable])], 623 [disable], [m4_define([am_maintainer_other], [enable])], 624 [m4_define([am_maintainer_other], [enable]) 625 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 626AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 627 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 628 AC_ARG_ENABLE([maintainer-mode], 629[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 630 (and sometimes confusing) to the casual installer], 631 [USE_MAINTAINER_MODE=$enableval], 632 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 633 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 634 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 635 MAINT=$MAINTAINER_MODE_TRUE 636 AC_SUBST([MAINT])dnl 637] 638) 639 640AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 641 642# Check to see how 'make' treats includes. -*- Autoconf -*- 643 644# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 645# 646# This file is free software; the Free Software Foundation 647# gives unlimited permission to copy and/or distribute it, 648# with or without modifications, as long as this notice is preserved. 649 650# serial 4 651 652# AM_MAKE_INCLUDE() 653# ----------------- 654# Check to see how make treats includes. 655AC_DEFUN([AM_MAKE_INCLUDE], 656[am_make=${MAKE-make} 657cat > confinc << 'END' 658am__doit: 659 @echo this is the am__doit target 660.PHONY: am__doit 661END 662# If we don't find an include directive, just comment out the code. 663AC_MSG_CHECKING([for style of include used by $am_make]) 664am__include="#" 665am__quote= 666_am_result=none 667# First try GNU make style include. 668echo "include confinc" > confmf 669# Ignore all kinds of additional output from `make'. 670case `$am_make -s -f confmf 2> /dev/null` in #( 671*the\ am__doit\ target*) 672 am__include=include 673 am__quote= 674 _am_result=GNU 675 ;; 676esac 677# Now try BSD make style include. 678if test "$am__include" = "#"; then 679 echo '.include "confinc"' > confmf 680 case `$am_make -s -f confmf 2> /dev/null` in #( 681 *the\ am__doit\ target*) 682 am__include=.include 683 am__quote="\"" 684 _am_result=BSD 685 ;; 686 esac 687fi 688AC_SUBST([am__include]) 689AC_SUBST([am__quote]) 690AC_MSG_RESULT([$_am_result]) 691rm -f confinc confmf 692]) 693 694# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 695 696# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 697# Free Software Foundation, Inc. 698# 699# This file is free software; the Free Software Foundation 700# gives unlimited permission to copy and/or distribute it, 701# with or without modifications, as long as this notice is preserved. 702 703# serial 6 704 705# AM_MISSING_PROG(NAME, PROGRAM) 706# ------------------------------ 707AC_DEFUN([AM_MISSING_PROG], 708[AC_REQUIRE([AM_MISSING_HAS_RUN]) 709$1=${$1-"${am_missing_run}$2"} 710AC_SUBST($1)]) 711 712 713# AM_MISSING_HAS_RUN 714# ------------------ 715# Define MISSING if not defined so far and test if it supports --run. 716# If it does, set am_missing_run to use it, otherwise, to nothing. 717AC_DEFUN([AM_MISSING_HAS_RUN], 718[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 719AC_REQUIRE_AUX_FILE([missing])dnl 720if test x"${MISSING+set}" != xset; then 721 case $am_aux_dir in 722 *\ * | *\ *) 723 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 724 *) 725 MISSING="\${SHELL} $am_aux_dir/missing" ;; 726 esac 727fi 728# Use eval to expand $SHELL 729if eval "$MISSING --run true"; then 730 am_missing_run="$MISSING --run " 731else 732 am_missing_run= 733 AC_MSG_WARN([`missing' script is too old or missing]) 734fi 735]) 736 737# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 738# 739# This file is free software; the Free Software Foundation 740# gives unlimited permission to copy and/or distribute it, 741# with or without modifications, as long as this notice is preserved. 742 743# AM_PROG_MKDIR_P 744# --------------- 745# Check for `mkdir -p'. 746AC_DEFUN([AM_PROG_MKDIR_P], 747[AC_PREREQ([2.60])dnl 748AC_REQUIRE([AC_PROG_MKDIR_P])dnl 749dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 750dnl while keeping a definition of mkdir_p for backward compatibility. 751dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 752dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 753dnl Makefile.ins that do not define MKDIR_P, so we do our own 754dnl adjustment using top_builddir (which is defined more often than 755dnl MKDIR_P). 756AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 757case $mkdir_p in 758 [[\\/$]]* | ?:[[\\/]]*) ;; 759 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 760esac 761]) 762 763# Helper functions for option handling. -*- Autoconf -*- 764 765# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 766# 767# This file is free software; the Free Software Foundation 768# gives unlimited permission to copy and/or distribute it, 769# with or without modifications, as long as this notice is preserved. 770 771# serial 4 772 773# _AM_MANGLE_OPTION(NAME) 774# ----------------------- 775AC_DEFUN([_AM_MANGLE_OPTION], 776[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 777 778# _AM_SET_OPTION(NAME) 779# ------------------------------ 780# Set option NAME. Presently that only means defining a flag for this option. 781AC_DEFUN([_AM_SET_OPTION], 782[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 783 784# _AM_SET_OPTIONS(OPTIONS) 785# ---------------------------------- 786# OPTIONS is a space-separated list of Automake options. 787AC_DEFUN([_AM_SET_OPTIONS], 788[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 789 790# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 791# ------------------------------------------- 792# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 793AC_DEFUN([_AM_IF_OPTION], 794[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 795 796# Check to make sure that the build environment is sane. -*- Autoconf -*- 797 798# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 799# Free Software Foundation, Inc. 800# 801# This file is free software; the Free Software Foundation 802# gives unlimited permission to copy and/or distribute it, 803# with or without modifications, as long as this notice is preserved. 804 805# serial 5 806 807# AM_SANITY_CHECK 808# --------------- 809AC_DEFUN([AM_SANITY_CHECK], 810[AC_MSG_CHECKING([whether build environment is sane]) 811# Just in case 812sleep 1 813echo timestamp > conftest.file 814# Reject unsafe characters in $srcdir or the absolute working directory 815# name. Accept space and tab only in the latter. 816am_lf=' 817' 818case `pwd` in 819 *[[\\\"\#\$\&\'\`$am_lf]]*) 820 AC_MSG_ERROR([unsafe absolute working directory name]);; 821esac 822case $srcdir in 823 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 824 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 825esac 826 827# Do `set' in a subshell so we don't clobber the current shell's 828# arguments. Must try -L first in case configure is actually a 829# symlink; some systems play weird games with the mod time of symlinks 830# (eg FreeBSD returns the mod time of the symlink's containing 831# directory). 832if ( 833 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 834 if test "$[*]" = "X"; then 835 # -L didn't work. 836 set X `ls -t "$srcdir/configure" conftest.file` 837 fi 838 rm -f conftest.file 839 if test "$[*]" != "X $srcdir/configure conftest.file" \ 840 && test "$[*]" != "X conftest.file $srcdir/configure"; then 841 842 # If neither matched, then we have a broken ls. This can happen 843 # if, for instance, CONFIG_SHELL is bash and it inherits a 844 # broken ls alias from the environment. This has actually 845 # happened. Such a system could not be considered "sane". 846 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 847alias in your environment]) 848 fi 849 850 test "$[2]" = conftest.file 851 ) 852then 853 # Ok. 854 : 855else 856 AC_MSG_ERROR([newly created file is older than distributed files! 857Check your system clock]) 858fi 859AC_MSG_RESULT(yes)]) 860 861# Copyright (C) 2009 Free Software Foundation, Inc. 862# 863# This file is free software; the Free Software Foundation 864# gives unlimited permission to copy and/or distribute it, 865# with or without modifications, as long as this notice is preserved. 866 867# serial 1 868 869# AM_SILENT_RULES([DEFAULT]) 870# -------------------------- 871# Enable less verbose build rules; with the default set to DEFAULT 872# (`yes' being less verbose, `no' or empty being verbose). 873AC_DEFUN([AM_SILENT_RULES], 874[AC_ARG_ENABLE([silent-rules], 875[ --enable-silent-rules less verbose build output (undo: `make V=1') 876 --disable-silent-rules verbose build output (undo: `make V=0')]) 877case $enable_silent_rules in 878yes) AM_DEFAULT_VERBOSITY=0;; 879no) AM_DEFAULT_VERBOSITY=1;; 880*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 881esac 882AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 883AM_BACKSLASH='\' 884AC_SUBST([AM_BACKSLASH])dnl 885_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 886]) 887 888# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 889# 890# This file is free software; the Free Software Foundation 891# gives unlimited permission to copy and/or distribute it, 892# with or without modifications, as long as this notice is preserved. 893 894# AM_PROG_INSTALL_STRIP 895# --------------------- 896# One issue with vendor `install' (even GNU) is that you can't 897# specify the program used to strip binaries. This is especially 898# annoying in cross-compiling environments, where the build's strip 899# is unlikely to handle the host's binaries. 900# Fortunately install-sh will honor a STRIPPROG variable, so we 901# always use install-sh in `make install-strip', and initialize 902# STRIPPROG with the value of the STRIP variable (set by the user). 903AC_DEFUN([AM_PROG_INSTALL_STRIP], 904[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 905# Installed binaries are usually stripped using `strip' when the user 906# run `make install-strip'. However `strip' might not be the right 907# tool to use in cross-compilation environments, therefore Automake 908# will honor the `STRIP' environment variable to overrule this program. 909dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 910if test "$cross_compiling" != no; then 911 AC_CHECK_TOOL([STRIP], [strip], :) 912fi 913INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 914AC_SUBST([INSTALL_STRIP_PROGRAM])]) 915 916# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 917# 918# This file is free software; the Free Software Foundation 919# gives unlimited permission to copy and/or distribute it, 920# with or without modifications, as long as this notice is preserved. 921 922# serial 2 923 924# _AM_SUBST_NOTMAKE(VARIABLE) 925# --------------------------- 926# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 927# This macro is traced by Automake. 928AC_DEFUN([_AM_SUBST_NOTMAKE]) 929 930# AM_SUBST_NOTMAKE(VARIABLE) 931# --------------------------- 932# Public sister of _AM_SUBST_NOTMAKE. 933AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 934 935# Check how to create a tarball. -*- Autoconf -*- 936 937# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 938# 939# This file is free software; the Free Software Foundation 940# gives unlimited permission to copy and/or distribute it, 941# with or without modifications, as long as this notice is preserved. 942 943# serial 2 944 945# _AM_PROG_TAR(FORMAT) 946# -------------------- 947# Check how to create a tarball in format FORMAT. 948# FORMAT should be one of `v7', `ustar', or `pax'. 949# 950# Substitute a variable $(am__tar) that is a command 951# writing to stdout a FORMAT-tarball containing the directory 952# $tardir. 953# tardir=directory && $(am__tar) > result.tar 954# 955# Substitute a variable $(am__untar) that extract such 956# a tarball read from stdin. 957# $(am__untar) < result.tar 958AC_DEFUN([_AM_PROG_TAR], 959[# Always define AMTAR for backward compatibility. 960AM_MISSING_PROG([AMTAR], [tar]) 961m4_if([$1], [v7], 962 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 963 [m4_case([$1], [ustar],, [pax],, 964 [m4_fatal([Unknown tar format])]) 965AC_MSG_CHECKING([how to create a $1 tar archive]) 966# Loop over all known methods to create a tar archive until one works. 967_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 968_am_tools=${am_cv_prog_tar_$1-$_am_tools} 969# Do not fold the above two line into one, because Tru64 sh and 970# Solaris sh will not grok spaces in the rhs of `-'. 971for _am_tool in $_am_tools 972do 973 case $_am_tool in 974 gnutar) 975 for _am_tar in tar gnutar gtar; 976 do 977 AM_RUN_LOG([$_am_tar --version]) && break 978 done 979 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 980 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 981 am__untar="$_am_tar -xf -" 982 ;; 983 plaintar) 984 # Must skip GNU tar: if it does not support --format= it doesn't create 985 # ustar tarball either. 986 (tar --version) >/dev/null 2>&1 && continue 987 am__tar='tar chf - "$$tardir"' 988 am__tar_='tar chf - "$tardir"' 989 am__untar='tar xf -' 990 ;; 991 pax) 992 am__tar='pax -L -x $1 -w "$$tardir"' 993 am__tar_='pax -L -x $1 -w "$tardir"' 994 am__untar='pax -r' 995 ;; 996 cpio) 997 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 998 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 999 am__untar='cpio -i -H $1 -d' 1000 ;; 1001 none) 1002 am__tar=false 1003 am__tar_=false 1004 am__untar=false 1005 ;; 1006 esac 1007 1008 # If the value was cached, stop now. We just wanted to have am__tar 1009 # and am__untar set. 1010 test -n "${am_cv_prog_tar_$1}" && break 1011 1012 # tar/untar a dummy directory, and stop if the command works 1013 rm -rf conftest.dir 1014 mkdir conftest.dir 1015 echo GrepMe > conftest.dir/file 1016 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1017 rm -rf conftest.dir 1018 if test -s conftest.tar; then 1019 AM_RUN_LOG([$am__untar <conftest.tar]) 1020 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1021 fi 1022done 1023rm -rf conftest.dir 1024 1025AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1026AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1027AC_SUBST([am__tar]) 1028AC_SUBST([am__untar]) 1029]) # _AM_PROG_TAR 1030 1031dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1032dnl 1033dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 1034dnl 1035dnl Permission is hereby granted, free of charge, to any person obtaining a 1036dnl copy of this software and associated documentation files (the "Software"), 1037dnl to deal in the Software without restriction, including without limitation 1038dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1039dnl and/or sell copies of the Software, and to permit persons to whom the 1040dnl Software is furnished to do so, subject to the following conditions: 1041dnl 1042dnl The above copyright notice and this permission notice (including the next 1043dnl paragraph) shall be included in all copies or substantial portions of the 1044dnl Software. 1045dnl 1046dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1047dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1048dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1049dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1050dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1051dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1052dnl DEALINGS IN THE SOFTWARE. 1053 1054# XORG_MACROS_VERSION(required-version) 1055# ------------------------------------- 1056# Minimum version: 1.1.0 1057# 1058# If you're using a macro added in Version 1.1 or newer, include this in 1059# your configure.ac with the minimum required version, such as: 1060# XORG_MACROS_VERSION(1.1) 1061# 1062# To ensure that this macro is defined, also add: 1063# m4_ifndef([XORG_MACROS_VERSION], 1064# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1065# 1066# 1067# See the "minimum version" comment for each macro you use to see what 1068# version you require. 1069m4_defun([XORG_MACROS_VERSION],[ 1070m4_define([vers_have], [1.10.1]) 1071m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1072m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1073m4_if(m4_cmp(maj_have, maj_needed), 0,, 1074 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1075m4_if(m4_version_compare(vers_have, [$1]), -1, 1076 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1077m4_undefine([vers_have]) 1078m4_undefine([maj_have]) 1079m4_undefine([maj_needed]) 1080]) # XORG_MACROS_VERSION 1081 1082# XORG_PROG_RAWCPP() 1083# ------------------ 1084# Minimum version: 1.0.0 1085# 1086# Find cpp program and necessary flags for use in pre-processing text files 1087# such as man pages and config files 1088AC_DEFUN([XORG_PROG_RAWCPP],[ 1089AC_REQUIRE([AC_PROG_CPP]) 1090AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1091 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1092 1093# Check for flag to avoid builtin definitions - assumes unix is predefined, 1094# which is not the best choice for supporting other OS'es, but covers most 1095# of the ones we need for now. 1096AC_MSG_CHECKING([if $RAWCPP requires -undef]) 1097AC_LANG_CONFTEST([Does cpp redefine unix ?]) 1098if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1099 AC_MSG_RESULT([no]) 1100else 1101 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1102 RAWCPPFLAGS=-undef 1103 AC_MSG_RESULT([yes]) 1104 # under Cygwin unix is still defined even with -undef 1105 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1106 RAWCPPFLAGS="-undef -ansi" 1107 AC_MSG_RESULT([yes, with -ansi]) 1108 else 1109 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1110 fi 1111fi 1112rm -f conftest.$ac_ext 1113 1114AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1115AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1116if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1117 AC_MSG_RESULT([no]) 1118else 1119 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1120 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1121 AC_MSG_RESULT([yes]) 1122 else 1123 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1124 fi 1125fi 1126rm -f conftest.$ac_ext 1127AC_SUBST(RAWCPPFLAGS) 1128]) # XORG_PROG_RAWCPP 1129 1130# XORG_MANPAGE_SECTIONS() 1131# ----------------------- 1132# Minimum version: 1.0.0 1133# 1134# Determine which sections man pages go in for the different man page types 1135# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1136# Not sure if there's any better way than just hardcoding by OS name. 1137# Override default settings by setting environment variables 1138# Added MAN_SUBSTS in version 1.8 1139# Added AC_PROG_SED in version 1.8 1140 1141AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1142AC_REQUIRE([AC_CANONICAL_HOST]) 1143AC_REQUIRE([AC_PROG_SED]) 1144 1145if test x$APP_MAN_SUFFIX = x ; then 1146 APP_MAN_SUFFIX=1 1147fi 1148if test x$APP_MAN_DIR = x ; then 1149 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1150fi 1151 1152if test x$LIB_MAN_SUFFIX = x ; then 1153 LIB_MAN_SUFFIX=3 1154fi 1155if test x$LIB_MAN_DIR = x ; then 1156 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1157fi 1158 1159if test x$FILE_MAN_SUFFIX = x ; then 1160 case $host_os in 1161 solaris*) FILE_MAN_SUFFIX=4 ;; 1162 *) FILE_MAN_SUFFIX=5 ;; 1163 esac 1164fi 1165if test x$FILE_MAN_DIR = x ; then 1166 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1167fi 1168 1169if test x$MISC_MAN_SUFFIX = x ; then 1170 case $host_os in 1171 solaris*) MISC_MAN_SUFFIX=5 ;; 1172 *) MISC_MAN_SUFFIX=7 ;; 1173 esac 1174fi 1175if test x$MISC_MAN_DIR = x ; then 1176 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1177fi 1178 1179if test x$DRIVER_MAN_SUFFIX = x ; then 1180 case $host_os in 1181 solaris*) DRIVER_MAN_SUFFIX=7 ;; 1182 *) DRIVER_MAN_SUFFIX=4 ;; 1183 esac 1184fi 1185if test x$DRIVER_MAN_DIR = x ; then 1186 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1187fi 1188 1189if test x$ADMIN_MAN_SUFFIX = x ; then 1190 case $host_os in 1191 solaris*) ADMIN_MAN_SUFFIX=1m ;; 1192 *) ADMIN_MAN_SUFFIX=8 ;; 1193 esac 1194fi 1195if test x$ADMIN_MAN_DIR = x ; then 1196 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1197fi 1198 1199 1200AC_SUBST([APP_MAN_SUFFIX]) 1201AC_SUBST([LIB_MAN_SUFFIX]) 1202AC_SUBST([FILE_MAN_SUFFIX]) 1203AC_SUBST([MISC_MAN_SUFFIX]) 1204AC_SUBST([DRIVER_MAN_SUFFIX]) 1205AC_SUBST([ADMIN_MAN_SUFFIX]) 1206AC_SUBST([APP_MAN_DIR]) 1207AC_SUBST([LIB_MAN_DIR]) 1208AC_SUBST([FILE_MAN_DIR]) 1209AC_SUBST([MISC_MAN_DIR]) 1210AC_SUBST([DRIVER_MAN_DIR]) 1211AC_SUBST([ADMIN_MAN_DIR]) 1212 1213XORG_MAN_PAGE="X Version 11" 1214AC_SUBST([XORG_MAN_PAGE]) 1215MAN_SUBSTS="\ 1216 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1217 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1218 -e 's|__xservername__|Xorg|g' \ 1219 -e 's|__xconfigfile__|xorg.conf|g' \ 1220 -e 's|__projectroot__|\$(prefix)|g' \ 1221 -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1222 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1223 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1224 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1225 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1226 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1227 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1228AC_SUBST([MAN_SUBSTS]) 1229 1230]) # XORG_MANPAGE_SECTIONS 1231 1232# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1233# ------------------------ 1234# Minimum version: 1.7.0 1235# 1236# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1237# provided by xorg-sgml-doctools, if installed. 1238AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1239AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1240XORG_SGML_PATH= 1241PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1242 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1243 [m4_ifval([$1],[:], 1244 [if test x"$cross_compiling" != x"yes" ; then 1245 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1246 [XORG_SGML_PATH=$prefix/share/sgml]) 1247 fi]) 1248 ]) 1249 1250# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1251# the path and the name of the doc stylesheet 1252if test "x$XORG_SGML_PATH" != "x" ; then 1253 AC_MSG_RESULT([$XORG_SGML_PATH]) 1254 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1255 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1256else 1257 AC_MSG_RESULT([no]) 1258fi 1259 1260AC_SUBST(XORG_SGML_PATH) 1261AC_SUBST(STYLESHEET_SRCDIR) 1262AC_SUBST(XSL_STYLESHEET) 1263AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1264]) # XORG_CHECK_SGML_DOCTOOLS 1265 1266# XORG_CHECK_LINUXDOC 1267# ------------------- 1268# Minimum version: 1.0.0 1269# 1270# Defines the variable MAKE_TEXT if the necessary tools and 1271# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1272# Whether or not the necessary tools and files are found can be checked 1273# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1274AC_DEFUN([XORG_CHECK_LINUXDOC],[ 1275AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1276AC_REQUIRE([XORG_WITH_PS2PDF]) 1277 1278AC_PATH_PROG(LINUXDOC, linuxdoc) 1279 1280AC_MSG_CHECKING([whether to build documentation]) 1281 1282if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1283 BUILDDOC=yes 1284else 1285 BUILDDOC=no 1286fi 1287 1288AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1289 1290AC_MSG_RESULT([$BUILDDOC]) 1291 1292AC_MSG_CHECKING([whether to build pdf documentation]) 1293 1294if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1295 BUILDPDFDOC=yes 1296else 1297 BUILDPDFDOC=no 1298fi 1299 1300AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1301 1302AC_MSG_RESULT([$BUILDPDFDOC]) 1303 1304MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1305MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1306MAKE_PDF="$PS2PDF" 1307MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1308 1309AC_SUBST(MAKE_TEXT) 1310AC_SUBST(MAKE_PS) 1311AC_SUBST(MAKE_PDF) 1312AC_SUBST(MAKE_HTML) 1313]) # XORG_CHECK_LINUXDOC 1314 1315# XORG_CHECK_DOCBOOK 1316# ------------------- 1317# Minimum version: 1.0.0 1318# 1319# Checks for the ability to build output formats from SGML DocBook source. 1320# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1321# indicates whether the necessary tools and files are found and, if set, 1322# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1323AC_DEFUN([XORG_CHECK_DOCBOOK],[ 1324AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1325 1326BUILDTXTDOC=no 1327BUILDPDFDOC=no 1328BUILDPSDOC=no 1329BUILDHTMLDOC=no 1330 1331AC_PATH_PROG(DOCBOOKPS, docbook2ps) 1332AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1333AC_PATH_PROG(DOCBOOKHTML, docbook2html) 1334AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1335 1336AC_MSG_CHECKING([whether to build text documentation]) 1337if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1338 test x$BUILD_TXTDOC != xno; then 1339 BUILDTXTDOC=yes 1340fi 1341AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1342AC_MSG_RESULT([$BUILDTXTDOC]) 1343 1344AC_MSG_CHECKING([whether to build PDF documentation]) 1345if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1346 test x$BUILD_PDFDOC != xno; then 1347 BUILDPDFDOC=yes 1348fi 1349AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1350AC_MSG_RESULT([$BUILDPDFDOC]) 1351 1352AC_MSG_CHECKING([whether to build PostScript documentation]) 1353if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1354 test x$BUILD_PSDOC != xno; then 1355 BUILDPSDOC=yes 1356fi 1357AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1358AC_MSG_RESULT([$BUILDPSDOC]) 1359 1360AC_MSG_CHECKING([whether to build HTML documentation]) 1361if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1362 test x$BUILD_HTMLDOC != xno; then 1363 BUILDHTMLDOC=yes 1364fi 1365AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1366AC_MSG_RESULT([$BUILDHTMLDOC]) 1367 1368MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1369MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1370MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1371MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1372 1373AC_SUBST(MAKE_TEXT) 1374AC_SUBST(MAKE_PS) 1375AC_SUBST(MAKE_PDF) 1376AC_SUBST(MAKE_HTML) 1377]) # XORG_CHECK_DOCBOOK 1378 1379# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1380# ---------------- 1381# Minimum version: 1.5.0 1382# 1383# Documentation tools are not always available on all platforms and sometimes 1384# not at the appropriate level. This macro enables a module to test for the 1385# presence of the tool and obtain it's path in separate variables. Coupled with 1386# the --with-xmlto option, it allows maximum flexibilty in making decisions 1387# as whether or not to use the xmlto package. When DEFAULT is not specified, 1388# --with-xmlto assumes 'auto'. 1389# 1390# Interface to module: 1391# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1392# XMLTO: returns the path of the xmlto program found 1393# returns the path set by the user in the environment 1394# --with-xmlto: 'yes' user instructs the module to use xmlto 1395# 'no' user instructs the module not to use xmlto 1396# 1397# Added in version 1.10.0 1398# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1399# xmlto for text output requires either lynx, links, or w3m browsers 1400# 1401# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1402# 1403AC_DEFUN([XORG_WITH_XMLTO],[ 1404AC_ARG_VAR([XMLTO], [Path to xmlto command]) 1405m4_define([_defopt], m4_default([$2], [auto])) 1406AC_ARG_WITH(xmlto, 1407 AS_HELP_STRING([--with-xmlto], 1408 [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1409 [use_xmlto=$withval], [use_xmlto=]_defopt) 1410m4_undefine([_defopt]) 1411 1412if test "x$use_xmlto" = x"auto"; then 1413 AC_PATH_PROG([XMLTO], [xmlto]) 1414 if test "x$XMLTO" = "x"; then 1415 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1416 have_xmlto=no 1417 else 1418 have_xmlto=yes 1419 fi 1420elif test "x$use_xmlto" = x"yes" ; then 1421 AC_PATH_PROG([XMLTO], [xmlto]) 1422 if test "x$XMLTO" = "x"; then 1423 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1424 fi 1425 have_xmlto=yes 1426elif test "x$use_xmlto" = x"no" ; then 1427 if test "x$XMLTO" != "x"; then 1428 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1429 fi 1430 have_xmlto=no 1431else 1432 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1433fi 1434 1435# Test for a minimum version of xmlto, if provided. 1436m4_ifval([$1], 1437[if test "$have_xmlto" = yes; then 1438 # scrape the xmlto version 1439 AC_MSG_CHECKING([the xmlto version]) 1440 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1441 AC_MSG_RESULT([$xmlto_version]) 1442 AS_VERSION_COMPARE([$xmlto_version], [$1], 1443 [if test "x$use_xmlto" = xauto; then 1444 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1445 have_xmlto=no 1446 else 1447 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1448 fi]) 1449fi]) 1450 1451# Test for the ability of xmlto to generate a text target 1452have_xmlto_text=no 1453cat > conftest.xml << "EOF" 1454EOF 1455AS_IF([test "$have_xmlto" = yes], 1456 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1457 [have_xmlto_text=yes], 1458 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1459rm -f conftest.xml 1460AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1461AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1462]) # XORG_WITH_XMLTO 1463 1464# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1465# ---------------- 1466# Minimum version: 1.5.0 1467# 1468# Documentation tools are not always available on all platforms and sometimes 1469# not at the appropriate level. This macro enables a module to test for the 1470# presence of the tool and obtain it's path in separate variables. Coupled with 1471# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1472# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1473# --with-asciidoc assumes 'auto'. 1474# 1475# Interface to module: 1476# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1477# ASCIIDOC: returns the path of the asciidoc program found 1478# returns the path set by the user in the environment 1479# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1480# 'no' user instructs the module not to use asciidoc 1481# 1482# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1483# 1484AC_DEFUN([XORG_WITH_ASCIIDOC],[ 1485AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1486m4_define([_defopt], m4_default([$2], [auto])) 1487AC_ARG_WITH(asciidoc, 1488 AS_HELP_STRING([--with-asciidoc], 1489 [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1490 [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1491m4_undefine([_defopt]) 1492 1493if test "x$use_asciidoc" = x"auto"; then 1494 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1495 if test "x$ASCIIDOC" = "x"; then 1496 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1497 have_asciidoc=no 1498 else 1499 have_asciidoc=yes 1500 fi 1501elif test "x$use_asciidoc" = x"yes" ; then 1502 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1503 if test "x$ASCIIDOC" = "x"; then 1504 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1505 fi 1506 have_asciidoc=yes 1507elif test "x$use_asciidoc" = x"no" ; then 1508 if test "x$ASCIIDOC" != "x"; then 1509 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1510 fi 1511 have_asciidoc=no 1512else 1513 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1514fi 1515m4_ifval([$1], 1516[if test "$have_asciidoc" = yes; then 1517 # scrape the asciidoc version 1518 AC_MSG_CHECKING([the asciidoc version]) 1519 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1520 AC_MSG_RESULT([$asciidoc_version]) 1521 AS_VERSION_COMPARE([$asciidoc_version], [$1], 1522 [if test "x$use_asciidoc" = xauto; then 1523 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1524 have_asciidoc=no 1525 else 1526 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1527 fi]) 1528fi]) 1529AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1530]) # XORG_WITH_ASCIIDOC 1531 1532# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1533# -------------------------------- 1534# Minimum version: 1.5.0 1535# 1536# Documentation tools are not always available on all platforms and sometimes 1537# not at the appropriate level. This macro enables a module to test for the 1538# presence of the tool and obtain it's path in separate variables. Coupled with 1539# the --with-doxygen option, it allows maximum flexibilty in making decisions 1540# as whether or not to use the doxygen package. When DEFAULT is not specified, 1541# --with-doxygen assumes 'auto'. 1542# 1543# Interface to module: 1544# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1545# DOXYGEN: returns the path of the doxygen program found 1546# returns the path set by the user in the environment 1547# --with-doxygen: 'yes' user instructs the module to use doxygen 1548# 'no' user instructs the module not to use doxygen 1549# 1550# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1551# 1552AC_DEFUN([XORG_WITH_DOXYGEN],[ 1553AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1554m4_define([_defopt], m4_default([$2], [auto])) 1555AC_ARG_WITH(doxygen, 1556 AS_HELP_STRING([--with-doxygen], 1557 [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1558 [use_doxygen=$withval], [use_doxygen=]_defopt) 1559m4_undefine([_defopt]) 1560 1561if test "x$use_doxygen" = x"auto"; then 1562 AC_PATH_PROG([DOXYGEN], [doxygen]) 1563 if test "x$DOXYGEN" = "x"; then 1564 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1565 have_doxygen=no 1566 else 1567 have_doxygen=yes 1568 fi 1569elif test "x$use_doxygen" = x"yes" ; then 1570 AC_PATH_PROG([DOXYGEN], [doxygen]) 1571 if test "x$DOXYGEN" = "x"; then 1572 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1573 fi 1574 have_doxygen=yes 1575elif test "x$use_doxygen" = x"no" ; then 1576 if test "x$DOXYGEN" != "x"; then 1577 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1578 fi 1579 have_doxygen=no 1580else 1581 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1582fi 1583m4_ifval([$1], 1584[if test "$have_doxygen" = yes; then 1585 # scrape the doxygen version 1586 AC_MSG_CHECKING([the doxygen version]) 1587 doxygen_version=`$DOXYGEN --version 2>/dev/null` 1588 AC_MSG_RESULT([$doxygen_version]) 1589 AS_VERSION_COMPARE([$doxygen_version], [$1], 1590 [if test "x$use_doxygen" = xauto; then 1591 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1592 have_doxygen=no 1593 else 1594 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1595 fi]) 1596fi]) 1597AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1598]) # XORG_WITH_DOXYGEN 1599 1600# XORG_WITH_GROFF([DEFAULT]) 1601# ---------------- 1602# Minimum version: 1.6.0 1603# 1604# Documentation tools are not always available on all platforms and sometimes 1605# not at the appropriate level. This macro enables a module to test for the 1606# presence of the tool and obtain it's path in separate variables. Coupled with 1607# the --with-groff option, it allows maximum flexibilty in making decisions 1608# as whether or not to use the groff package. When DEFAULT is not specified, 1609# --with-groff assumes 'auto'. 1610# 1611# Interface to module: 1612# HAVE_GROFF: used in makefiles to conditionally generate documentation 1613# HAVE_GROFF_MM: the memorandum macros (-mm) package 1614# HAVE_GROFF_MS: the -ms macros package 1615# GROFF: returns the path of the groff program found 1616# returns the path set by the user in the environment 1617# --with-groff: 'yes' user instructs the module to use groff 1618# 'no' user instructs the module not to use groff 1619# 1620# Added in version 1.9.0: 1621# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1622# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1623# psselect from the psutils package. 1624# the ghostcript package. Refer to the grohtml man pages 1625# 1626# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1627# 1628# OS and distros often splits groff in a basic and full package, the former 1629# having the groff program and the later having devices, fonts and macros 1630# Checking for the groff executable is not enough. 1631# 1632# If macros are missing, we cannot assume that groff is useless, so we don't 1633# unset HAVE_GROFF or GROFF env variables. 1634# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1635# 1636AC_DEFUN([XORG_WITH_GROFF],[ 1637AC_ARG_VAR([GROFF], [Path to groff command]) 1638m4_define([_defopt], m4_default([$1], [auto])) 1639AC_ARG_WITH(groff, 1640 AS_HELP_STRING([--with-groff], 1641 [Use groff to regenerate documentation (default: ]_defopt[)]), 1642 [use_groff=$withval], [use_groff=]_defopt) 1643m4_undefine([_defopt]) 1644 1645if test "x$use_groff" = x"auto"; then 1646 AC_PATH_PROG([GROFF], [groff]) 1647 if test "x$GROFF" = "x"; then 1648 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1649 have_groff=no 1650 else 1651 have_groff=yes 1652 fi 1653elif test "x$use_groff" = x"yes" ; then 1654 AC_PATH_PROG([GROFF], [groff]) 1655 if test "x$GROFF" = "x"; then 1656 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1657 fi 1658 have_groff=yes 1659elif test "x$use_groff" = x"no" ; then 1660 if test "x$GROFF" != "x"; then 1661 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1662 fi 1663 have_groff=no 1664else 1665 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1666fi 1667 1668# We have groff, test for the presence of the macro packages 1669if test "x$have_groff" = x"yes"; then 1670 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1671 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1672 groff_ms_works=yes 1673 else 1674 groff_ms_works=no 1675 fi 1676 AC_MSG_RESULT([$groff_ms_works]) 1677 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1678 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1679 groff_mm_works=yes 1680 else 1681 groff_mm_works=no 1682 fi 1683 AC_MSG_RESULT([$groff_mm_works]) 1684fi 1685 1686# We have groff, test for HTML dependencies, one command per package 1687if test "x$have_groff" = x"yes"; then 1688 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1689 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1690 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1691 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1692 have_groff_html=yes 1693 else 1694 have_groff_html=no 1695 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1696 fi 1697fi 1698 1699# Set Automake conditionals for Makefiles 1700AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1701AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1702AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1703AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1704]) # XORG_WITH_GROFF 1705 1706# XORG_WITH_FOP([DEFAULT]) 1707# ---------------- 1708# Minimum version: 1.6.0 1709# 1710# Documentation tools are not always available on all platforms and sometimes 1711# not at the appropriate level. This macro enables a module to test for the 1712# presence of the tool and obtain it's path in separate variables. Coupled with 1713# the --with-fop option, it allows maximum flexibilty in making decisions 1714# as whether or not to use the fop package. When DEFAULT is not specified, 1715# --with-fop assumes 'auto'. 1716# 1717# Interface to module: 1718# HAVE_FOP: used in makefiles to conditionally generate documentation 1719# FOP: returns the path of the fop program found 1720# returns the path set by the user in the environment 1721# --with-fop: 'yes' user instructs the module to use fop 1722# 'no' user instructs the module not to use fop 1723# 1724# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1725# 1726AC_DEFUN([XORG_WITH_FOP],[ 1727AC_ARG_VAR([FOP], [Path to fop command]) 1728m4_define([_defopt], m4_default([$1], [auto])) 1729AC_ARG_WITH(fop, 1730 AS_HELP_STRING([--with-fop], 1731 [Use fop to regenerate documentation (default: ]_defopt[)]), 1732 [use_fop=$withval], [use_fop=]_defopt) 1733m4_undefine([_defopt]) 1734 1735if test "x$use_fop" = x"auto"; then 1736 AC_PATH_PROG([FOP], [fop]) 1737 if test "x$FOP" = "x"; then 1738 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1739 have_fop=no 1740 else 1741 have_fop=yes 1742 fi 1743elif test "x$use_fop" = x"yes" ; then 1744 AC_PATH_PROG([FOP], [fop]) 1745 if test "x$FOP" = "x"; then 1746 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1747 fi 1748 have_fop=yes 1749elif test "x$use_fop" = x"no" ; then 1750 if test "x$FOP" != "x"; then 1751 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1752 fi 1753 have_fop=no 1754else 1755 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1756fi 1757AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1758]) # XORG_WITH_FOP 1759 1760# XORG_WITH_PS2PDF([DEFAULT]) 1761# ---------------- 1762# Minimum version: 1.6.0 1763# 1764# Documentation tools are not always available on all platforms and sometimes 1765# not at the appropriate level. This macro enables a module to test for the 1766# presence of the tool and obtain it's path in separate variables. Coupled with 1767# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1768# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1769# --with-ps2pdf assumes 'auto'. 1770# 1771# Interface to module: 1772# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1773# PS2PDF: returns the path of the ps2pdf program found 1774# returns the path set by the user in the environment 1775# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1776# 'no' user instructs the module not to use ps2pdf 1777# 1778# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1779# 1780AC_DEFUN([XORG_WITH_PS2PDF],[ 1781AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1782m4_define([_defopt], m4_default([$1], [auto])) 1783AC_ARG_WITH(ps2pdf, 1784 AS_HELP_STRING([--with-ps2pdf], 1785 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1786 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1787m4_undefine([_defopt]) 1788 1789if test "x$use_ps2pdf" = x"auto"; then 1790 AC_PATH_PROG([PS2PDF], [ps2pdf]) 1791 if test "x$PS2PDF" = "x"; then 1792 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1793 have_ps2pdf=no 1794 else 1795 have_ps2pdf=yes 1796 fi 1797elif test "x$use_ps2pdf" = x"yes" ; then 1798 AC_PATH_PROG([PS2PDF], [ps2pdf]) 1799 if test "x$PS2PDF" = "x"; then 1800 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1801 fi 1802 have_ps2pdf=yes 1803elif test "x$use_ps2pdf" = x"no" ; then 1804 if test "x$PS2PDF" != "x"; then 1805 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1806 fi 1807 have_ps2pdf=no 1808else 1809 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1810fi 1811AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1812]) # XORG_WITH_PS2PDF 1813 1814# XORG_ENABLE_DOCS (enable_docs=yes) 1815# ---------------- 1816# Minimum version: 1.6.0 1817# 1818# Documentation tools are not always available on all platforms and sometimes 1819# not at the appropriate level. This macro enables a builder to skip all 1820# documentation targets except traditional man pages. 1821# Combined with the specific tool checking macros XORG_WITH_*, it provides 1822# maximum flexibilty in controlling documentation building. 1823# Refer to: 1824# XORG_WITH_XMLTO --with-xmlto 1825# XORG_WITH_ASCIIDOC --with-asciidoc 1826# XORG_WITH_DOXYGEN --with-doxygen 1827# XORG_WITH_FOP --with-fop 1828# XORG_WITH_GROFF --with-groff 1829# XORG_WITH_PS2PDF --with-ps2pdf 1830# 1831# Interface to module: 1832# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1833# --enable-docs: 'yes' user instructs the module to generate docs 1834# 'no' user instructs the module not to generate docs 1835# parm1: specify the default value, yes or no. 1836# 1837AC_DEFUN([XORG_ENABLE_DOCS],[ 1838m4_define([default], m4_default([$1], [yes])) 1839AC_ARG_ENABLE(docs, 1840 AS_HELP_STRING([--enable-docs], 1841 [Enable building the documentation (default: ]default[)]), 1842 [build_docs=$enableval], [build_docs=]default) 1843m4_undefine([default]) 1844AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1845AC_MSG_CHECKING([whether to build documentation]) 1846AC_MSG_RESULT([$build_docs]) 1847]) # XORG_ENABLE_DOCS 1848 1849# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1850# ---------------- 1851# Minimum version: 1.6.0 1852# 1853# This macro enables a builder to skip all developer documentation. 1854# Combined with the specific tool checking macros XORG_WITH_*, it provides 1855# maximum flexibilty in controlling documentation building. 1856# Refer to: 1857# XORG_WITH_XMLTO --with-xmlto 1858# XORG_WITH_ASCIIDOC --with-asciidoc 1859# XORG_WITH_DOXYGEN --with-doxygen 1860# XORG_WITH_FOP --with-fop 1861# XORG_WITH_GROFF --with-groff 1862# XORG_WITH_PS2PDF --with-ps2pdf 1863# 1864# Interface to module: 1865# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1866# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1867# 'no' user instructs the module not to generate developer docs 1868# parm1: specify the default value, yes or no. 1869# 1870AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1871m4_define([devel_default], m4_default([$1], [yes])) 1872AC_ARG_ENABLE(devel-docs, 1873 AS_HELP_STRING([--enable-devel-docs], 1874 [Enable building the developer documentation (default: ]devel_default[)]), 1875 [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1876m4_undefine([devel_default]) 1877AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1878AC_MSG_CHECKING([whether to build developer documentation]) 1879AC_MSG_RESULT([$build_devel_docs]) 1880]) # XORG_ENABLE_DEVEL_DOCS 1881 1882# XORG_ENABLE_SPECS (enable_specs=yes) 1883# ---------------- 1884# Minimum version: 1.6.0 1885# 1886# This macro enables a builder to skip all functional specification targets. 1887# Combined with the specific tool checking macros XORG_WITH_*, it provides 1888# maximum flexibilty in controlling documentation building. 1889# Refer to: 1890# XORG_WITH_XMLTO --with-xmlto 1891# XORG_WITH_ASCIIDOC --with-asciidoc 1892# XORG_WITH_DOXYGEN --with-doxygen 1893# XORG_WITH_FOP --with-fop 1894# XORG_WITH_GROFF --with-groff 1895# XORG_WITH_PS2PDF --with-ps2pdf 1896# 1897# Interface to module: 1898# ENABLE_SPECS: used in makefiles to conditionally generate specs 1899# --enable-specs: 'yes' user instructs the module to generate specs 1900# 'no' user instructs the module not to generate specs 1901# parm1: specify the default value, yes or no. 1902# 1903AC_DEFUN([XORG_ENABLE_SPECS],[ 1904m4_define([spec_default], m4_default([$1], [yes])) 1905AC_ARG_ENABLE(specs, 1906 AS_HELP_STRING([--enable-specs], 1907 [Enable building the specs (default: ]spec_default[)]), 1908 [build_specs=$enableval], [build_specs=]spec_default) 1909m4_undefine([spec_default]) 1910AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1911AC_MSG_CHECKING([whether to build functional specifications]) 1912AC_MSG_RESULT([$build_specs]) 1913]) # XORG_ENABLE_SPECS 1914 1915# XORG_CHECK_MALLOC_ZERO 1916# ---------------------- 1917# Minimum version: 1.0.0 1918# 1919# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1920# malloc(0) returns NULL. Packages should add one of these cflags to 1921# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1922AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1923AC_ARG_ENABLE(malloc0returnsnull, 1924 AS_HELP_STRING([--enable-malloc0returnsnull], 1925 [malloc(0) returns NULL (default: auto)]), 1926 [MALLOC_ZERO_RETURNS_NULL=$enableval], 1927 [MALLOC_ZERO_RETURNS_NULL=auto]) 1928 1929AC_MSG_CHECKING([whether malloc(0) returns NULL]) 1930if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1931 AC_RUN_IFELSE([ 1932char *malloc(); 1933char *realloc(); 1934char *calloc(); 1935main() { 1936 char *m0, *r0, *c0, *p; 1937 m0 = malloc(0); 1938 p = malloc(10); 1939 r0 = realloc(p,0); 1940 c0 = calloc(0); 1941 exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1942}], 1943 [MALLOC_ZERO_RETURNS_NULL=yes], 1944 [MALLOC_ZERO_RETURNS_NULL=no], 1945 [MALLOC_ZERO_RETURNS_NULL=yes]) 1946fi 1947AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1948 1949if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1950 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1951 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1952 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1953else 1954 MALLOC_ZERO_CFLAGS="" 1955 XMALLOC_ZERO_CFLAGS="" 1956 XTMALLOC_ZERO_CFLAGS="" 1957fi 1958 1959AC_SUBST([MALLOC_ZERO_CFLAGS]) 1960AC_SUBST([XMALLOC_ZERO_CFLAGS]) 1961AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1962]) # XORG_CHECK_MALLOC_ZERO 1963 1964# XORG_WITH_LINT() 1965# ---------------- 1966# Minimum version: 1.1.0 1967# 1968# This macro enables the use of a tool that flags some suspicious and 1969# non-portable constructs (likely to be bugs) in C language source code. 1970# It will attempt to locate the tool and use appropriate options. 1971# There are various lint type tools on different platforms. 1972# 1973# Interface to module: 1974# LINT: returns the path to the tool found on the platform 1975# or the value set to LINT on the configure cmd line 1976# also an Automake conditional 1977# LINT_FLAGS: an Automake variable with appropriate flags 1978# 1979# --with-lint: 'yes' user instructs the module to use lint 1980# 'no' user instructs the module not to use lint (default) 1981# 1982# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1983# If the user sets the value of LINT_FLAGS, they are used verbatim. 1984# 1985AC_DEFUN([XORG_WITH_LINT],[ 1986 1987AC_ARG_VAR([LINT], [Path to a lint-style command]) 1988AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1989AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1990 [Use a lint-style source code checker (default: disabled)])], 1991 [use_lint=$withval], [use_lint=no]) 1992 1993# Obtain platform specific info like program name and options 1994# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1995case $host_os in 1996 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1997 lint_name=splint 1998 lint_options="-badflag" 1999 ;; 2000 *freebsd* | *netbsd*) 2001 lint_name=lint 2002 lint_options="-u -b" 2003 ;; 2004 *solaris*) 2005 lint_name=lint 2006 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2007 ;; 2008esac 2009 2010# Test for the presence of the program (either guessed by the code or spelled out by the user) 2011if test "x$use_lint" = x"yes" ; then 2012 AC_PATH_PROG([LINT], [$lint_name]) 2013 if test "x$LINT" = "x"; then 2014 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2015 fi 2016elif test "x$use_lint" = x"no" ; then 2017 if test "x$LINT" != "x"; then 2018 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2019 fi 2020else 2021 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2022fi 2023 2024# User supplied flags override default flags 2025if test "x$LINT_FLAGS" != "x"; then 2026 lint_options=$LINT_FLAGS 2027fi 2028 2029AC_SUBST([LINT_FLAGS],[$lint_options]) 2030AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2031 2032]) # XORG_WITH_LINT 2033 2034# XORG_LINT_LIBRARY(LIBNAME) 2035# -------------------------- 2036# Minimum version: 1.1.0 2037# 2038# Sets up flags for building lint libraries for checking programs that call 2039# functions in the library. 2040# 2041# Interface to module: 2042# LINTLIB - Automake variable with the name of lint library file to make 2043# MAKE_LINT_LIB - Automake conditional 2044# 2045# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2046# - 'no' user instructs the module not to create a lint library (default) 2047 2048AC_DEFUN([XORG_LINT_LIBRARY],[ 2049AC_REQUIRE([XORG_WITH_LINT]) 2050AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2051 [Create lint library (default: disabled)])], 2052 [make_lint_lib=$enableval], [make_lint_lib=no]) 2053 2054if test "x$make_lint_lib" = x"yes" ; then 2055 LINTLIB=llib-l$1.ln 2056 if test "x$LINT" = "x"; then 2057 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2058 fi 2059elif test "x$make_lint_lib" != x"no" ; then 2060 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2061fi 2062 2063AC_SUBST(LINTLIB) 2064AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2065 2066]) # XORG_LINT_LIBRARY 2067 2068# XORG_CWARNFLAGS 2069# --------------- 2070# Minimum version: 1.2.0 2071# 2072# Defines CWARNFLAGS to enable C compiler warnings. 2073# 2074AC_DEFUN([XORG_CWARNFLAGS], [ 2075AC_REQUIRE([AC_PROG_CC_C99]) 2076if test "x$GCC" = xyes ; then 2077 CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 2078-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 2079-Wbad-function-cast -Wformat=2" 2080 case `$CC -dumpversion` in 2081 3.4.* | 4.*) 2082 CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 2083 ;; 2084 esac 2085else 2086 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2087 if test "x$SUNCC" = "xyes"; then 2088 CWARNFLAGS="-v" 2089 fi 2090fi 2091AC_SUBST(CWARNFLAGS) 2092]) # XORG_CWARNFLAGS 2093 2094# XORG_STRICT_OPTION 2095# ----------------------- 2096# Minimum version: 1.3.0 2097# 2098# Add configure option to enable strict compilation 2099AC_DEFUN([XORG_STRICT_OPTION], [ 2100# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 2101AC_REQUIRE([AC_PROG_CC_C99]) 2102AC_REQUIRE([XORG_CWARNFLAGS]) 2103 2104AC_ARG_ENABLE(strict-compilation, 2105 AS_HELP_STRING([--enable-strict-compilation], 2106 [Enable all warnings from compiler and make them errors (default: disabled)]), 2107 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 2108if test "x$STRICT_COMPILE" = "xyes"; then 2109 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2110 AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2111 if test "x$GCC" = xyes ; then 2112 STRICT_CFLAGS="-pedantic -Werror" 2113 elif test "x$SUNCC" = "xyes"; then 2114 STRICT_CFLAGS="-errwarn" 2115 elif test "x$INTELCC" = "xyes"; then 2116 STRICT_CFLAGS="-Werror" 2117 fi 2118fi 2119CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 2120AC_SUBST([CWARNFLAGS]) 2121]) # XORG_STRICT_OPTION 2122 2123# XORG_DEFAULT_OPTIONS 2124# -------------------- 2125# Minimum version: 1.3.0 2126# 2127# Defines default options for X.Org modules. 2128# 2129AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 2130AC_REQUIRE([AC_PROG_INSTALL]) 2131XORG_CWARNFLAGS 2132XORG_STRICT_OPTION 2133XORG_RELEASE_VERSION 2134XORG_CHANGELOG 2135XORG_INSTALL 2136XORG_MANPAGE_SECTIONS 2137m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 2138 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 2139]) # XORG_DEFAULT_OPTIONS 2140 2141# XORG_INSTALL() 2142# ---------------- 2143# Minimum version: 1.4.0 2144# 2145# Defines the variable INSTALL_CMD as the command to copy 2146# INSTALL from $prefix/share/util-macros. 2147# 2148AC_DEFUN([XORG_INSTALL], [ 2149AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2150macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 2151INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 2152mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2153|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 2154echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 2155AC_SUBST([INSTALL_CMD]) 2156]) # XORG_INSTALL 2157dnl Copyright 2005 Red Hat, Inc 2158dnl 2159dnl Permission to use, copy, modify, distribute, and sell this software and its 2160dnl documentation for any purpose is hereby granted without fee, provided that 2161dnl the above copyright notice appear in all copies and that both that 2162dnl copyright notice and this permission notice appear in supporting 2163dnl documentation. 2164dnl 2165dnl The above copyright notice and this permission notice shall be included 2166dnl in all copies or substantial portions of the Software. 2167dnl 2168dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2169dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2170dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2171dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2172dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2173dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2174dnl OTHER DEALINGS IN THE SOFTWARE. 2175dnl 2176dnl Except as contained in this notice, the name of the copyright holders shall 2177dnl not be used in advertising or otherwise to promote the sale, use or 2178dnl other dealings in this Software without prior written authorization 2179dnl from the copyright holders. 2180dnl 2181 2182# XORG_RELEASE_VERSION 2183# -------------------- 2184# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 2185 2186AC_DEFUN([XORG_RELEASE_VERSION],[ 2187 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 2188 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 2189 [Major version of this package]) 2190 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 2191 if test "x$PVM" = "x"; then 2192 PVM="0" 2193 fi 2194 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 2195 [$PVM], 2196 [Minor version of this package]) 2197 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 2198 if test "x$PVP" = "x"; then 2199 PVP="0" 2200 fi 2201 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 2202 [$PVP], 2203 [Patch version of this package]) 2204]) 2205 2206# XORG_CHANGELOG() 2207# ---------------- 2208# Minimum version: 1.2.0 2209# 2210# Defines the variable CHANGELOG_CMD as the command to generate 2211# ChangeLog from git. 2212# 2213# 2214AC_DEFUN([XORG_CHANGELOG], [ 2215CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 2216mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2217|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 2218echo 'git directory not found: installing possibly empty changelog.' >&2)" 2219AC_SUBST([CHANGELOG_CMD]) 2220]) # XORG_CHANGELOG 2221 2222dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ 2223dnl 2224dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 2225dnl 2226dnl Permission is hereby granted, free of charge, to any person obtaining a 2227dnl copy of this software and associated documentation files (the "Software"), 2228dnl to deal in the Software without restriction, including without limitation 2229dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 2230dnl and/or sell copies of the Software, and to permit persons to whom the 2231dnl Software is furnished to do so, subject to the following conditions: 2232dnl 2233dnl The above copyright notice and this permission notice (including the next 2234dnl paragraph) shall be included in all copies or substantial portions of the 2235dnl Software. 2236dnl 2237dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2238dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2239dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 2240dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 2241dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 2242dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 2243dnl DEALINGS IN THE SOFTWARE. 2244dnl 2245 2246# XTRANS_TCP_FLAGS() 2247# ------------------ 2248# Find needed libraries for TCP sockets, and check for IPv6 support 2249AC_DEFUN([XTRANS_TCP_FLAGS],[ 2250 # SVR4 hides these in libraries other than libc 2251 AC_SEARCH_LIBS(socket, [socket]) 2252 AC_SEARCH_LIBS(gethostbyname, [nsl]) 2253 if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 2254 AC_HAVE_LIBRARY([ws2_32]) 2255 fi 2256 2257 # Needs to come after above checks for libsocket & libnsl for SVR4 systems 2258 AC_ARG_ENABLE(ipv6, 2259 AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 2260 [IPV6CONN=$enableval], 2261 [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 2262 AC_MSG_CHECKING([if IPv6 support should be built]) 2263 if test "$IPV6CONN" = "yes"; then 2264 AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 2265 fi 2266 AC_MSG_RESULT($IPV6CONN) 2267 2268 # 4.3BSD-Reno added a new member to struct sockaddr_in 2269 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 2270 AC_DEFINE([BSD44SOCKETS],1, 2271 [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 2272#include <sys/types.h> 2273#include <sys/socket.h> 2274#include <netinet/in.h> 2275 ]) 2276 2277 # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 2278 AC_CHECK_TYPES([socklen_t], [], [], [ 2279AC_INCLUDES_DEFAULT 2280#include <sys/socket.h>]) 2281 2282]) # XTRANS_TCP_FLAGS 2283 2284# XTRANS_CONNECTION_FLAGS() 2285# ------------------------- 2286# Standard checks for which Xtrans transports to use by the Xorg packages 2287# that use Xtrans functions 2288AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 2289 AC_REQUIRE([AC_CANONICAL_HOST]) 2290 AC_REQUIRE([AC_TYPE_SIGNAL]) 2291 [case $host_os in 2292 mingw*) unixdef="no" ;; 2293 *) unixdef="yes" ;; 2294 esac] 2295 AC_ARG_ENABLE(unix-transport, 2296 AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 2297 [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 2298 AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 2299 if test "$UNIXCONN" = "yes"; then 2300 AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 2301 fi 2302 AC_MSG_RESULT($UNIXCONN) 2303 AC_ARG_ENABLE(tcp-transport, 2304 AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 2305 [TCPCONN=$enableval], [TCPCONN=yes]) 2306 AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 2307 AC_MSG_RESULT($TCPCONN) 2308 if test "$TCPCONN" = "yes"; then 2309 AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 2310 XTRANS_TCP_FLAGS 2311 fi 2312 [case $host_os in 2313 solaris*|sco*|sysv4*) localdef="yes" ;; 2314 *) localdef="no" ;; 2315 esac] 2316 AC_ARG_ENABLE(local-transport, 2317 AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 2318 [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 2319 AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 2320 AC_MSG_RESULT($LOCALCONN) 2321 if test "$LOCALCONN" = "yes"; then 2322 AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 2323 fi 2324 2325]) # XTRANS_CONNECTION_FLAGS 2326 2327 2328# XTRANS_SECURE_RPC_FLAGS() 2329# ------------------------- 2330# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 2331# so that any necessary networking libraries are already found 2332AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 2333[AC_REQUIRE([XTRANS_TCP_FLAGS]) 2334 AC_ARG_ENABLE(secure-rpc, 2335 AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 2336 [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 2337 2338 if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 2339 FOUND_SECURE_RPC="no" 2340 AC_CHECK_FUNCS([authdes_seccreate authdes_create], 2341 [FOUND_SECURE_RPC="yes"]) 2342 if test "x$FOUND_SECURE_RPC" = "xno" ; then 2343 if test "x$SECURE_RPC" = "xyes" ; then 2344 AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 2345 fi 2346 SECURE_RPC="no" 2347 else 2348 dnl FreeBSD keeps getsecretkey in librpcsvc 2349 AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 2350 SECURE_RPC="yes" 2351 fi 2352 fi 2353 AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 2354 if test "x$SECURE_RPC" = "xyes" ; then 2355 AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 2356 fi 2357 AC_MSG_RESULT($SECURE_RPC) 2358]) # XTRANS_SECURE_RPC_FLAGS 2359 2360 2361# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2362# 2363# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2364# 2365# This program is free software; you can redistribute it and/or modify 2366# it under the terms of the GNU General Public License as published by 2367# the Free Software Foundation; either version 2 of the License, or 2368# (at your option) any later version. 2369# 2370# This program is distributed in the hope that it will be useful, but 2371# WITHOUT ANY WARRANTY; without even the implied warranty of 2372# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2373# General Public License for more details. 2374# 2375# You should have received a copy of the GNU General Public License 2376# along with this program; if not, write to the Free Software 2377# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 2378# 2379# As a special exception to the GNU General Public License, if you 2380# distribute this file as part of a program that contains a 2381# configuration script generated by Autoconf, you may include it under 2382# the same distribution terms that you use for the rest of that program. 2383 2384# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 2385# ---------------------------------- 2386AC_DEFUN([PKG_PROG_PKG_CONFIG], 2387[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 2388m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 2389AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 2390if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 2391 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 2392fi 2393if test -n "$PKG_CONFIG"; then 2394 _pkg_min_version=m4_default([$1], [0.9.0]) 2395 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 2396 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 2397 AC_MSG_RESULT([yes]) 2398 else 2399 AC_MSG_RESULT([no]) 2400 PKG_CONFIG="" 2401 fi 2402 2403fi[]dnl 2404])# PKG_PROG_PKG_CONFIG 2405 2406# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2407# 2408# Check to see whether a particular set of modules exists. Similar 2409# to PKG_CHECK_MODULES(), but does not set variables or print errors. 2410# 2411# 2412# Similar to PKG_CHECK_MODULES, make sure that the first instance of 2413# this or PKG_CHECK_MODULES is called, or make sure to call 2414# PKG_CHECK_EXISTS manually 2415# -------------------------------------------------------------- 2416AC_DEFUN([PKG_CHECK_EXISTS], 2417[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2418if test -n "$PKG_CONFIG" && \ 2419 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 2420 m4_ifval([$2], [$2], [:]) 2421m4_ifvaln([$3], [else 2422 $3])dnl 2423fi]) 2424 2425 2426# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 2427# --------------------------------------------- 2428m4_define([_PKG_CONFIG], 2429[if test -n "$$1"; then 2430 pkg_cv_[]$1="$$1" 2431 elif test -n "$PKG_CONFIG"; then 2432 PKG_CHECK_EXISTS([$3], 2433 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 2434 [pkg_failed=yes]) 2435 else 2436 pkg_failed=untried 2437fi[]dnl 2438])# _PKG_CONFIG 2439 2440# _PKG_SHORT_ERRORS_SUPPORTED 2441# ----------------------------- 2442AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 2443[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2444if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2445 _pkg_short_errors_supported=yes 2446else 2447 _pkg_short_errors_supported=no 2448fi[]dnl 2449])# _PKG_SHORT_ERRORS_SUPPORTED 2450 2451 2452# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 2453# [ACTION-IF-NOT-FOUND]) 2454# 2455# 2456# Note that if there is a possibility the first call to 2457# PKG_CHECK_MODULES might not happen, you should be sure to include an 2458# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 2459# 2460# 2461# -------------------------------------------------------------- 2462AC_DEFUN([PKG_CHECK_MODULES], 2463[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2464AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 2465AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 2466 2467pkg_failed=no 2468AC_MSG_CHECKING([for $1]) 2469 2470_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 2471_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 2472 2473m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 2474and $1[]_LIBS to avoid the need to call pkg-config. 2475See the pkg-config man page for more details.]) 2476 2477if test $pkg_failed = yes; then 2478 _PKG_SHORT_ERRORS_SUPPORTED 2479 if test $_pkg_short_errors_supported = yes; then 2480 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 2481 else 2482 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 2483 fi 2484 # Put the nasty error message in config.log where it belongs 2485 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 2486 2487 ifelse([$4], , [AC_MSG_ERROR(dnl 2488[Package requirements ($2) were not met: 2489 2490$$1_PKG_ERRORS 2491 2492Consider adjusting the PKG_CONFIG_PATH environment variable if you 2493installed software in a non-standard prefix. 2494 2495_PKG_TEXT 2496])], 2497 [AC_MSG_RESULT([no]) 2498 $4]) 2499elif test $pkg_failed = untried; then 2500 ifelse([$4], , [AC_MSG_FAILURE(dnl 2501[The pkg-config script could not be found or is too old. Make sure it 2502is in your PATH or set the PKG_CONFIG environment variable to the full 2503path to pkg-config. 2504 2505_PKG_TEXT 2506 2507To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 2508 [$4]) 2509else 2510 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 2511 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 2512 AC_MSG_RESULT([yes]) 2513 ifelse([$3], , :, [$3]) 2514fi[]dnl 2515])# PKG_CHECK_MODULES 2516 2517# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2518# 2519# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2520# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2521# Inc. 2522# Written by Gordon Matzigkeit, 1996 2523# 2524# This file is free software; the Free Software Foundation gives 2525# unlimited permission to copy and/or distribute it, with or without 2526# modifications, as long as this notice is preserved. 2527 2528m4_define([_LT_COPYING], [dnl 2529# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2530# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2531# Inc. 2532# Written by Gordon Matzigkeit, 1996 2533# 2534# This file is part of GNU Libtool. 2535# 2536# GNU Libtool is free software; you can redistribute it and/or 2537# modify it under the terms of the GNU General Public License as 2538# published by the Free Software Foundation; either version 2 of 2539# the License, or (at your option) any later version. 2540# 2541# As a special exception to the GNU General Public License, 2542# if you distribute this file as part of a program or library that 2543# is built using GNU Libtool, you may include this file under the 2544# same distribution terms that you use for the rest of that program. 2545# 2546# GNU Libtool is distributed in the hope that it will be useful, 2547# but WITHOUT ANY WARRANTY; without even the implied warranty of 2548# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2549# GNU General Public License for more details. 2550# 2551# You should have received a copy of the GNU General Public License 2552# along with GNU Libtool; see the file COPYING. If not, a copy 2553# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 2554# obtained by writing to the Free Software Foundation, Inc., 2555# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 2556]) 2557 2558# serial 57 LT_INIT 2559 2560 2561# LT_PREREQ(VERSION) 2562# ------------------ 2563# Complain and exit if this libtool version is less that VERSION. 2564m4_defun([LT_PREREQ], 2565[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 2566 [m4_default([$3], 2567 [m4_fatal([Libtool version $1 or higher is required], 2568 63)])], 2569 [$2])]) 2570 2571 2572# _LT_CHECK_BUILDDIR 2573# ------------------ 2574# Complain if the absolute build directory name contains unusual characters 2575m4_defun([_LT_CHECK_BUILDDIR], 2576[case `pwd` in 2577 *\ * | *\ *) 2578 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 2579esac 2580]) 2581 2582 2583# LT_INIT([OPTIONS]) 2584# ------------------ 2585AC_DEFUN([LT_INIT], 2586[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 2587AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 2588AC_BEFORE([$0], [LT_LANG])dnl 2589AC_BEFORE([$0], [LT_OUTPUT])dnl 2590AC_BEFORE([$0], [LTDL_INIT])dnl 2591m4_require([_LT_CHECK_BUILDDIR])dnl 2592 2593dnl Autoconf doesn't catch unexpanded LT_ macros by default: 2594m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 2595m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 2596dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 2597dnl unless we require an AC_DEFUNed macro: 2598AC_REQUIRE([LTOPTIONS_VERSION])dnl 2599AC_REQUIRE([LTSUGAR_VERSION])dnl 2600AC_REQUIRE([LTVERSION_VERSION])dnl 2601AC_REQUIRE([LTOBSOLETE_VERSION])dnl 2602m4_require([_LT_PROG_LTMAIN])dnl 2603 2604_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 2605 2606dnl Parse OPTIONS 2607_LT_SET_OPTIONS([$0], [$1]) 2608 2609# This can be used to rebuild libtool when needed 2610LIBTOOL_DEPS="$ltmain" 2611 2612# Always use our own libtool. 2613LIBTOOL='$(SHELL) $(top_builddir)/libtool' 2614AC_SUBST(LIBTOOL)dnl 2615 2616_LT_SETUP 2617 2618# Only expand once: 2619m4_define([LT_INIT]) 2620])# LT_INIT 2621 2622# Old names: 2623AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 2624AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 2625dnl aclocal-1.4 backwards compatibility: 2626dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 2627dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 2628 2629 2630# _LT_CC_BASENAME(CC) 2631# ------------------- 2632# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2633m4_defun([_LT_CC_BASENAME], 2634[for cc_temp in $1""; do 2635 case $cc_temp in 2636 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2637 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2638 \-*) ;; 2639 *) break;; 2640 esac 2641done 2642cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 2643]) 2644 2645 2646# _LT_FILEUTILS_DEFAULTS 2647# ---------------------- 2648# It is okay to use these file commands and assume they have been set 2649# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 2650m4_defun([_LT_FILEUTILS_DEFAULTS], 2651[: ${CP="cp -f"} 2652: ${MV="mv -f"} 2653: ${RM="rm -f"} 2654])# _LT_FILEUTILS_DEFAULTS 2655 2656 2657# _LT_SETUP 2658# --------- 2659m4_defun([_LT_SETUP], 2660[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2661AC_REQUIRE([AC_CANONICAL_BUILD])dnl 2662AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 2663AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 2664 2665_LT_DECL([], [host_alias], [0], [The host system])dnl 2666_LT_DECL([], [host], [0])dnl 2667_LT_DECL([], [host_os], [0])dnl 2668dnl 2669_LT_DECL([], [build_alias], [0], [The build system])dnl 2670_LT_DECL([], [build], [0])dnl 2671_LT_DECL([], [build_os], [0])dnl 2672dnl 2673AC_REQUIRE([AC_PROG_CC])dnl 2674AC_REQUIRE([LT_PATH_LD])dnl 2675AC_REQUIRE([LT_PATH_NM])dnl 2676dnl 2677AC_REQUIRE([AC_PROG_LN_S])dnl 2678test -z "$LN_S" && LN_S="ln -s" 2679_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 2680dnl 2681AC_REQUIRE([LT_CMD_MAX_LEN])dnl 2682_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2683_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2684dnl 2685m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2686m4_require([_LT_CHECK_SHELL_FEATURES])dnl 2687m4_require([_LT_CMD_RELOAD])dnl 2688m4_require([_LT_CHECK_MAGIC_METHOD])dnl 2689m4_require([_LT_CMD_OLD_ARCHIVE])dnl 2690m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2691 2692_LT_CONFIG_LIBTOOL_INIT([ 2693# See if we are running on zsh, and set the options which allow our 2694# commands through without removal of \ escapes INIT. 2695if test -n "\${ZSH_VERSION+set}" ; then 2696 setopt NO_GLOB_SUBST 2697fi 2698]) 2699if test -n "${ZSH_VERSION+set}" ; then 2700 setopt NO_GLOB_SUBST 2701fi 2702 2703_LT_CHECK_OBJDIR 2704 2705m4_require([_LT_TAG_COMPILER])dnl 2706 2707case $host_os in 2708aix3*) 2709 # AIX sometimes has problems with the GCC collect2 program. For some 2710 # reason, if we set the COLLECT_NAMES environment variable, the problems 2711 # vanish in a puff of smoke. 2712 if test "X${COLLECT_NAMES+set}" != Xset; then 2713 COLLECT_NAMES= 2714 export COLLECT_NAMES 2715 fi 2716 ;; 2717esac 2718 2719# Global variables: 2720ofile=libtool 2721can_build_shared=yes 2722 2723# All known linkers require a `.a' archive for static linking (except MSVC, 2724# which needs '.lib'). 2725libext=a 2726 2727with_gnu_ld="$lt_cv_prog_gnu_ld" 2728 2729old_CC="$CC" 2730old_CFLAGS="$CFLAGS" 2731 2732# Set sane defaults for various variables 2733test -z "$CC" && CC=cc 2734test -z "$LTCC" && LTCC=$CC 2735test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2736test -z "$LD" && LD=ld 2737test -z "$ac_objext" && ac_objext=o 2738 2739_LT_CC_BASENAME([$compiler]) 2740 2741# Only perform the check for file, if the check method requires it 2742test -z "$MAGIC_CMD" && MAGIC_CMD=file 2743case $deplibs_check_method in 2744file_magic*) 2745 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2746 _LT_PATH_MAGIC 2747 fi 2748 ;; 2749esac 2750 2751# Use C for the default configuration in the libtool script 2752LT_SUPPORTED_TAG([CC]) 2753_LT_LANG_C_CONFIG 2754_LT_LANG_DEFAULT_CONFIG 2755_LT_CONFIG_COMMANDS 2756])# _LT_SETUP 2757 2758 2759# _LT_PREPARE_SED_QUOTE_VARS 2760# -------------------------- 2761# Define a few sed substitution that help us do robust quoting. 2762m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2763[# Backslashify metacharacters that are still active within 2764# double-quoted strings. 2765sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2766 2767# Same as above, but do not quote variable references. 2768double_quote_subst='s/\([["`\\]]\)/\\\1/g' 2769 2770# Sed substitution to delay expansion of an escaped shell variable in a 2771# double_quote_subst'ed string. 2772delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2773 2774# Sed substitution to delay expansion of an escaped single quote. 2775delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2776 2777# Sed substitution to avoid accidental globbing in evaled expressions 2778no_glob_subst='s/\*/\\\*/g' 2779]) 2780 2781# _LT_PROG_LTMAIN 2782# --------------- 2783# Note that this code is called both from `configure', and `config.status' 2784# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2785# `config.status' has no value for ac_aux_dir unless we are using Automake, 2786# so we pass a copy along to make sure it has a sensible value anyway. 2787m4_defun([_LT_PROG_LTMAIN], 2788[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2789_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2790ltmain="$ac_aux_dir/ltmain.sh" 2791])# _LT_PROG_LTMAIN 2792 2793 2794 2795# So that we can recreate a full libtool script including additional 2796# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2797# in macros and then make a single call at the end using the `libtool' 2798# label. 2799 2800 2801# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2802# ---------------------------------------- 2803# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2804m4_define([_LT_CONFIG_LIBTOOL_INIT], 2805[m4_ifval([$1], 2806 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 2807 [$1 2808])])]) 2809 2810# Initialize. 2811m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 2812 2813 2814# _LT_CONFIG_LIBTOOL([COMMANDS]) 2815# ------------------------------ 2816# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2817m4_define([_LT_CONFIG_LIBTOOL], 2818[m4_ifval([$1], 2819 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 2820 [$1 2821])])]) 2822 2823# Initialize. 2824m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 2825 2826 2827# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 2828# ----------------------------------------------------- 2829m4_defun([_LT_CONFIG_SAVE_COMMANDS], 2830[_LT_CONFIG_LIBTOOL([$1]) 2831_LT_CONFIG_LIBTOOL_INIT([$2]) 2832]) 2833 2834 2835# _LT_FORMAT_COMMENT([COMMENT]) 2836# ----------------------------- 2837# Add leading comment marks to the start of each line, and a trailing 2838# full-stop to the whole comment if one is not present already. 2839m4_define([_LT_FORMAT_COMMENT], 2840[m4_ifval([$1], [ 2841m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 2842 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 2843)]) 2844 2845 2846 2847 2848 2849# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 2850# ------------------------------------------------------------------- 2851# CONFIGNAME is the name given to the value in the libtool script. 2852# VARNAME is the (base) name used in the configure script. 2853# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 2854# VARNAME. Any other value will be used directly. 2855m4_define([_LT_DECL], 2856[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 2857 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 2858 [m4_ifval([$1], [$1], [$2])]) 2859 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 2860 m4_ifval([$4], 2861 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 2862 lt_dict_add_subkey([lt_decl_dict], [$2], 2863 [tagged?], [m4_ifval([$5], [yes], [no])])]) 2864]) 2865 2866 2867# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 2868# -------------------------------------------------------- 2869m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 2870 2871 2872# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 2873# ------------------------------------------------ 2874m4_define([lt_decl_tag_varnames], 2875[_lt_decl_filter([tagged?], [yes], $@)]) 2876 2877 2878# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 2879# --------------------------------------------------------- 2880m4_define([_lt_decl_filter], 2881[m4_case([$#], 2882 [0], [m4_fatal([$0: too few arguments: $#])], 2883 [1], [m4_fatal([$0: too few arguments: $#: $1])], 2884 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 2885 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 2886 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 2887]) 2888 2889 2890# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 2891# -------------------------------------------------- 2892m4_define([lt_decl_quote_varnames], 2893[_lt_decl_filter([value], [1], $@)]) 2894 2895 2896# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 2897# --------------------------------------------------- 2898m4_define([lt_decl_dquote_varnames], 2899[_lt_decl_filter([value], [2], $@)]) 2900 2901 2902# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 2903# --------------------------------------------------- 2904m4_define([lt_decl_varnames_tagged], 2905[m4_assert([$# <= 2])dnl 2906_$0(m4_quote(m4_default([$1], [[, ]])), 2907 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 2908 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 2909m4_define([_lt_decl_varnames_tagged], 2910[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 2911 2912 2913# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 2914# ------------------------------------------------ 2915m4_define([lt_decl_all_varnames], 2916[_$0(m4_quote(m4_default([$1], [[, ]])), 2917 m4_if([$2], [], 2918 m4_quote(lt_decl_varnames), 2919 m4_quote(m4_shift($@))))[]dnl 2920]) 2921m4_define([_lt_decl_all_varnames], 2922[lt_join($@, lt_decl_varnames_tagged([$1], 2923 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 2924]) 2925 2926 2927# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 2928# ------------------------------------ 2929# Quote a variable value, and forward it to `config.status' so that its 2930# declaration there will have the same value as in `configure'. VARNAME 2931# must have a single quote delimited value for this to work. 2932m4_define([_LT_CONFIG_STATUS_DECLARE], 2933[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 2934 2935 2936# _LT_CONFIG_STATUS_DECLARATIONS 2937# ------------------------------ 2938# We delimit libtool config variables with single quotes, so when 2939# we write them to config.status, we have to be sure to quote all 2940# embedded single quotes properly. In configure, this macro expands 2941# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 2942# 2943# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 2944m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 2945[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 2946 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 2947 2948 2949# _LT_LIBTOOL_TAGS 2950# ---------------- 2951# Output comment and list of tags supported by the script 2952m4_defun([_LT_LIBTOOL_TAGS], 2953[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 2954available_tags="_LT_TAGS"dnl 2955]) 2956 2957 2958# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 2959# ----------------------------------- 2960# Extract the dictionary values for VARNAME (optionally with TAG) and 2961# expand to a commented shell variable setting: 2962# 2963# # Some comment about what VAR is for. 2964# visible_name=$lt_internal_name 2965m4_define([_LT_LIBTOOL_DECLARE], 2966[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 2967 [description])))[]dnl 2968m4_pushdef([_libtool_name], 2969 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 2970m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 2971 [0], [_libtool_name=[$]$1], 2972 [1], [_libtool_name=$lt_[]$1], 2973 [2], [_libtool_name=$lt_[]$1], 2974 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 2975m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 2976]) 2977 2978 2979# _LT_LIBTOOL_CONFIG_VARS 2980# ----------------------- 2981# Produce commented declarations of non-tagged libtool config variables 2982# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 2983# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 2984# section) are produced by _LT_LIBTOOL_TAG_VARS. 2985m4_defun([_LT_LIBTOOL_CONFIG_VARS], 2986[m4_foreach([_lt_var], 2987 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 2988 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 2989 2990 2991# _LT_LIBTOOL_TAG_VARS(TAG) 2992# ------------------------- 2993m4_define([_LT_LIBTOOL_TAG_VARS], 2994[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 2995 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 2996 2997 2998# _LT_TAGVAR(VARNAME, [TAGNAME]) 2999# ------------------------------ 3000m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3001 3002 3003# _LT_CONFIG_COMMANDS 3004# ------------------- 3005# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3006# variables for single and double quote escaping we saved from calls 3007# to _LT_DECL, we can put quote escaped variables declarations 3008# into `config.status', and then the shell code to quote escape them in 3009# for loops in `config.status'. Finally, any additional code accumulated 3010# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3011m4_defun([_LT_CONFIG_COMMANDS], 3012[AC_PROVIDE_IFELSE([LT_OUTPUT], 3013 dnl If the libtool generation code has been placed in $CONFIG_LT, 3014 dnl instead of duplicating it all over again into config.status, 3015 dnl then we will have config.status run $CONFIG_LT later, so it 3016 dnl needs to know what name is stored there: 3017 [AC_CONFIG_COMMANDS([libtool], 3018 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3019 dnl If the libtool generation code is destined for config.status, 3020 dnl expand the accumulated commands and init code now: 3021 [AC_CONFIG_COMMANDS([libtool], 3022 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3023])#_LT_CONFIG_COMMANDS 3024 3025 3026# Initialize. 3027m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3028[ 3029 3030# The HP-UX ksh and POSIX shell print the target directory to stdout 3031# if CDPATH is set. 3032(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3033 3034sed_quote_subst='$sed_quote_subst' 3035double_quote_subst='$double_quote_subst' 3036delay_variable_subst='$delay_variable_subst' 3037_LT_CONFIG_STATUS_DECLARATIONS 3038LTCC='$LTCC' 3039LTCFLAGS='$LTCFLAGS' 3040compiler='$compiler_DEFAULT' 3041 3042# A function that is used when there is no print builtin or printf. 3043func_fallback_echo () 3044{ 3045 eval 'cat <<_LTECHO_EOF 3046\$[]1 3047_LTECHO_EOF' 3048} 3049 3050# Quote evaled strings. 3051for var in lt_decl_all_varnames([[ \ 3052]], lt_decl_quote_varnames); do 3053 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3054 *[[\\\\\\\`\\"\\\$]]*) 3055 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 3056 ;; 3057 *) 3058 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3059 ;; 3060 esac 3061done 3062 3063# Double-quote double-evaled strings. 3064for var in lt_decl_all_varnames([[ \ 3065]], lt_decl_dquote_varnames); do 3066 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3067 *[[\\\\\\\`\\"\\\$]]*) 3068 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 3069 ;; 3070 *) 3071 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3072 ;; 3073 esac 3074done 3075 3076_LT_OUTPUT_LIBTOOL_INIT 3077]) 3078 3079# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3080# ------------------------------------ 3081# Generate a child script FILE with all initialization necessary to 3082# reuse the environment learned by the parent script, and make the 3083# file executable. If COMMENT is supplied, it is inserted after the 3084# `#!' sequence but before initialization text begins. After this 3085# macro, additional text can be appended to FILE to form the body of 3086# the child script. The macro ends with non-zero status if the 3087# file could not be fully written (such as if the disk is full). 3088m4_ifdef([AS_INIT_GENERATED], 3089[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 3090[m4_defun([_LT_GENERATED_FILE_INIT], 3091[m4_require([AS_PREPARE])]dnl 3092[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 3093[lt_write_fail=0 3094cat >$1 <<_ASEOF || lt_write_fail=1 3095#! $SHELL 3096# Generated by $as_me. 3097$2 3098SHELL=\${CONFIG_SHELL-$SHELL} 3099export SHELL 3100_ASEOF 3101cat >>$1 <<\_ASEOF || lt_write_fail=1 3102AS_SHELL_SANITIZE 3103_AS_PREPARE 3104exec AS_MESSAGE_FD>&1 3105_ASEOF 3106test $lt_write_fail = 0 && chmod +x $1[]dnl 3107m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 3108 3109# LT_OUTPUT 3110# --------- 3111# This macro allows early generation of the libtool script (before 3112# AC_OUTPUT is called), incase it is used in configure for compilation 3113# tests. 3114AC_DEFUN([LT_OUTPUT], 3115[: ${CONFIG_LT=./config.lt} 3116AC_MSG_NOTICE([creating $CONFIG_LT]) 3117_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 3118[# Run this file to recreate a libtool stub with the current configuration.]) 3119 3120cat >>"$CONFIG_LT" <<\_LTEOF 3121lt_cl_silent=false 3122exec AS_MESSAGE_LOG_FD>>config.log 3123{ 3124 echo 3125 AS_BOX([Running $as_me.]) 3126} >&AS_MESSAGE_LOG_FD 3127 3128lt_cl_help="\ 3129\`$as_me' creates a local libtool stub from the current configuration, 3130for use in further configure time tests before the real libtool is 3131generated. 3132 3133Usage: $[0] [[OPTIONS]] 3134 3135 -h, --help print this help, then exit 3136 -V, --version print version number, then exit 3137 -q, --quiet do not print progress messages 3138 -d, --debug don't remove temporary files 3139 3140Report bugs to <bug-libtool@gnu.org>." 3141 3142lt_cl_version="\ 3143m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 3144m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 3145configured by $[0], generated by m4_PACKAGE_STRING. 3146 3147Copyright (C) 2010 Free Software Foundation, Inc. 3148This config.lt script is free software; the Free Software Foundation 3149gives unlimited permision to copy, distribute and modify it." 3150 3151while test $[#] != 0 3152do 3153 case $[1] in 3154 --version | --v* | -V ) 3155 echo "$lt_cl_version"; exit 0 ;; 3156 --help | --h* | -h ) 3157 echo "$lt_cl_help"; exit 0 ;; 3158 --debug | --d* | -d ) 3159 debug=: ;; 3160 --quiet | --q* | --silent | --s* | -q ) 3161 lt_cl_silent=: ;; 3162 3163 -*) AC_MSG_ERROR([unrecognized option: $[1] 3164Try \`$[0] --help' for more information.]) ;; 3165 3166 *) AC_MSG_ERROR([unrecognized argument: $[1] 3167Try \`$[0] --help' for more information.]) ;; 3168 esac 3169 shift 3170done 3171 3172if $lt_cl_silent; then 3173 exec AS_MESSAGE_FD>/dev/null 3174fi 3175_LTEOF 3176 3177cat >>"$CONFIG_LT" <<_LTEOF 3178_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 3179_LTEOF 3180 3181cat >>"$CONFIG_LT" <<\_LTEOF 3182AC_MSG_NOTICE([creating $ofile]) 3183_LT_OUTPUT_LIBTOOL_COMMANDS 3184AS_EXIT(0) 3185_LTEOF 3186chmod +x "$CONFIG_LT" 3187 3188# configure is writing to config.log, but config.lt does its own redirection, 3189# appending to config.log, which fails on DOS, as config.log is still kept 3190# open by configure. Here we exec the FD to /dev/null, effectively closing 3191# config.log, so it can be properly (re)opened and appended to by config.lt. 3192lt_cl_success=: 3193test "$silent" = yes && 3194 lt_config_lt_args="$lt_config_lt_args --quiet" 3195exec AS_MESSAGE_LOG_FD>/dev/null 3196$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 3197exec AS_MESSAGE_LOG_FD>>config.log 3198$lt_cl_success || AS_EXIT(1) 3199])# LT_OUTPUT 3200 3201 3202# _LT_CONFIG(TAG) 3203# --------------- 3204# If TAG is the built-in tag, create an initial libtool script with a 3205# default configuration from the untagged config vars. Otherwise add code 3206# to config.status for appending the configuration named by TAG from the 3207# matching tagged config vars. 3208m4_defun([_LT_CONFIG], 3209[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3210_LT_CONFIG_SAVE_COMMANDS([ 3211 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 3212 m4_if(_LT_TAG, [C], [ 3213 # See if we are running on zsh, and set the options which allow our 3214 # commands through without removal of \ escapes. 3215 if test -n "${ZSH_VERSION+set}" ; then 3216 setopt NO_GLOB_SUBST 3217 fi 3218 3219 cfgfile="${ofile}T" 3220 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 3221 $RM "$cfgfile" 3222 3223 cat <<_LT_EOF >> "$cfgfile" 3224#! $SHELL 3225 3226# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 3227# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 3228# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 3229# NOTE: Changes made to this file will be lost: look at ltmain.sh. 3230# 3231_LT_COPYING 3232_LT_LIBTOOL_TAGS 3233 3234# ### BEGIN LIBTOOL CONFIG 3235_LT_LIBTOOL_CONFIG_VARS 3236_LT_LIBTOOL_TAG_VARS 3237# ### END LIBTOOL CONFIG 3238 3239_LT_EOF 3240 3241 case $host_os in 3242 aix3*) 3243 cat <<\_LT_EOF >> "$cfgfile" 3244# AIX sometimes has problems with the GCC collect2 program. For some 3245# reason, if we set the COLLECT_NAMES environment variable, the problems 3246# vanish in a puff of smoke. 3247if test "X${COLLECT_NAMES+set}" != Xset; then 3248 COLLECT_NAMES= 3249 export COLLECT_NAMES 3250fi 3251_LT_EOF 3252 ;; 3253 esac 3254 3255 _LT_PROG_LTMAIN 3256 3257 # We use sed instead of cat because bash on DJGPP gets confused if 3258 # if finds mixed CR/LF and LF-only lines. Since sed operates in 3259 # text mode, it properly converts lines to CR/LF. This bash problem 3260 # is reportedly fixed, but why not run on old versions too? 3261 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 3262 || (rm -f "$cfgfile"; exit 1) 3263 3264 _LT_PROG_XSI_SHELLFNS 3265 3266 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 3267 || (rm -f "$cfgfile"; exit 1) 3268 3269 mv -f "$cfgfile" "$ofile" || 3270 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 3271 chmod +x "$ofile" 3272], 3273[cat <<_LT_EOF >> "$ofile" 3274 3275dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 3276dnl in a comment (ie after a #). 3277# ### BEGIN LIBTOOL TAG CONFIG: $1 3278_LT_LIBTOOL_TAG_VARS(_LT_TAG) 3279# ### END LIBTOOL TAG CONFIG: $1 3280_LT_EOF 3281])dnl /m4_if 3282], 3283[m4_if([$1], [], [ 3284 PACKAGE='$PACKAGE' 3285 VERSION='$VERSION' 3286 TIMESTAMP='$TIMESTAMP' 3287 RM='$RM' 3288 ofile='$ofile'], []) 3289])dnl /_LT_CONFIG_SAVE_COMMANDS 3290])# _LT_CONFIG 3291 3292 3293# LT_SUPPORTED_TAG(TAG) 3294# --------------------- 3295# Trace this macro to discover what tags are supported by the libtool 3296# --tag option, using: 3297# autoconf --trace 'LT_SUPPORTED_TAG:$1' 3298AC_DEFUN([LT_SUPPORTED_TAG], []) 3299 3300 3301# C support is built-in for now 3302m4_define([_LT_LANG_C_enabled], []) 3303m4_define([_LT_TAGS], []) 3304 3305 3306# LT_LANG(LANG) 3307# ------------- 3308# Enable libtool support for the given language if not already enabled. 3309AC_DEFUN([LT_LANG], 3310[AC_BEFORE([$0], [LT_OUTPUT])dnl 3311m4_case([$1], 3312 [C], [_LT_LANG(C)], 3313 [C++], [_LT_LANG(CXX)], 3314 [Java], [_LT_LANG(GCJ)], 3315 [Fortran 77], [_LT_LANG(F77)], 3316 [Fortran], [_LT_LANG(FC)], 3317 [Windows Resource], [_LT_LANG(RC)], 3318 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 3319 [_LT_LANG($1)], 3320 [m4_fatal([$0: unsupported language: "$1"])])])dnl 3321])# LT_LANG 3322 3323 3324# _LT_LANG(LANGNAME) 3325# ------------------ 3326m4_defun([_LT_LANG], 3327[m4_ifdef([_LT_LANG_]$1[_enabled], [], 3328 [LT_SUPPORTED_TAG([$1])dnl 3329 m4_append([_LT_TAGS], [$1 ])dnl 3330 m4_define([_LT_LANG_]$1[_enabled], [])dnl 3331 _LT_LANG_$1_CONFIG($1)])dnl 3332])# _LT_LANG 3333 3334 3335# _LT_LANG_DEFAULT_CONFIG 3336# ----------------------- 3337m4_defun([_LT_LANG_DEFAULT_CONFIG], 3338[AC_PROVIDE_IFELSE([AC_PROG_CXX], 3339 [LT_LANG(CXX)], 3340 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 3341 3342AC_PROVIDE_IFELSE([AC_PROG_F77], 3343 [LT_LANG(F77)], 3344 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 3345 3346AC_PROVIDE_IFELSE([AC_PROG_FC], 3347 [LT_LANG(FC)], 3348 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 3349 3350dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 3351dnl pulling things in needlessly. 3352AC_PROVIDE_IFELSE([AC_PROG_GCJ], 3353 [LT_LANG(GCJ)], 3354 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 3355 [LT_LANG(GCJ)], 3356 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 3357 [LT_LANG(GCJ)], 3358 [m4_ifdef([AC_PROG_GCJ], 3359 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 3360 m4_ifdef([A][M_PROG_GCJ], 3361 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 3362 m4_ifdef([LT_PROG_GCJ], 3363 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 3364 3365AC_PROVIDE_IFELSE([LT_PROG_RC], 3366 [LT_LANG(RC)], 3367 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 3368])# _LT_LANG_DEFAULT_CONFIG 3369 3370# Obsolete macros: 3371AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 3372AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 3373AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 3374AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 3375AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 3376dnl aclocal-1.4 backwards compatibility: 3377dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 3378dnl AC_DEFUN([AC_LIBTOOL_F77], []) 3379dnl AC_DEFUN([AC_LIBTOOL_FC], []) 3380dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 3381dnl AC_DEFUN([AC_LIBTOOL_RC], []) 3382 3383 3384# _LT_TAG_COMPILER 3385# ---------------- 3386m4_defun([_LT_TAG_COMPILER], 3387[AC_REQUIRE([AC_PROG_CC])dnl 3388 3389_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 3390_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 3391_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 3392_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 3393 3394# If no C compiler was specified, use CC. 3395LTCC=${LTCC-"$CC"} 3396 3397# If no C compiler flags were specified, use CFLAGS. 3398LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 3399 3400# Allow CC to be a program name with arguments. 3401compiler=$CC 3402])# _LT_TAG_COMPILER 3403 3404 3405# _LT_COMPILER_BOILERPLATE 3406# ------------------------ 3407# Check for compiler boilerplate output or warnings with 3408# the simple compiler test code. 3409m4_defun([_LT_COMPILER_BOILERPLATE], 3410[m4_require([_LT_DECL_SED])dnl 3411ac_outfile=conftest.$ac_objext 3412echo "$lt_simple_compile_test_code" >conftest.$ac_ext 3413eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3414_lt_compiler_boilerplate=`cat conftest.err` 3415$RM conftest* 3416])# _LT_COMPILER_BOILERPLATE 3417 3418 3419# _LT_LINKER_BOILERPLATE 3420# ---------------------- 3421# Check for linker boilerplate output or warnings with 3422# the simple link test code. 3423m4_defun([_LT_LINKER_BOILERPLATE], 3424[m4_require([_LT_DECL_SED])dnl 3425ac_outfile=conftest.$ac_objext 3426echo "$lt_simple_link_test_code" >conftest.$ac_ext 3427eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3428_lt_linker_boilerplate=`cat conftest.err` 3429$RM -r conftest* 3430])# _LT_LINKER_BOILERPLATE 3431 3432# _LT_REQUIRED_DARWIN_CHECKS 3433# ------------------------- 3434m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 3435 case $host_os in 3436 rhapsody* | darwin*) 3437 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3438 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3439 AC_CHECK_TOOL([LIPO], [lipo], [:]) 3440 AC_CHECK_TOOL([OTOOL], [otool], [:]) 3441 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 3442 _LT_DECL([], [DSYMUTIL], [1], 3443 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 3444 _LT_DECL([], [NMEDIT], [1], 3445 [Tool to change global to local symbols on Mac OS X]) 3446 _LT_DECL([], [LIPO], [1], 3447 [Tool to manipulate fat objects and archives on Mac OS X]) 3448 _LT_DECL([], [OTOOL], [1], 3449 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 3450 _LT_DECL([], [OTOOL64], [1], 3451 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 3452 3453 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3454 [lt_cv_apple_cc_single_mod=no 3455 if test -z "${LT_MULTI_MODULE}"; then 3456 # By default we will add the -single_module flag. You can override 3457 # by either setting the environment variable LT_MULTI_MODULE 3458 # non-empty at configure time, or by adding -multi_module to the 3459 # link flags. 3460 rm -rf libconftest.dylib* 3461 echo "int foo(void){return 1;}" > conftest.c 3462 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3463-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 3464 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3465 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 3466 _lt_result=$? 3467 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 3468 lt_cv_apple_cc_single_mod=yes 3469 else 3470 cat conftest.err >&AS_MESSAGE_LOG_FD 3471 fi 3472 rm -rf libconftest.dylib* 3473 rm -f conftest.* 3474 fi]) 3475 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3476 [lt_cv_ld_exported_symbols_list], 3477 [lt_cv_ld_exported_symbols_list=no 3478 save_LDFLAGS=$LDFLAGS 3479 echo "_main" > conftest.sym 3480 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3481 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3482 [lt_cv_ld_exported_symbols_list=yes], 3483 [lt_cv_ld_exported_symbols_list=no]) 3484 LDFLAGS="$save_LDFLAGS" 3485 ]) 3486 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 3487 [lt_cv_ld_force_load=no 3488 cat > conftest.c << _LT_EOF 3489int forced_loaded() { return 2;} 3490_LT_EOF 3491 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 3492 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 3493 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 3494 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 3495 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 3496 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 3497 cat > conftest.c << _LT_EOF 3498int main() { return 0;} 3499_LT_EOF 3500 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 3501 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 3502 _lt_result=$? 3503 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 3504 lt_cv_ld_force_load=yes 3505 else 3506 cat conftest.err >&AS_MESSAGE_LOG_FD 3507 fi 3508 rm -f conftest.err libconftest.a conftest conftest.c 3509 rm -rf conftest.dSYM 3510 ]) 3511 case $host_os in 3512 rhapsody* | darwin1.[[012]]) 3513 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3514 darwin1.*) 3515 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3516 darwin*) # darwin 5.x on 3517 # if running on 10.5 or later, the deployment target defaults 3518 # to the OS version, if on x86, and 10.4, the deployment 3519 # target defaults to 10.4. Don't you love it? 3520 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3521 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3522 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3523 10.[[012]]*) 3524 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3525 10.*) 3526 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3527 esac 3528 ;; 3529 esac 3530 if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3531 _lt_dar_single_mod='$single_module' 3532 fi 3533 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3534 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3535 else 3536 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 3537 fi 3538 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 3539 _lt_dsymutil='~$DSYMUTIL $lib || :' 3540 else 3541 _lt_dsymutil= 3542 fi 3543 ;; 3544 esac 3545]) 3546 3547 3548# _LT_DARWIN_LINKER_FEATURES 3549# -------------------------- 3550# Checks for linker and compiler features on darwin 3551m4_defun([_LT_DARWIN_LINKER_FEATURES], 3552[ 3553 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 3554 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3555 _LT_TAGVAR(hardcode_direct, $1)=no 3556 _LT_TAGVAR(hardcode_automatic, $1)=yes 3557 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3558 if test "$lt_cv_ld_force_load" = "yes"; then 3559 _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\"`' 3560 else 3561 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 3562 fi 3563 _LT_TAGVAR(link_all_deplibs, $1)=yes 3564 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3565 case $cc_basename in 3566 ifort*) _lt_dar_can_shared=yes ;; 3567 *) _lt_dar_can_shared=$GCC ;; 3568 esac 3569 if test "$_lt_dar_can_shared" = "yes"; then 3570 output_verbose_link_cmd=func_echo_all 3571 _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}" 3572 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3573 _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}" 3574 _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}" 3575 m4_if([$1], [CXX], 3576[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3577 _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}" 3578 _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}" 3579 fi 3580],[]) 3581 else 3582 _LT_TAGVAR(ld_shlibs, $1)=no 3583 fi 3584]) 3585 3586# _LT_SYS_MODULE_PATH_AIX 3587# ----------------------- 3588# Links a minimal program and checks the executable 3589# for the system default hardcoded library path. In most cases, 3590# this is /usr/lib:/lib, but when the MPI compilers are used 3591# the location of the communication and MPI libs are included too. 3592# If we don't find anything, use the default library path according 3593# to the aix ld manual. 3594m4_defun([_LT_SYS_MODULE_PATH_AIX], 3595[m4_require([_LT_DECL_SED])dnl 3596AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3597lt_aix_libpath_sed=' 3598 /Import File Strings/,/^$/ { 3599 /^0/ { 3600 s/^0 *\(.*\)$/\1/ 3601 p 3602 } 3603 }' 3604aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3605# Check for a 64-bit object if we didn't find anything. 3606if test -z "$aix_libpath"; then 3607 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3608fi],[]) 3609if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3610])# _LT_SYS_MODULE_PATH_AIX 3611 3612 3613# _LT_SHELL_INIT(ARG) 3614# ------------------- 3615m4_define([_LT_SHELL_INIT], 3616[m4_divert_text([M4SH-INIT], [$1 3617])])# _LT_SHELL_INIT 3618 3619 3620 3621# _LT_PROG_ECHO_BACKSLASH 3622# ----------------------- 3623# Find how we can fake an echo command that does not interpret backslash. 3624# In particular, with Autoconf 2.60 or later we add some code to the start 3625# of the generated configure script which will find a shell with a builtin 3626# printf (which we can use as an echo command). 3627m4_defun([_LT_PROG_ECHO_BACKSLASH], 3628[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3629ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3630ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3631 3632AC_MSG_CHECKING([how to print strings]) 3633# Test print first, because it will be a builtin if present. 3634if test "X`print -r -- -n 2>/dev/null`" = X-n && \ 3635 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 3636 ECHO='print -r --' 3637elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 3638 ECHO='printf %s\n' 3639else 3640 # Use this function as a fallback that always works. 3641 func_fallback_echo () 3642 { 3643 eval 'cat <<_LTECHO_EOF 3644$[]1 3645_LTECHO_EOF' 3646 } 3647 ECHO='func_fallback_echo' 3648fi 3649 3650# func_echo_all arg... 3651# Invoke $ECHO with all args, space-separated. 3652func_echo_all () 3653{ 3654 $ECHO "$*" 3655} 3656 3657case "$ECHO" in 3658 printf*) AC_MSG_RESULT([printf]) ;; 3659 print*) AC_MSG_RESULT([print -r]) ;; 3660 *) AC_MSG_RESULT([cat]) ;; 3661esac 3662 3663m4_ifdef([_AS_DETECT_SUGGESTED], 3664[_AS_DETECT_SUGGESTED([ 3665 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 3666 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3667 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3668 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3669 PATH=/empty FPATH=/empty; export PATH FPATH 3670 test "X`printf %s $ECHO`" = "X$ECHO" \ 3671 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 3672 3673_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 3674_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 3675])# _LT_PROG_ECHO_BACKSLASH 3676 3677 3678# _LT_ENABLE_LOCK 3679# --------------- 3680m4_defun([_LT_ENABLE_LOCK], 3681[AC_ARG_ENABLE([libtool-lock], 3682 [AS_HELP_STRING([--disable-libtool-lock], 3683 [avoid locking (might break parallel builds)])]) 3684test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 3685 3686# Some flags need to be propagated to the compiler or linker for good 3687# libtool support. 3688case $host in 3689ia64-*-hpux*) 3690 # Find out which ABI we are using. 3691 echo 'int i;' > conftest.$ac_ext 3692 if AC_TRY_EVAL(ac_compile); then 3693 case `/usr/bin/file conftest.$ac_objext` in 3694 *ELF-32*) 3695 HPUX_IA64_MODE="32" 3696 ;; 3697 *ELF-64*) 3698 HPUX_IA64_MODE="64" 3699 ;; 3700 esac 3701 fi 3702 rm -rf conftest* 3703 ;; 3704*-*-irix6*) 3705 # Find out which ABI we are using. 3706 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 3707 if AC_TRY_EVAL(ac_compile); then 3708 if test "$lt_cv_prog_gnu_ld" = yes; then 3709 case `/usr/bin/file conftest.$ac_objext` in 3710 *32-bit*) 3711 LD="${LD-ld} -melf32bsmip" 3712 ;; 3713 *N32*) 3714 LD="${LD-ld} -melf32bmipn32" 3715 ;; 3716 *64-bit*) 3717 LD="${LD-ld} -melf64bmip" 3718 ;; 3719 esac 3720 else 3721 case `/usr/bin/file conftest.$ac_objext` in 3722 *32-bit*) 3723 LD="${LD-ld} -32" 3724 ;; 3725 *N32*) 3726 LD="${LD-ld} -n32" 3727 ;; 3728 *64-bit*) 3729 LD="${LD-ld} -64" 3730 ;; 3731 esac 3732 fi 3733 fi 3734 rm -rf conftest* 3735 ;; 3736 3737x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 3738s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 3739 # Find out which ABI we are using. 3740 echo 'int i;' > conftest.$ac_ext 3741 if AC_TRY_EVAL(ac_compile); then 3742 case `/usr/bin/file conftest.o` in 3743 *32-bit*) 3744 case $host in 3745 x86_64-*kfreebsd*-gnu) 3746 LD="${LD-ld} -m elf_i386_fbsd" 3747 ;; 3748 x86_64-*linux*) 3749 LD="${LD-ld} -m elf_i386" 3750 ;; 3751 ppc64-*linux*|powerpc64-*linux*) 3752 LD="${LD-ld} -m elf32ppclinux" 3753 ;; 3754 s390x-*linux*) 3755 LD="${LD-ld} -m elf_s390" 3756 ;; 3757 sparc64-*linux*) 3758 LD="${LD-ld} -m elf32_sparc" 3759 ;; 3760 esac 3761 ;; 3762 *64-bit*) 3763 case $host in 3764 x86_64-*kfreebsd*-gnu) 3765 LD="${LD-ld} -m elf_x86_64_fbsd" 3766 ;; 3767 x86_64-*linux*) 3768 LD="${LD-ld} -m elf_x86_64" 3769 ;; 3770 ppc*-*linux*|powerpc*-*linux*) 3771 LD="${LD-ld} -m elf64ppc" 3772 ;; 3773 s390*-*linux*|s390*-*tpf*) 3774 LD="${LD-ld} -m elf64_s390" 3775 ;; 3776 sparc*-*linux*) 3777 LD="${LD-ld} -m elf64_sparc" 3778 ;; 3779 esac 3780 ;; 3781 esac 3782 fi 3783 rm -rf conftest* 3784 ;; 3785 3786*-*-sco3.2v5*) 3787 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 3788 SAVE_CFLAGS="$CFLAGS" 3789 CFLAGS="$CFLAGS -belf" 3790 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 3791 [AC_LANG_PUSH(C) 3792 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 3793 AC_LANG_POP]) 3794 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 3795 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 3796 CFLAGS="$SAVE_CFLAGS" 3797 fi 3798 ;; 3799sparc*-*solaris*) 3800 # Find out which ABI we are using. 3801 echo 'int i;' > conftest.$ac_ext 3802 if AC_TRY_EVAL(ac_compile); then 3803 case `/usr/bin/file conftest.o` in 3804 *64-bit*) 3805 case $lt_cv_prog_gnu_ld in 3806 yes*) LD="${LD-ld} -m elf64_sparc" ;; 3807 *) 3808 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 3809 LD="${LD-ld} -64" 3810 fi 3811 ;; 3812 esac 3813 ;; 3814 esac 3815 fi 3816 rm -rf conftest* 3817 ;; 3818esac 3819 3820need_locks="$enable_libtool_lock" 3821])# _LT_ENABLE_LOCK 3822 3823 3824# _LT_CMD_OLD_ARCHIVE 3825# ------------------- 3826m4_defun([_LT_CMD_OLD_ARCHIVE], 3827[AC_CHECK_TOOL(AR, ar, false) 3828test -z "$AR" && AR=ar 3829test -z "$AR_FLAGS" && AR_FLAGS=cru 3830_LT_DECL([], [AR], [1], [The archiver]) 3831_LT_DECL([], [AR_FLAGS], [1]) 3832 3833AC_CHECK_TOOL(STRIP, strip, :) 3834test -z "$STRIP" && STRIP=: 3835_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 3836 3837AC_CHECK_TOOL(RANLIB, ranlib, :) 3838test -z "$RANLIB" && RANLIB=: 3839_LT_DECL([], [RANLIB], [1], 3840 [Commands used to install an old-style archive]) 3841 3842# Determine commands to create old-style static archives. 3843old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 3844old_postinstall_cmds='chmod 644 $oldlib' 3845old_postuninstall_cmds= 3846 3847if test -n "$RANLIB"; then 3848 case $host_os in 3849 openbsd*) 3850 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 3851 ;; 3852 *) 3853 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 3854 ;; 3855 esac 3856 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 3857fi 3858 3859case $host_os in 3860 darwin*) 3861 lock_old_archive_extraction=yes ;; 3862 *) 3863 lock_old_archive_extraction=no ;; 3864esac 3865_LT_DECL([], [old_postinstall_cmds], [2]) 3866_LT_DECL([], [old_postuninstall_cmds], [2]) 3867_LT_TAGDECL([], [old_archive_cmds], [2], 3868 [Commands used to build an old-style archive]) 3869_LT_DECL([], [lock_old_archive_extraction], [0], 3870 [Whether to use a lock for old archive extraction]) 3871])# _LT_CMD_OLD_ARCHIVE 3872 3873 3874# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3875# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 3876# ---------------------------------------------------------------- 3877# Check whether the given compiler option works 3878AC_DEFUN([_LT_COMPILER_OPTION], 3879[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3880m4_require([_LT_DECL_SED])dnl 3881AC_CACHE_CHECK([$1], [$2], 3882 [$2=no 3883 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 3884 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3885 lt_compiler_flag="$3" 3886 # Insert the option either (1) after the last *FLAGS variable, or 3887 # (2) before a word containing "conftest.", or (3) at the end. 3888 # Note that $ac_compile itself does not contain backslashes and begins 3889 # with a dollar sign (not a hyphen), so the echo should work correctly. 3890 # The option is referenced via a variable to avoid confusing sed. 3891 lt_compile=`echo "$ac_compile" | $SED \ 3892 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3893 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3894 -e 's:$: $lt_compiler_flag:'` 3895 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3896 (eval "$lt_compile" 2>conftest.err) 3897 ac_status=$? 3898 cat conftest.err >&AS_MESSAGE_LOG_FD 3899 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3900 if (exit $ac_status) && test -s "$ac_outfile"; then 3901 # The compiler can only warn and ignore the option if not recognized 3902 # So say no if there are warnings other than the usual output. 3903 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 3904 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3905 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 3906 $2=yes 3907 fi 3908 fi 3909 $RM conftest* 3910]) 3911 3912if test x"[$]$2" = xyes; then 3913 m4_if([$5], , :, [$5]) 3914else 3915 m4_if([$6], , :, [$6]) 3916fi 3917])# _LT_COMPILER_OPTION 3918 3919# Old name: 3920AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 3921dnl aclocal-1.4 backwards compatibility: 3922dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 3923 3924 3925# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3926# [ACTION-SUCCESS], [ACTION-FAILURE]) 3927# ---------------------------------------------------- 3928# Check whether the given linker option works 3929AC_DEFUN([_LT_LINKER_OPTION], 3930[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3931m4_require([_LT_DECL_SED])dnl 3932AC_CACHE_CHECK([$1], [$2], 3933 [$2=no 3934 save_LDFLAGS="$LDFLAGS" 3935 LDFLAGS="$LDFLAGS $3" 3936 echo "$lt_simple_link_test_code" > conftest.$ac_ext 3937 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 3938 # The linker can only warn and ignore the option if not recognized 3939 # So say no if there are warnings 3940 if test -s conftest.err; then 3941 # Append any errors to the config.log. 3942 cat conftest.err 1>&AS_MESSAGE_LOG_FD 3943 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 3944 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3945 if diff conftest.exp conftest.er2 >/dev/null; then 3946 $2=yes 3947 fi 3948 else 3949 $2=yes 3950 fi 3951 fi 3952 $RM -r conftest* 3953 LDFLAGS="$save_LDFLAGS" 3954]) 3955 3956if test x"[$]$2" = xyes; then 3957 m4_if([$4], , :, [$4]) 3958else 3959 m4_if([$5], , :, [$5]) 3960fi 3961])# _LT_LINKER_OPTION 3962 3963# Old name: 3964AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 3965dnl aclocal-1.4 backwards compatibility: 3966dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 3967 3968 3969# LT_CMD_MAX_LEN 3970#--------------- 3971AC_DEFUN([LT_CMD_MAX_LEN], 3972[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3973# find the maximum length of command line arguments 3974AC_MSG_CHECKING([the maximum length of command line arguments]) 3975AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 3976 i=0 3977 teststring="ABCD" 3978 3979 case $build_os in 3980 msdosdjgpp*) 3981 # On DJGPP, this test can blow up pretty badly due to problems in libc 3982 # (any single argument exceeding 2000 bytes causes a buffer overrun 3983 # during glob expansion). Even if it were fixed, the result of this 3984 # check would be larger than it should be. 3985 lt_cv_sys_max_cmd_len=12288; # 12K is about right 3986 ;; 3987 3988 gnu*) 3989 # Under GNU Hurd, this test is not required because there is 3990 # no limit to the length of command line arguments. 3991 # Libtool will interpret -1 as no limit whatsoever 3992 lt_cv_sys_max_cmd_len=-1; 3993 ;; 3994 3995 cygwin* | mingw* | cegcc*) 3996 # On Win9x/ME, this test blows up -- it succeeds, but takes 3997 # about 5 minutes as the teststring grows exponentially. 3998 # Worse, since 9x/ME are not pre-emptively multitasking, 3999 # you end up with a "frozen" computer, even though with patience 4000 # the test eventually succeeds (with a max line length of 256k). 4001 # Instead, let's just punt: use the minimum linelength reported by 4002 # all of the supported platforms: 8192 (on NT/2K/XP). 4003 lt_cv_sys_max_cmd_len=8192; 4004 ;; 4005 4006 mint*) 4007 # On MiNT this can take a long time and run out of memory. 4008 lt_cv_sys_max_cmd_len=8192; 4009 ;; 4010 4011 amigaos*) 4012 # On AmigaOS with pdksh, this test takes hours, literally. 4013 # So we just punt and use a minimum line length of 8192. 4014 lt_cv_sys_max_cmd_len=8192; 4015 ;; 4016 4017 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 4018 # This has been around since 386BSD, at least. Likely further. 4019 if test -x /sbin/sysctl; then 4020 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 4021 elif test -x /usr/sbin/sysctl; then 4022 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 4023 else 4024 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 4025 fi 4026 # And add a safety zone 4027 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 4028 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 4029 ;; 4030 4031 interix*) 4032 # We know the value 262144 and hardcode it with a safety zone (like BSD) 4033 lt_cv_sys_max_cmd_len=196608 4034 ;; 4035 4036 osf*) 4037 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 4038 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 4039 # nice to cause kernel panics so lets avoid the loop below. 4040 # First set a reasonable default. 4041 lt_cv_sys_max_cmd_len=16384 4042 # 4043 if test -x /sbin/sysconfig; then 4044 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 4045 *1*) lt_cv_sys_max_cmd_len=-1 ;; 4046 esac 4047 fi 4048 ;; 4049 sco3.2v5*) 4050 lt_cv_sys_max_cmd_len=102400 4051 ;; 4052 sysv5* | sco5v6* | sysv4.2uw2*) 4053 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 4054 if test -n "$kargmax"; then 4055 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 4056 else 4057 lt_cv_sys_max_cmd_len=32768 4058 fi 4059 ;; 4060 *) 4061 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 4062 if test -n "$lt_cv_sys_max_cmd_len"; then 4063 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 4064 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 4065 else 4066 # Make teststring a little bigger before we do anything with it. 4067 # a 1K string should be a reasonable start. 4068 for i in 1 2 3 4 5 6 7 8 ; do 4069 teststring=$teststring$teststring 4070 done 4071 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 4072 # If test is not a shell built-in, we'll probably end up computing a 4073 # maximum length that is only half of the actual maximum length, but 4074 # we can't tell. 4075 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 4076 = "X$teststring$teststring"; } >/dev/null 2>&1 && 4077 test $i != 17 # 1/2 MB should be enough 4078 do 4079 i=`expr $i + 1` 4080 teststring=$teststring$teststring 4081 done 4082 # Only check the string length outside the loop. 4083 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 4084 teststring= 4085 # Add a significant safety factor because C++ compilers can tack on 4086 # massive amounts of additional arguments before passing them to the 4087 # linker. It appears as though 1/2 is a usable value. 4088 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 4089 fi 4090 ;; 4091 esac 4092]) 4093if test -n $lt_cv_sys_max_cmd_len ; then 4094 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 4095else 4096 AC_MSG_RESULT(none) 4097fi 4098max_cmd_len=$lt_cv_sys_max_cmd_len 4099_LT_DECL([], [max_cmd_len], [0], 4100 [What is the maximum length of a command?]) 4101])# LT_CMD_MAX_LEN 4102 4103# Old name: 4104AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 4105dnl aclocal-1.4 backwards compatibility: 4106dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 4107 4108 4109# _LT_HEADER_DLFCN 4110# ---------------- 4111m4_defun([_LT_HEADER_DLFCN], 4112[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 4113])# _LT_HEADER_DLFCN 4114 4115 4116# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 4117# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 4118# ---------------------------------------------------------------- 4119m4_defun([_LT_TRY_DLOPEN_SELF], 4120[m4_require([_LT_HEADER_DLFCN])dnl 4121if test "$cross_compiling" = yes; then : 4122 [$4] 4123else 4124 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 4125 lt_status=$lt_dlunknown 4126 cat > conftest.$ac_ext <<_LT_EOF 4127[#line $LINENO "configure" 4128#include "confdefs.h" 4129 4130#if HAVE_DLFCN_H 4131#include <dlfcn.h> 4132#endif 4133 4134#include <stdio.h> 4135 4136#ifdef RTLD_GLOBAL 4137# define LT_DLGLOBAL RTLD_GLOBAL 4138#else 4139# ifdef DL_GLOBAL 4140# define LT_DLGLOBAL DL_GLOBAL 4141# else 4142# define LT_DLGLOBAL 0 4143# endif 4144#endif 4145 4146/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 4147 find out it does not work in some platform. */ 4148#ifndef LT_DLLAZY_OR_NOW 4149# ifdef RTLD_LAZY 4150# define LT_DLLAZY_OR_NOW RTLD_LAZY 4151# else 4152# ifdef DL_LAZY 4153# define LT_DLLAZY_OR_NOW DL_LAZY 4154# else 4155# ifdef RTLD_NOW 4156# define LT_DLLAZY_OR_NOW RTLD_NOW 4157# else 4158# ifdef DL_NOW 4159# define LT_DLLAZY_OR_NOW DL_NOW 4160# else 4161# define LT_DLLAZY_OR_NOW 0 4162# endif 4163# endif 4164# endif 4165# endif 4166#endif 4167 4168/* When -fvisbility=hidden is used, assume the code has been annotated 4169 correspondingly for the symbols needed. */ 4170#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 4171void fnord () __attribute__((visibility("default"))); 4172#endif 4173 4174void fnord () { int i=42; } 4175int main () 4176{ 4177 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 4178 int status = $lt_dlunknown; 4179 4180 if (self) 4181 { 4182 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 4183 else 4184 { 4185 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 4186 else puts (dlerror ()); 4187 } 4188 /* dlclose (self); */ 4189 } 4190 else 4191 puts (dlerror ()); 4192 4193 return status; 4194}] 4195_LT_EOF 4196 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 4197 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 4198 lt_status=$? 4199 case x$lt_status in 4200 x$lt_dlno_uscore) $1 ;; 4201 x$lt_dlneed_uscore) $2 ;; 4202 x$lt_dlunknown|x*) $3 ;; 4203 esac 4204 else : 4205 # compilation failed 4206 $3 4207 fi 4208fi 4209rm -fr conftest* 4210])# _LT_TRY_DLOPEN_SELF 4211 4212 4213# LT_SYS_DLOPEN_SELF 4214# ------------------ 4215AC_DEFUN([LT_SYS_DLOPEN_SELF], 4216[m4_require([_LT_HEADER_DLFCN])dnl 4217if test "x$enable_dlopen" != xyes; then 4218 enable_dlopen=unknown 4219 enable_dlopen_self=unknown 4220 enable_dlopen_self_static=unknown 4221else 4222 lt_cv_dlopen=no 4223 lt_cv_dlopen_libs= 4224 4225 case $host_os in 4226 beos*) 4227 lt_cv_dlopen="load_add_on" 4228 lt_cv_dlopen_libs= 4229 lt_cv_dlopen_self=yes 4230 ;; 4231 4232 mingw* | pw32* | cegcc*) 4233 lt_cv_dlopen="LoadLibrary" 4234 lt_cv_dlopen_libs= 4235 ;; 4236 4237 cygwin*) 4238 lt_cv_dlopen="dlopen" 4239 lt_cv_dlopen_libs= 4240 ;; 4241 4242 darwin*) 4243 # if libdl is installed we need to link against it 4244 AC_CHECK_LIB([dl], [dlopen], 4245 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 4246 lt_cv_dlopen="dyld" 4247 lt_cv_dlopen_libs= 4248 lt_cv_dlopen_self=yes 4249 ]) 4250 ;; 4251 4252 *) 4253 AC_CHECK_FUNC([shl_load], 4254 [lt_cv_dlopen="shl_load"], 4255 [AC_CHECK_LIB([dld], [shl_load], 4256 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 4257 [AC_CHECK_FUNC([dlopen], 4258 [lt_cv_dlopen="dlopen"], 4259 [AC_CHECK_LIB([dl], [dlopen], 4260 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 4261 [AC_CHECK_LIB([svld], [dlopen], 4262 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 4263 [AC_CHECK_LIB([dld], [dld_link], 4264 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 4265 ]) 4266 ]) 4267 ]) 4268 ]) 4269 ]) 4270 ;; 4271 esac 4272 4273 if test "x$lt_cv_dlopen" != xno; then 4274 enable_dlopen=yes 4275 else 4276 enable_dlopen=no 4277 fi 4278 4279 case $lt_cv_dlopen in 4280 dlopen) 4281 save_CPPFLAGS="$CPPFLAGS" 4282 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 4283 4284 save_LDFLAGS="$LDFLAGS" 4285 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 4286 4287 save_LIBS="$LIBS" 4288 LIBS="$lt_cv_dlopen_libs $LIBS" 4289 4290 AC_CACHE_CHECK([whether a program can dlopen itself], 4291 lt_cv_dlopen_self, [dnl 4292 _LT_TRY_DLOPEN_SELF( 4293 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 4294 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 4295 ]) 4296 4297 if test "x$lt_cv_dlopen_self" = xyes; then 4298 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 4299 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 4300 lt_cv_dlopen_self_static, [dnl 4301 _LT_TRY_DLOPEN_SELF( 4302 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 4303 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 4304 ]) 4305 fi 4306 4307 CPPFLAGS="$save_CPPFLAGS" 4308 LDFLAGS="$save_LDFLAGS" 4309 LIBS="$save_LIBS" 4310 ;; 4311 esac 4312 4313 case $lt_cv_dlopen_self in 4314 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 4315 *) enable_dlopen_self=unknown ;; 4316 esac 4317 4318 case $lt_cv_dlopen_self_static in 4319 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 4320 *) enable_dlopen_self_static=unknown ;; 4321 esac 4322fi 4323_LT_DECL([dlopen_support], [enable_dlopen], [0], 4324 [Whether dlopen is supported]) 4325_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 4326 [Whether dlopen of programs is supported]) 4327_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 4328 [Whether dlopen of statically linked programs is supported]) 4329])# LT_SYS_DLOPEN_SELF 4330 4331# Old name: 4332AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 4333dnl aclocal-1.4 backwards compatibility: 4334dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 4335 4336 4337# _LT_COMPILER_C_O([TAGNAME]) 4338# --------------------------- 4339# Check to see if options -c and -o are simultaneously supported by compiler. 4340# This macro does not hard code the compiler like AC_PROG_CC_C_O. 4341m4_defun([_LT_COMPILER_C_O], 4342[m4_require([_LT_DECL_SED])dnl 4343m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4344m4_require([_LT_TAG_COMPILER])dnl 4345AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 4346 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 4347 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 4348 $RM -r conftest 2>/dev/null 4349 mkdir conftest 4350 cd conftest 4351 mkdir out 4352 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4353 4354 lt_compiler_flag="-o out/conftest2.$ac_objext" 4355 # Insert the option either (1) after the last *FLAGS variable, or 4356 # (2) before a word containing "conftest.", or (3) at the end. 4357 # Note that $ac_compile itself does not contain backslashes and begins 4358 # with a dollar sign (not a hyphen), so the echo should work correctly. 4359 lt_compile=`echo "$ac_compile" | $SED \ 4360 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4361 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4362 -e 's:$: $lt_compiler_flag:'` 4363 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4364 (eval "$lt_compile" 2>out/conftest.err) 4365 ac_status=$? 4366 cat out/conftest.err >&AS_MESSAGE_LOG_FD 4367 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4368 if (exit $ac_status) && test -s out/conftest2.$ac_objext 4369 then 4370 # The compiler can only warn and ignore the option if not recognized 4371 # So say no if there are warnings 4372 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 4373 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 4374 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 4375 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4376 fi 4377 fi 4378 chmod u+w . 2>&AS_MESSAGE_LOG_FD 4379 $RM conftest* 4380 # SGI C++ compiler will create directory out/ii_files/ for 4381 # template instantiation 4382 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 4383 $RM out/* && rmdir out 4384 cd .. 4385 $RM -r conftest 4386 $RM conftest* 4387]) 4388_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 4389 [Does compiler simultaneously support -c and -o options?]) 4390])# _LT_COMPILER_C_O 4391 4392 4393# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 4394# ---------------------------------- 4395# Check to see if we can do hard links to lock some files if needed 4396m4_defun([_LT_COMPILER_FILE_LOCKS], 4397[m4_require([_LT_ENABLE_LOCK])dnl 4398m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4399_LT_COMPILER_C_O([$1]) 4400 4401hard_links="nottested" 4402if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 4403 # do not overwrite the value of need_locks provided by the user 4404 AC_MSG_CHECKING([if we can lock with hard links]) 4405 hard_links=yes 4406 $RM conftest* 4407 ln conftest.a conftest.b 2>/dev/null && hard_links=no 4408 touch conftest.a 4409 ln conftest.a conftest.b 2>&5 || hard_links=no 4410 ln conftest.a conftest.b 2>/dev/null && hard_links=no 4411 AC_MSG_RESULT([$hard_links]) 4412 if test "$hard_links" = no; then 4413 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 4414 need_locks=warn 4415 fi 4416else 4417 need_locks=no 4418fi 4419_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 4420])# _LT_COMPILER_FILE_LOCKS 4421 4422 4423# _LT_CHECK_OBJDIR 4424# ---------------- 4425m4_defun([_LT_CHECK_OBJDIR], 4426[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 4427[rm -f .libs 2>/dev/null 4428mkdir .libs 2>/dev/null 4429if test -d .libs; then 4430 lt_cv_objdir=.libs 4431else 4432 # MS-DOS does not allow filenames that begin with a dot. 4433 lt_cv_objdir=_libs 4434fi 4435rmdir .libs 2>/dev/null]) 4436objdir=$lt_cv_objdir 4437_LT_DECL([], [objdir], [0], 4438 [The name of the directory that contains temporary libtool files])dnl 4439m4_pattern_allow([LT_OBJDIR])dnl 4440AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 4441 [Define to the sub-directory in which libtool stores uninstalled libraries.]) 4442])# _LT_CHECK_OBJDIR 4443 4444 4445# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 4446# -------------------------------------- 4447# Check hardcoding attributes. 4448m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 4449[AC_MSG_CHECKING([how to hardcode library paths into programs]) 4450_LT_TAGVAR(hardcode_action, $1)= 4451if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 4452 test -n "$_LT_TAGVAR(runpath_var, $1)" || 4453 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 4454 4455 # We can hardcode non-existent directories. 4456 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 4457 # If the only mechanism to avoid hardcoding is shlibpath_var, we 4458 # have to relink, otherwise we might link with an installed library 4459 # when we should be linking with a yet-to-be-installed one 4460 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 4461 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 4462 # Linking always hardcodes the temporary library directory. 4463 _LT_TAGVAR(hardcode_action, $1)=relink 4464 else 4465 # We can link without hardcoding, and we can hardcode nonexisting dirs. 4466 _LT_TAGVAR(hardcode_action, $1)=immediate 4467 fi 4468else 4469 # We cannot hardcode anything, or else we can only hardcode existing 4470 # directories. 4471 _LT_TAGVAR(hardcode_action, $1)=unsupported 4472fi 4473AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 4474 4475if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 4476 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 4477 # Fast installation is not supported 4478 enable_fast_install=no 4479elif test "$shlibpath_overrides_runpath" = yes || 4480 test "$enable_shared" = no; then 4481 # Fast installation is not necessary 4482 enable_fast_install=needless 4483fi 4484_LT_TAGDECL([], [hardcode_action], [0], 4485 [How to hardcode a shared library path into an executable]) 4486])# _LT_LINKER_HARDCODE_LIBPATH 4487 4488 4489# _LT_CMD_STRIPLIB 4490# ---------------- 4491m4_defun([_LT_CMD_STRIPLIB], 4492[m4_require([_LT_DECL_EGREP]) 4493striplib= 4494old_striplib= 4495AC_MSG_CHECKING([whether stripping libraries is possible]) 4496if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 4497 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 4498 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 4499 AC_MSG_RESULT([yes]) 4500else 4501# FIXME - insert some real tests, host_os isn't really good enough 4502 case $host_os in 4503 darwin*) 4504 if test -n "$STRIP" ; then 4505 striplib="$STRIP -x" 4506 old_striplib="$STRIP -S" 4507 AC_MSG_RESULT([yes]) 4508 else 4509 AC_MSG_RESULT([no]) 4510 fi 4511 ;; 4512 *) 4513 AC_MSG_RESULT([no]) 4514 ;; 4515 esac 4516fi 4517_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 4518_LT_DECL([], [striplib], [1]) 4519])# _LT_CMD_STRIPLIB 4520 4521 4522# _LT_SYS_DYNAMIC_LINKER([TAG]) 4523# ----------------------------- 4524# PORTME Fill in your ld.so characteristics 4525m4_defun([_LT_SYS_DYNAMIC_LINKER], 4526[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4527m4_require([_LT_DECL_EGREP])dnl 4528m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4529m4_require([_LT_DECL_OBJDUMP])dnl 4530m4_require([_LT_DECL_SED])dnl 4531m4_require([_LT_CHECK_SHELL_FEATURES])dnl 4532AC_MSG_CHECKING([dynamic linker characteristics]) 4533m4_if([$1], 4534 [], [ 4535if test "$GCC" = yes; then 4536 case $host_os in 4537 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 4538 *) lt_awk_arg="/^libraries:/" ;; 4539 esac 4540 case $host_os in 4541 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 4542 *) lt_sed_strip_eq="s,=/,/,g" ;; 4543 esac 4544 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 4545 case $lt_search_path_spec in 4546 *\;*) 4547 # if the path contains ";" then we assume it to be the separator 4548 # otherwise default to the standard path separator (i.e. ":") - it is 4549 # assumed that no part of a normal pathname contains ";" but that should 4550 # okay in the real world where ";" in dirpaths is itself problematic. 4551 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 4552 ;; 4553 *) 4554 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 4555 ;; 4556 esac 4557 # Ok, now we have the path, separated by spaces, we can step through it 4558 # and add multilib dir if necessary. 4559 lt_tmp_lt_search_path_spec= 4560 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 4561 for lt_sys_path in $lt_search_path_spec; do 4562 if test -d "$lt_sys_path/$lt_multi_os_dir"; then 4563 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 4564 else 4565 test -d "$lt_sys_path" && \ 4566 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 4567 fi 4568 done 4569 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 4570BEGIN {RS=" "; FS="/|\n";} { 4571 lt_foo=""; 4572 lt_count=0; 4573 for (lt_i = NF; lt_i > 0; lt_i--) { 4574 if ($lt_i != "" && $lt_i != ".") { 4575 if ($lt_i == "..") { 4576 lt_count++; 4577 } else { 4578 if (lt_count == 0) { 4579 lt_foo="/" $lt_i lt_foo; 4580 } else { 4581 lt_count--; 4582 } 4583 } 4584 } 4585 } 4586 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 4587 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 4588}'` 4589 # AWK program above erroneously prepends '/' to C:/dos/paths 4590 # for these hosts. 4591 case $host_os in 4592 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 4593 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 4594 esac 4595 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 4596else 4597 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 4598fi]) 4599library_names_spec= 4600libname_spec='lib$name' 4601soname_spec= 4602shrext_cmds=".so" 4603postinstall_cmds= 4604postuninstall_cmds= 4605finish_cmds= 4606finish_eval= 4607shlibpath_var= 4608shlibpath_overrides_runpath=unknown 4609version_type=none 4610dynamic_linker="$host_os ld.so" 4611sys_lib_dlsearch_path_spec="/lib /usr/lib" 4612need_lib_prefix=unknown 4613hardcode_into_libs=no 4614 4615# when you set need_version to no, make sure it does not cause -set_version 4616# flags to be left without arguments 4617need_version=unknown 4618 4619case $host_os in 4620aix3*) 4621 version_type=linux 4622 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 4623 shlibpath_var=LIBPATH 4624 4625 # AIX 3 has no versioning support, so we append a major version to the name. 4626 soname_spec='${libname}${release}${shared_ext}$major' 4627 ;; 4628 4629aix[[4-9]]*) 4630 version_type=linux 4631 need_lib_prefix=no 4632 need_version=no 4633 hardcode_into_libs=yes 4634 if test "$host_cpu" = ia64; then 4635 # AIX 5 supports IA64 4636 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 4637 shlibpath_var=LD_LIBRARY_PATH 4638 else 4639 # With GCC up to 2.95.x, collect2 would create an import file 4640 # for dependence libraries. The import file would start with 4641 # the line `#! .'. This would cause the generated library to 4642 # depend on `.', always an invalid library. This was fixed in 4643 # development snapshots of GCC prior to 3.0. 4644 case $host_os in 4645 aix4 | aix4.[[01]] | aix4.[[01]].*) 4646 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 4647 echo ' yes ' 4648 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 4649 : 4650 else 4651 can_build_shared=no 4652 fi 4653 ;; 4654 esac 4655 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 4656 # soname into executable. Probably we can add versioning support to 4657 # collect2, so additional links can be useful in future. 4658 if test "$aix_use_runtimelinking" = yes; then 4659 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 4660 # instead of lib<name>.a to let people know that these are not 4661 # typical AIX shared libraries. 4662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4663 else 4664 # We preserve .a as extension for shared libraries through AIX4.2 4665 # and later when we are not doing run time linking. 4666 library_names_spec='${libname}${release}.a $libname.a' 4667 soname_spec='${libname}${release}${shared_ext}$major' 4668 fi 4669 shlibpath_var=LIBPATH 4670 fi 4671 ;; 4672 4673amigaos*) 4674 case $host_cpu in 4675 powerpc) 4676 # Since July 2007 AmigaOS4 officially supports .so libraries. 4677 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 4678 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4679 ;; 4680 m68k) 4681 library_names_spec='$libname.ixlibrary $libname.a' 4682 # Create ${libname}_ixlibrary.a entries in /sys/libs. 4683 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' 4684 ;; 4685 esac 4686 ;; 4687 4688beos*) 4689 library_names_spec='${libname}${shared_ext}' 4690 dynamic_linker="$host_os ld.so" 4691 shlibpath_var=LIBRARY_PATH 4692 ;; 4693 4694bsdi[[45]]*) 4695 version_type=linux 4696 need_version=no 4697 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4698 soname_spec='${libname}${release}${shared_ext}$major' 4699 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 4700 shlibpath_var=LD_LIBRARY_PATH 4701 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 4702 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 4703 # the default ld.so.conf also contains /usr/contrib/lib and 4704 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 4705 # libtool to hard-code these into programs 4706 ;; 4707 4708cygwin* | mingw* | pw32* | cegcc*) 4709 version_type=windows 4710 shrext_cmds=".dll" 4711 need_version=no 4712 need_lib_prefix=no 4713 4714 case $GCC,$host_os in 4715 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 4716 library_names_spec='$libname.dll.a' 4717 # DLL is installed to $(libdir)/../bin by postinstall_cmds 4718 postinstall_cmds='base_file=`basename \${file}`~ 4719 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 4720 dldir=$destdir/`dirname \$dlpath`~ 4721 test -d \$dldir || mkdir -p \$dldir~ 4722 $install_prog $dir/$dlname \$dldir/$dlname~ 4723 chmod a+x \$dldir/$dlname~ 4724 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 4725 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 4726 fi' 4727 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 4728 dlpath=$dir/\$dldll~ 4729 $RM \$dlpath' 4730 shlibpath_overrides_runpath=yes 4731 4732 case $host_os in 4733 cygwin*) 4734 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 4735 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4736m4_if([$1], [],[ 4737 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 4738 ;; 4739 mingw* | cegcc*) 4740 # MinGW DLLs use traditional 'lib' prefix 4741 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4742 ;; 4743 pw32*) 4744 # pw32 DLLs use 'pw' prefix rather than 'lib' 4745 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4746 ;; 4747 esac 4748 ;; 4749 4750 *) 4751 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 4752 ;; 4753 esac 4754 dynamic_linker='Win32 ld.exe' 4755 # FIXME: first we should search . and the directory the executable is in 4756 shlibpath_var=PATH 4757 ;; 4758 4759darwin* | rhapsody*) 4760 dynamic_linker="$host_os dyld" 4761 version_type=darwin 4762 need_lib_prefix=no 4763 need_version=no 4764 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 4765 soname_spec='${libname}${release}${major}$shared_ext' 4766 shlibpath_overrides_runpath=yes 4767 shlibpath_var=DYLD_LIBRARY_PATH 4768 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 4769m4_if([$1], [],[ 4770 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 4771 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 4772 ;; 4773 4774dgux*) 4775 version_type=linux 4776 need_lib_prefix=no 4777 need_version=no 4778 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 4779 soname_spec='${libname}${release}${shared_ext}$major' 4780 shlibpath_var=LD_LIBRARY_PATH 4781 ;; 4782 4783freebsd1*) 4784 dynamic_linker=no 4785 ;; 4786 4787freebsd* | dragonfly*) 4788 # DragonFly does not have aout. When/if they implement a new 4789 # versioning mechanism, adjust this. 4790 if test -x /usr/bin/objformat; then 4791 objformat=`/usr/bin/objformat` 4792 else 4793 case $host_os in 4794 freebsd[[123]]*) objformat=aout ;; 4795 *) objformat=elf ;; 4796 esac 4797 fi 4798 version_type=freebsd-$objformat 4799 case $version_type in 4800 freebsd-elf*) 4801 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 4802 need_version=no 4803 need_lib_prefix=no 4804 ;; 4805 freebsd-*) 4806 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 4807 need_version=yes 4808 ;; 4809 esac 4810 shlibpath_var=LD_LIBRARY_PATH 4811 case $host_os in 4812 freebsd2*) 4813 shlibpath_overrides_runpath=yes 4814 ;; 4815 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 4816 shlibpath_overrides_runpath=yes 4817 hardcode_into_libs=yes 4818 ;; 4819 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 4820 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 4821 shlibpath_overrides_runpath=no 4822 hardcode_into_libs=yes 4823 ;; 4824 *) # from 4.6 on, and DragonFly 4825 shlibpath_overrides_runpath=yes 4826 hardcode_into_libs=yes 4827 ;; 4828 esac 4829 ;; 4830 4831gnu*) 4832 version_type=linux 4833 need_lib_prefix=no 4834 need_version=no 4835 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 4836 soname_spec='${libname}${release}${shared_ext}$major' 4837 shlibpath_var=LD_LIBRARY_PATH 4838 hardcode_into_libs=yes 4839 ;; 4840 4841haiku*) 4842 version_type=linux 4843 need_lib_prefix=no 4844 need_version=no 4845 dynamic_linker="$host_os runtime_loader" 4846 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 4847 soname_spec='${libname}${release}${shared_ext}$major' 4848 shlibpath_var=LIBRARY_PATH 4849 shlibpath_overrides_runpath=yes 4850 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 4851 hardcode_into_libs=yes 4852 ;; 4853 4854hpux9* | hpux10* | hpux11*) 4855 # Give a soname corresponding to the major version so that dld.sl refuses to 4856 # link against other versions. 4857 version_type=sunos 4858 need_lib_prefix=no 4859 need_version=no 4860 case $host_cpu in 4861 ia64*) 4862 shrext_cmds='.so' 4863 hardcode_into_libs=yes 4864 dynamic_linker="$host_os dld.so" 4865 shlibpath_var=LD_LIBRARY_PATH 4866 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4867 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4868 soname_spec='${libname}${release}${shared_ext}$major' 4869 if test "X$HPUX_IA64_MODE" = X32; then 4870 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 4871 else 4872 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 4873 fi 4874 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4875 ;; 4876 hppa*64*) 4877 shrext_cmds='.sl' 4878 hardcode_into_libs=yes 4879 dynamic_linker="$host_os dld.sl" 4880 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 4881 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4882 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4883 soname_spec='${libname}${release}${shared_ext}$major' 4884 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 4885 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4886 ;; 4887 *) 4888 shrext_cmds='.sl' 4889 dynamic_linker="$host_os dld.sl" 4890 shlibpath_var=SHLIB_PATH 4891 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 4892 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4893 soname_spec='${libname}${release}${shared_ext}$major' 4894 ;; 4895 esac 4896 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 4897 postinstall_cmds='chmod 555 $lib' 4898 # or fails outright, so override atomically: 4899 install_override_mode=555 4900 ;; 4901 4902interix[[3-9]]*) 4903 version_type=linux 4904 need_lib_prefix=no 4905 need_version=no 4906 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 4907 soname_spec='${libname}${release}${shared_ext}$major' 4908 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 4909 shlibpath_var=LD_LIBRARY_PATH 4910 shlibpath_overrides_runpath=no 4911 hardcode_into_libs=yes 4912 ;; 4913 4914irix5* | irix6* | nonstopux*) 4915 case $host_os in 4916 nonstopux*) version_type=nonstopux ;; 4917 *) 4918 if test "$lt_cv_prog_gnu_ld" = yes; then 4919 version_type=linux 4920 else 4921 version_type=irix 4922 fi ;; 4923 esac 4924 need_lib_prefix=no 4925 need_version=no 4926 soname_spec='${libname}${release}${shared_ext}$major' 4927 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 4928 case $host_os in 4929 irix5* | nonstopux*) 4930 libsuff= shlibsuff= 4931 ;; 4932 *) 4933 case $LD in # libtool.m4 will add one of these switches to LD 4934 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 4935 libsuff= shlibsuff= libmagic=32-bit;; 4936 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 4937 libsuff=32 shlibsuff=N32 libmagic=N32;; 4938 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 4939 libsuff=64 shlibsuff=64 libmagic=64-bit;; 4940 *) libsuff= shlibsuff= libmagic=never-match;; 4941 esac 4942 ;; 4943 esac 4944 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 4945 shlibpath_overrides_runpath=no 4946 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 4947 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 4948 hardcode_into_libs=yes 4949 ;; 4950 4951# No shared lib support for Linux oldld, aout, or coff. 4952linux*oldld* | linux*aout* | linux*coff*) 4953 dynamic_linker=no 4954 ;; 4955 4956# This must be Linux ELF. 4957linux* | k*bsd*-gnu | kopensolaris*-gnu) 4958 version_type=linux 4959 need_lib_prefix=no 4960 need_version=no 4961 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4962 soname_spec='${libname}${release}${shared_ext}$major' 4963 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 4964 shlibpath_var=LD_LIBRARY_PATH 4965 shlibpath_overrides_runpath=no 4966 4967 # Some binutils ld are patched to set DT_RUNPATH 4968 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 4969 [lt_cv_shlibpath_overrides_runpath=no 4970 save_LDFLAGS=$LDFLAGS 4971 save_libdir=$libdir 4972 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 4973 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 4974 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4975 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 4976 [lt_cv_shlibpath_overrides_runpath=yes])]) 4977 LDFLAGS=$save_LDFLAGS 4978 libdir=$save_libdir 4979 ]) 4980 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 4981 4982 # This implies no fast_install, which is unacceptable. 4983 # Some rework will be needed to allow for fast_install 4984 # before this can be enabled. 4985 hardcode_into_libs=yes 4986 4987 # Append ld.so.conf contents to the search path 4988 if test -f /etc/ld.so.conf; then 4989 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' ' '` 4990 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 4991 fi 4992 4993 # We used to test for /lib/ld.so.1 and disable shared libraries on 4994 # powerpc, because MkLinux only supported shared libraries with the 4995 # GNU dynamic linker. Since this was broken with cross compilers, 4996 # most powerpc-linux boxes support dynamic linking these days and 4997 # people can always --disable-shared, the test was removed, and we 4998 # assume the GNU/Linux dynamic linker is in use. 4999 dynamic_linker='GNU/Linux ld.so' 5000 ;; 5001 5002netbsd*) 5003 version_type=sunos 5004 need_lib_prefix=no 5005 need_version=no 5006 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5007 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 5008 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 5009 dynamic_linker='NetBSD (a.out) ld.so' 5010 else 5011 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 5012 soname_spec='${libname}${release}${shared_ext}$major' 5013 dynamic_linker='NetBSD ld.elf_so' 5014 fi 5015 shlibpath_var=LD_LIBRARY_PATH 5016 shlibpath_overrides_runpath=yes 5017 hardcode_into_libs=yes 5018 ;; 5019 5020newsos6) 5021 version_type=linux 5022 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5023 shlibpath_var=LD_LIBRARY_PATH 5024 shlibpath_overrides_runpath=yes 5025 ;; 5026 5027*nto* | *qnx*) 5028 version_type=qnx 5029 need_lib_prefix=no 5030 need_version=no 5031 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5032 soname_spec='${libname}${release}${shared_ext}$major' 5033 shlibpath_var=LD_LIBRARY_PATH 5034 shlibpath_overrides_runpath=no 5035 hardcode_into_libs=yes 5036 dynamic_linker='ldqnx.so' 5037 ;; 5038 5039openbsd*) 5040 version_type=sunos 5041 sys_lib_dlsearch_path_spec="/usr/lib" 5042 need_lib_prefix=no 5043 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 5044 case $host_os in 5045 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 5046 *) need_version=no ;; 5047 esac 5048 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 5049 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 5050 shlibpath_var=LD_LIBRARY_PATH 5051 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5052 case $host_os in 5053 openbsd2.[[89]] | openbsd2.[[89]].*) 5054 shlibpath_overrides_runpath=no 5055 ;; 5056 *) 5057 shlibpath_overrides_runpath=yes 5058 ;; 5059 esac 5060 else 5061 shlibpath_overrides_runpath=yes 5062 fi 5063 ;; 5064 5065os2*) 5066 libname_spec='$name' 5067 shrext_cmds=".dll" 5068 need_lib_prefix=no 5069 library_names_spec='$libname${shared_ext} $libname.a' 5070 dynamic_linker='OS/2 ld.exe' 5071 shlibpath_var=LIBPATH 5072 ;; 5073 5074osf3* | osf4* | osf5*) 5075 version_type=osf 5076 need_lib_prefix=no 5077 need_version=no 5078 soname_spec='${libname}${release}${shared_ext}$major' 5079 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5080 shlibpath_var=LD_LIBRARY_PATH 5081 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 5082 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 5083 ;; 5084 5085rdos*) 5086 dynamic_linker=no 5087 ;; 5088 5089solaris*) 5090 version_type=linux 5091 need_lib_prefix=no 5092 need_version=no 5093 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5094 soname_spec='${libname}${release}${shared_ext}$major' 5095 shlibpath_var=LD_LIBRARY_PATH 5096 shlibpath_overrides_runpath=yes 5097 hardcode_into_libs=yes 5098 # ldd complains unless libraries are executable 5099 postinstall_cmds='chmod +x $lib' 5100 ;; 5101 5102sunos4*) 5103 version_type=sunos 5104 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 5105 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 5106 shlibpath_var=LD_LIBRARY_PATH 5107 shlibpath_overrides_runpath=yes 5108 if test "$with_gnu_ld" = yes; then 5109 need_lib_prefix=no 5110 fi 5111 need_version=yes 5112 ;; 5113 5114sysv4 | sysv4.3*) 5115 version_type=linux 5116 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5117 soname_spec='${libname}${release}${shared_ext}$major' 5118 shlibpath_var=LD_LIBRARY_PATH 5119 case $host_vendor in 5120 sni) 5121 shlibpath_overrides_runpath=no 5122 need_lib_prefix=no 5123 runpath_var=LD_RUN_PATH 5124 ;; 5125 siemens) 5126 need_lib_prefix=no 5127 ;; 5128 motorola) 5129 need_lib_prefix=no 5130 need_version=no 5131 shlibpath_overrides_runpath=no 5132 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 5133 ;; 5134 esac 5135 ;; 5136 5137sysv4*MP*) 5138 if test -d /usr/nec ;then 5139 version_type=linux 5140 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 5141 soname_spec='$libname${shared_ext}.$major' 5142 shlibpath_var=LD_LIBRARY_PATH 5143 fi 5144 ;; 5145 5146sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5147 version_type=freebsd-elf 5148 need_lib_prefix=no 5149 need_version=no 5150 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 5151 soname_spec='${libname}${release}${shared_ext}$major' 5152 shlibpath_var=LD_LIBRARY_PATH 5153 shlibpath_overrides_runpath=yes 5154 hardcode_into_libs=yes 5155 if test "$with_gnu_ld" = yes; then 5156 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 5157 else 5158 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 5159 case $host_os in 5160 sco3.2v5*) 5161 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 5162 ;; 5163 esac 5164 fi 5165 sys_lib_dlsearch_path_spec='/usr/lib' 5166 ;; 5167 5168tpf*) 5169 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 5170 version_type=linux 5171 need_lib_prefix=no 5172 need_version=no 5173 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5174 shlibpath_var=LD_LIBRARY_PATH 5175 shlibpath_overrides_runpath=no 5176 hardcode_into_libs=yes 5177 ;; 5178 5179uts4*) 5180 version_type=linux 5181 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5182 soname_spec='${libname}${release}${shared_ext}$major' 5183 shlibpath_var=LD_LIBRARY_PATH 5184 ;; 5185 5186*) 5187 dynamic_linker=no 5188 ;; 5189esac 5190AC_MSG_RESULT([$dynamic_linker]) 5191test "$dynamic_linker" = no && can_build_shared=no 5192 5193variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 5194if test "$GCC" = yes; then 5195 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 5196fi 5197 5198if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 5199 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 5200fi 5201if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 5202 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 5203fi 5204 5205_LT_DECL([], [variables_saved_for_relink], [1], 5206 [Variables whose values should be saved in libtool wrapper scripts and 5207 restored at link time]) 5208_LT_DECL([], [need_lib_prefix], [0], 5209 [Do we need the "lib" prefix for modules?]) 5210_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 5211_LT_DECL([], [version_type], [0], [Library versioning type]) 5212_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 5213_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 5214_LT_DECL([], [shlibpath_overrides_runpath], [0], 5215 [Is shlibpath searched before the hard-coded library search path?]) 5216_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 5217_LT_DECL([], [library_names_spec], [1], 5218 [[List of archive names. First name is the real one, the rest are links. 5219 The last name is the one that the linker finds with -lNAME]]) 5220_LT_DECL([], [soname_spec], [1], 5221 [[The coded name of the library, if different from the real name]]) 5222_LT_DECL([], [install_override_mode], [1], 5223 [Permission mode override for installation of shared libraries]) 5224_LT_DECL([], [postinstall_cmds], [2], 5225 [Command to use after installation of a shared archive]) 5226_LT_DECL([], [postuninstall_cmds], [2], 5227 [Command to use after uninstallation of a shared archive]) 5228_LT_DECL([], [finish_cmds], [2], 5229 [Commands used to finish a libtool library installation in a directory]) 5230_LT_DECL([], [finish_eval], [1], 5231 [[As "finish_cmds", except a single script fragment to be evaled but 5232 not shown]]) 5233_LT_DECL([], [hardcode_into_libs], [0], 5234 [Whether we should hardcode library paths into libraries]) 5235_LT_DECL([], [sys_lib_search_path_spec], [2], 5236 [Compile-time system search path for libraries]) 5237_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 5238 [Run-time system search path for libraries]) 5239])# _LT_SYS_DYNAMIC_LINKER 5240 5241 5242# _LT_PATH_TOOL_PREFIX(TOOL) 5243# -------------------------- 5244# find a file program which can recognize shared library 5245AC_DEFUN([_LT_PATH_TOOL_PREFIX], 5246[m4_require([_LT_DECL_EGREP])dnl 5247AC_MSG_CHECKING([for $1]) 5248AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 5249[case $MAGIC_CMD in 5250[[\\/*] | ?:[\\/]*]) 5251 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 5252 ;; 5253*) 5254 lt_save_MAGIC_CMD="$MAGIC_CMD" 5255 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5256dnl $ac_dummy forces splitting on constant user-supplied paths. 5257dnl POSIX.2 word splitting is done only on the output of word expansions, 5258dnl not every word. This closes a longstanding sh security hole. 5259 ac_dummy="m4_if([$2], , $PATH, [$2])" 5260 for ac_dir in $ac_dummy; do 5261 IFS="$lt_save_ifs" 5262 test -z "$ac_dir" && ac_dir=. 5263 if test -f $ac_dir/$1; then 5264 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 5265 if test -n "$file_magic_test_file"; then 5266 case $deplibs_check_method in 5267 "file_magic "*) 5268 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 5269 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5270 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 5271 $EGREP "$file_magic_regex" > /dev/null; then 5272 : 5273 else 5274 cat <<_LT_EOF 1>&2 5275 5276*** Warning: the command libtool uses to detect shared libraries, 5277*** $file_magic_cmd, produces output that libtool cannot recognize. 5278*** The result is that libtool may fail to recognize shared libraries 5279*** as such. This will affect the creation of libtool libraries that 5280*** depend on shared libraries, but programs linked with such libtool 5281*** libraries will work regardless of this problem. Nevertheless, you 5282*** may want to report the problem to your system manager and/or to 5283*** bug-libtool@gnu.org 5284 5285_LT_EOF 5286 fi ;; 5287 esac 5288 fi 5289 break 5290 fi 5291 done 5292 IFS="$lt_save_ifs" 5293 MAGIC_CMD="$lt_save_MAGIC_CMD" 5294 ;; 5295esac]) 5296MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5297if test -n "$MAGIC_CMD"; then 5298 AC_MSG_RESULT($MAGIC_CMD) 5299else 5300 AC_MSG_RESULT(no) 5301fi 5302_LT_DECL([], [MAGIC_CMD], [0], 5303 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 5304])# _LT_PATH_TOOL_PREFIX 5305 5306# Old name: 5307AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 5308dnl aclocal-1.4 backwards compatibility: 5309dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 5310 5311 5312# _LT_PATH_MAGIC 5313# -------------- 5314# find a file program which can recognize a shared library 5315m4_defun([_LT_PATH_MAGIC], 5316[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 5317if test -z "$lt_cv_path_MAGIC_CMD"; then 5318 if test -n "$ac_tool_prefix"; then 5319 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 5320 else 5321 MAGIC_CMD=: 5322 fi 5323fi 5324])# _LT_PATH_MAGIC 5325 5326 5327# LT_PATH_LD 5328# ---------- 5329# find the pathname to the GNU or non-GNU linker 5330AC_DEFUN([LT_PATH_LD], 5331[AC_REQUIRE([AC_PROG_CC])dnl 5332AC_REQUIRE([AC_CANONICAL_HOST])dnl 5333AC_REQUIRE([AC_CANONICAL_BUILD])dnl 5334m4_require([_LT_DECL_SED])dnl 5335m4_require([_LT_DECL_EGREP])dnl 5336m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 5337 5338AC_ARG_WITH([gnu-ld], 5339 [AS_HELP_STRING([--with-gnu-ld], 5340 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 5341 [test "$withval" = no || with_gnu_ld=yes], 5342 [with_gnu_ld=no])dnl 5343 5344ac_prog=ld 5345if test "$GCC" = yes; then 5346 # Check if gcc -print-prog-name=ld gives a path. 5347 AC_MSG_CHECKING([for ld used by $CC]) 5348 case $host in 5349 *-*-mingw*) 5350 # gcc leaves a trailing carriage return which upsets mingw 5351 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 5352 *) 5353 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 5354 esac 5355 case $ac_prog in 5356 # Accept absolute paths. 5357 [[\\/]]* | ?:[[\\/]]*) 5358 re_direlt='/[[^/]][[^/]]*/\.\./' 5359 # Canonicalize the pathname of ld 5360 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 5361 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 5362 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 5363 done 5364 test -z "$LD" && LD="$ac_prog" 5365 ;; 5366 "") 5367 # If it fails, then pretend we aren't using GCC. 5368 ac_prog=ld 5369 ;; 5370 *) 5371 # If it is relative, then search for the first ld in PATH. 5372 with_gnu_ld=unknown 5373 ;; 5374 esac 5375elif test "$with_gnu_ld" = yes; then 5376 AC_MSG_CHECKING([for GNU ld]) 5377else 5378 AC_MSG_CHECKING([for non-GNU ld]) 5379fi 5380AC_CACHE_VAL(lt_cv_path_LD, 5381[if test -z "$LD"; then 5382 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5383 for ac_dir in $PATH; do 5384 IFS="$lt_save_ifs" 5385 test -z "$ac_dir" && ac_dir=. 5386 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 5387 lt_cv_path_LD="$ac_dir/$ac_prog" 5388 # Check to see if the program is GNU ld. I'd rather use --version, 5389 # but apparently some variants of GNU ld only accept -v. 5390 # Break only if it was the GNU/non-GNU ld that we prefer. 5391 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 5392 *GNU* | *'with BFD'*) 5393 test "$with_gnu_ld" != no && break 5394 ;; 5395 *) 5396 test "$with_gnu_ld" != yes && break 5397 ;; 5398 esac 5399 fi 5400 done 5401 IFS="$lt_save_ifs" 5402else 5403 lt_cv_path_LD="$LD" # Let the user override the test with a path. 5404fi]) 5405LD="$lt_cv_path_LD" 5406if test -n "$LD"; then 5407 AC_MSG_RESULT($LD) 5408else 5409 AC_MSG_RESULT(no) 5410fi 5411test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 5412_LT_PATH_LD_GNU 5413AC_SUBST([LD]) 5414 5415_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 5416])# LT_PATH_LD 5417 5418# Old names: 5419AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 5420AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 5421dnl aclocal-1.4 backwards compatibility: 5422dnl AC_DEFUN([AM_PROG_LD], []) 5423dnl AC_DEFUN([AC_PROG_LD], []) 5424 5425 5426# _LT_PATH_LD_GNU 5427#- -------------- 5428m4_defun([_LT_PATH_LD_GNU], 5429[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 5430[# I'd rather use --version here, but apparently some GNU lds only accept -v. 5431case `$LD -v 2>&1 </dev/null` in 5432*GNU* | *'with BFD'*) 5433 lt_cv_prog_gnu_ld=yes 5434 ;; 5435*) 5436 lt_cv_prog_gnu_ld=no 5437 ;; 5438esac]) 5439with_gnu_ld=$lt_cv_prog_gnu_ld 5440])# _LT_PATH_LD_GNU 5441 5442 5443# _LT_CMD_RELOAD 5444# -------------- 5445# find reload flag for linker 5446# -- PORTME Some linkers may need a different reload flag. 5447m4_defun([_LT_CMD_RELOAD], 5448[AC_CACHE_CHECK([for $LD option to reload object files], 5449 lt_cv_ld_reload_flag, 5450 [lt_cv_ld_reload_flag='-r']) 5451reload_flag=$lt_cv_ld_reload_flag 5452case $reload_flag in 5453"" | " "*) ;; 5454*) reload_flag=" $reload_flag" ;; 5455esac 5456reload_cmds='$LD$reload_flag -o $output$reload_objs' 5457case $host_os in 5458 darwin*) 5459 if test "$GCC" = yes; then 5460 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 5461 else 5462 reload_cmds='$LD$reload_flag -o $output$reload_objs' 5463 fi 5464 ;; 5465esac 5466_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 5467_LT_TAGDECL([], [reload_cmds], [2])dnl 5468])# _LT_CMD_RELOAD 5469 5470 5471# _LT_CHECK_MAGIC_METHOD 5472# ---------------------- 5473# how to check for library dependencies 5474# -- PORTME fill in with the dynamic library characteristics 5475m4_defun([_LT_CHECK_MAGIC_METHOD], 5476[m4_require([_LT_DECL_EGREP]) 5477m4_require([_LT_DECL_OBJDUMP]) 5478AC_CACHE_CHECK([how to recognize dependent libraries], 5479lt_cv_deplibs_check_method, 5480[lt_cv_file_magic_cmd='$MAGIC_CMD' 5481lt_cv_file_magic_test_file= 5482lt_cv_deplibs_check_method='unknown' 5483# Need to set the preceding variable on all platforms that support 5484# interlibrary dependencies. 5485# 'none' -- dependencies not supported. 5486# `unknown' -- same as none, but documents that we really don't know. 5487# 'pass_all' -- all dependencies passed with no checks. 5488# 'test_compile' -- check by making test program. 5489# 'file_magic [[regex]]' -- check by looking for files in library path 5490# which responds to the $file_magic_cmd with a given extended regex. 5491# If you have `file' or equivalent on your system and you're not sure 5492# whether `pass_all' will *always* work, you probably want this one. 5493 5494case $host_os in 5495aix[[4-9]]*) 5496 lt_cv_deplibs_check_method=pass_all 5497 ;; 5498 5499beos*) 5500 lt_cv_deplibs_check_method=pass_all 5501 ;; 5502 5503bsdi[[45]]*) 5504 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 5505 lt_cv_file_magic_cmd='/usr/bin/file -L' 5506 lt_cv_file_magic_test_file=/shlib/libc.so 5507 ;; 5508 5509cygwin*) 5510 # func_win32_libid is a shell function defined in ltmain.sh 5511 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5512 lt_cv_file_magic_cmd='func_win32_libid' 5513 ;; 5514 5515mingw* | pw32*) 5516 # Base MSYS/MinGW do not provide the 'file' command needed by 5517 # func_win32_libid shell function, so use a weaker test based on 'objdump', 5518 # unless we find 'file', for example because we are cross-compiling. 5519 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 5520 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 5521 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5522 lt_cv_file_magic_cmd='func_win32_libid' 5523 else 5524 # Keep this pattern in sync with the one in func_win32_libid. 5525 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 5526 lt_cv_file_magic_cmd='$OBJDUMP -f' 5527 fi 5528 ;; 5529 5530cegcc*) 5531 # use the weaker test based on 'objdump'. See mingw*. 5532 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 5533 lt_cv_file_magic_cmd='$OBJDUMP -f' 5534 ;; 5535 5536darwin* | rhapsody*) 5537 lt_cv_deplibs_check_method=pass_all 5538 ;; 5539 5540freebsd* | dragonfly*) 5541 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5542 case $host_cpu in 5543 i*86 ) 5544 # Not sure whether the presence of OpenBSD here was a mistake. 5545 # Let's accept both of them until this is cleared up. 5546 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 5547 lt_cv_file_magic_cmd=/usr/bin/file 5548 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 5549 ;; 5550 esac 5551 else 5552 lt_cv_deplibs_check_method=pass_all 5553 fi 5554 ;; 5555 5556gnu*) 5557 lt_cv_deplibs_check_method=pass_all 5558 ;; 5559 5560haiku*) 5561 lt_cv_deplibs_check_method=pass_all 5562 ;; 5563 5564hpux10.20* | hpux11*) 5565 lt_cv_file_magic_cmd=/usr/bin/file 5566 case $host_cpu in 5567 ia64*) 5568 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 5569 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 5570 ;; 5571 hppa*64*) 5572 [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]'] 5573 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 5574 ;; 5575 *) 5576 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 5577 lt_cv_file_magic_test_file=/usr/lib/libc.sl 5578 ;; 5579 esac 5580 ;; 5581 5582interix[[3-9]]*) 5583 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 5584 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 5585 ;; 5586 5587irix5* | irix6* | nonstopux*) 5588 case $LD in 5589 *-32|*"-32 ") libmagic=32-bit;; 5590 *-n32|*"-n32 ") libmagic=N32;; 5591 *-64|*"-64 ") libmagic=64-bit;; 5592 *) libmagic=never-match;; 5593 esac 5594 lt_cv_deplibs_check_method=pass_all 5595 ;; 5596 5597# This must be Linux ELF. 5598linux* | k*bsd*-gnu | kopensolaris*-gnu) 5599 lt_cv_deplibs_check_method=pass_all 5600 ;; 5601 5602netbsd*) 5603 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5604 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5605 else 5606 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 5607 fi 5608 ;; 5609 5610newos6*) 5611 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 5612 lt_cv_file_magic_cmd=/usr/bin/file 5613 lt_cv_file_magic_test_file=/usr/lib/libnls.so 5614 ;; 5615 5616*nto* | *qnx*) 5617 lt_cv_deplibs_check_method=pass_all 5618 ;; 5619 5620openbsd*) 5621 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5622 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 5623 else 5624 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5625 fi 5626 ;; 5627 5628osf3* | osf4* | osf5*) 5629 lt_cv_deplibs_check_method=pass_all 5630 ;; 5631 5632rdos*) 5633 lt_cv_deplibs_check_method=pass_all 5634 ;; 5635 5636solaris*) 5637 lt_cv_deplibs_check_method=pass_all 5638 ;; 5639 5640sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5641 lt_cv_deplibs_check_method=pass_all 5642 ;; 5643 5644sysv4 | sysv4.3*) 5645 case $host_vendor in 5646 motorola) 5647 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]]' 5648 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 5649 ;; 5650 ncr) 5651 lt_cv_deplibs_check_method=pass_all 5652 ;; 5653 sequent) 5654 lt_cv_file_magic_cmd='/bin/file' 5655 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 5656 ;; 5657 sni) 5658 lt_cv_file_magic_cmd='/bin/file' 5659 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 5660 lt_cv_file_magic_test_file=/lib/libc.so 5661 ;; 5662 siemens) 5663 lt_cv_deplibs_check_method=pass_all 5664 ;; 5665 pc) 5666 lt_cv_deplibs_check_method=pass_all 5667 ;; 5668 esac 5669 ;; 5670 5671tpf*) 5672 lt_cv_deplibs_check_method=pass_all 5673 ;; 5674esac 5675]) 5676file_magic_cmd=$lt_cv_file_magic_cmd 5677deplibs_check_method=$lt_cv_deplibs_check_method 5678test -z "$deplibs_check_method" && deplibs_check_method=unknown 5679 5680_LT_DECL([], [deplibs_check_method], [1], 5681 [Method to check whether dependent libraries are shared objects]) 5682_LT_DECL([], [file_magic_cmd], [1], 5683 [Command to use when deplibs_check_method == "file_magic"]) 5684])# _LT_CHECK_MAGIC_METHOD 5685 5686 5687# LT_PATH_NM 5688# ---------- 5689# find the pathname to a BSD- or MS-compatible name lister 5690AC_DEFUN([LT_PATH_NM], 5691[AC_REQUIRE([AC_PROG_CC])dnl 5692AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 5693[if test -n "$NM"; then 5694 # Let the user override the test. 5695 lt_cv_path_NM="$NM" 5696else 5697 lt_nm_to_check="${ac_tool_prefix}nm" 5698 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 5699 lt_nm_to_check="$lt_nm_to_check nm" 5700 fi 5701 for lt_tmp_nm in $lt_nm_to_check; do 5702 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5703 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 5704 IFS="$lt_save_ifs" 5705 test -z "$ac_dir" && ac_dir=. 5706 tmp_nm="$ac_dir/$lt_tmp_nm" 5707 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 5708 # Check to see if the nm accepts a BSD-compat flag. 5709 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 5710 # nm: unknown option "B" ignored 5711 # Tru64's nm complains that /dev/null is an invalid object file 5712 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 5713 */dev/null* | *'Invalid file or object type'*) 5714 lt_cv_path_NM="$tmp_nm -B" 5715 break 5716 ;; 5717 *) 5718 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 5719 */dev/null*) 5720 lt_cv_path_NM="$tmp_nm -p" 5721 break 5722 ;; 5723 *) 5724 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 5725 continue # so that we can try to find one that supports BSD flags 5726 ;; 5727 esac 5728 ;; 5729 esac 5730 fi 5731 done 5732 IFS="$lt_save_ifs" 5733 done 5734 : ${lt_cv_path_NM=no} 5735fi]) 5736if test "$lt_cv_path_NM" != "no"; then 5737 NM="$lt_cv_path_NM" 5738else 5739 # Didn't find any BSD compatible name lister, look for dumpbin. 5740 if test -n "$DUMPBIN"; then : 5741 # Let the user override the test. 5742 else 5743 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 5744 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 5745 *COFF*) 5746 DUMPBIN="$DUMPBIN -symbols" 5747 ;; 5748 *) 5749 DUMPBIN=: 5750 ;; 5751 esac 5752 fi 5753 AC_SUBST([DUMPBIN]) 5754 if test "$DUMPBIN" != ":"; then 5755 NM="$DUMPBIN" 5756 fi 5757fi 5758test -z "$NM" && NM=nm 5759AC_SUBST([NM]) 5760_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 5761 5762AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 5763 [lt_cv_nm_interface="BSD nm" 5764 echo "int some_variable = 0;" > conftest.$ac_ext 5765 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 5766 (eval "$ac_compile" 2>conftest.err) 5767 cat conftest.err >&AS_MESSAGE_LOG_FD 5768 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 5769 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 5770 cat conftest.err >&AS_MESSAGE_LOG_FD 5771 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 5772 cat conftest.out >&AS_MESSAGE_LOG_FD 5773 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 5774 lt_cv_nm_interface="MS dumpbin" 5775 fi 5776 rm -f conftest*]) 5777])# LT_PATH_NM 5778 5779# Old names: 5780AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 5781AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 5782dnl aclocal-1.4 backwards compatibility: 5783dnl AC_DEFUN([AM_PROG_NM], []) 5784dnl AC_DEFUN([AC_PROG_NM], []) 5785 5786 5787# LT_LIB_M 5788# -------- 5789# check for math library 5790AC_DEFUN([LT_LIB_M], 5791[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5792LIBM= 5793case $host in 5794*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 5795 # These system don't have libm, or don't need it 5796 ;; 5797*-ncr-sysv4.3*) 5798 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 5799 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 5800 ;; 5801*) 5802 AC_CHECK_LIB(m, cos, LIBM="-lm") 5803 ;; 5804esac 5805AC_SUBST([LIBM]) 5806])# LT_LIB_M 5807 5808# Old name: 5809AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 5810dnl aclocal-1.4 backwards compatibility: 5811dnl AC_DEFUN([AC_CHECK_LIBM], []) 5812 5813 5814# _LT_COMPILER_NO_RTTI([TAGNAME]) 5815# ------------------------------- 5816m4_defun([_LT_COMPILER_NO_RTTI], 5817[m4_require([_LT_TAG_COMPILER])dnl 5818 5819_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5820 5821if test "$GCC" = yes; then 5822 case $cc_basename in 5823 nvcc*) 5824 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 5825 *) 5826 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 5827 esac 5828 5829 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 5830 lt_cv_prog_compiler_rtti_exceptions, 5831 [-fno-rtti -fno-exceptions], [], 5832 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 5833fi 5834_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 5835 [Compiler flag to turn off builtin functions]) 5836])# _LT_COMPILER_NO_RTTI 5837 5838 5839# _LT_CMD_GLOBAL_SYMBOLS 5840# ---------------------- 5841m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 5842[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5843AC_REQUIRE([AC_PROG_CC])dnl 5844AC_REQUIRE([AC_PROG_AWK])dnl 5845AC_REQUIRE([LT_PATH_NM])dnl 5846AC_REQUIRE([LT_PATH_LD])dnl 5847m4_require([_LT_DECL_SED])dnl 5848m4_require([_LT_DECL_EGREP])dnl 5849m4_require([_LT_TAG_COMPILER])dnl 5850 5851# Check for command to grab the raw symbol name followed by C symbol from nm. 5852AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 5853AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 5854[ 5855# These are sane defaults that work on at least a few old systems. 5856# [They come from Ultrix. What could be older than Ultrix?!! ;)] 5857 5858# Character class describing NM global symbol codes. 5859symcode='[[BCDEGRST]]' 5860 5861# Regexp to match symbols that can be accessed directly from C. 5862sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 5863 5864# Define system-specific variables. 5865case $host_os in 5866aix*) 5867 symcode='[[BCDT]]' 5868 ;; 5869cygwin* | mingw* | pw32* | cegcc*) 5870 symcode='[[ABCDGISTW]]' 5871 ;; 5872hpux*) 5873 if test "$host_cpu" = ia64; then 5874 symcode='[[ABCDEGRST]]' 5875 fi 5876 ;; 5877irix* | nonstopux*) 5878 symcode='[[BCDEGRST]]' 5879 ;; 5880osf*) 5881 symcode='[[BCDEGQRST]]' 5882 ;; 5883solaris*) 5884 symcode='[[BDRT]]' 5885 ;; 5886sco3.2v5*) 5887 symcode='[[DT]]' 5888 ;; 5889sysv4.2uw2*) 5890 symcode='[[DT]]' 5891 ;; 5892sysv5* | sco5v6* | unixware* | OpenUNIX*) 5893 symcode='[[ABDT]]' 5894 ;; 5895sysv4) 5896 symcode='[[DFNSTU]]' 5897 ;; 5898esac 5899 5900# If we're using GNU nm, then use its standard symbol codes. 5901case `$NM -V 2>&1` in 5902*GNU* | *'with BFD'*) 5903 symcode='[[ABCDGIRSTW]]' ;; 5904esac 5905 5906# Transform an extracted symbol line into a proper C declaration. 5907# Some systems (esp. on ia64) link data and code symbols differently, 5908# so use this general approach. 5909lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 5910 5911# Transform an extracted symbol line into symbol name and symbol address 5912lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 5913lt_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'" 5914 5915# Handle CRLF in mingw tool chain 5916opt_cr= 5917case $build_os in 5918mingw*) 5919 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 5920 ;; 5921esac 5922 5923# Try without a prefix underscore, then with it. 5924for ac_symprfx in "" "_"; do 5925 5926 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 5927 symxfrm="\\1 $ac_symprfx\\2 \\2" 5928 5929 # Write the raw and C identifiers. 5930 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 5931 # Fake it for dumpbin and say T for any non-static function 5932 # and D for any global variable. 5933 # Also find C++ and __fastcall symbols from MSVC++, 5934 # which start with @ or ?. 5935 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 5936" {last_section=section; section=\$ 3};"\ 5937" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 5938" \$ 0!~/External *\|/{next};"\ 5939" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 5940" {if(hide[section]) next};"\ 5941" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 5942" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 5943" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 5944" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 5945" ' prfx=^$ac_symprfx]" 5946 else 5947 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 5948 fi 5949 5950 # Check to see that the pipe works correctly. 5951 pipe_works=no 5952 5953 rm -f conftest* 5954 cat > conftest.$ac_ext <<_LT_EOF 5955#ifdef __cplusplus 5956extern "C" { 5957#endif 5958char nm_test_var; 5959void nm_test_func(void); 5960void nm_test_func(void){} 5961#ifdef __cplusplus 5962} 5963#endif 5964int main(){nm_test_var='a';nm_test_func();return(0);} 5965_LT_EOF 5966 5967 if AC_TRY_EVAL(ac_compile); then 5968 # Now try to grab the symbols. 5969 nlist=conftest.nm 5970 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 5971 # Try sorting and uniquifying the output. 5972 if sort "$nlist" | uniq > "$nlist"T; then 5973 mv -f "$nlist"T "$nlist" 5974 else 5975 rm -f "$nlist"T 5976 fi 5977 5978 # Make sure that we snagged all the symbols we need. 5979 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 5980 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 5981 cat <<_LT_EOF > conftest.$ac_ext 5982#ifdef __cplusplus 5983extern "C" { 5984#endif 5985 5986_LT_EOF 5987 # Now generate the symbol file. 5988 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 5989 5990 cat <<_LT_EOF >> conftest.$ac_ext 5991 5992/* The mapping between symbol names and symbols. */ 5993const struct { 5994 const char *name; 5995 void *address; 5996} 5997lt__PROGRAM__LTX_preloaded_symbols[[]] = 5998{ 5999 { "@PROGRAM@", (void *) 0 }, 6000_LT_EOF 6001 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 6002 cat <<\_LT_EOF >> conftest.$ac_ext 6003 {0, (void *) 0} 6004}; 6005 6006/* This works around a problem in FreeBSD linker */ 6007#ifdef FREEBSD_WORKAROUND 6008static const void *lt_preloaded_setup() { 6009 return lt__PROGRAM__LTX_preloaded_symbols; 6010} 6011#endif 6012 6013#ifdef __cplusplus 6014} 6015#endif 6016_LT_EOF 6017 # Now try linking the two files. 6018 mv conftest.$ac_objext conftstm.$ac_objext 6019 lt_save_LIBS="$LIBS" 6020 lt_save_CFLAGS="$CFLAGS" 6021 LIBS="conftstm.$ac_objext" 6022 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 6023 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 6024 pipe_works=yes 6025 fi 6026 LIBS="$lt_save_LIBS" 6027 CFLAGS="$lt_save_CFLAGS" 6028 else 6029 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 6030 fi 6031 else 6032 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 6033 fi 6034 else 6035 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 6036 fi 6037 else 6038 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 6039 cat conftest.$ac_ext >&5 6040 fi 6041 rm -rf conftest* conftst* 6042 6043 # Do not use the global_symbol_pipe unless it works. 6044 if test "$pipe_works" = yes; then 6045 break 6046 else 6047 lt_cv_sys_global_symbol_pipe= 6048 fi 6049done 6050]) 6051if test -z "$lt_cv_sys_global_symbol_pipe"; then 6052 lt_cv_sys_global_symbol_to_cdecl= 6053fi 6054if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 6055 AC_MSG_RESULT(failed) 6056else 6057 AC_MSG_RESULT(ok) 6058fi 6059 6060_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 6061 [Take the output of nm and produce a listing of raw symbols and C names]) 6062_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 6063 [Transform the output of nm in a proper C declaration]) 6064_LT_DECL([global_symbol_to_c_name_address], 6065 [lt_cv_sys_global_symbol_to_c_name_address], [1], 6066 [Transform the output of nm in a C name address pair]) 6067_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 6068 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 6069 [Transform the output of nm in a C name address pair when lib prefix is needed]) 6070]) # _LT_CMD_GLOBAL_SYMBOLS 6071 6072 6073# _LT_COMPILER_PIC([TAGNAME]) 6074# --------------------------- 6075m4_defun([_LT_COMPILER_PIC], 6076[m4_require([_LT_TAG_COMPILER])dnl 6077_LT_TAGVAR(lt_prog_compiler_wl, $1)= 6078_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6079_LT_TAGVAR(lt_prog_compiler_static, $1)= 6080 6081AC_MSG_CHECKING([for $compiler option to produce PIC]) 6082m4_if([$1], [CXX], [ 6083 # C++ specific cases for pic, static, wl, etc. 6084 if test "$GXX" = yes; then 6085 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6086 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6087 6088 case $host_os in 6089 aix*) 6090 # All AIX code is PIC. 6091 if test "$host_cpu" = ia64; then 6092 # AIX 5 now supports IA64 processor 6093 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6094 fi 6095 ;; 6096 6097 amigaos*) 6098 case $host_cpu in 6099 powerpc) 6100 # see comment about AmigaOS4 .so support 6101 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6102 ;; 6103 m68k) 6104 # FIXME: we need at least 68020 code to build shared libraries, but 6105 # adding the `-m68020' flag to GCC prevents building anything better, 6106 # like `-m68040'. 6107 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6108 ;; 6109 esac 6110 ;; 6111 6112 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6113 # PIC is the default for these OSes. 6114 ;; 6115 mingw* | cygwin* | os2* | pw32* | cegcc*) 6116 # This hack is so that the source file can tell whether it is being 6117 # built for inclusion in a dll (and should export symbols for example). 6118 # Although the cygwin gcc ignores -fPIC, still need this for old-style 6119 # (--disable-auto-import) libraries 6120 m4_if([$1], [GCJ], [], 6121 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6122 ;; 6123 darwin* | rhapsody*) 6124 # PIC is the default on this platform 6125 # Common symbols not allowed in MH_DYLIB files 6126 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6127 ;; 6128 *djgpp*) 6129 # DJGPP does not support shared libraries at all 6130 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6131 ;; 6132 haiku*) 6133 # PIC is the default for Haiku. 6134 # The "-static" flag exists, but is broken. 6135 _LT_TAGVAR(lt_prog_compiler_static, $1)= 6136 ;; 6137 interix[[3-9]]*) 6138 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6139 # Instead, we relocate shared libraries at runtime. 6140 ;; 6141 sysv4*MP*) 6142 if test -d /usr/nec; then 6143 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6144 fi 6145 ;; 6146 hpux*) 6147 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6148 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6149 # sets the default TLS model and affects inlining. 6150 case $host_cpu in 6151 hppa*64*) 6152 ;; 6153 *) 6154 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6155 ;; 6156 esac 6157 ;; 6158 *qnx* | *nto*) 6159 # QNX uses GNU C++, but need to define -shared option too, otherwise 6160 # it will coredump. 6161 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6162 ;; 6163 *) 6164 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6165 ;; 6166 esac 6167 else 6168 case $host_os in 6169 aix[[4-9]]*) 6170 # All AIX code is PIC. 6171 if test "$host_cpu" = ia64; then 6172 # AIX 5 now supports IA64 processor 6173 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6174 else 6175 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6176 fi 6177 ;; 6178 chorus*) 6179 case $cc_basename in 6180 cxch68*) 6181 # Green Hills C++ Compiler 6182 # _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" 6183 ;; 6184 esac 6185 ;; 6186 dgux*) 6187 case $cc_basename in 6188 ec++*) 6189 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6190 ;; 6191 ghcx*) 6192 # Green Hills C++ Compiler 6193 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6194 ;; 6195 *) 6196 ;; 6197 esac 6198 ;; 6199 freebsd* | dragonfly*) 6200 # FreeBSD uses GNU C++ 6201 ;; 6202 hpux9* | hpux10* | hpux11*) 6203 case $cc_basename in 6204 CC*) 6205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6206 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6207 if test "$host_cpu" != ia64; then 6208 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6209 fi 6210 ;; 6211 aCC*) 6212 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6213 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6214 case $host_cpu in 6215 hppa*64*|ia64*) 6216 # +Z the default 6217 ;; 6218 *) 6219 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6220 ;; 6221 esac 6222 ;; 6223 *) 6224 ;; 6225 esac 6226 ;; 6227 interix*) 6228 # This is c89, which is MS Visual C++ (no shared libs) 6229 # Anyone wants to do a port? 6230 ;; 6231 irix5* | irix6* | nonstopux*) 6232 case $cc_basename in 6233 CC*) 6234 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6235 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6236 # CC pic flag -KPIC is the default. 6237 ;; 6238 *) 6239 ;; 6240 esac 6241 ;; 6242 linux* | k*bsd*-gnu | kopensolaris*-gnu) 6243 case $cc_basename in 6244 KCC*) 6245 # KAI C++ Compiler 6246 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6247 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6248 ;; 6249 ecpc* ) 6250 # old Intel C++ for x86_64 which still supported -KPIC. 6251 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6253 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6254 ;; 6255 icpc* ) 6256 # Intel C++, used to be incompatible with GCC. 6257 # ICC 10 doesn't accept -KPIC any more. 6258 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6259 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6260 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6261 ;; 6262 pgCC* | pgcpp*) 6263 # Portland Group C++ compiler 6264 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6265 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6266 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6267 ;; 6268 cxx*) 6269 # Compaq C++ 6270 # Make sure the PIC flag is empty. It appears that all Alpha 6271 # Linux and Compaq Tru64 Unix objects are PIC. 6272 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6273 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6274 ;; 6275 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 6276 # IBM XL 8.0, 9.0 on PPC and BlueGene 6277 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6278 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6279 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6280 ;; 6281 *) 6282 case `$CC -V 2>&1 | sed 5q` in 6283 *Sun\ C*) 6284 # Sun C++ 5.9 6285 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6286 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6287 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6288 ;; 6289 esac 6290 ;; 6291 esac 6292 ;; 6293 lynxos*) 6294 ;; 6295 m88k*) 6296 ;; 6297 mvs*) 6298 case $cc_basename in 6299 cxx*) 6300 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6301 ;; 6302 *) 6303 ;; 6304 esac 6305 ;; 6306 netbsd*) 6307 ;; 6308 *qnx* | *nto*) 6309 # QNX uses GNU C++, but need to define -shared option too, otherwise 6310 # it will coredump. 6311 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6312 ;; 6313 osf3* | osf4* | osf5*) 6314 case $cc_basename in 6315 KCC*) 6316 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6317 ;; 6318 RCC*) 6319 # Rational C++ 2.4.1 6320 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6321 ;; 6322 cxx*) 6323 # Digital/Compaq C++ 6324 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6325 # Make sure the PIC flag is empty. It appears that all Alpha 6326 # Linux and Compaq Tru64 Unix objects are PIC. 6327 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6328 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6329 ;; 6330 *) 6331 ;; 6332 esac 6333 ;; 6334 psos*) 6335 ;; 6336 solaris*) 6337 case $cc_basename in 6338 CC* | sunCC*) 6339 # Sun C++ 4.2, 5.x and Centerline C++ 6340 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6341 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6342 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6343 ;; 6344 gcx*) 6345 # Green Hills C++ Compiler 6346 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6347 ;; 6348 *) 6349 ;; 6350 esac 6351 ;; 6352 sunos4*) 6353 case $cc_basename in 6354 CC*) 6355 # Sun C++ 4.x 6356 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6357 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6358 ;; 6359 lcc*) 6360 # Lucid 6361 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6362 ;; 6363 *) 6364 ;; 6365 esac 6366 ;; 6367 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6368 case $cc_basename in 6369 CC*) 6370 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6371 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6372 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6373 ;; 6374 esac 6375 ;; 6376 tandem*) 6377 case $cc_basename in 6378 NCC*) 6379 # NonStop-UX NCC 3.20 6380 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6381 ;; 6382 *) 6383 ;; 6384 esac 6385 ;; 6386 vxworks*) 6387 ;; 6388 *) 6389 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6390 ;; 6391 esac 6392 fi 6393], 6394[ 6395 if test "$GCC" = yes; then 6396 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6397 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6398 6399 case $host_os in 6400 aix*) 6401 # All AIX code is PIC. 6402 if test "$host_cpu" = ia64; then 6403 # AIX 5 now supports IA64 processor 6404 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6405 fi 6406 ;; 6407 6408 amigaos*) 6409 case $host_cpu in 6410 powerpc) 6411 # see comment about AmigaOS4 .so support 6412 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6413 ;; 6414 m68k) 6415 # FIXME: we need at least 68020 code to build shared libraries, but 6416 # adding the `-m68020' flag to GCC prevents building anything better, 6417 # like `-m68040'. 6418 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6419 ;; 6420 esac 6421 ;; 6422 6423 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6424 # PIC is the default for these OSes. 6425 ;; 6426 6427 mingw* | cygwin* | pw32* | os2* | cegcc*) 6428 # This hack is so that the source file can tell whether it is being 6429 # built for inclusion in a dll (and should export symbols for example). 6430 # Although the cygwin gcc ignores -fPIC, still need this for old-style 6431 # (--disable-auto-import) libraries 6432 m4_if([$1], [GCJ], [], 6433 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6434 ;; 6435 6436 darwin* | rhapsody*) 6437 # PIC is the default on this platform 6438 # Common symbols not allowed in MH_DYLIB files 6439 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6440 ;; 6441 6442 haiku*) 6443 # PIC is the default for Haiku. 6444 # The "-static" flag exists, but is broken. 6445 _LT_TAGVAR(lt_prog_compiler_static, $1)= 6446 ;; 6447 6448 hpux*) 6449 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6450 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6451 # sets the default TLS model and affects inlining. 6452 case $host_cpu in 6453 hppa*64*) 6454 # +Z the default 6455 ;; 6456 *) 6457 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6458 ;; 6459 esac 6460 ;; 6461 6462 interix[[3-9]]*) 6463 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6464 # Instead, we relocate shared libraries at runtime. 6465 ;; 6466 6467 msdosdjgpp*) 6468 # Just because we use GCC doesn't mean we suddenly get shared libraries 6469 # on systems that don't support them. 6470 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6471 enable_shared=no 6472 ;; 6473 6474 *nto* | *qnx*) 6475 # QNX uses GNU C++, but need to define -shared option too, otherwise 6476 # it will coredump. 6477 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6478 ;; 6479 6480 sysv4*MP*) 6481 if test -d /usr/nec; then 6482 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6483 fi 6484 ;; 6485 6486 *) 6487 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6488 ;; 6489 esac 6490 6491 case $cc_basename in 6492 nvcc*) # Cuda Compiler Driver 2.2 6493 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 6494 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 6495 ;; 6496 esac 6497 else 6498 # PORTME Check for flag to pass linker flags through the system compiler. 6499 case $host_os in 6500 aix*) 6501 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6502 if test "$host_cpu" = ia64; then 6503 # AIX 5 now supports IA64 processor 6504 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6505 else 6506 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6507 fi 6508 ;; 6509 6510 mingw* | cygwin* | pw32* | os2* | cegcc*) 6511 # This hack is so that the source file can tell whether it is being 6512 # built for inclusion in a dll (and should export symbols for example). 6513 m4_if([$1], [GCJ], [], 6514 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6515 ;; 6516 6517 hpux9* | hpux10* | hpux11*) 6518 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6519 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6520 # not for PA HP-UX. 6521 case $host_cpu in 6522 hppa*64*|ia64*) 6523 # +Z the default 6524 ;; 6525 *) 6526 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6527 ;; 6528 esac 6529 # Is there a better lt_prog_compiler_static that works with the bundled CC? 6530 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6531 ;; 6532 6533 irix5* | irix6* | nonstopux*) 6534 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6535 # PIC (with -KPIC) is the default. 6536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6537 ;; 6538 6539 linux* | k*bsd*-gnu | kopensolaris*-gnu) 6540 case $cc_basename in 6541 # old Intel for x86_64 which still supported -KPIC. 6542 ecc*) 6543 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6544 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6545 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6546 ;; 6547 # icc used to be incompatible with GCC. 6548 # ICC 10 doesn't accept -KPIC any more. 6549 icc* | ifort*) 6550 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6552 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6553 ;; 6554 # Lahey Fortran 8.1. 6555 lf95*) 6556 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6557 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 6558 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 6559 ;; 6560 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 6561 # Portland Group compilers (*not* the Pentium gcc compiler, 6562 # which looks to be a dead project) 6563 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6564 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6565 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6566 ;; 6567 ccc*) 6568 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6569 # All Alpha code is PIC. 6570 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6571 ;; 6572 xl* | bgxl* | bgf* | mpixl*) 6573 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 6574 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6575 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6576 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6577 ;; 6578 *) 6579 case `$CC -V 2>&1 | sed 5q` in 6580 *Sun\ F* | *Sun*Fortran*) 6581 # Sun Fortran 8.3 passes all unrecognized flags to the linker 6582 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6583 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6584 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 6585 ;; 6586 *Sun\ C*) 6587 # Sun C 5.9 6588 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6589 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6590 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6591 ;; 6592 esac 6593 ;; 6594 esac 6595 ;; 6596 6597 newsos6) 6598 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6599 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6600 ;; 6601 6602 *nto* | *qnx*) 6603 # QNX uses GNU C++, but need to define -shared option too, otherwise 6604 # it will coredump. 6605 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6606 ;; 6607 6608 osf3* | osf4* | osf5*) 6609 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6610 # All OSF/1 code is PIC. 6611 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6612 ;; 6613 6614 rdos*) 6615 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6616 ;; 6617 6618 solaris*) 6619 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6620 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6621 case $cc_basename in 6622 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 6623 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6624 *) 6625 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 6626 esac 6627 ;; 6628 6629 sunos4*) 6630 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6631 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6632 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6633 ;; 6634 6635 sysv4 | sysv4.2uw2* | sysv4.3*) 6636 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6637 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6638 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6639 ;; 6640 6641 sysv4*MP*) 6642 if test -d /usr/nec ;then 6643 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 6644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6645 fi 6646 ;; 6647 6648 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6649 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6650 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6651 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6652 ;; 6653 6654 unicos*) 6655 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6656 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6657 ;; 6658 6659 uts4*) 6660 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6661 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6662 ;; 6663 6664 *) 6665 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6666 ;; 6667 esac 6668 fi 6669]) 6670case $host_os in 6671 # For platforms which do not support PIC, -DPIC is meaningless: 6672 *djgpp*) 6673 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6674 ;; 6675 *) 6676 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 6677 ;; 6678esac 6679AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 6680_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 6681 [How to pass a linker flag through the compiler]) 6682 6683# 6684# Check to make sure the PIC flag actually works. 6685# 6686if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 6687 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 6688 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 6689 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 6690 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 6691 "" | " "*) ;; 6692 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 6693 esac], 6694 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6695 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 6696fi 6697_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 6698 [Additional compiler flags for building library objects]) 6699 6700# 6701# Check to make sure the static flag actually works. 6702# 6703wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 6704_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 6705 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 6706 $lt_tmp_static_flag, 6707 [], 6708 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 6709_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 6710 [Compiler flag to prevent dynamic linking]) 6711])# _LT_COMPILER_PIC 6712 6713 6714# _LT_LINKER_SHLIBS([TAGNAME]) 6715# ---------------------------- 6716# See if the linker supports building shared libraries. 6717m4_defun([_LT_LINKER_SHLIBS], 6718[AC_REQUIRE([LT_PATH_LD])dnl 6719AC_REQUIRE([LT_PATH_NM])dnl 6720m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6721m4_require([_LT_DECL_EGREP])dnl 6722m4_require([_LT_DECL_SED])dnl 6723m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 6724m4_require([_LT_TAG_COMPILER])dnl 6725AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6726m4_if([$1], [CXX], [ 6727 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6728 case $host_os in 6729 aix[[4-9]]*) 6730 # If we're using GNU nm, then we don't want the "-C" option. 6731 # -C means demangle to AIX nm, but means don't demangle with GNU nm 6732 # Also, AIX nm treats weak defined symbols like other global defined 6733 # symbols, whereas GNU nm marks them as "W". 6734 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6735 _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' 6736 else 6737 _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' 6738 fi 6739 ;; 6740 pw32*) 6741 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 6742 ;; 6743 cygwin* | mingw* | cegcc*) 6744 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 6745 ;; 6746 *) 6747 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6748 ;; 6749 esac 6750 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6751], [ 6752 runpath_var= 6753 _LT_TAGVAR(allow_undefined_flag, $1)= 6754 _LT_TAGVAR(always_export_symbols, $1)=no 6755 _LT_TAGVAR(archive_cmds, $1)= 6756 _LT_TAGVAR(archive_expsym_cmds, $1)= 6757 _LT_TAGVAR(compiler_needs_object, $1)=no 6758 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6759 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6760 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6761 _LT_TAGVAR(hardcode_automatic, $1)=no 6762 _LT_TAGVAR(hardcode_direct, $1)=no 6763 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6764 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6765 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6766 _LT_TAGVAR(hardcode_libdir_separator, $1)= 6767 _LT_TAGVAR(hardcode_minus_L, $1)=no 6768 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6769 _LT_TAGVAR(inherit_rpath, $1)=no 6770 _LT_TAGVAR(link_all_deplibs, $1)=unknown 6771 _LT_TAGVAR(module_cmds, $1)= 6772 _LT_TAGVAR(module_expsym_cmds, $1)= 6773 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 6774 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 6775 _LT_TAGVAR(thread_safe_flag_spec, $1)= 6776 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6777 # include_expsyms should be a list of space-separated symbols to be *always* 6778 # included in the symbol list 6779 _LT_TAGVAR(include_expsyms, $1)= 6780 # exclude_expsyms can be an extended regexp of symbols to exclude 6781 # it will be wrapped by ` (' and `)$', so one must not match beginning or 6782 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 6783 # as well as any symbol that contains `d'. 6784 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6785 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 6786 # platforms (ab)use it in PIC code, but their linkers get confused if 6787 # the symbol is explicitly referenced. Since portable code cannot 6788 # rely on this symbol name, it's probably fine to never include it in 6789 # preloaded symbol tables. 6790 # Exclude shared library initialization/finalization symbols. 6791dnl Note also adjust exclude_expsyms for C++ above. 6792 extract_expsyms_cmds= 6793 6794 case $host_os in 6795 cygwin* | mingw* | pw32* | cegcc*) 6796 # FIXME: the MSVC++ port hasn't been tested in a loooong time 6797 # When not using gcc, we currently assume that we are using 6798 # Microsoft Visual C++. 6799 if test "$GCC" != yes; then 6800 with_gnu_ld=no 6801 fi 6802 ;; 6803 interix*) 6804 # we just hope/assume this is gcc and not c89 (= MSVC++) 6805 with_gnu_ld=yes 6806 ;; 6807 openbsd*) 6808 with_gnu_ld=no 6809 ;; 6810 esac 6811 6812 _LT_TAGVAR(ld_shlibs, $1)=yes 6813 6814 # On some targets, GNU ld is compatible enough with the native linker 6815 # that we're better off using the native interface for both. 6816 lt_use_gnu_ld_interface=no 6817 if test "$with_gnu_ld" = yes; then 6818 case $host_os in 6819 aix*) 6820 # The AIX port of GNU ld has always aspired to compatibility 6821 # with the native linker. However, as the warning in the GNU ld 6822 # block says, versions before 2.19.5* couldn't really create working 6823 # shared libraries, regardless of the interface used. 6824 case `$LD -v 2>&1` in 6825 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 6826 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 6827 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 6828 *) 6829 lt_use_gnu_ld_interface=yes 6830 ;; 6831 esac 6832 ;; 6833 *) 6834 lt_use_gnu_ld_interface=yes 6835 ;; 6836 esac 6837 fi 6838 6839 if test "$lt_use_gnu_ld_interface" = yes; then 6840 # If archive_cmds runs LD, not CC, wlarc should be empty 6841 wlarc='${wl}' 6842 6843 # Set some defaults for GNU ld with shared library support. These 6844 # are reset later if shared libraries are not supported. Putting them 6845 # here allows them to be overridden if necessary. 6846 runpath_var=LD_RUN_PATH 6847 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6848 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6849 # ancient GNU ld didn't support --whole-archive et. al. 6850 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 6851 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6852 else 6853 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6854 fi 6855 supports_anon_versioning=no 6856 case `$LD -v 2>&1` in 6857 *GNU\ gold*) supports_anon_versioning=yes ;; 6858 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 6859 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 6860 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 6861 *\ 2.11.*) ;; # other 2.11 versions 6862 *) supports_anon_versioning=yes ;; 6863 esac 6864 6865 # See if GNU ld supports shared libraries. 6866 case $host_os in 6867 aix[[3-9]]*) 6868 # On AIX/PPC, the GNU linker is very broken 6869 if test "$host_cpu" != ia64; then 6870 _LT_TAGVAR(ld_shlibs, $1)=no 6871 cat <<_LT_EOF 1>&2 6872 6873*** Warning: the GNU linker, at least up to release 2.19, is reported 6874*** to be unable to reliably create shared libraries on AIX. 6875*** Therefore, libtool is disabling shared libraries support. If you 6876*** really care for shared libraries, you may want to install binutils 6877*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 6878*** You will then need to restart the configuration process. 6879 6880_LT_EOF 6881 fi 6882 ;; 6883 6884 amigaos*) 6885 case $host_cpu in 6886 powerpc) 6887 # see comment about AmigaOS4 .so support 6888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6889 _LT_TAGVAR(archive_expsym_cmds, $1)='' 6890 ;; 6891 m68k) 6892 _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)' 6893 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6894 _LT_TAGVAR(hardcode_minus_L, $1)=yes 6895 ;; 6896 esac 6897 ;; 6898 6899 beos*) 6900 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6901 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6902 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6903 # support --undefined. This deserves some investigation. FIXME 6904 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6905 else 6906 _LT_TAGVAR(ld_shlibs, $1)=no 6907 fi 6908 ;; 6909 6910 cygwin* | mingw* | pw32* | cegcc*) 6911 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6912 # as there is no search path for DLLs. 6913 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6914 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6915 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6916 _LT_TAGVAR(always_export_symbols, $1)=no 6917 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6918 _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' 6919 6920 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6921 _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' 6922 # If the export-symbols file already is a .def file (1st line 6923 # is EXPORTS), use it as is; otherwise, prepend... 6924 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6925 cp $export_symbols $output_objdir/$soname.def; 6926 else 6927 echo EXPORTS > $output_objdir/$soname.def; 6928 cat $export_symbols >> $output_objdir/$soname.def; 6929 fi~ 6930 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6931 else 6932 _LT_TAGVAR(ld_shlibs, $1)=no 6933 fi 6934 ;; 6935 6936 haiku*) 6937 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6938 _LT_TAGVAR(link_all_deplibs, $1)=yes 6939 ;; 6940 6941 interix[[3-9]]*) 6942 _LT_TAGVAR(hardcode_direct, $1)=no 6943 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6944 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6945 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6946 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6947 # Instead, shared libraries are loaded at an image base (0x10000000 by 6948 # default) and relocated if they conflict, which is a slow very memory 6949 # consuming and fragmenting process. To avoid this, we pick a random, 6950 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6951 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6952 _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' 6953 _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' 6954 ;; 6955 6956 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 6957 tmp_diet=no 6958 if test "$host_os" = linux-dietlibc; then 6959 case $cc_basename in 6960 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 6961 esac 6962 fi 6963 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 6964 && test "$tmp_diet" = no 6965 then 6966 tmp_addflag= 6967 tmp_sharedflag='-shared' 6968 case $cc_basename,$host_cpu in 6969 pgcc*) # Portland Group C compiler 6970 _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' 6971 tmp_addflag=' $pic_flag' 6972 ;; 6973 pgf77* | pgf90* | pgf95* | pgfortran*) 6974 # Portland Group f77 and f90 compilers 6975 _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' 6976 tmp_addflag=' $pic_flag -Mnomain' ;; 6977 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6978 tmp_addflag=' -i_dynamic' ;; 6979 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6980 tmp_addflag=' -i_dynamic -nofor_main' ;; 6981 ifc* | ifort*) # Intel Fortran compiler 6982 tmp_addflag=' -nofor_main' ;; 6983 lf95*) # Lahey Fortran 8.1 6984 _LT_TAGVAR(whole_archive_flag_spec, $1)= 6985 tmp_sharedflag='--shared' ;; 6986 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 6987 tmp_sharedflag='-qmkshrobj' 6988 tmp_addflag= ;; 6989 nvcc*) # Cuda Compiler Driver 2.2 6990 _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' 6991 _LT_TAGVAR(compiler_needs_object, $1)=yes 6992 ;; 6993 esac 6994 case `$CC -V 2>&1 | sed 5q` in 6995 *Sun\ C*) # Sun C 5.9 6996 _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' 6997 _LT_TAGVAR(compiler_needs_object, $1)=yes 6998 tmp_sharedflag='-G' ;; 6999 *Sun\ F*) # Sun Fortran 8.3 7000 tmp_sharedflag='-G' ;; 7001 esac 7002 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7003 7004 if test "x$supports_anon_versioning" = xyes; then 7005 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7006 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7007 echo "local: *; };" >> $output_objdir/$libname.ver~ 7008 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7009 fi 7010 7011 case $cc_basename in 7012 xlf* | bgf* | bgxlf* | mpixlf*) 7013 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 7014 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 7015 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7016 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 7017 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 7018 if test "x$supports_anon_versioning" = xyes; then 7019 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7020 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7021 echo "local: *; };" >> $output_objdir/$libname.ver~ 7022 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 7023 fi 7024 ;; 7025 esac 7026 else 7027 _LT_TAGVAR(ld_shlibs, $1)=no 7028 fi 7029 ;; 7030 7031 netbsd*) 7032 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7033 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 7034 wlarc= 7035 else 7036 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7037 _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' 7038 fi 7039 ;; 7040 7041 solaris*) 7042 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 7043 _LT_TAGVAR(ld_shlibs, $1)=no 7044 cat <<_LT_EOF 1>&2 7045 7046*** Warning: The releases 2.8.* of the GNU linker cannot reliably 7047*** create shared libraries on Solaris systems. Therefore, libtool 7048*** is disabling shared libraries support. We urge you to upgrade GNU 7049*** binutils to release 2.9.1 or newer. Another option is to modify 7050*** your PATH or compiler configuration so that the native linker is 7051*** used, and then restart. 7052 7053_LT_EOF 7054 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7055 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7056 _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' 7057 else 7058 _LT_TAGVAR(ld_shlibs, $1)=no 7059 fi 7060 ;; 7061 7062 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 7063 case `$LD -v 2>&1` in 7064 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 7065 _LT_TAGVAR(ld_shlibs, $1)=no 7066 cat <<_LT_EOF 1>&2 7067 7068*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 7069*** reliably create shared libraries on SCO systems. Therefore, libtool 7070*** is disabling shared libraries support. We urge you to upgrade GNU 7071*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 7072*** your PATH or compiler configuration so that the native linker is 7073*** used, and then restart. 7074 7075_LT_EOF 7076 ;; 7077 *) 7078 # For security reasons, it is highly recommended that you always 7079 # use absolute paths for naming shared libraries, and exclude the 7080 # DT_RUNPATH tag from executables and libraries. But doing so 7081 # requires that you compile everything twice, which is a pain. 7082 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7083 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7084 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7085 _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' 7086 else 7087 _LT_TAGVAR(ld_shlibs, $1)=no 7088 fi 7089 ;; 7090 esac 7091 ;; 7092 7093 sunos4*) 7094 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7095 wlarc= 7096 _LT_TAGVAR(hardcode_direct, $1)=yes 7097 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7098 ;; 7099 7100 *) 7101 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7102 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7103 _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' 7104 else 7105 _LT_TAGVAR(ld_shlibs, $1)=no 7106 fi 7107 ;; 7108 esac 7109 7110 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 7111 runpath_var= 7112 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7113 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 7114 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7115 fi 7116 else 7117 # PORTME fill in a description of your system's linker (not GNU ld) 7118 case $host_os in 7119 aix3*) 7120 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7121 _LT_TAGVAR(always_export_symbols, $1)=yes 7122 _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' 7123 # Note: this linker hardcodes the directories in LIBPATH if there 7124 # are no directories specified by -L. 7125 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7126 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 7127 # Neither direct hardcoding nor static linking is supported with a 7128 # broken collect2. 7129 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7130 fi 7131 ;; 7132 7133 aix[[4-9]]*) 7134 if test "$host_cpu" = ia64; then 7135 # On IA64, the linker does run time linking by default, so we don't 7136 # have to do anything special. 7137 aix_use_runtimelinking=no 7138 exp_sym_flag='-Bexport' 7139 no_entry_flag="" 7140 else 7141 # If we're using GNU nm, then we don't want the "-C" option. 7142 # -C means demangle to AIX nm, but means don't demangle with GNU nm 7143 # Also, AIX nm treats weak defined symbols like other global 7144 # defined symbols, whereas GNU nm marks them as "W". 7145 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 7146 _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' 7147 else 7148 _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' 7149 fi 7150 aix_use_runtimelinking=no 7151 7152 # Test if we are trying to use run time linking or normal 7153 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7154 # need to do runtime linking. 7155 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7156 for ld_flag in $LDFLAGS; do 7157 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 7158 aix_use_runtimelinking=yes 7159 break 7160 fi 7161 done 7162 ;; 7163 esac 7164 7165 exp_sym_flag='-bexport' 7166 no_entry_flag='-bnoentry' 7167 fi 7168 7169 # When large executables or shared objects are built, AIX ld can 7170 # have problems creating the table of contents. If linking a library 7171 # or program results in "error TOC overflow" add -mminimal-toc to 7172 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7173 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7174 7175 _LT_TAGVAR(archive_cmds, $1)='' 7176 _LT_TAGVAR(hardcode_direct, $1)=yes 7177 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7178 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7179 _LT_TAGVAR(link_all_deplibs, $1)=yes 7180 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7181 7182 if test "$GCC" = yes; then 7183 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7184 # We only want to do this on AIX 4.2 and lower, the check 7185 # below for broken collect2 doesn't work under 4.3+ 7186 collect2name=`${CC} -print-prog-name=collect2` 7187 if test -f "$collect2name" && 7188 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7189 then 7190 # We have reworked collect2 7191 : 7192 else 7193 # We have old collect2 7194 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7195 # It fails to find uninstalled libraries when the uninstalled 7196 # path is not listed in the libpath. Setting hardcode_minus_L 7197 # to unsupported forces relinking 7198 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7199 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7200 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7201 fi 7202 ;; 7203 esac 7204 shared_flag='-shared' 7205 if test "$aix_use_runtimelinking" = yes; then 7206 shared_flag="$shared_flag "'${wl}-G' 7207 fi 7208 else 7209 # not using gcc 7210 if test "$host_cpu" = ia64; then 7211 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7212 # chokes on -Wl,-G. The following line is correct: 7213 shared_flag='-G' 7214 else 7215 if test "$aix_use_runtimelinking" = yes; then 7216 shared_flag='${wl}-G' 7217 else 7218 shared_flag='${wl}-bM:SRE' 7219 fi 7220 fi 7221 fi 7222 7223 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7224 # It seems that -bexpall does not export symbols beginning with 7225 # underscore (_), so it is better to generate a list of symbols to export. 7226 _LT_TAGVAR(always_export_symbols, $1)=yes 7227 if test "$aix_use_runtimelinking" = yes; then 7228 # Warning - without using the other runtime loading flags (-brtl), 7229 # -berok will link without error, but may produce a broken library. 7230 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7231 # Determine the default libpath from the value encoded in an 7232 # empty executable. 7233 _LT_SYS_MODULE_PATH_AIX 7234 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7235 _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" 7236 else 7237 if test "$host_cpu" = ia64; then 7238 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7239 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7240 _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" 7241 else 7242 # Determine the default libpath from the value encoded in an 7243 # empty executable. 7244 _LT_SYS_MODULE_PATH_AIX 7245 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7246 # Warning - without using the other run time loading flags, 7247 # -berok will link without error, but may produce a broken library. 7248 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7249 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7250 if test "$with_gnu_ld" = yes; then 7251 # We only use this code for GNU lds that support --whole-archive. 7252 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7253 else 7254 # Exported symbols can be pulled into shared objects from archives 7255 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7256 fi 7257 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7258 # This is similar to how AIX traditionally builds its shared libraries. 7259 _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' 7260 fi 7261 fi 7262 ;; 7263 7264 amigaos*) 7265 case $host_cpu in 7266 powerpc) 7267 # see comment about AmigaOS4 .so support 7268 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7269 _LT_TAGVAR(archive_expsym_cmds, $1)='' 7270 ;; 7271 m68k) 7272 _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)' 7273 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7274 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7275 ;; 7276 esac 7277 ;; 7278 7279 bsdi[[45]]*) 7280 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 7281 ;; 7282 7283 cygwin* | mingw* | pw32* | cegcc*) 7284 # When not using gcc, we currently assume that we are using 7285 # Microsoft Visual C++. 7286 # hardcode_libdir_flag_spec is actually meaningless, as there is 7287 # no search path for DLLs. 7288 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7289 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7290 # Tell ltmain to make .lib files, not .a files. 7291 libext=lib 7292 # Tell ltmain to make .dll files, not .so files. 7293 shrext_cmds=".dll" 7294 # FIXME: Setting linknames here is a bad hack. 7295 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 7296 # The linker will automatically build a .lib file if we build a DLL. 7297 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7298 # FIXME: Should let the user specify the lib program. 7299 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 7300 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 7301 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7302 ;; 7303 7304 darwin* | rhapsody*) 7305 _LT_DARWIN_LINKER_FEATURES($1) 7306 ;; 7307 7308 dgux*) 7309 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7310 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7311 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7312 ;; 7313 7314 freebsd1*) 7315 _LT_TAGVAR(ld_shlibs, $1)=no 7316 ;; 7317 7318 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7319 # support. Future versions do this automatically, but an explicit c++rt0.o 7320 # does not break anything, and helps significantly (at the cost of a little 7321 # extra space). 7322 freebsd2.2*) 7323 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7325 _LT_TAGVAR(hardcode_direct, $1)=yes 7326 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7327 ;; 7328 7329 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7330 freebsd2*) 7331 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7332 _LT_TAGVAR(hardcode_direct, $1)=yes 7333 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7334 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7335 ;; 7336 7337 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7338 freebsd* | dragonfly*) 7339 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7340 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7341 _LT_TAGVAR(hardcode_direct, $1)=yes 7342 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7343 ;; 7344 7345 hpux9*) 7346 if test "$GCC" = yes; then 7347 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7348 else 7349 _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' 7350 fi 7351 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7352 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7353 _LT_TAGVAR(hardcode_direct, $1)=yes 7354 7355 # hardcode_minus_L: Not really in the search PATH, 7356 # but as the default location of the library. 7357 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7358 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7359 ;; 7360 7361 hpux10*) 7362 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7363 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7364 else 7365 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7366 fi 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_flag_spec_ld, $1)='+b $libdir' 7370 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7371 _LT_TAGVAR(hardcode_direct, $1)=yes 7372 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7373 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7374 # hardcode_minus_L: Not really in the search PATH, 7375 # but as the default location of the library. 7376 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7377 fi 7378 ;; 7379 7380 hpux11*) 7381 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7382 case $host_cpu in 7383 hppa*64*) 7384 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7385 ;; 7386 ia64*) 7387 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7388 ;; 7389 *) 7390 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7391 ;; 7392 esac 7393 else 7394 case $host_cpu in 7395 hppa*64*) 7396 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7397 ;; 7398 ia64*) 7399 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7400 ;; 7401 *) 7402 m4_if($1, [], [ 7403 # Older versions of the 11.00 compiler do not understand -b yet 7404 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 7405 _LT_LINKER_OPTION([if $CC understands -b], 7406 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 7407 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 7408 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 7409 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 7410 ;; 7411 esac 7412 fi 7413 if test "$with_gnu_ld" = no; then 7414 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7415 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7416 7417 case $host_cpu in 7418 hppa*64*|ia64*) 7419 _LT_TAGVAR(hardcode_direct, $1)=no 7420 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7421 ;; 7422 *) 7423 _LT_TAGVAR(hardcode_direct, $1)=yes 7424 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7425 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7426 7427 # hardcode_minus_L: Not really in the search PATH, 7428 # but as the default location of the library. 7429 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7430 ;; 7431 esac 7432 fi 7433 ;; 7434 7435 irix5* | irix6* | nonstopux*) 7436 if test "$GCC" = yes; then 7437 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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' 7438 # Try to use the -exported_symbol ld option, if it does not 7439 # work, assume that -exports_file does not work either and 7440 # implicitly export all symbols. 7441 save_LDFLAGS="$LDFLAGS" 7442 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 7443 AC_LINK_IFELSE(int foo(void) {}, 7444 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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' 7445 ) 7446 LDFLAGS="$save_LDFLAGS" 7447 else 7448 _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' 7449 _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' 7450 fi 7451 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7452 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7453 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7454 _LT_TAGVAR(inherit_rpath, $1)=yes 7455 _LT_TAGVAR(link_all_deplibs, $1)=yes 7456 ;; 7457 7458 netbsd*) 7459 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7460 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7461 else 7462 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7463 fi 7464 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7465 _LT_TAGVAR(hardcode_direct, $1)=yes 7466 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7467 ;; 7468 7469 newsos6) 7470 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7471 _LT_TAGVAR(hardcode_direct, $1)=yes 7472 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7473 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7474 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7475 ;; 7476 7477 *nto* | *qnx*) 7478 ;; 7479 7480 openbsd*) 7481 if test -f /usr/libexec/ld.so; then 7482 _LT_TAGVAR(hardcode_direct, $1)=yes 7483 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7484 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7485 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7486 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7487 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7488 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7489 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7490 else 7491 case $host_os in 7492 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7493 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7494 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7495 ;; 7496 *) 7497 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7498 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7499 ;; 7500 esac 7501 fi 7502 else 7503 _LT_TAGVAR(ld_shlibs, $1)=no 7504 fi 7505 ;; 7506 7507 os2*) 7508 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7509 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7510 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7511 _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' 7512 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7513 ;; 7514 7515 osf3*) 7516 if test "$GCC" = yes; then 7517 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7518 _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' 7519 else 7520 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7521 _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' 7522 fi 7523 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7525 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7526 ;; 7527 7528 osf4* | osf5*) # as osf3* with the addition of -msym flag 7529 if test "$GCC" = yes; then 7530 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7531 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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' 7532 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7533 else 7534 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7535 _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' 7536 _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~ 7537 $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' 7538 7539 # Both c and cxx compiler support -rpath directly 7540 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7541 fi 7542 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7543 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7544 ;; 7545 7546 solaris*) 7547 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 7548 if test "$GCC" = yes; then 7549 wlarc='${wl}' 7550 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7551 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7552 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7553 else 7554 case `$CC -V 2>&1` in 7555 *"Compilers 5.0"*) 7556 wlarc='' 7557 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 7558 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7559 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 7560 ;; 7561 *) 7562 wlarc='${wl}' 7563 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 7564 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7565 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7566 ;; 7567 esac 7568 fi 7569 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7570 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7571 case $host_os in 7572 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7573 *) 7574 # The compiler driver will combine and reorder linker options, 7575 # but understands `-z linker_flag'. GCC discards it without `$wl', 7576 # but is careful enough not to reorder. 7577 # Supported since Solaris 2.6 (maybe 2.5.1?) 7578 if test "$GCC" = yes; then 7579 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7580 else 7581 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7582 fi 7583 ;; 7584 esac 7585 _LT_TAGVAR(link_all_deplibs, $1)=yes 7586 ;; 7587 7588 sunos4*) 7589 if test "x$host_vendor" = xsequent; then 7590 # Use $CC to link under sequent, because it throws in some extra .o 7591 # files that make .init and .fini sections work. 7592 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 7593 else 7594 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 7595 fi 7596 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7597 _LT_TAGVAR(hardcode_direct, $1)=yes 7598 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7599 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7600 ;; 7601 7602 sysv4) 7603 case $host_vendor in 7604 sni) 7605 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7606 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 7607 ;; 7608 siemens) 7609 ## LD is ld it makes a PLAMLIB 7610 ## CC just makes a GrossModule. 7611 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 7612 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 7613 _LT_TAGVAR(hardcode_direct, $1)=no 7614 ;; 7615 motorola) 7616 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7617 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 7618 ;; 7619 esac 7620 runpath_var='LD_RUN_PATH' 7621 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7622 ;; 7623 7624 sysv4.3*) 7625 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7626 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7627 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 7628 ;; 7629 7630 sysv4*MP*) 7631 if test -d /usr/nec; then 7632 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7633 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7634 runpath_var=LD_RUN_PATH 7635 hardcode_runpath_var=yes 7636 _LT_TAGVAR(ld_shlibs, $1)=yes 7637 fi 7638 ;; 7639 7640 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7641 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7642 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7643 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7644 runpath_var='LD_RUN_PATH' 7645 7646 if test "$GCC" = yes; then 7647 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7648 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7649 else 7650 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7651 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7652 fi 7653 ;; 7654 7655 sysv5* | sco3.2v5* | sco5v6*) 7656 # Note: We can NOT use -z defs as we might desire, because we do not 7657 # link with -lc, and that would cause any symbols used from libc to 7658 # always be unresolved, which means just about no library would 7659 # ever link correctly. If we're not using GNU ld we use -z text 7660 # though, which does catch some bad symbols but isn't as heavy-handed 7661 # as -z defs. 7662 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7663 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7664 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7665 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7666 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7667 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7668 _LT_TAGVAR(link_all_deplibs, $1)=yes 7669 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7670 runpath_var='LD_RUN_PATH' 7671 7672 if test "$GCC" = yes; then 7673 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7674 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7675 else 7676 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7677 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7678 fi 7679 ;; 7680 7681 uts4*) 7682 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7684 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7685 ;; 7686 7687 *) 7688 _LT_TAGVAR(ld_shlibs, $1)=no 7689 ;; 7690 esac 7691 7692 if test x$host_vendor = xsni; then 7693 case $host in 7694 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 7695 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 7696 ;; 7697 esac 7698 fi 7699 fi 7700]) 7701AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7702test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7703 7704_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 7705 7706_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 7707_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 7708_LT_DECL([], [extract_expsyms_cmds], [2], 7709 [The commands to extract the exported symbol list from a shared archive]) 7710 7711# 7712# Do we need to explicitly link libc? 7713# 7714case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 7715x|xyes) 7716 # Assume -lc should be added 7717 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7718 7719 if test "$enable_shared" = yes && test "$GCC" = yes; then 7720 case $_LT_TAGVAR(archive_cmds, $1) in 7721 *'~'*) 7722 # FIXME: we may have to deal with multi-command sequences. 7723 ;; 7724 '$CC '*) 7725 # Test whether the compiler implicitly links with -lc since on some 7726 # systems, -lgcc has to come before -lc. If gcc already passes -lc 7727 # to ld, don't add -lc before -lgcc. 7728 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 7729 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 7730 [$RM conftest* 7731 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 7732 7733 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 7734 soname=conftest 7735 lib=conftest 7736 libobjs=conftest.$ac_objext 7737 deplibs= 7738 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 7739 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 7740 compiler_flags=-v 7741 linker_flags=-v 7742 verstring= 7743 output_objdir=. 7744 libname=conftest 7745 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 7746 _LT_TAGVAR(allow_undefined_flag, $1)= 7747 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 7748 then 7749 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7750 else 7751 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7752 fi 7753 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 7754 else 7755 cat conftest.err 1>&5 7756 fi 7757 $RM conftest* 7758 ]) 7759 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 7760 ;; 7761 esac 7762 fi 7763 ;; 7764esac 7765 7766_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 7767 [Whether or not to add -lc for building shared libraries]) 7768_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 7769 [enable_shared_with_static_runtimes], [0], 7770 [Whether or not to disallow shared libs when runtime libs are static]) 7771_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 7772 [Compiler flag to allow reflexive dlopens]) 7773_LT_TAGDECL([], [whole_archive_flag_spec], [1], 7774 [Compiler flag to generate shared objects directly from archives]) 7775_LT_TAGDECL([], [compiler_needs_object], [1], 7776 [Whether the compiler copes with passing no objects directly]) 7777_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 7778 [Create an old-style archive from a shared archive]) 7779_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 7780 [Create a temporary old-style archive to link instead of a shared archive]) 7781_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 7782_LT_TAGDECL([], [archive_expsym_cmds], [2]) 7783_LT_TAGDECL([], [module_cmds], [2], 7784 [Commands used to build a loadable module if different from building 7785 a shared archive.]) 7786_LT_TAGDECL([], [module_expsym_cmds], [2]) 7787_LT_TAGDECL([], [with_gnu_ld], [1], 7788 [Whether we are building with GNU ld or not]) 7789_LT_TAGDECL([], [allow_undefined_flag], [1], 7790 [Flag that allows shared libraries with undefined symbols to be built]) 7791_LT_TAGDECL([], [no_undefined_flag], [1], 7792 [Flag that enforces no undefined symbols]) 7793_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 7794 [Flag to hardcode $libdir into a binary during linking. 7795 This must work even if $libdir does not exist]) 7796_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 7797 [[If ld is used when linking, flag to hardcode $libdir into a binary 7798 during linking. This must work even if $libdir does not exist]]) 7799_LT_TAGDECL([], [hardcode_libdir_separator], [1], 7800 [Whether we need a single "-rpath" flag with a separated argument]) 7801_LT_TAGDECL([], [hardcode_direct], [0], 7802 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7803 DIR into the resulting binary]) 7804_LT_TAGDECL([], [hardcode_direct_absolute], [0], 7805 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7806 DIR into the resulting binary and the resulting library dependency is 7807 "absolute", i.e impossible to change by setting ${shlibpath_var} if the 7808 library is relocated]) 7809_LT_TAGDECL([], [hardcode_minus_L], [0], 7810 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 7811 into the resulting binary]) 7812_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 7813 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 7814 into the resulting binary]) 7815_LT_TAGDECL([], [hardcode_automatic], [0], 7816 [Set to "yes" if building a shared library automatically hardcodes DIR 7817 into the library and all subsequent libraries and executables linked 7818 against it]) 7819_LT_TAGDECL([], [inherit_rpath], [0], 7820 [Set to yes if linker adds runtime paths of dependent libraries 7821 to runtime path list]) 7822_LT_TAGDECL([], [link_all_deplibs], [0], 7823 [Whether libtool must link a program against all its dependency libraries]) 7824_LT_TAGDECL([], [fix_srcfile_path], [1], 7825 [Fix the shell variable $srcfile for the compiler]) 7826_LT_TAGDECL([], [always_export_symbols], [0], 7827 [Set to "yes" if exported symbols are required]) 7828_LT_TAGDECL([], [export_symbols_cmds], [2], 7829 [The commands to list exported symbols]) 7830_LT_TAGDECL([], [exclude_expsyms], [1], 7831 [Symbols that should not be listed in the preloaded symbols]) 7832_LT_TAGDECL([], [include_expsyms], [1], 7833 [Symbols that must always be exported]) 7834_LT_TAGDECL([], [prelink_cmds], [2], 7835 [Commands necessary for linking programs (against libraries) with templates]) 7836_LT_TAGDECL([], [file_list_spec], [1], 7837 [Specify filename containing input files]) 7838dnl FIXME: Not yet implemented 7839dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 7840dnl [Compiler flag to generate thread safe objects]) 7841])# _LT_LINKER_SHLIBS 7842 7843 7844# _LT_LANG_C_CONFIG([TAG]) 7845# ------------------------ 7846# Ensure that the configuration variables for a C compiler are suitably 7847# defined. These variables are subsequently used by _LT_CONFIG to write 7848# the compiler configuration to `libtool'. 7849m4_defun([_LT_LANG_C_CONFIG], 7850[m4_require([_LT_DECL_EGREP])dnl 7851lt_save_CC="$CC" 7852AC_LANG_PUSH(C) 7853 7854# Source file extension for C test sources. 7855ac_ext=c 7856 7857# Object file extension for compiled C test sources. 7858objext=o 7859_LT_TAGVAR(objext, $1)=$objext 7860 7861# Code to be used in simple compile tests 7862lt_simple_compile_test_code="int some_variable = 0;" 7863 7864# Code to be used in simple link tests 7865lt_simple_link_test_code='int main(){return(0);}' 7866 7867_LT_TAG_COMPILER 7868# Save the default compiler, since it gets overwritten when the other 7869# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 7870compiler_DEFAULT=$CC 7871 7872# save warnings/boilerplate of simple test code 7873_LT_COMPILER_BOILERPLATE 7874_LT_LINKER_BOILERPLATE 7875 7876if test -n "$compiler"; then 7877 _LT_COMPILER_NO_RTTI($1) 7878 _LT_COMPILER_PIC($1) 7879 _LT_COMPILER_C_O($1) 7880 _LT_COMPILER_FILE_LOCKS($1) 7881 _LT_LINKER_SHLIBS($1) 7882 _LT_SYS_DYNAMIC_LINKER($1) 7883 _LT_LINKER_HARDCODE_LIBPATH($1) 7884 LT_SYS_DLOPEN_SELF 7885 _LT_CMD_STRIPLIB 7886 7887 # Report which library types will actually be built 7888 AC_MSG_CHECKING([if libtool supports shared libraries]) 7889 AC_MSG_RESULT([$can_build_shared]) 7890 7891 AC_MSG_CHECKING([whether to build shared libraries]) 7892 test "$can_build_shared" = "no" && enable_shared=no 7893 7894 # On AIX, shared libraries and static libraries use the same namespace, and 7895 # are all built from PIC. 7896 case $host_os in 7897 aix3*) 7898 test "$enable_shared" = yes && enable_static=no 7899 if test -n "$RANLIB"; then 7900 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7901 postinstall_cmds='$RANLIB $lib' 7902 fi 7903 ;; 7904 7905 aix[[4-9]]*) 7906 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7907 test "$enable_shared" = yes && enable_static=no 7908 fi 7909 ;; 7910 esac 7911 AC_MSG_RESULT([$enable_shared]) 7912 7913 AC_MSG_CHECKING([whether to build static libraries]) 7914 # Make sure either enable_shared or enable_static is yes. 7915 test "$enable_shared" = yes || enable_static=yes 7916 AC_MSG_RESULT([$enable_static]) 7917 7918 _LT_CONFIG($1) 7919fi 7920AC_LANG_POP 7921CC="$lt_save_CC" 7922])# _LT_LANG_C_CONFIG 7923 7924 7925# _LT_LANG_CXX_CONFIG([TAG]) 7926# -------------------------- 7927# Ensure that the configuration variables for a C++ compiler are suitably 7928# defined. These variables are subsequently used by _LT_CONFIG to write 7929# the compiler configuration to `libtool'. 7930m4_defun([_LT_LANG_CXX_CONFIG], 7931[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7932m4_require([_LT_DECL_EGREP])dnl 7933if test -n "$CXX" && ( test "X$CXX" != "Xno" && 7934 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 7935 (test "X$CXX" != "Xg++"))) ; then 7936 AC_PROG_CXXCPP 7937else 7938 _lt_caught_CXX_error=yes 7939fi 7940 7941AC_LANG_PUSH(C++) 7942_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7943_LT_TAGVAR(allow_undefined_flag, $1)= 7944_LT_TAGVAR(always_export_symbols, $1)=no 7945_LT_TAGVAR(archive_expsym_cmds, $1)= 7946_LT_TAGVAR(compiler_needs_object, $1)=no 7947_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7948_LT_TAGVAR(hardcode_direct, $1)=no 7949_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7950_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7951_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7952_LT_TAGVAR(hardcode_libdir_separator, $1)= 7953_LT_TAGVAR(hardcode_minus_L, $1)=no 7954_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7955_LT_TAGVAR(hardcode_automatic, $1)=no 7956_LT_TAGVAR(inherit_rpath, $1)=no 7957_LT_TAGVAR(module_cmds, $1)= 7958_LT_TAGVAR(module_expsym_cmds, $1)= 7959_LT_TAGVAR(link_all_deplibs, $1)=unknown 7960_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7961_LT_TAGVAR(reload_flag, $1)=$reload_flag 7962_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7963_LT_TAGVAR(no_undefined_flag, $1)= 7964_LT_TAGVAR(whole_archive_flag_spec, $1)= 7965_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7966 7967# Source file extension for C++ test sources. 7968ac_ext=cpp 7969 7970# Object file extension for compiled C++ test sources. 7971objext=o 7972_LT_TAGVAR(objext, $1)=$objext 7973 7974# No sense in running all these tests if we already determined that 7975# the CXX compiler isn't working. Some variables (like enable_shared) 7976# are currently assumed to apply to all compilers on this platform, 7977# and will be corrupted by setting them based on a non-working compiler. 7978if test "$_lt_caught_CXX_error" != yes; then 7979 # Code to be used in simple compile tests 7980 lt_simple_compile_test_code="int some_variable = 0;" 7981 7982 # Code to be used in simple link tests 7983 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7984 7985 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7986 _LT_TAG_COMPILER 7987 7988 # save warnings/boilerplate of simple test code 7989 _LT_COMPILER_BOILERPLATE 7990 _LT_LINKER_BOILERPLATE 7991 7992 # Allow CC to be a program name with arguments. 7993 lt_save_CC=$CC 7994 lt_save_LD=$LD 7995 lt_save_GCC=$GCC 7996 GCC=$GXX 7997 lt_save_with_gnu_ld=$with_gnu_ld 7998 lt_save_path_LD=$lt_cv_path_LD 7999 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 8000 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 8001 else 8002 $as_unset lt_cv_prog_gnu_ld 8003 fi 8004 if test -n "${lt_cv_path_LDCXX+set}"; then 8005 lt_cv_path_LD=$lt_cv_path_LDCXX 8006 else 8007 $as_unset lt_cv_path_LD 8008 fi 8009 test -z "${LDCXX+set}" || LD=$LDCXX 8010 CC=${CXX-"c++"} 8011 compiler=$CC 8012 _LT_TAGVAR(compiler, $1)=$CC 8013 _LT_CC_BASENAME([$compiler]) 8014 8015 if test -n "$compiler"; then 8016 # We don't want -fno-exception when compiling C++ code, so set the 8017 # no_builtin_flag separately 8018 if test "$GXX" = yes; then 8019 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 8020 else 8021 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 8022 fi 8023 8024 if test "$GXX" = yes; then 8025 # Set up default GNU C++ configuration 8026 8027 LT_PATH_LD 8028 8029 # Check if GNU C++ uses GNU ld as the underlying linker, since the 8030 # archiving commands below assume that GNU ld is being used. 8031 if test "$with_gnu_ld" = yes; then 8032 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8033 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 8034 8035 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8036 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8037 8038 # If archive_cmds runs LD, not CC, wlarc should be empty 8039 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 8040 # investigate it a little bit more. (MM) 8041 wlarc='${wl}' 8042 8043 # ancient GNU ld didn't support --whole-archive et. al. 8044 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 8045 $GREP 'no-whole-archive' > /dev/null; then 8046 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8047 else 8048 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8049 fi 8050 else 8051 with_gnu_ld=no 8052 wlarc= 8053 8054 # A generic and very simple default shared library creation 8055 # command for GNU C++ for the case where it uses the native 8056 # linker, instead of GNU ld. If possible, this setting should 8057 # overridden to take advantage of the native linker features on 8058 # the platform it is being used on. 8059 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8060 fi 8061 8062 # Commands to make compiler produce verbose output that lists 8063 # what "hidden" libraries, object files and flags are used when 8064 # linking a shared library. 8065 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8066 8067 else 8068 GXX=no 8069 with_gnu_ld=no 8070 wlarc= 8071 fi 8072 8073 # PORTME: fill in a description of your system's C++ link characteristics 8074 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8075 _LT_TAGVAR(ld_shlibs, $1)=yes 8076 case $host_os in 8077 aix3*) 8078 # FIXME: insert proper C++ library support 8079 _LT_TAGVAR(ld_shlibs, $1)=no 8080 ;; 8081 aix[[4-9]]*) 8082 if test "$host_cpu" = ia64; then 8083 # On IA64, the linker does run time linking by default, so we don't 8084 # have to do anything special. 8085 aix_use_runtimelinking=no 8086 exp_sym_flag='-Bexport' 8087 no_entry_flag="" 8088 else 8089 aix_use_runtimelinking=no 8090 8091 # Test if we are trying to use run time linking or normal 8092 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8093 # need to do runtime linking. 8094 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8095 for ld_flag in $LDFLAGS; do 8096 case $ld_flag in 8097 *-brtl*) 8098 aix_use_runtimelinking=yes 8099 break 8100 ;; 8101 esac 8102 done 8103 ;; 8104 esac 8105 8106 exp_sym_flag='-bexport' 8107 no_entry_flag='-bnoentry' 8108 fi 8109 8110 # When large executables or shared objects are built, AIX ld can 8111 # have problems creating the table of contents. If linking a library 8112 # or program results in "error TOC overflow" add -mminimal-toc to 8113 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8114 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8115 8116 _LT_TAGVAR(archive_cmds, $1)='' 8117 _LT_TAGVAR(hardcode_direct, $1)=yes 8118 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8119 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8120 _LT_TAGVAR(link_all_deplibs, $1)=yes 8121 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 8122 8123 if test "$GXX" = yes; then 8124 case $host_os in aix4.[[012]]|aix4.[[012]].*) 8125 # We only want to do this on AIX 4.2 and lower, the check 8126 # below for broken collect2 doesn't work under 4.3+ 8127 collect2name=`${CC} -print-prog-name=collect2` 8128 if test -f "$collect2name" && 8129 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8130 then 8131 # We have reworked collect2 8132 : 8133 else 8134 # We have old collect2 8135 _LT_TAGVAR(hardcode_direct, $1)=unsupported 8136 # It fails to find uninstalled libraries when the uninstalled 8137 # path is not listed in the libpath. Setting hardcode_minus_L 8138 # to unsupported forces relinking 8139 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8140 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8141 _LT_TAGVAR(hardcode_libdir_separator, $1)= 8142 fi 8143 esac 8144 shared_flag='-shared' 8145 if test "$aix_use_runtimelinking" = yes; then 8146 shared_flag="$shared_flag "'${wl}-G' 8147 fi 8148 else 8149 # not using gcc 8150 if test "$host_cpu" = ia64; then 8151 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8152 # chokes on -Wl,-G. The following line is correct: 8153 shared_flag='-G' 8154 else 8155 if test "$aix_use_runtimelinking" = yes; then 8156 shared_flag='${wl}-G' 8157 else 8158 shared_flag='${wl}-bM:SRE' 8159 fi 8160 fi 8161 fi 8162 8163 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 8164 # It seems that -bexpall does not export symbols beginning with 8165 # underscore (_), so it is better to generate a list of symbols to 8166 # export. 8167 _LT_TAGVAR(always_export_symbols, $1)=yes 8168 if test "$aix_use_runtimelinking" = yes; then 8169 # Warning - without using the other runtime loading flags (-brtl), 8170 # -berok will link without error, but may produce a broken library. 8171 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8172 # Determine the default libpath from the value encoded in an empty 8173 # executable. 8174 _LT_SYS_MODULE_PATH_AIX 8175 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8176 8177 _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" 8178 else 8179 if test "$host_cpu" = ia64; then 8180 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 8181 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8182 _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" 8183 else 8184 # Determine the default libpath from the value encoded in an 8185 # empty executable. 8186 _LT_SYS_MODULE_PATH_AIX 8187 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8188 # Warning - without using the other run time loading flags, 8189 # -berok will link without error, but may produce a broken library. 8190 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 8191 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 8192 if test "$with_gnu_ld" = yes; then 8193 # We only use this code for GNU lds that support --whole-archive. 8194 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8195 else 8196 # Exported symbols can be pulled into shared objects from archives 8197 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8198 fi 8199 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8200 # This is similar to how AIX traditionally builds its shared 8201 # libraries. 8202 _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' 8203 fi 8204 fi 8205 ;; 8206 8207 beos*) 8208 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8209 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8210 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8211 # support --undefined. This deserves some investigation. FIXME 8212 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8213 else 8214 _LT_TAGVAR(ld_shlibs, $1)=no 8215 fi 8216 ;; 8217 8218 chorus*) 8219 case $cc_basename in 8220 *) 8221 # FIXME: insert proper C++ library support 8222 _LT_TAGVAR(ld_shlibs, $1)=no 8223 ;; 8224 esac 8225 ;; 8226 8227 cygwin* | mingw* | pw32* | cegcc*) 8228 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8229 # as there is no search path for DLLs. 8230 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8231 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 8232 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8233 _LT_TAGVAR(always_export_symbols, $1)=no 8234 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8235 8236 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8237 _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' 8238 # If the export-symbols file already is a .def file (1st line 8239 # is EXPORTS), use it as is; otherwise, prepend... 8240 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 8241 cp $export_symbols $output_objdir/$soname.def; 8242 else 8243 echo EXPORTS > $output_objdir/$soname.def; 8244 cat $export_symbols >> $output_objdir/$soname.def; 8245 fi~ 8246 $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' 8247 else 8248 _LT_TAGVAR(ld_shlibs, $1)=no 8249 fi 8250 ;; 8251 darwin* | rhapsody*) 8252 _LT_DARWIN_LINKER_FEATURES($1) 8253 ;; 8254 8255 dgux*) 8256 case $cc_basename in 8257 ec++*) 8258 # FIXME: insert proper C++ library support 8259 _LT_TAGVAR(ld_shlibs, $1)=no 8260 ;; 8261 ghcx*) 8262 # Green Hills C++ Compiler 8263 # FIXME: insert proper C++ library support 8264 _LT_TAGVAR(ld_shlibs, $1)=no 8265 ;; 8266 *) 8267 # FIXME: insert proper C++ library support 8268 _LT_TAGVAR(ld_shlibs, $1)=no 8269 ;; 8270 esac 8271 ;; 8272 8273 freebsd[[12]]*) 8274 # C++ shared libraries reported to be fairly broken before 8275 # switch to ELF 8276 _LT_TAGVAR(ld_shlibs, $1)=no 8277 ;; 8278 8279 freebsd-elf*) 8280 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8281 ;; 8282 8283 freebsd* | dragonfly*) 8284 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 8285 # conventions 8286 _LT_TAGVAR(ld_shlibs, $1)=yes 8287 ;; 8288 8289 gnu*) 8290 ;; 8291 8292 haiku*) 8293 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8294 _LT_TAGVAR(link_all_deplibs, $1)=yes 8295 ;; 8296 8297 hpux9*) 8298 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8299 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8300 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8301 _LT_TAGVAR(hardcode_direct, $1)=yes 8302 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8303 # but as the default 8304 # location of the library. 8305 8306 case $cc_basename in 8307 CC*) 8308 # FIXME: insert proper C++ library support 8309 _LT_TAGVAR(ld_shlibs, $1)=no 8310 ;; 8311 aCC*) 8312 _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' 8313 # Commands to make compiler produce verbose output that lists 8314 # what "hidden" libraries, object files and flags are used when 8315 # linking a shared library. 8316 # 8317 # There doesn't appear to be a way to prevent this compiler from 8318 # explicitly linking system object files so we need to strip them 8319 # from the output so that they don't get included in the library 8320 # dependencies. 8321 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"' 8322 ;; 8323 *) 8324 if test "$GXX" = yes; then 8325 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' 8326 else 8327 # FIXME: insert proper C++ library support 8328 _LT_TAGVAR(ld_shlibs, $1)=no 8329 fi 8330 ;; 8331 esac 8332 ;; 8333 8334 hpux10*|hpux11*) 8335 if test $with_gnu_ld = no; then 8336 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8337 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8338 8339 case $host_cpu in 8340 hppa*64*|ia64*) 8341 ;; 8342 *) 8343 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8344 ;; 8345 esac 8346 fi 8347 case $host_cpu in 8348 hppa*64*|ia64*) 8349 _LT_TAGVAR(hardcode_direct, $1)=no 8350 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8351 ;; 8352 *) 8353 _LT_TAGVAR(hardcode_direct, $1)=yes 8354 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8355 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8356 # but as the default 8357 # location of the library. 8358 ;; 8359 esac 8360 8361 case $cc_basename in 8362 CC*) 8363 # FIXME: insert proper C++ library support 8364 _LT_TAGVAR(ld_shlibs, $1)=no 8365 ;; 8366 aCC*) 8367 case $host_cpu in 8368 hppa*64*) 8369 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8370 ;; 8371 ia64*) 8372 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8373 ;; 8374 *) 8375 _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' 8376 ;; 8377 esac 8378 # Commands to make compiler produce verbose output that lists 8379 # what "hidden" libraries, object files and flags are used when 8380 # linking a shared library. 8381 # 8382 # There doesn't appear to be a way to prevent this compiler from 8383 # explicitly linking system object files so we need to strip them 8384 # from the output so that they don't get included in the library 8385 # dependencies. 8386 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"' 8387 ;; 8388 *) 8389 if test "$GXX" = yes; then 8390 if test $with_gnu_ld = no; then 8391 case $host_cpu in 8392 hppa*64*) 8393 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8394 ;; 8395 ia64*) 8396 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8397 ;; 8398 *) 8399 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8400 ;; 8401 esac 8402 fi 8403 else 8404 # FIXME: insert proper C++ library support 8405 _LT_TAGVAR(ld_shlibs, $1)=no 8406 fi 8407 ;; 8408 esac 8409 ;; 8410 8411 interix[[3-9]]*) 8412 _LT_TAGVAR(hardcode_direct, $1)=no 8413 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8414 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8415 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8416 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8417 # Instead, shared libraries are loaded at an image base (0x10000000 by 8418 # default) and relocated if they conflict, which is a slow very memory 8419 # consuming and fragmenting process. To avoid this, we pick a random, 8420 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8421 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8422 _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' 8423 _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' 8424 ;; 8425 irix5* | irix6*) 8426 case $cc_basename in 8427 CC*) 8428 # SGI C++ 8429 _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' 8430 8431 # Archives containing C++ object files must be created using 8432 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 8433 # necessary to make sure instantiated templates are included 8434 # in the archive. 8435 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 8436 ;; 8437 *) 8438 if test "$GXX" = yes; then 8439 if test "$with_gnu_ld" = no; then 8440 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8441 else 8442 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8443 fi 8444 fi 8445 _LT_TAGVAR(link_all_deplibs, $1)=yes 8446 ;; 8447 esac 8448 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8449 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8450 _LT_TAGVAR(inherit_rpath, $1)=yes 8451 ;; 8452 8453 linux* | k*bsd*-gnu | kopensolaris*-gnu) 8454 case $cc_basename in 8455 KCC*) 8456 # Kuck and Associates, Inc. (KAI) C++ Compiler 8457 8458 # KCC will only create a shared library if the output file 8459 # ends with ".so" (or ".sl" for HP-UX), so rename the library 8460 # to its proper name (with version) after linking. 8461 _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' 8462 _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' 8463 # Commands to make compiler produce verbose output that lists 8464 # what "hidden" libraries, object files and flags are used when 8465 # linking a shared library. 8466 # 8467 # There doesn't appear to be a way to prevent this compiler from 8468 # explicitly linking system object files so we need to strip them 8469 # from the output so that they don't get included in the library 8470 # dependencies. 8471 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"' 8472 8473 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8474 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8475 8476 # Archives containing C++ object files must be created using 8477 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 8478 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 8479 ;; 8480 icpc* | ecpc* ) 8481 # Intel C++ 8482 with_gnu_ld=yes 8483 # version 8.0 and above of icpc choke on multiply defined symbols 8484 # if we add $predep_objects and $postdep_objects, however 7.1 and 8485 # earlier do not add the objects themselves. 8486 case `$CC -V 2>&1` in 8487 *"Version 7."*) 8488 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8489 _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' 8490 ;; 8491 *) # Version 8.0 or newer 8492 tmp_idyn= 8493 case $host_cpu in 8494 ia64*) tmp_idyn=' -i_dynamic';; 8495 esac 8496 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8497 _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' 8498 ;; 8499 esac 8500 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8501 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8502 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8503 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8504 ;; 8505 pgCC* | pgcpp*) 8506 # Portland Group C++ compiler 8507 case `$CC -V` in 8508 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 8509 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 8510 rm -rf $tpldir~ 8511 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 8512 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 8513 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 8514 rm -rf $tpldir~ 8515 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 8516 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 8517 $RANLIB $oldlib' 8518 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 8519 rm -rf $tpldir~ 8520 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8521 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8522 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 8523 rm -rf $tpldir~ 8524 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8525 $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' 8526 ;; 8527 *) # Version 6 and above use weak symbols 8528 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8529 _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' 8530 ;; 8531 esac 8532 8533 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 8534 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8535 _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' 8536 ;; 8537 cxx*) 8538 # Compaq C++ 8539 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8540 _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' 8541 8542 runpath_var=LD_RUN_PATH 8543 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8544 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8545 8546 # Commands to make compiler produce verbose output that lists 8547 # what "hidden" libraries, object files and flags are used when 8548 # linking a shared library. 8549 # 8550 # There doesn't appear to be a way to prevent this compiler from 8551 # explicitly linking system object files so we need to strip them 8552 # from the output so that they don't get included in the library 8553 # dependencies. 8554 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' 8555 ;; 8556 xl* | mpixl* | bgxl*) 8557 # IBM XL 8.0 on PPC, with GNU ld 8558 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8559 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8560 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8561 if test "x$supports_anon_versioning" = xyes; then 8562 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8563 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8564 echo "local: *; };" >> $output_objdir/$libname.ver~ 8565 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 8566 fi 8567 ;; 8568 *) 8569 case `$CC -V 2>&1 | sed 5q` in 8570 *Sun\ C*) 8571 # Sun C++ 5.9 8572 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8573 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8574 _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' 8575 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8576 _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' 8577 _LT_TAGVAR(compiler_needs_object, $1)=yes 8578 8579 # Not sure whether something based on 8580 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 8581 # would be better. 8582 output_verbose_link_cmd='func_echo_all' 8583 8584 # Archives containing C++ object files must be created using 8585 # "CC -xar", where "CC" is the Sun C++ compiler. This is 8586 # necessary to make sure instantiated templates are included 8587 # in the archive. 8588 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8589 ;; 8590 esac 8591 ;; 8592 esac 8593 ;; 8594 8595 lynxos*) 8596 # FIXME: insert proper C++ library support 8597 _LT_TAGVAR(ld_shlibs, $1)=no 8598 ;; 8599 8600 m88k*) 8601 # FIXME: insert proper C++ library support 8602 _LT_TAGVAR(ld_shlibs, $1)=no 8603 ;; 8604 8605 mvs*) 8606 case $cc_basename in 8607 cxx*) 8608 # FIXME: insert proper C++ library support 8609 _LT_TAGVAR(ld_shlibs, $1)=no 8610 ;; 8611 *) 8612 # FIXME: insert proper C++ library support 8613 _LT_TAGVAR(ld_shlibs, $1)=no 8614 ;; 8615 esac 8616 ;; 8617 8618 netbsd*) 8619 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8620 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 8621 wlarc= 8622 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8623 _LT_TAGVAR(hardcode_direct, $1)=yes 8624 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8625 fi 8626 # Workaround some broken pre-1.5 toolchains 8627 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 8628 ;; 8629 8630 *nto* | *qnx*) 8631 _LT_TAGVAR(ld_shlibs, $1)=yes 8632 ;; 8633 8634 openbsd2*) 8635 # C++ shared libraries are fairly broken 8636 _LT_TAGVAR(ld_shlibs, $1)=no 8637 ;; 8638 8639 openbsd*) 8640 if test -f /usr/libexec/ld.so; then 8641 _LT_TAGVAR(hardcode_direct, $1)=yes 8642 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8643 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8644 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8645 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8646 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 8647 _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' 8648 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8649 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8650 fi 8651 output_verbose_link_cmd=func_echo_all 8652 else 8653 _LT_TAGVAR(ld_shlibs, $1)=no 8654 fi 8655 ;; 8656 8657 osf3* | osf4* | osf5*) 8658 case $cc_basename in 8659 KCC*) 8660 # Kuck and Associates, Inc. (KAI) C++ Compiler 8661 8662 # KCC will only create a shared library if the output file 8663 # ends with ".so" (or ".sl" for HP-UX), so rename the library 8664 # to its proper name (with version) after linking. 8665 _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' 8666 8667 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8668 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8669 8670 # Archives containing C++ object files must be created using 8671 # the KAI C++ compiler. 8672 case $host in 8673 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 8674 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 8675 esac 8676 ;; 8677 RCC*) 8678 # Rational C++ 2.4.1 8679 # FIXME: insert proper C++ library support 8680 _LT_TAGVAR(ld_shlibs, $1)=no 8681 ;; 8682 cxx*) 8683 case $host in 8684 osf3*) 8685 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8686 _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' 8687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8688 ;; 8689 *) 8690 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8691 _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' 8692 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 8693 echo "-hidden">> $lib.exp~ 8694 $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~ 8695 $RM $lib.exp' 8696 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8697 ;; 8698 esac 8699 8700 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8701 8702 # Commands to make compiler produce verbose output that lists 8703 # what "hidden" libraries, object files and flags are used when 8704 # linking a shared library. 8705 # 8706 # There doesn't appear to be a way to prevent this compiler from 8707 # explicitly linking system object files so we need to strip them 8708 # from the output so that they don't get included in the library 8709 # dependencies. 8710 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"' 8711 ;; 8712 *) 8713 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8714 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8715 case $host in 8716 osf3*) 8717 _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' 8718 ;; 8719 *) 8720 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8721 ;; 8722 esac 8723 8724 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8725 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8726 8727 # Commands to make compiler produce verbose output that lists 8728 # what "hidden" libraries, object files and flags are used when 8729 # linking a shared library. 8730 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8731 8732 else 8733 # FIXME: insert proper C++ library support 8734 _LT_TAGVAR(ld_shlibs, $1)=no 8735 fi 8736 ;; 8737 esac 8738 ;; 8739 8740 psos*) 8741 # FIXME: insert proper C++ library support 8742 _LT_TAGVAR(ld_shlibs, $1)=no 8743 ;; 8744 8745 sunos4*) 8746 case $cc_basename in 8747 CC*) 8748 # Sun C++ 4.x 8749 # FIXME: insert proper C++ library support 8750 _LT_TAGVAR(ld_shlibs, $1)=no 8751 ;; 8752 lcc*) 8753 # Lucid 8754 # FIXME: insert proper C++ library support 8755 _LT_TAGVAR(ld_shlibs, $1)=no 8756 ;; 8757 *) 8758 # FIXME: insert proper C++ library support 8759 _LT_TAGVAR(ld_shlibs, $1)=no 8760 ;; 8761 esac 8762 ;; 8763 8764 solaris*) 8765 case $cc_basename in 8766 CC* | sunCC*) 8767 # Sun C++ 4.2, 5.x and Centerline C++ 8768 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 8769 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8770 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8771 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8772 $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' 8773 8774 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8775 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8776 case $host_os in 8777 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8778 *) 8779 # The compiler driver will combine and reorder linker options, 8780 # but understands `-z linker_flag'. 8781 # Supported since Solaris 2.6 (maybe 2.5.1?) 8782 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 8783 ;; 8784 esac 8785 _LT_TAGVAR(link_all_deplibs, $1)=yes 8786 8787 output_verbose_link_cmd='func_echo_all' 8788 8789 # Archives containing C++ object files must be created using 8790 # "CC -xar", where "CC" is the Sun C++ compiler. This is 8791 # necessary to make sure instantiated templates are included 8792 # in the archive. 8793 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8794 ;; 8795 gcx*) 8796 # Green Hills C++ Compiler 8797 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8798 8799 # The C++ compiler must be used to create the archive. 8800 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 8801 ;; 8802 *) 8803 # GNU C++ compiler with Solaris linker 8804 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8805 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 8806 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 8807 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8808 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8809 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8810 8811 # Commands to make compiler produce verbose output that lists 8812 # what "hidden" libraries, object files and flags are used when 8813 # linking a shared library. 8814 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8815 else 8816 # g++ 2.7 appears to require `-G' NOT `-shared' on this 8817 # platform. 8818 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8819 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8820 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8821 8822 # Commands to make compiler produce verbose output that lists 8823 # what "hidden" libraries, object files and flags are used when 8824 # linking a shared library. 8825 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8826 fi 8827 8828 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 8829 case $host_os in 8830 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8831 *) 8832 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 8833 ;; 8834 esac 8835 fi 8836 ;; 8837 esac 8838 ;; 8839 8840 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 8841 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8842 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8843 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8844 runpath_var='LD_RUN_PATH' 8845 8846 case $cc_basename in 8847 CC*) 8848 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8849 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8850 ;; 8851 *) 8852 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8853 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8854 ;; 8855 esac 8856 ;; 8857 8858 sysv5* | sco3.2v5* | sco5v6*) 8859 # Note: We can NOT use -z defs as we might desire, because we do not 8860 # link with -lc, and that would cause any symbols used from libc to 8861 # always be unresolved, which means just about no library would 8862 # ever link correctly. If we're not using GNU ld we use -z text 8863 # though, which does catch some bad symbols but isn't as heavy-handed 8864 # as -z defs. 8865 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8866 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 8867 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8868 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8869 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 8870 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8871 _LT_TAGVAR(link_all_deplibs, $1)=yes 8872 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8873 runpath_var='LD_RUN_PATH' 8874 8875 case $cc_basename in 8876 CC*) 8877 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8878 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8879 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 8880 '"$_LT_TAGVAR(old_archive_cmds, $1)" 8881 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 8882 '"$_LT_TAGVAR(reload_cmds, $1)" 8883 ;; 8884 *) 8885 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8886 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8887 ;; 8888 esac 8889 ;; 8890 8891 tandem*) 8892 case $cc_basename in 8893 NCC*) 8894 # NonStop-UX NCC 3.20 8895 # FIXME: insert proper C++ library support 8896 _LT_TAGVAR(ld_shlibs, $1)=no 8897 ;; 8898 *) 8899 # FIXME: insert proper C++ library support 8900 _LT_TAGVAR(ld_shlibs, $1)=no 8901 ;; 8902 esac 8903 ;; 8904 8905 vxworks*) 8906 # FIXME: insert proper C++ library support 8907 _LT_TAGVAR(ld_shlibs, $1)=no 8908 ;; 8909 8910 *) 8911 # FIXME: insert proper C++ library support 8912 _LT_TAGVAR(ld_shlibs, $1)=no 8913 ;; 8914 esac 8915 8916 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8917 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8918 8919 _LT_TAGVAR(GCC, $1)="$GXX" 8920 _LT_TAGVAR(LD, $1)="$LD" 8921 8922 ## CAVEAT EMPTOR: 8923 ## There is no encapsulation within the following macros, do not change 8924 ## the running order or otherwise move them around unless you know exactly 8925 ## what you are doing... 8926 _LT_SYS_HIDDEN_LIBDEPS($1) 8927 _LT_COMPILER_PIC($1) 8928 _LT_COMPILER_C_O($1) 8929 _LT_COMPILER_FILE_LOCKS($1) 8930 _LT_LINKER_SHLIBS($1) 8931 _LT_SYS_DYNAMIC_LINKER($1) 8932 _LT_LINKER_HARDCODE_LIBPATH($1) 8933 8934 _LT_CONFIG($1) 8935 fi # test -n "$compiler" 8936 8937 CC=$lt_save_CC 8938 LDCXX=$LD 8939 LD=$lt_save_LD 8940 GCC=$lt_save_GCC 8941 with_gnu_ld=$lt_save_with_gnu_ld 8942 lt_cv_path_LDCXX=$lt_cv_path_LD 8943 lt_cv_path_LD=$lt_save_path_LD 8944 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8945 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8946fi # test "$_lt_caught_CXX_error" != yes 8947 8948AC_LANG_POP 8949])# _LT_LANG_CXX_CONFIG 8950 8951 8952# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8953# --------------------------------- 8954# Figure out "hidden" library dependencies from verbose 8955# compiler output when linking a shared library. 8956# Parse the compiler output and extract the necessary 8957# objects, libraries and library flags. 8958m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8959[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8960# Dependencies to place before and after the object being linked: 8961_LT_TAGVAR(predep_objects, $1)= 8962_LT_TAGVAR(postdep_objects, $1)= 8963_LT_TAGVAR(predeps, $1)= 8964_LT_TAGVAR(postdeps, $1)= 8965_LT_TAGVAR(compiler_lib_search_path, $1)= 8966 8967dnl we can't use the lt_simple_compile_test_code here, 8968dnl because it contains code intended for an executable, 8969dnl not a library. It's possible we should let each 8970dnl tag define a new lt_????_link_test_code variable, 8971dnl but it's only used here... 8972m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8973int a; 8974void foo (void) { a = 0; } 8975_LT_EOF 8976], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8977class Foo 8978{ 8979public: 8980 Foo (void) { a = 0; } 8981private: 8982 int a; 8983}; 8984_LT_EOF 8985], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8986 subroutine foo 8987 implicit none 8988 integer*4 a 8989 a=0 8990 return 8991 end 8992_LT_EOF 8993], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8994 subroutine foo 8995 implicit none 8996 integer a 8997 a=0 8998 return 8999 end 9000_LT_EOF 9001], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 9002public class foo { 9003 private int a; 9004 public void bar (void) { 9005 a = 0; 9006 } 9007}; 9008_LT_EOF 9009]) 9010dnl Parse the compiler output and extract the necessary 9011dnl objects, libraries and library flags. 9012if AC_TRY_EVAL(ac_compile); then 9013 # Parse the compiler output and extract the necessary 9014 # objects, libraries and library flags. 9015 9016 # Sentinel used to keep track of whether or not we are before 9017 # the conftest object file. 9018 pre_test_object_deps_done=no 9019 9020 for p in `eval "$output_verbose_link_cmd"`; do 9021 case $p in 9022 9023 -L* | -R* | -l*) 9024 # Some compilers place space between "-{L,R}" and the path. 9025 # Remove the space. 9026 if test $p = "-L" || 9027 test $p = "-R"; then 9028 prev=$p 9029 continue 9030 else 9031 prev= 9032 fi 9033 9034 if test "$pre_test_object_deps_done" = no; then 9035 case $p in 9036 -L* | -R*) 9037 # Internal compiler library paths should come after those 9038 # provided the user. The postdeps already come after the 9039 # user supplied libs so there is no need to process them. 9040 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 9041 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 9042 else 9043 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 9044 fi 9045 ;; 9046 # The "-l" case would never come before the object being 9047 # linked, so don't bother handling this case. 9048 esac 9049 else 9050 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 9051 _LT_TAGVAR(postdeps, $1)="${prev}${p}" 9052 else 9053 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 9054 fi 9055 fi 9056 ;; 9057 9058 *.$objext) 9059 # This assumes that the test object file only shows up 9060 # once in the compiler output. 9061 if test "$p" = "conftest.$objext"; then 9062 pre_test_object_deps_done=yes 9063 continue 9064 fi 9065 9066 if test "$pre_test_object_deps_done" = no; then 9067 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 9068 _LT_TAGVAR(predep_objects, $1)="$p" 9069 else 9070 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 9071 fi 9072 else 9073 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 9074 _LT_TAGVAR(postdep_objects, $1)="$p" 9075 else 9076 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 9077 fi 9078 fi 9079 ;; 9080 9081 *) ;; # Ignore the rest. 9082 9083 esac 9084 done 9085 9086 # Clean up. 9087 rm -f a.out a.exe 9088else 9089 echo "libtool.m4: error: problem compiling $1 test program" 9090fi 9091 9092$RM -f confest.$objext 9093 9094# PORTME: override above test on systems where it is broken 9095m4_if([$1], [CXX], 9096[case $host_os in 9097interix[[3-9]]*) 9098 # Interix 3.5 installs completely hosed .la files for C++, so rather than 9099 # hack all around it, let's just trust "g++" to DTRT. 9100 _LT_TAGVAR(predep_objects,$1)= 9101 _LT_TAGVAR(postdep_objects,$1)= 9102 _LT_TAGVAR(postdeps,$1)= 9103 ;; 9104 9105linux*) 9106 case `$CC -V 2>&1 | sed 5q` in 9107 *Sun\ C*) 9108 # Sun C++ 5.9 9109 9110 # The more standards-conforming stlport4 library is 9111 # incompatible with the Cstd library. Avoid specifying 9112 # it if it's in CXXFLAGS. Ignore libCrun as 9113 # -library=stlport4 depends on it. 9114 case " $CXX $CXXFLAGS " in 9115 *" -library=stlport4 "*) 9116 solaris_use_stlport4=yes 9117 ;; 9118 esac 9119 9120 if test "$solaris_use_stlport4" != yes; then 9121 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9122 fi 9123 ;; 9124 esac 9125 ;; 9126 9127solaris*) 9128 case $cc_basename in 9129 CC* | sunCC*) 9130 # The more standards-conforming stlport4 library is 9131 # incompatible with the Cstd library. Avoid specifying 9132 # it if it's in CXXFLAGS. Ignore libCrun as 9133 # -library=stlport4 depends on it. 9134 case " $CXX $CXXFLAGS " in 9135 *" -library=stlport4 "*) 9136 solaris_use_stlport4=yes 9137 ;; 9138 esac 9139 9140 # Adding this requires a known-good setup of shared libraries for 9141 # Sun compiler versions before 5.6, else PIC objects from an old 9142 # archive will be linked into the output, leading to subtle bugs. 9143 if test "$solaris_use_stlport4" != yes; then 9144 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9145 fi 9146 ;; 9147 esac 9148 ;; 9149esac 9150]) 9151 9152case " $_LT_TAGVAR(postdeps, $1) " in 9153*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 9154esac 9155 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 9156if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 9157 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 9158fi 9159_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 9160 [The directories searched by this compiler when creating a shared library]) 9161_LT_TAGDECL([], [predep_objects], [1], 9162 [Dependencies to place before and after the objects being linked to 9163 create a shared library]) 9164_LT_TAGDECL([], [postdep_objects], [1]) 9165_LT_TAGDECL([], [predeps], [1]) 9166_LT_TAGDECL([], [postdeps], [1]) 9167_LT_TAGDECL([], [compiler_lib_search_path], [1], 9168 [The library search path used internally by the compiler when linking 9169 a shared library]) 9170])# _LT_SYS_HIDDEN_LIBDEPS 9171 9172 9173# _LT_LANG_F77_CONFIG([TAG]) 9174# -------------------------- 9175# Ensure that the configuration variables for a Fortran 77 compiler are 9176# suitably defined. These variables are subsequently used by _LT_CONFIG 9177# to write the compiler configuration to `libtool'. 9178m4_defun([_LT_LANG_F77_CONFIG], 9179[AC_LANG_PUSH(Fortran 77) 9180if test -z "$F77" || test "X$F77" = "Xno"; then 9181 _lt_disable_F77=yes 9182fi 9183 9184_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9185_LT_TAGVAR(allow_undefined_flag, $1)= 9186_LT_TAGVAR(always_export_symbols, $1)=no 9187_LT_TAGVAR(archive_expsym_cmds, $1)= 9188_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9189_LT_TAGVAR(hardcode_direct, $1)=no 9190_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9191_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9192_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9193_LT_TAGVAR(hardcode_libdir_separator, $1)= 9194_LT_TAGVAR(hardcode_minus_L, $1)=no 9195_LT_TAGVAR(hardcode_automatic, $1)=no 9196_LT_TAGVAR(inherit_rpath, $1)=no 9197_LT_TAGVAR(module_cmds, $1)= 9198_LT_TAGVAR(module_expsym_cmds, $1)= 9199_LT_TAGVAR(link_all_deplibs, $1)=unknown 9200_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9201_LT_TAGVAR(reload_flag, $1)=$reload_flag 9202_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9203_LT_TAGVAR(no_undefined_flag, $1)= 9204_LT_TAGVAR(whole_archive_flag_spec, $1)= 9205_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9206 9207# Source file extension for f77 test sources. 9208ac_ext=f 9209 9210# Object file extension for compiled f77 test sources. 9211objext=o 9212_LT_TAGVAR(objext, $1)=$objext 9213 9214# No sense in running all these tests if we already determined that 9215# the F77 compiler isn't working. Some variables (like enable_shared) 9216# are currently assumed to apply to all compilers on this platform, 9217# and will be corrupted by setting them based on a non-working compiler. 9218if test "$_lt_disable_F77" != yes; then 9219 # Code to be used in simple compile tests 9220 lt_simple_compile_test_code="\ 9221 subroutine t 9222 return 9223 end 9224" 9225 9226 # Code to be used in simple link tests 9227 lt_simple_link_test_code="\ 9228 program t 9229 end 9230" 9231 9232 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9233 _LT_TAG_COMPILER 9234 9235 # save warnings/boilerplate of simple test code 9236 _LT_COMPILER_BOILERPLATE 9237 _LT_LINKER_BOILERPLATE 9238 9239 # Allow CC to be a program name with arguments. 9240 lt_save_CC="$CC" 9241 lt_save_GCC=$GCC 9242 CC=${F77-"f77"} 9243 compiler=$CC 9244 _LT_TAGVAR(compiler, $1)=$CC 9245 _LT_CC_BASENAME([$compiler]) 9246 GCC=$G77 9247 if test -n "$compiler"; then 9248 AC_MSG_CHECKING([if libtool supports shared libraries]) 9249 AC_MSG_RESULT([$can_build_shared]) 9250 9251 AC_MSG_CHECKING([whether to build shared libraries]) 9252 test "$can_build_shared" = "no" && enable_shared=no 9253 9254 # On AIX, shared libraries and static libraries use the same namespace, and 9255 # are all built from PIC. 9256 case $host_os in 9257 aix3*) 9258 test "$enable_shared" = yes && enable_static=no 9259 if test -n "$RANLIB"; then 9260 archive_cmds="$archive_cmds~\$RANLIB \$lib" 9261 postinstall_cmds='$RANLIB $lib' 9262 fi 9263 ;; 9264 aix[[4-9]]*) 9265 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9266 test "$enable_shared" = yes && enable_static=no 9267 fi 9268 ;; 9269 esac 9270 AC_MSG_RESULT([$enable_shared]) 9271 9272 AC_MSG_CHECKING([whether to build static libraries]) 9273 # Make sure either enable_shared or enable_static is yes. 9274 test "$enable_shared" = yes || enable_static=yes 9275 AC_MSG_RESULT([$enable_static]) 9276 9277 _LT_TAGVAR(GCC, $1)="$G77" 9278 _LT_TAGVAR(LD, $1)="$LD" 9279 9280 ## CAVEAT EMPTOR: 9281 ## There is no encapsulation within the following macros, do not change 9282 ## the running order or otherwise move them around unless you know exactly 9283 ## what you are doing... 9284 _LT_COMPILER_PIC($1) 9285 _LT_COMPILER_C_O($1) 9286 _LT_COMPILER_FILE_LOCKS($1) 9287 _LT_LINKER_SHLIBS($1) 9288 _LT_SYS_DYNAMIC_LINKER($1) 9289 _LT_LINKER_HARDCODE_LIBPATH($1) 9290 9291 _LT_CONFIG($1) 9292 fi # test -n "$compiler" 9293 9294 GCC=$lt_save_GCC 9295 CC="$lt_save_CC" 9296fi # test "$_lt_disable_F77" != yes 9297 9298AC_LANG_POP 9299])# _LT_LANG_F77_CONFIG 9300 9301 9302# _LT_LANG_FC_CONFIG([TAG]) 9303# ------------------------- 9304# Ensure that the configuration variables for a Fortran compiler are 9305# suitably defined. These variables are subsequently used by _LT_CONFIG 9306# to write the compiler configuration to `libtool'. 9307m4_defun([_LT_LANG_FC_CONFIG], 9308[AC_LANG_PUSH(Fortran) 9309 9310if test -z "$FC" || test "X$FC" = "Xno"; then 9311 _lt_disable_FC=yes 9312fi 9313 9314_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9315_LT_TAGVAR(allow_undefined_flag, $1)= 9316_LT_TAGVAR(always_export_symbols, $1)=no 9317_LT_TAGVAR(archive_expsym_cmds, $1)= 9318_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9319_LT_TAGVAR(hardcode_direct, $1)=no 9320_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9321_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9322_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9323_LT_TAGVAR(hardcode_libdir_separator, $1)= 9324_LT_TAGVAR(hardcode_minus_L, $1)=no 9325_LT_TAGVAR(hardcode_automatic, $1)=no 9326_LT_TAGVAR(inherit_rpath, $1)=no 9327_LT_TAGVAR(module_cmds, $1)= 9328_LT_TAGVAR(module_expsym_cmds, $1)= 9329_LT_TAGVAR(link_all_deplibs, $1)=unknown 9330_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9331_LT_TAGVAR(reload_flag, $1)=$reload_flag 9332_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9333_LT_TAGVAR(no_undefined_flag, $1)= 9334_LT_TAGVAR(whole_archive_flag_spec, $1)= 9335_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9336 9337# Source file extension for fc test sources. 9338ac_ext=${ac_fc_srcext-f} 9339 9340# Object file extension for compiled fc test sources. 9341objext=o 9342_LT_TAGVAR(objext, $1)=$objext 9343 9344# No sense in running all these tests if we already determined that 9345# the FC compiler isn't working. Some variables (like enable_shared) 9346# are currently assumed to apply to all compilers on this platform, 9347# and will be corrupted by setting them based on a non-working compiler. 9348if test "$_lt_disable_FC" != yes; then 9349 # Code to be used in simple compile tests 9350 lt_simple_compile_test_code="\ 9351 subroutine t 9352 return 9353 end 9354" 9355 9356 # Code to be used in simple link tests 9357 lt_simple_link_test_code="\ 9358 program t 9359 end 9360" 9361 9362 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9363 _LT_TAG_COMPILER 9364 9365 # save warnings/boilerplate of simple test code 9366 _LT_COMPILER_BOILERPLATE 9367 _LT_LINKER_BOILERPLATE 9368 9369 # Allow CC to be a program name with arguments. 9370 lt_save_CC="$CC" 9371 lt_save_GCC=$GCC 9372 CC=${FC-"f95"} 9373 compiler=$CC 9374 GCC=$ac_cv_fc_compiler_gnu 9375 9376 _LT_TAGVAR(compiler, $1)=$CC 9377 _LT_CC_BASENAME([$compiler]) 9378 9379 if test -n "$compiler"; then 9380 AC_MSG_CHECKING([if libtool supports shared libraries]) 9381 AC_MSG_RESULT([$can_build_shared]) 9382 9383 AC_MSG_CHECKING([whether to build shared libraries]) 9384 test "$can_build_shared" = "no" && enable_shared=no 9385 9386 # On AIX, shared libraries and static libraries use the same namespace, and 9387 # are all built from PIC. 9388 case $host_os in 9389 aix3*) 9390 test "$enable_shared" = yes && enable_static=no 9391 if test -n "$RANLIB"; then 9392 archive_cmds="$archive_cmds~\$RANLIB \$lib" 9393 postinstall_cmds='$RANLIB $lib' 9394 fi 9395 ;; 9396 aix[[4-9]]*) 9397 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9398 test "$enable_shared" = yes && enable_static=no 9399 fi 9400 ;; 9401 esac 9402 AC_MSG_RESULT([$enable_shared]) 9403 9404 AC_MSG_CHECKING([whether to build static libraries]) 9405 # Make sure either enable_shared or enable_static is yes. 9406 test "$enable_shared" = yes || enable_static=yes 9407 AC_MSG_RESULT([$enable_static]) 9408 9409 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 9410 _LT_TAGVAR(LD, $1)="$LD" 9411 9412 ## CAVEAT EMPTOR: 9413 ## There is no encapsulation within the following macros, do not change 9414 ## the running order or otherwise move them around unless you know exactly 9415 ## what you are doing... 9416 _LT_SYS_HIDDEN_LIBDEPS($1) 9417 _LT_COMPILER_PIC($1) 9418 _LT_COMPILER_C_O($1) 9419 _LT_COMPILER_FILE_LOCKS($1) 9420 _LT_LINKER_SHLIBS($1) 9421 _LT_SYS_DYNAMIC_LINKER($1) 9422 _LT_LINKER_HARDCODE_LIBPATH($1) 9423 9424 _LT_CONFIG($1) 9425 fi # test -n "$compiler" 9426 9427 GCC=$lt_save_GCC 9428 CC="$lt_save_CC" 9429fi # test "$_lt_disable_FC" != yes 9430 9431AC_LANG_POP 9432])# _LT_LANG_FC_CONFIG 9433 9434 9435# _LT_LANG_GCJ_CONFIG([TAG]) 9436# -------------------------- 9437# Ensure that the configuration variables for the GNU Java Compiler compiler 9438# are suitably defined. These variables are subsequently used by _LT_CONFIG 9439# to write the compiler configuration to `libtool'. 9440m4_defun([_LT_LANG_GCJ_CONFIG], 9441[AC_REQUIRE([LT_PROG_GCJ])dnl 9442AC_LANG_SAVE 9443 9444# Source file extension for Java test sources. 9445ac_ext=java 9446 9447# Object file extension for compiled Java test sources. 9448objext=o 9449_LT_TAGVAR(objext, $1)=$objext 9450 9451# Code to be used in simple compile tests 9452lt_simple_compile_test_code="class foo {}" 9453 9454# Code to be used in simple link tests 9455lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 9456 9457# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9458_LT_TAG_COMPILER 9459 9460# save warnings/boilerplate of simple test code 9461_LT_COMPILER_BOILERPLATE 9462_LT_LINKER_BOILERPLATE 9463 9464# Allow CC to be a program name with arguments. 9465lt_save_CC="$CC" 9466lt_save_GCC=$GCC 9467GCC=yes 9468CC=${GCJ-"gcj"} 9469compiler=$CC 9470_LT_TAGVAR(compiler, $1)=$CC 9471_LT_TAGVAR(LD, $1)="$LD" 9472_LT_CC_BASENAME([$compiler]) 9473 9474# GCJ did not exist at the time GCC didn't implicitly link libc in. 9475_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9476 9477_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9478_LT_TAGVAR(reload_flag, $1)=$reload_flag 9479_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9480 9481if test -n "$compiler"; then 9482 _LT_COMPILER_NO_RTTI($1) 9483 _LT_COMPILER_PIC($1) 9484 _LT_COMPILER_C_O($1) 9485 _LT_COMPILER_FILE_LOCKS($1) 9486 _LT_LINKER_SHLIBS($1) 9487 _LT_LINKER_HARDCODE_LIBPATH($1) 9488 9489 _LT_CONFIG($1) 9490fi 9491 9492AC_LANG_RESTORE 9493 9494GCC=$lt_save_GCC 9495CC="$lt_save_CC" 9496])# _LT_LANG_GCJ_CONFIG 9497 9498 9499# _LT_LANG_RC_CONFIG([TAG]) 9500# ------------------------- 9501# Ensure that the configuration variables for the Windows resource compiler 9502# are suitably defined. These variables are subsequently used by _LT_CONFIG 9503# to write the compiler configuration to `libtool'. 9504m4_defun([_LT_LANG_RC_CONFIG], 9505[AC_REQUIRE([LT_PROG_RC])dnl 9506AC_LANG_SAVE 9507 9508# Source file extension for RC test sources. 9509ac_ext=rc 9510 9511# Object file extension for compiled RC test sources. 9512objext=o 9513_LT_TAGVAR(objext, $1)=$objext 9514 9515# Code to be used in simple compile tests 9516lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 9517 9518# Code to be used in simple link tests 9519lt_simple_link_test_code="$lt_simple_compile_test_code" 9520 9521# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9522_LT_TAG_COMPILER 9523 9524# save warnings/boilerplate of simple test code 9525_LT_COMPILER_BOILERPLATE 9526_LT_LINKER_BOILERPLATE 9527 9528# Allow CC to be a program name with arguments. 9529lt_save_CC="$CC" 9530lt_save_GCC=$GCC 9531GCC= 9532CC=${RC-"windres"} 9533compiler=$CC 9534_LT_TAGVAR(compiler, $1)=$CC 9535_LT_CC_BASENAME([$compiler]) 9536_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 9537 9538if test -n "$compiler"; then 9539 : 9540 _LT_CONFIG($1) 9541fi 9542 9543GCC=$lt_save_GCC 9544AC_LANG_RESTORE 9545CC="$lt_save_CC" 9546])# _LT_LANG_RC_CONFIG 9547 9548 9549# LT_PROG_GCJ 9550# ----------- 9551AC_DEFUN([LT_PROG_GCJ], 9552[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 9553 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 9554 [AC_CHECK_TOOL(GCJ, gcj,) 9555 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 9556 AC_SUBST(GCJFLAGS)])])[]dnl 9557]) 9558 9559# Old name: 9560AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 9561dnl aclocal-1.4 backwards compatibility: 9562dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 9563 9564 9565# LT_PROG_RC 9566# ---------- 9567AC_DEFUN([LT_PROG_RC], 9568[AC_CHECK_TOOL(RC, windres,) 9569]) 9570 9571# Old name: 9572AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 9573dnl aclocal-1.4 backwards compatibility: 9574dnl AC_DEFUN([LT_AC_PROG_RC], []) 9575 9576 9577# _LT_DECL_EGREP 9578# -------------- 9579# If we don't have a new enough Autoconf to choose the best grep 9580# available, choose the one first in the user's PATH. 9581m4_defun([_LT_DECL_EGREP], 9582[AC_REQUIRE([AC_PROG_EGREP])dnl 9583AC_REQUIRE([AC_PROG_FGREP])dnl 9584test -z "$GREP" && GREP=grep 9585_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 9586_LT_DECL([], [EGREP], [1], [An ERE matcher]) 9587_LT_DECL([], [FGREP], [1], [A literal string matcher]) 9588dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 9589AC_SUBST([GREP]) 9590]) 9591 9592 9593# _LT_DECL_OBJDUMP 9594# -------------- 9595# If we don't have a new enough Autoconf to choose the best objdump 9596# available, choose the one first in the user's PATH. 9597m4_defun([_LT_DECL_OBJDUMP], 9598[AC_CHECK_TOOL(OBJDUMP, objdump, false) 9599test -z "$OBJDUMP" && OBJDUMP=objdump 9600_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 9601AC_SUBST([OBJDUMP]) 9602]) 9603 9604 9605# _LT_DECL_SED 9606# ------------ 9607# Check for a fully-functional sed program, that truncates 9608# as few characters as possible. Prefer GNU sed if found. 9609m4_defun([_LT_DECL_SED], 9610[AC_PROG_SED 9611test -z "$SED" && SED=sed 9612Xsed="$SED -e 1s/^X//" 9613_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 9614_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 9615 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 9616])# _LT_DECL_SED 9617 9618m4_ifndef([AC_PROG_SED], [ 9619# NOTE: This macro has been submitted for inclusion into # 9620# GNU Autoconf as AC_PROG_SED. When it is available in # 9621# a released version of Autoconf we should remove this # 9622# macro and use it instead. # 9623 9624m4_defun([AC_PROG_SED], 9625[AC_MSG_CHECKING([for a sed that does not truncate output]) 9626AC_CACHE_VAL(lt_cv_path_SED, 9627[# Loop through the user's path and test for sed and gsed. 9628# Then use that list of sed's as ones to test for truncation. 9629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9630for as_dir in $PATH 9631do 9632 IFS=$as_save_IFS 9633 test -z "$as_dir" && as_dir=. 9634 for lt_ac_prog in sed gsed; do 9635 for ac_exec_ext in '' $ac_executable_extensions; do 9636 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 9637 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 9638 fi 9639 done 9640 done 9641done 9642IFS=$as_save_IFS 9643lt_ac_max=0 9644lt_ac_count=0 9645# Add /usr/xpg4/bin/sed as it is typically found on Solaris 9646# along with /bin/sed that truncates output. 9647for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 9648 test ! -f $lt_ac_sed && continue 9649 cat /dev/null > conftest.in 9650 lt_ac_count=0 9651 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 9652 # Check for GNU sed and select it if it is found. 9653 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 9654 lt_cv_path_SED=$lt_ac_sed 9655 break 9656 fi 9657 while true; do 9658 cat conftest.in conftest.in >conftest.tmp 9659 mv conftest.tmp conftest.in 9660 cp conftest.in conftest.nl 9661 echo >>conftest.nl 9662 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 9663 cmp -s conftest.out conftest.nl || break 9664 # 10000 chars as input seems more than enough 9665 test $lt_ac_count -gt 10 && break 9666 lt_ac_count=`expr $lt_ac_count + 1` 9667 if test $lt_ac_count -gt $lt_ac_max; then 9668 lt_ac_max=$lt_ac_count 9669 lt_cv_path_SED=$lt_ac_sed 9670 fi 9671 done 9672done 9673]) 9674SED=$lt_cv_path_SED 9675AC_SUBST([SED]) 9676AC_MSG_RESULT([$SED]) 9677])#AC_PROG_SED 9678])#m4_ifndef 9679 9680# Old name: 9681AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 9682dnl aclocal-1.4 backwards compatibility: 9683dnl AC_DEFUN([LT_AC_PROG_SED], []) 9684 9685 9686# _LT_CHECK_SHELL_FEATURES 9687# ------------------------ 9688# Find out whether the shell is Bourne or XSI compatible, 9689# or has some other useful features. 9690m4_defun([_LT_CHECK_SHELL_FEATURES], 9691[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 9692# Try some XSI features 9693xsi_shell=no 9694( _lt_dummy="a/b/c" 9695 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 9696 = c,a/b,, \ 9697 && eval 'test $(( 1 + 1 )) -eq 2 \ 9698 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 9699 && xsi_shell=yes 9700AC_MSG_RESULT([$xsi_shell]) 9701_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 9702 9703AC_MSG_CHECKING([whether the shell understands "+="]) 9704lt_shell_append=no 9705( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 9706 >/dev/null 2>&1 \ 9707 && lt_shell_append=yes 9708AC_MSG_RESULT([$lt_shell_append]) 9709_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 9710 9711if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 9712 lt_unset=unset 9713else 9714 lt_unset=false 9715fi 9716_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 9717 9718# test EBCDIC or ASCII 9719case `echo X|tr X '\101'` in 9720 A) # ASCII based system 9721 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 9722 lt_SP2NL='tr \040 \012' 9723 lt_NL2SP='tr \015\012 \040\040' 9724 ;; 9725 *) # EBCDIC based system 9726 lt_SP2NL='tr \100 \n' 9727 lt_NL2SP='tr \r\n \100\100' 9728 ;; 9729esac 9730_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 9731_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 9732])# _LT_CHECK_SHELL_FEATURES 9733 9734 9735# _LT_PROG_XSI_SHELLFNS 9736# --------------------- 9737# Bourne and XSI compatible variants of some useful shell functions. 9738m4_defun([_LT_PROG_XSI_SHELLFNS], 9739[case $xsi_shell in 9740 yes) 9741 cat << \_LT_EOF >> "$cfgfile" 9742 9743# func_dirname file append nondir_replacement 9744# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9745# otherwise set result to NONDIR_REPLACEMENT. 9746func_dirname () 9747{ 9748 case ${1} in 9749 */*) func_dirname_result="${1%/*}${2}" ;; 9750 * ) func_dirname_result="${3}" ;; 9751 esac 9752} 9753 9754# func_basename file 9755func_basename () 9756{ 9757 func_basename_result="${1##*/}" 9758} 9759 9760# func_dirname_and_basename file append nondir_replacement 9761# perform func_basename and func_dirname in a single function 9762# call: 9763# dirname: Compute the dirname of FILE. If nonempty, 9764# add APPEND to the result, otherwise set result 9765# to NONDIR_REPLACEMENT. 9766# value returned in "$func_dirname_result" 9767# basename: Compute filename of FILE. 9768# value retuned in "$func_basename_result" 9769# Implementation must be kept synchronized with func_dirname 9770# and func_basename. For efficiency, we do not delegate to 9771# those functions but instead duplicate the functionality here. 9772func_dirname_and_basename () 9773{ 9774 case ${1} in 9775 */*) func_dirname_result="${1%/*}${2}" ;; 9776 * ) func_dirname_result="${3}" ;; 9777 esac 9778 func_basename_result="${1##*/}" 9779} 9780 9781# func_stripname prefix suffix name 9782# strip PREFIX and SUFFIX off of NAME. 9783# PREFIX and SUFFIX must not contain globbing or regex special 9784# characters, hashes, percent signs, but SUFFIX may contain a leading 9785# dot (in which case that matches only a dot). 9786func_stripname () 9787{ 9788 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 9789 # positional parameters, so assign one to ordinary parameter first. 9790 func_stripname_result=${3} 9791 func_stripname_result=${func_stripname_result#"${1}"} 9792 func_stripname_result=${func_stripname_result%"${2}"} 9793} 9794 9795# func_opt_split 9796func_opt_split () 9797{ 9798 func_opt_split_opt=${1%%=*} 9799 func_opt_split_arg=${1#*=} 9800} 9801 9802# func_lo2o object 9803func_lo2o () 9804{ 9805 case ${1} in 9806 *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9807 *) func_lo2o_result=${1} ;; 9808 esac 9809} 9810 9811# func_xform libobj-or-source 9812func_xform () 9813{ 9814 func_xform_result=${1%.*}.lo 9815} 9816 9817# func_arith arithmetic-term... 9818func_arith () 9819{ 9820 func_arith_result=$(( $[*] )) 9821} 9822 9823# func_len string 9824# STRING may not start with a hyphen. 9825func_len () 9826{ 9827 func_len_result=${#1} 9828} 9829 9830_LT_EOF 9831 ;; 9832 *) # Bourne compatible functions. 9833 cat << \_LT_EOF >> "$cfgfile" 9834 9835# func_dirname file append nondir_replacement 9836# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9837# otherwise set result to NONDIR_REPLACEMENT. 9838func_dirname () 9839{ 9840 # Extract subdirectory from the argument. 9841 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` 9842 if test "X$func_dirname_result" = "X${1}"; then 9843 func_dirname_result="${3}" 9844 else 9845 func_dirname_result="$func_dirname_result${2}" 9846 fi 9847} 9848 9849# func_basename file 9850func_basename () 9851{ 9852 func_basename_result=`$ECHO "${1}" | $SED "$basename"` 9853} 9854 9855dnl func_dirname_and_basename 9856dnl A portable version of this function is already defined in general.m4sh 9857dnl so there is no need for it here. 9858 9859# func_stripname prefix suffix name 9860# strip PREFIX and SUFFIX off of NAME. 9861# PREFIX and SUFFIX must not contain globbing or regex special 9862# characters, hashes, percent signs, but SUFFIX may contain a leading 9863# dot (in which case that matches only a dot). 9864# func_strip_suffix prefix name 9865func_stripname () 9866{ 9867 case ${2} in 9868 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 9869 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 9870 esac 9871} 9872 9873# sed scripts: 9874my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 9875my_sed_long_arg='1s/^-[[^=]]*=//' 9876 9877# func_opt_split 9878func_opt_split () 9879{ 9880 func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` 9881 func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` 9882} 9883 9884# func_lo2o object 9885func_lo2o () 9886{ 9887 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` 9888} 9889 9890# func_xform libobj-or-source 9891func_xform () 9892{ 9893 func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` 9894} 9895 9896# func_arith arithmetic-term... 9897func_arith () 9898{ 9899 func_arith_result=`expr "$[@]"` 9900} 9901 9902# func_len string 9903# STRING may not start with a hyphen. 9904func_len () 9905{ 9906 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 9907} 9908 9909_LT_EOF 9910esac 9911 9912case $lt_shell_append in 9913 yes) 9914 cat << \_LT_EOF >> "$cfgfile" 9915 9916# func_append var value 9917# Append VALUE to the end of shell variable VAR. 9918func_append () 9919{ 9920 eval "$[1]+=\$[2]" 9921} 9922_LT_EOF 9923 ;; 9924 *) 9925 cat << \_LT_EOF >> "$cfgfile" 9926 9927# func_append var value 9928# Append VALUE to the end of shell variable VAR. 9929func_append () 9930{ 9931 eval "$[1]=\$$[1]\$[2]" 9932} 9933 9934_LT_EOF 9935 ;; 9936 esac 9937]) 9938 9939# Helper functions for option handling. -*- Autoconf -*- 9940# 9941# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9942# Inc. 9943# Written by Gary V. Vaughan, 2004 9944# 9945# This file is free software; the Free Software Foundation gives 9946# unlimited permission to copy and/or distribute it, with or without 9947# modifications, as long as this notice is preserved. 9948 9949# serial 7 ltoptions.m4 9950 9951# This is to help aclocal find these macros, as it can't see m4_define. 9952AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9953 9954 9955# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9956# ------------------------------------------ 9957m4_define([_LT_MANGLE_OPTION], 9958[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9959 9960 9961# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9962# --------------------------------------- 9963# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9964# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9965# saved as a flag. 9966m4_define([_LT_SET_OPTION], 9967[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9968m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9969 _LT_MANGLE_DEFUN([$1], [$2]), 9970 [m4_warning([Unknown $1 option `$2'])])[]dnl 9971]) 9972 9973 9974# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9975# ------------------------------------------------------------ 9976# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9977m4_define([_LT_IF_OPTION], 9978[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9979 9980 9981# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9982# ------------------------------------------------------- 9983# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9984# are set. 9985m4_define([_LT_UNLESS_OPTIONS], 9986[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9987 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9988 [m4_define([$0_found])])])[]dnl 9989m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9990])[]dnl 9991]) 9992 9993 9994# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9995# ---------------------------------------- 9996# OPTION-LIST is a space-separated list of Libtool options associated 9997# with MACRO-NAME. If any OPTION has a matching handler declared with 9998# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9999# the unknown option and exit. 10000m4_defun([_LT_SET_OPTIONS], 10001[# Set options 10002m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 10003 [_LT_SET_OPTION([$1], _LT_Option)]) 10004 10005m4_if([$1],[LT_INIT],[ 10006 dnl 10007 dnl Simply set some default values (i.e off) if boolean options were not 10008 dnl specified: 10009 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 10010 ]) 10011 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 10012 ]) 10013 dnl 10014 dnl If no reference was made to various pairs of opposing options, then 10015 dnl we run the default mode handler for the pair. For example, if neither 10016 dnl `shared' nor `disable-shared' was passed, we enable building of shared 10017 dnl archives by default: 10018 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 10019 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 10020 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 10021 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 10022 [_LT_ENABLE_FAST_INSTALL]) 10023 ]) 10024])# _LT_SET_OPTIONS 10025 10026 10027 10028# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 10029# ----------------------------------------- 10030m4_define([_LT_MANGLE_DEFUN], 10031[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 10032 10033 10034# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 10035# ----------------------------------------------- 10036m4_define([LT_OPTION_DEFINE], 10037[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 10038])# LT_OPTION_DEFINE 10039 10040 10041# dlopen 10042# ------ 10043LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 10044]) 10045 10046AU_DEFUN([AC_LIBTOOL_DLOPEN], 10047[_LT_SET_OPTION([LT_INIT], [dlopen]) 10048AC_DIAGNOSE([obsolete], 10049[$0: Remove this warning and the call to _LT_SET_OPTION when you 10050put the `dlopen' option into LT_INIT's first parameter.]) 10051]) 10052 10053dnl aclocal-1.4 backwards compatibility: 10054dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 10055 10056 10057# win32-dll 10058# --------- 10059# Declare package support for building win32 dll's. 10060LT_OPTION_DEFINE([LT_INIT], [win32-dll], 10061[enable_win32_dll=yes 10062 10063case $host in 10064*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 10065 AC_CHECK_TOOL(AS, as, false) 10066 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 10067 AC_CHECK_TOOL(OBJDUMP, objdump, false) 10068 ;; 10069esac 10070 10071test -z "$AS" && AS=as 10072_LT_DECL([], [AS], [1], [Assembler program])dnl 10073 10074test -z "$DLLTOOL" && DLLTOOL=dlltool 10075_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 10076 10077test -z "$OBJDUMP" && OBJDUMP=objdump 10078_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 10079])# win32-dll 10080 10081AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 10082[AC_REQUIRE([AC_CANONICAL_HOST])dnl 10083_LT_SET_OPTION([LT_INIT], [win32-dll]) 10084AC_DIAGNOSE([obsolete], 10085[$0: Remove this warning and the call to _LT_SET_OPTION when you 10086put the `win32-dll' option into LT_INIT's first parameter.]) 10087]) 10088 10089dnl aclocal-1.4 backwards compatibility: 10090dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 10091 10092 10093# _LT_ENABLE_SHARED([DEFAULT]) 10094# ---------------------------- 10095# implement the --enable-shared flag, and supports the `shared' and 10096# `disable-shared' LT_INIT options. 10097# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10098m4_define([_LT_ENABLE_SHARED], 10099[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 10100AC_ARG_ENABLE([shared], 10101 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 10102 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 10103 [p=${PACKAGE-default} 10104 case $enableval in 10105 yes) enable_shared=yes ;; 10106 no) enable_shared=no ;; 10107 *) 10108 enable_shared=no 10109 # Look at the argument we got. We use all the common list separators. 10110 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10111 for pkg in $enableval; do 10112 IFS="$lt_save_ifs" 10113 if test "X$pkg" = "X$p"; then 10114 enable_shared=yes 10115 fi 10116 done 10117 IFS="$lt_save_ifs" 10118 ;; 10119 esac], 10120 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 10121 10122 _LT_DECL([build_libtool_libs], [enable_shared], [0], 10123 [Whether or not to build shared libraries]) 10124])# _LT_ENABLE_SHARED 10125 10126LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 10127LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 10128 10129# Old names: 10130AC_DEFUN([AC_ENABLE_SHARED], 10131[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 10132]) 10133 10134AC_DEFUN([AC_DISABLE_SHARED], 10135[_LT_SET_OPTION([LT_INIT], [disable-shared]) 10136]) 10137 10138AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 10139AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 10140 10141dnl aclocal-1.4 backwards compatibility: 10142dnl AC_DEFUN([AM_ENABLE_SHARED], []) 10143dnl AC_DEFUN([AM_DISABLE_SHARED], []) 10144 10145 10146 10147# _LT_ENABLE_STATIC([DEFAULT]) 10148# ---------------------------- 10149# implement the --enable-static flag, and support the `static' and 10150# `disable-static' LT_INIT options. 10151# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10152m4_define([_LT_ENABLE_STATIC], 10153[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 10154AC_ARG_ENABLE([static], 10155 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 10156 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 10157 [p=${PACKAGE-default} 10158 case $enableval in 10159 yes) enable_static=yes ;; 10160 no) enable_static=no ;; 10161 *) 10162 enable_static=no 10163 # Look at the argument we got. We use all the common list separators. 10164 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10165 for pkg in $enableval; do 10166 IFS="$lt_save_ifs" 10167 if test "X$pkg" = "X$p"; then 10168 enable_static=yes 10169 fi 10170 done 10171 IFS="$lt_save_ifs" 10172 ;; 10173 esac], 10174 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 10175 10176 _LT_DECL([build_old_libs], [enable_static], [0], 10177 [Whether or not to build static libraries]) 10178])# _LT_ENABLE_STATIC 10179 10180LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 10181LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 10182 10183# Old names: 10184AC_DEFUN([AC_ENABLE_STATIC], 10185[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 10186]) 10187 10188AC_DEFUN([AC_DISABLE_STATIC], 10189[_LT_SET_OPTION([LT_INIT], [disable-static]) 10190]) 10191 10192AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 10193AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 10194 10195dnl aclocal-1.4 backwards compatibility: 10196dnl AC_DEFUN([AM_ENABLE_STATIC], []) 10197dnl AC_DEFUN([AM_DISABLE_STATIC], []) 10198 10199 10200 10201# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 10202# ---------------------------------- 10203# implement the --enable-fast-install flag, and support the `fast-install' 10204# and `disable-fast-install' LT_INIT options. 10205# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10206m4_define([_LT_ENABLE_FAST_INSTALL], 10207[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 10208AC_ARG_ENABLE([fast-install], 10209 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 10210 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 10211 [p=${PACKAGE-default} 10212 case $enableval in 10213 yes) enable_fast_install=yes ;; 10214 no) enable_fast_install=no ;; 10215 *) 10216 enable_fast_install=no 10217 # Look at the argument we got. We use all the common list separators. 10218 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10219 for pkg in $enableval; do 10220 IFS="$lt_save_ifs" 10221 if test "X$pkg" = "X$p"; then 10222 enable_fast_install=yes 10223 fi 10224 done 10225 IFS="$lt_save_ifs" 10226 ;; 10227 esac], 10228 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 10229 10230_LT_DECL([fast_install], [enable_fast_install], [0], 10231 [Whether or not to optimize for fast installation])dnl 10232])# _LT_ENABLE_FAST_INSTALL 10233 10234LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 10235LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 10236 10237# Old names: 10238AU_DEFUN([AC_ENABLE_FAST_INSTALL], 10239[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 10240AC_DIAGNOSE([obsolete], 10241[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10242the `fast-install' option into LT_INIT's first parameter.]) 10243]) 10244 10245AU_DEFUN([AC_DISABLE_FAST_INSTALL], 10246[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 10247AC_DIAGNOSE([obsolete], 10248[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10249the `disable-fast-install' option into LT_INIT's first parameter.]) 10250]) 10251 10252dnl aclocal-1.4 backwards compatibility: 10253dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 10254dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 10255 10256 10257# _LT_WITH_PIC([MODE]) 10258# -------------------- 10259# implement the --with-pic flag, and support the `pic-only' and `no-pic' 10260# LT_INIT options. 10261# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 10262m4_define([_LT_WITH_PIC], 10263[AC_ARG_WITH([pic], 10264 [AS_HELP_STRING([--with-pic], 10265 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 10266 [pic_mode="$withval"], 10267 [pic_mode=default]) 10268 10269test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 10270 10271_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 10272])# _LT_WITH_PIC 10273 10274LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 10275LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 10276 10277# Old name: 10278AU_DEFUN([AC_LIBTOOL_PICMODE], 10279[_LT_SET_OPTION([LT_INIT], [pic-only]) 10280AC_DIAGNOSE([obsolete], 10281[$0: Remove this warning and the call to _LT_SET_OPTION when you 10282put the `pic-only' option into LT_INIT's first parameter.]) 10283]) 10284 10285dnl aclocal-1.4 backwards compatibility: 10286dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 10287 10288 10289m4_define([_LTDL_MODE], []) 10290LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 10291 [m4_define([_LTDL_MODE], [nonrecursive])]) 10292LT_OPTION_DEFINE([LTDL_INIT], [recursive], 10293 [m4_define([_LTDL_MODE], [recursive])]) 10294LT_OPTION_DEFINE([LTDL_INIT], [subproject], 10295 [m4_define([_LTDL_MODE], [subproject])]) 10296 10297m4_define([_LTDL_TYPE], []) 10298LT_OPTION_DEFINE([LTDL_INIT], [installable], 10299 [m4_define([_LTDL_TYPE], [installable])]) 10300LT_OPTION_DEFINE([LTDL_INIT], [convenience], 10301 [m4_define([_LTDL_TYPE], [convenience])]) 10302 10303# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 10304# 10305# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 10306# Written by Gary V. Vaughan, 2004 10307# 10308# This file is free software; the Free Software Foundation gives 10309# unlimited permission to copy and/or distribute it, with or without 10310# modifications, as long as this notice is preserved. 10311 10312# serial 6 ltsugar.m4 10313 10314# This is to help aclocal find these macros, as it can't see m4_define. 10315AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 10316 10317 10318# lt_join(SEP, ARG1, [ARG2...]) 10319# ----------------------------- 10320# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 10321# associated separator. 10322# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 10323# versions in m4sugar had bugs. 10324m4_define([lt_join], 10325[m4_if([$#], [1], [], 10326 [$#], [2], [[$2]], 10327 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 10328m4_define([_lt_join], 10329[m4_if([$#$2], [2], [], 10330 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 10331 10332 10333# lt_car(LIST) 10334# lt_cdr(LIST) 10335# ------------ 10336# Manipulate m4 lists. 10337# These macros are necessary as long as will still need to support 10338# Autoconf-2.59 which quotes differently. 10339m4_define([lt_car], [[$1]]) 10340m4_define([lt_cdr], 10341[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 10342 [$#], 1, [], 10343 [m4_dquote(m4_shift($@))])]) 10344m4_define([lt_unquote], $1) 10345 10346 10347# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 10348# ------------------------------------------ 10349# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 10350# Note that neither SEPARATOR nor STRING are expanded; they are appended 10351# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 10352# No SEPARATOR is output if MACRO-NAME was previously undefined (different 10353# than defined and empty). 10354# 10355# This macro is needed until we can rely on Autoconf 2.62, since earlier 10356# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 10357m4_define([lt_append], 10358[m4_define([$1], 10359 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 10360 10361 10362 10363# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 10364# ---------------------------------------------------------- 10365# Produce a SEP delimited list of all paired combinations of elements of 10366# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 10367# has the form PREFIXmINFIXSUFFIXn. 10368# Needed until we can rely on m4_combine added in Autoconf 2.62. 10369m4_define([lt_combine], 10370[m4_if(m4_eval([$# > 3]), [1], 10371 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 10372[[m4_foreach([_Lt_prefix], [$2], 10373 [m4_foreach([_Lt_suffix], 10374 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 10375 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 10376 10377 10378# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 10379# ----------------------------------------------------------------------- 10380# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 10381# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 10382m4_define([lt_if_append_uniq], 10383[m4_ifdef([$1], 10384 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 10385 [lt_append([$1], [$2], [$3])$4], 10386 [$5])], 10387 [lt_append([$1], [$2], [$3])$4])]) 10388 10389 10390# lt_dict_add(DICT, KEY, VALUE) 10391# ----------------------------- 10392m4_define([lt_dict_add], 10393[m4_define([$1($2)], [$3])]) 10394 10395 10396# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 10397# -------------------------------------------- 10398m4_define([lt_dict_add_subkey], 10399[m4_define([$1($2:$3)], [$4])]) 10400 10401 10402# lt_dict_fetch(DICT, KEY, [SUBKEY]) 10403# ---------------------------------- 10404m4_define([lt_dict_fetch], 10405[m4_ifval([$3], 10406 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 10407 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 10408 10409 10410# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 10411# ----------------------------------------------------------------- 10412m4_define([lt_if_dict_fetch], 10413[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 10414 [$5], 10415 [$6])]) 10416 10417 10418# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 10419# -------------------------------------------------------------- 10420m4_define([lt_dict_filter], 10421[m4_if([$5], [], [], 10422 [lt_join(m4_quote(m4_default([$4], [[, ]])), 10423 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 10424 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 10425]) 10426 10427# ltversion.m4 -- version numbers -*- Autoconf -*- 10428# 10429# Copyright (C) 2004 Free Software Foundation, Inc. 10430# Written by Scott James Remnant, 2004 10431# 10432# This file is free software; the Free Software Foundation gives 10433# unlimited permission to copy and/or distribute it, with or without 10434# modifications, as long as this notice is preserved. 10435 10436# Generated from ltversion.in. 10437 10438# serial 3175 ltversion.m4 10439# This file is part of GNU Libtool 10440 10441m4_define([LT_PACKAGE_VERSION], [2.2.10]) 10442m4_define([LT_PACKAGE_REVISION], [1.3175]) 10443 10444AC_DEFUN([LTVERSION_VERSION], 10445[macro_version='2.2.10' 10446macro_revision='1.3175' 10447_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 10448_LT_DECL(, macro_revision, 0) 10449]) 10450 10451# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 10452# 10453# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 10454# Written by Scott James Remnant, 2004. 10455# 10456# This file is free software; the Free Software Foundation gives 10457# unlimited permission to copy and/or distribute it, with or without 10458# modifications, as long as this notice is preserved. 10459 10460# serial 5 lt~obsolete.m4 10461 10462# These exist entirely to fool aclocal when bootstrapping libtool. 10463# 10464# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 10465# which have later been changed to m4_define as they aren't part of the 10466# exported API, or moved to Autoconf or Automake where they belong. 10467# 10468# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 10469# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 10470# using a macro with the same name in our local m4/libtool.m4 it'll 10471# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 10472# and doesn't know about Autoconf macros at all.) 10473# 10474# So we provide this file, which has a silly filename so it's always 10475# included after everything else. This provides aclocal with the 10476# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 10477# because those macros already exist, or will be overwritten later. 10478# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 10479# 10480# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 10481# Yes, that means every name once taken will need to remain here until 10482# we give up compatibility with versions before 1.7, at which point 10483# we need to keep only those names which we still refer to. 10484 10485# This is to help aclocal find these macros, as it can't see m4_define. 10486AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 10487 10488m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 10489m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 10490m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 10491m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 10492m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 10493m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 10494m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 10495m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 10496m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 10497m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 10498m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 10499m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 10500m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 10501m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 10502m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 10503m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 10504m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 10505m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 10506m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 10507m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 10508m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 10509m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 10510m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 10511m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 10512m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 10513m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 10514m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 10515m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 10516m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 10517m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 10518m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 10519m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 10520m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 10521m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 10522m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 10523m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 10524m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 10525m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 10526m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 10527m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 10528m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 10529m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 10530m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 10531m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 10532m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 10533m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 10534m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 10535m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 10536m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 10537m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 10538m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 10539m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 10540m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 10541m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 10542m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 10543m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 10544m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 10545m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 10546m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 10547m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 10548m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 10549 10550