1# generated automatically by aclocal 1.7.9 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 4# 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 14# acinclude.m4 15# 16# Additional macros for autoconf. 17# 18# from Persistence of Vision(tm) Ray Tracer version 3.6. 19# Copyright 1991-2003 Persistence of Vision Team 20# Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd. 21#--------------------------------------------------------------------------- 22# NOTICE: This source code file is provided so that users may experiment 23# with enhancements to POV-Ray and to port the software to platforms other 24# than those supported by the POV-Ray developers. There are strict rules 25# regarding how you are permitted to use this file. These rules are contained 26# in the distribution and derivative versions licenses which should have been 27# provided with this file. 28# 29# These licences may be found online, linked from the end-user license 30# agreement that is located at http://www.povray.org/povlegal.html 31#--------------------------------------------------------------------------- 32# This program is based on the popular DKB raytracer version 2.12. 33# DKBTrace was originally written by David K. Buck. 34# DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins. 35#--------------------------------------------------------------------------- 36# $File: //depot/povray/3.6-release/unix/acinclude.m4 $ 37# $Revision: #3 $ 38# $Change: 3032 $ 39# $DateTime: 2004/08/02 18:43:41 $ 40# $Author: chrisc $ 41# $Log$ 42 43# acinclude.m4 for the source distribution of POV-Ray 3.6 for UNIX 44# Written by Nicolas Calimet <pov4grasp@free.fr> 45 46 47# POV_ARG_ENABLE(FEATURE, HELP-STRING) 48# -------------- 49# Basic replacement for AC_ARG_ENABLE(). 50# FEATURE must include the '--enable' or '--disable' prefix. 51# 52AC_DEFUN([POV_ARG_ENABLE], 53[ 54 # remove enable|disable prefix and convert dash to underscore 55 pov_arg_enable_feature=`echo $1 | sed 's,^.*able-,,; s,-,_,g'` 56 57 # AC_ARG_ENABLE does only accept a litteral for feature name / help string 58 eval "enable_povvar=\${enable_$pov_arg_enable_feature}" 59 AC_ARG_ENABLE([povvar], 60 AC_HELP_STRING([$1], [$2]), 61 [case $enableval in 62 yes|no|"") eval "enable_${pov_arg_enable_feature}=$enableval" ;; 63 *) AC_MSG_ERROR([bad value '$enableval' for $1]) ;; 64 esac 65 ], 66 [eval "enable_${pov_arg_enable_feature}="] 67 ) 68]) 69 70 71# POV_ARG_WITH(PACKAGE, HELP-STRING) 72# ------------ 73# Basic replacement for AC_ARG_WITH(). 74# PACKAGE must include the '--with' or '--without' prefix. 75# 76AC_DEFUN([POV_ARG_WITH], 77[ 78 # remove with(out) prefix and convert dash to underscore 79 pov_arg_with_package=`echo $1 | sed 's,^.*with.*-,,; s,-,_,g'` 80 81 # AC_ARG_WITH does only accept a litteral for package name / help string 82 eval "with_povvar=\${with_$pov_arg_with_package}" 83 AC_ARG_WITH([povvar], 84 AC_HELP_STRING([$1], [$2]), 85 [case $withval in 86 yes|no|"") eval "with_${pov_arg_with_package}=$withval" ;; 87 *) AC_MSG_ERROR([bad value '$withval' for $1]) ;; 88 esac 89 ], 90 [eval "with_${pov_arg_with_package}="] 91 ) 92]) 93 94 95# POV_PROG_CXX_VERSION() 96# -------------------- 97# Try to determine the compiler and its version. 98# 99AC_DEFUN([POV_PROG_CXX_VERSION], 100[ 101 AC_REQUIRE([AC_PROG_EGREP]) 102 103 AC_PROG_CXX 104 AC_PROG_CXXCPP 105 AC_MSG_CHECKING([for $CXX version]) 106 107 # check for -dumpversion 108 AC_TRY_COMMAND([$CXX -dumpversion < /dev/null 2> /dev/null > conftest.out]) 109 pov_prog_cxx_version=`cat conftest.out | $ac_cv_prog_egrep '[[0-9]]'` 110 111 # check for -v 112 if test -z "$pov_prog_cxx_version"; then 113 AC_TRY_COMMAND([$CXX -v < /dev/null 2>&1 | tr A-Z a-z > conftest.out]) 114 pov_prog_cxx_version=`cat conftest.out | $ac_cv_prog_egrep "version" | sed 's,\(.*version[[[:space:]]]*\)\(.*\),\2,'` 115 fi 116 117 # final compiler version string 118 if test -z "$pov_prog_cxx_version"; then 119 AC_MSG_RESULT([unkown]) 120 pov_prog_cxx_version="$CXX" 121 else 122 AC_MSG_RESULT([$pov_prog_cxx_version]) 123 pov_prog_cxx_version="$CXX $pov_prog_cxx_version" 124 fi 125 126 rm -f conftest.out 127]) 128 129 130# POV_PROG_CXX_FLAGS(FLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS]) 131# ------------------ 132# Check whether CXX compiler supports a given set of flags, cache result, 133# and update CXXFLAGS. 134# Note: in principle I'd better use AC_COMPILE_IFELSE([AC_LANG_PROGRAM()]) 135# but I don't remember whether it works well when using multiple flags. 136# I find it also safer to inspect stderr using pov_prog_cxx_flags_regexp. 137# For safety, the compiler is tested with and without the tested flags 138# and the corresponding standard error outputs are compared. 139# 140AC_DEFUN([POV_PROG_CXX_FLAGS], 141[ 142 AC_REQUIRE([AC_PROG_EGREP]) 143 144 # Create a unique cache-id name (multiple flags are handled). 145 pov_prog_cxx_flags_var=pov_cv_prog_cxx_flags`echo $1 | sed 's,[[^a-zA-Z0-9]],_,g'` 146 147 # Create the extended regular expression to handle multiple flags. 148 # For instance, "-first-flag -second-flag -X" gives the regexp: 149 # "\-f|irst-flag|\-s|econd-flag|\-X|X" 150 # 151 # FreeBSD and Darwin seem to have a problem with the \+ sed construct 152 # (but apparently not with the \{x,y\} one). For safety, I prefer to 153 # use [[:space:]][[:space:]]* for [[:space:]]\+ 154 pov_prog_cxx_flags_regexp=`echo $1 | sed 's,\(-.\)\([[^[:space:]]]*\),\\\\\1|\2,g; s,[[[:space:]]][[[:space:]]]*,|,g; s,\(.\)||,\1|\1|,g; s,\(.\)|$,\1|\1,'` 155 156 # Cannot use AC_CACHE_CHECK due to the nature of the cache-id variable. 157 AC_MSG_CHECKING([whether $CXX accepts $1]) 158 AC_CACHE_VAL( 159 [$pov_prog_cxx_flags_var], 160 [ 161 # Create a conftest file for CXX. 162 AC_LANG_PUSH(C++) 163 AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) 164 165 # Compile with $CXX and inspect standard error for given flags. 166 AC_TRY_COMMAND([$CXX -c conftest.$ac_ext > /dev/null 2> conftest.err0]) 167 AC_TRY_COMMAND([$CXX -c $1 conftest.$ac_ext > /dev/null 2> conftest.err]) 168 AC_TRY_COMMAND([cat conftest.err >&5]) 169 AC_TRY_COMMAND([$ac_cv_prog_egrep \"$pov_prog_cxx_flags_regexp\" conftest.err 2>&1 > /dev/null]) 170 # the command above seems to not always return the correct status, so 171 # for safety I rerun it here; I keep the other one for logging purpose. 172 pov_prog_cxx_flags_err=`$ac_cv_prog_egrep "$pov_prog_cxx_flags_regexp" conftest.err` 173 AC_TRY_COMMAND([diff conftest.err0 conftest.err >&5]) 174 if test -z "$pov_prog_cxx_flags_err" \ 175 || test -z "`diff conftest.err0 conftest.err`"; then 176 eval "$pov_prog_cxx_flags_var=yes" 177 else 178 eval "$pov_prog_cxx_flags_var=no" 179 fi 180 181 rm -f conftest.$ac_ext conftest.$ac_objext conftest.err conftest.err0 182 AC_LANG_POP(C++) 183 ] 184 ) 185 eval "pov_prog_cxx_flags_value=\$$pov_prog_cxx_flags_var" 186 AC_MSG_RESULT([$pov_prog_cxx_flags_value]) 187 188 # Update CXXFLAGS when flags are working, and run provided actions. 189 if test x"$pov_prog_cxx_flags_value" = x"yes"; then 190 CXXFLAGS="$CXXFLAGS $1" 191 ifelse([$2],[],[:],[$2]) 192 else 193 ifelse([$3],[],[:],[$3]) 194 fi 195]) 196 197 198# POV_PROG_CC_FLAGS(FLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS]) 199# ----------------- 200# CC version of the macro above. 201# 202AC_DEFUN([POV_PROG_CC_FLAGS], 203[ 204 AC_REQUIRE([AC_PROG_EGREP]) 205 206 pov_prog_cc_flags_var=pov_cv_prog_cc_flags`echo $1 | sed 's,[[^a-zA-Z0-9]],_,g'` 207 pov_prog_cc_flags_regexp=`echo $1 | sed 's,\(-.\)\([[^[:space:]]]*\),\\\\\1|\2,g; s,[[[:space:]]][[[:space:]]]*,|,g; s,\(.\)||,\1|\1|,g; s,\(.\)|$,\1|\1,'` 208 209 AC_MSG_CHECKING([whether $CC accepts $1]) 210 AC_CACHE_VAL( 211 [$pov_prog_cc_flags_var], 212 [ 213 AC_LANG_PUSH(C) 214 AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) 215 AC_TRY_COMMAND([$CC -c conftest.$ac_ext > /dev/null 2> conftest.err0]) 216 AC_TRY_COMMAND([$CC -c $1 conftest.$ac_ext > /dev/null 2> conftest.err]) 217 AC_TRY_COMMAND([cat conftest.err >&5]) 218 AC_TRY_COMMAND([$ac_cv_prog_egrep \"$pov_prog_cc_flags_regexp\" conftest.err 2>&1 > /dev/null]) 219 pov_prog_cc_flags_err=`$ac_cv_prog_egrep "$pov_prog_cc_flags_regexp" conftest.err` 220 AC_TRY_COMMAND([diff conftest.err0 conftest.err >&5]) 221 if test -z "$pov_prog_cc_flags_err" \ 222 || test -z "`diff conftest.err0 conftest.err`"; then 223 eval "$pov_prog_cc_flags_var=yes" 224 else 225 eval "$pov_prog_cc_flags_var=no" 226 fi 227 228 rm -f conftest.$ac_ext conftest.$ac_objext conftest.err conftest.err0 229 AC_LANG_POP(C) 230 ] 231 ) 232 eval "pov_prog_cc_flags_value=\$$pov_prog_cc_flags_var" 233 AC_MSG_RESULT([$pov_prog_cc_flags_value]) 234 235 if test x"$pov_prog_cc_flags_value" = x"yes"; then 236 CFLAGS="$CFLAGS $1" 237 ifelse([$2],[],[:],[$2]) 238 else 239 ifelse([$3],[],[:],[$3]) 240 fi 241]) 242 243 244# POV_PROG_CXX_STATIC() 245# ------------------- 246# Get flag for static linking with a library, cache result, 247# and update LDFLAGS. 248# Inspired (borrowed) from GNU libtool 1.4.2 249# Changed $build_os to $host_os, and $build_cpu to $host_cpu 250# 251AC_DEFUN([POV_PROG_CXX_STATIC], 252[ 253 AC_CACHE_VAL( 254 [pov_cv_prog_cxx_static], 255 [ 256 AC_MSG_CHECKING([for linker static flag]) 257 if test x"$GCC" = x"yes"; then 258 pov_cv_prog_cxx_static="-static" 259 case "$host_os" in 260 aix*) 261 pov_cv_prog_cxx_static="$pov_cv_prog_cxx_static -Wl,-lC" 262 ;; 263 irix*) # [NC] 264 pov_cv_prog_cxx_static="$pov_cv_prog_cxx_static -Wl,-Bstatic" 265 ;; 266 esac 267 else 268 case "$host_os" in 269 aix3* | aix4* | aix5*) 270 if text x"$host_cpu" = x"ia64"; then 271 pov_cv_prog_cxx_static="-Bstatic" 272 else 273 pov_cv_prog_cxx_static="-bnso -bI:/lib/syscalls.exp" 274 fi 275 ;; 276 hpux9* | hpux10* | hpux11*) 277 pov_cv_prog_cxx_static="-Wl,-a -Wl,archive" 278 ;; 279 irix5* | irix6*) 280 pov_cv_prog_cxx_static="-non_shared" 281 ;; 282 osf3* | osf4* | osf5*) 283 pov_cv_prog_cxx_static="-non_shared" 284 ;; 285 sco3.2v5*) 286 pov_cv_prog_cxx_static="-dn" 287 ;; 288 *) 289 pov_cv_prog_cxx_static="-Bstatic" 290 ;; 291 esac 292 fi 293 AC_MSG_RESULT([$pov_cv_prog_cxx_static]) 294 295 # now check for working flag 296 AC_MSG_CHECKING([for working '$pov_cv_prog_cxx_static' flag]) 297 pov_prog_cxx_static_save_ldflags="$LDFLAGS" 298 LDFLAGS="$LDFLAGS $pov_cv_prog_cxx_static" 299 AC_LINK_IFELSE( 300 [AC_LANG_PROGRAM([], [])], 301 [AC_MSG_RESULT([yes])], 302 [ 303 AC_MSG_RESULT([no]) 304 AC_MSG_NOTICE([static linking does not work, revert to dynamic linking]) 305 pov_cv_prog_cxx_static="" 306 LDFLAGS="$pov_prog_cxx_static_save_ldflags" 307 ] 308 ) 309 ] 310 ) 311]) 312 313 314# POV_CHECK_PATH(ENVVAR, PATH, [ACTION-IF-FOUND], [ACTION-IF-MISSING])) 315# -------------- 316# Check whether the environment variable contains a given path, warn and 317# remove it. 318AC_DEFUN([POV_CHECK_PATH], 319[ 320 AC_SUBST([$1]) 321 322 # process paths containing dots and create regexp 323 pov_check_path_regexp="[[=:]]*`echo $2 | sed 's,\.,\\\\.,g'`:*" 324 AC_TRY_COMMAND([echo pov_check_path_regexp = $pov_check_path_regexp > /dev/null]) 325 326 # initial and processed variable values 327 eval "pov_check_path_old=\$$1" 328 pov_check_path_new=`echo $pov_check_path_old | sed s,$pov_check_path_regexp,,g` 329 AC_TRY_COMMAND([echo pov_check_path_old = $pov_check_path_old > /dev/null]) 330 AC_TRY_COMMAND([echo pov_check_path_new = $pov_check_path_new > /dev/null]) 331 332 AC_MSG_CHECKING([whether \$$1 contains the $2 path]) 333 if test x"$pov_check_path_new" != x"$pov_check_path_old"; then 334 AC_MSG_RESULT([yes]) 335 AC_MSG_WARN([\$$1 is incorrectly set with the $2 path]) 336 eval $1=$pov_check_path_new 337 ifelse([$3],[],[:],[$3]) 338 else 339 AC_MSG_RESULT([no]) 340 ifelse([$4],[],[:],[$4]) 341 fi 342]) 343 344 345# POV_CHECK_LIB(lib, required_version, search_libs, check_function, header, version_function) 346# ------------- 347# Check whether a function is found in a set of libraries, and compare the 348# library version to the required one. 349# 350AC_DEFUN([POV_CHECK_LIB], 351[ 352 # check the library 353 AC_SEARCH_LIBS( 354 [$4], 355 [$3], 356 [ 357 # check include file 358 AC_CHECK_HEADER( 359 [$5], 360 [ 361 # check library version, update LIBS 362 AC_MSG_CHECKING([for lib$1 version >= $2]) 363 AC_RUN_IFELSE( 364 [ 365 AC_LANG_SOURCE( 366[#include <stdio.h> 367#include <string.h> 368#include "$5" 369int main (void) 370{ 371 const char *version = $6; 372 fprintf (stderr, "%s\n", version); 373 return ! (strcmp (version ? version : "", "$2") >= 0); 374}] 375 ) 376 ], 377 [ 378 pov_check_lib_version=`eval $ac_try 2>&1` 379 pov_check_lib="ok" 380 AC_MSG_RESULT([$pov_check_lib_version, $pov_check_lib]) 381 ], 382 [ 383 if test "$ac_status" != "1" || ! test -s conftest$ac_exeext ; then 384 pov_check_lib="unknown" 385 AC_MSG_RESULT([$pov_check_lib]) 386 else 387 pov_check_lib_version=`eval $ac_try 2>&1` 388 pov_check_lib="bad" 389 AC_MSG_RESULT([$pov_check_lib_version, $pov_check_lib]) 390 fi 391 ], 392 [AC_MSG_RESULT([cross-compiling, forced])] 393 ) # AC_RUN_IFELSE 394 ], 395 [pov_check_lib="no headers"] 396 ) # AC_CHECK_HEADER 397 ], 398 [pov_check_lib="not found"], 399 [] 400 ) # AC_SEARCH_LIBS 401]) 402 403 404# POV_CHECK_LIBTIFF(required_version) 405# ----------------- 406# Specialized version of the function above. 407# 408AC_DEFUN([POV_CHECK_LIBTIFF], 409[ 410 # check the library 411 AC_SEARCH_LIBS( 412 [TIFFGetVersion], 413 [tiff], 414 [ 415 # check include file 416 AC_CHECK_HEADER( 417 [tiffio.h], 418 [ 419 # check library version, update LIBS 420 AC_MSG_CHECKING([for libtiff version >= $1]) 421 AC_RUN_IFELSE( 422 [ 423 AC_LANG_SOURCE( 424[#include <stdio.h> 425#include <string.h> 426#include "tiffio.h" 427int main (void) 428{ 429 char version[[81]]; 430 char *p, *c; 431 sprintf (version, "%.79s", TIFFGetVersion ()); 432 p = strstr (version, "Version ") + strlen ("Version "); 433 if (! p) return 1; 434 c = strchr (p, '\n'); 435 if (! c) return 1; 436 *c = '\0'; 437 fprintf (stderr, "%s\n", p); 438 return ! (strcmp (p, "$1") >= 0); 439}] 440 ) 441 ], 442 [ 443 pov_check_libtiff_version=`eval $ac_try 2>&1` 444 pov_check_libtiff="ok" 445 AC_MSG_RESULT([$pov_check_libtiff_version, $pov_check_libtiff]) 446 ], 447 [ 448 if test "$ac_status" != "1" || ! test -s conftest$ac_exeext ; then 449 pov_check_libtiff="unknown" 450 AC_MSG_RESULT([$pov_check_libtiff]) 451 else 452 pov_check_libtiff_version=`eval $ac_try 2>&1` 453 pov_check_libtiff="bad" 454 AC_MSG_RESULT([$pov_check_libtiff_version, $pov_check_libtiff]) 455 fi 456 ], 457 [AC_MSG_RESULT([cross-compiling, forced])] 458 ) # AC_RUN_IFELSE 459 ], 460 [pov_check_libtiff="no headers"] 461 ) # AC_CHECK_HEADER 462 ], 463 [pov_check_libtiff="not found"], 464 [] 465 ) # AC_SEARCH_LIBS 466]) 467 468 469# POV_CHECK_LIBJPEG(required_version) 470# ----------------- 471# Specialized version. 472# 473AC_DEFUN([POV_CHECK_LIBJPEG], 474[ 475 # check the library 476 AC_SEARCH_LIBS( 477 [jpeg_std_error], 478 [jpeg], 479 [ 480 # check include file 481 AC_CHECK_HEADER( 482 [jpeglib.h], 483 [ 484 # check library version, update LIBS 485 AC_MSG_CHECKING([for libjpeg version >= $1]) 486 AC_RUN_IFELSE( 487 [ 488 AC_LANG_SOURCE( 489[#include <stdio.h> 490#include <string.h> 491#include "jpeglib.h" 492int main (void) 493{ 494 char ver_string[[81]]; 495 sprintf (ver_string, "%d", JPEG_LIB_VERSION); 496 ver_string[[1]] = (ver_string[[1]] > '0') ? ver_string[[1]] + 48 : '\0'; 497 fprintf (stderr, "%s\n", ver_string); 498 return ! (strcmp (ver_string, "$1") >= 0); 499}] 500 ) 501 ], 502 [ 503 pov_check_libjpeg_version=`eval $ac_try 2>&1` 504 pov_check_libjpeg="ok" 505 AC_MSG_RESULT([$pov_check_libjpeg_version, $pov_check_libjpeg]) 506 ], 507 [ 508 if test "$ac_status" != "1" || ! test -s conftest$ac_exeext ; then 509 pov_check_libjpeg="unknown" 510 AC_MSG_RESULT([$pov_check_libjpeg]) 511 else 512 pov_check_libjpeg_version=`eval $ac_try 2>&1` 513 pov_check_libjpeg="bad" 514 AC_MSG_RESULT([$pov_check_libjpeg_version, $pov_check_libjpeg]) 515 fi 516 ], 517 [AC_MSG_RESULT([cross-compiling, forced])] 518 ) # AC_RUN_IFELSE 519 ], 520 [pov_check_libjpeg="no headers"] 521 ) # AC_CHECK_HEADER 522 ], 523 [pov_check_libjpeg="not found"], 524 [] 525 ) # AC_SEARCH_LIBS 526]) 527 528# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 529 530# serial 47 AC_PROG_LIBTOOL 531 532 533# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 534# ----------------------------------------------------------- 535# If this macro is not defined by Autoconf, define it here. 536m4_ifdef([AC_PROVIDE_IFELSE], 537 [], 538 [m4_define([AC_PROVIDE_IFELSE], 539 [m4_ifdef([AC_PROVIDE_$1], 540 [$2], [$3])])]) 541 542 543# AC_PROG_LIBTOOL 544# --------------- 545AC_DEFUN([AC_PROG_LIBTOOL], 546[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 547dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 548dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 549 AC_PROVIDE_IFELSE([AC_PROG_CXX], 550 [AC_LIBTOOL_CXX], 551 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 552 ])]) 553dnl And a similar setup for Fortran 77 support 554 AC_PROVIDE_IFELSE([AC_PROG_F77], 555 [AC_LIBTOOL_F77], 556 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 557])]) 558 559dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 560dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 561dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 562 AC_PROVIDE_IFELSE([AC_PROG_GCJ], 563 [AC_LIBTOOL_GCJ], 564 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 565 [AC_LIBTOOL_GCJ], 566 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 567 [AC_LIBTOOL_GCJ], 568 [ifdef([AC_PROG_GCJ], 569 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 570 ifdef([A][M_PROG_GCJ], 571 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 572 ifdef([LT_AC_PROG_GCJ], 573 [define([LT_AC_PROG_GCJ], 574 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 575])])# AC_PROG_LIBTOOL 576 577 578# _AC_PROG_LIBTOOL 579# ---------------- 580AC_DEFUN([_AC_PROG_LIBTOOL], 581[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 582AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 583AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 584AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 585 586# This can be used to rebuild libtool when needed 587LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 588 589# Always use our own libtool. 590LIBTOOL='$(SHELL) $(top_builddir)/libtool' 591AC_SUBST(LIBTOOL)dnl 592 593# Prevent multiple expansion 594define([AC_PROG_LIBTOOL], []) 595])# _AC_PROG_LIBTOOL 596 597 598# AC_LIBTOOL_SETUP 599# ---------------- 600AC_DEFUN([AC_LIBTOOL_SETUP], 601[AC_PREREQ(2.50)dnl 602AC_REQUIRE([AC_ENABLE_SHARED])dnl 603AC_REQUIRE([AC_ENABLE_STATIC])dnl 604AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 605AC_REQUIRE([AC_CANONICAL_HOST])dnl 606AC_REQUIRE([AC_CANONICAL_BUILD])dnl 607AC_REQUIRE([AC_PROG_CC])dnl 608AC_REQUIRE([AC_PROG_LD])dnl 609AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 610AC_REQUIRE([AC_PROG_NM])dnl 611 612AC_REQUIRE([AC_PROG_LN_S])dnl 613AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 614# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 615AC_REQUIRE([AC_OBJEXT])dnl 616AC_REQUIRE([AC_EXEEXT])dnl 617dnl 618 619AC_LIBTOOL_SYS_MAX_CMD_LEN 620AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 621AC_LIBTOOL_OBJDIR 622 623AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 624_LT_AC_PROG_ECHO_BACKSLASH 625 626case $host_os in 627aix3*) 628 # AIX sometimes has problems with the GCC collect2 program. For some 629 # reason, if we set the COLLECT_NAMES environment variable, the problems 630 # vanish in a puff of smoke. 631 if test "X${COLLECT_NAMES+set}" != Xset; then 632 COLLECT_NAMES= 633 export COLLECT_NAMES 634 fi 635 ;; 636esac 637 638# Sed substitution that helps us do robust quoting. It backslashifies 639# metacharacters that are still active within double-quoted strings. 640Xsed='sed -e s/^X//' 641[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 642 643# Same as above, but do not quote variable references. 644[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 645 646# Sed substitution to delay expansion of an escaped shell variable in a 647# double_quote_subst'ed string. 648delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 649 650# Sed substitution to avoid accidental globbing in evaled expressions 651no_glob_subst='s/\*/\\\*/g' 652 653# Constants: 654rm="rm -f" 655 656# Global variables: 657default_ofile=libtool 658can_build_shared=yes 659 660# All known linkers require a `.a' archive for static linking (except M$VC, 661# which needs '.lib'). 662libext=a 663ltmain="$ac_aux_dir/ltmain.sh" 664ofile="$default_ofile" 665with_gnu_ld="$lt_cv_prog_gnu_ld" 666 667AC_CHECK_TOOL(AR, ar, false) 668AC_CHECK_TOOL(RANLIB, ranlib, :) 669AC_CHECK_TOOL(STRIP, strip, :) 670 671old_CC="$CC" 672old_CFLAGS="$CFLAGS" 673 674# Set sane defaults for various variables 675test -z "$AR" && AR=ar 676test -z "$AR_FLAGS" && AR_FLAGS=cru 677test -z "$AS" && AS=as 678test -z "$CC" && CC=cc 679test -z "$LTCC" && LTCC=$CC 680test -z "$DLLTOOL" && DLLTOOL=dlltool 681test -z "$LD" && LD=ld 682test -z "$LN_S" && LN_S="ln -s" 683test -z "$MAGIC_CMD" && MAGIC_CMD=file 684test -z "$NM" && NM=nm 685test -z "$SED" && SED=sed 686test -z "$OBJDUMP" && OBJDUMP=objdump 687test -z "$RANLIB" && RANLIB=: 688test -z "$STRIP" && STRIP=: 689test -z "$ac_objext" && ac_objext=o 690 691# Determine commands to create old-style static archives. 692old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 693old_postinstall_cmds='chmod 644 $oldlib' 694old_postuninstall_cmds= 695 696if test -n "$RANLIB"; then 697 case $host_os in 698 openbsd*) 699 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" 700 ;; 701 *) 702 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" 703 ;; 704 esac 705 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 706fi 707 708# Only perform the check for file, if the check method requires it 709case $deplibs_check_method in 710file_magic*) 711 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 712 AC_PATH_MAGIC 713 fi 714 ;; 715esac 716 717AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 718AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 719enable_win32_dll=yes, enable_win32_dll=no) 720 721AC_ARG_ENABLE([libtool-lock], 722 [AC_HELP_STRING([--disable-libtool-lock], 723 [avoid locking (might break parallel builds)])]) 724test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 725 726AC_ARG_WITH([pic], 727 [AC_HELP_STRING([--with-pic], 728 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 729 [pic_mode="$withval"], 730 [pic_mode=default]) 731test -z "$pic_mode" && pic_mode=default 732 733# Use C for the default configuration in the libtool script 734tagname= 735AC_LIBTOOL_LANG_C_CONFIG 736_LT_AC_TAGCONFIG 737])# AC_LIBTOOL_SETUP 738 739 740# _LT_AC_SYS_COMPILER 741# ------------------- 742AC_DEFUN([_LT_AC_SYS_COMPILER], 743[AC_REQUIRE([AC_PROG_CC])dnl 744 745# If no C compiler was specified, use CC. 746LTCC=${LTCC-"$CC"} 747 748# Allow CC to be a program name with arguments. 749compiler=$CC 750])# _LT_AC_SYS_COMPILER 751 752 753# _LT_AC_SYS_LIBPATH_AIX 754# ---------------------- 755# Links a minimal program and checks the executable 756# for the system default hardcoded library path. In most cases, 757# this is /usr/lib:/lib, but when the MPI compilers are used 758# the location of the communication and MPI libs are included too. 759# If we don't find anything, use the default library path according 760# to the aix ld manual. 761AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 762[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 763aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 764}'` 765# Check for a 64-bit object if we didn't find anything. 766if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 767}'`; fi],[]) 768if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 769])# _LT_AC_SYS_LIBPATH_AIX 770 771 772# _LT_AC_SHELL_INIT(ARG) 773# ---------------------- 774AC_DEFUN([_LT_AC_SHELL_INIT], 775[ifdef([AC_DIVERSION_NOTICE], 776 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 777 [AC_DIVERT_PUSH(NOTICE)]) 778$1 779AC_DIVERT_POP 780])# _LT_AC_SHELL_INIT 781 782 783# _LT_AC_PROG_ECHO_BACKSLASH 784# -------------------------- 785# Add some code to the start of the generated configure script which 786# will find an echo command which doesn't interpret backslashes. 787AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 788[_LT_AC_SHELL_INIT([ 789# Check that we are running under the correct shell. 790SHELL=${CONFIG_SHELL-/bin/sh} 791 792case X$ECHO in 793X*--fallback-echo) 794 # Remove one level of quotation (which was required for Make). 795 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 796 ;; 797esac 798 799echo=${ECHO-echo} 800if test "X[$]1" = X--no-reexec; then 801 # Discard the --no-reexec flag, and continue. 802 shift 803elif test "X[$]1" = X--fallback-echo; then 804 # Avoid inline document here, it may be left over 805 : 806elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 807 # Yippee, $echo works! 808 : 809else 810 # Restart under the correct shell. 811 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 812fi 813 814if test "X[$]1" = X--fallback-echo; then 815 # used as fallback echo 816 shift 817 cat <<EOF 818[$]* 819EOF 820 exit 0 821fi 822 823# The HP-UX ksh and POSIX shell print the target directory to stdout 824# if CDPATH is set. 825if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi 826 827if test -z "$ECHO"; then 828if test "X${echo_test_string+set}" != Xset; then 829# find a string as large as possible, as long as the shell can cope with it 830 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 831 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 832 if (echo_test_string="`eval $cmd`") 2>/dev/null && 833 echo_test_string="`eval $cmd`" && 834 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 835 then 836 break 837 fi 838 done 839fi 840 841if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 842 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 843 test "X$echo_testing_string" = "X$echo_test_string"; then 844 : 845else 846 # The Solaris, AIX, and Digital Unix default echo programs unquote 847 # backslashes. This makes it impossible to quote backslashes using 848 # echo "$something" | sed 's/\\/\\\\/g' 849 # 850 # So, first we look for a working echo in the user's PATH. 851 852 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 853 for dir in $PATH /usr/ucb; do 854 IFS="$lt_save_ifs" 855 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 856 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 857 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 858 test "X$echo_testing_string" = "X$echo_test_string"; then 859 echo="$dir/echo" 860 break 861 fi 862 done 863 IFS="$lt_save_ifs" 864 865 if test "X$echo" = Xecho; then 866 # We didn't find a better echo, so look for alternatives. 867 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 868 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 869 test "X$echo_testing_string" = "X$echo_test_string"; then 870 # This shell has a builtin print -r that does the trick. 871 echo='print -r' 872 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 873 test "X$CONFIG_SHELL" != X/bin/ksh; then 874 # If we have ksh, try running configure again with it. 875 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 876 export ORIGINAL_CONFIG_SHELL 877 CONFIG_SHELL=/bin/ksh 878 export CONFIG_SHELL 879 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 880 else 881 # Try using printf. 882 echo='printf %s\n' 883 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 884 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 885 test "X$echo_testing_string" = "X$echo_test_string"; then 886 # Cool, printf works 887 : 888 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 889 test "X$echo_testing_string" = 'X\t' && 890 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 891 test "X$echo_testing_string" = "X$echo_test_string"; then 892 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 893 export CONFIG_SHELL 894 SHELL="$CONFIG_SHELL" 895 export SHELL 896 echo="$CONFIG_SHELL [$]0 --fallback-echo" 897 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 898 test "X$echo_testing_string" = 'X\t' && 899 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 900 test "X$echo_testing_string" = "X$echo_test_string"; then 901 echo="$CONFIG_SHELL [$]0 --fallback-echo" 902 else 903 # maybe with a smaller string... 904 prev=: 905 906 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 907 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 908 then 909 break 910 fi 911 prev="$cmd" 912 done 913 914 if test "$prev" != 'sed 50q "[$]0"'; then 915 echo_test_string=`eval $prev` 916 export echo_test_string 917 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 918 else 919 # Oops. We lost completely, so just stick with echo. 920 echo=echo 921 fi 922 fi 923 fi 924 fi 925fi 926fi 927 928# Copy echo and quote the copy suitably for passing to libtool from 929# the Makefile, instead of quoting the original, which is used later. 930ECHO=$echo 931if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 932 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 933fi 934 935AC_SUBST(ECHO) 936])])# _LT_AC_PROG_ECHO_BACKSLASH 937 938 939# _LT_AC_LOCK 940# ----------- 941AC_DEFUN([_LT_AC_LOCK], 942[AC_ARG_ENABLE([libtool-lock], 943 [AC_HELP_STRING([--disable-libtool-lock], 944 [avoid locking (might break parallel builds)])]) 945test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 946 947# Some flags need to be propagated to the compiler or linker for good 948# libtool support. 949case $host in 950ia64-*-hpux*) 951 # Find out which ABI we are using. 952 echo 'int i;' > conftest.$ac_ext 953 if AC_TRY_EVAL(ac_compile); then 954 case `/usr/bin/file conftest.$ac_objext` in 955 *ELF-32*) 956 HPUX_IA64_MODE="32" 957 ;; 958 *ELF-64*) 959 HPUX_IA64_MODE="64" 960 ;; 961 esac 962 fi 963 rm -rf conftest* 964 ;; 965*-*-irix6*) 966 # Find out which ABI we are using. 967 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 968 if AC_TRY_EVAL(ac_compile); then 969 if test "$lt_cv_prog_gnu_ld" = yes; then 970 case `/usr/bin/file conftest.$ac_objext` in 971 *32-bit*) 972 LD="${LD-ld} -melf32bsmip" 973 ;; 974 *N32*) 975 LD="${LD-ld} -melf32bmipn32" 976 ;; 977 *64-bit*) 978 LD="${LD-ld} -melf64bmip" 979 ;; 980 esac 981 else 982 case `/usr/bin/file conftest.$ac_objext` in 983 *32-bit*) 984 LD="${LD-ld} -32" 985 ;; 986 *N32*) 987 LD="${LD-ld} -n32" 988 ;; 989 *64-bit*) 990 LD="${LD-ld} -64" 991 ;; 992 esac 993 fi 994 fi 995 rm -rf conftest* 996 ;; 997 998x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 999 # Find out which ABI we are using. 1000 echo 'int i;' > conftest.$ac_ext 1001 if AC_TRY_EVAL(ac_compile); then 1002 case "`/usr/bin/file conftest.o`" in 1003 *32-bit*) 1004 case $host in 1005 x86_64-*linux*) 1006 LD="${LD-ld} -m elf_i386" 1007 ;; 1008 ppc64-*linux*|powerpc64-*linux*) 1009 LD="${LD-ld} -m elf32ppclinux" 1010 ;; 1011 s390x-*linux*) 1012 LD="${LD-ld} -m elf_s390" 1013 ;; 1014 sparc64-*linux*) 1015 LD="${LD-ld} -m elf32_sparc" 1016 ;; 1017 esac 1018 ;; 1019 *64-bit*) 1020 case $host in 1021 x86_64-*linux*) 1022 LD="${LD-ld} -m elf_x86_64" 1023 ;; 1024 ppc*-*linux*|powerpc*-*linux*) 1025 LD="${LD-ld} -m elf64ppc" 1026 ;; 1027 s390*-*linux*) 1028 LD="${LD-ld} -m elf64_s390" 1029 ;; 1030 sparc*-*linux*) 1031 LD="${LD-ld} -m elf64_sparc" 1032 ;; 1033 esac 1034 ;; 1035 esac 1036 fi 1037 rm -rf conftest* 1038 ;; 1039 1040*-*-sco3.2v5*) 1041 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1042 SAVE_CFLAGS="$CFLAGS" 1043 CFLAGS="$CFLAGS -belf" 1044 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1045 [AC_LANG_PUSH(C) 1046 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1047 AC_LANG_POP]) 1048 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1049 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1050 CFLAGS="$SAVE_CFLAGS" 1051 fi 1052 ;; 1053AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 1054[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 1055 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1056 AC_CHECK_TOOL(AS, as, false) 1057 AC_CHECK_TOOL(OBJDUMP, objdump, false) 1058 ;; 1059 ]) 1060esac 1061 1062need_locks="$enable_libtool_lock" 1063 1064])# _LT_AC_LOCK 1065 1066 1067# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1068# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1069# ---------------------------------------------------------------- 1070# Check whether the given compiler option works 1071AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 1072[AC_REQUIRE([LT_AC_PROG_SED]) 1073AC_CACHE_CHECK([$1], [$2], 1074 [$2=no 1075 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1076 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 1077 lt_compiler_flag="$3" 1078 # Insert the option either (1) after the last *FLAGS variable, or 1079 # (2) before a word containing "conftest.", or (3) at the end. 1080 # Note that $ac_compile itself does not contain backslashes and begins 1081 # with a dollar sign (not a hyphen), so the echo should work correctly. 1082 # The option is referenced via a variable to avoid confusing sed. 1083 lt_compile=`echo "$ac_compile" | $SED \ 1084 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ 1085 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1086 -e 's:$: $lt_compiler_flag:'` 1087 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1088 (eval "$lt_compile" 2>conftest.err) 1089 ac_status=$? 1090 cat conftest.err >&AS_MESSAGE_LOG_FD 1091 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1092 if (exit $ac_status) && test -s "$ac_outfile"; then 1093 # The compiler can only warn and ignore the option if not recognized 1094 # So say no if there are warnings 1095 if test ! -s conftest.err; then 1096 $2=yes 1097 fi 1098 fi 1099 $rm conftest* 1100]) 1101 1102if test x"[$]$2" = xyes; then 1103 ifelse([$5], , :, [$5]) 1104else 1105 ifelse([$6], , :, [$6]) 1106fi 1107])# AC_LIBTOOL_COMPILER_OPTION 1108 1109 1110# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1111# [ACTION-SUCCESS], [ACTION-FAILURE]) 1112# ------------------------------------------------------------ 1113# Check whether the given compiler option works 1114AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 1115[AC_CACHE_CHECK([$1], [$2], 1116 [$2=no 1117 save_LDFLAGS="$LDFLAGS" 1118 LDFLAGS="$LDFLAGS $3" 1119 printf "$lt_simple_link_test_code" > conftest.$ac_ext 1120 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1121 # The compiler can only warn and ignore the option if not recognized 1122 # So say no if there are warnings 1123 if test -s conftest.err; then 1124 # Append any errors to the config.log. 1125 cat conftest.err 1>&AS_MESSAGE_LOG_FD 1126 else 1127 $2=yes 1128 fi 1129 fi 1130 $rm conftest* 1131 LDFLAGS="$save_LDFLAGS" 1132]) 1133 1134if test x"[$]$2" = xyes; then 1135 ifelse([$4], , :, [$4]) 1136else 1137 ifelse([$5], , :, [$5]) 1138fi 1139])# AC_LIBTOOL_LINKER_OPTION 1140 1141 1142# AC_LIBTOOL_SYS_MAX_CMD_LEN 1143# -------------------------- 1144AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 1145[# find the maximum length of command line arguments 1146AC_MSG_CHECKING([the maximum length of command line arguments]) 1147AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1148 i=0 1149 testring="ABCD" 1150 1151 case $build_os in 1152 msdosdjgpp*) 1153 # On DJGPP, this test can blow up pretty badly due to problems in libc 1154 # (any single argument exceeding 2000 bytes causes a buffer overrun 1155 # during glob expansion). Even if it were fixed, the result of this 1156 # check would be larger than it should be. 1157 lt_cv_sys_max_cmd_len=12288; # 12K is about right 1158 ;; 1159 1160 gnu*) 1161 # Under GNU Hurd, this test is not required because there is 1162 # no limit to the length of command line arguments. 1163 # Libtool will interpret -1 as no limit whatsoever 1164 lt_cv_sys_max_cmd_len=-1; 1165 ;; 1166 1167 cygwin* | mingw*) 1168 # On Win9x/ME, this test blows up -- it succeeds, but takes 1169 # about 5 minutes as the teststring grows exponentially. 1170 # Worse, since 9x/ME are not pre-emptively multitasking, 1171 # you end up with a "frozen" computer, even though with patience 1172 # the test eventually succeeds (with a max line length of 256k). 1173 # Instead, let's just punt: use the minimum linelength reported by 1174 # all of the supported platforms: 8192 (on NT/2K/XP). 1175 lt_cv_sys_max_cmd_len=8192; 1176 ;; 1177 1178 amigaos*) 1179 # On AmigaOS with pdksh, this test takes hours, literally. 1180 # So we just punt and use a minimum line length of 8192. 1181 lt_cv_sys_max_cmd_len=8192; 1182 ;; 1183 1184 *) 1185 # If test is not a shell built-in, we'll probably end up computing a 1186 # maximum length that is only half of the actual maximum length, but 1187 # we can't tell. 1188 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ 1189 = "XX$testring") >/dev/null 2>&1 && 1190 new_result=`expr "X$testring" : ".*" 2>&1` && 1191 lt_cv_sys_max_cmd_len=$new_result && 1192 test $i != 17 # 1/2 MB should be enough 1193 do 1194 i=`expr $i + 1` 1195 testring=$testring$testring 1196 done 1197 testring= 1198 # Add a significant safety factor because C++ compilers can tack on massive 1199 # amounts of additional arguments before passing them to the linker. 1200 # It appears as though 1/2 is a usable value. 1201 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1202 ;; 1203 esac 1204]) 1205if test -n $lt_cv_sys_max_cmd_len ; then 1206 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1207else 1208 AC_MSG_RESULT(none) 1209fi 1210])# AC_LIBTOOL_SYS_MAX_CMD_LEN 1211 1212 1213# _LT_AC_CHECK_DLFCN 1214# -------------------- 1215AC_DEFUN([_LT_AC_CHECK_DLFCN], 1216[AC_CHECK_HEADERS(dlfcn.h)dnl 1217])# _LT_AC_CHECK_DLFCN 1218 1219 1220# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1221# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1222# ------------------------------------------------------------------ 1223AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 1224[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1225if test "$cross_compiling" = yes; then : 1226 [$4] 1227else 1228 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1229 lt_status=$lt_dlunknown 1230 cat > conftest.$ac_ext <<EOF 1231[#line __oline__ "configure" 1232#include "confdefs.h" 1233 1234#if HAVE_DLFCN_H 1235#include <dlfcn.h> 1236#endif 1237 1238#include <stdio.h> 1239 1240#ifdef RTLD_GLOBAL 1241# define LT_DLGLOBAL RTLD_GLOBAL 1242#else 1243# ifdef DL_GLOBAL 1244# define LT_DLGLOBAL DL_GLOBAL 1245# else 1246# define LT_DLGLOBAL 0 1247# endif 1248#endif 1249 1250/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1251 find out it does not work in some platform. */ 1252#ifndef LT_DLLAZY_OR_NOW 1253# ifdef RTLD_LAZY 1254# define LT_DLLAZY_OR_NOW RTLD_LAZY 1255# else 1256# ifdef DL_LAZY 1257# define LT_DLLAZY_OR_NOW DL_LAZY 1258# else 1259# ifdef RTLD_NOW 1260# define LT_DLLAZY_OR_NOW RTLD_NOW 1261# else 1262# ifdef DL_NOW 1263# define LT_DLLAZY_OR_NOW DL_NOW 1264# else 1265# define LT_DLLAZY_OR_NOW 0 1266# endif 1267# endif 1268# endif 1269# endif 1270#endif 1271 1272#ifdef __cplusplus 1273extern "C" void exit (int); 1274#endif 1275 1276void fnord() { int i=42;} 1277int main () 1278{ 1279 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1280 int status = $lt_dlunknown; 1281 1282 if (self) 1283 { 1284 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1285 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1286 /* dlclose (self); */ 1287 } 1288 1289 exit (status); 1290}] 1291EOF 1292 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1293 (./conftest; exit; ) 2>/dev/null 1294 lt_status=$? 1295 case x$lt_status in 1296 x$lt_dlno_uscore) $1 ;; 1297 x$lt_dlneed_uscore) $2 ;; 1298 x$lt_unknown|x*) $3 ;; 1299 esac 1300 else : 1301 # compilation failed 1302 $3 1303 fi 1304fi 1305rm -fr conftest* 1306])# _LT_AC_TRY_DLOPEN_SELF 1307 1308 1309# AC_LIBTOOL_DLOPEN_SELF 1310# ------------------- 1311AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1312[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1313if test "x$enable_dlopen" != xyes; then 1314 enable_dlopen=unknown 1315 enable_dlopen_self=unknown 1316 enable_dlopen_self_static=unknown 1317else 1318 lt_cv_dlopen=no 1319 lt_cv_dlopen_libs= 1320 1321 case $host_os in 1322 beos*) 1323 lt_cv_dlopen="load_add_on" 1324 lt_cv_dlopen_libs= 1325 lt_cv_dlopen_self=yes 1326 ;; 1327 1328 mingw* | pw32*) 1329 lt_cv_dlopen="LoadLibrary" 1330 lt_cv_dlopen_libs= 1331 ;; 1332 1333 cygwin*) 1334 lt_cv_dlopen="dlopen" 1335 lt_cv_dlopen_libs= 1336 ;; 1337 1338 darwin*) 1339 # if libdl is installed we need to link against it 1340 AC_CHECK_LIB([dl], [dlopen], 1341 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1342 lt_cv_dlopen="dyld" 1343 lt_cv_dlopen_libs= 1344 lt_cv_dlopen_self=yes 1345 ]) 1346 ;; 1347 1348 *) 1349 AC_CHECK_FUNC([shl_load], 1350 [lt_cv_dlopen="shl_load"], 1351 [AC_CHECK_LIB([dld], [shl_load], 1352 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 1353 [AC_CHECK_FUNC([dlopen], 1354 [lt_cv_dlopen="dlopen"], 1355 [AC_CHECK_LIB([dl], [dlopen], 1356 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1357 [AC_CHECK_LIB([svld], [dlopen], 1358 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1359 [AC_CHECK_LIB([dld], [dld_link], 1360 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 1361 ]) 1362 ]) 1363 ]) 1364 ]) 1365 ]) 1366 ;; 1367 esac 1368 1369 if test "x$lt_cv_dlopen" != xno; then 1370 enable_dlopen=yes 1371 else 1372 enable_dlopen=no 1373 fi 1374 1375 case $lt_cv_dlopen in 1376 dlopen) 1377 save_CPPFLAGS="$CPPFLAGS" 1378 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1379 1380 save_LDFLAGS="$LDFLAGS" 1381 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1382 1383 save_LIBS="$LIBS" 1384 LIBS="$lt_cv_dlopen_libs $LIBS" 1385 1386 AC_CACHE_CHECK([whether a program can dlopen itself], 1387 lt_cv_dlopen_self, [dnl 1388 _LT_AC_TRY_DLOPEN_SELF( 1389 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1390 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1391 ]) 1392 1393 if test "x$lt_cv_dlopen_self" = xyes; then 1394 LDFLAGS="$LDFLAGS $link_static_flag" 1395 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1396 lt_cv_dlopen_self_static, [dnl 1397 _LT_AC_TRY_DLOPEN_SELF( 1398 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1399 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1400 ]) 1401 fi 1402 1403 CPPFLAGS="$save_CPPFLAGS" 1404 LDFLAGS="$save_LDFLAGS" 1405 LIBS="$save_LIBS" 1406 ;; 1407 esac 1408 1409 case $lt_cv_dlopen_self in 1410 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1411 *) enable_dlopen_self=unknown ;; 1412 esac 1413 1414 case $lt_cv_dlopen_self_static in 1415 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1416 *) enable_dlopen_self_static=unknown ;; 1417 esac 1418fi 1419])# AC_LIBTOOL_DLOPEN_SELF 1420 1421 1422# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1423# --------------------------------- 1424# Check to see if options -c and -o are simultaneously supported by compiler 1425AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1426[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1427AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1428 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1429 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1430 $rm -r conftest 2>/dev/null 1431 mkdir conftest 1432 cd conftest 1433 mkdir out 1434 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 1435 1436 lt_compiler_flag="-o out/conftest2.$ac_objext" 1437 # Insert the option either (1) after the last *FLAGS variable, or 1438 # (2) before a word containing "conftest.", or (3) at the end. 1439 # Note that $ac_compile itself does not contain backslashes and begins 1440 # with a dollar sign (not a hyphen), so the echo should work correctly. 1441 lt_compile=`echo "$ac_compile" | $SED \ 1442 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ 1443 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1444 -e 's:$: $lt_compiler_flag:'` 1445 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1446 (eval "$lt_compile" 2>out/conftest.err) 1447 ac_status=$? 1448 cat out/conftest.err >&AS_MESSAGE_LOG_FD 1449 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1450 if (exit $ac_status) && test -s out/conftest2.$ac_objext 1451 then 1452 # The compiler can only warn and ignore the option if not recognized 1453 # So say no if there are warnings 1454 if test ! -s out/conftest.err; then 1455 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1456 fi 1457 fi 1458 chmod u+w . 1459 $rm conftest* 1460 # SGI C++ compiler will create directory out/ii_files/ for 1461 # template instantiation 1462 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 1463 $rm out/* && rmdir out 1464 cd .. 1465 rmdir conftest 1466 $rm conftest* 1467]) 1468])# AC_LIBTOOL_PROG_CC_C_O 1469 1470 1471# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 1472# ----------------------------------------- 1473# Check to see if we can do hard links to lock some files if needed 1474AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 1475[AC_REQUIRE([_LT_AC_LOCK])dnl 1476 1477hard_links="nottested" 1478if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1479 # do not overwrite the value of need_locks provided by the user 1480 AC_MSG_CHECKING([if we can lock with hard links]) 1481 hard_links=yes 1482 $rm conftest* 1483 ln conftest.a conftest.b 2>/dev/null && hard_links=no 1484 touch conftest.a 1485 ln conftest.a conftest.b 2>&5 || hard_links=no 1486 ln conftest.a conftest.b 2>/dev/null && hard_links=no 1487 AC_MSG_RESULT([$hard_links]) 1488 if test "$hard_links" = no; then 1489 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1490 need_locks=warn 1491 fi 1492else 1493 need_locks=no 1494fi 1495])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 1496 1497 1498# AC_LIBTOOL_OBJDIR 1499# ----------------- 1500AC_DEFUN([AC_LIBTOOL_OBJDIR], 1501[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1502[rm -f .libs 2>/dev/null 1503mkdir .libs 2>/dev/null 1504if test -d .libs; then 1505 lt_cv_objdir=.libs 1506else 1507 # MS-DOS does not allow filenames that begin with a dot. 1508 lt_cv_objdir=_libs 1509fi 1510rmdir .libs 2>/dev/null]) 1511objdir=$lt_cv_objdir 1512])# AC_LIBTOOL_OBJDIR 1513 1514 1515# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 1516# ---------------------------------------------- 1517# Check hardcoding attributes. 1518AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 1519[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1520_LT_AC_TAGVAR(hardcode_action, $1)= 1521if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 1522 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ 1523 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then 1524 1525 # We can hardcode non-existant directories. 1526 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 1527 # If the only mechanism to avoid hardcoding is shlibpath_var, we 1528 # have to relink, otherwise we might link with an installed library 1529 # when we should be linking with a yet-to-be-installed one 1530 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1531 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 1532 # Linking always hardcodes the temporary library directory. 1533 _LT_AC_TAGVAR(hardcode_action, $1)=relink 1534 else 1535 # We can link without hardcoding, and we can hardcode nonexisting dirs. 1536 _LT_AC_TAGVAR(hardcode_action, $1)=immediate 1537 fi 1538else 1539 # We cannot hardcode anything, or else we can only hardcode existing 1540 # directories. 1541 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 1542fi 1543AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 1544 1545if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 1546 # Fast installation is not supported 1547 enable_fast_install=no 1548elif test "$shlibpath_overrides_runpath" = yes || 1549 test "$enable_shared" = no; then 1550 # Fast installation is not necessary 1551 enable_fast_install=needless 1552fi 1553])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 1554 1555 1556# AC_LIBTOOL_SYS_LIB_STRIP 1557# ------------------------ 1558AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 1559[striplib= 1560old_striplib= 1561AC_MSG_CHECKING([whether stripping libraries is possible]) 1562if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 1563 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 1564 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 1565 AC_MSG_RESULT([yes]) 1566else 1567# FIXME - insert some real tests, host_os isn't really good enough 1568 case $host_os in 1569 darwin*) 1570 if test -n "$STRIP" ; then 1571 striplib="$STRIP -x" 1572 AC_MSG_RESULT([yes]) 1573 else 1574 AC_MSG_RESULT([no]) 1575fi 1576 ;; 1577 *) 1578 AC_MSG_RESULT([no]) 1579 ;; 1580 esac 1581fi 1582])# AC_LIBTOOL_SYS_LIB_STRIP 1583 1584 1585# AC_LIBTOOL_SYS_DYNAMIC_LINKER 1586# ----------------------------- 1587# PORTME Fill in your ld.so characteristics 1588AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 1589[AC_MSG_CHECKING([dynamic linker characteristics]) 1590library_names_spec= 1591libname_spec='lib$name' 1592soname_spec= 1593shrext=".so" 1594postinstall_cmds= 1595postuninstall_cmds= 1596finish_cmds= 1597finish_eval= 1598shlibpath_var= 1599shlibpath_overrides_runpath=unknown 1600version_type=none 1601dynamic_linker="$host_os ld.so" 1602sys_lib_dlsearch_path_spec="/lib /usr/lib" 1603if test "$GCC" = yes; then 1604 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1605 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 1606 # if the path contains ";" then we assume it to be the separator 1607 # otherwise default to the standard path separator (i.e. ":") - it is 1608 # assumed that no part of a normal pathname contains ";" but that should 1609 # okay in the real world where ";" in dirpaths is itself problematic. 1610 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1611 else 1612 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1613 fi 1614else 1615 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 1616fi 1617need_lib_prefix=unknown 1618hardcode_into_libs=no 1619 1620# when you set need_version to no, make sure it does not cause -set_version 1621# flags to be left without arguments 1622need_version=unknown 1623 1624case $host_os in 1625aix3*) 1626 version_type=linux 1627 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 1628 shlibpath_var=LIBPATH 1629 1630 # AIX 3 has no versioning support, so we append a major version to the name. 1631 soname_spec='${libname}${release}${shared_ext}$major' 1632 ;; 1633 1634aix4* | aix5*) 1635 version_type=linux 1636 need_lib_prefix=no 1637 need_version=no 1638 hardcode_into_libs=yes 1639 if test "$host_cpu" = ia64; then 1640 # AIX 5 supports IA64 1641 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 1642 shlibpath_var=LD_LIBRARY_PATH 1643 else 1644 # With GCC up to 2.95.x, collect2 would create an import file 1645 # for dependence libraries. The import file would start with 1646 # the line `#! .'. This would cause the generated library to 1647 # depend on `.', always an invalid library. This was fixed in 1648 # development snapshots of GCC prior to 3.0. 1649 case $host_os in 1650 aix4 | aix4.[[01]] | aix4.[[01]].*) 1651 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1652 echo ' yes ' 1653 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1654 : 1655 else 1656 can_build_shared=no 1657 fi 1658 ;; 1659 esac 1660 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 1661 # soname into executable. Probably we can add versioning support to 1662 # collect2, so additional links can be useful in future. 1663 if test "$aix_use_runtimelinking" = yes; then 1664 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 1665 # instead of lib<name>.a to let people know that these are not 1666 # typical AIX shared libraries. 1667 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1668 else 1669 # We preserve .a as extension for shared libraries through AIX4.2 1670 # and later when we are not doing run time linking. 1671 library_names_spec='${libname}${release}.a $libname.a' 1672 soname_spec='${libname}${release}${shared_ext}$major' 1673 fi 1674 shlibpath_var=LIBPATH 1675 fi 1676 ;; 1677 1678amigaos*) 1679 library_names_spec='$libname.ixlibrary $libname.a' 1680 # Create ${libname}_ixlibrary.a entries in /sys/libs. 1681 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''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' 1682 ;; 1683 1684beos*) 1685 library_names_spec='${libname}${shared_ext}' 1686 dynamic_linker="$host_os ld.so" 1687 shlibpath_var=LIBRARY_PATH 1688 ;; 1689 1690bsdi4*) 1691 version_type=linux 1692 need_version=no 1693 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1694 soname_spec='${libname}${release}${shared_ext}$major' 1695 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 1696 shlibpath_var=LD_LIBRARY_PATH 1697 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 1698 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 1699 # the default ld.so.conf also contains /usr/contrib/lib and 1700 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 1701 # libtool to hard-code these into programs 1702 ;; 1703 1704cygwin* | mingw* | pw32*) 1705 version_type=windows 1706 shrext=".dll" 1707 need_version=no 1708 need_lib_prefix=no 1709 1710 case $GCC,$host_os in 1711 yes,cygwin* | yes,mingw* | yes,pw32*) 1712 library_names_spec='$libname.dll.a' 1713 # DLL is installed to $(libdir)/../bin by postinstall_cmds 1714 postinstall_cmds='base_file=`basename \${file}`~ 1715 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 1716 dldir=$destdir/`dirname \$dlpath`~ 1717 test -d \$dldir || mkdir -p \$dldir~ 1718 $install_prog $dir/$dlname \$dldir/$dlname' 1719 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1720 dlpath=$dir/\$dldll~ 1721 $rm \$dlpath' 1722 shlibpath_overrides_runpath=yes 1723 1724 case $host_os in 1725 cygwin*) 1726 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 1727 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1728 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 1729 ;; 1730 mingw*) 1731 # MinGW DLLs use traditional 'lib' prefix 1732 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 1733 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 1734 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 1735 # It is most probably a Windows format PATH printed by 1736 # mingw gcc, but we are running on Cygwin. Gcc prints its search 1737 # path with ; separators, and with drive letters. We can handle the 1738 # drive letters (cygwin fileutils understands them), so leave them, 1739 # especially as we might pass files found there to a mingw objdump, 1740 # which wouldn't understand a cygwinified path. Ahh. 1741 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 1742 else 1743 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 1744 fi 1745 ;; 1746 pw32*) 1747 # pw32 DLLs use 'pw' prefix rather than 'lib' 1748 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' 1749 ;; 1750 esac 1751 ;; 1752 1753 *) 1754 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 1755 ;; 1756 esac 1757 dynamic_linker='Win32 ld.exe' 1758 # FIXME: first we should search . and the directory the executable is in 1759 shlibpath_var=PATH 1760 ;; 1761 1762darwin* | rhapsody*) 1763 dynamic_linker="$host_os dyld" 1764 version_type=darwin 1765 need_lib_prefix=no 1766 need_version=no 1767 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 1768 soname_spec='${libname}${release}${major}$shared_ext' 1769 shlibpath_overrides_runpath=yes 1770 shlibpath_var=DYLD_LIBRARY_PATH 1771 shrext='$(test .$module = .yes && echo .so || echo .dylib)' 1772 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 1773 if test "$GCC" = yes; then 1774 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` 1775 else 1776 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 1777 fi 1778 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 1779 ;; 1780 1781dgux*) 1782 version_type=linux 1783 need_lib_prefix=no 1784 need_version=no 1785 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 1786 soname_spec='${libname}${release}${shared_ext}$major' 1787 shlibpath_var=LD_LIBRARY_PATH 1788 ;; 1789 1790freebsd1*) 1791 dynamic_linker=no 1792 ;; 1793 1794kfreebsd*-gnu) 1795 version_type=linux 1796 need_lib_prefix=no 1797 need_version=no 1798 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1799 soname_spec='${libname}${release}${shared_ext}$major' 1800 shlibpath_var=LD_LIBRARY_PATH 1801 shlibpath_overrides_runpath=no 1802 hardcode_into_libs=yes 1803 dynamic_linker='GNU ld.so' 1804 ;; 1805 1806freebsd*) 1807 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 1808 version_type=freebsd-$objformat 1809 case $version_type in 1810 freebsd-elf*) 1811 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 1812 need_version=no 1813 need_lib_prefix=no 1814 ;; 1815 freebsd-*) 1816 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 1817 need_version=yes 1818 ;; 1819 esac 1820 shlibpath_var=LD_LIBRARY_PATH 1821 case $host_os in 1822 freebsd2*) 1823 shlibpath_overrides_runpath=yes 1824 ;; 1825 freebsd3.[01]* | freebsdelf3.[01]*) 1826 shlibpath_overrides_runpath=yes 1827 hardcode_into_libs=yes 1828 ;; 1829 *) # from 3.2 on 1830 shlibpath_overrides_runpath=no 1831 hardcode_into_libs=yes 1832 ;; 1833 esac 1834 ;; 1835 1836gnu*) 1837 version_type=linux 1838 need_lib_prefix=no 1839 need_version=no 1840 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 1841 soname_spec='${libname}${release}${shared_ext}$major' 1842 shlibpath_var=LD_LIBRARY_PATH 1843 hardcode_into_libs=yes 1844 ;; 1845 1846hpux9* | hpux10* | hpux11*) 1847 # Give a soname corresponding to the major version so that dld.sl refuses to 1848 # link against other versions. 1849 version_type=sunos 1850 need_lib_prefix=no 1851 need_version=no 1852 case "$host_cpu" in 1853 ia64*) 1854 shrext='.so' 1855 hardcode_into_libs=yes 1856 dynamic_linker="$host_os dld.so" 1857 shlibpath_var=LD_LIBRARY_PATH 1858 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1859 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1860 soname_spec='${libname}${release}${shared_ext}$major' 1861 if test "X$HPUX_IA64_MODE" = X32; then 1862 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 1863 else 1864 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1865 fi 1866 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1867 ;; 1868 hppa*64*) 1869 shrext='.sl' 1870 hardcode_into_libs=yes 1871 dynamic_linker="$host_os dld.sl" 1872 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 1873 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1874 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1875 soname_spec='${libname}${release}${shared_ext}$major' 1876 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 1877 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1878 ;; 1879 *) 1880 shrext='.sl' 1881 dynamic_linker="$host_os dld.sl" 1882 shlibpath_var=SHLIB_PATH 1883 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1884 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1885 soname_spec='${libname}${release}${shared_ext}$major' 1886 ;; 1887 esac 1888 # HP-UX runs *really* slowly unless shared libraries are mode 555. 1889 postinstall_cmds='chmod 555 $lib' 1890 ;; 1891 1892irix5* | irix6* | nonstopux*) 1893 case $host_os in 1894 nonstopux*) version_type=nonstopux ;; 1895 *) 1896 if test "$lt_cv_prog_gnu_ld" = yes; then 1897 version_type=linux 1898 else 1899 version_type=irix 1900 fi ;; 1901 esac 1902 need_lib_prefix=no 1903 need_version=no 1904 soname_spec='${libname}${release}${shared_ext}$major' 1905 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 1906 case $host_os in 1907 irix5* | nonstopux*) 1908 libsuff= shlibsuff= 1909 ;; 1910 *) 1911 case $LD in # libtool.m4 will add one of these switches to LD 1912 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1913 libsuff= shlibsuff= libmagic=32-bit;; 1914 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1915 libsuff=32 shlibsuff=N32 libmagic=N32;; 1916 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1917 libsuff=64 shlibsuff=64 libmagic=64-bit;; 1918 *) libsuff= shlibsuff= libmagic=never-match;; 1919 esac 1920 ;; 1921 esac 1922 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 1923 shlibpath_overrides_runpath=no 1924 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 1925 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 1926 hardcode_into_libs=yes 1927 ;; 1928 1929# No shared lib support for Linux oldld, aout, or coff. 1930linux*oldld* | linux*aout* | linux*coff*) 1931 dynamic_linker=no 1932 ;; 1933 1934# This must be Linux ELF. 1935linux*) 1936 version_type=linux 1937 need_lib_prefix=no 1938 need_version=no 1939 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1940 soname_spec='${libname}${release}${shared_ext}$major' 1941 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 1942 shlibpath_var=LD_LIBRARY_PATH 1943 shlibpath_overrides_runpath=no 1944 # This implies no fast_install, which is unacceptable. 1945 # Some rework will be needed to allow for fast_install 1946 # before this can be enabled. 1947 hardcode_into_libs=yes 1948 1949 # Append ld.so.conf contents to the search path 1950 if test -f /etc/ld.so.conf; then 1951 ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf` 1952 sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra" 1953 fi 1954 1955 # We used to test for /lib/ld.so.1 and disable shared libraries on 1956 # powerpc, because MkLinux only supported shared libraries with the 1957 # GNU dynamic linker. Since this was broken with cross compilers, 1958 # most powerpc-linux boxes support dynamic linking these days and 1959 # people can always --disable-shared, the test was removed, and we 1960 # assume the GNU/Linux dynamic linker is in use. 1961 dynamic_linker='GNU/Linux ld.so' 1962 ;; 1963 1964knetbsd*-gnu) 1965 version_type=linux 1966 need_lib_prefix=no 1967 need_version=no 1968 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1969 soname_spec='${libname}${release}${shared_ext}$major' 1970 shlibpath_var=LD_LIBRARY_PATH 1971 shlibpath_overrides_runpath=no 1972 hardcode_into_libs=yes 1973 dynamic_linker='GNU ld.so' 1974 ;; 1975 1976netbsd*) 1977 version_type=sunos 1978 need_lib_prefix=no 1979 need_version=no 1980 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 1981 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 1982 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 1983 dynamic_linker='NetBSD (a.out) ld.so' 1984 else 1985 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 1986 soname_spec='${libname}${release}${shared_ext}$major' 1987 dynamic_linker='NetBSD ld.elf_so' 1988 fi 1989 shlibpath_var=LD_LIBRARY_PATH 1990 shlibpath_overrides_runpath=yes 1991 hardcode_into_libs=yes 1992 ;; 1993 1994newsos6) 1995 version_type=linux 1996 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 1997 shlibpath_var=LD_LIBRARY_PATH 1998 shlibpath_overrides_runpath=yes 1999 ;; 2000 2001nto-qnx*) 2002 version_type=linux 2003 need_lib_prefix=no 2004 need_version=no 2005 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2006 soname_spec='${libname}${release}${shared_ext}$major' 2007 shlibpath_var=LD_LIBRARY_PATH 2008 shlibpath_overrides_runpath=yes 2009 ;; 2010 2011openbsd*) 2012 version_type=sunos 2013 need_lib_prefix=no 2014 need_version=yes 2015 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2016 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2017 shlibpath_var=LD_LIBRARY_PATH 2018 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2019 case $host_os in 2020 openbsd2.[[89]] | openbsd2.[[89]].*) 2021 shlibpath_overrides_runpath=no 2022 ;; 2023 *) 2024 shlibpath_overrides_runpath=yes 2025 ;; 2026 esac 2027 else 2028 shlibpath_overrides_runpath=yes 2029 fi 2030 ;; 2031 2032os2*) 2033 libname_spec='$name' 2034 shrext=".dll" 2035 need_lib_prefix=no 2036 library_names_spec='$libname${shared_ext} $libname.a' 2037 dynamic_linker='OS/2 ld.exe' 2038 shlibpath_var=LIBPATH 2039 ;; 2040 2041osf3* | osf4* | osf5*) 2042 version_type=osf 2043 need_lib_prefix=no 2044 need_version=no 2045 soname_spec='${libname}${release}${shared_ext}$major' 2046 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2047 shlibpath_var=LD_LIBRARY_PATH 2048 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2049 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2050 ;; 2051 2052sco3.2v5*) 2053 version_type=osf 2054 soname_spec='${libname}${release}${shared_ext}$major' 2055 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2056 shlibpath_var=LD_LIBRARY_PATH 2057 ;; 2058 2059solaris*) 2060 version_type=linux 2061 need_lib_prefix=no 2062 need_version=no 2063 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2064 soname_spec='${libname}${release}${shared_ext}$major' 2065 shlibpath_var=LD_LIBRARY_PATH 2066 shlibpath_overrides_runpath=yes 2067 hardcode_into_libs=yes 2068 # ldd complains unless libraries are executable 2069 postinstall_cmds='chmod +x $lib' 2070 ;; 2071 2072sunos4*) 2073 version_type=sunos 2074 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2075 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2076 shlibpath_var=LD_LIBRARY_PATH 2077 shlibpath_overrides_runpath=yes 2078 if test "$with_gnu_ld" = yes; then 2079 need_lib_prefix=no 2080 fi 2081 need_version=yes 2082 ;; 2083 2084sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 2085 version_type=linux 2086 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2087 soname_spec='${libname}${release}${shared_ext}$major' 2088 shlibpath_var=LD_LIBRARY_PATH 2089 case $host_vendor in 2090 sni) 2091 shlibpath_overrides_runpath=no 2092 need_lib_prefix=no 2093 export_dynamic_flag_spec='${wl}-Blargedynsym' 2094 runpath_var=LD_RUN_PATH 2095 ;; 2096 siemens) 2097 need_lib_prefix=no 2098 ;; 2099 motorola) 2100 need_lib_prefix=no 2101 need_version=no 2102 shlibpath_overrides_runpath=no 2103 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2104 ;; 2105 esac 2106 ;; 2107 2108sysv4*MP*) 2109 if test -d /usr/nec ;then 2110 version_type=linux 2111 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2112 soname_spec='$libname${shared_ext}.$major' 2113 shlibpath_var=LD_LIBRARY_PATH 2114 fi 2115 ;; 2116 2117uts4*) 2118 version_type=linux 2119 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2120 soname_spec='${libname}${release}${shared_ext}$major' 2121 shlibpath_var=LD_LIBRARY_PATH 2122 ;; 2123 2124*) 2125 dynamic_linker=no 2126 ;; 2127esac 2128AC_MSG_RESULT([$dynamic_linker]) 2129test "$dynamic_linker" = no && can_build_shared=no 2130])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 2131 2132 2133# _LT_AC_TAGCONFIG 2134# ---------------- 2135AC_DEFUN([_LT_AC_TAGCONFIG], 2136[AC_ARG_WITH([tags], 2137 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 2138 [include additional configurations @<:@automatic@:>@])], 2139 [tagnames="$withval"]) 2140 2141if test -f "$ltmain" && test -n "$tagnames"; then 2142 if test ! -f "${ofile}"; then 2143 AC_MSG_WARN([output file `$ofile' does not exist]) 2144 fi 2145 2146 if test -z "$LTCC"; then 2147 eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 2148 if test -z "$LTCC"; then 2149 AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 2150 else 2151 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 2152 fi 2153 fi 2154 2155 # Extract list of available tagged configurations in $ofile. 2156 # Note that this assumes the entire list is on one line. 2157 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 2158 2159 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2160 for tagname in $tagnames; do 2161 IFS="$lt_save_ifs" 2162 # Check whether tagname contains only valid characters 2163 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 2164 "") ;; 2165 *) AC_MSG_ERROR([invalid tag name: $tagname]) 2166 ;; 2167 esac 2168 2169 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 2170 then 2171 AC_MSG_ERROR([tag name \"$tagname\" already exists]) 2172 fi 2173 2174 # Update the list of available tags. 2175 if test -n "$tagname"; then 2176 echo appending configuration tag \"$tagname\" to $ofile 2177 2178 case $tagname in 2179 CXX) 2180 if test -n "$CXX" && test "X$CXX" != "Xno"; then 2181 AC_LIBTOOL_LANG_CXX_CONFIG 2182 else 2183 tagname="" 2184 fi 2185 ;; 2186 2187 F77) 2188 if test -n "$F77" && test "X$F77" != "Xno"; then 2189 AC_LIBTOOL_LANG_F77_CONFIG 2190 else 2191 tagname="" 2192 fi 2193 ;; 2194 2195 GCJ) 2196 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 2197 AC_LIBTOOL_LANG_GCJ_CONFIG 2198 else 2199 tagname="" 2200 fi 2201 ;; 2202 2203 RC) 2204 AC_LIBTOOL_LANG_RC_CONFIG 2205 ;; 2206 2207 *) 2208 AC_MSG_ERROR([Unsupported tag name: $tagname]) 2209 ;; 2210 esac 2211 2212 # Append the new tag name to the list of available tags. 2213 if test -n "$tagname" ; then 2214 available_tags="$available_tags $tagname" 2215 fi 2216 fi 2217 done 2218 IFS="$lt_save_ifs" 2219 2220 # Now substitute the updated list of available tags. 2221 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 2222 mv "${ofile}T" "$ofile" 2223 chmod +x "$ofile" 2224 else 2225 rm -f "${ofile}T" 2226 AC_MSG_ERROR([unable to update list of available tagged configurations.]) 2227 fi 2228fi 2229])# _LT_AC_TAGCONFIG 2230 2231 2232# AC_LIBTOOL_DLOPEN 2233# ----------------- 2234# enable checks for dlopen support 2235AC_DEFUN([AC_LIBTOOL_DLOPEN], 2236 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 2237])# AC_LIBTOOL_DLOPEN 2238 2239 2240# AC_LIBTOOL_WIN32_DLL 2241# -------------------- 2242# declare package support for building win32 dll's 2243AC_DEFUN([AC_LIBTOOL_WIN32_DLL], 2244[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 2245])# AC_LIBTOOL_WIN32_DLL 2246 2247 2248# AC_ENABLE_SHARED([DEFAULT]) 2249# --------------------------- 2250# implement the --enable-shared flag 2251# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2252AC_DEFUN([AC_ENABLE_SHARED], 2253[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 2254AC_ARG_ENABLE([shared], 2255 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 2256 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 2257 [p=${PACKAGE-default} 2258 case $enableval in 2259 yes) enable_shared=yes ;; 2260 no) enable_shared=no ;; 2261 *) 2262 enable_shared=no 2263 # Look at the argument we got. We use all the common list separators. 2264 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2265 for pkg in $enableval; do 2266 IFS="$lt_save_ifs" 2267 if test "X$pkg" = "X$p"; then 2268 enable_shared=yes 2269 fi 2270 done 2271 IFS="$lt_save_ifs" 2272 ;; 2273 esac], 2274 [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 2275])# AC_ENABLE_SHARED 2276 2277 2278# AC_DISABLE_SHARED 2279# ----------------- 2280#- set the default shared flag to --disable-shared 2281AC_DEFUN([AC_DISABLE_SHARED], 2282[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2283AC_ENABLE_SHARED(no) 2284])# AC_DISABLE_SHARED 2285 2286 2287# AC_ENABLE_STATIC([DEFAULT]) 2288# --------------------------- 2289# implement the --enable-static flag 2290# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2291AC_DEFUN([AC_ENABLE_STATIC], 2292[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 2293AC_ARG_ENABLE([static], 2294 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2295 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 2296 [p=${PACKAGE-default} 2297 case $enableval in 2298 yes) enable_static=yes ;; 2299 no) enable_static=no ;; 2300 *) 2301 enable_static=no 2302 # Look at the argument we got. We use all the common list separators. 2303 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2304 for pkg in $enableval; do 2305 IFS="$lt_save_ifs" 2306 if test "X$pkg" = "X$p"; then 2307 enable_static=yes 2308 fi 2309 done 2310 IFS="$lt_save_ifs" 2311 ;; 2312 esac], 2313 [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2314])# AC_ENABLE_STATIC 2315 2316 2317# AC_DISABLE_STATIC 2318# ----------------- 2319# set the default static flag to --disable-static 2320AC_DEFUN([AC_DISABLE_STATIC], 2321[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2322AC_ENABLE_STATIC(no) 2323])# AC_DISABLE_STATIC 2324 2325 2326# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2327# --------------------------------- 2328# implement the --enable-fast-install flag 2329# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2330AC_DEFUN([AC_ENABLE_FAST_INSTALL], 2331[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2332AC_ARG_ENABLE([fast-install], 2333 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2334 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2335 [p=${PACKAGE-default} 2336 case $enableval in 2337 yes) enable_fast_install=yes ;; 2338 no) enable_fast_install=no ;; 2339 *) 2340 enable_fast_install=no 2341 # Look at the argument we got. We use all the common list separators. 2342 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2343 for pkg in $enableval; do 2344 IFS="$lt_save_ifs" 2345 if test "X$pkg" = "X$p"; then 2346 enable_fast_install=yes 2347 fi 2348 done 2349 IFS="$lt_save_ifs" 2350 ;; 2351 esac], 2352 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2353])# AC_ENABLE_FAST_INSTALL 2354 2355 2356# AC_DISABLE_FAST_INSTALL 2357# ----------------------- 2358# set the default to --disable-fast-install 2359AC_DEFUN([AC_DISABLE_FAST_INSTALL], 2360[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2361AC_ENABLE_FAST_INSTALL(no) 2362])# AC_DISABLE_FAST_INSTALL 2363 2364 2365# AC_LIBTOOL_PICMODE([MODE]) 2366# -------------------------- 2367# implement the --with-pic flag 2368# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2369AC_DEFUN([AC_LIBTOOL_PICMODE], 2370[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2371pic_mode=ifelse($#,1,$1,default) 2372])# AC_LIBTOOL_PICMODE 2373 2374 2375# AC_PROG_EGREP 2376# ------------- 2377# This is predefined starting with Autoconf 2.54, so this conditional 2378# definition can be removed once we require Autoconf 2.54 or later. 2379m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2380[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2381 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2382 then ac_cv_prog_egrep='grep -E' 2383 else ac_cv_prog_egrep='egrep' 2384 fi]) 2385 EGREP=$ac_cv_prog_egrep 2386 AC_SUBST([EGREP]) 2387])]) 2388 2389 2390# AC_PATH_TOOL_PREFIX 2391# ------------------- 2392# find a file program which can recognise shared library 2393AC_DEFUN([AC_PATH_TOOL_PREFIX], 2394[AC_REQUIRE([AC_PROG_EGREP])dnl 2395AC_MSG_CHECKING([for $1]) 2396AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2397[case $MAGIC_CMD in 2398[[\\/*] | ?:[\\/]*]) 2399 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2400 ;; 2401*) 2402 lt_save_MAGIC_CMD="$MAGIC_CMD" 2403 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2404dnl $ac_dummy forces splitting on constant user-supplied paths. 2405dnl POSIX.2 word splitting is done only on the output of word expansions, 2406dnl not every word. This closes a longstanding sh security hole. 2407 ac_dummy="ifelse([$2], , $PATH, [$2])" 2408 for ac_dir in $ac_dummy; do 2409 IFS="$lt_save_ifs" 2410 test -z "$ac_dir" && ac_dir=. 2411 if test -f $ac_dir/$1; then 2412 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2413 if test -n "$file_magic_test_file"; then 2414 case $deplibs_check_method in 2415 "file_magic "*) 2416 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" 2417 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2418 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2419 $EGREP "$file_magic_regex" > /dev/null; then 2420 : 2421 else 2422 cat <<EOF 1>&2 2423 2424*** Warning: the command libtool uses to detect shared libraries, 2425*** $file_magic_cmd, produces output that libtool cannot recognize. 2426*** The result is that libtool may fail to recognize shared libraries 2427*** as such. This will affect the creation of libtool libraries that 2428*** depend on shared libraries, but programs linked with such libtool 2429*** libraries will work regardless of this problem. Nevertheless, you 2430*** may want to report the problem to your system manager and/or to 2431*** bug-libtool@gnu.org 2432 2433EOF 2434 fi ;; 2435 esac 2436 fi 2437 break 2438 fi 2439 done 2440 IFS="$lt_save_ifs" 2441 MAGIC_CMD="$lt_save_MAGIC_CMD" 2442 ;; 2443esac]) 2444MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2445if test -n "$MAGIC_CMD"; then 2446 AC_MSG_RESULT($MAGIC_CMD) 2447else 2448 AC_MSG_RESULT(no) 2449fi 2450])# AC_PATH_TOOL_PREFIX 2451 2452 2453# AC_PATH_MAGIC 2454# ------------- 2455# find a file program which can recognise a shared library 2456AC_DEFUN([AC_PATH_MAGIC], 2457[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2458if test -z "$lt_cv_path_MAGIC_CMD"; then 2459 if test -n "$ac_tool_prefix"; then 2460 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2461 else 2462 MAGIC_CMD=: 2463 fi 2464fi 2465])# AC_PATH_MAGIC 2466 2467 2468# AC_PROG_LD 2469# ---------- 2470# find the pathname to the GNU or non-GNU linker 2471AC_DEFUN([AC_PROG_LD], 2472[AC_ARG_WITH([gnu-ld], 2473 [AC_HELP_STRING([--with-gnu-ld], 2474 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2475 [test "$withval" = no || with_gnu_ld=yes], 2476 [with_gnu_ld=no]) 2477AC_REQUIRE([LT_AC_PROG_SED])dnl 2478AC_REQUIRE([AC_PROG_CC])dnl 2479AC_REQUIRE([AC_CANONICAL_HOST])dnl 2480AC_REQUIRE([AC_CANONICAL_BUILD])dnl 2481ac_prog=ld 2482if test "$GCC" = yes; then 2483 # Check if gcc -print-prog-name=ld gives a path. 2484 AC_MSG_CHECKING([for ld used by $CC]) 2485 case $host in 2486 *-*-mingw*) 2487 # gcc leaves a trailing carriage return which upsets mingw 2488 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2489 *) 2490 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2491 esac 2492 case $ac_prog in 2493 # Accept absolute paths. 2494 [[\\/]]* | ?:[[\\/]]*) 2495 re_direlt='/[[^/]][[^/]]*/\.\./' 2496 # Canonicalize the pathname of ld 2497 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 2498 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2499 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 2500 done 2501 test -z "$LD" && LD="$ac_prog" 2502 ;; 2503 "") 2504 # If it fails, then pretend we aren't using GCC. 2505 ac_prog=ld 2506 ;; 2507 *) 2508 # If it is relative, then search for the first ld in PATH. 2509 with_gnu_ld=unknown 2510 ;; 2511 esac 2512elif test "$with_gnu_ld" = yes; then 2513 AC_MSG_CHECKING([for GNU ld]) 2514else 2515 AC_MSG_CHECKING([for non-GNU ld]) 2516fi 2517AC_CACHE_VAL(lt_cv_path_LD, 2518[if test -z "$LD"; then 2519 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2520 for ac_dir in $PATH; do 2521 IFS="$lt_save_ifs" 2522 test -z "$ac_dir" && ac_dir=. 2523 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2524 lt_cv_path_LD="$ac_dir/$ac_prog" 2525 # Check to see if the program is GNU ld. I'd rather use --version, 2526 # but apparently some GNU ld's only accept -v. 2527 # Break only if it was the GNU/non-GNU ld that we prefer. 2528 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2529 *GNU* | *'with BFD'*) 2530 test "$with_gnu_ld" != no && break 2531 ;; 2532 *) 2533 test "$with_gnu_ld" != yes && break 2534 ;; 2535 esac 2536 fi 2537 done 2538 IFS="$lt_save_ifs" 2539else 2540 lt_cv_path_LD="$LD" # Let the user override the test with a path. 2541fi]) 2542LD="$lt_cv_path_LD" 2543if test -n "$LD"; then 2544 AC_MSG_RESULT($LD) 2545else 2546 AC_MSG_RESULT(no) 2547fi 2548test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2549AC_PROG_LD_GNU 2550])# AC_PROG_LD 2551 2552 2553# AC_PROG_LD_GNU 2554# -------------- 2555AC_DEFUN([AC_PROG_LD_GNU], 2556[AC_REQUIRE([AC_PROG_EGREP])dnl 2557AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2558[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 2559case `$LD -v 2>&1 </dev/null` in 2560*GNU* | *'with BFD'*) 2561 lt_cv_prog_gnu_ld=yes 2562 ;; 2563*) 2564 lt_cv_prog_gnu_ld=no 2565 ;; 2566esac]) 2567with_gnu_ld=$lt_cv_prog_gnu_ld 2568])# AC_PROG_LD_GNU 2569 2570 2571# AC_PROG_LD_RELOAD_FLAG 2572# ---------------------- 2573# find reload flag for linker 2574# -- PORTME Some linkers may need a different reload flag. 2575AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2576[AC_CACHE_CHECK([for $LD option to reload object files], 2577 lt_cv_ld_reload_flag, 2578 [lt_cv_ld_reload_flag='-r']) 2579reload_flag=$lt_cv_ld_reload_flag 2580case $reload_flag in 2581"" | " "*) ;; 2582*) reload_flag=" $reload_flag" ;; 2583esac 2584reload_cmds='$LD$reload_flag -o $output$reload_objs' 2585])# AC_PROG_LD_RELOAD_FLAG 2586 2587 2588# AC_DEPLIBS_CHECK_METHOD 2589# ----------------------- 2590# how to check for library dependencies 2591# -- PORTME fill in with the dynamic library characteristics 2592AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2593[AC_CACHE_CHECK([how to recognise dependent libraries], 2594lt_cv_deplibs_check_method, 2595[lt_cv_file_magic_cmd='$MAGIC_CMD' 2596lt_cv_file_magic_test_file= 2597lt_cv_deplibs_check_method='unknown' 2598# Need to set the preceding variable on all platforms that support 2599# interlibrary dependencies. 2600# 'none' -- dependencies not supported. 2601# `unknown' -- same as none, but documents that we really don't know. 2602# 'pass_all' -- all dependencies passed with no checks. 2603# 'test_compile' -- check by making test program. 2604# 'file_magic [[regex]]' -- check by looking for files in library path 2605# which responds to the $file_magic_cmd with a given extended regex. 2606# If you have `file' or equivalent on your system and you're not sure 2607# whether `pass_all' will *always* work, you probably want this one. 2608 2609case $host_os in 2610aix4* | aix5*) 2611 lt_cv_deplibs_check_method=pass_all 2612 ;; 2613 2614beos*) 2615 lt_cv_deplibs_check_method=pass_all 2616 ;; 2617 2618bsdi4*) 2619 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 2620 lt_cv_file_magic_cmd='/usr/bin/file -L' 2621 lt_cv_file_magic_test_file=/shlib/libc.so 2622 ;; 2623 2624cygwin*) 2625 # win32_libid is a shell function defined in ltmain.sh 2626 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 2627 lt_cv_file_magic_cmd='win32_libid' 2628 ;; 2629 2630mingw* | pw32*) 2631 # Base MSYS/MinGW do not provide the 'file' command needed by 2632 # win32_libid shell function, so use a weaker test based on 'objdump'. 2633 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2634 lt_cv_file_magic_cmd='$OBJDUMP -f' 2635 ;; 2636 2637darwin* | rhapsody*) 2638 lt_cv_deplibs_check_method=pass_all 2639 ;; 2640 2641freebsd* | kfreebsd*-gnu) 2642 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2643 case $host_cpu in 2644 i*86 ) 2645 # Not sure whether the presence of OpenBSD here was a mistake. 2646 # Let's accept both of them until this is cleared up. 2647 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' 2648 lt_cv_file_magic_cmd=/usr/bin/file 2649 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2650 ;; 2651 esac 2652 else 2653 lt_cv_deplibs_check_method=pass_all 2654 fi 2655 ;; 2656 2657gnu*) 2658 lt_cv_deplibs_check_method=pass_all 2659 ;; 2660 2661hpux10.20* | hpux11*) 2662 lt_cv_file_magic_cmd=/usr/bin/file 2663 case "$host_cpu" in 2664 ia64*) 2665 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 2666 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2667 ;; 2668 hppa*64*) 2669 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 2670 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 2671 ;; 2672 *) 2673 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 2674 lt_cv_file_magic_test_file=/usr/lib/libc.sl 2675 ;; 2676 esac 2677 ;; 2678 2679irix5* | irix6* | nonstopux*) 2680 case $LD in 2681 *-32|*"-32 ") libmagic=32-bit;; 2682 *-n32|*"-n32 ") libmagic=N32;; 2683 *-64|*"-64 ") libmagic=64-bit;; 2684 *) libmagic=never-match;; 2685 esac 2686 lt_cv_deplibs_check_method=pass_all 2687 ;; 2688 2689# This must be Linux ELF. 2690linux*) 2691 case $host_cpu in 2692 alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*) 2693 lt_cv_deplibs_check_method=pass_all ;; 2694 *) 2695 # glibc up to 2.1.1 does not perform some relocations on ARM 2696 # this will be overridden with pass_all, but let us keep it just in case 2697 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; 2698 esac 2699 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` 2700 lt_cv_deplibs_check_method=pass_all 2701 ;; 2702 2703netbsd*) 2704 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2705 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 2706 else 2707 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 2708 fi 2709 ;; 2710 2711newos6*) 2712 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 2713 lt_cv_file_magic_cmd=/usr/bin/file 2714 lt_cv_file_magic_test_file=/usr/lib/libnls.so 2715 ;; 2716 2717nto-qnx*) 2718 lt_cv_deplibs_check_method=unknown 2719 ;; 2720 2721openbsd*) 2722 lt_cv_file_magic_cmd=/usr/bin/file 2723 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2724 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2725 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' 2726 else 2727 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' 2728 fi 2729 ;; 2730 2731osf3* | osf4* | osf5*) 2732 lt_cv_deplibs_check_method=pass_all 2733 ;; 2734 2735sco3.2v5*) 2736 lt_cv_deplibs_check_method=pass_all 2737 ;; 2738 2739solaris*) 2740 lt_cv_deplibs_check_method=pass_all 2741 ;; 2742 2743sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 2744 case $host_vendor in 2745 motorola) 2746 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]]' 2747 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2748 ;; 2749 ncr) 2750 lt_cv_deplibs_check_method=pass_all 2751 ;; 2752 sequent) 2753 lt_cv_file_magic_cmd='/bin/file' 2754 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 2755 ;; 2756 sni) 2757 lt_cv_file_magic_cmd='/bin/file' 2758 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 2759 lt_cv_file_magic_test_file=/lib/libc.so 2760 ;; 2761 siemens) 2762 lt_cv_deplibs_check_method=pass_all 2763 ;; 2764 esac 2765 ;; 2766 2767sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) 2768 lt_cv_deplibs_check_method=pass_all 2769 ;; 2770esac 2771]) 2772file_magic_cmd=$lt_cv_file_magic_cmd 2773deplibs_check_method=$lt_cv_deplibs_check_method 2774test -z "$deplibs_check_method" && deplibs_check_method=unknown 2775])# AC_DEPLIBS_CHECK_METHOD 2776 2777 2778# AC_PROG_NM 2779# ---------- 2780# find the pathname to a BSD-compatible name lister 2781AC_DEFUN([AC_PROG_NM], 2782[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 2783[if test -n "$NM"; then 2784 # Let the user override the test. 2785 lt_cv_path_NM="$NM" 2786else 2787 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2788 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do 2789 IFS="$lt_save_ifs" 2790 test -z "$ac_dir" && ac_dir=. 2791 tmp_nm="$ac_dir/${ac_tool_prefix}nm" 2792 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 2793 # Check to see if the nm accepts a BSD-compat flag. 2794 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2795 # nm: unknown option "B" ignored 2796 # Tru64's nm complains that /dev/null is an invalid object file 2797 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 2798 */dev/null* | *'Invalid file or object type'*) 2799 lt_cv_path_NM="$tmp_nm -B" 2800 break 2801 ;; 2802 *) 2803 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 2804 */dev/null*) 2805 lt_cv_path_NM="$tmp_nm -p" 2806 break 2807 ;; 2808 *) 2809 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 2810 continue # so that we can try to find one that supports BSD flags 2811 ;; 2812 esac 2813 esac 2814 fi 2815 done 2816 IFS="$lt_save_ifs" 2817 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 2818fi]) 2819NM="$lt_cv_path_NM" 2820])# AC_PROG_NM 2821 2822 2823# AC_CHECK_LIBM 2824# ------------- 2825# check for math library 2826AC_DEFUN([AC_CHECK_LIBM], 2827[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2828LIBM= 2829case $host in 2830*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 2831 # These system don't have libm, or don't need it 2832 ;; 2833*-ncr-sysv4.3*) 2834 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2835 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 2836 ;; 2837*) 2838 AC_CHECK_LIB(m, cos, LIBM="-lm") 2839 ;; 2840esac 2841])# AC_CHECK_LIBM 2842 2843 2844# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 2845# ----------------------------------- 2846# sets LIBLTDL to the link flags for the libltdl convenience library and 2847# LTDLINCL to the include flags for the libltdl header and adds 2848# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL 2849# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If 2850# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will 2851# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with 2852# '${top_srcdir}/' (note the single quotes!). If your package is not 2853# flat and you're not using automake, define top_builddir and 2854# top_srcdir appropriately in the Makefiles. 2855AC_DEFUN([AC_LIBLTDL_CONVENIENCE], 2856[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2857 case $enable_ltdl_convenience in 2858 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2859 "") enable_ltdl_convenience=yes 2860 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2861 esac 2862 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2863 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2864 # For backwards non-gettext consistent compatibility... 2865 INCLTDL="$LTDLINCL" 2866])# AC_LIBLTDL_CONVENIENCE 2867 2868 2869# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 2870# ----------------------------------- 2871# sets LIBLTDL to the link flags for the libltdl installable library and 2872# LTDLINCL to the include flags for the libltdl header and adds 2873# --enable-ltdl-install to the configure arguments. Note that LIBLTDL 2874# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If 2875# DIRECTORY is not provided and an installed libltdl is not found, it is 2876# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' 2877# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single 2878# quotes!). If your package is not flat and you're not using automake, 2879# define top_builddir and top_srcdir appropriately in the Makefiles. 2880# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2881AC_DEFUN([AC_LIBLTDL_INSTALLABLE], 2882[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2883 AC_CHECK_LIB(ltdl, lt_dlinit, 2884 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2885 [if test x"$enable_ltdl_install" = xno; then 2886 AC_MSG_WARN([libltdl not installed, but installation disabled]) 2887 else 2888 enable_ltdl_install=yes 2889 fi 2890 ]) 2891 if test x"$enable_ltdl_install" = x"yes"; then 2892 ac_configure_args="$ac_configure_args --enable-ltdl-install" 2893 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2894 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2895 else 2896 ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2897 LIBLTDL="-lltdl" 2898 LTDLINCL= 2899 fi 2900 # For backwards non-gettext consistent compatibility... 2901 INCLTDL="$LTDLINCL" 2902])# AC_LIBLTDL_INSTALLABLE 2903 2904 2905# AC_LIBTOOL_CXX 2906# -------------- 2907# enable support for C++ libraries 2908AC_DEFUN([AC_LIBTOOL_CXX], 2909[AC_REQUIRE([_LT_AC_LANG_CXX]) 2910])# AC_LIBTOOL_CXX 2911 2912 2913# _LT_AC_LANG_CXX 2914# --------------- 2915AC_DEFUN([_LT_AC_LANG_CXX], 2916[AC_REQUIRE([AC_PROG_CXX]) 2917AC_REQUIRE([AC_PROG_CXXCPP]) 2918_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 2919])# _LT_AC_LANG_CXX 2920 2921 2922# AC_LIBTOOL_F77 2923# -------------- 2924# enable support for Fortran 77 libraries 2925AC_DEFUN([AC_LIBTOOL_F77], 2926[AC_REQUIRE([_LT_AC_LANG_F77]) 2927])# AC_LIBTOOL_F77 2928 2929 2930# _LT_AC_LANG_F77 2931# --------------- 2932AC_DEFUN([_LT_AC_LANG_F77], 2933[AC_REQUIRE([AC_PROG_F77]) 2934_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 2935])# _LT_AC_LANG_F77 2936 2937 2938# AC_LIBTOOL_GCJ 2939# -------------- 2940# enable support for GCJ libraries 2941AC_DEFUN([AC_LIBTOOL_GCJ], 2942[AC_REQUIRE([_LT_AC_LANG_GCJ]) 2943])# AC_LIBTOOL_GCJ 2944 2945 2946# _LT_AC_LANG_GCJ 2947# --------------- 2948AC_DEFUN([_LT_AC_LANG_GCJ], 2949[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 2950 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 2951 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 2952 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 2953 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 2954 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 2955_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 2956])# _LT_AC_LANG_GCJ 2957 2958 2959# AC_LIBTOOL_RC 2960# -------------- 2961# enable support for Windows resource files 2962AC_DEFUN([AC_LIBTOOL_RC], 2963[AC_REQUIRE([LT_AC_PROG_RC]) 2964_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 2965])# AC_LIBTOOL_RC 2966 2967 2968# AC_LIBTOOL_LANG_C_CONFIG 2969# ------------------------ 2970# Ensure that the configuration vars for the C compiler are 2971# suitably defined. Those variables are subsequently used by 2972# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 2973AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 2974AC_DEFUN([_LT_AC_LANG_C_CONFIG], 2975[lt_save_CC="$CC" 2976AC_LANG_PUSH(C) 2977 2978# Source file extension for C test sources. 2979ac_ext=c 2980 2981# Object file extension for compiled C test sources. 2982objext=o 2983_LT_AC_TAGVAR(objext, $1)=$objext 2984 2985# Code to be used in simple compile tests 2986lt_simple_compile_test_code="int some_variable = 0;\n" 2987 2988# Code to be used in simple link tests 2989lt_simple_link_test_code='int main(){return(0);}\n' 2990 2991_LT_AC_SYS_COMPILER 2992 2993# 2994# Check for any special shared library compilation flags. 2995# 2996_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= 2997if test "$GCC" = no; then 2998 case $host_os in 2999 sco3.2v5*) 3000 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' 3001 ;; 3002 esac 3003fi 3004if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then 3005 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) 3006 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : 3007 else 3008 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) 3009 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no 3010 fi 3011fi 3012 3013 3014# 3015# Check to make sure the static flag actually works. 3016# 3017AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], 3018 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 3019 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), 3020 [], 3021 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 3022 3023 3024AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 3025AC_LIBTOOL_PROG_COMPILER_PIC($1) 3026AC_LIBTOOL_PROG_CC_C_O($1) 3027AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3028AC_LIBTOOL_PROG_LD_SHLIBS($1) 3029AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3030AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3031AC_LIBTOOL_SYS_LIB_STRIP 3032AC_LIBTOOL_DLOPEN_SELF($1) 3033 3034# Report which librarie types wil actually be built 3035AC_MSG_CHECKING([if libtool supports shared libraries]) 3036AC_MSG_RESULT([$can_build_shared]) 3037 3038AC_MSG_CHECKING([whether to build shared libraries]) 3039test "$can_build_shared" = "no" && enable_shared=no 3040 3041# On AIX, shared libraries and static libraries use the same namespace, and 3042# are all built from PIC. 3043case "$host_os" in 3044aix3*) 3045 test "$enable_shared" = yes && enable_static=no 3046 if test -n "$RANLIB"; then 3047 archive_cmds="$archive_cmds~\$RANLIB \$lib" 3048 postinstall_cmds='$RANLIB $lib' 3049 fi 3050 ;; 3051 3052aix4*) 3053 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 3054 test "$enable_shared" = yes && enable_static=no 3055 fi 3056 ;; 3057 darwin* | rhapsody*) 3058 if test "$GCC" = yes; then 3059 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3060 case "$host_os" in 3061 rhapsody* | darwin1.[[012]]) 3062 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' 3063 ;; 3064 *) # Darwin 1.3 on 3065 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 3066 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' 3067 else 3068 case ${MACOSX_DEPLOYMENT_TARGET} in 3069 10.[[012]]) 3070 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' 3071 ;; 3072 10.*) 3073 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' 3074 ;; 3075 esac 3076 fi 3077 ;; 3078 esac 3079 output_verbose_link_cmd='echo' 3080 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' 3081 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3082 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's 3083 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3084 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3085 _LT_AC_TAGVAR(hardcode_direct, $1)=no 3086 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3087 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3088 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' 3089 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3090 else 3091 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3092 fi 3093 ;; 3094esac 3095AC_MSG_RESULT([$enable_shared]) 3096 3097AC_MSG_CHECKING([whether to build static libraries]) 3098# Make sure either enable_shared or enable_static is yes. 3099test "$enable_shared" = yes || enable_static=yes 3100AC_MSG_RESULT([$enable_static]) 3101 3102AC_LIBTOOL_CONFIG($1) 3103 3104AC_LANG_POP 3105CC="$lt_save_CC" 3106])# AC_LIBTOOL_LANG_C_CONFIG 3107 3108 3109# AC_LIBTOOL_LANG_CXX_CONFIG 3110# -------------------------- 3111# Ensure that the configuration vars for the C compiler are 3112# suitably defined. Those variables are subsequently used by 3113# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3114AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 3115AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 3116[AC_LANG_PUSH(C++) 3117AC_REQUIRE([AC_PROG_CXX]) 3118AC_REQUIRE([AC_PROG_CXXCPP]) 3119 3120_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3121_LT_AC_TAGVAR(allow_undefined_flag, $1)= 3122_LT_AC_TAGVAR(always_export_symbols, $1)=no 3123_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 3124_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 3125_LT_AC_TAGVAR(hardcode_direct, $1)=no 3126_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 3127_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 3128_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3129_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 3130_LT_AC_TAGVAR(hardcode_automatic, $1)=no 3131_LT_AC_TAGVAR(module_cmds, $1)= 3132_LT_AC_TAGVAR(module_expsym_cmds, $1)= 3133_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 3134_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 3135_LT_AC_TAGVAR(no_undefined_flag, $1)= 3136_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 3137_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 3138 3139# Dependencies to place before and after the object being linked: 3140_LT_AC_TAGVAR(predep_objects, $1)= 3141_LT_AC_TAGVAR(postdep_objects, $1)= 3142_LT_AC_TAGVAR(predeps, $1)= 3143_LT_AC_TAGVAR(postdeps, $1)= 3144_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 3145 3146# Source file extension for C++ test sources. 3147ac_ext=cc 3148 3149# Object file extension for compiled C++ test sources. 3150objext=o 3151_LT_AC_TAGVAR(objext, $1)=$objext 3152 3153# Code to be used in simple compile tests 3154lt_simple_compile_test_code="int some_variable = 0;\n" 3155 3156# Code to be used in simple link tests 3157lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' 3158 3159# ltmain only uses $CC for tagged configurations so make sure $CC is set. 3160_LT_AC_SYS_COMPILER 3161 3162# Allow CC to be a program name with arguments. 3163lt_save_CC=$CC 3164lt_save_LD=$LD 3165lt_save_GCC=$GCC 3166GCC=$GXX 3167lt_save_with_gnu_ld=$with_gnu_ld 3168lt_save_path_LD=$lt_cv_path_LD 3169if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 3170 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 3171else 3172 unset lt_cv_prog_gnu_ld 3173fi 3174if test -n "${lt_cv_path_LDCXX+set}"; then 3175 lt_cv_path_LD=$lt_cv_path_LDCXX 3176else 3177 unset lt_cv_path_LD 3178fi 3179test -z "${LDCXX+set}" || LD=$LDCXX 3180CC=${CXX-"c++"} 3181compiler=$CC 3182_LT_AC_TAGVAR(compiler, $1)=$CC 3183cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` 3184 3185# We don't want -fno-exception wen compiling C++ code, so set the 3186# no_builtin_flag separately 3187if test "$GXX" = yes; then 3188 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 3189else 3190 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3191fi 3192 3193if test "$GXX" = yes; then 3194 # Set up default GNU C++ configuration 3195 3196 AC_PROG_LD 3197 3198 # Check if GNU C++ uses GNU ld as the underlying linker, since the 3199 # archiving commands below assume that GNU ld is being used. 3200 if test "$with_gnu_ld" = yes; then 3201 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3202 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 3203 3204 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3205 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3206 3207 # If archive_cmds runs LD, not CC, wlarc should be empty 3208 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 3209 # investigate it a little bit more. (MM) 3210 wlarc='${wl}' 3211 3212 # ancient GNU ld didn't support --whole-archive et. al. 3213 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 3214 grep 'no-whole-archive' > /dev/null; then 3215 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3216 else 3217 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 3218 fi 3219 else 3220 with_gnu_ld=no 3221 wlarc= 3222 3223 # A generic and very simple default shared library creation 3224 # command for GNU C++ for the case where it uses the native 3225 # linker, instead of GNU ld. If possible, this setting should 3226 # overridden to take advantage of the native linker features on 3227 # the platform it is being used on. 3228 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3229 fi 3230 3231 # Commands to make compiler produce verbose output that lists 3232 # what "hidden" libraries, object files and flags are used when 3233 # linking a shared library. 3234 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3235 3236else 3237 GXX=no 3238 with_gnu_ld=no 3239 wlarc= 3240fi 3241 3242# PORTME: fill in a description of your system's C++ link characteristics 3243AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 3244_LT_AC_TAGVAR(ld_shlibs, $1)=yes 3245case $host_os in 3246 aix3*) 3247 # FIXME: insert proper C++ library support 3248 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3249 ;; 3250 aix4* | aix5*) 3251 if test "$host_cpu" = ia64; then 3252 # On IA64, the linker does run time linking by default, so we don't 3253 # have to do anything special. 3254 aix_use_runtimelinking=no 3255 exp_sym_flag='-Bexport' 3256 no_entry_flag="" 3257 else 3258 aix_use_runtimelinking=no 3259 3260 # Test if we are trying to use run time linking or normal 3261 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 3262 # need to do runtime linking. 3263 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 3264 for ld_flag in $LDFLAGS; do 3265 case $ld_flag in 3266 *-brtl*) 3267 aix_use_runtimelinking=yes 3268 break 3269 ;; 3270 esac 3271 done 3272 esac 3273 3274 exp_sym_flag='-bexport' 3275 no_entry_flag='-bnoentry' 3276 fi 3277 3278 # When large executables or shared objects are built, AIX ld can 3279 # have problems creating the table of contents. If linking a library 3280 # or program results in "error TOC overflow" add -mminimal-toc to 3281 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 3282 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 3283 3284 _LT_AC_TAGVAR(archive_cmds, $1)='' 3285 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3286 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3287 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3288 3289 if test "$GXX" = yes; then 3290 case $host_os in aix4.[012]|aix4.[012].*) 3291 # We only want to do this on AIX 4.2 and lower, the check 3292 # below for broken collect2 doesn't work under 4.3+ 3293 collect2name=`${CC} -print-prog-name=collect2` 3294 if test -f "$collect2name" && \ 3295 strings "$collect2name" | grep resolve_lib_name >/dev/null 3296 then 3297 # We have reworked collect2 3298 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3299 else 3300 # We have old collect2 3301 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 3302 # It fails to find uninstalled libraries when the uninstalled 3303 # path is not listed in the libpath. Setting hardcode_minus_L 3304 # to unsupported forces relinking 3305 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 3306 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3307 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3308 fi 3309 esac 3310 shared_flag='-shared' 3311 else 3312 # not using gcc 3313 if test "$host_cpu" = ia64; then 3314 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 3315 # chokes on -Wl,-G. The following line is correct: 3316 shared_flag='-G' 3317 else 3318 if test "$aix_use_runtimelinking" = yes; then 3319 shared_flag='${wl}-G' 3320 else 3321 shared_flag='${wl}-bM:SRE' 3322 fi 3323 fi 3324 fi 3325 3326 # It seems that -bexpall does not export symbols beginning with 3327 # underscore (_), so it is better to generate a list of symbols to export. 3328 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3329 if test "$aix_use_runtimelinking" = yes; then 3330 # Warning - without using the other runtime loading flags (-brtl), 3331 # -berok will link without error, but may produce a broken library. 3332 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3333 # Determine the default libpath from the value encoded in an empty executable. 3334 _LT_AC_SYS_LIBPATH_AIX 3335 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3336 3337 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" 3338 else 3339 if test "$host_cpu" = ia64; then 3340 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3341 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3342 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 3343 else 3344 # Determine the default libpath from the value encoded in an empty executable. 3345 _LT_AC_SYS_LIBPATH_AIX 3346 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3347 # Warning - without using the other run time loading flags, 3348 # -berok will link without error, but may produce a broken library. 3349 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3350 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3351 # -bexpall does not export symbols beginning with underscore (_) 3352 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3353 # Exported symbols can be pulled into shared objects from archives 3354 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' 3355 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3356 # This is similar to how AIX traditionally builds it's shared libraries. 3357 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 3358 fi 3359 fi 3360 ;; 3361 chorus*) 3362 case $cc_basename in 3363 *) 3364 # FIXME: insert proper C++ library support 3365 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3366 ;; 3367 esac 3368 ;; 3369 3370 cygwin* | mingw* | pw32*) 3371 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3372 # as there is no search path for DLLs. 3373 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3374 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3375 _LT_AC_TAGVAR(always_export_symbols, $1)=no 3376 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3377 3378 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3379 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 3380 # If the export-symbols file already is a .def file (1st line 3381 # is EXPORTS), use it as is; otherwise, prepend... 3382 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3383 cp $export_symbols $output_objdir/$soname.def; 3384 else 3385 echo EXPORTS > $output_objdir/$soname.def; 3386 cat $export_symbols >> $output_objdir/$soname.def; 3387 fi~ 3388 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 3389 else 3390 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3391 fi 3392 ;; 3393 3394 darwin* | rhapsody*) 3395 if test "$GXX" = yes; then 3396 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3397 case "$host_os" in 3398 rhapsody* | darwin1.[[012]]) 3399 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' 3400 ;; 3401 *) # Darwin 1.3 on 3402 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 3403 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' 3404 else 3405 case ${MACOSX_DEPLOYMENT_TARGET} in 3406 10.[[012]]) 3407 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' 3408 ;; 3409 10.*) 3410 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' 3411 ;; 3412 esac 3413 fi 3414 ;; 3415 esac 3416 lt_int_apple_cc_single_mod=no 3417 output_verbose_link_cmd='echo' 3418 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then 3419 lt_int_apple_cc_single_mod=yes 3420 fi 3421 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3422 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 3423 else 3424 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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' 3425 fi 3426 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3427 3428 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's 3429 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3430 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3431 else 3432 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3433 fi 3434 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3435 _LT_AC_TAGVAR(hardcode_direct, $1)=no 3436 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3437 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3438 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' 3439 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3440 else 3441 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3442 fi 3443 ;; 3444 3445 dgux*) 3446 case $cc_basename in 3447 ec++) 3448 # FIXME: insert proper C++ library support 3449 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3450 ;; 3451 ghcx) 3452 # Green Hills C++ Compiler 3453 # FIXME: insert proper C++ library support 3454 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3455 ;; 3456 *) 3457 # FIXME: insert proper C++ library support 3458 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3459 ;; 3460 esac 3461 ;; 3462 freebsd[12]*) 3463 # C++ shared libraries reported to be fairly broken before switch to ELF 3464 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3465 ;; 3466 freebsd-elf*) 3467 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3468 ;; 3469 freebsd* | kfreebsd*-gnu) 3470 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 3471 # conventions 3472 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 3473 ;; 3474 gnu*) 3475 ;; 3476 hpux9*) 3477 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3478 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3479 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3480 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3481 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3482 # but as the default 3483 # location of the library. 3484 3485 case $cc_basename in 3486 CC) 3487 # FIXME: insert proper C++ library support 3488 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3489 ;; 3490 aCC) 3491 _LT_AC_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' 3492 # Commands to make compiler produce verbose output that lists 3493 # what "hidden" libraries, object files and flags are used when 3494 # linking a shared library. 3495 # 3496 # There doesn't appear to be a way to prevent this compiler from 3497 # explicitly linking system object files so we need to strip them 3498 # from the output so that they don't get included in the library 3499 # dependencies. 3500 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; echo $list' 3501 ;; 3502 *) 3503 if test "$GXX" = yes; then 3504 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 3505 else 3506 # FIXME: insert proper C++ library support 3507 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3508 fi 3509 ;; 3510 esac 3511 ;; 3512 hpux10*|hpux11*) 3513 if test $with_gnu_ld = no; then 3514 case "$host_cpu" in 3515 hppa*64*) 3516 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3517 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 3518 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3519 ;; 3520 ia64*) 3521 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3522 ;; 3523 *) 3524 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 3525 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3526 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 3527 ;; 3528 esac 3529 fi 3530 case "$host_cpu" in 3531 hppa*64*) 3532 _LT_AC_TAGVAR(hardcode_direct, $1)=no 3533 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3534 ;; 3535 ia64*) 3536 _LT_AC_TAGVAR(hardcode_direct, $1)=no 3537 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3538 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3539 # but as the default 3540 # location of the library. 3541 ;; 3542 *) 3543 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3544 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 3545 # but as the default 3546 # location of the library. 3547 ;; 3548 esac 3549 3550 case $cc_basename in 3551 CC) 3552 # FIXME: insert proper C++ library support 3553 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3554 ;; 3555 aCC) 3556 case "$host_cpu" in 3557 hppa*64*|ia64*) 3558 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' 3559 ;; 3560 *) 3561 _LT_AC_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' 3562 ;; 3563 esac 3564 # Commands to make compiler produce verbose output that lists 3565 # what "hidden" libraries, object files and flags are used when 3566 # linking a shared library. 3567 # 3568 # There doesn't appear to be a way to prevent this compiler from 3569 # explicitly linking system object files so we need to strip them 3570 # from the output so that they don't get included in the library 3571 # dependencies. 3572 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; echo $list' 3573 ;; 3574 *) 3575 if test "$GXX" = yes; then 3576 if test $with_gnu_ld = no; then 3577 case "$host_cpu" in 3578 ia64*|hppa*64*) 3579 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' 3580 ;; 3581 *) 3582 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3583 ;; 3584 esac 3585 fi 3586 else 3587 # FIXME: insert proper C++ library support 3588 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3589 fi 3590 ;; 3591 esac 3592 ;; 3593 irix5* | irix6*) 3594 case $cc_basename in 3595 CC) 3596 # SGI C++ 3597 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' 3598 3599 # Archives containing C++ object files must be created using 3600 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 3601 # necessary to make sure instantiated templates are included 3602 # in the archive. 3603 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 3604 ;; 3605 *) 3606 if test "$GXX" = yes; then 3607 if test "$with_gnu_ld" = no; then 3608 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 3609 else 3610 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' 3611 fi 3612 fi 3613 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3614 ;; 3615 esac 3616 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3617 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3618 ;; 3619 linux*) 3620 case $cc_basename in 3621 KCC) 3622 # Kuck and Associates, Inc. (KAI) C++ Compiler 3623 3624 # KCC will only create a shared library if the output file 3625 # ends with ".so" (or ".sl" for HP-UX), so rename the library 3626 # to its proper name (with version) after linking. 3627 _LT_AC_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' 3628 _LT_AC_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' 3629 # Commands to make compiler produce verbose output that lists 3630 # what "hidden" libraries, object files and flags are used when 3631 # linking a shared library. 3632 # 3633 # There doesn't appear to be a way to prevent this compiler from 3634 # explicitly linking system object files so we need to strip them 3635 # from the output so that they don't get included in the library 3636 # dependencies. 3637 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; echo $list' 3638 3639 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 3640 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3641 3642 # Archives containing C++ object files must be created using 3643 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3644 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3645 ;; 3646 icpc) 3647 # Intel C++ 3648 with_gnu_ld=yes 3649 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3650 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3651 _LT_AC_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' 3652 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3653 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3654 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 3655 ;; 3656 cxx) 3657 # Compaq C++ 3658 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3659 _LT_AC_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' 3660 3661 runpath_var=LD_RUN_PATH 3662 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3663 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3664 3665 # Commands to make compiler produce verbose output that lists 3666 # what "hidden" libraries, object files and flags are used when 3667 # linking a shared library. 3668 # 3669 # There doesn't appear to be a way to prevent this compiler from 3670 # explicitly linking system object files so we need to strip them 3671 # from the output so that they don't get included in the library 3672 # dependencies. 3673 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' 3674 ;; 3675 esac 3676 ;; 3677 lynxos*) 3678 # FIXME: insert proper C++ library support 3679 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3680 ;; 3681 m88k*) 3682 # FIXME: insert proper C++ library support 3683 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3684 ;; 3685 mvs*) 3686 case $cc_basename in 3687 cxx) 3688 # FIXME: insert proper C++ library support 3689 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3690 ;; 3691 *) 3692 # FIXME: insert proper C++ library support 3693 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3694 ;; 3695 esac 3696 ;; 3697 netbsd*) 3698 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3699 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 3700 wlarc= 3701 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3702 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3703 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3704 fi 3705 # Workaround some broken pre-1.5 toolchains 3706 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 3707 ;; 3708 osf3*) 3709 case $cc_basename in 3710 KCC) 3711 # Kuck and Associates, Inc. (KAI) C++ Compiler 3712 3713 # KCC will only create a shared library if the output file 3714 # ends with ".so" (or ".sl" for HP-UX), so rename the library 3715 # to its proper name (with version) after linking. 3716 _LT_AC_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' 3717 3718 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3719 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3720 3721 # Archives containing C++ object files must be created using 3722 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 3723 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 3724 3725 ;; 3726 RCC) 3727 # Rational C++ 2.4.1 3728 # FIXME: insert proper C++ library support 3729 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3730 ;; 3731 cxx) 3732 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3733 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' 3734 3735 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3736 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3737 3738 # Commands to make compiler produce verbose output that lists 3739 # what "hidden" libraries, object files and flags are used when 3740 # linking a shared library. 3741 # 3742 # There doesn't appear to be a way to prevent this compiler from 3743 # explicitly linking system object files so we need to strip them 3744 # from the output so that they don't get included in the library 3745 # dependencies. 3746 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' 3747 ;; 3748 *) 3749 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3750 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3751 _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 3752 3753 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3754 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3755 3756 # Commands to make compiler produce verbose output that lists 3757 # what "hidden" libraries, object files and flags are used when 3758 # linking a shared library. 3759 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3760 3761 else 3762 # FIXME: insert proper C++ library support 3763 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3764 fi 3765 ;; 3766 esac 3767 ;; 3768 osf4* | osf5*) 3769 case $cc_basename in 3770 KCC) 3771 # Kuck and Associates, Inc. (KAI) C++ Compiler 3772 3773 # KCC will only create a shared library if the output file 3774 # ends with ".so" (or ".sl" for HP-UX), so rename the library 3775 # to its proper name (with version) after linking. 3776 _LT_AC_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' 3777 3778 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 3779 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3780 3781 # Archives containing C++ object files must be created using 3782 # the KAI C++ compiler. 3783 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 3784 ;; 3785 RCC) 3786 # Rational C++ 2.4.1 3787 # FIXME: insert proper C++ library support 3788 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3789 ;; 3790 cxx) 3791 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 3792 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' 3793 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 3794 echo "-hidden">> $lib.exp~ 3795 $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 $objdir/so_locations -o $lib~ 3796 $rm $lib.exp' 3797 3798 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 3799 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3800 3801 # Commands to make compiler produce verbose output that lists 3802 # what "hidden" libraries, object files and flags are used when 3803 # linking a shared library. 3804 # 3805 # There doesn't appear to be a way to prevent this compiler from 3806 # explicitly linking system object files so we need to strip them 3807 # from the output so that they don't get included in the library 3808 # dependencies. 3809 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' 3810 ;; 3811 *) 3812 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3813 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 3814 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 3815 3816 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 3817 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 3818 3819 # Commands to make compiler produce verbose output that lists 3820 # what "hidden" libraries, object files and flags are used when 3821 # linking a shared library. 3822 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3823 3824 else 3825 # FIXME: insert proper C++ library support 3826 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3827 fi 3828 ;; 3829 esac 3830 ;; 3831 psos*) 3832 # FIXME: insert proper C++ library support 3833 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3834 ;; 3835 sco*) 3836 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3837 case $cc_basename in 3838 CC) 3839 # FIXME: insert proper C++ library support 3840 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3841 ;; 3842 *) 3843 # FIXME: insert proper C++ library support 3844 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3845 ;; 3846 esac 3847 ;; 3848 sunos4*) 3849 case $cc_basename in 3850 CC) 3851 # Sun C++ 4.x 3852 # FIXME: insert proper C++ library support 3853 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3854 ;; 3855 lcc) 3856 # Lucid 3857 # FIXME: insert proper C++ library support 3858 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3859 ;; 3860 *) 3861 # FIXME: insert proper C++ library support 3862 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3863 ;; 3864 esac 3865 ;; 3866 solaris*) 3867 case $cc_basename in 3868 CC) 3869 # Sun C++ 4.2, 5.x and Centerline C++ 3870 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 3871 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 3872 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3873 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3874 3875 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 3876 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 3877 case $host_os in 3878 solaris2.[0-5] | solaris2.[0-5].*) ;; 3879 *) 3880 # The C++ compiler is used as linker so we must use $wl 3881 # flag to pass the commands to the underlying system 3882 # linker. 3883 # Supported since Solaris 2.6 (maybe 2.5.1?) 3884 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 3885 ;; 3886 esac 3887 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3888 3889 # Commands to make compiler produce verbose output that lists 3890 # what "hidden" libraries, object files and flags are used when 3891 # linking a shared library. 3892 # 3893 # There doesn't appear to be a way to prevent this compiler from 3894 # explicitly linking system object files so we need to strip them 3895 # from the output so that they don't get included in the library 3896 # dependencies. 3897 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 3898 3899 # Archives containing C++ object files must be created using 3900 # "CC -xar", where "CC" is the Sun C++ compiler. This is 3901 # necessary to make sure instantiated templates are included 3902 # in the archive. 3903 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 3904 ;; 3905 gcx) 3906 # Green Hills C++ Compiler 3907 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3908 3909 # The C++ compiler must be used to create the archive. 3910 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 3911 ;; 3912 *) 3913 # GNU C++ compiler with Solaris linker 3914 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 3915 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 3916 if $CC --version | grep -v '^2\.7' > /dev/null; then 3917 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3918 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3919 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3920 3921 # Commands to make compiler produce verbose output that lists 3922 # what "hidden" libraries, object files and flags are used when 3923 # linking a shared library. 3924 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3925 else 3926 # g++ 2.7 appears to require `-G' NOT `-shared' on this 3927 # platform. 3928 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 3929 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 3930 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 3931 3932 # Commands to make compiler produce verbose output that lists 3933 # what "hidden" libraries, object files and flags are used when 3934 # linking a shared library. 3935 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 3936 fi 3937 3938 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 3939 fi 3940 ;; 3941 esac 3942 ;; 3943 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) 3944 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3945 ;; 3946 tandem*) 3947 case $cc_basename in 3948 NCC) 3949 # NonStop-UX NCC 3.20 3950 # FIXME: insert proper C++ library support 3951 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3952 ;; 3953 *) 3954 # FIXME: insert proper C++ library support 3955 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3956 ;; 3957 esac 3958 ;; 3959 vxworks*) 3960 # FIXME: insert proper C++ library support 3961 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3962 ;; 3963 *) 3964 # FIXME: insert proper C++ library support 3965 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3966 ;; 3967esac 3968AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 3969test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 3970 3971_LT_AC_TAGVAR(GCC, $1)="$GXX" 3972_LT_AC_TAGVAR(LD, $1)="$LD" 3973 3974AC_LIBTOOL_POSTDEP_PREDEP($1) 3975AC_LIBTOOL_PROG_COMPILER_PIC($1) 3976AC_LIBTOOL_PROG_CC_C_O($1) 3977AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3978AC_LIBTOOL_PROG_LD_SHLIBS($1) 3979AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3980AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3981AC_LIBTOOL_SYS_LIB_STRIP 3982AC_LIBTOOL_DLOPEN_SELF($1) 3983 3984AC_LIBTOOL_CONFIG($1) 3985 3986AC_LANG_POP 3987CC=$lt_save_CC 3988LDCXX=$LD 3989LD=$lt_save_LD 3990GCC=$lt_save_GCC 3991with_gnu_ldcxx=$with_gnu_ld 3992with_gnu_ld=$lt_save_with_gnu_ld 3993lt_cv_path_LDCXX=$lt_cv_path_LD 3994lt_cv_path_LD=$lt_save_path_LD 3995lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 3996lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 3997])# AC_LIBTOOL_LANG_CXX_CONFIG 3998 3999# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 4000# ------------------------ 4001# Figure out "hidden" library dependencies from verbose 4002# compiler output when linking a shared library. 4003# Parse the compiler output and extract the necessary 4004# objects, libraries and library flags. 4005AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 4006dnl we can't use the lt_simple_compile_test_code here, 4007dnl because it contains code intended for an executable, 4008dnl not a library. It's possible we should let each 4009dnl tag define a new lt_????_link_test_code variable, 4010dnl but it's only used here... 4011ifelse([$1],[],[cat > conftest.$ac_ext <<EOF 4012int a; 4013void foo (void) { a = 0; } 4014EOF 4015],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 4016class Foo 4017{ 4018public: 4019 Foo (void) { a = 0; } 4020private: 4021 int a; 4022}; 4023EOF 4024],[$1],[F77],[cat > conftest.$ac_ext <<EOF 4025 subroutine foo 4026 implicit none 4027 integer*4 a 4028 a=0 4029 return 4030 end 4031EOF 4032],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 4033public class foo { 4034 private int a; 4035 public void bar (void) { 4036 a = 0; 4037 } 4038}; 4039EOF 4040]) 4041dnl Parse the compiler output and extract the necessary 4042dnl objects, libraries and library flags. 4043if AC_TRY_EVAL(ac_compile); then 4044 # Parse the compiler output and extract the necessary 4045 # objects, libraries and library flags. 4046 4047 # Sentinel used to keep track of whether or not we are before 4048 # the conftest object file. 4049 pre_test_object_deps_done=no 4050 4051 # The `*' in the case matches for architectures that use `case' in 4052 # $output_verbose_cmd can trigger glob expansion during the loop 4053 # eval without this substitution. 4054 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" 4055 4056 for p in `eval $output_verbose_link_cmd`; do 4057 case $p in 4058 4059 -L* | -R* | -l*) 4060 # Some compilers place space between "-{L,R}" and the path. 4061 # Remove the space. 4062 if test $p = "-L" \ 4063 || test $p = "-R"; then 4064 prev=$p 4065 continue 4066 else 4067 prev= 4068 fi 4069 4070 if test "$pre_test_object_deps_done" = no; then 4071 case $p in 4072 -L* | -R*) 4073 # Internal compiler library paths should come after those 4074 # provided the user. The postdeps already come after the 4075 # user supplied libs so there is no need to process them. 4076 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 4077 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 4078 else 4079 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 4080 fi 4081 ;; 4082 # The "-l" case would never come before the object being 4083 # linked, so don't bother handling this case. 4084 esac 4085 else 4086 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 4087 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 4088 else 4089 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 4090 fi 4091 fi 4092 ;; 4093 4094 *.$objext) 4095 # This assumes that the test object file only shows up 4096 # once in the compiler output. 4097 if test "$p" = "conftest.$objext"; then 4098 pre_test_object_deps_done=yes 4099 continue 4100 fi 4101 4102 if test "$pre_test_object_deps_done" = no; then 4103 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 4104 _LT_AC_TAGVAR(predep_objects, $1)="$p" 4105 else 4106 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 4107 fi 4108 else 4109 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 4110 _LT_AC_TAGVAR(postdep_objects, $1)="$p" 4111 else 4112 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 4113 fi 4114 fi 4115 ;; 4116 4117 *) ;; # Ignore the rest. 4118 4119 esac 4120 done 4121 4122 # Clean up. 4123 rm -f a.out a.exe 4124else 4125 echo "libtool.m4: error: problem compiling $1 test program" 4126fi 4127 4128$rm -f confest.$objext 4129 4130case " $_LT_AC_TAGVAR(postdeps, $1) " in 4131*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 4132esac 4133])# AC_LIBTOOL_POSTDEP_PREDEP 4134 4135# AC_LIBTOOL_LANG_F77_CONFIG 4136# ------------------------ 4137# Ensure that the configuration vars for the C compiler are 4138# suitably defined. Those variables are subsequently used by 4139# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4140AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4141AC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4142[AC_REQUIRE([AC_PROG_F77]) 4143AC_LANG_PUSH(Fortran 77) 4144 4145_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4146_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4147_LT_AC_TAGVAR(always_export_symbols, $1)=no 4148_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4149_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4150_LT_AC_TAGVAR(hardcode_direct, $1)=no 4151_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4152_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4153_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4154_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4155_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4156_LT_AC_TAGVAR(module_cmds, $1)= 4157_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4158_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4159_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4160_LT_AC_TAGVAR(no_undefined_flag, $1)= 4161_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4162_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4163 4164# Source file extension for f77 test sources. 4165ac_ext=f 4166 4167# Object file extension for compiled f77 test sources. 4168objext=o 4169_LT_AC_TAGVAR(objext, $1)=$objext 4170 4171# Code to be used in simple compile tests 4172lt_simple_compile_test_code=" subroutine t\n return\n end\n" 4173 4174# Code to be used in simple link tests 4175lt_simple_link_test_code=" program t\n end\n" 4176 4177# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4178_LT_AC_SYS_COMPILER 4179 4180# Allow CC to be a program name with arguments. 4181lt_save_CC="$CC" 4182CC=${F77-"f77"} 4183compiler=$CC 4184_LT_AC_TAGVAR(compiler, $1)=$CC 4185cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` 4186 4187AC_MSG_CHECKING([if libtool supports shared libraries]) 4188AC_MSG_RESULT([$can_build_shared]) 4189 4190AC_MSG_CHECKING([whether to build shared libraries]) 4191test "$can_build_shared" = "no" && enable_shared=no 4192 4193# On AIX, shared libraries and static libraries use the same namespace, and 4194# are all built from PIC. 4195case "$host_os" in 4196aix3*) 4197 test "$enable_shared" = yes && enable_static=no 4198 if test -n "$RANLIB"; then 4199 archive_cmds="$archive_cmds~\$RANLIB \$lib" 4200 postinstall_cmds='$RANLIB $lib' 4201 fi 4202 ;; 4203aix4*) 4204 test "$enable_shared" = yes && enable_static=no 4205 ;; 4206esac 4207AC_MSG_RESULT([$enable_shared]) 4208 4209AC_MSG_CHECKING([whether to build static libraries]) 4210# Make sure either enable_shared or enable_static is yes. 4211test "$enable_shared" = yes || enable_static=yes 4212AC_MSG_RESULT([$enable_static]) 4213 4214test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 4215 4216_LT_AC_TAGVAR(GCC, $1)="$G77" 4217_LT_AC_TAGVAR(LD, $1)="$LD" 4218 4219AC_LIBTOOL_PROG_COMPILER_PIC($1) 4220AC_LIBTOOL_PROG_CC_C_O($1) 4221AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4222AC_LIBTOOL_PROG_LD_SHLIBS($1) 4223AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4224AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4225AC_LIBTOOL_SYS_LIB_STRIP 4226 4227 4228AC_LIBTOOL_CONFIG($1) 4229 4230AC_LANG_POP 4231CC="$lt_save_CC" 4232])# AC_LIBTOOL_LANG_F77_CONFIG 4233 4234 4235# AC_LIBTOOL_LANG_GCJ_CONFIG 4236# -------------------------- 4237# Ensure that the configuration vars for the C compiler are 4238# suitably defined. Those variables are subsequently used by 4239# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4240AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4241AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4242[AC_LANG_SAVE 4243 4244# Source file extension for Java test sources. 4245ac_ext=java 4246 4247# Object file extension for compiled Java test sources. 4248objext=o 4249_LT_AC_TAGVAR(objext, $1)=$objext 4250 4251# Code to be used in simple compile tests 4252lt_simple_compile_test_code="class foo {}\n" 4253 4254# Code to be used in simple link tests 4255lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' 4256 4257# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4258_LT_AC_SYS_COMPILER 4259 4260# Allow CC to be a program name with arguments. 4261lt_save_CC="$CC" 4262CC=${GCJ-"gcj"} 4263compiler=$CC 4264_LT_AC_TAGVAR(compiler, $1)=$CC 4265 4266# GCJ did not exist at the time GCC didn't implicitly link libc in. 4267_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4268 4269AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4270AC_LIBTOOL_PROG_COMPILER_PIC($1) 4271AC_LIBTOOL_PROG_CC_C_O($1) 4272AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4273AC_LIBTOOL_PROG_LD_SHLIBS($1) 4274AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4275AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4276AC_LIBTOOL_SYS_LIB_STRIP 4277AC_LIBTOOL_DLOPEN_SELF($1) 4278 4279AC_LIBTOOL_CONFIG($1) 4280 4281AC_LANG_RESTORE 4282CC="$lt_save_CC" 4283])# AC_LIBTOOL_LANG_GCJ_CONFIG 4284 4285 4286# AC_LIBTOOL_LANG_RC_CONFIG 4287# -------------------------- 4288# Ensure that the configuration vars for the Windows resource compiler are 4289# suitably defined. Those variables are subsequently used by 4290# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4291AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4292AC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4293[AC_LANG_SAVE 4294 4295# Source file extension for RC test sources. 4296ac_ext=rc 4297 4298# Object file extension for compiled RC test sources. 4299objext=o 4300_LT_AC_TAGVAR(objext, $1)=$objext 4301 4302# Code to be used in simple compile tests 4303lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 4304 4305# Code to be used in simple link tests 4306lt_simple_link_test_code="$lt_simple_compile_test_code" 4307 4308# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4309_LT_AC_SYS_COMPILER 4310 4311# Allow CC to be a program name with arguments. 4312lt_save_CC="$CC" 4313CC=${RC-"windres"} 4314compiler=$CC 4315_LT_AC_TAGVAR(compiler, $1)=$CC 4316_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4317 4318AC_LIBTOOL_CONFIG($1) 4319 4320AC_LANG_RESTORE 4321CC="$lt_save_CC" 4322])# AC_LIBTOOL_LANG_RC_CONFIG 4323 4324 4325# AC_LIBTOOL_CONFIG([TAGNAME]) 4326# ---------------------------- 4327# If TAGNAME is not passed, then create an initial libtool script 4328# with a default configuration from the untagged config vars. Otherwise 4329# add code to config.status for appending the configuration named by 4330# TAGNAME from the matching tagged config vars. 4331AC_DEFUN([AC_LIBTOOL_CONFIG], 4332[# The else clause should only fire when bootstrapping the 4333# libtool distribution, otherwise you forgot to ship ltmain.sh 4334# with your package, and you will get complaints that there are 4335# no rules to generate ltmain.sh. 4336if test -f "$ltmain"; then 4337 # See if we are running on zsh, and set the options which allow our commands through 4338 # without removal of \ escapes. 4339 if test -n "${ZSH_VERSION+set}" ; then 4340 setopt NO_GLOB_SUBST 4341 fi 4342 # Now quote all the things that may contain metacharacters while being 4343 # careful not to overquote the AC_SUBSTed values. We take copies of the 4344 # variables and quote the copies for generation of the libtool script. 4345 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ 4346 SED SHELL STRIP \ 4347 libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4348 old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4349 deplibs_check_method reload_flag reload_cmds need_locks \ 4350 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4351 lt_cv_sys_global_symbol_to_c_name_address \ 4352 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4353 old_postinstall_cmds old_postuninstall_cmds \ 4354 _LT_AC_TAGVAR(compiler, $1) \ 4355 _LT_AC_TAGVAR(CC, $1) \ 4356 _LT_AC_TAGVAR(LD, $1) \ 4357 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4358 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4359 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4360 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4361 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4362 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4363 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4364 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4365 _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4366 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4367 _LT_AC_TAGVAR(predep_objects, $1) \ 4368 _LT_AC_TAGVAR(postdep_objects, $1) \ 4369 _LT_AC_TAGVAR(predeps, $1) \ 4370 _LT_AC_TAGVAR(postdeps, $1) \ 4371 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4372 _LT_AC_TAGVAR(archive_cmds, $1) \ 4373 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4374 _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4375 _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4376 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 4377 _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 4378 _LT_AC_TAGVAR(no_undefined_flag, $1) \ 4379 _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 4380 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 4381 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 4382 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 4383 _LT_AC_TAGVAR(hardcode_automatic, $1) \ 4384 _LT_AC_TAGVAR(module_cmds, $1) \ 4385 _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 4386 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 4387 _LT_AC_TAGVAR(exclude_expsyms, $1) \ 4388 _LT_AC_TAGVAR(include_expsyms, $1); do 4389 4390 case $var in 4391 _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 4392 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 4393 _LT_AC_TAGVAR(archive_cmds, $1) | \ 4394 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 4395 _LT_AC_TAGVAR(module_cmds, $1) | \ 4396 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 4397 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 4398 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 4399 extract_expsyms_cmds | reload_cmds | finish_cmds | \ 4400 postinstall_cmds | postuninstall_cmds | \ 4401 old_postinstall_cmds | old_postuninstall_cmds | \ 4402 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 4403 # Double-quote double-evaled strings. 4404 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 4405 ;; 4406 *) 4407 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 4408 ;; 4409 esac 4410 done 4411 4412 case $lt_echo in 4413 *'\[$]0 --fallback-echo"') 4414 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 4415 ;; 4416 esac 4417 4418ifelse([$1], [], 4419 [cfgfile="${ofile}T" 4420 trap "$rm \"$cfgfile\"; exit 1" 1 2 15 4421 $rm -f "$cfgfile" 4422 AC_MSG_NOTICE([creating $ofile])], 4423 [cfgfile="$ofile"]) 4424 4425 cat <<__EOF__ >> "$cfgfile" 4426ifelse([$1], [], 4427[#! $SHELL 4428 4429# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 4430# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 4431# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4432# 4433# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 4434# Free Software Foundation, Inc. 4435# 4436# This file is part of GNU Libtool: 4437# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4438# 4439# This program is free software; you can redistribute it and/or modify 4440# it under the terms of the GNU General Public License as published by 4441# the Free Software Foundation; either version 2 of the License, or 4442# (at your option) any later version. 4443# 4444# This program is distributed in the hope that it will be useful, but 4445# WITHOUT ANY WARRANTY; without even the implied warranty of 4446# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4447# General Public License for more details. 4448# 4449# You should have received a copy of the GNU General Public License 4450# along with this program; if not, write to the Free Software 4451# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 4452# 4453# As a special exception to the GNU General Public License, if you 4454# distribute this file as part of a program that contains a 4455# configuration script generated by Autoconf, you may include it under 4456# the same distribution terms that you use for the rest of that program. 4457 4458# A sed program that does not truncate output. 4459SED=$lt_SED 4460 4461# Sed that helps us avoid accidentally triggering echo(1) options like -n. 4462Xsed="$SED -e s/^X//" 4463 4464# The HP-UX ksh and POSIX shell print the target directory to stdout 4465# if CDPATH is set. 4466if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi 4467 4468# The names of the tagged configurations supported by this script. 4469available_tags= 4470 4471# ### BEGIN LIBTOOL CONFIG], 4472[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 4473 4474# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4475 4476# Shell to use when invoking shell scripts. 4477SHELL=$lt_SHELL 4478 4479# Whether or not to build shared libraries. 4480build_libtool_libs=$enable_shared 4481 4482# Whether or not to build static libraries. 4483build_old_libs=$enable_static 4484 4485# Whether or not to add -lc for building shared libraries. 4486build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 4487 4488# Whether or not to disallow shared libs when runtime libs are static 4489allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 4490 4491# Whether or not to optimize for fast installation. 4492fast_install=$enable_fast_install 4493 4494# The host system. 4495host_alias=$host_alias 4496host=$host 4497 4498# An echo program that does not interpret backslashes. 4499echo=$lt_echo 4500 4501# The archiver. 4502AR=$lt_AR 4503AR_FLAGS=$lt_AR_FLAGS 4504 4505# A C compiler. 4506LTCC=$lt_LTCC 4507 4508# A language-specific compiler. 4509CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 4510 4511# Is the compiler the GNU C compiler? 4512with_gcc=$_LT_AC_TAGVAR(GCC, $1) 4513 4514# An ERE matcher. 4515EGREP=$lt_EGREP 4516 4517# The linker used to build libraries. 4518LD=$lt_[]_LT_AC_TAGVAR(LD, $1) 4519 4520# Whether we need hard or soft links. 4521LN_S=$lt_LN_S 4522 4523# A BSD-compatible nm program. 4524NM=$lt_NM 4525 4526# A symbol stripping program 4527STRIP=$lt_STRIP 4528 4529# Used to examine libraries when file_magic_cmd begins "file" 4530MAGIC_CMD=$MAGIC_CMD 4531 4532# Used on cygwin: DLL creation program. 4533DLLTOOL="$DLLTOOL" 4534 4535# Used on cygwin: object dumper. 4536OBJDUMP="$OBJDUMP" 4537 4538# Used on cygwin: assembler. 4539AS="$AS" 4540 4541# The name of the directory that contains temporary libtool files. 4542objdir=$objdir 4543 4544# How to create reloadable object files. 4545reload_flag=$lt_reload_flag 4546reload_cmds=$lt_reload_cmds 4547 4548# How to pass a linker flag through the compiler. 4549wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 4550 4551# Object file suffix (normally "o"). 4552objext="$ac_objext" 4553 4554# Old archive suffix (normally "a"). 4555libext="$libext" 4556 4557# Shared library suffix (normally ".so"). 4558shrext='$shrext' 4559 4560# Executable file suffix (normally ""). 4561exeext="$exeext" 4562 4563# Additional compiler flags for building library objects. 4564pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 4565pic_mode=$pic_mode 4566 4567# What is the maximum length of a command? 4568max_cmd_len=$lt_cv_sys_max_cmd_len 4569 4570# Does compiler simultaneously support -c and -o options? 4571compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 4572 4573# Must we lock files when doing compilation ? 4574need_locks=$lt_need_locks 4575 4576# Do we need the lib prefix for modules? 4577need_lib_prefix=$need_lib_prefix 4578 4579# Do we need a version for libraries? 4580need_version=$need_version 4581 4582# Whether dlopen is supported. 4583dlopen_support=$enable_dlopen 4584 4585# Whether dlopen of programs is supported. 4586dlopen_self=$enable_dlopen_self 4587 4588# Whether dlopen of statically linked programs is supported. 4589dlopen_self_static=$enable_dlopen_self_static 4590 4591# Compiler flag to prevent dynamic linking. 4592link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 4593 4594# Compiler flag to turn off builtin functions. 4595no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 4596 4597# Compiler flag to allow reflexive dlopens. 4598export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 4599 4600# Compiler flag to generate shared objects directly from archives. 4601whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 4602 4603# Compiler flag to generate thread-safe objects. 4604thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 4605 4606# Library versioning type. 4607version_type=$version_type 4608 4609# Format of library name prefix. 4610libname_spec=$lt_libname_spec 4611 4612# List of archive names. First name is the real one, the rest are links. 4613# The last name is the one that the linker finds with -lNAME. 4614library_names_spec=$lt_library_names_spec 4615 4616# The coded name of the library, if different from the real name. 4617soname_spec=$lt_soname_spec 4618 4619# Commands used to build and install an old-style archive. 4620RANLIB=$lt_RANLIB 4621old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 4622old_postinstall_cmds=$lt_old_postinstall_cmds 4623old_postuninstall_cmds=$lt_old_postuninstall_cmds 4624 4625# Create an old-style archive from a shared archive. 4626old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 4627 4628# Create a temporary old-style archive to link instead of a shared archive. 4629old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 4630 4631# Commands used to build and install a shared archive. 4632archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 4633archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 4634postinstall_cmds=$lt_postinstall_cmds 4635postuninstall_cmds=$lt_postuninstall_cmds 4636 4637# Commands used to build a loadable module (assumed same as above if empty) 4638module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 4639module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 4640 4641# Commands to strip libraries. 4642old_striplib=$lt_old_striplib 4643striplib=$lt_striplib 4644 4645# Dependencies to place before the objects being linked to create a 4646# shared library. 4647predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 4648 4649# Dependencies to place after the objects being linked to create a 4650# shared library. 4651postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 4652 4653# Dependencies to place before the objects being linked to create a 4654# shared library. 4655predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 4656 4657# Dependencies to place after the objects being linked to create a 4658# shared library. 4659postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 4660 4661# The library search path used internally by the compiler when linking 4662# a shared library. 4663compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 4664 4665# Method to check whether dependent libraries are shared objects. 4666deplibs_check_method=$lt_deplibs_check_method 4667 4668# Command to use when deplibs_check_method == file_magic. 4669file_magic_cmd=$lt_file_magic_cmd 4670 4671# Flag that allows shared libraries with undefined symbols to be built. 4672allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 4673 4674# Flag that forces no undefined symbols. 4675no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 4676 4677# Commands used to finish a libtool library installation in a directory. 4678finish_cmds=$lt_finish_cmds 4679 4680# Same as above, but a single script fragment to be evaled but not shown. 4681finish_eval=$lt_finish_eval 4682 4683# Take the output of nm and produce a listing of raw symbols and C names. 4684global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 4685 4686# Transform the output of nm in a proper C declaration 4687global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 4688 4689# Transform the output of nm in a C name address pair 4690global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 4691 4692# This is the shared library runtime path variable. 4693runpath_var=$runpath_var 4694 4695# This is the shared library path variable. 4696shlibpath_var=$shlibpath_var 4697 4698# Is shlibpath searched before the hard-coded library search path? 4699shlibpath_overrides_runpath=$shlibpath_overrides_runpath 4700 4701# How to hardcode a shared library path into an executable. 4702hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 4703 4704# Whether we should hardcode library paths into libraries. 4705hardcode_into_libs=$hardcode_into_libs 4706 4707# Flag to hardcode \$libdir into a binary during linking. 4708# This must work even if \$libdir does not exist. 4709hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 4710 4711# If ld is used when linking, flag to hardcode \$libdir into 4712# a binary during linking. This must work even if \$libdir does 4713# not exist. 4714hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 4715 4716# Whether we need a single -rpath flag with a separated argument. 4717hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 4718 4719# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 4720# resulting binary. 4721hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 4722 4723# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 4724# resulting binary. 4725hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 4726 4727# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 4728# the resulting binary. 4729hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 4730 4731# Set to yes if building a shared library automatically hardcodes DIR into the library 4732# and all subsequent libraries and executables linked against it. 4733hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 4734 4735# Variables whose values should be saved in libtool wrapper scripts and 4736# restored at relink time. 4737variables_saved_for_relink="$variables_saved_for_relink" 4738 4739# Whether libtool must link a program against all its dependency libraries. 4740link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 4741 4742# Compile-time system search path for libraries 4743sys_lib_search_path_spec=$lt_sys_lib_search_path_spec 4744 4745# Run-time system search path for libraries 4746sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 4747 4748# Fix the shell variable \$srcfile for the compiler. 4749fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 4750 4751# Set to yes if exported symbols are required. 4752always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 4753 4754# The commands to list exported symbols. 4755export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 4756 4757# The commands to extract the exported symbol list from a shared archive. 4758extract_expsyms_cmds=$lt_extract_expsyms_cmds 4759 4760# Symbols that should not be listed in the preloaded symbols. 4761exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 4762 4763# Symbols that must always be exported. 4764include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 4765 4766ifelse([$1],[], 4767[# ### END LIBTOOL CONFIG], 4768[# ### END LIBTOOL TAG CONFIG: $tagname]) 4769 4770__EOF__ 4771 4772ifelse([$1],[], [ 4773 case $host_os in 4774 aix3*) 4775 cat <<\EOF >> "$cfgfile" 4776 4777# AIX sometimes has problems with the GCC collect2 program. For some 4778# reason, if we set the COLLECT_NAMES environment variable, the problems 4779# vanish in a puff of smoke. 4780if test "X${COLLECT_NAMES+set}" != Xset; then 4781 COLLECT_NAMES= 4782 export COLLECT_NAMES 4783fi 4784EOF 4785 ;; 4786 esac 4787 4788 # We use sed instead of cat because bash on DJGPP gets confused if 4789 # if finds mixed CR/LF and LF-only lines. Since sed operates in 4790 # text mode, it properly converts lines to CR/LF. This bash problem 4791 # is reportedly fixed, but why not run on old versions too? 4792 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 4793 4794 mv -f "$cfgfile" "$ofile" || \ 4795 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4796 chmod +x "$ofile" 4797]) 4798else 4799 # If there is no Makefile yet, we rely on a make rule to execute 4800 # `config.status --recheck' to rerun these tests and create the 4801 # libtool script then. 4802 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 4803 if test -f "$ltmain_in"; then 4804 test -f Makefile && make "$ltmain" 4805 fi 4806fi 4807])# AC_LIBTOOL_CONFIG 4808 4809 4810# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 4811# ------------------------------------------- 4812AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 4813[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 4814 4815_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4816 4817if test "$GCC" = yes; then 4818 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4819 4820 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4821 lt_cv_prog_compiler_rtti_exceptions, 4822 [-fno-rtti -fno-exceptions], [], 4823 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4824fi 4825])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 4826 4827 4828# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 4829# --------------------------------- 4830AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 4831[AC_REQUIRE([AC_CANONICAL_HOST]) 4832AC_REQUIRE([AC_PROG_NM]) 4833AC_REQUIRE([AC_OBJEXT]) 4834# Check for command to grab the raw symbol name followed by C symbol from nm. 4835AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4836AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4837[ 4838# These are sane defaults that work on at least a few old systems. 4839# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4840 4841# Character class describing NM global symbol codes. 4842symcode='[[BCDEGRST]]' 4843 4844# Regexp to match symbols that can be accessed directly from C. 4845sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4846 4847# Transform the above into a raw symbol and a C symbol. 4848symxfrm='\1 \2\3 \3' 4849 4850# Transform an extracted symbol line into a proper C declaration 4851lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 4852 4853# Transform an extracted symbol line into symbol name and symbol address 4854lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 4855 4856# Define system-specific variables. 4857case $host_os in 4858aix*) 4859 symcode='[[BCDT]]' 4860 ;; 4861cygwin* | mingw* | pw32*) 4862 symcode='[[ABCDGISTW]]' 4863 ;; 4864hpux*) # Its linker distinguishes data from code symbols 4865 if test "$host_cpu" = ia64; then 4866 symcode='[[ABCDEGRST]]' 4867 fi 4868 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4869 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 4870 ;; 4871irix* | nonstopux*) 4872 symcode='[[BCDEGRST]]' 4873 ;; 4874osf*) 4875 symcode='[[BCDEGQRST]]' 4876 ;; 4877solaris* | sysv5*) 4878 symcode='[[BDRT]]' 4879 ;; 4880sysv4) 4881 symcode='[[DFNSTU]]' 4882 ;; 4883esac 4884 4885# Handle CRLF in mingw tool chain 4886opt_cr= 4887case $build_os in 4888mingw*) 4889 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4890 ;; 4891esac 4892 4893# If we're using GNU nm, then use its standard symbol codes. 4894case `$NM -V 2>&1` in 4895*GNU* | *'with BFD'*) 4896 symcode='[[ABCDGIRSTW]]' ;; 4897esac 4898 4899# Try without a prefix undercore, then with it. 4900for ac_symprfx in "" "_"; do 4901 4902 # Write the raw and C identifiers. 4903 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" 4904 4905 # Check to see that the pipe works correctly. 4906 pipe_works=no 4907 4908 rm -f conftest* 4909 cat > conftest.$ac_ext <<EOF 4910#ifdef __cplusplus 4911extern "C" { 4912#endif 4913char nm_test_var; 4914void nm_test_func(){} 4915#ifdef __cplusplus 4916} 4917#endif 4918int main(){nm_test_var='a';nm_test_func();return(0);} 4919EOF 4920 4921 if AC_TRY_EVAL(ac_compile); then 4922 # Now try to grab the symbols. 4923 nlist=conftest.nm 4924 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 4925 # Try sorting and uniquifying the output. 4926 if sort "$nlist" | uniq > "$nlist"T; then 4927 mv -f "$nlist"T "$nlist" 4928 else 4929 rm -f "$nlist"T 4930 fi 4931 4932 # Make sure that we snagged all the symbols we need. 4933 if grep ' nm_test_var$' "$nlist" >/dev/null; then 4934 if grep ' nm_test_func$' "$nlist" >/dev/null; then 4935 cat <<EOF > conftest.$ac_ext 4936#ifdef __cplusplus 4937extern "C" { 4938#endif 4939 4940EOF 4941 # Now generate the symbol file. 4942 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 4943 4944 cat <<EOF >> conftest.$ac_ext 4945#if defined (__STDC__) && __STDC__ 4946# define lt_ptr_t void * 4947#else 4948# define lt_ptr_t char * 4949# define const 4950#endif 4951 4952/* The mapping between symbol names and symbols. */ 4953const struct { 4954 const char *name; 4955 lt_ptr_t address; 4956} 4957lt_preloaded_symbols[[]] = 4958{ 4959EOF 4960 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 4961 cat <<\EOF >> conftest.$ac_ext 4962 {0, (lt_ptr_t) 0} 4963}; 4964 4965#ifdef __cplusplus 4966} 4967#endif 4968EOF 4969 # Now try linking the two files. 4970 mv conftest.$ac_objext conftstm.$ac_objext 4971 lt_save_LIBS="$LIBS" 4972 lt_save_CFLAGS="$CFLAGS" 4973 LIBS="conftstm.$ac_objext" 4974 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4975 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4976 pipe_works=yes 4977 fi 4978 LIBS="$lt_save_LIBS" 4979 CFLAGS="$lt_save_CFLAGS" 4980 else 4981 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4982 fi 4983 else 4984 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4985 fi 4986 else 4987 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4988 fi 4989 else 4990 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4991 cat conftest.$ac_ext >&5 4992 fi 4993 rm -f conftest* conftst* 4994 4995 # Do not use the global_symbol_pipe unless it works. 4996 if test "$pipe_works" = yes; then 4997 break 4998 else 4999 lt_cv_sys_global_symbol_pipe= 5000 fi 5001done 5002]) 5003if test -z "$lt_cv_sys_global_symbol_pipe"; then 5004 lt_cv_sys_global_symbol_to_cdecl= 5005fi 5006if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 5007 AC_MSG_RESULT(failed) 5008else 5009 AC_MSG_RESULT(ok) 5010fi 5011]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 5012 5013 5014# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 5015# --------------------------------------- 5016AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 5017[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 5018_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5019_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 5020 5021AC_MSG_CHECKING([for $compiler option to produce PIC]) 5022 ifelse([$1],[CXX],[ 5023 # C++ specific cases for pic, static, wl, etc. 5024 if test "$GXX" = yes; then 5025 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5026 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5027 5028 case $host_os in 5029 aix*) 5030 # All AIX code is PIC. 5031 if test "$host_cpu" = ia64; then 5032 # AIX 5 now supports IA64 processor 5033 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5034 fi 5035 ;; 5036 amigaos*) 5037 # FIXME: we need at least 68020 code to build shared libraries, but 5038 # adding the `-m68020' flag to GCC prevents building anything better, 5039 # like `-m68040'. 5040 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5041 ;; 5042 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5043 # PIC is the default for these OSes. 5044 ;; 5045 mingw* | os2* | pw32*) 5046 # This hack is so that the source file can tell whether it is being 5047 # built for inclusion in a dll (and should export symbols for example). 5048 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5049 ;; 5050 darwin* | rhapsody*) 5051 # PIC is the default on this platform 5052 # Common symbols not allowed in MH_DYLIB files 5053 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5054 ;; 5055 *djgpp*) 5056 # DJGPP does not support shared libraries at all 5057 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5058 ;; 5059 sysv4*MP*) 5060 if test -d /usr/nec; then 5061 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5062 fi 5063 ;; 5064 hpux*) 5065 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5066 # not for PA HP-UX. 5067 case "$host_cpu" in 5068 hppa*64*|ia64*) 5069 ;; 5070 *) 5071 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5072 ;; 5073 esac 5074 ;; 5075 *) 5076 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5077 ;; 5078 esac 5079 else 5080 case $host_os in 5081 aix4* | aix5*) 5082 # All AIX code is PIC. 5083 if test "$host_cpu" = ia64; then 5084 # AIX 5 now supports IA64 processor 5085 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5086 else 5087 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5088 fi 5089 ;; 5090 chorus*) 5091 case $cc_basename in 5092 cxch68) 5093 # Green Hills C++ Compiler 5094 # _LT_AC_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" 5095 ;; 5096 esac 5097 ;; 5098 dgux*) 5099 case $cc_basename in 5100 ec++) 5101 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5102 ;; 5103 ghcx) 5104 # Green Hills C++ Compiler 5105 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5106 ;; 5107 *) 5108 ;; 5109 esac 5110 ;; 5111 freebsd* | kfreebsd*-gnu) 5112 # FreeBSD uses GNU C++ 5113 ;; 5114 hpux9* | hpux10* | hpux11*) 5115 case $cc_basename in 5116 CC) 5117 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5118 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" 5119 if test "$host_cpu" != ia64; then 5120 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5121 fi 5122 ;; 5123 aCC) 5124 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5125 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" 5126 case "$host_cpu" in 5127 hppa*64*|ia64*) 5128 # +Z the default 5129 ;; 5130 *) 5131 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5132 ;; 5133 esac 5134 ;; 5135 *) 5136 ;; 5137 esac 5138 ;; 5139 irix5* | irix6* | nonstopux*) 5140 case $cc_basename in 5141 CC) 5142 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5143 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5144 # CC pic flag -KPIC is the default. 5145 ;; 5146 *) 5147 ;; 5148 esac 5149 ;; 5150 linux*) 5151 case $cc_basename in 5152 KCC) 5153 # KAI C++ Compiler 5154 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5155 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5156 ;; 5157 icpc) 5158 # Intel C++ 5159 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5160 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5161 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5162 ;; 5163 cxx) 5164 # Compaq C++ 5165 # Make sure the PIC flag is empty. It appears that all Alpha 5166 # Linux and Compaq Tru64 Unix objects are PIC. 5167 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5168 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5169 ;; 5170 *) 5171 ;; 5172 esac 5173 ;; 5174 lynxos*) 5175 ;; 5176 m88k*) 5177 ;; 5178 mvs*) 5179 case $cc_basename in 5180 cxx) 5181 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5182 ;; 5183 *) 5184 ;; 5185 esac 5186 ;; 5187 netbsd*) 5188 ;; 5189 osf3* | osf4* | osf5*) 5190 case $cc_basename in 5191 KCC) 5192 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5193 ;; 5194 RCC) 5195 # Rational C++ 2.4.1 5196 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5197 ;; 5198 cxx) 5199 # Digital/Compaq C++ 5200 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5201 # Make sure the PIC flag is empty. It appears that all Alpha 5202 # Linux and Compaq Tru64 Unix objects are PIC. 5203 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5204 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5205 ;; 5206 *) 5207 ;; 5208 esac 5209 ;; 5210 psos*) 5211 ;; 5212 sco*) 5213 case $cc_basename in 5214 CC) 5215 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5216 ;; 5217 *) 5218 ;; 5219 esac 5220 ;; 5221 solaris*) 5222 case $cc_basename in 5223 CC) 5224 # Sun C++ 4.2, 5.x and Centerline C++ 5225 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5226 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5227 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5228 ;; 5229 gcx) 5230 # Green Hills C++ Compiler 5231 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5232 ;; 5233 *) 5234 ;; 5235 esac 5236 ;; 5237 sunos4*) 5238 case $cc_basename in 5239 CC) 5240 # Sun C++ 4.x 5241 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5242 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5243 ;; 5244 lcc) 5245 # Lucid 5246 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5247 ;; 5248 *) 5249 ;; 5250 esac 5251 ;; 5252 tandem*) 5253 case $cc_basename in 5254 NCC) 5255 # NonStop-UX NCC 3.20 5256 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5257 ;; 5258 *) 5259 ;; 5260 esac 5261 ;; 5262 unixware*) 5263 ;; 5264 vxworks*) 5265 ;; 5266 *) 5267 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5268 ;; 5269 esac 5270 fi 5271], 5272[ 5273 if test "$GCC" = yes; then 5274 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5275 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5276 5277 case $host_os in 5278 aix*) 5279 # All AIX code is PIC. 5280 if test "$host_cpu" = ia64; then 5281 # AIX 5 now supports IA64 processor 5282 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5283 fi 5284 ;; 5285 5286 amigaos*) 5287 # FIXME: we need at least 68020 code to build shared libraries, but 5288 # adding the `-m68020' flag to GCC prevents building anything better, 5289 # like `-m68040'. 5290 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5291 ;; 5292 5293 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5294 # PIC is the default for these OSes. 5295 ;; 5296 5297 mingw* | pw32* | os2*) 5298 # This hack is so that the source file can tell whether it is being 5299 # built for inclusion in a dll (and should export symbols for example). 5300 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5301 ;; 5302 5303 darwin* | rhapsody*) 5304 # PIC is the default on this platform 5305 # Common symbols not allowed in MH_DYLIB files 5306 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5307 ;; 5308 5309 msdosdjgpp*) 5310 # Just because we use GCC doesn't mean we suddenly get shared libraries 5311 # on systems that don't support them. 5312 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5313 enable_shared=no 5314 ;; 5315 5316 sysv4*MP*) 5317 if test -d /usr/nec; then 5318 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5319 fi 5320 ;; 5321 5322 hpux*) 5323 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5324 # not for PA HP-UX. 5325 case "$host_cpu" in 5326 hppa*64*|ia64*) 5327 # +Z the default 5328 ;; 5329 *) 5330 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5331 ;; 5332 esac 5333 ;; 5334 5335 *) 5336 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5337 ;; 5338 esac 5339 else 5340 # PORTME Check for flag to pass linker flags through the system compiler. 5341 case $host_os in 5342 aix*) 5343 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5344 if test "$host_cpu" = ia64; then 5345 # AIX 5 now supports IA64 processor 5346 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5347 else 5348 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5349 fi 5350 ;; 5351 5352 mingw* | pw32* | os2*) 5353 # This hack is so that the source file can tell whether it is being 5354 # built for inclusion in a dll (and should export symbols for example). 5355 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5356 ;; 5357 5358 hpux9* | hpux10* | hpux11*) 5359 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5360 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5361 # not for PA HP-UX. 5362 case "$host_cpu" in 5363 hppa*64*|ia64*) 5364 # +Z the default 5365 ;; 5366 *) 5367 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5368 ;; 5369 esac 5370 # Is there a better lt_prog_compiler_static that works with the bundled CC? 5371 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5372 ;; 5373 5374 irix5* | irix6* | nonstopux*) 5375 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5376 # PIC (with -KPIC) is the default. 5377 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5378 ;; 5379 5380 newsos6) 5381 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5382 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5383 ;; 5384 5385 linux*) 5386 case $CC in 5387 icc* | ecc*) 5388 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5389 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5390 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5391 ;; 5392 ccc*) 5393 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5394 # All Alpha code is PIC. 5395 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5396 ;; 5397 esac 5398 ;; 5399 5400 osf3* | osf4* | osf5*) 5401 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5402 # All OSF/1 code is PIC. 5403 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5404 ;; 5405 5406 sco3.2v5*) 5407 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' 5408 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' 5409 ;; 5410 5411 solaris*) 5412 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5413 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5414 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5415 ;; 5416 5417 sunos4*) 5418 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5419 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5420 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5421 ;; 5422 5423 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5424 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5425 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5426 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5427 ;; 5428 5429 sysv4*MP*) 5430 if test -d /usr/nec ;then 5431 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5432 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5433 fi 5434 ;; 5435 5436 uts4*) 5437 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5438 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5439 ;; 5440 5441 *) 5442 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5443 ;; 5444 esac 5445 fi 5446]) 5447AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 5448 5449# 5450# Check to make sure the PIC flag actually works. 5451# 5452if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 5453 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 5454 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 5455 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 5456 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 5457 "" | " "*) ;; 5458 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5459 esac], 5460 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5461 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5462fi 5463case "$host_os" in 5464 # For platforms which do not support PIC, -DPIC is meaningless: 5465 *djgpp*) 5466 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5467 ;; 5468 *) 5469 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 5470 ;; 5471esac 5472]) 5473 5474 5475# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 5476# ------------------------------------ 5477# See if the linker supports building shared libraries. 5478AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 5479[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5480ifelse([$1],[CXX],[ 5481 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5482 case $host_os in 5483 aix4* | aix5*) 5484 # If we're using GNU nm, then we don't want the "-C" option. 5485 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5486 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5487 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 5488 else 5489 _LT_AC_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' 5490 fi 5491 ;; 5492 pw32*) 5493 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5494 ;; 5495 cygwin* | mingw*) 5496 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' 5497 ;; 5498 *) 5499 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5500 ;; 5501 esac 5502],[ 5503 runpath_var= 5504 _LT_AC_TAGVAR(allow_undefined_flag, $1)= 5505 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5506 _LT_AC_TAGVAR(archive_cmds, $1)= 5507 _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5508 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 5509 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5510 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5511 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5512 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 5513 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5514 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5515 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5516 _LT_AC_TAGVAR(hardcode_direct, $1)=no 5517 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5518 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5519 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5520 _LT_AC_TAGVAR(hardcode_automatic, $1)=no 5521 _LT_AC_TAGVAR(module_cmds, $1)= 5522 _LT_AC_TAGVAR(module_expsym_cmds, $1)= 5523 _LT_AC_TAGVAR(always_export_symbols, $1)=no 5524 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5525 # include_expsyms should be a list of space-separated symbols to be *always* 5526 # included in the symbol list 5527 _LT_AC_TAGVAR(include_expsyms, $1)= 5528 # exclude_expsyms can be an extended regexp of symbols to exclude 5529 # it will be wrapped by ` (' and `)$', so one must not match beginning or 5530 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5531 # as well as any symbol that contains `d'. 5532 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 5533 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5534 # platforms (ab)use it in PIC code, but their linkers get confused if 5535 # the symbol is explicitly referenced. Since portable code cannot 5536 # rely on this symbol name, it's probably fine to never include it in 5537 # preloaded symbol tables. 5538 extract_expsyms_cmds= 5539 5540 case $host_os in 5541 cygwin* | mingw* | pw32*) 5542 # FIXME: the MSVC++ port hasn't been tested in a loooong time 5543 # When not using gcc, we currently assume that we are using 5544 # Microsoft Visual C++. 5545 if test "$GCC" != yes; then 5546 with_gnu_ld=no 5547 fi 5548 ;; 5549 openbsd*) 5550 with_gnu_ld=no 5551 ;; 5552 esac 5553 5554 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5555 if test "$with_gnu_ld" = yes; then 5556 # If archive_cmds runs LD, not CC, wlarc should be empty 5557 wlarc='${wl}' 5558 5559 # See if GNU ld supports shared libraries. 5560 case $host_os in 5561 aix3* | aix4* | aix5*) 5562 # On AIX/PPC, the GNU linker is very broken 5563 if test "$host_cpu" != ia64; then 5564 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5565 cat <<EOF 1>&2 5566 5567*** Warning: the GNU linker, at least up to release 2.9.1, is reported 5568*** to be unable to reliably create shared libraries on AIX. 5569*** Therefore, libtool is disabling shared libraries support. If you 5570*** really care for shared libraries, you may want to modify your PATH 5571*** so that a non-GNU linker is found, and then restart. 5572 5573EOF 5574 fi 5575 ;; 5576 5577 amigaos*) 5578 _LT_AC_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)' 5579 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5580 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5581 5582 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 5583 # that the semantics of dynamic libraries on AmigaOS, at least up 5584 # to version 4, is to share data among multiple programs linked 5585 # with the same dynamic library. Since this doesn't match the 5586 # behavior of shared libraries on other platforms, we can't use 5587 # them. 5588 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5589 ;; 5590 5591 beos*) 5592 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5593 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5594 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5595 # support --undefined. This deserves some investigation. FIXME 5596 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5597 else 5598 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5599 fi 5600 ;; 5601 5602 cygwin* | mingw* | pw32*) 5603 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5604 # as there is no search path for DLLs. 5605 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5606 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5607 _LT_AC_TAGVAR(always_export_symbols, $1)=no 5608 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5609 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' 5610 5611 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5612 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 5613 # If the export-symbols file already is a .def file (1st line 5614 # is EXPORTS), use it as is; otherwise, prepend... 5615 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5616 cp $export_symbols $output_objdir/$soname.def; 5617 else 5618 echo EXPORTS > $output_objdir/$soname.def; 5619 cat $export_symbols >> $output_objdir/$soname.def; 5620 fi~ 5621 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 5622 else 5623 ld_shlibs=no 5624 fi 5625 ;; 5626 5627 netbsd*) 5628 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5629 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5630 wlarc= 5631 else 5632 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5633 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5634 fi 5635 ;; 5636 5637 solaris* | sysv5*) 5638 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 5639 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5640 cat <<EOF 1>&2 5641 5642*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5643*** create shared libraries on Solaris systems. Therefore, libtool 5644*** is disabling shared libraries support. We urge you to upgrade GNU 5645*** binutils to release 2.9.1 or newer. Another option is to modify 5646*** your PATH or compiler configuration so that the native linker is 5647*** used, and then restart. 5648 5649EOF 5650 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5651 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5652 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5653 else 5654 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5655 fi 5656 ;; 5657 5658 sunos4*) 5659 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5660 wlarc= 5661 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5662 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5663 ;; 5664 5665 linux*) 5666 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then 5667 tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5668 _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" 5669 supports_anon_versioning=no 5670 case `$LD -v 2>/dev/null` in 5671 *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5672 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5673 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5674 *\ 2.11.*) ;; # other 2.11 versions 5675 *) supports_anon_versioning=yes ;; 5676 esac 5677 if test $supports_anon_versioning = yes; then 5678 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 5679cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5680$echo "local: *; };" >> $output_objdir/$libname.ver~ 5681 $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5682 else 5683 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" 5684 fi 5685 else 5686 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5687 fi 5688 ;; 5689 5690 *) 5691 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5692 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5693 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5694 else 5695 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5696 fi 5697 ;; 5698 esac 5699 5700 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then 5701 runpath_var=LD_RUN_PATH 5702 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5703 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5704 # ancient GNU ld didn't support --whole-archive et. al. 5705 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 5706 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5707 else 5708 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5709 fi 5710 fi 5711 else 5712 # PORTME fill in a description of your system's linker (not GNU ld) 5713 case $host_os in 5714 aix3*) 5715 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5716 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5717 _LT_AC_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' 5718 # Note: this linker hardcodes the directories in LIBPATH if there 5719 # are no directories specified by -L. 5720 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5721 if test "$GCC" = yes && test -z "$link_static_flag"; then 5722 # Neither direct hardcoding nor static linking is supported with a 5723 # broken collect2. 5724 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5725 fi 5726 ;; 5727 5728 aix4* | aix5*) 5729 if test "$host_cpu" = ia64; then 5730 # On IA64, the linker does run time linking by default, so we don't 5731 # have to do anything special. 5732 aix_use_runtimelinking=no 5733 exp_sym_flag='-Bexport' 5734 no_entry_flag="" 5735 else 5736 # If we're using GNU nm, then we don't want the "-C" option. 5737 # -C means demangle to AIX nm, but means don't demangle with GNU nm 5738 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 5739 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 5740 else 5741 _LT_AC_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' 5742 fi 5743 aix_use_runtimelinking=no 5744 5745 # Test if we are trying to use run time linking or normal 5746 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5747 # need to do runtime linking. 5748 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 5749 for ld_flag in $LDFLAGS; do 5750 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5751 aix_use_runtimelinking=yes 5752 break 5753 fi 5754 done 5755 esac 5756 5757 exp_sym_flag='-bexport' 5758 no_entry_flag='-bnoentry' 5759 fi 5760 5761 # When large executables or shared objects are built, AIX ld can 5762 # have problems creating the table of contents. If linking a library 5763 # or program results in "error TOC overflow" add -mminimal-toc to 5764 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5765 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5766 5767 _LT_AC_TAGVAR(archive_cmds, $1)='' 5768 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5769 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5770 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5771 5772 if test "$GCC" = yes; then 5773 case $host_os in aix4.[012]|aix4.[012].*) 5774 # We only want to do this on AIX 4.2 and lower, the check 5775 # below for broken collect2 doesn't work under 4.3+ 5776 collect2name=`${CC} -print-prog-name=collect2` 5777 if test -f "$collect2name" && \ 5778 strings "$collect2name" | grep resolve_lib_name >/dev/null 5779 then 5780 # We have reworked collect2 5781 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5782 else 5783 # We have old collect2 5784 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5785 # It fails to find uninstalled libraries when the uninstalled 5786 # path is not listed in the libpath. Setting hardcode_minus_L 5787 # to unsupported forces relinking 5788 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5789 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5790 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5791 fi 5792 esac 5793 shared_flag='-shared' 5794 else 5795 # not using gcc 5796 if test "$host_cpu" = ia64; then 5797 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5798 # chokes on -Wl,-G. The following line is correct: 5799 shared_flag='-G' 5800 else 5801 if test "$aix_use_runtimelinking" = yes; then 5802 shared_flag='${wl}-G' 5803 else 5804 shared_flag='${wl}-bM:SRE' 5805 fi 5806 fi 5807 fi 5808 5809 # It seems that -bexpall does not export symbols beginning with 5810 # underscore (_), so it is better to generate a list of symbols to export. 5811 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5812 if test "$aix_use_runtimelinking" = yes; then 5813 # Warning - without using the other runtime loading flags (-brtl), 5814 # -berok will link without error, but may produce a broken library. 5815 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5816 # Determine the default libpath from the value encoded in an empty executable. 5817 _LT_AC_SYS_LIBPATH_AIX 5818 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5819 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5820 else 5821 if test "$host_cpu" = ia64; then 5822 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5823 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5824 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 5825 else 5826 # Determine the default libpath from the value encoded in an empty executable. 5827 _LT_AC_SYS_LIBPATH_AIX 5828 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5829 # Warning - without using the other run time loading flags, 5830 # -berok will link without error, but may produce a broken library. 5831 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5832 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5833 # -bexpall does not export symbols beginning with underscore (_) 5834 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5835 # Exported symbols can be pulled into shared objects from archives 5836 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' 5837 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 5838 # This is similar to how AIX traditionally builds it's shared libraries. 5839 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 5840 fi 5841 fi 5842 ;; 5843 5844 amigaos*) 5845 _LT_AC_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)' 5846 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5847 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5848 # see comment about different semantics on the GNU ld section 5849 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5850 ;; 5851 5852 bsdi4*) 5853 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5854 ;; 5855 5856 cygwin* | mingw* | pw32*) 5857 # When not using gcc, we currently assume that we are using 5858 # Microsoft Visual C++. 5859 # hardcode_libdir_flag_spec is actually meaningless, as there is 5860 # no search path for DLLs. 5861 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5862 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5863 # Tell ltmain to make .lib files, not .a files. 5864 libext=lib 5865 # Tell ltmain to make .dll files, not .so files. 5866 shrext=".dll" 5867 # FIXME: Setting linknames here is a bad hack. 5868 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 5869 # The linker will automatically build a .lib file if we build a DLL. 5870 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 5871 # FIXME: Should let the user specify the lib program. 5872 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 5873 fix_srcfile_path='`cygpath -w "$srcfile"`' 5874 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5875 ;; 5876 5877 darwin* | rhapsody*) 5878 if test "$GXX" = yes ; then 5879 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5880 case "$host_os" in 5881 rhapsody* | darwin1.[[012]]) 5882 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' 5883 ;; 5884 *) # Darwin 1.3 on 5885 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 5886 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' 5887 else 5888 case ${MACOSX_DEPLOYMENT_TARGET} in 5889 10.[[012]]) 5890 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' 5891 ;; 5892 10.*) 5893 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' 5894 ;; 5895 esac 5896 fi 5897 ;; 5898 esac 5899 lt_int_apple_cc_single_mod=no 5900 output_verbose_link_cmd='echo' 5901 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then 5902 lt_int_apple_cc_single_mod=yes 5903 fi 5904 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 5905 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 5906 else 5907 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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' 5908 fi 5909 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5910 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's 5911 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 5912 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 5913 else 5914 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 5915 fi 5916 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 5917 _LT_AC_TAGVAR(hardcode_direct, $1)=no 5918 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 5919 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5920 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' 5921 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5922 else 5923 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5924 fi 5925 ;; 5926 5927 dgux*) 5928 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5929 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5930 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5931 ;; 5932 5933 freebsd1*) 5934 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5935 ;; 5936 5937 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5938 # support. Future versions do this automatically, but an explicit c++rt0.o 5939 # does not break anything, and helps significantly (at the cost of a little 5940 # extra space). 5941 freebsd2.2*) 5942 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5943 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5944 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5945 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5946 ;; 5947 5948 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5949 freebsd2*) 5950 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5951 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5952 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5953 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5954 ;; 5955 5956 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5957 freebsd* | kfreebsd*-gnu) 5958 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 5959 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5960 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5961 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5962 ;; 5963 5964 hpux9*) 5965 if test "$GCC" = yes; then 5966 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5967 else 5968 _LT_AC_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' 5969 fi 5970 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5971 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5972 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5973 5974 # hardcode_minus_L: Not really in the search PATH, 5975 # but as the default location of the library. 5976 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5977 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5978 ;; 5979 5980 hpux10* | hpux11*) 5981 if test "$GCC" = yes -a "$with_gnu_ld" = no; then 5982 case "$host_cpu" in 5983 hppa*64*|ia64*) 5984 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5985 ;; 5986 *) 5987 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5988 ;; 5989 esac 5990 else 5991 case "$host_cpu" in 5992 hppa*64*|ia64*) 5993 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' 5994 ;; 5995 *) 5996 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5997 ;; 5998 esac 5999 fi 6000 if test "$with_gnu_ld" = no; then 6001 case "$host_cpu" in 6002 hppa*64*) 6003 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6004 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6005 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6006 _LT_AC_TAGVAR(hardcode_direct, $1)=no 6007 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6008 ;; 6009 ia64*) 6010 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6011 _LT_AC_TAGVAR(hardcode_direct, $1)=no 6012 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6013 6014 # hardcode_minus_L: Not really in the search PATH, 6015 # but as the default location of the library. 6016 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6017 ;; 6018 *) 6019 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6020 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6021 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6022 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6023 6024 # hardcode_minus_L: Not really in the search PATH, 6025 # but as the default location of the library. 6026 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6027 ;; 6028 esac 6029 fi 6030 ;; 6031 6032 irix5* | irix6* | nonstopux*) 6033 if test "$GCC" = yes; then 6034 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6035 else 6036 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 6037 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6038 fi 6039 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6040 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6041 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6042 ;; 6043 6044 netbsd*) 6045 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6046 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6047 else 6048 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6049 fi 6050 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6051 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6052 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6053 ;; 6054 6055 newsos6) 6056 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6057 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6058 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6059 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6060 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6061 ;; 6062 6063 openbsd*) 6064 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6065 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6066 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6067 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6068 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6069 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6070 else 6071 case $host_os in 6072 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6073 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6074 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6075 ;; 6076 *) 6077 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6078 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6079 ;; 6080 esac 6081 fi 6082 ;; 6083 6084 os2*) 6085 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6086 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6087 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6088 _LT_AC_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' 6089 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6090 ;; 6091 6092 osf3*) 6093 if test "$GCC" = yes; then 6094 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6095 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6096 else 6097 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6098 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 6099 fi 6100 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6101 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6102 ;; 6103 6104 osf4* | osf5*) # as osf3* with the addition of -msym flag 6105 if test "$GCC" = yes; then 6106 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6107 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6108 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6109 else 6110 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6111 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 6112 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ 6113 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' 6114 6115 # Both c and cxx compiler support -rpath directly 6116 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6117 fi 6118 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6119 ;; 6120 6121 sco3.2v5*) 6122 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6123 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6124 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6125 runpath_var=LD_RUN_PATH 6126 hardcode_runpath_var=yes 6127 ;; 6128 6129 solaris*) 6130 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6131 if test "$GCC" = yes; then 6132 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6133 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6134 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6135 else 6136 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6137 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6138 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6139 fi 6140 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6141 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6142 case $host_os in 6143 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6144 *) # Supported since Solaris 2.6 (maybe 2.5.1?) 6145 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 6146 esac 6147 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6148 ;; 6149 6150 sunos4*) 6151 if test "x$host_vendor" = xsequent; then 6152 # Use $CC to link under sequent, because it throws in some extra .o 6153 # files that make .init and .fini sections work. 6154 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6155 else 6156 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6157 fi 6158 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6159 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6160 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6161 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6162 ;; 6163 6164 sysv4) 6165 case $host_vendor in 6166 sni) 6167 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6168 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6169 ;; 6170 siemens) 6171 ## LD is ld it makes a PLAMLIB 6172 ## CC just makes a GrossModule. 6173 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6174 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6175 _LT_AC_TAGVAR(hardcode_direct, $1)=no 6176 ;; 6177 motorola) 6178 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6179 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6180 ;; 6181 esac 6182 runpath_var='LD_RUN_PATH' 6183 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6184 ;; 6185 6186 sysv4.3*) 6187 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6188 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6189 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6190 ;; 6191 6192 sysv4*MP*) 6193 if test -d /usr/nec; then 6194 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6195 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6196 runpath_var=LD_RUN_PATH 6197 hardcode_runpath_var=yes 6198 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6199 fi 6200 ;; 6201 6202 sysv4.2uw2*) 6203 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6204 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6205 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 6206 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6207 hardcode_runpath_var=yes 6208 runpath_var=LD_RUN_PATH 6209 ;; 6210 6211 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) 6212 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' 6213 if test "$GCC" = yes; then 6214 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6215 else 6216 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6217 fi 6218 runpath_var='LD_RUN_PATH' 6219 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6220 ;; 6221 6222 sysv5*) 6223 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6224 # $CC -shared without GNU ld will not create a library from C++ 6225 # object files and a static libstdc++, better avoid it by now 6226 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6227 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6228 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6229 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 6230 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6231 runpath_var='LD_RUN_PATH' 6232 ;; 6233 6234 uts4*) 6235 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6236 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6237 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6238 ;; 6239 6240 *) 6241 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6242 ;; 6243 esac 6244 fi 6245]) 6246AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6247test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6248 6249variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6250if test "$GCC" = yes; then 6251 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6252fi 6253 6254# 6255# Do we need to explicitly link libc? 6256# 6257case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6258x|xyes) 6259 # Assume -lc should be added 6260 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6261 6262 if test "$enable_shared" = yes && test "$GCC" = yes; then 6263 case $_LT_AC_TAGVAR(archive_cmds, $1) in 6264 *'~'*) 6265 # FIXME: we may have to deal with multi-command sequences. 6266 ;; 6267 '$CC '*) 6268 # Test whether the compiler implicitly links with -lc since on some 6269 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6270 # to ld, don't add -lc before -lgcc. 6271 AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6272 $rm conftest* 6273 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 6274 6275 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6276 soname=conftest 6277 lib=conftest 6278 libobjs=conftest.$ac_objext 6279 deplibs= 6280 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6281 compiler_flags=-v 6282 linker_flags=-v 6283 verstring= 6284 output_objdir=. 6285 libname=conftest 6286 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 6287 _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6288 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 6289 then 6290 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6291 else 6292 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6293 fi 6294 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6295 else 6296 cat conftest.err 1>&5 6297 fi 6298 $rm conftest* 6299 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 6300 ;; 6301 esac 6302 fi 6303 ;; 6304esac 6305])# AC_LIBTOOL_PROG_LD_SHLIBS 6306 6307 6308# _LT_AC_FILE_LTDLL_C 6309# ------------------- 6310# Be careful that the start marker always follows a newline. 6311AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 6312# /* ltdll.c starts here */ 6313# #define WIN32_LEAN_AND_MEAN 6314# #include <windows.h> 6315# #undef WIN32_LEAN_AND_MEAN 6316# #include <stdio.h> 6317# 6318# #ifndef __CYGWIN__ 6319# # ifdef __CYGWIN32__ 6320# # define __CYGWIN__ __CYGWIN32__ 6321# # endif 6322# #endif 6323# 6324# #ifdef __cplusplus 6325# extern "C" { 6326# #endif 6327# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 6328# #ifdef __cplusplus 6329# } 6330# #endif 6331# 6332# #ifdef __CYGWIN__ 6333# #include <cygwin/cygwin_dll.h> 6334# DECLARE_CYGWIN_DLL( DllMain ); 6335# #endif 6336# HINSTANCE __hDllInstance_base; 6337# 6338# BOOL APIENTRY 6339# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 6340# { 6341# __hDllInstance_base = hInst; 6342# return TRUE; 6343# } 6344# /* ltdll.c ends here */ 6345])# _LT_AC_FILE_LTDLL_C 6346 6347 6348# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 6349# --------------------------------- 6350AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 6351 6352 6353# old names 6354AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 6355AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 6356AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 6357AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 6358AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 6359AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 6360AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 6361 6362# This is just to silence aclocal about the macro not being used 6363ifelse([AC_DISABLE_FAST_INSTALL]) 6364 6365AC_DEFUN([LT_AC_PROG_GCJ], 6366[AC_CHECK_TOOL(GCJ, gcj, no) 6367 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6368 AC_SUBST(GCJFLAGS) 6369]) 6370 6371AC_DEFUN([LT_AC_PROG_RC], 6372[AC_CHECK_TOOL(RC, windres, no) 6373]) 6374 6375# NOTE: This macro has been submitted for inclusion into # 6376# GNU Autoconf as AC_PROG_SED. When it is available in # 6377# a released version of Autoconf we should remove this # 6378# macro and use it instead. # 6379# LT_AC_PROG_SED 6380# -------------- 6381# Check for a fully-functional sed program, that truncates 6382# as few characters as possible. Prefer GNU sed if found. 6383AC_DEFUN([LT_AC_PROG_SED], 6384[AC_MSG_CHECKING([for a sed that does not truncate output]) 6385AC_CACHE_VAL(lt_cv_path_SED, 6386[# Loop through the user's path and test for sed and gsed. 6387# Then use that list of sed's as ones to test for truncation. 6388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6389for as_dir in $PATH 6390do 6391 IFS=$as_save_IFS 6392 test -z "$as_dir" && as_dir=. 6393 for lt_ac_prog in sed gsed; do 6394 for ac_exec_ext in '' $ac_executable_extensions; do 6395 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 6396 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 6397 fi 6398 done 6399 done 6400done 6401lt_ac_max=0 6402lt_ac_count=0 6403# Add /usr/xpg4/bin/sed as it is typically found on Solaris 6404# along with /bin/sed that truncates output. 6405for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 6406 test ! -f $lt_ac_sed && break 6407 cat /dev/null > conftest.in 6408 lt_ac_count=0 6409 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 6410 # Check for GNU sed and select it if it is found. 6411 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 6412 lt_cv_path_SED=$lt_ac_sed 6413 break 6414 fi 6415 while true; do 6416 cat conftest.in conftest.in >conftest.tmp 6417 mv conftest.tmp conftest.in 6418 cp conftest.in conftest.nl 6419 echo >>conftest.nl 6420 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 6421 cmp -s conftest.out conftest.nl || break 6422 # 10000 chars as input seems more than enough 6423 test $lt_ac_count -gt 10 && break 6424 lt_ac_count=`expr $lt_ac_count + 1` 6425 if test $lt_ac_count -gt $lt_ac_max; then 6426 lt_ac_max=$lt_ac_count 6427 lt_cv_path_SED=$lt_ac_sed 6428 fi 6429 done 6430done 6431SED=$lt_cv_path_SED 6432]) 6433AC_MSG_RESULT([$SED]) 6434]) 6435 6436# Do all the work for Automake. -*- Autoconf -*- 6437 6438# This macro actually does too much some checks are only needed if 6439# your package does certain things. But this isn't really a big deal. 6440 6441# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 6442# Free Software Foundation, Inc. 6443 6444# This program is free software; you can redistribute it and/or modify 6445# it under the terms of the GNU General Public License as published by 6446# the Free Software Foundation; either version 2, or (at your option) 6447# any later version. 6448 6449# This program is distributed in the hope that it will be useful, 6450# but WITHOUT ANY WARRANTY; without even the implied warranty of 6451# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6452# GNU General Public License for more details. 6453 6454# You should have received a copy of the GNU General Public License 6455# along with this program; if not, write to the Free Software 6456# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6457# 02111-1307, USA. 6458 6459# serial 10 6460 6461AC_PREREQ([2.54]) 6462 6463# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 6464# the ones we care about. 6465m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 6466 6467# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 6468# AM_INIT_AUTOMAKE([OPTIONS]) 6469# ----------------------------------------------- 6470# The call with PACKAGE and VERSION arguments is the old style 6471# call (pre autoconf-2.50), which is being phased out. PACKAGE 6472# and VERSION should now be passed to AC_INIT and removed from 6473# the call to AM_INIT_AUTOMAKE. 6474# We support both call styles for the transition. After 6475# the next Automake release, Autoconf can make the AC_INIT 6476# arguments mandatory, and then we can depend on a new Autoconf 6477# release and drop the old call support. 6478AC_DEFUN([AM_INIT_AUTOMAKE], 6479[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 6480 AC_REQUIRE([AC_PROG_INSTALL])dnl 6481# test to see if srcdir already configured 6482if test "`cd $srcdir && pwd`" != "`pwd`" && 6483 test -f $srcdir/config.status; then 6484 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 6485fi 6486 6487# test whether we have cygpath 6488if test -z "$CYGPATH_W"; then 6489 if (cygpath --version) >/dev/null 2>/dev/null; then 6490 CYGPATH_W='cygpath -w' 6491 else 6492 CYGPATH_W=echo 6493 fi 6494fi 6495AC_SUBST([CYGPATH_W]) 6496 6497# Define the identity of the package. 6498dnl Distinguish between old-style and new-style calls. 6499m4_ifval([$2], 6500[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 6501 AC_SUBST([PACKAGE], [$1])dnl 6502 AC_SUBST([VERSION], [$2])], 6503[_AM_SET_OPTIONS([$1])dnl 6504 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 6505 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 6506 6507_AM_IF_OPTION([no-define],, 6508[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 6509 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 6510 6511# Some tools Automake needs. 6512AC_REQUIRE([AM_SANITY_CHECK])dnl 6513AC_REQUIRE([AC_ARG_PROGRAM])dnl 6514AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 6515AM_MISSING_PROG(AUTOCONF, autoconf) 6516AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 6517AM_MISSING_PROG(AUTOHEADER, autoheader) 6518AM_MISSING_PROG(MAKEINFO, makeinfo) 6519AM_MISSING_PROG(AMTAR, tar) 6520AM_PROG_INSTALL_SH 6521AM_PROG_INSTALL_STRIP 6522# We need awk for the "check" target. The system "awk" is bad on 6523# some platforms. 6524AC_REQUIRE([AC_PROG_AWK])dnl 6525AC_REQUIRE([AC_PROG_MAKE_SET])dnl 6526AC_REQUIRE([AM_SET_LEADING_DOT])dnl 6527 6528_AM_IF_OPTION([no-dependencies],, 6529[AC_PROVIDE_IFELSE([AC_PROG_CC], 6530 [_AM_DEPENDENCIES(CC)], 6531 [define([AC_PROG_CC], 6532 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 6533AC_PROVIDE_IFELSE([AC_PROG_CXX], 6534 [_AM_DEPENDENCIES(CXX)], 6535 [define([AC_PROG_CXX], 6536 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 6537]) 6538]) 6539 6540 6541# When config.status generates a header, we must update the stamp-h file. 6542# This file resides in the same directory as the config header 6543# that is generated. The stamp files are numbered to have different names. 6544 6545# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 6546# loop where config.status creates the headers, so we can generate 6547# our stamp files there. 6548AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 6549[# Compute $1's index in $config_headers. 6550_am_stamp_count=1 6551for _am_header in $config_headers :; do 6552 case $_am_header in 6553 $1 | $1:* ) 6554 break ;; 6555 * ) 6556 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 6557 esac 6558done 6559echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 6560 6561# Copyright 2002 Free Software Foundation, Inc. 6562 6563# This program is free software; you can redistribute it and/or modify 6564# it under the terms of the GNU General Public License as published by 6565# the Free Software Foundation; either version 2, or (at your option) 6566# any later version. 6567 6568# This program is distributed in the hope that it will be useful, 6569# but WITHOUT ANY WARRANTY; without even the implied warranty of 6570# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6571# GNU General Public License for more details. 6572 6573# You should have received a copy of the GNU General Public License 6574# along with this program; if not, write to the Free Software 6575# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6576 6577# AM_AUTOMAKE_VERSION(VERSION) 6578# ---------------------------- 6579# Automake X.Y traces this macro to ensure aclocal.m4 has been 6580# generated from the m4 files accompanying Automake X.Y. 6581AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) 6582 6583# AM_SET_CURRENT_AUTOMAKE_VERSION 6584# ------------------------------- 6585# Call AM_AUTOMAKE_VERSION so it can be traced. 6586# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 6587AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 6588 [AM_AUTOMAKE_VERSION([1.7.9])]) 6589 6590# Helper functions for option handling. -*- Autoconf -*- 6591 6592# Copyright 2001, 2002 Free Software Foundation, Inc. 6593 6594# This program is free software; you can redistribute it and/or modify 6595# it under the terms of the GNU General Public License as published by 6596# the Free Software Foundation; either version 2, or (at your option) 6597# any later version. 6598 6599# This program is distributed in the hope that it will be useful, 6600# but WITHOUT ANY WARRANTY; without even the implied warranty of 6601# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6602# GNU General Public License for more details. 6603 6604# You should have received a copy of the GNU General Public License 6605# along with this program; if not, write to the Free Software 6606# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6607# 02111-1307, USA. 6608 6609# serial 2 6610 6611# _AM_MANGLE_OPTION(NAME) 6612# ----------------------- 6613AC_DEFUN([_AM_MANGLE_OPTION], 6614[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 6615 6616# _AM_SET_OPTION(NAME) 6617# ------------------------------ 6618# Set option NAME. Presently that only means defining a flag for this option. 6619AC_DEFUN([_AM_SET_OPTION], 6620[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 6621 6622# _AM_SET_OPTIONS(OPTIONS) 6623# ---------------------------------- 6624# OPTIONS is a space-separated list of Automake options. 6625AC_DEFUN([_AM_SET_OPTIONS], 6626[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 6627 6628# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 6629# ------------------------------------------- 6630# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 6631AC_DEFUN([_AM_IF_OPTION], 6632[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 6633 6634# 6635# Check to make sure that the build environment is sane. 6636# 6637 6638# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 6639 6640# This program is free software; you can redistribute it and/or modify 6641# it under the terms of the GNU General Public License as published by 6642# the Free Software Foundation; either version 2, or (at your option) 6643# any later version. 6644 6645# This program is distributed in the hope that it will be useful, 6646# but WITHOUT ANY WARRANTY; without even the implied warranty of 6647# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6648# GNU General Public License for more details. 6649 6650# You should have received a copy of the GNU General Public License 6651# along with this program; if not, write to the Free Software 6652# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6653# 02111-1307, USA. 6654 6655# serial 3 6656 6657# AM_SANITY_CHECK 6658# --------------- 6659AC_DEFUN([AM_SANITY_CHECK], 6660[AC_MSG_CHECKING([whether build environment is sane]) 6661# Just in case 6662sleep 1 6663echo timestamp > conftest.file 6664# Do `set' in a subshell so we don't clobber the current shell's 6665# arguments. Must try -L first in case configure is actually a 6666# symlink; some systems play weird games with the mod time of symlinks 6667# (eg FreeBSD returns the mod time of the symlink's containing 6668# directory). 6669if ( 6670 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 6671 if test "$[*]" = "X"; then 6672 # -L didn't work. 6673 set X `ls -t $srcdir/configure conftest.file` 6674 fi 6675 rm -f conftest.file 6676 if test "$[*]" != "X $srcdir/configure conftest.file" \ 6677 && test "$[*]" != "X conftest.file $srcdir/configure"; then 6678 6679 # If neither matched, then we have a broken ls. This can happen 6680 # if, for instance, CONFIG_SHELL is bash and it inherits a 6681 # broken ls alias from the environment. This has actually 6682 # happened. Such a system could not be considered "sane". 6683 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 6684alias in your environment]) 6685 fi 6686 6687 test "$[2]" = conftest.file 6688 ) 6689then 6690 # Ok. 6691 : 6692else 6693 AC_MSG_ERROR([newly created file is older than distributed files! 6694Check your system clock]) 6695fi 6696AC_MSG_RESULT(yes)]) 6697 6698# -*- Autoconf -*- 6699 6700 6701# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 6702 6703# This program is free software; you can redistribute it and/or modify 6704# it under the terms of the GNU General Public License as published by 6705# the Free Software Foundation; either version 2, or (at your option) 6706# any later version. 6707 6708# This program is distributed in the hope that it will be useful, 6709# but WITHOUT ANY WARRANTY; without even the implied warranty of 6710# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6711# GNU General Public License for more details. 6712 6713# You should have received a copy of the GNU General Public License 6714# along with this program; if not, write to the Free Software 6715# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6716# 02111-1307, USA. 6717 6718# serial 3 6719 6720# AM_MISSING_PROG(NAME, PROGRAM) 6721# ------------------------------ 6722AC_DEFUN([AM_MISSING_PROG], 6723[AC_REQUIRE([AM_MISSING_HAS_RUN]) 6724$1=${$1-"${am_missing_run}$2"} 6725AC_SUBST($1)]) 6726 6727 6728# AM_MISSING_HAS_RUN 6729# ------------------ 6730# Define MISSING if not defined so far and test if it supports --run. 6731# If it does, set am_missing_run to use it, otherwise, to nothing. 6732AC_DEFUN([AM_MISSING_HAS_RUN], 6733[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6734test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 6735# Use eval to expand $SHELL 6736if eval "$MISSING --run true"; then 6737 am_missing_run="$MISSING --run " 6738else 6739 am_missing_run= 6740 AC_MSG_WARN([`missing' script is too old or missing]) 6741fi 6742]) 6743 6744# AM_AUX_DIR_EXPAND 6745 6746# Copyright 2001 Free Software Foundation, Inc. 6747 6748# This program is free software; you can redistribute it and/or modify 6749# it under the terms of the GNU General Public License as published by 6750# the Free Software Foundation; either version 2, or (at your option) 6751# any later version. 6752 6753# This program is distributed in the hope that it will be useful, 6754# but WITHOUT ANY WARRANTY; without even the implied warranty of 6755# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6756# GNU General Public License for more details. 6757 6758# You should have received a copy of the GNU General Public License 6759# along with this program; if not, write to the Free Software 6760# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6761# 02111-1307, USA. 6762 6763# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6764# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6765# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6766# 6767# Of course, Automake must honor this variable whenever it calls a 6768# tool from the auxiliary directory. The problem is that $srcdir (and 6769# therefore $ac_aux_dir as well) can be either absolute or relative, 6770# depending on how configure is run. This is pretty annoying, since 6771# it makes $ac_aux_dir quite unusable in subdirectories: in the top 6772# source directory, any form will work fine, but in subdirectories a 6773# relative path needs to be adjusted first. 6774# 6775# $ac_aux_dir/missing 6776# fails when called from a subdirectory if $ac_aux_dir is relative 6777# $top_srcdir/$ac_aux_dir/missing 6778# fails if $ac_aux_dir is absolute, 6779# fails when called from a subdirectory in a VPATH build with 6780# a relative $ac_aux_dir 6781# 6782# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 6783# are both prefixed by $srcdir. In an in-source build this is usually 6784# harmless because $srcdir is `.', but things will broke when you 6785# start a VPATH build or use an absolute $srcdir. 6786# 6787# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 6788# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 6789# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 6790# and then we would define $MISSING as 6791# MISSING="\${SHELL} $am_aux_dir/missing" 6792# This will work as long as MISSING is not called from configure, because 6793# unfortunately $(top_srcdir) has no meaning in configure. 6794# However there are other variables, like CC, which are often used in 6795# configure, and could therefore not use this "fixed" $ac_aux_dir. 6796# 6797# Another solution, used here, is to always expand $ac_aux_dir to an 6798# absolute PATH. The drawback is that using absolute paths prevent a 6799# configured tree to be moved without reconfiguration. 6800 6801# Rely on autoconf to set up CDPATH properly. 6802AC_PREREQ([2.50]) 6803 6804AC_DEFUN([AM_AUX_DIR_EXPAND], [ 6805# expand $ac_aux_dir to an absolute path 6806am_aux_dir=`cd $ac_aux_dir && pwd` 6807]) 6808 6809# AM_PROG_INSTALL_SH 6810# ------------------ 6811# Define $install_sh. 6812 6813# Copyright 2001 Free Software Foundation, Inc. 6814 6815# This program is free software; you can redistribute it and/or modify 6816# it under the terms of the GNU General Public License as published by 6817# the Free Software Foundation; either version 2, or (at your option) 6818# any later version. 6819 6820# This program is distributed in the hope that it will be useful, 6821# but WITHOUT ANY WARRANTY; without even the implied warranty of 6822# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6823# GNU General Public License for more details. 6824 6825# You should have received a copy of the GNU General Public License 6826# along with this program; if not, write to the Free Software 6827# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6828# 02111-1307, USA. 6829 6830AC_DEFUN([AM_PROG_INSTALL_SH], 6831[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6832install_sh=${install_sh-"$am_aux_dir/install-sh"} 6833AC_SUBST(install_sh)]) 6834 6835# AM_PROG_INSTALL_STRIP 6836 6837# Copyright 2001 Free Software Foundation, Inc. 6838 6839# This program is free software; you can redistribute it and/or modify 6840# it under the terms of the GNU General Public License as published by 6841# the Free Software Foundation; either version 2, or (at your option) 6842# any later version. 6843 6844# This program is distributed in the hope that it will be useful, 6845# but WITHOUT ANY WARRANTY; without even the implied warranty of 6846# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6847# GNU General Public License for more details. 6848 6849# You should have received a copy of the GNU General Public License 6850# along with this program; if not, write to the Free Software 6851# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6852# 02111-1307, USA. 6853 6854# One issue with vendor `install' (even GNU) is that you can't 6855# specify the program used to strip binaries. This is especially 6856# annoying in cross-compiling environments, where the build's strip 6857# is unlikely to handle the host's binaries. 6858# Fortunately install-sh will honor a STRIPPROG variable, so we 6859# always use install-sh in `make install-strip', and initialize 6860# STRIPPROG with the value of the STRIP variable (set by the user). 6861AC_DEFUN([AM_PROG_INSTALL_STRIP], 6862[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 6863# Installed binaries are usually stripped using `strip' when the user 6864# run `make install-strip'. However `strip' might not be the right 6865# tool to use in cross-compilation environments, therefore Automake 6866# will honor the `STRIP' environment variable to overrule this program. 6867dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 6868if test "$cross_compiling" != no; then 6869 AC_CHECK_TOOL([STRIP], [strip], :) 6870fi 6871INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 6872AC_SUBST([INSTALL_STRIP_PROGRAM])]) 6873 6874# -*- Autoconf -*- 6875# Copyright (C) 2003 Free Software Foundation, Inc. 6876 6877# This program is free software; you can redistribute it and/or modify 6878# it under the terms of the GNU General Public License as published by 6879# the Free Software Foundation; either version 2, or (at your option) 6880# any later version. 6881 6882# This program is distributed in the hope that it will be useful, 6883# but WITHOUT ANY WARRANTY; without even the implied warranty of 6884# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6885# GNU General Public License for more details. 6886 6887# You should have received a copy of the GNU General Public License 6888# along with this program; if not, write to the Free Software 6889# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6890# 02111-1307, USA. 6891 6892# serial 1 6893 6894# Check whether the underlying file-system supports filenames 6895# with a leading dot. For instance MS-DOS doesn't. 6896AC_DEFUN([AM_SET_LEADING_DOT], 6897[rm -rf .tst 2>/dev/null 6898mkdir .tst 2>/dev/null 6899if test -d .tst; then 6900 am__leading_dot=. 6901else 6902 am__leading_dot=_ 6903fi 6904rmdir .tst 2>/dev/null 6905AC_SUBST([am__leading_dot])]) 6906 6907# serial 5 -*- Autoconf -*- 6908 6909# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 6910 6911# This program is free software; you can redistribute it and/or modify 6912# it under the terms of the GNU General Public License as published by 6913# the Free Software Foundation; either version 2, or (at your option) 6914# any later version. 6915 6916# This program is distributed in the hope that it will be useful, 6917# but WITHOUT ANY WARRANTY; without even the implied warranty of 6918# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6919# GNU General Public License for more details. 6920 6921# You should have received a copy of the GNU General Public License 6922# along with this program; if not, write to the Free Software 6923# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6924# 02111-1307, USA. 6925 6926 6927# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 6928# written in clear, in which case automake, when reading aclocal.m4, 6929# will think it sees a *use*, and therefore will trigger all it's 6930# C support machinery. Also note that it means that autoscan, seeing 6931# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 6932 6933 6934 6935# _AM_DEPENDENCIES(NAME) 6936# ---------------------- 6937# See how the compiler implements dependency checking. 6938# NAME is "CC", "CXX", "GCJ", or "OBJC". 6939# We try a few techniques and use that to set a single cache variable. 6940# 6941# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 6942# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 6943# dependency, and given that the user is not expected to run this macro, 6944# just rely on AC_PROG_CC. 6945AC_DEFUN([_AM_DEPENDENCIES], 6946[AC_REQUIRE([AM_SET_DEPDIR])dnl 6947AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 6948AC_REQUIRE([AM_MAKE_INCLUDE])dnl 6949AC_REQUIRE([AM_DEP_TRACK])dnl 6950 6951ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 6952 [$1], CXX, [depcc="$CXX" am_compiler_list=], 6953 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 6954 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 6955 [depcc="$$1" am_compiler_list=]) 6956 6957AC_CACHE_CHECK([dependency style of $depcc], 6958 [am_cv_$1_dependencies_compiler_type], 6959[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 6960 # We make a subdir and do the tests there. Otherwise we can end up 6961 # making bogus files that we don't know about and never remove. For 6962 # instance it was reported that on HP-UX the gcc test will end up 6963 # making a dummy file named `D' -- because `-MD' means `put the output 6964 # in D'. 6965 mkdir conftest.dir 6966 # Copy depcomp to subdir because otherwise we won't find it if we're 6967 # using a relative directory. 6968 cp "$am_depcomp" conftest.dir 6969 cd conftest.dir 6970 # We will build objects and dependencies in a subdirectory because 6971 # it helps to detect inapplicable dependency modes. For instance 6972 # both Tru64's cc and ICC support -MD to output dependencies as a 6973 # side effect of compilation, but ICC will put the dependencies in 6974 # the current directory while Tru64 will put them in the object 6975 # directory. 6976 mkdir sub 6977 6978 am_cv_$1_dependencies_compiler_type=none 6979 if test "$am_compiler_list" = ""; then 6980 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 6981 fi 6982 for depmode in $am_compiler_list; do 6983 # Setup a source with many dependencies, because some compilers 6984 # like to wrap large dependency lists on column 80 (with \), and 6985 # we should not choose a depcomp mode which is confused by this. 6986 # 6987 # We need to recreate these files for each test, as the compiler may 6988 # overwrite some of them when testing with obscure command lines. 6989 # This happens at least with the AIX C compiler. 6990 : > sub/conftest.c 6991 for i in 1 2 3 4 5 6; do 6992 echo '#include "conftst'$i'.h"' >> sub/conftest.c 6993 : > sub/conftst$i.h 6994 done 6995 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 6996 6997 case $depmode in 6998 nosideeffect) 6999 # after this tag, mechanisms are not by side-effect, so they'll 7000 # only be used when explicitly requested 7001 if test "x$enable_dependency_tracking" = xyes; then 7002 continue 7003 else 7004 break 7005 fi 7006 ;; 7007 none) break ;; 7008 esac 7009 # We check with `-c' and `-o' for the sake of the "dashmstdout" 7010 # mode. It turns out that the SunPro C++ compiler does not properly 7011 # handle `-M -o', and we need to detect this. 7012 if depmode=$depmode \ 7013 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 7014 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 7015 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 7016 >/dev/null 2>conftest.err && 7017 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 7018 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 7019 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 7020 # icc doesn't choke on unknown options, it will just issue warnings 7021 # (even with -Werror). So we grep stderr for any message 7022 # that says an option was ignored. 7023 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 7024 am_cv_$1_dependencies_compiler_type=$depmode 7025 break 7026 fi 7027 fi 7028 done 7029 7030 cd .. 7031 rm -rf conftest.dir 7032else 7033 am_cv_$1_dependencies_compiler_type=none 7034fi 7035]) 7036AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 7037AM_CONDITIONAL([am__fastdep$1], [ 7038 test "x$enable_dependency_tracking" != xno \ 7039 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 7040]) 7041 7042 7043# AM_SET_DEPDIR 7044# ------------- 7045# Choose a directory name for dependency files. 7046# This macro is AC_REQUIREd in _AM_DEPENDENCIES 7047AC_DEFUN([AM_SET_DEPDIR], 7048[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 7049AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 7050]) 7051 7052 7053# AM_DEP_TRACK 7054# ------------ 7055AC_DEFUN([AM_DEP_TRACK], 7056[AC_ARG_ENABLE(dependency-tracking, 7057[ --disable-dependency-tracking Speeds up one-time builds 7058 --enable-dependency-tracking Do not reject slow dependency extractors]) 7059if test "x$enable_dependency_tracking" != xno; then 7060 am_depcomp="$ac_aux_dir/depcomp" 7061 AMDEPBACKSLASH='\' 7062fi 7063AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 7064AC_SUBST([AMDEPBACKSLASH]) 7065]) 7066 7067# Generate code to set up dependency tracking. -*- Autoconf -*- 7068 7069# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 7070 7071# This program is free software; you can redistribute it and/or modify 7072# it under the terms of the GNU General Public License as published by 7073# the Free Software Foundation; either version 2, or (at your option) 7074# any later version. 7075 7076# This program is distributed in the hope that it will be useful, 7077# but WITHOUT ANY WARRANTY; without even the implied warranty of 7078# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 7079# GNU General Public License for more details. 7080 7081# You should have received a copy of the GNU General Public License 7082# along with this program; if not, write to the Free Software 7083# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 7084# 02111-1307, USA. 7085 7086#serial 2 7087 7088# _AM_OUTPUT_DEPENDENCY_COMMANDS 7089# ------------------------------ 7090AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 7091[for mf in $CONFIG_FILES; do 7092 # Strip MF so we end up with the name of the file. 7093 mf=`echo "$mf" | sed -e 's/:.*$//'` 7094 # Check whether this is an Automake generated Makefile or not. 7095 # We used to match only the files named `Makefile.in', but 7096 # some people rename them; so instead we look at the file content. 7097 # Grep'ing the first line is not enough: some people post-process 7098 # each Makefile.in and add a new line on top of each file to say so. 7099 # So let's grep whole file. 7100 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 7101 dirpart=`AS_DIRNAME("$mf")` 7102 else 7103 continue 7104 fi 7105 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 7106 # Extract the definition of DEP_FILES from the Makefile without 7107 # running `make'. 7108 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 7109 test -z "$DEPDIR" && continue 7110 # When using ansi2knr, U may be empty or an underscore; expand it 7111 U=`sed -n -e '/^U = / s///p' < "$mf"` 7112 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 7113 # We invoke sed twice because it is the simplest approach to 7114 # changing $(DEPDIR) to its actual value in the expansion. 7115 for file in `sed -n -e ' 7116 /^DEP_FILES = .*\\\\$/ { 7117 s/^DEP_FILES = // 7118 :loop 7119 s/\\\\$// 7120 p 7121 n 7122 /\\\\$/ b loop 7123 p 7124 } 7125 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 7126 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7127 # Make sure the directory exists. 7128 test -f "$dirpart/$file" && continue 7129 fdir=`AS_DIRNAME(["$file"])` 7130 AS_MKDIR_P([$dirpart/$fdir]) 7131 # echo "creating $dirpart/$file" 7132 echo '# dummy' > "$dirpart/$file" 7133 done 7134done 7135])# _AM_OUTPUT_DEPENDENCY_COMMANDS 7136 7137 7138# AM_OUTPUT_DEPENDENCY_COMMANDS 7139# ----------------------------- 7140# This macro should only be invoked once -- use via AC_REQUIRE. 7141# 7142# This code is only required when automatic dependency tracking 7143# is enabled. FIXME. This creates each `.P' file that we will 7144# need in order to bootstrap the dependency handling code. 7145AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 7146[AC_CONFIG_COMMANDS([depfiles], 7147 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 7148 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 7149]) 7150 7151# Check to see how 'make' treats includes. -*- Autoconf -*- 7152 7153# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 7154 7155# This program is free software; you can redistribute it and/or modify 7156# it under the terms of the GNU General Public License as published by 7157# the Free Software Foundation; either version 2, or (at your option) 7158# any later version. 7159 7160# This program is distributed in the hope that it will be useful, 7161# but WITHOUT ANY WARRANTY; without even the implied warranty of 7162# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 7163# GNU General Public License for more details. 7164 7165# You should have received a copy of the GNU General Public License 7166# along with this program; if not, write to the Free Software 7167# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 7168# 02111-1307, USA. 7169 7170# serial 2 7171 7172# AM_MAKE_INCLUDE() 7173# ----------------- 7174# Check to see how make treats includes. 7175AC_DEFUN([AM_MAKE_INCLUDE], 7176[am_make=${MAKE-make} 7177cat > confinc << 'END' 7178am__doit: 7179 @echo done 7180.PHONY: am__doit 7181END 7182# If we don't find an include directive, just comment out the code. 7183AC_MSG_CHECKING([for style of include used by $am_make]) 7184am__include="#" 7185am__quote= 7186_am_result=none 7187# First try GNU make style include. 7188echo "include confinc" > confmf 7189# We grep out `Entering directory' and `Leaving directory' 7190# messages which can occur if `w' ends up in MAKEFLAGS. 7191# In particular we don't look at `^make:' because GNU make might 7192# be invoked under some other name (usually "gmake"), in which 7193# case it prints its new name instead of `make'. 7194if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7195 am__include=include 7196 am__quote= 7197 _am_result=GNU 7198fi 7199# Now try BSD make style include. 7200if test "$am__include" = "#"; then 7201 echo '.include "confinc"' > confmf 7202 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7203 am__include=.include 7204 am__quote="\"" 7205 _am_result=BSD 7206 fi 7207fi 7208AC_SUBST([am__include]) 7209AC_SUBST([am__quote]) 7210AC_MSG_RESULT([$_am_result]) 7211rm -f confinc confmf 7212]) 7213 7214# AM_CONDITIONAL -*- Autoconf -*- 7215 7216# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 7217 7218# This program is free software; you can redistribute it and/or modify 7219# it under the terms of the GNU General Public License as published by 7220# the Free Software Foundation; either version 2, or (at your option) 7221# any later version. 7222 7223# This program is distributed in the hope that it will be useful, 7224# but WITHOUT ANY WARRANTY; without even the implied warranty of 7225# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 7226# GNU General Public License for more details. 7227 7228# You should have received a copy of the GNU General Public License 7229# along with this program; if not, write to the Free Software 7230# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 7231# 02111-1307, USA. 7232 7233# serial 5 7234 7235AC_PREREQ(2.52) 7236 7237# AM_CONDITIONAL(NAME, SHELL-CONDITION) 7238# ------------------------------------- 7239# Define a conditional. 7240AC_DEFUN([AM_CONDITIONAL], 7241[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 7242 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 7243AC_SUBST([$1_TRUE]) 7244AC_SUBST([$1_FALSE]) 7245if $2; then 7246 $1_TRUE= 7247 $1_FALSE='#' 7248else 7249 $1_TRUE='#' 7250 $1_FALSE= 7251fi 7252AC_CONFIG_COMMANDS_PRE( 7253[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 7254 AC_MSG_ERROR([conditional "$1" was never defined. 7255Usually this means the macro was only invoked conditionally.]) 7256fi])]) 7257 7258# Add --enable-maintainer-mode option to configure. 7259# From Jim Meyering 7260 7261# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. 7262 7263# This program is free software; you can redistribute it and/or modify 7264# it under the terms of the GNU General Public License as published by 7265# the Free Software Foundation; either version 2, or (at your option) 7266# any later version. 7267 7268# This program is distributed in the hope that it will be useful, 7269# but WITHOUT ANY WARRANTY; without even the implied warranty of 7270# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 7271# GNU General Public License for more details. 7272 7273# You should have received a copy of the GNU General Public License 7274# along with this program; if not, write to the Free Software 7275# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 7276# 02111-1307, USA. 7277 7278# serial 2 7279 7280AC_DEFUN([AM_MAINTAINER_MODE], 7281[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 7282 dnl maintainer-mode is disabled by default 7283 AC_ARG_ENABLE(maintainer-mode, 7284[ --enable-maintainer-mode enable make rules and dependencies not useful 7285 (and sometimes confusing) to the casual installer], 7286 USE_MAINTAINER_MODE=$enableval, 7287 USE_MAINTAINER_MODE=no) 7288 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7289 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 7290 MAINT=$MAINTAINER_MODE_TRUE 7291 AC_SUBST(MAINT)dnl 7292] 7293) 7294 7295AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 7296 7297