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