1# generated automatically by aclocal 1.16.2 -*- Autoconf -*- 2 3# Copyright (C) 1996-2020 Free Software Foundation, Inc. 4 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18[m4_warning([this file was generated for autoconf 2.69. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22 23# host-cpu-c-abi.m4 serial 13 24dnl Copyright (C) 2002-2020 Free Software Foundation, Inc. 25dnl This file is free software; the Free Software Foundation 26dnl gives unlimited permission to copy and/or distribute it, 27dnl with or without modifications, as long as this notice is preserved. 28 29dnl From Bruno Haible and Sam Steingold. 30 31dnl Sets the HOST_CPU variable to the canonical name of the CPU. 32dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its 33dnl C language ABI (application binary interface). 34dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in 35dnl config.h. 36dnl 37dnl This canonical name can be used to select a particular assembly language 38dnl source file that will interoperate with C code on the given host. 39dnl 40dnl For example: 41dnl * 'i386' and 'sparc' are different canonical names, because code for i386 42dnl will not run on SPARC CPUs and vice versa. They have different 43dnl instruction sets. 44dnl * 'sparc' and 'sparc64' are different canonical names, because code for 45dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code 46dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit 47dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit 48dnl mode, but not both. 49dnl * 'mips' and 'mipsn32' are different canonical names, because they use 50dnl different argument passing and return conventions for C functions, and 51dnl although the instruction set of 'mips' is a large subset of the 52dnl instruction set of 'mipsn32'. 53dnl * 'mipsn32' and 'mips64' are different canonical names, because they use 54dnl different sizes for the C types like 'int' and 'void *', and although 55dnl the instruction sets of 'mipsn32' and 'mips64' are the same. 56dnl * The same canonical name is used for different endiannesses. You can 57dnl determine the endianness through preprocessor symbols: 58dnl - 'arm': test __ARMEL__. 59dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. 60dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN. 61dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 62dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because 63dnl - Instructions that do not exist on all of these CPUs (cmpxchg, 64dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your 65dnl assembly language source files use such instructions, you will 66dnl need to make the distinction. 67dnl - Speed of execution of the common instruction set is reasonable across 68dnl the entire family of CPUs. If you have assembly language source files 69dnl that are optimized for particular CPU types (like GNU gmp has), you 70dnl will need to make the distinction. 71dnl See <https://en.wikipedia.org/wiki/X86_instruction_listings>. 72AC_DEFUN([gl_HOST_CPU_C_ABI], 73[ 74 AC_REQUIRE([AC_CANONICAL_HOST]) 75 AC_REQUIRE([gl_C_ASM]) 76 AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], 77 [case "$host_cpu" in 78 79changequote(,)dnl 80 i[34567]86 ) 81changequote([,])dnl 82 gl_cv_host_cpu_c_abi=i386 83 ;; 84 85 x86_64 ) 86 # On x86_64 systems, the C compiler may be generating code in one of 87 # these ABIs: 88 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. 89 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 90 # with native Windows (mingw, MSVC). 91 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. 92 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. 93 AC_COMPILE_IFELSE( 94 [AC_LANG_SOURCE( 95 [[#if (defined __x86_64__ || defined __amd64__ \ 96 || defined _M_X64 || defined _M_AMD64) 97 int ok; 98 #else 99 error fail 100 #endif 101 ]])], 102 [AC_COMPILE_IFELSE( 103 [AC_LANG_SOURCE( 104 [[#if defined __ILP32__ || defined _ILP32 105 int ok; 106 #else 107 error fail 108 #endif 109 ]])], 110 [gl_cv_host_cpu_c_abi=x86_64-x32], 111 [gl_cv_host_cpu_c_abi=x86_64])], 112 [gl_cv_host_cpu_c_abi=i386]) 113 ;; 114 115changequote(,)dnl 116 alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) 117changequote([,])dnl 118 gl_cv_host_cpu_c_abi=alpha 119 ;; 120 121 arm* | aarch64 ) 122 # Assume arm with EABI. 123 # On arm64 systems, the C compiler may be generating code in one of 124 # these ABIs: 125 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. 126 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. 127 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. 128 AC_COMPILE_IFELSE( 129 [AC_LANG_SOURCE( 130 [[#ifdef __aarch64__ 131 int ok; 132 #else 133 error fail 134 #endif 135 ]])], 136 [AC_COMPILE_IFELSE( 137 [AC_LANG_SOURCE( 138 [[#if defined __ILP32__ || defined _ILP32 139 int ok; 140 #else 141 error fail 142 #endif 143 ]])], 144 [gl_cv_host_cpu_c_abi=arm64-ilp32], 145 [gl_cv_host_cpu_c_abi=arm64])], 146 [# Don't distinguish little-endian and big-endian arm, since they 147 # don't require different machine code for simple operations and 148 # since the user can distinguish them through the preprocessor 149 # defines __ARMEL__ vs. __ARMEB__. 150 # But distinguish arm which passes floating-point arguments and 151 # return values in integer registers (r0, r1, ...) - this is 152 # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which 153 # passes them in float registers (s0, s1, ...) and double registers 154 # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer 155 # sets the preprocessor defines __ARM_PCS (for the first case) and 156 # __ARM_PCS_VFP (for the second case), but older GCC does not. 157 echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c 158 # Look for a reference to the register d0 in the .s file. 159 AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 160 if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then 161 gl_cv_host_cpu_c_abi=armhf 162 else 163 gl_cv_host_cpu_c_abi=arm 164 fi 165 rm -f conftest* 166 ]) 167 ;; 168 169 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) 170 # On hppa, the C compiler may be generating 32-bit code or 64-bit 171 # code. In the latter case, it defines _LP64 and __LP64__. 172 AC_COMPILE_IFELSE( 173 [AC_LANG_SOURCE( 174 [[#ifdef __LP64__ 175 int ok; 176 #else 177 error fail 178 #endif 179 ]])], 180 [gl_cv_host_cpu_c_abi=hppa64], 181 [gl_cv_host_cpu_c_abi=hppa]) 182 ;; 183 184 ia64* ) 185 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or 186 # 32-bit code. In the latter case, it defines _ILP32. 187 AC_COMPILE_IFELSE( 188 [AC_LANG_SOURCE( 189 [[#ifdef _ILP32 190 int ok; 191 #else 192 error fail 193 #endif 194 ]])], 195 [gl_cv_host_cpu_c_abi=ia64-ilp32], 196 [gl_cv_host_cpu_c_abi=ia64]) 197 ;; 198 199 mips* ) 200 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this 201 # at 32. 202 AC_COMPILE_IFELSE( 203 [AC_LANG_SOURCE( 204 [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) 205 int ok; 206 #else 207 error fail 208 #endif 209 ]])], 210 [gl_cv_host_cpu_c_abi=mips64], 211 [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but 212 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32. 213 # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but 214 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32. 215 AC_COMPILE_IFELSE( 216 [AC_LANG_SOURCE( 217 [[#if (_MIPS_SIM == _ABIN32) 218 int ok; 219 #else 220 error fail 221 #endif 222 ]])], 223 [gl_cv_host_cpu_c_abi=mipsn32], 224 [gl_cv_host_cpu_c_abi=mips])]) 225 ;; 226 227 powerpc* ) 228 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. 229 # No need to distinguish them here; the caller may distinguish 230 # them based on the OS. 231 # On powerpc64 systems, the C compiler may still be generating 232 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may 233 # be generating 64-bit code. 234 AC_COMPILE_IFELSE( 235 [AC_LANG_SOURCE( 236 [[#if defined __powerpc64__ || defined _ARCH_PPC64 237 int ok; 238 #else 239 error fail 240 #endif 241 ]])], 242 [# On powerpc64, there are two ABIs on Linux: The AIX compatible 243 # one and the ELFv2 one. The latter defines _CALL_ELF=2. 244 AC_COMPILE_IFELSE( 245 [AC_LANG_SOURCE( 246 [[#if defined _CALL_ELF && _CALL_ELF == 2 247 int ok; 248 #else 249 error fail 250 #endif 251 ]])], 252 [gl_cv_host_cpu_c_abi=powerpc64-elfv2], 253 [gl_cv_host_cpu_c_abi=powerpc64]) 254 ], 255 [gl_cv_host_cpu_c_abi=powerpc]) 256 ;; 257 258 rs6000 ) 259 gl_cv_host_cpu_c_abi=powerpc 260 ;; 261 262 riscv32 | riscv64 ) 263 # There are 2 architectures (with variants): rv32* and rv64*. 264 AC_COMPILE_IFELSE( 265 [AC_LANG_SOURCE( 266 [[#if __riscv_xlen == 64 267 int ok; 268 #else 269 error fail 270 #endif 271 ]])], 272 [cpu=riscv64], 273 [cpu=riscv32]) 274 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. 275 # Size of 'long' and 'void *': 276 AC_COMPILE_IFELSE( 277 [AC_LANG_SOURCE( 278 [[#if defined __LP64__ 279 int ok; 280 #else 281 error fail 282 #endif 283 ]])], 284 [main_abi=lp64], 285 [main_abi=ilp32]) 286 # Float ABIs: 287 # __riscv_float_abi_double: 288 # 'float' and 'double' are passed in floating-point registers. 289 # __riscv_float_abi_single: 290 # 'float' are passed in floating-point registers. 291 # __riscv_float_abi_soft: 292 # No values are passed in floating-point registers. 293 AC_COMPILE_IFELSE( 294 [AC_LANG_SOURCE( 295 [[#if defined __riscv_float_abi_double 296 int ok; 297 #else 298 error fail 299 #endif 300 ]])], 301 [float_abi=d], 302 [AC_COMPILE_IFELSE( 303 [AC_LANG_SOURCE( 304 [[#if defined __riscv_float_abi_single 305 int ok; 306 #else 307 error fail 308 #endif 309 ]])], 310 [float_abi=f], 311 [float_abi='']) 312 ]) 313 gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" 314 ;; 315 316 s390* ) 317 # On s390x, the C compiler may be generating 64-bit (= s390x) code 318 # or 31-bit (= s390) code. 319 AC_COMPILE_IFELSE( 320 [AC_LANG_SOURCE( 321 [[#if defined __LP64__ || defined __s390x__ 322 int ok; 323 #else 324 error fail 325 #endif 326 ]])], 327 [gl_cv_host_cpu_c_abi=s390x], 328 [gl_cv_host_cpu_c_abi=s390]) 329 ;; 330 331 sparc | sparc64 ) 332 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the 333 # C compiler still generates 32-bit code. 334 AC_COMPILE_IFELSE( 335 [AC_LANG_SOURCE( 336 [[#if defined __sparcv9 || defined __arch64__ 337 int ok; 338 #else 339 error fail 340 #endif 341 ]])], 342 [gl_cv_host_cpu_c_abi=sparc64], 343 [gl_cv_host_cpu_c_abi=sparc]) 344 ;; 345 346 *) 347 gl_cv_host_cpu_c_abi="$host_cpu" 348 ;; 349 esac 350 ]) 351 352 dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. 353 HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` 354 HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" 355 AC_SUBST([HOST_CPU]) 356 AC_SUBST([HOST_CPU_C_ABI]) 357 358 # This was 359 # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) 360 # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) 361 # earlier, but KAI C++ 3.2d doesn't like this. 362 sed -e 's/-/_/g' >> confdefs.h <<EOF 363#ifndef __${HOST_CPU}__ 364#define __${HOST_CPU}__ 1 365#endif 366#ifndef __${HOST_CPU_C_ABI}__ 367#define __${HOST_CPU_C_ABI}__ 1 368#endif 369EOF 370 AH_TOP([/* CPU and C ABI indicator */ 371#ifndef __i386__ 372#undef __i386__ 373#endif 374#ifndef __x86_64_x32__ 375#undef __x86_64_x32__ 376#endif 377#ifndef __x86_64__ 378#undef __x86_64__ 379#endif 380#ifndef __alpha__ 381#undef __alpha__ 382#endif 383#ifndef __arm__ 384#undef __arm__ 385#endif 386#ifndef __armhf__ 387#undef __armhf__ 388#endif 389#ifndef __arm64_ilp32__ 390#undef __arm64_ilp32__ 391#endif 392#ifndef __arm64__ 393#undef __arm64__ 394#endif 395#ifndef __hppa__ 396#undef __hppa__ 397#endif 398#ifndef __hppa64__ 399#undef __hppa64__ 400#endif 401#ifndef __ia64_ilp32__ 402#undef __ia64_ilp32__ 403#endif 404#ifndef __ia64__ 405#undef __ia64__ 406#endif 407#ifndef __m68k__ 408#undef __m68k__ 409#endif 410#ifndef __mips__ 411#undef __mips__ 412#endif 413#ifndef __mipsn32__ 414#undef __mipsn32__ 415#endif 416#ifndef __mips64__ 417#undef __mips64__ 418#endif 419#ifndef __powerpc__ 420#undef __powerpc__ 421#endif 422#ifndef __powerpc64__ 423#undef __powerpc64__ 424#endif 425#ifndef __powerpc64_elfv2__ 426#undef __powerpc64_elfv2__ 427#endif 428#ifndef __riscv32__ 429#undef __riscv32__ 430#endif 431#ifndef __riscv64__ 432#undef __riscv64__ 433#endif 434#ifndef __riscv32_ilp32__ 435#undef __riscv32_ilp32__ 436#endif 437#ifndef __riscv32_ilp32f__ 438#undef __riscv32_ilp32f__ 439#endif 440#ifndef __riscv32_ilp32d__ 441#undef __riscv32_ilp32d__ 442#endif 443#ifndef __riscv64_ilp32__ 444#undef __riscv64_ilp32__ 445#endif 446#ifndef __riscv64_ilp32f__ 447#undef __riscv64_ilp32f__ 448#endif 449#ifndef __riscv64_ilp32d__ 450#undef __riscv64_ilp32d__ 451#endif 452#ifndef __riscv64_lp64__ 453#undef __riscv64_lp64__ 454#endif 455#ifndef __riscv64_lp64f__ 456#undef __riscv64_lp64f__ 457#endif 458#ifndef __riscv64_lp64d__ 459#undef __riscv64_lp64d__ 460#endif 461#ifndef __s390__ 462#undef __s390__ 463#endif 464#ifndef __s390x__ 465#undef __s390x__ 466#endif 467#ifndef __sh__ 468#undef __sh__ 469#endif 470#ifndef __sparc__ 471#undef __sparc__ 472#endif 473#ifndef __sparc64__ 474#undef __sparc64__ 475#endif 476]) 477 478]) 479 480 481dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI 482dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit 483dnl one, or to 'unknown' if unknown. 484dnl This is a simplified variant of gl_HOST_CPU_C_ABI. 485AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT], 486[ 487 AC_REQUIRE([AC_CANONICAL_HOST]) 488 AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit], 489 [if test -n "$gl_cv_host_cpu_c_abi"; then 490 case "$gl_cv_host_cpu_c_abi" in 491 i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) 492 gl_cv_host_cpu_c_abi_32bit=yes ;; 493 x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) 494 gl_cv_host_cpu_c_abi_32bit=no ;; 495 *) 496 gl_cv_host_cpu_c_abi_32bit=unknown ;; 497 esac 498 else 499 case "$host_cpu" in 500 501 # CPUs that only support a 32-bit ABI. 502 arc \ 503 | bfin \ 504 | cris* \ 505 | csky \ 506 | epiphany \ 507 | ft32 \ 508 | h8300 \ 509 | m68k \ 510 | microblaze | microblazeel \ 511 | nds32 | nds32le | nds32be \ 512 | nios2 | nios2eb | nios2el \ 513 | or1k* \ 514 | or32 \ 515 | sh | sh[1234] | sh[1234]e[lb] \ 516 | tic6x \ 517 | xtensa* ) 518 gl_cv_host_cpu_c_abi_32bit=yes 519 ;; 520 521 # CPUs that only support a 64-bit ABI. 522changequote(,)dnl 523 alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ 524 | mmix ) 525changequote([,])dnl 526 gl_cv_host_cpu_c_abi_32bit=no 527 ;; 528 529changequote(,)dnl 530 i[34567]86 ) 531changequote([,])dnl 532 gl_cv_host_cpu_c_abi_32bit=yes 533 ;; 534 535 x86_64 ) 536 # On x86_64 systems, the C compiler may be generating code in one of 537 # these ABIs: 538 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. 539 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 540 # with native Windows (mingw, MSVC). 541 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. 542 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. 543 AC_COMPILE_IFELSE( 544 [AC_LANG_SOURCE( 545 [[#if (defined __x86_64__ || defined __amd64__ \ 546 || defined _M_X64 || defined _M_AMD64) \ 547 && !(defined __ILP32__ || defined _ILP32) 548 int ok; 549 #else 550 error fail 551 #endif 552 ]])], 553 [gl_cv_host_cpu_c_abi_32bit=no], 554 [gl_cv_host_cpu_c_abi_32bit=yes]) 555 ;; 556 557 arm* | aarch64 ) 558 # Assume arm with EABI. 559 # On arm64 systems, the C compiler may be generating code in one of 560 # these ABIs: 561 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. 562 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. 563 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. 564 AC_COMPILE_IFELSE( 565 [AC_LANG_SOURCE( 566 [[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) 567 int ok; 568 #else 569 error fail 570 #endif 571 ]])], 572 [gl_cv_host_cpu_c_abi_32bit=no], 573 [gl_cv_host_cpu_c_abi_32bit=yes]) 574 ;; 575 576 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) 577 # On hppa, the C compiler may be generating 32-bit code or 64-bit 578 # code. In the latter case, it defines _LP64 and __LP64__. 579 AC_COMPILE_IFELSE( 580 [AC_LANG_SOURCE( 581 [[#ifdef __LP64__ 582 int ok; 583 #else 584 error fail 585 #endif 586 ]])], 587 [gl_cv_host_cpu_c_abi_32bit=no], 588 [gl_cv_host_cpu_c_abi_32bit=yes]) 589 ;; 590 591 ia64* ) 592 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or 593 # 32-bit code. In the latter case, it defines _ILP32. 594 AC_COMPILE_IFELSE( 595 [AC_LANG_SOURCE( 596 [[#ifdef _ILP32 597 int ok; 598 #else 599 error fail 600 #endif 601 ]])], 602 [gl_cv_host_cpu_c_abi_32bit=yes], 603 [gl_cv_host_cpu_c_abi_32bit=no]) 604 ;; 605 606 mips* ) 607 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this 608 # at 32. 609 AC_COMPILE_IFELSE( 610 [AC_LANG_SOURCE( 611 [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) 612 int ok; 613 #else 614 error fail 615 #endif 616 ]])], 617 [gl_cv_host_cpu_c_abi_32bit=no], 618 [gl_cv_host_cpu_c_abi_32bit=yes]) 619 ;; 620 621 powerpc* ) 622 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. 623 # No need to distinguish them here; the caller may distinguish 624 # them based on the OS. 625 # On powerpc64 systems, the C compiler may still be generating 626 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may 627 # be generating 64-bit code. 628 AC_COMPILE_IFELSE( 629 [AC_LANG_SOURCE( 630 [[#if defined __powerpc64__ || defined _ARCH_PPC64 631 int ok; 632 #else 633 error fail 634 #endif 635 ]])], 636 [gl_cv_host_cpu_c_abi_32bit=no], 637 [gl_cv_host_cpu_c_abi_32bit=yes]) 638 ;; 639 640 rs6000 ) 641 gl_cv_host_cpu_c_abi_32bit=yes 642 ;; 643 644 riscv32 | riscv64 ) 645 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. 646 # Size of 'long' and 'void *': 647 AC_COMPILE_IFELSE( 648 [AC_LANG_SOURCE( 649 [[#if defined __LP64__ 650 int ok; 651 #else 652 error fail 653 #endif 654 ]])], 655 [gl_cv_host_cpu_c_abi_32bit=no], 656 [gl_cv_host_cpu_c_abi_32bit=yes]) 657 ;; 658 659 s390* ) 660 # On s390x, the C compiler may be generating 64-bit (= s390x) code 661 # or 31-bit (= s390) code. 662 AC_COMPILE_IFELSE( 663 [AC_LANG_SOURCE( 664 [[#if defined __LP64__ || defined __s390x__ 665 int ok; 666 #else 667 error fail 668 #endif 669 ]])], 670 [gl_cv_host_cpu_c_abi_32bit=no], 671 [gl_cv_host_cpu_c_abi_32bit=yes]) 672 ;; 673 674 sparc | sparc64 ) 675 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the 676 # C compiler still generates 32-bit code. 677 AC_COMPILE_IFELSE( 678 [AC_LANG_SOURCE( 679 [[#if defined __sparcv9 || defined __arch64__ 680 int ok; 681 #else 682 error fail 683 #endif 684 ]])], 685 [gl_cv_host_cpu_c_abi_32bit=no], 686 [gl_cv_host_cpu_c_abi_32bit=yes]) 687 ;; 688 689 *) 690 gl_cv_host_cpu_c_abi_32bit=unknown 691 ;; 692 esac 693 fi 694 ]) 695 696 HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" 697]) 698 699# iconv.m4 serial 21 700dnl Copyright (C) 2000-2002, 2007-2014, 2016-2020 Free Software Foundation, 701dnl Inc. 702dnl This file is free software; the Free Software Foundation 703dnl gives unlimited permission to copy and/or distribute it, 704dnl with or without modifications, as long as this notice is preserved. 705 706dnl From Bruno Haible. 707 708AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], 709[ 710 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 711 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 712 AC_REQUIRE([AC_LIB_RPATH]) 713 714 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 715 dnl accordingly. 716 AC_LIB_LINKFLAGS_BODY([iconv]) 717]) 718 719AC_DEFUN([AM_ICONV_LINK], 720[ 721 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 722 dnl those with the standalone portable GNU libiconv installed). 723 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles 724 725 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 726 dnl accordingly. 727 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 728 729 dnl Add $INCICONV to CPPFLAGS before performing the following checks, 730 dnl because if the user has installed libiconv and not disabled its use 731 dnl via --without-libiconv-prefix, he wants to use it. The first 732 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. 733 am_save_CPPFLAGS="$CPPFLAGS" 734 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 735 736 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ 737 am_cv_func_iconv="no, consider installing GNU libiconv" 738 am_cv_lib_iconv=no 739 AC_LINK_IFELSE( 740 [AC_LANG_PROGRAM( 741 [[ 742#include <stdlib.h> 743#include <iconv.h> 744 ]], 745 [[iconv_t cd = iconv_open("",""); 746 iconv(cd,NULL,NULL,NULL,NULL); 747 iconv_close(cd);]])], 748 [am_cv_func_iconv=yes]) 749 if test "$am_cv_func_iconv" != yes; then 750 am_save_LIBS="$LIBS" 751 LIBS="$LIBS $LIBICONV" 752 AC_LINK_IFELSE( 753 [AC_LANG_PROGRAM( 754 [[ 755#include <stdlib.h> 756#include <iconv.h> 757 ]], 758 [[iconv_t cd = iconv_open("",""); 759 iconv(cd,NULL,NULL,NULL,NULL); 760 iconv_close(cd);]])], 761 [am_cv_lib_iconv=yes] 762 [am_cv_func_iconv=yes]) 763 LIBS="$am_save_LIBS" 764 fi 765 ]) 766 if test "$am_cv_func_iconv" = yes; then 767 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ 768 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, 769 dnl Solaris 10. 770 am_save_LIBS="$LIBS" 771 if test $am_cv_lib_iconv = yes; then 772 LIBS="$LIBS $LIBICONV" 773 fi 774 am_cv_func_iconv_works=no 775 for ac_iconv_const in '' 'const'; do 776 AC_RUN_IFELSE( 777 [AC_LANG_PROGRAM( 778 [[ 779#include <iconv.h> 780#include <string.h> 781 782#ifndef ICONV_CONST 783# define ICONV_CONST $ac_iconv_const 784#endif 785 ]], 786 [[int result = 0; 787 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful 788 returns. */ 789 { 790 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); 791 if (cd_utf8_to_88591 != (iconv_t)(-1)) 792 { 793 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ 794 char buf[10]; 795 ICONV_CONST char *inptr = input; 796 size_t inbytesleft = strlen (input); 797 char *outptr = buf; 798 size_t outbytesleft = sizeof (buf); 799 size_t res = iconv (cd_utf8_to_88591, 800 &inptr, &inbytesleft, 801 &outptr, &outbytesleft); 802 if (res == 0) 803 result |= 1; 804 iconv_close (cd_utf8_to_88591); 805 } 806 } 807 /* Test against Solaris 10 bug: Failures are not distinguishable from 808 successful returns. */ 809 { 810 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); 811 if (cd_ascii_to_88591 != (iconv_t)(-1)) 812 { 813 static ICONV_CONST char input[] = "\263"; 814 char buf[10]; 815 ICONV_CONST char *inptr = input; 816 size_t inbytesleft = strlen (input); 817 char *outptr = buf; 818 size_t outbytesleft = sizeof (buf); 819 size_t res = iconv (cd_ascii_to_88591, 820 &inptr, &inbytesleft, 821 &outptr, &outbytesleft); 822 if (res == 0) 823 result |= 2; 824 iconv_close (cd_ascii_to_88591); 825 } 826 } 827 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ 828 { 829 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); 830 if (cd_88591_to_utf8 != (iconv_t)(-1)) 831 { 832 static ICONV_CONST char input[] = "\304"; 833 static char buf[2] = { (char)0xDE, (char)0xAD }; 834 ICONV_CONST char *inptr = input; 835 size_t inbytesleft = 1; 836 char *outptr = buf; 837 size_t outbytesleft = 1; 838 size_t res = iconv (cd_88591_to_utf8, 839 &inptr, &inbytesleft, 840 &outptr, &outbytesleft); 841 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) 842 result |= 4; 843 iconv_close (cd_88591_to_utf8); 844 } 845 } 846#if 0 /* This bug could be worked around by the caller. */ 847 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ 848 { 849 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); 850 if (cd_88591_to_utf8 != (iconv_t)(-1)) 851 { 852 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; 853 char buf[50]; 854 ICONV_CONST char *inptr = input; 855 size_t inbytesleft = strlen (input); 856 char *outptr = buf; 857 size_t outbytesleft = sizeof (buf); 858 size_t res = iconv (cd_88591_to_utf8, 859 &inptr, &inbytesleft, 860 &outptr, &outbytesleft); 861 if ((int)res > 0) 862 result |= 8; 863 iconv_close (cd_88591_to_utf8); 864 } 865 } 866#endif 867 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is 868 provided. */ 869 { 870 /* Try standardized names. */ 871 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); 872 /* Try IRIX, OSF/1 names. */ 873 iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); 874 /* Try AIX names. */ 875 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); 876 /* Try HP-UX names. */ 877 iconv_t cd4 = iconv_open ("utf8", "eucJP"); 878 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) 879 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) 880 result |= 16; 881 if (cd1 != (iconv_t)(-1)) 882 iconv_close (cd1); 883 if (cd2 != (iconv_t)(-1)) 884 iconv_close (cd2); 885 if (cd3 != (iconv_t)(-1)) 886 iconv_close (cd3); 887 if (cd4 != (iconv_t)(-1)) 888 iconv_close (cd4); 889 } 890 return result; 891]])], 892 [am_cv_func_iconv_works=yes], , 893 [case "$host_os" in 894 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; 895 *) am_cv_func_iconv_works="guessing yes" ;; 896 esac]) 897 test "$am_cv_func_iconv_works" = no || break 898 done 899 LIBS="$am_save_LIBS" 900 ]) 901 case "$am_cv_func_iconv_works" in 902 *no) am_func_iconv=no am_cv_lib_iconv=no ;; 903 *) am_func_iconv=yes ;; 904 esac 905 else 906 am_func_iconv=no am_cv_lib_iconv=no 907 fi 908 if test "$am_func_iconv" = yes; then 909 AC_DEFINE([HAVE_ICONV], [1], 910 [Define if you have the iconv() function and it works.]) 911 fi 912 if test "$am_cv_lib_iconv" = yes; then 913 AC_MSG_CHECKING([how to link with libiconv]) 914 AC_MSG_RESULT([$LIBICONV]) 915 else 916 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV 917 dnl either. 918 CPPFLAGS="$am_save_CPPFLAGS" 919 LIBICONV= 920 LTLIBICONV= 921 fi 922 AC_SUBST([LIBICONV]) 923 AC_SUBST([LTLIBICONV]) 924]) 925 926dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to 927dnl avoid warnings like 928dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". 929dnl This is tricky because of the way 'aclocal' is implemented: 930dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. 931dnl Otherwise aclocal's initial scan pass would miss the macro definition. 932dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. 933dnl Otherwise aclocal would emit many "Use of uninitialized value $1" 934dnl warnings. 935m4_define([gl_iconv_AC_DEFUN], 936 m4_version_prereq([2.64], 937 [[AC_DEFUN_ONCE( 938 [$1], [$2])]], 939 [m4_ifdef([gl_00GNULIB], 940 [[AC_DEFUN_ONCE( 941 [$1], [$2])]], 942 [[AC_DEFUN( 943 [$1], [$2])]])])) 944gl_iconv_AC_DEFUN([AM_ICONV], 945[ 946 AM_ICONV_LINK 947 if test "$am_cv_func_iconv" = yes; then 948 AC_MSG_CHECKING([for iconv declaration]) 949 AC_CACHE_VAL([am_cv_proto_iconv], [ 950 AC_COMPILE_IFELSE( 951 [AC_LANG_PROGRAM( 952 [[ 953#include <stdlib.h> 954#include <iconv.h> 955extern 956#ifdef __cplusplus 957"C" 958#endif 959#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) 960size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 961#else 962size_t iconv(); 963#endif 964 ]], 965 [[]])], 966 [am_cv_proto_iconv_arg1=""], 967 [am_cv_proto_iconv_arg1="const"]) 968 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 969 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 970 AC_MSG_RESULT([ 971 $am_cv_proto_iconv]) 972 else 973 dnl When compiling GNU libiconv on a system that does not have iconv yet, 974 dnl pick the POSIX compliant declaration without 'const'. 975 am_cv_proto_iconv_arg1="" 976 fi 977 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], 978 [Define as const if the declaration of iconv() needs const.]) 979 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. 980 m4_ifdef([gl_ICONV_H_DEFAULTS], 981 [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) 982 if test -n "$am_cv_proto_iconv_arg1"; then 983 ICONV_CONST="const" 984 fi 985 ]) 986]) 987 988# lib-ld.m4 serial 9 989dnl Copyright (C) 1996-2003, 2009-2020 Free Software Foundation, Inc. 990dnl This file is free software; the Free Software Foundation 991dnl gives unlimited permission to copy and/or distribute it, 992dnl with or without modifications, as long as this notice is preserved. 993 994dnl Subroutines of libtool.m4, 995dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid 996dnl collision with libtool.m4. 997 998dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. 999AC_DEFUN([AC_LIB_PROG_LD_GNU], 1000[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], 1001[# I'd rather use --version here, but apparently some GNU lds only accept -v. 1002case `$LD -v 2>&1 </dev/null` in 1003*GNU* | *'with BFD'*) 1004 acl_cv_prog_gnu_ld=yes 1005 ;; 1006*) 1007 acl_cv_prog_gnu_ld=no 1008 ;; 1009esac]) 1010with_gnu_ld=$acl_cv_prog_gnu_ld 1011]) 1012 1013dnl From libtool-2.4. Sets the variable LD. 1014AC_DEFUN([AC_LIB_PROG_LD], 1015[AC_REQUIRE([AC_PROG_CC])dnl 1016AC_REQUIRE([AC_CANONICAL_HOST])dnl 1017 1018AC_ARG_WITH([gnu-ld], 1019 [AS_HELP_STRING([--with-gnu-ld], 1020 [assume the C compiler uses GNU ld [default=no]])], 1021 [test "$withval" = no || with_gnu_ld=yes], 1022 [with_gnu_ld=no])dnl 1023 1024# Prepare PATH_SEPARATOR. 1025# The user is always right. 1026if test "${PATH_SEPARATOR+set}" != set; then 1027 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which 1028 # contains only /bin. Note that ksh looks also at the FPATH variable, 1029 # so we have to set that as well for the test. 1030 PATH_SEPARATOR=: 1031 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 1032 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 1033 || PATH_SEPARATOR=';' 1034 } 1035fi 1036 1037if test -n "$LD"; then 1038 AC_MSG_CHECKING([for ld]) 1039elif test "$GCC" = yes; then 1040 AC_MSG_CHECKING([for ld used by $CC]) 1041elif test "$with_gnu_ld" = yes; then 1042 AC_MSG_CHECKING([for GNU ld]) 1043else 1044 AC_MSG_CHECKING([for non-GNU ld]) 1045fi 1046if test -n "$LD"; then 1047 # Let the user override the test with a path. 1048 : 1049else 1050 AC_CACHE_VAL([acl_cv_path_LD], 1051 [ 1052 acl_cv_path_LD= # Final result of this test 1053 ac_prog=ld # Program to search in $PATH 1054 if test "$GCC" = yes; then 1055 # Check if gcc -print-prog-name=ld gives a path. 1056 case $host in 1057 *-*-mingw*) 1058 # gcc leaves a trailing carriage return which upsets mingw 1059 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 1060 *) 1061 acl_output=`($CC -print-prog-name=ld) 2>&5` ;; 1062 esac 1063 case $acl_output in 1064 # Accept absolute paths. 1065 [[\\/]]* | ?:[[\\/]]*) 1066 re_direlt='/[[^/]][[^/]]*/\.\./' 1067 # Canonicalize the pathname of ld 1068 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` 1069 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do 1070 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` 1071 done 1072 # Got the pathname. No search in PATH is needed. 1073 acl_cv_path_LD="$acl_output" 1074 ac_prog= 1075 ;; 1076 "") 1077 # If it fails, then pretend we aren't using GCC. 1078 ;; 1079 *) 1080 # If it is relative, then search for the first ld in PATH. 1081 with_gnu_ld=unknown 1082 ;; 1083 esac 1084 fi 1085 if test -n "$ac_prog"; then 1086 # Search for $ac_prog in $PATH. 1087 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1088 for ac_dir in $PATH; do 1089 IFS="$acl_save_ifs" 1090 test -z "$ac_dir" && ac_dir=. 1091 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 1092 acl_cv_path_LD="$ac_dir/$ac_prog" 1093 # Check to see if the program is GNU ld. I'd rather use --version, 1094 # but apparently some variants of GNU ld only accept -v. 1095 # Break only if it was the GNU/non-GNU ld that we prefer. 1096 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in 1097 *GNU* | *'with BFD'*) 1098 test "$with_gnu_ld" != no && break 1099 ;; 1100 *) 1101 test "$with_gnu_ld" != yes && break 1102 ;; 1103 esac 1104 fi 1105 done 1106 IFS="$acl_save_ifs" 1107 fi 1108 case $host in 1109 *-*-aix*) 1110 AC_COMPILE_IFELSE( 1111 [AC_LANG_SOURCE( 1112 [[#if defined __powerpc64__ || defined _ARCH_PPC64 1113 int ok; 1114 #else 1115 error fail 1116 #endif 1117 ]])], 1118 [# The compiler produces 64-bit code. Add option '-b64' so that the 1119 # linker groks 64-bit object files. 1120 case "$acl_cv_path_LD " in 1121 *" -b64 "*) ;; 1122 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; 1123 esac 1124 ], []) 1125 ;; 1126 sparc64-*-netbsd*) 1127 AC_COMPILE_IFELSE( 1128 [AC_LANG_SOURCE( 1129 [[#if defined __sparcv9 || defined __arch64__ 1130 int ok; 1131 #else 1132 error fail 1133 #endif 1134 ]])], 1135 [], 1136 [# The compiler produces 32-bit code. Add option '-m elf32_sparc' 1137 # so that the linker groks 32-bit object files. 1138 case "$acl_cv_path_LD " in 1139 *" -m elf32_sparc "*) ;; 1140 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; 1141 esac 1142 ]) 1143 ;; 1144 esac 1145 ]) 1146 LD="$acl_cv_path_LD" 1147fi 1148if test -n "$LD"; then 1149 AC_MSG_RESULT([$LD]) 1150else 1151 AC_MSG_RESULT([no]) 1152 AC_MSG_ERROR([no acceptable ld found in \$PATH]) 1153fi 1154AC_LIB_PROG_LD_GNU 1155]) 1156 1157# lib-link.m4 serial 31 1158dnl Copyright (C) 2001-2020 Free Software Foundation, Inc. 1159dnl This file is free software; the Free Software Foundation 1160dnl gives unlimited permission to copy and/or distribute it, 1161dnl with or without modifications, as long as this notice is preserved. 1162 1163dnl From Bruno Haible. 1164 1165AC_PREREQ([2.61]) 1166 1167dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 1168dnl the libraries corresponding to explicit and implicit dependencies. 1169dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 1170dnl augments the CPPFLAGS variable. 1171dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 1172dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 1173AC_DEFUN([AC_LIB_LINKFLAGS], 1174[ 1175 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 1176 AC_REQUIRE([AC_LIB_RPATH]) 1177 pushdef([Name],[m4_translit([$1],[./+-], [____])]) 1178 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], 1179 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) 1180 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ 1181 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 1182 ac_cv_lib[]Name[]_libs="$LIB[]NAME" 1183 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" 1184 ac_cv_lib[]Name[]_cppflags="$INC[]NAME" 1185 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" 1186 ]) 1187 LIB[]NAME="$ac_cv_lib[]Name[]_libs" 1188 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" 1189 INC[]NAME="$ac_cv_lib[]Name[]_cppflags" 1190 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" 1191 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 1192 AC_SUBST([LIB]NAME) 1193 AC_SUBST([LTLIB]NAME) 1194 AC_SUBST([LIB]NAME[_PREFIX]) 1195 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the 1196 dnl results of this search when this library appears as a dependency. 1197 HAVE_LIB[]NAME=yes 1198 popdef([NAME]) 1199 popdef([Name]) 1200]) 1201 1202dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) 1203dnl searches for libname and the libraries corresponding to explicit and 1204dnl implicit dependencies, together with the specified include files and 1205dnl the ability to compile and link the specified testcode. The missing-message 1206dnl defaults to 'no' and may contain additional hints for the user. 1207dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} 1208dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and 1209dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs 1210dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. 1211dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 1212dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 1213AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], 1214[ 1215 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 1216 AC_REQUIRE([AC_LIB_RPATH]) 1217 pushdef([Name],[m4_translit([$1],[./+-], [____])]) 1218 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], 1219 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) 1220 1221 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME 1222 dnl accordingly. 1223 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 1224 1225 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, 1226 dnl because if the user has installed lib[]Name and not disabled its use 1227 dnl via --without-lib[]Name-prefix, he wants to use it. 1228 ac_save_CPPFLAGS="$CPPFLAGS" 1229 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 1230 1231 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ 1232 ac_save_LIBS="$LIBS" 1233 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, 1234 dnl because these -l options might require -L options that are present in 1235 dnl LIBS. -l options benefit only from the -L options listed before it. 1236 dnl Otherwise, add it to the front of LIBS, because it may be a static 1237 dnl library that depends on another static library that is present in LIBS. 1238 dnl Static libraries benefit only from the static libraries listed after 1239 dnl it. 1240 case " $LIB[]NAME" in 1241 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; 1242 *) LIBS="$LIB[]NAME $LIBS" ;; 1243 esac 1244 AC_LINK_IFELSE( 1245 [AC_LANG_PROGRAM([[$3]], [[$4]])], 1246 [ac_cv_lib[]Name=yes], 1247 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) 1248 LIBS="$ac_save_LIBS" 1249 ]) 1250 if test "$ac_cv_lib[]Name" = yes; then 1251 HAVE_LIB[]NAME=yes 1252 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) 1253 AC_MSG_CHECKING([how to link with lib[]$1]) 1254 AC_MSG_RESULT([$LIB[]NAME]) 1255 else 1256 HAVE_LIB[]NAME=no 1257 dnl If $LIB[]NAME didn't lead to a usable library, we don't need 1258 dnl $INC[]NAME either. 1259 CPPFLAGS="$ac_save_CPPFLAGS" 1260 LIB[]NAME= 1261 LTLIB[]NAME= 1262 LIB[]NAME[]_PREFIX= 1263 fi 1264 AC_SUBST([HAVE_LIB]NAME) 1265 AC_SUBST([LIB]NAME) 1266 AC_SUBST([LTLIB]NAME) 1267 AC_SUBST([LIB]NAME[_PREFIX]) 1268 popdef([NAME]) 1269 popdef([Name]) 1270]) 1271 1272dnl Determine the platform dependent parameters needed to use rpath: 1273dnl acl_libext, 1274dnl acl_shlibext, 1275dnl acl_libname_spec, 1276dnl acl_library_names_spec, 1277dnl acl_hardcode_libdir_flag_spec, 1278dnl acl_hardcode_libdir_separator, 1279dnl acl_hardcode_direct, 1280dnl acl_hardcode_minus_L. 1281AC_DEFUN([AC_LIB_RPATH], 1282[ 1283 dnl Complain if config.rpath is missing. 1284 AC_REQUIRE_AUX_FILE([config.rpath]) 1285 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS 1286 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld 1287 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host 1288 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir 1289 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ 1290 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ 1291 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh 1292 . ./conftest.sh 1293 rm -f ./conftest.sh 1294 acl_cv_rpath=done 1295 ]) 1296 wl="$acl_cv_wl" 1297 acl_libext="$acl_cv_libext" 1298 acl_shlibext="$acl_cv_shlibext" 1299 acl_libname_spec="$acl_cv_libname_spec" 1300 acl_library_names_spec="$acl_cv_library_names_spec" 1301 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" 1302 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 1303 acl_hardcode_direct="$acl_cv_hardcode_direct" 1304 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" 1305 dnl Determine whether the user wants rpath handling at all. 1306 AC_ARG_ENABLE([rpath], 1307 [ --disable-rpath do not hardcode runtime library paths], 1308 :, enable_rpath=yes) 1309]) 1310 1311dnl AC_LIB_FROMPACKAGE(name, package) 1312dnl declares that libname comes from the given package. The configure file 1313dnl will then not have a --with-libname-prefix option but a 1314dnl --with-package-prefix option. Several libraries can come from the same 1315dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar 1316dnl macro call that searches for libname. 1317AC_DEFUN([AC_LIB_FROMPACKAGE], 1318[ 1319 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], 1320 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) 1321 define([acl_frompackage_]NAME, [$2]) 1322 popdef([NAME]) 1323 pushdef([PACK],[$2]) 1324 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], 1325 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) 1326 define([acl_libsinpackage_]PACKUP, 1327 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) 1328 popdef([PACKUP]) 1329 popdef([PACK]) 1330]) 1331 1332dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and 1333dnl the libraries corresponding to explicit and implicit dependencies. 1334dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 1335dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found 1336dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 1337AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 1338[ 1339 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 1340 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], 1341 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) 1342 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) 1343 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], 1344 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) 1345 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) 1346 dnl By default, look in $includedir and $libdir. 1347 use_additional=yes 1348 AC_LIB_WITH_FINAL_PREFIX([ 1349 eval additional_includedir=\"$includedir\" 1350 eval additional_libdir=\"$libdir\" 1351 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" 1352 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" 1353 ]) 1354 AC_ARG_WITH(PACK[-prefix], 1355[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib 1356 --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], 1357[ 1358 if test "X$withval" = "Xno"; then 1359 use_additional=no 1360 else 1361 if test "X$withval" = "X"; then 1362 AC_LIB_WITH_FINAL_PREFIX([ 1363 eval additional_includedir=\"$includedir\" 1364 eval additional_libdir=\"$libdir\" 1365 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" 1366 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" 1367 ]) 1368 else 1369 additional_includedir="$withval/include" 1370 additional_libdir="$withval/$acl_libdirstem" 1371 additional_libdir2="$withval/$acl_libdirstem2" 1372 additional_libdir3="$withval/$acl_libdirstem3" 1373 fi 1374 fi 1375]) 1376 if test "X$additional_libdir2" = "X$additional_libdir"; then 1377 additional_libdir2= 1378 fi 1379 if test "X$additional_libdir3" = "X$additional_libdir"; then 1380 additional_libdir3= 1381 fi 1382 dnl Search the library and its dependencies in $additional_libdir and 1383 dnl $LDFLAGS. Using breadth-first-seach. 1384 LIB[]NAME= 1385 LTLIB[]NAME= 1386 INC[]NAME= 1387 LIB[]NAME[]_PREFIX= 1388 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been 1389 dnl computed. So it has to be reset here. 1390 HAVE_LIB[]NAME= 1391 rpathdirs= 1392 ltrpathdirs= 1393 names_already_handled= 1394 names_next_round='$1 $2' 1395 while test -n "$names_next_round"; do 1396 names_this_round="$names_next_round" 1397 names_next_round= 1398 for name in $names_this_round; do 1399 already_handled= 1400 for n in $names_already_handled; do 1401 if test "$n" = "$name"; then 1402 already_handled=yes 1403 break 1404 fi 1405 done 1406 if test -z "$already_handled"; then 1407 names_already_handled="$names_already_handled $name" 1408 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS 1409 dnl or AC_LIB_HAVE_LINKFLAGS call. 1410 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` 1411 eval value=\"\$HAVE_LIB$uppername\" 1412 if test -n "$value"; then 1413 if test "$value" = yes; then 1414 eval value=\"\$LIB$uppername\" 1415 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" 1416 eval value=\"\$LTLIB$uppername\" 1417 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" 1418 else 1419 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined 1420 dnl that this library doesn't exist. So just drop it. 1421 : 1422 fi 1423 else 1424 dnl Search the library lib$name in $additional_libdir and $LDFLAGS 1425 dnl and the already constructed $LIBNAME/$LTLIBNAME. 1426 found_dir= 1427 found_la= 1428 found_so= 1429 found_a= 1430 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name 1431 if test -n "$acl_shlibext"; then 1432 shrext=".$acl_shlibext" # typically: shrext=.so 1433 else 1434 shrext= 1435 fi 1436 if test $use_additional = yes; then 1437 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do 1438 if test "X$found_dir" = "X"; then 1439 eval dir=\$$additional_libdir_variable 1440 if test -n "$dir"; then 1441 dnl The same code as in the loop below: 1442 dnl First look for a shared library. 1443 if test -n "$acl_shlibext"; then 1444 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then 1445 found_dir="$dir" 1446 found_so="$dir/$libname$shrext" 1447 else 1448 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 1449 ver=`(cd "$dir" && \ 1450 for f in "$libname$shrext".*; do echo "$f"; done \ 1451 | sed -e "s,^$libname$shrext\\\\.,," \ 1452 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 1453 | sed 1q ) 2>/dev/null` 1454 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then 1455 found_dir="$dir" 1456 found_so="$dir/$libname$shrext.$ver" 1457 fi 1458 else 1459 eval library_names=\"$acl_library_names_spec\" 1460 for f in $library_names; do 1461 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then 1462 found_dir="$dir" 1463 found_so="$dir/$f" 1464 break 1465 fi 1466 done 1467 fi 1468 fi 1469 fi 1470 dnl Then look for a static library. 1471 if test "X$found_dir" = "X"; then 1472 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then 1473 found_dir="$dir" 1474 found_a="$dir/$libname.$acl_libext" 1475 fi 1476 fi 1477 if test "X$found_dir" != "X"; then 1478 if test -f "$dir/$libname.la"; then 1479 found_la="$dir/$libname.la" 1480 fi 1481 fi 1482 fi 1483 fi 1484 done 1485 fi 1486 if test "X$found_dir" = "X"; then 1487 for x in $LDFLAGS $LTLIB[]NAME; do 1488 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1489 case "$x" in 1490 -L*) 1491 dir=`echo "X$x" | sed -e 's/^X-L//'` 1492 dnl First look for a shared library. 1493 if test -n "$acl_shlibext"; then 1494 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then 1495 found_dir="$dir" 1496 found_so="$dir/$libname$shrext" 1497 else 1498 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 1499 ver=`(cd "$dir" && \ 1500 for f in "$libname$shrext".*; do echo "$f"; done \ 1501 | sed -e "s,^$libname$shrext\\\\.,," \ 1502 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 1503 | sed 1q ) 2>/dev/null` 1504 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then 1505 found_dir="$dir" 1506 found_so="$dir/$libname$shrext.$ver" 1507 fi 1508 else 1509 eval library_names=\"$acl_library_names_spec\" 1510 for f in $library_names; do 1511 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then 1512 found_dir="$dir" 1513 found_so="$dir/$f" 1514 break 1515 fi 1516 done 1517 fi 1518 fi 1519 fi 1520 dnl Then look for a static library. 1521 if test "X$found_dir" = "X"; then 1522 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then 1523 found_dir="$dir" 1524 found_a="$dir/$libname.$acl_libext" 1525 fi 1526 fi 1527 if test "X$found_dir" != "X"; then 1528 if test -f "$dir/$libname.la"; then 1529 found_la="$dir/$libname.la" 1530 fi 1531 fi 1532 ;; 1533 esac 1534 if test "X$found_dir" != "X"; then 1535 break 1536 fi 1537 done 1538 fi 1539 if test "X$found_dir" != "X"; then 1540 dnl Found the library. 1541 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" 1542 if test "X$found_so" != "X"; then 1543 dnl Linking with a shared library. We attempt to hardcode its 1544 dnl directory into the executable's runpath, unless it's the 1545 dnl standard /usr/lib. 1546 if test "$enable_rpath" = no \ 1547 || test "X$found_dir" = "X/usr/$acl_libdirstem" \ 1548 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ 1549 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then 1550 dnl No hardcoding is needed. 1551 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 1552 else 1553 dnl Use an explicit option to hardcode DIR into the resulting 1554 dnl binary. 1555 dnl Potentially add DIR to ltrpathdirs. 1556 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 1557 haveit= 1558 for x in $ltrpathdirs; do 1559 if test "X$x" = "X$found_dir"; then 1560 haveit=yes 1561 break 1562 fi 1563 done 1564 if test -z "$haveit"; then 1565 ltrpathdirs="$ltrpathdirs $found_dir" 1566 fi 1567 dnl The hardcoding into $LIBNAME is system dependent. 1568 if test "$acl_hardcode_direct" = yes; then 1569 dnl Using DIR/libNAME.so during linking hardcodes DIR into the 1570 dnl resulting binary. 1571 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 1572 else 1573 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then 1574 dnl Use an explicit option to hardcode DIR into the resulting 1575 dnl binary. 1576 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 1577 dnl Potentially add DIR to rpathdirs. 1578 dnl The rpathdirs will be appended to $LIBNAME at the end. 1579 haveit= 1580 for x in $rpathdirs; do 1581 if test "X$x" = "X$found_dir"; then 1582 haveit=yes 1583 break 1584 fi 1585 done 1586 if test -z "$haveit"; then 1587 rpathdirs="$rpathdirs $found_dir" 1588 fi 1589 else 1590 dnl Rely on "-L$found_dir". 1591 dnl But don't add it if it's already contained in the LDFLAGS 1592 dnl or the already constructed $LIBNAME 1593 haveit= 1594 for x in $LDFLAGS $LIB[]NAME; do 1595 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1596 if test "X$x" = "X-L$found_dir"; then 1597 haveit=yes 1598 break 1599 fi 1600 done 1601 if test -z "$haveit"; then 1602 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" 1603 fi 1604 if test "$acl_hardcode_minus_L" != no; then 1605 dnl FIXME: Not sure whether we should use 1606 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 1607 dnl here. 1608 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 1609 else 1610 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH 1611 dnl here, because this doesn't fit in flags passed to the 1612 dnl compiler. So give up. No hardcoding. This affects only 1613 dnl very old systems. 1614 dnl FIXME: Not sure whether we should use 1615 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 1616 dnl here. 1617 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 1618 fi 1619 fi 1620 fi 1621 fi 1622 else 1623 if test "X$found_a" != "X"; then 1624 dnl Linking with a static library. 1625 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" 1626 else 1627 dnl We shouldn't come here, but anyway it's good to have a 1628 dnl fallback. 1629 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" 1630 fi 1631 fi 1632 dnl Assume the include files are nearby. 1633 additional_includedir= 1634 case "$found_dir" in 1635 */$acl_libdirstem | */$acl_libdirstem/) 1636 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 1637 if test "$name" = '$1'; then 1638 LIB[]NAME[]_PREFIX="$basedir" 1639 fi 1640 additional_includedir="$basedir/include" 1641 ;; 1642 */$acl_libdirstem2 | */$acl_libdirstem2/) 1643 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` 1644 if test "$name" = '$1'; then 1645 LIB[]NAME[]_PREFIX="$basedir" 1646 fi 1647 additional_includedir="$basedir/include" 1648 ;; 1649 */$acl_libdirstem3 | */$acl_libdirstem3/) 1650 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` 1651 if test "$name" = '$1'; then 1652 LIB[]NAME[]_PREFIX="$basedir" 1653 fi 1654 additional_includedir="$basedir/include" 1655 ;; 1656 esac 1657 if test "X$additional_includedir" != "X"; then 1658 dnl Potentially add $additional_includedir to $INCNAME. 1659 dnl But don't add it 1660 dnl 1. if it's the standard /usr/include, 1661 dnl 2. if it's /usr/local/include and we are using GCC on Linux, 1662 dnl 3. if it's already present in $CPPFLAGS or the already 1663 dnl constructed $INCNAME, 1664 dnl 4. if it doesn't exist as a directory. 1665 if test "X$additional_includedir" != "X/usr/include"; then 1666 haveit= 1667 if test "X$additional_includedir" = "X/usr/local/include"; then 1668 if test -n "$GCC"; then 1669 case $host_os in 1670 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 1671 esac 1672 fi 1673 fi 1674 if test -z "$haveit"; then 1675 for x in $CPPFLAGS $INC[]NAME; do 1676 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1677 if test "X$x" = "X-I$additional_includedir"; then 1678 haveit=yes 1679 break 1680 fi 1681 done 1682 if test -z "$haveit"; then 1683 if test -d "$additional_includedir"; then 1684 dnl Really add $additional_includedir to $INCNAME. 1685 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" 1686 fi 1687 fi 1688 fi 1689 fi 1690 fi 1691 dnl Look for dependencies. 1692 if test -n "$found_la"; then 1693 dnl Read the .la file. It defines the variables 1694 dnl dlname, library_names, old_library, dependency_libs, current, 1695 dnl age, revision, installed, dlopen, dlpreopen, libdir. 1696 save_libdir="$libdir" 1697 case "$found_la" in 1698 */* | *\\*) . "$found_la" ;; 1699 *) . "./$found_la" ;; 1700 esac 1701 libdir="$save_libdir" 1702 dnl We use only dependency_libs. 1703 for dep in $dependency_libs; do 1704 case "$dep" in 1705 -L*) 1706 dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 1707 dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME. 1708 dnl But don't add it 1709 dnl 1. if it's the standard /usr/lib, 1710 dnl 2. if it's /usr/local/lib and we are using GCC on Linux, 1711 dnl 3. if it's already present in $LDFLAGS or the already 1712 dnl constructed $LIBNAME, 1713 dnl 4. if it doesn't exist as a directory. 1714 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ 1715 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ 1716 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then 1717 haveit= 1718 if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ 1719 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ 1720 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then 1721 if test -n "$GCC"; then 1722 case $host_os in 1723 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 1724 esac 1725 fi 1726 fi 1727 if test -z "$haveit"; then 1728 haveit= 1729 for x in $LDFLAGS $LIB[]NAME; do 1730 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1731 if test "X$x" = "X-L$dependency_libdir"; then 1732 haveit=yes 1733 break 1734 fi 1735 done 1736 if test -z "$haveit"; then 1737 if test -d "$dependency_libdir"; then 1738 dnl Really add $dependency_libdir to $LIBNAME. 1739 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir" 1740 fi 1741 fi 1742 haveit= 1743 for x in $LDFLAGS $LTLIB[]NAME; do 1744 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1745 if test "X$x" = "X-L$dependency_libdir"; then 1746 haveit=yes 1747 break 1748 fi 1749 done 1750 if test -z "$haveit"; then 1751 if test -d "$dependency_libdir"; then 1752 dnl Really add $dependency_libdir to $LTLIBNAME. 1753 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir" 1754 fi 1755 fi 1756 fi 1757 fi 1758 ;; 1759 -R*) 1760 dir=`echo "X$dep" | sed -e 's/^X-R//'` 1761 if test "$enable_rpath" != no; then 1762 dnl Potentially add DIR to rpathdirs. 1763 dnl The rpathdirs will be appended to $LIBNAME at the end. 1764 haveit= 1765 for x in $rpathdirs; do 1766 if test "X$x" = "X$dir"; then 1767 haveit=yes 1768 break 1769 fi 1770 done 1771 if test -z "$haveit"; then 1772 rpathdirs="$rpathdirs $dir" 1773 fi 1774 dnl Potentially add DIR to ltrpathdirs. 1775 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 1776 haveit= 1777 for x in $ltrpathdirs; do 1778 if test "X$x" = "X$dir"; then 1779 haveit=yes 1780 break 1781 fi 1782 done 1783 if test -z "$haveit"; then 1784 ltrpathdirs="$ltrpathdirs $dir" 1785 fi 1786 fi 1787 ;; 1788 -l*) 1789 dnl Handle this in the next round. 1790 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 1791 ;; 1792 *.la) 1793 dnl Handle this in the next round. Throw away the .la's 1794 dnl directory; it is already contained in a preceding -L 1795 dnl option. 1796 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 1797 ;; 1798 *) 1799 dnl Most likely an immediate library name. 1800 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" 1801 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" 1802 ;; 1803 esac 1804 done 1805 fi 1806 else 1807 dnl Didn't find the library; assume it is in the system directories 1808 dnl known to the linker and runtime loader. (All the system 1809 dnl directories known to the linker should also be known to the 1810 dnl runtime loader, otherwise the system is severely misconfigured.) 1811 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 1812 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" 1813 fi 1814 fi 1815 fi 1816 done 1817 done 1818 if test "X$rpathdirs" != "X"; then 1819 if test -n "$acl_hardcode_libdir_separator"; then 1820 dnl Weird platform: only the last -rpath option counts, the user must 1821 dnl pass all path elements in one option. We can arrange that for a 1822 dnl single library, but not when more than one $LIBNAMEs are used. 1823 alldirs= 1824 for found_dir in $rpathdirs; do 1825 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" 1826 done 1827 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. 1828 acl_save_libdir="$libdir" 1829 libdir="$alldirs" 1830 eval flag=\"$acl_hardcode_libdir_flag_spec\" 1831 libdir="$acl_save_libdir" 1832 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 1833 else 1834 dnl The -rpath options are cumulative. 1835 for found_dir in $rpathdirs; do 1836 acl_save_libdir="$libdir" 1837 libdir="$found_dir" 1838 eval flag=\"$acl_hardcode_libdir_flag_spec\" 1839 libdir="$acl_save_libdir" 1840 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 1841 done 1842 fi 1843 fi 1844 if test "X$ltrpathdirs" != "X"; then 1845 dnl When using libtool, the option that works for both libraries and 1846 dnl executables is -R. The -R options are cumulative. 1847 for found_dir in $ltrpathdirs; do 1848 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" 1849 done 1850 fi 1851 popdef([PACKLIBS]) 1852 popdef([PACKUP]) 1853 popdef([PACK]) 1854 popdef([NAME]) 1855]) 1856 1857dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, 1858dnl unless already present in VAR. 1859dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes 1860dnl contains two or three consecutive elements that belong together. 1861AC_DEFUN([AC_LIB_APPENDTOVAR], 1862[ 1863 for element in [$2]; do 1864 haveit= 1865 for x in $[$1]; do 1866 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1867 if test "X$x" = "X$element"; then 1868 haveit=yes 1869 break 1870 fi 1871 done 1872 if test -z "$haveit"; then 1873 [$1]="${[$1]}${[$1]:+ }$element" 1874 fi 1875 done 1876]) 1877 1878dnl For those cases where a variable contains several -L and -l options 1879dnl referring to unknown libraries and directories, this macro determines the 1880dnl necessary additional linker options for the runtime path. 1881dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) 1882dnl sets LDADDVAR to linker options needed together with LIBSVALUE. 1883dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, 1884dnl otherwise linking without libtool is assumed. 1885AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], 1886[ 1887 AC_REQUIRE([AC_LIB_RPATH]) 1888 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 1889 $1= 1890 if test "$enable_rpath" != no; then 1891 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then 1892 dnl Use an explicit option to hardcode directories into the resulting 1893 dnl binary. 1894 rpathdirs= 1895 next= 1896 for opt in $2; do 1897 if test -n "$next"; then 1898 dir="$next" 1899 dnl No need to hardcode the standard /usr/lib. 1900 if test "X$dir" != "X/usr/$acl_libdirstem" \ 1901 && test "X$dir" != "X/usr/$acl_libdirstem2" \ 1902 && test "X$dir" != "X/usr/$acl_libdirstem3"; then 1903 rpathdirs="$rpathdirs $dir" 1904 fi 1905 next= 1906 else 1907 case $opt in 1908 -L) next=yes ;; 1909 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` 1910 dnl No need to hardcode the standard /usr/lib. 1911 if test "X$dir" != "X/usr/$acl_libdirstem" \ 1912 && test "X$dir" != "X/usr/$acl_libdirstem2" \ 1913 && test "X$dir" != "X/usr/$acl_libdirstem3"; then 1914 rpathdirs="$rpathdirs $dir" 1915 fi 1916 next= ;; 1917 *) next= ;; 1918 esac 1919 fi 1920 done 1921 if test "X$rpathdirs" != "X"; then 1922 if test -n ""$3""; then 1923 dnl libtool is used for linking. Use -R options. 1924 for dir in $rpathdirs; do 1925 $1="${$1}${$1:+ }-R$dir" 1926 done 1927 else 1928 dnl The linker is used for linking directly. 1929 if test -n "$acl_hardcode_libdir_separator"; then 1930 dnl Weird platform: only the last -rpath option counts, the user 1931 dnl must pass all path elements in one option. 1932 alldirs= 1933 for dir in $rpathdirs; do 1934 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" 1935 done 1936 acl_save_libdir="$libdir" 1937 libdir="$alldirs" 1938 eval flag=\"$acl_hardcode_libdir_flag_spec\" 1939 libdir="$acl_save_libdir" 1940 $1="$flag" 1941 else 1942 dnl The -rpath options are cumulative. 1943 for dir in $rpathdirs; do 1944 acl_save_libdir="$libdir" 1945 libdir="$dir" 1946 eval flag=\"$acl_hardcode_libdir_flag_spec\" 1947 libdir="$acl_save_libdir" 1948 $1="${$1}${$1:+ }$flag" 1949 done 1950 fi 1951 fi 1952 fi 1953 fi 1954 fi 1955 AC_SUBST([$1]) 1956]) 1957 1958# lib-prefix.m4 serial 17 1959dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc. 1960dnl This file is free software; the Free Software Foundation 1961dnl gives unlimited permission to copy and/or distribute it, 1962dnl with or without modifications, as long as this notice is preserved. 1963 1964dnl From Bruno Haible. 1965 1966dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 1967dnl to access previously installed libraries. The basic assumption is that 1968dnl a user will want packages to use other packages he previously installed 1969dnl with the same --prefix option. 1970dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate 1971dnl libraries, but is otherwise very convenient. 1972AC_DEFUN([AC_LIB_PREFIX], 1973[ 1974 AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) 1975 AC_REQUIRE([AC_PROG_CC]) 1976 AC_REQUIRE([AC_CANONICAL_HOST]) 1977 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 1978 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 1979 dnl By default, look in $includedir and $libdir. 1980 use_additional=yes 1981 AC_LIB_WITH_FINAL_PREFIX([ 1982 eval additional_includedir=\"$includedir\" 1983 eval additional_libdir=\"$libdir\" 1984 ]) 1985 AC_ARG_WITH([lib-prefix], 1986[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib 1987 --without-lib-prefix don't search for libraries in includedir and libdir]], 1988[ 1989 if test "X$withval" = "Xno"; then 1990 use_additional=no 1991 else 1992 if test "X$withval" = "X"; then 1993 AC_LIB_WITH_FINAL_PREFIX([ 1994 eval additional_includedir=\"$includedir\" 1995 eval additional_libdir=\"$libdir\" 1996 ]) 1997 else 1998 additional_includedir="$withval/include" 1999 additional_libdir="$withval/$acl_libdirstem" 2000 fi 2001 fi 2002]) 2003 if test $use_additional = yes; then 2004 dnl Potentially add $additional_includedir to $CPPFLAGS. 2005 dnl But don't add it 2006 dnl 1. if it's the standard /usr/include, 2007 dnl 2. if it's already present in $CPPFLAGS, 2008 dnl 3. if it's /usr/local/include and we are using GCC on Linux, 2009 dnl 4. if it doesn't exist as a directory. 2010 if test "X$additional_includedir" != "X/usr/include"; then 2011 haveit= 2012 for x in $CPPFLAGS; do 2013 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 2014 if test "X$x" = "X-I$additional_includedir"; then 2015 haveit=yes 2016 break 2017 fi 2018 done 2019 if test -z "$haveit"; then 2020 if test "X$additional_includedir" = "X/usr/local/include"; then 2021 if test -n "$GCC"; then 2022 case $host_os in 2023 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 2024 esac 2025 fi 2026 fi 2027 if test -z "$haveit"; then 2028 if test -d "$additional_includedir"; then 2029 dnl Really add $additional_includedir to $CPPFLAGS. 2030 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" 2031 fi 2032 fi 2033 fi 2034 fi 2035 dnl Potentially add $additional_libdir to $LDFLAGS. 2036 dnl But don't add it 2037 dnl 1. if it's the standard /usr/lib, 2038 dnl 2. if it's already present in $LDFLAGS, 2039 dnl 3. if it's /usr/local/lib and we are using GCC on Linux, 2040 dnl 4. if it doesn't exist as a directory. 2041 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then 2042 haveit= 2043 for x in $LDFLAGS; do 2044 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 2045 if test "X$x" = "X-L$additional_libdir"; then 2046 haveit=yes 2047 break 2048 fi 2049 done 2050 if test -z "$haveit"; then 2051 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then 2052 if test -n "$GCC"; then 2053 case $host_os in 2054 linux*) haveit=yes;; 2055 esac 2056 fi 2057 fi 2058 if test -z "$haveit"; then 2059 if test -d "$additional_libdir"; then 2060 dnl Really add $additional_libdir to $LDFLAGS. 2061 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" 2062 fi 2063 fi 2064 fi 2065 fi 2066 fi 2067]) 2068 2069dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, 2070dnl acl_final_exec_prefix, containing the values to which $prefix and 2071dnl $exec_prefix will expand at the end of the configure script. 2072AC_DEFUN([AC_LIB_PREPARE_PREFIX], 2073[ 2074 dnl Unfortunately, prefix and exec_prefix get only finally determined 2075 dnl at the end of configure. 2076 if test "X$prefix" = "XNONE"; then 2077 acl_final_prefix="$ac_default_prefix" 2078 else 2079 acl_final_prefix="$prefix" 2080 fi 2081 if test "X$exec_prefix" = "XNONE"; then 2082 acl_final_exec_prefix='${prefix}' 2083 else 2084 acl_final_exec_prefix="$exec_prefix" 2085 fi 2086 acl_save_prefix="$prefix" 2087 prefix="$acl_final_prefix" 2088 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" 2089 prefix="$acl_save_prefix" 2090]) 2091 2092dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the 2093dnl variables prefix and exec_prefix bound to the values they will have 2094dnl at the end of the configure script. 2095AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], 2096[ 2097 acl_save_prefix="$prefix" 2098 prefix="$acl_final_prefix" 2099 acl_save_exec_prefix="$exec_prefix" 2100 exec_prefix="$acl_final_exec_prefix" 2101 $1 2102 exec_prefix="$acl_save_exec_prefix" 2103 prefix="$acl_save_prefix" 2104]) 2105 2106dnl AC_LIB_PREPARE_MULTILIB creates 2107dnl - a function acl_is_expected_elfclass, that tests whether standard input 2108dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, 2109dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing 2110dnl the basename of the libdir to try in turn, either "lib" or "lib64" or 2111dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. 2112AC_DEFUN([AC_LIB_PREPARE_MULTILIB], 2113[ 2114 dnl There is no formal standard regarding lib, lib32, and lib64. 2115 dnl On most glibc systems, the current practice is that on a system supporting 2116 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under 2117 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on 2118 dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go 2119 dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. 2120 dnl We determine the compiler's default mode by looking at the compiler's 2121 dnl library search path. If at least one of its elements ends in /lib64 or 2122 dnl points to a directory whose absolute pathname ends in /lib64, we use that 2123 dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default, 2124 dnl namely "lib". 2125 dnl On Solaris systems, the current practice is that on a system supporting 2126 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under 2127 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or 2128 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. 2129 AC_REQUIRE([AC_CANONICAL_HOST]) 2130 AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) 2131 2132 AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], 2133 [AC_EGREP_CPP([Extensible Linking Format], 2134 [#ifdef __ELF__ 2135 Extensible Linking Format 2136 #endif 2137 ], 2138 [gl_cv_elf=yes], 2139 [gl_cv_elf=no]) 2140 ]) 2141 if test $gl_cv_elf; then 2142 # Extract the ELF class of a file (5th byte) in decimal. 2143 # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header 2144 if od -A x < /dev/null >/dev/null 2>/dev/null; then 2145 # Use POSIX od. 2146 func_elfclass () 2147 { 2148 od -A n -t d1 -j 4 -N 1 2149 } 2150 else 2151 # Use BSD hexdump. 2152 func_elfclass () 2153 { 2154 dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' 2155 echo 2156 } 2157 fi 2158changequote(,)dnl 2159 case $HOST_CPU_C_ABI_32BIT in 2160 yes) 2161 # 32-bit ABI. 2162 acl_is_expected_elfclass () 2163 { 2164 test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 2165 } 2166 ;; 2167 no) 2168 # 64-bit ABI. 2169 acl_is_expected_elfclass () 2170 { 2171 test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 2172 } 2173 ;; 2174 *) 2175 # Unknown. 2176 acl_is_expected_elfclass () 2177 { 2178 : 2179 } 2180 ;; 2181 esac 2182changequote([,])dnl 2183 else 2184 acl_is_expected_elfclass () 2185 { 2186 : 2187 } 2188 fi 2189 2190 dnl Allow the user to override the result by setting acl_cv_libdirstems. 2191 AC_CACHE_CHECK([for the common suffixes of directories in the library search path], 2192 [acl_cv_libdirstems], 2193 [dnl Try 'lib' first, because that's the default for libdir in GNU, see 2194 dnl <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>. 2195 acl_libdirstem=lib 2196 acl_libdirstem2= 2197 acl_libdirstem3= 2198 case "$host_os" in 2199 solaris*) 2200 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment 2201 dnl <https://docs.oracle.com/cd/E19253-01/816-5138/dev-env/index.html>. 2202 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." 2203 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the 2204 dnl symlink is missing, so we set acl_libdirstem2 too. 2205 if test $HOST_CPU_C_ABI_32BIT = no; then 2206 acl_libdirstem2=lib/64 2207 case "$host_cpu" in 2208 sparc*) acl_libdirstem3=lib/sparcv9 ;; 2209 i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; 2210 esac 2211 fi 2212 ;; 2213 *) 2214 dnl If $CC generates code for a 32-bit ABI, the libraries are 2215 dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. 2216 dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries 2217 dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32. 2218 dnl Find the compiler's search path. However, non-system compilers 2219 dnl sometimes have odd library search paths. But we can't simply invoke 2220 dnl '/usr/bin/gcc -print-search-dirs' because that would not take into 2221 dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS. 2222 searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ 2223 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` 2224 if test $HOST_CPU_C_ABI_32BIT != no; then 2225 # 32-bit or unknown ABI. 2226 if test -d /usr/lib32; then 2227 acl_libdirstem2=lib32 2228 fi 2229 fi 2230 if test $HOST_CPU_C_ABI_32BIT != yes; then 2231 # 64-bit or unknown ABI. 2232 if test -d /usr/lib64; then 2233 acl_libdirstem3=lib64 2234 fi 2235 fi 2236 if test -n "$searchpath"; then 2237 acl_save_IFS="${IFS= }"; IFS=":" 2238 for searchdir in $searchpath; do 2239 if test -d "$searchdir"; then 2240 case "$searchdir" in 2241 */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; 2242 */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; 2243 */../ | */.. ) 2244 # Better ignore directories of this form. They are misleading. 2245 ;; 2246 *) searchdir=`cd "$searchdir" && pwd` 2247 case "$searchdir" in 2248 */lib32 ) acl_libdirstem2=lib32 ;; 2249 */lib64 ) acl_libdirstem3=lib64 ;; 2250 esac ;; 2251 esac 2252 fi 2253 done 2254 IFS="$acl_save_IFS" 2255 if test $HOST_CPU_C_ABI_32BIT = yes; then 2256 # 32-bit ABI. 2257 acl_libdirstem3= 2258 fi 2259 if test $HOST_CPU_C_ABI_32BIT = no; then 2260 # 64-bit ABI. 2261 acl_libdirstem2= 2262 fi 2263 fi 2264 ;; 2265 esac 2266 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" 2267 test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" 2268 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" 2269 ]) 2270 dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and 2271 dnl acl_libdirstem3. 2272changequote(,)dnl 2273 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` 2274 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` 2275 acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` 2276changequote([,])dnl 2277]) 2278 2279# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2280# 2281# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 2282# Written by Gordon Matzigkeit, 1996 2283# 2284# This file is free software; the Free Software Foundation gives 2285# unlimited permission to copy and/or distribute it, with or without 2286# modifications, as long as this notice is preserved. 2287 2288m4_define([_LT_COPYING], [dnl 2289# Copyright (C) 2014 Free Software Foundation, Inc. 2290# This is free software; see the source for copying conditions. There is NO 2291# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 2292 2293# GNU Libtool is free software; you can redistribute it and/or modify 2294# it under the terms of the GNU General Public License as published by 2295# the Free Software Foundation; either version 2 of of the License, or 2296# (at your option) any later version. 2297# 2298# As a special exception to the GNU General Public License, if you 2299# distribute this file as part of a program or library that is built 2300# using GNU Libtool, you may include this file under the same 2301# distribution terms that you use for the rest of that program. 2302# 2303# GNU Libtool is distributed in the hope that it will be useful, but 2304# WITHOUT ANY WARRANTY; without even the implied warranty of 2305# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2306# GNU General Public License for more details. 2307# 2308# You should have received a copy of the GNU General Public License 2309# along with this program. If not, see <http://www.gnu.org/licenses/>. 2310]) 2311 2312# serial 58 LT_INIT 2313 2314 2315# LT_PREREQ(VERSION) 2316# ------------------ 2317# Complain and exit if this libtool version is less that VERSION. 2318m4_defun([LT_PREREQ], 2319[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 2320 [m4_default([$3], 2321 [m4_fatal([Libtool version $1 or higher is required], 2322 63)])], 2323 [$2])]) 2324 2325 2326# _LT_CHECK_BUILDDIR 2327# ------------------ 2328# Complain if the absolute build directory name contains unusual characters 2329m4_defun([_LT_CHECK_BUILDDIR], 2330[case `pwd` in 2331 *\ * | *\ *) 2332 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 2333esac 2334]) 2335 2336 2337# LT_INIT([OPTIONS]) 2338# ------------------ 2339AC_DEFUN([LT_INIT], 2340[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 2341AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 2342AC_BEFORE([$0], [LT_LANG])dnl 2343AC_BEFORE([$0], [LT_OUTPUT])dnl 2344AC_BEFORE([$0], [LTDL_INIT])dnl 2345m4_require([_LT_CHECK_BUILDDIR])dnl 2346 2347dnl Autoconf doesn't catch unexpanded LT_ macros by default: 2348m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 2349m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 2350dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 2351dnl unless we require an AC_DEFUNed macro: 2352AC_REQUIRE([LTOPTIONS_VERSION])dnl 2353AC_REQUIRE([LTSUGAR_VERSION])dnl 2354AC_REQUIRE([LTVERSION_VERSION])dnl 2355AC_REQUIRE([LTOBSOLETE_VERSION])dnl 2356m4_require([_LT_PROG_LTMAIN])dnl 2357 2358_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 2359 2360dnl Parse OPTIONS 2361_LT_SET_OPTIONS([$0], [$1]) 2362 2363# This can be used to rebuild libtool when needed 2364LIBTOOL_DEPS=$ltmain 2365 2366# Always use our own libtool. 2367LIBTOOL='$(SHELL) $(top_builddir)/libtool' 2368AC_SUBST(LIBTOOL)dnl 2369 2370_LT_SETUP 2371 2372# Only expand once: 2373m4_define([LT_INIT]) 2374])# LT_INIT 2375 2376# Old names: 2377AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 2378AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 2379dnl aclocal-1.4 backwards compatibility: 2380dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 2381dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 2382 2383 2384# _LT_PREPARE_CC_BASENAME 2385# ----------------------- 2386m4_defun([_LT_PREPARE_CC_BASENAME], [ 2387# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2388func_cc_basename () 2389{ 2390 for cc_temp in @S|@*""; do 2391 case $cc_temp in 2392 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2393 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2394 \-*) ;; 2395 *) break;; 2396 esac 2397 done 2398 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 2399} 2400])# _LT_PREPARE_CC_BASENAME 2401 2402 2403# _LT_CC_BASENAME(CC) 2404# ------------------- 2405# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 2406# but that macro is also expanded into generated libtool script, which 2407# arranges for $SED and $ECHO to be set by different means. 2408m4_defun([_LT_CC_BASENAME], 2409[m4_require([_LT_PREPARE_CC_BASENAME])dnl 2410AC_REQUIRE([_LT_DECL_SED])dnl 2411AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 2412func_cc_basename $1 2413cc_basename=$func_cc_basename_result 2414]) 2415 2416 2417# _LT_FILEUTILS_DEFAULTS 2418# ---------------------- 2419# It is okay to use these file commands and assume they have been set 2420# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 2421m4_defun([_LT_FILEUTILS_DEFAULTS], 2422[: ${CP="cp -f"} 2423: ${MV="mv -f"} 2424: ${RM="rm -f"} 2425])# _LT_FILEUTILS_DEFAULTS 2426 2427 2428# _LT_SETUP 2429# --------- 2430m4_defun([_LT_SETUP], 2431[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2432AC_REQUIRE([AC_CANONICAL_BUILD])dnl 2433AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 2434AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 2435 2436_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 2437dnl 2438_LT_DECL([], [host_alias], [0], [The host system])dnl 2439_LT_DECL([], [host], [0])dnl 2440_LT_DECL([], [host_os], [0])dnl 2441dnl 2442_LT_DECL([], [build_alias], [0], [The build system])dnl 2443_LT_DECL([], [build], [0])dnl 2444_LT_DECL([], [build_os], [0])dnl 2445dnl 2446AC_REQUIRE([AC_PROG_CC])dnl 2447AC_REQUIRE([LT_PATH_LD])dnl 2448AC_REQUIRE([LT_PATH_NM])dnl 2449dnl 2450AC_REQUIRE([AC_PROG_LN_S])dnl 2451test -z "$LN_S" && LN_S="ln -s" 2452_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 2453dnl 2454AC_REQUIRE([LT_CMD_MAX_LEN])dnl 2455_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2456_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2457dnl 2458m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2459m4_require([_LT_CHECK_SHELL_FEATURES])dnl 2460m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 2461m4_require([_LT_CMD_RELOAD])dnl 2462m4_require([_LT_CHECK_MAGIC_METHOD])dnl 2463m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 2464m4_require([_LT_CMD_OLD_ARCHIVE])dnl 2465m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2466m4_require([_LT_WITH_SYSROOT])dnl 2467m4_require([_LT_CMD_TRUNCATE])dnl 2468 2469_LT_CONFIG_LIBTOOL_INIT([ 2470# See if we are running on zsh, and set the options that allow our 2471# commands through without removal of \ escapes INIT. 2472if test -n "\${ZSH_VERSION+set}"; then 2473 setopt NO_GLOB_SUBST 2474fi 2475]) 2476if test -n "${ZSH_VERSION+set}"; then 2477 setopt NO_GLOB_SUBST 2478fi 2479 2480_LT_CHECK_OBJDIR 2481 2482m4_require([_LT_TAG_COMPILER])dnl 2483 2484case $host_os in 2485aix3*) 2486 # AIX sometimes has problems with the GCC collect2 program. For some 2487 # reason, if we set the COLLECT_NAMES environment variable, the problems 2488 # vanish in a puff of smoke. 2489 if test set != "${COLLECT_NAMES+set}"; then 2490 COLLECT_NAMES= 2491 export COLLECT_NAMES 2492 fi 2493 ;; 2494esac 2495 2496# Global variables: 2497ofile=libtool 2498can_build_shared=yes 2499 2500# All known linkers require a '.a' archive for static linking (except MSVC, 2501# which needs '.lib'). 2502libext=a 2503 2504with_gnu_ld=$lt_cv_prog_gnu_ld 2505 2506old_CC=$CC 2507old_CFLAGS=$CFLAGS 2508 2509# Set sane defaults for various variables 2510test -z "$CC" && CC=cc 2511test -z "$LTCC" && LTCC=$CC 2512test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2513test -z "$LD" && LD=ld 2514test -z "$ac_objext" && ac_objext=o 2515 2516_LT_CC_BASENAME([$compiler]) 2517 2518# Only perform the check for file, if the check method requires it 2519test -z "$MAGIC_CMD" && MAGIC_CMD=file 2520case $deplibs_check_method in 2521file_magic*) 2522 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2523 _LT_PATH_MAGIC 2524 fi 2525 ;; 2526esac 2527 2528# Use C for the default configuration in the libtool script 2529LT_SUPPORTED_TAG([CC]) 2530_LT_LANG_C_CONFIG 2531_LT_LANG_DEFAULT_CONFIG 2532_LT_CONFIG_COMMANDS 2533])# _LT_SETUP 2534 2535 2536# _LT_PREPARE_SED_QUOTE_VARS 2537# -------------------------- 2538# Define a few sed substitution that help us do robust quoting. 2539m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2540[# Backslashify metacharacters that are still active within 2541# double-quoted strings. 2542sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2543 2544# Same as above, but do not quote variable references. 2545double_quote_subst='s/\([["`\\]]\)/\\\1/g' 2546 2547# Sed substitution to delay expansion of an escaped shell variable in a 2548# double_quote_subst'ed string. 2549delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2550 2551# Sed substitution to delay expansion of an escaped single quote. 2552delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2553 2554# Sed substitution to avoid accidental globbing in evaled expressions 2555no_glob_subst='s/\*/\\\*/g' 2556]) 2557 2558# _LT_PROG_LTMAIN 2559# --------------- 2560# Note that this code is called both from 'configure', and 'config.status' 2561# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2562# 'config.status' has no value for ac_aux_dir unless we are using Automake, 2563# so we pass a copy along to make sure it has a sensible value anyway. 2564m4_defun([_LT_PROG_LTMAIN], 2565[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2566_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2567ltmain=$ac_aux_dir/ltmain.sh 2568])# _LT_PROG_LTMAIN 2569 2570 2571 2572# So that we can recreate a full libtool script including additional 2573# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2574# in macros and then make a single call at the end using the 'libtool' 2575# label. 2576 2577 2578# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2579# ---------------------------------------- 2580# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2581m4_define([_LT_CONFIG_LIBTOOL_INIT], 2582[m4_ifval([$1], 2583 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 2584 [$1 2585])])]) 2586 2587# Initialize. 2588m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 2589 2590 2591# _LT_CONFIG_LIBTOOL([COMMANDS]) 2592# ------------------------------ 2593# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2594m4_define([_LT_CONFIG_LIBTOOL], 2595[m4_ifval([$1], 2596 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 2597 [$1 2598])])]) 2599 2600# Initialize. 2601m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 2602 2603 2604# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 2605# ----------------------------------------------------- 2606m4_defun([_LT_CONFIG_SAVE_COMMANDS], 2607[_LT_CONFIG_LIBTOOL([$1]) 2608_LT_CONFIG_LIBTOOL_INIT([$2]) 2609]) 2610 2611 2612# _LT_FORMAT_COMMENT([COMMENT]) 2613# ----------------------------- 2614# Add leading comment marks to the start of each line, and a trailing 2615# full-stop to the whole comment if one is not present already. 2616m4_define([_LT_FORMAT_COMMENT], 2617[m4_ifval([$1], [ 2618m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 2619 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 2620)]) 2621 2622 2623 2624 2625 2626# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 2627# ------------------------------------------------------------------- 2628# CONFIGNAME is the name given to the value in the libtool script. 2629# VARNAME is the (base) name used in the configure script. 2630# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 2631# VARNAME. Any other value will be used directly. 2632m4_define([_LT_DECL], 2633[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 2634 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 2635 [m4_ifval([$1], [$1], [$2])]) 2636 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 2637 m4_ifval([$4], 2638 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 2639 lt_dict_add_subkey([lt_decl_dict], [$2], 2640 [tagged?], [m4_ifval([$5], [yes], [no])])]) 2641]) 2642 2643 2644# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 2645# -------------------------------------------------------- 2646m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 2647 2648 2649# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 2650# ------------------------------------------------ 2651m4_define([lt_decl_tag_varnames], 2652[_lt_decl_filter([tagged?], [yes], $@)]) 2653 2654 2655# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 2656# --------------------------------------------------------- 2657m4_define([_lt_decl_filter], 2658[m4_case([$#], 2659 [0], [m4_fatal([$0: too few arguments: $#])], 2660 [1], [m4_fatal([$0: too few arguments: $#: $1])], 2661 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 2662 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 2663 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 2664]) 2665 2666 2667# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 2668# -------------------------------------------------- 2669m4_define([lt_decl_quote_varnames], 2670[_lt_decl_filter([value], [1], $@)]) 2671 2672 2673# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 2674# --------------------------------------------------- 2675m4_define([lt_decl_dquote_varnames], 2676[_lt_decl_filter([value], [2], $@)]) 2677 2678 2679# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 2680# --------------------------------------------------- 2681m4_define([lt_decl_varnames_tagged], 2682[m4_assert([$# <= 2])dnl 2683_$0(m4_quote(m4_default([$1], [[, ]])), 2684 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 2685 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 2686m4_define([_lt_decl_varnames_tagged], 2687[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 2688 2689 2690# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 2691# ------------------------------------------------ 2692m4_define([lt_decl_all_varnames], 2693[_$0(m4_quote(m4_default([$1], [[, ]])), 2694 m4_if([$2], [], 2695 m4_quote(lt_decl_varnames), 2696 m4_quote(m4_shift($@))))[]dnl 2697]) 2698m4_define([_lt_decl_all_varnames], 2699[lt_join($@, lt_decl_varnames_tagged([$1], 2700 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 2701]) 2702 2703 2704# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 2705# ------------------------------------ 2706# Quote a variable value, and forward it to 'config.status' so that its 2707# declaration there will have the same value as in 'configure'. VARNAME 2708# must have a single quote delimited value for this to work. 2709m4_define([_LT_CONFIG_STATUS_DECLARE], 2710[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 2711 2712 2713# _LT_CONFIG_STATUS_DECLARATIONS 2714# ------------------------------ 2715# We delimit libtool config variables with single quotes, so when 2716# we write them to config.status, we have to be sure to quote all 2717# embedded single quotes properly. In configure, this macro expands 2718# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 2719# 2720# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 2721m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 2722[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 2723 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 2724 2725 2726# _LT_LIBTOOL_TAGS 2727# ---------------- 2728# Output comment and list of tags supported by the script 2729m4_defun([_LT_LIBTOOL_TAGS], 2730[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 2731available_tags='_LT_TAGS'dnl 2732]) 2733 2734 2735# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 2736# ----------------------------------- 2737# Extract the dictionary values for VARNAME (optionally with TAG) and 2738# expand to a commented shell variable setting: 2739# 2740# # Some comment about what VAR is for. 2741# visible_name=$lt_internal_name 2742m4_define([_LT_LIBTOOL_DECLARE], 2743[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 2744 [description])))[]dnl 2745m4_pushdef([_libtool_name], 2746 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 2747m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 2748 [0], [_libtool_name=[$]$1], 2749 [1], [_libtool_name=$lt_[]$1], 2750 [2], [_libtool_name=$lt_[]$1], 2751 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 2752m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 2753]) 2754 2755 2756# _LT_LIBTOOL_CONFIG_VARS 2757# ----------------------- 2758# Produce commented declarations of non-tagged libtool config variables 2759# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 2760# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 2761# section) are produced by _LT_LIBTOOL_TAG_VARS. 2762m4_defun([_LT_LIBTOOL_CONFIG_VARS], 2763[m4_foreach([_lt_var], 2764 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 2765 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 2766 2767 2768# _LT_LIBTOOL_TAG_VARS(TAG) 2769# ------------------------- 2770m4_define([_LT_LIBTOOL_TAG_VARS], 2771[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 2772 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 2773 2774 2775# _LT_TAGVAR(VARNAME, [TAGNAME]) 2776# ------------------------------ 2777m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 2778 2779 2780# _LT_CONFIG_COMMANDS 2781# ------------------- 2782# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 2783# variables for single and double quote escaping we saved from calls 2784# to _LT_DECL, we can put quote escaped variables declarations 2785# into 'config.status', and then the shell code to quote escape them in 2786# for loops in 'config.status'. Finally, any additional code accumulated 2787# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 2788m4_defun([_LT_CONFIG_COMMANDS], 2789[AC_PROVIDE_IFELSE([LT_OUTPUT], 2790 dnl If the libtool generation code has been placed in $CONFIG_LT, 2791 dnl instead of duplicating it all over again into config.status, 2792 dnl then we will have config.status run $CONFIG_LT later, so it 2793 dnl needs to know what name is stored there: 2794 [AC_CONFIG_COMMANDS([libtool], 2795 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 2796 dnl If the libtool generation code is destined for config.status, 2797 dnl expand the accumulated commands and init code now: 2798 [AC_CONFIG_COMMANDS([libtool], 2799 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 2800])#_LT_CONFIG_COMMANDS 2801 2802 2803# Initialize. 2804m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 2805[ 2806 2807# The HP-UX ksh and POSIX shell print the target directory to stdout 2808# if CDPATH is set. 2809(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 2810 2811sed_quote_subst='$sed_quote_subst' 2812double_quote_subst='$double_quote_subst' 2813delay_variable_subst='$delay_variable_subst' 2814_LT_CONFIG_STATUS_DECLARATIONS 2815LTCC='$LTCC' 2816LTCFLAGS='$LTCFLAGS' 2817compiler='$compiler_DEFAULT' 2818 2819# A function that is used when there is no print builtin or printf. 2820func_fallback_echo () 2821{ 2822 eval 'cat <<_LTECHO_EOF 2823\$[]1 2824_LTECHO_EOF' 2825} 2826 2827# Quote evaled strings. 2828for var in lt_decl_all_varnames([[ \ 2829]], lt_decl_quote_varnames); do 2830 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 2831 *[[\\\\\\\`\\"\\\$]]*) 2832 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 2833 ;; 2834 *) 2835 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 2836 ;; 2837 esac 2838done 2839 2840# Double-quote double-evaled strings. 2841for var in lt_decl_all_varnames([[ \ 2842]], lt_decl_dquote_varnames); do 2843 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 2844 *[[\\\\\\\`\\"\\\$]]*) 2845 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 2846 ;; 2847 *) 2848 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 2849 ;; 2850 esac 2851done 2852 2853_LT_OUTPUT_LIBTOOL_INIT 2854]) 2855 2856# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 2857# ------------------------------------ 2858# Generate a child script FILE with all initialization necessary to 2859# reuse the environment learned by the parent script, and make the 2860# file executable. If COMMENT is supplied, it is inserted after the 2861# '#!' sequence but before initialization text begins. After this 2862# macro, additional text can be appended to FILE to form the body of 2863# the child script. The macro ends with non-zero status if the 2864# file could not be fully written (such as if the disk is full). 2865m4_ifdef([AS_INIT_GENERATED], 2866[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 2867[m4_defun([_LT_GENERATED_FILE_INIT], 2868[m4_require([AS_PREPARE])]dnl 2869[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 2870[lt_write_fail=0 2871cat >$1 <<_ASEOF || lt_write_fail=1 2872#! $SHELL 2873# Generated by $as_me. 2874$2 2875SHELL=\${CONFIG_SHELL-$SHELL} 2876export SHELL 2877_ASEOF 2878cat >>$1 <<\_ASEOF || lt_write_fail=1 2879AS_SHELL_SANITIZE 2880_AS_PREPARE 2881exec AS_MESSAGE_FD>&1 2882_ASEOF 2883test 0 = "$lt_write_fail" && chmod +x $1[]dnl 2884m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 2885 2886# LT_OUTPUT 2887# --------- 2888# This macro allows early generation of the libtool script (before 2889# AC_OUTPUT is called), incase it is used in configure for compilation 2890# tests. 2891AC_DEFUN([LT_OUTPUT], 2892[: ${CONFIG_LT=./config.lt} 2893AC_MSG_NOTICE([creating $CONFIG_LT]) 2894_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 2895[# Run this file to recreate a libtool stub with the current configuration.]) 2896 2897cat >>"$CONFIG_LT" <<\_LTEOF 2898lt_cl_silent=false 2899exec AS_MESSAGE_LOG_FD>>config.log 2900{ 2901 echo 2902 AS_BOX([Running $as_me.]) 2903} >&AS_MESSAGE_LOG_FD 2904 2905lt_cl_help="\ 2906'$as_me' creates a local libtool stub from the current configuration, 2907for use in further configure time tests before the real libtool is 2908generated. 2909 2910Usage: $[0] [[OPTIONS]] 2911 2912 -h, --help print this help, then exit 2913 -V, --version print version number, then exit 2914 -q, --quiet do not print progress messages 2915 -d, --debug don't remove temporary files 2916 2917Report bugs to <bug-libtool@gnu.org>." 2918 2919lt_cl_version="\ 2920m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 2921m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 2922configured by $[0], generated by m4_PACKAGE_STRING. 2923 2924Copyright (C) 2011 Free Software Foundation, Inc. 2925This config.lt script is free software; the Free Software Foundation 2926gives unlimited permision to copy, distribute and modify it." 2927 2928while test 0 != $[#] 2929do 2930 case $[1] in 2931 --version | --v* | -V ) 2932 echo "$lt_cl_version"; exit 0 ;; 2933 --help | --h* | -h ) 2934 echo "$lt_cl_help"; exit 0 ;; 2935 --debug | --d* | -d ) 2936 debug=: ;; 2937 --quiet | --q* | --silent | --s* | -q ) 2938 lt_cl_silent=: ;; 2939 2940 -*) AC_MSG_ERROR([unrecognized option: $[1] 2941Try '$[0] --help' for more information.]) ;; 2942 2943 *) AC_MSG_ERROR([unrecognized argument: $[1] 2944Try '$[0] --help' for more information.]) ;; 2945 esac 2946 shift 2947done 2948 2949if $lt_cl_silent; then 2950 exec AS_MESSAGE_FD>/dev/null 2951fi 2952_LTEOF 2953 2954cat >>"$CONFIG_LT" <<_LTEOF 2955_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 2956_LTEOF 2957 2958cat >>"$CONFIG_LT" <<\_LTEOF 2959AC_MSG_NOTICE([creating $ofile]) 2960_LT_OUTPUT_LIBTOOL_COMMANDS 2961AS_EXIT(0) 2962_LTEOF 2963chmod +x "$CONFIG_LT" 2964 2965# configure is writing to config.log, but config.lt does its own redirection, 2966# appending to config.log, which fails on DOS, as config.log is still kept 2967# open by configure. Here we exec the FD to /dev/null, effectively closing 2968# config.log, so it can be properly (re)opened and appended to by config.lt. 2969lt_cl_success=: 2970test yes = "$silent" && 2971 lt_config_lt_args="$lt_config_lt_args --quiet" 2972exec AS_MESSAGE_LOG_FD>/dev/null 2973$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 2974exec AS_MESSAGE_LOG_FD>>config.log 2975$lt_cl_success || AS_EXIT(1) 2976])# LT_OUTPUT 2977 2978 2979# _LT_CONFIG(TAG) 2980# --------------- 2981# If TAG is the built-in tag, create an initial libtool script with a 2982# default configuration from the untagged config vars. Otherwise add code 2983# to config.status for appending the configuration named by TAG from the 2984# matching tagged config vars. 2985m4_defun([_LT_CONFIG], 2986[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2987_LT_CONFIG_SAVE_COMMANDS([ 2988 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 2989 m4_if(_LT_TAG, [C], [ 2990 # See if we are running on zsh, and set the options that allow our 2991 # commands through without removal of \ escapes. 2992 if test -n "${ZSH_VERSION+set}"; then 2993 setopt NO_GLOB_SUBST 2994 fi 2995 2996 cfgfile=${ofile}T 2997 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 2998 $RM "$cfgfile" 2999 3000 cat <<_LT_EOF >> "$cfgfile" 3001#! $SHELL 3002# Generated automatically by $as_me ($PACKAGE) $VERSION 3003# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 3004# NOTE: Changes made to this file will be lost: look at ltmain.sh. 3005 3006# Provide generalized library-building support services. 3007# Written by Gordon Matzigkeit, 1996 3008 3009_LT_COPYING 3010_LT_LIBTOOL_TAGS 3011 3012# Configured defaults for sys_lib_dlsearch_path munging. 3013: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 3014 3015# ### BEGIN LIBTOOL CONFIG 3016_LT_LIBTOOL_CONFIG_VARS 3017_LT_LIBTOOL_TAG_VARS 3018# ### END LIBTOOL CONFIG 3019 3020_LT_EOF 3021 3022 cat <<'_LT_EOF' >> "$cfgfile" 3023 3024# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 3025 3026_LT_PREPARE_MUNGE_PATH_LIST 3027_LT_PREPARE_CC_BASENAME 3028 3029# ### END FUNCTIONS SHARED WITH CONFIGURE 3030 3031_LT_EOF 3032 3033 case $host_os in 3034 aix3*) 3035 cat <<\_LT_EOF >> "$cfgfile" 3036# AIX sometimes has problems with the GCC collect2 program. For some 3037# reason, if we set the COLLECT_NAMES environment variable, the problems 3038# vanish in a puff of smoke. 3039if test set != "${COLLECT_NAMES+set}"; then 3040 COLLECT_NAMES= 3041 export COLLECT_NAMES 3042fi 3043_LT_EOF 3044 ;; 3045 esac 3046 3047 _LT_PROG_LTMAIN 3048 3049 # We use sed instead of cat because bash on DJGPP gets confused if 3050 # if finds mixed CR/LF and LF-only lines. Since sed operates in 3051 # text mode, it properly converts lines to CR/LF. This bash problem 3052 # is reportedly fixed, but why not run on old versions too? 3053 sed '$q' "$ltmain" >> "$cfgfile" \ 3054 || (rm -f "$cfgfile"; exit 1) 3055 3056 mv -f "$cfgfile" "$ofile" || 3057 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 3058 chmod +x "$ofile" 3059], 3060[cat <<_LT_EOF >> "$ofile" 3061 3062dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 3063dnl in a comment (ie after a #). 3064# ### BEGIN LIBTOOL TAG CONFIG: $1 3065_LT_LIBTOOL_TAG_VARS(_LT_TAG) 3066# ### END LIBTOOL TAG CONFIG: $1 3067_LT_EOF 3068])dnl /m4_if 3069], 3070[m4_if([$1], [], [ 3071 PACKAGE='$PACKAGE' 3072 VERSION='$VERSION' 3073 RM='$RM' 3074 ofile='$ofile'], []) 3075])dnl /_LT_CONFIG_SAVE_COMMANDS 3076])# _LT_CONFIG 3077 3078 3079# LT_SUPPORTED_TAG(TAG) 3080# --------------------- 3081# Trace this macro to discover what tags are supported by the libtool 3082# --tag option, using: 3083# autoconf --trace 'LT_SUPPORTED_TAG:$1' 3084AC_DEFUN([LT_SUPPORTED_TAG], []) 3085 3086 3087# C support is built-in for now 3088m4_define([_LT_LANG_C_enabled], []) 3089m4_define([_LT_TAGS], []) 3090 3091 3092# LT_LANG(LANG) 3093# ------------- 3094# Enable libtool support for the given language if not already enabled. 3095AC_DEFUN([LT_LANG], 3096[AC_BEFORE([$0], [LT_OUTPUT])dnl 3097m4_case([$1], 3098 [C], [_LT_LANG(C)], 3099 [C++], [_LT_LANG(CXX)], 3100 [Go], [_LT_LANG(GO)], 3101 [Java], [_LT_LANG(GCJ)], 3102 [Fortran 77], [_LT_LANG(F77)], 3103 [Fortran], [_LT_LANG(FC)], 3104 [Windows Resource], [_LT_LANG(RC)], 3105 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 3106 [_LT_LANG($1)], 3107 [m4_fatal([$0: unsupported language: "$1"])])])dnl 3108])# LT_LANG 3109 3110 3111# _LT_LANG(LANGNAME) 3112# ------------------ 3113m4_defun([_LT_LANG], 3114[m4_ifdef([_LT_LANG_]$1[_enabled], [], 3115 [LT_SUPPORTED_TAG([$1])dnl 3116 m4_append([_LT_TAGS], [$1 ])dnl 3117 m4_define([_LT_LANG_]$1[_enabled], [])dnl 3118 _LT_LANG_$1_CONFIG($1)])dnl 3119])# _LT_LANG 3120 3121 3122m4_ifndef([AC_PROG_GO], [ 3123# NOTE: This macro has been submitted for inclusion into # 3124# GNU Autoconf as AC_PROG_GO. When it is available in # 3125# a released version of Autoconf we should remove this # 3126# macro and use it instead. # 3127m4_defun([AC_PROG_GO], 3128[AC_LANG_PUSH(Go)dnl 3129AC_ARG_VAR([GOC], [Go compiler command])dnl 3130AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 3131_AC_ARG_VAR_LDFLAGS()dnl 3132AC_CHECK_TOOL(GOC, gccgo) 3133if test -z "$GOC"; then 3134 if test -n "$ac_tool_prefix"; then 3135 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 3136 fi 3137fi 3138if test -z "$GOC"; then 3139 AC_CHECK_PROG(GOC, gccgo, gccgo, false) 3140fi 3141])#m4_defun 3142])#m4_ifndef 3143 3144 3145# _LT_LANG_DEFAULT_CONFIG 3146# ----------------------- 3147m4_defun([_LT_LANG_DEFAULT_CONFIG], 3148[AC_PROVIDE_IFELSE([AC_PROG_CXX], 3149 [LT_LANG(CXX)], 3150 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 3151 3152AC_PROVIDE_IFELSE([AC_PROG_F77], 3153 [LT_LANG(F77)], 3154 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 3155 3156AC_PROVIDE_IFELSE([AC_PROG_FC], 3157 [LT_LANG(FC)], 3158 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 3159 3160dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 3161dnl pulling things in needlessly. 3162AC_PROVIDE_IFELSE([AC_PROG_GCJ], 3163 [LT_LANG(GCJ)], 3164 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 3165 [LT_LANG(GCJ)], 3166 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 3167 [LT_LANG(GCJ)], 3168 [m4_ifdef([AC_PROG_GCJ], 3169 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 3170 m4_ifdef([A][M_PROG_GCJ], 3171 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 3172 m4_ifdef([LT_PROG_GCJ], 3173 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 3174 3175AC_PROVIDE_IFELSE([AC_PROG_GO], 3176 [LT_LANG(GO)], 3177 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 3178 3179AC_PROVIDE_IFELSE([LT_PROG_RC], 3180 [LT_LANG(RC)], 3181 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 3182])# _LT_LANG_DEFAULT_CONFIG 3183 3184# Obsolete macros: 3185AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 3186AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 3187AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 3188AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 3189AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 3190dnl aclocal-1.4 backwards compatibility: 3191dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 3192dnl AC_DEFUN([AC_LIBTOOL_F77], []) 3193dnl AC_DEFUN([AC_LIBTOOL_FC], []) 3194dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 3195dnl AC_DEFUN([AC_LIBTOOL_RC], []) 3196 3197 3198# _LT_TAG_COMPILER 3199# ---------------- 3200m4_defun([_LT_TAG_COMPILER], 3201[AC_REQUIRE([AC_PROG_CC])dnl 3202 3203_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 3204_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 3205_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 3206_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 3207 3208# If no C compiler was specified, use CC. 3209LTCC=${LTCC-"$CC"} 3210 3211# If no C compiler flags were specified, use CFLAGS. 3212LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 3213 3214# Allow CC to be a program name with arguments. 3215compiler=$CC 3216])# _LT_TAG_COMPILER 3217 3218 3219# _LT_COMPILER_BOILERPLATE 3220# ------------------------ 3221# Check for compiler boilerplate output or warnings with 3222# the simple compiler test code. 3223m4_defun([_LT_COMPILER_BOILERPLATE], 3224[m4_require([_LT_DECL_SED])dnl 3225ac_outfile=conftest.$ac_objext 3226echo "$lt_simple_compile_test_code" >conftest.$ac_ext 3227eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3228_lt_compiler_boilerplate=`cat conftest.err` 3229$RM conftest* 3230])# _LT_COMPILER_BOILERPLATE 3231 3232 3233# _LT_LINKER_BOILERPLATE 3234# ---------------------- 3235# Check for linker boilerplate output or warnings with 3236# the simple link test code. 3237m4_defun([_LT_LINKER_BOILERPLATE], 3238[m4_require([_LT_DECL_SED])dnl 3239ac_outfile=conftest.$ac_objext 3240echo "$lt_simple_link_test_code" >conftest.$ac_ext 3241eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3242_lt_linker_boilerplate=`cat conftest.err` 3243$RM -r conftest* 3244])# _LT_LINKER_BOILERPLATE 3245 3246# _LT_REQUIRED_DARWIN_CHECKS 3247# ------------------------- 3248m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 3249 case $host_os in 3250 rhapsody* | darwin*) 3251 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3252 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3253 AC_CHECK_TOOL([LIPO], [lipo], [:]) 3254 AC_CHECK_TOOL([OTOOL], [otool], [:]) 3255 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 3256 _LT_DECL([], [DSYMUTIL], [1], 3257 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 3258 _LT_DECL([], [NMEDIT], [1], 3259 [Tool to change global to local symbols on Mac OS X]) 3260 _LT_DECL([], [LIPO], [1], 3261 [Tool to manipulate fat objects and archives on Mac OS X]) 3262 _LT_DECL([], [OTOOL], [1], 3263 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 3264 _LT_DECL([], [OTOOL64], [1], 3265 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 3266 3267 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3268 [lt_cv_apple_cc_single_mod=no 3269 if test -z "$LT_MULTI_MODULE"; then 3270 # By default we will add the -single_module flag. You can override 3271 # by either setting the environment variable LT_MULTI_MODULE 3272 # non-empty at configure time, or by adding -multi_module to the 3273 # link flags. 3274 rm -rf libconftest.dylib* 3275 echo "int foo(void){return 1;}" > conftest.c 3276 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3277-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 3278 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3279 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 3280 _lt_result=$? 3281 # If there is a non-empty error log, and "single_module" 3282 # appears in it, assume the flag caused a linker warning 3283 if test -s conftest.err && $GREP single_module conftest.err; then 3284 cat conftest.err >&AS_MESSAGE_LOG_FD 3285 # Otherwise, if the output was created with a 0 exit code from 3286 # the compiler, it worked. 3287 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 3288 lt_cv_apple_cc_single_mod=yes 3289 else 3290 cat conftest.err >&AS_MESSAGE_LOG_FD 3291 fi 3292 rm -rf libconftest.dylib* 3293 rm -f conftest.* 3294 fi]) 3295 3296 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3297 [lt_cv_ld_exported_symbols_list], 3298 [lt_cv_ld_exported_symbols_list=no 3299 save_LDFLAGS=$LDFLAGS 3300 echo "_main" > conftest.sym 3301 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3302 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3303 [lt_cv_ld_exported_symbols_list=yes], 3304 [lt_cv_ld_exported_symbols_list=no]) 3305 LDFLAGS=$save_LDFLAGS 3306 ]) 3307 3308 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 3309 [lt_cv_ld_force_load=no 3310 cat > conftest.c << _LT_EOF 3311int forced_loaded() { return 2;} 3312_LT_EOF 3313 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 3314 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 3315 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 3316 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 3317 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 3318 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 3319 cat > conftest.c << _LT_EOF 3320int main() { return 0;} 3321_LT_EOF 3322 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 3323 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 3324 _lt_result=$? 3325 if test -s conftest.err && $GREP force_load conftest.err; then 3326 cat conftest.err >&AS_MESSAGE_LOG_FD 3327 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 3328 lt_cv_ld_force_load=yes 3329 else 3330 cat conftest.err >&AS_MESSAGE_LOG_FD 3331 fi 3332 rm -f conftest.err libconftest.a conftest conftest.c 3333 rm -rf conftest.dSYM 3334 ]) 3335 case $host_os in 3336 rhapsody* | darwin1.[[012]]) 3337 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 3338 darwin1.*) 3339 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 3340 darwin*) # darwin 5.x on 3341 # if running on 10.5 or later, the deployment target defaults 3342 # to the OS version, if on x86, and 10.4, the deployment 3343 # target defaults to 10.4. Don't you love it? 3344 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3345 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3346 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 3347 10.[[012]][[,.]]*) 3348 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 3349 10.*) 3350 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 3351 esac 3352 ;; 3353 esac 3354 if test yes = "$lt_cv_apple_cc_single_mod"; then 3355 _lt_dar_single_mod='$single_module' 3356 fi 3357 if test yes = "$lt_cv_ld_exported_symbols_list"; then 3358 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 3359 else 3360 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 3361 fi 3362 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 3363 _lt_dsymutil='~$DSYMUTIL $lib || :' 3364 else 3365 _lt_dsymutil= 3366 fi 3367 ;; 3368 esac 3369]) 3370 3371 3372# _LT_DARWIN_LINKER_FEATURES([TAG]) 3373# --------------------------------- 3374# Checks for linker and compiler features on darwin 3375m4_defun([_LT_DARWIN_LINKER_FEATURES], 3376[ 3377 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 3378 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3379 _LT_TAGVAR(hardcode_direct, $1)=no 3380 _LT_TAGVAR(hardcode_automatic, $1)=yes 3381 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3382 if test yes = "$lt_cv_ld_force_load"; then 3383 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 3384 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 3385 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 3386 else 3387 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 3388 fi 3389 _LT_TAGVAR(link_all_deplibs, $1)=yes 3390 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 3391 case $cc_basename in 3392 ifort*|nagfor*) _lt_dar_can_shared=yes ;; 3393 *) _lt_dar_can_shared=$GCC ;; 3394 esac 3395 if test yes = "$_lt_dar_can_shared"; then 3396 output_verbose_link_cmd=func_echo_all 3397 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" 3398 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 3399 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" 3400 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" 3401 m4_if([$1], [CXX], 3402[ if test yes != "$lt_cv_apple_cc_single_mod"; then 3403 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" 3404 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" 3405 fi 3406],[]) 3407 else 3408 _LT_TAGVAR(ld_shlibs, $1)=no 3409 fi 3410]) 3411 3412# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 3413# ---------------------------------- 3414# Links a minimal program and checks the executable 3415# for the system default hardcoded library path. In most cases, 3416# this is /usr/lib:/lib, but when the MPI compilers are used 3417# the location of the communication and MPI libs are included too. 3418# If we don't find anything, use the default library path according 3419# to the aix ld manual. 3420# Store the results from the different compilers for each TAGNAME. 3421# Allow to override them for all tags through lt_cv_aix_libpath. 3422m4_defun([_LT_SYS_MODULE_PATH_AIX], 3423[m4_require([_LT_DECL_SED])dnl 3424if test set = "${lt_cv_aix_libpath+set}"; then 3425 aix_libpath=$lt_cv_aix_libpath 3426else 3427 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 3428 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 3429 lt_aix_libpath_sed='[ 3430 /Import File Strings/,/^$/ { 3431 /^0/ { 3432 s/^0 *\([^ ]*\) *$/\1/ 3433 p 3434 } 3435 }]' 3436 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3437 # Check for a 64-bit object if we didn't find anything. 3438 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 3439 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3440 fi],[]) 3441 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 3442 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 3443 fi 3444 ]) 3445 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 3446fi 3447])# _LT_SYS_MODULE_PATH_AIX 3448 3449 3450# _LT_SHELL_INIT(ARG) 3451# ------------------- 3452m4_define([_LT_SHELL_INIT], 3453[m4_divert_text([M4SH-INIT], [$1 3454])])# _LT_SHELL_INIT 3455 3456 3457 3458# _LT_PROG_ECHO_BACKSLASH 3459# ----------------------- 3460# Find how we can fake an echo command that does not interpret backslash. 3461# In particular, with Autoconf 2.60 or later we add some code to the start 3462# of the generated configure script that will find a shell with a builtin 3463# printf (that we can use as an echo command). 3464m4_defun([_LT_PROG_ECHO_BACKSLASH], 3465[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3466ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3467ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3468 3469AC_MSG_CHECKING([how to print strings]) 3470# Test print first, because it will be a builtin if present. 3471if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 3472 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 3473 ECHO='print -r --' 3474elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 3475 ECHO='printf %s\n' 3476else 3477 # Use this function as a fallback that always works. 3478 func_fallback_echo () 3479 { 3480 eval 'cat <<_LTECHO_EOF 3481$[]1 3482_LTECHO_EOF' 3483 } 3484 ECHO='func_fallback_echo' 3485fi 3486 3487# func_echo_all arg... 3488# Invoke $ECHO with all args, space-separated. 3489func_echo_all () 3490{ 3491 $ECHO "$*" 3492} 3493 3494case $ECHO in 3495 printf*) AC_MSG_RESULT([printf]) ;; 3496 print*) AC_MSG_RESULT([print -r]) ;; 3497 *) AC_MSG_RESULT([cat]) ;; 3498esac 3499 3500m4_ifdef([_AS_DETECT_SUGGESTED], 3501[_AS_DETECT_SUGGESTED([ 3502 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 3503 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3504 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3505 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3506 PATH=/empty FPATH=/empty; export PATH FPATH 3507 test "X`printf %s $ECHO`" = "X$ECHO" \ 3508 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 3509 3510_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 3511_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 3512])# _LT_PROG_ECHO_BACKSLASH 3513 3514 3515# _LT_WITH_SYSROOT 3516# ---------------- 3517AC_DEFUN([_LT_WITH_SYSROOT], 3518[AC_MSG_CHECKING([for sysroot]) 3519AC_ARG_WITH([sysroot], 3520[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 3521 [Search for dependent libraries within DIR (or the compiler's sysroot 3522 if not specified).])], 3523[], [with_sysroot=no]) 3524 3525dnl lt_sysroot will always be passed unquoted. We quote it here 3526dnl in case the user passed a directory name. 3527lt_sysroot= 3528case $with_sysroot in #( 3529 yes) 3530 if test yes = "$GCC"; then 3531 lt_sysroot=`$CC --print-sysroot 2>/dev/null` 3532 fi 3533 ;; #( 3534 /*) 3535 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 3536 ;; #( 3537 no|'') 3538 ;; #( 3539 *) 3540 AC_MSG_RESULT([$with_sysroot]) 3541 AC_MSG_ERROR([The sysroot must be an absolute path.]) 3542 ;; 3543esac 3544 3545 AC_MSG_RESULT([${lt_sysroot:-no}]) 3546_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 3547[dependent libraries, and where our libraries should be installed.])]) 3548 3549# _LT_ENABLE_LOCK 3550# --------------- 3551m4_defun([_LT_ENABLE_LOCK], 3552[AC_ARG_ENABLE([libtool-lock], 3553 [AS_HELP_STRING([--disable-libtool-lock], 3554 [avoid locking (might break parallel builds)])]) 3555test no = "$enable_libtool_lock" || enable_libtool_lock=yes 3556 3557# Some flags need to be propagated to the compiler or linker for good 3558# libtool support. 3559case $host in 3560ia64-*-hpux*) 3561 # Find out what ABI is being produced by ac_compile, and set mode 3562 # options accordingly. 3563 echo 'int i;' > conftest.$ac_ext 3564 if AC_TRY_EVAL(ac_compile); then 3565 case `/usr/bin/file conftest.$ac_objext` in 3566 *ELF-32*) 3567 HPUX_IA64_MODE=32 3568 ;; 3569 *ELF-64*) 3570 HPUX_IA64_MODE=64 3571 ;; 3572 esac 3573 fi 3574 rm -rf conftest* 3575 ;; 3576*-*-irix6*) 3577 # Find out what ABI is being produced by ac_compile, and set linker 3578 # options accordingly. 3579 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 3580 if AC_TRY_EVAL(ac_compile); then 3581 if test yes = "$lt_cv_prog_gnu_ld"; then 3582 case `/usr/bin/file conftest.$ac_objext` in 3583 *32-bit*) 3584 LD="${LD-ld} -melf32bsmip" 3585 ;; 3586 *N32*) 3587 LD="${LD-ld} -melf32bmipn32" 3588 ;; 3589 *64-bit*) 3590 LD="${LD-ld} -melf64bmip" 3591 ;; 3592 esac 3593 else 3594 case `/usr/bin/file conftest.$ac_objext` in 3595 *32-bit*) 3596 LD="${LD-ld} -32" 3597 ;; 3598 *N32*) 3599 LD="${LD-ld} -n32" 3600 ;; 3601 *64-bit*) 3602 LD="${LD-ld} -64" 3603 ;; 3604 esac 3605 fi 3606 fi 3607 rm -rf conftest* 3608 ;; 3609 3610mips64*-*linux*) 3611 # Find out what ABI is being produced by ac_compile, and set linker 3612 # options accordingly. 3613 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 3614 if AC_TRY_EVAL(ac_compile); then 3615 emul=elf 3616 case `/usr/bin/file conftest.$ac_objext` in 3617 *32-bit*) 3618 emul="${emul}32" 3619 ;; 3620 *64-bit*) 3621 emul="${emul}64" 3622 ;; 3623 esac 3624 case `/usr/bin/file conftest.$ac_objext` in 3625 *MSB*) 3626 emul="${emul}btsmip" 3627 ;; 3628 *LSB*) 3629 emul="${emul}ltsmip" 3630 ;; 3631 esac 3632 case `/usr/bin/file conftest.$ac_objext` in 3633 *N32*) 3634 emul="${emul}n32" 3635 ;; 3636 esac 3637 LD="${LD-ld} -m $emul" 3638 fi 3639 rm -rf conftest* 3640 ;; 3641 3642x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 3643s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 3644 # Find out what ABI is being produced by ac_compile, and set linker 3645 # options accordingly. Note that the listed cases only cover the 3646 # situations where additional linker options are needed (such as when 3647 # doing 32-bit compilation for a host where ld defaults to 64-bit, or 3648 # vice versa); the common cases where no linker options are needed do 3649 # not appear in the list. 3650 echo 'int i;' > conftest.$ac_ext 3651 if AC_TRY_EVAL(ac_compile); then 3652 case `/usr/bin/file conftest.o` in 3653 *32-bit*) 3654 case $host in 3655 x86_64-*kfreebsd*-gnu) 3656 LD="${LD-ld} -m elf_i386_fbsd" 3657 ;; 3658 x86_64-*linux*) 3659 case `/usr/bin/file conftest.o` in 3660 *x86-64*) 3661 LD="${LD-ld} -m elf32_x86_64" 3662 ;; 3663 *) 3664 LD="${LD-ld} -m elf_i386" 3665 ;; 3666 esac 3667 ;; 3668 powerpc64le-*linux*) 3669 LD="${LD-ld} -m elf32lppclinux" 3670 ;; 3671 powerpc64-*linux*) 3672 LD="${LD-ld} -m elf32ppclinux" 3673 ;; 3674 s390x-*linux*) 3675 LD="${LD-ld} -m elf_s390" 3676 ;; 3677 sparc64-*linux*) 3678 LD="${LD-ld} -m elf32_sparc" 3679 ;; 3680 esac 3681 ;; 3682 *64-bit*) 3683 case $host in 3684 x86_64-*kfreebsd*-gnu) 3685 LD="${LD-ld} -m elf_x86_64_fbsd" 3686 ;; 3687 x86_64-*linux*) 3688 LD="${LD-ld} -m elf_x86_64" 3689 ;; 3690 powerpcle-*linux*) 3691 LD="${LD-ld} -m elf64lppc" 3692 ;; 3693 powerpc-*linux*) 3694 LD="${LD-ld} -m elf64ppc" 3695 ;; 3696 s390*-*linux*|s390*-*tpf*) 3697 LD="${LD-ld} -m elf64_s390" 3698 ;; 3699 sparc*-*linux*) 3700 LD="${LD-ld} -m elf64_sparc" 3701 ;; 3702 esac 3703 ;; 3704 esac 3705 fi 3706 rm -rf conftest* 3707 ;; 3708 3709*-*-sco3.2v5*) 3710 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 3711 SAVE_CFLAGS=$CFLAGS 3712 CFLAGS="$CFLAGS -belf" 3713 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 3714 [AC_LANG_PUSH(C) 3715 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 3716 AC_LANG_POP]) 3717 if test yes != "$lt_cv_cc_needs_belf"; then 3718 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 3719 CFLAGS=$SAVE_CFLAGS 3720 fi 3721 ;; 3722*-*solaris*) 3723 # Find out what ABI is being produced by ac_compile, and set linker 3724 # options accordingly. 3725 echo 'int i;' > conftest.$ac_ext 3726 if AC_TRY_EVAL(ac_compile); then 3727 case `/usr/bin/file conftest.o` in 3728 *64-bit*) 3729 case $lt_cv_prog_gnu_ld in 3730 yes*) 3731 case $host in 3732 i?86-*-solaris*|x86_64-*-solaris*) 3733 LD="${LD-ld} -m elf_x86_64" 3734 ;; 3735 sparc*-*-solaris*) 3736 LD="${LD-ld} -m elf64_sparc" 3737 ;; 3738 esac 3739 # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 3740 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 3741 LD=${LD-ld}_sol2 3742 fi 3743 ;; 3744 *) 3745 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 3746 LD="${LD-ld} -64" 3747 fi 3748 ;; 3749 esac 3750 ;; 3751 esac 3752 fi 3753 rm -rf conftest* 3754 ;; 3755esac 3756 3757need_locks=$enable_libtool_lock 3758])# _LT_ENABLE_LOCK 3759 3760 3761# _LT_PROG_AR 3762# ----------- 3763m4_defun([_LT_PROG_AR], 3764[AC_CHECK_TOOLS(AR, [ar], false) 3765: ${AR=ar} 3766: ${AR_FLAGS=cru} 3767_LT_DECL([], [AR], [1], [The archiver]) 3768_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 3769 3770AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 3771 [lt_cv_ar_at_file=no 3772 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 3773 [echo conftest.$ac_objext > conftest.lst 3774 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 3775 AC_TRY_EVAL([lt_ar_try]) 3776 if test 0 -eq "$ac_status"; then 3777 # Ensure the archiver fails upon bogus file names. 3778 rm -f conftest.$ac_objext libconftest.a 3779 AC_TRY_EVAL([lt_ar_try]) 3780 if test 0 -ne "$ac_status"; then 3781 lt_cv_ar_at_file=@ 3782 fi 3783 fi 3784 rm -f conftest.* libconftest.a 3785 ]) 3786 ]) 3787 3788if test no = "$lt_cv_ar_at_file"; then 3789 archiver_list_spec= 3790else 3791 archiver_list_spec=$lt_cv_ar_at_file 3792fi 3793_LT_DECL([], [archiver_list_spec], [1], 3794 [How to feed a file listing to the archiver]) 3795])# _LT_PROG_AR 3796 3797 3798# _LT_CMD_OLD_ARCHIVE 3799# ------------------- 3800m4_defun([_LT_CMD_OLD_ARCHIVE], 3801[_LT_PROG_AR 3802 3803AC_CHECK_TOOL(STRIP, strip, :) 3804test -z "$STRIP" && STRIP=: 3805_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 3806 3807AC_CHECK_TOOL(RANLIB, ranlib, :) 3808test -z "$RANLIB" && RANLIB=: 3809_LT_DECL([], [RANLIB], [1], 3810 [Commands used to install an old-style archive]) 3811 3812# Determine commands to create old-style static archives. 3813old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 3814old_postinstall_cmds='chmod 644 $oldlib' 3815old_postuninstall_cmds= 3816 3817if test -n "$RANLIB"; then 3818 case $host_os in 3819 bitrig* | openbsd*) 3820 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 3821 ;; 3822 *) 3823 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 3824 ;; 3825 esac 3826 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 3827fi 3828 3829case $host_os in 3830 darwin*) 3831 lock_old_archive_extraction=yes ;; 3832 *) 3833 lock_old_archive_extraction=no ;; 3834esac 3835_LT_DECL([], [old_postinstall_cmds], [2]) 3836_LT_DECL([], [old_postuninstall_cmds], [2]) 3837_LT_TAGDECL([], [old_archive_cmds], [2], 3838 [Commands used to build an old-style archive]) 3839_LT_DECL([], [lock_old_archive_extraction], [0], 3840 [Whether to use a lock for old archive extraction]) 3841])# _LT_CMD_OLD_ARCHIVE 3842 3843 3844# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3845# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 3846# ---------------------------------------------------------------- 3847# Check whether the given compiler option works 3848AC_DEFUN([_LT_COMPILER_OPTION], 3849[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3850m4_require([_LT_DECL_SED])dnl 3851AC_CACHE_CHECK([$1], [$2], 3852 [$2=no 3853 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 3854 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3855 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 3856 # Insert the option either (1) after the last *FLAGS variable, or 3857 # (2) before a word containing "conftest.", or (3) at the end. 3858 # Note that $ac_compile itself does not contain backslashes and begins 3859 # with a dollar sign (not a hyphen), so the echo should work correctly. 3860 # The option is referenced via a variable to avoid confusing sed. 3861 lt_compile=`echo "$ac_compile" | $SED \ 3862 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3863 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3864 -e 's:$: $lt_compiler_flag:'` 3865 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3866 (eval "$lt_compile" 2>conftest.err) 3867 ac_status=$? 3868 cat conftest.err >&AS_MESSAGE_LOG_FD 3869 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3870 if (exit $ac_status) && test -s "$ac_outfile"; then 3871 # The compiler can only warn and ignore the option if not recognized 3872 # So say no if there are warnings other than the usual output. 3873 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 3874 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3875 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 3876 $2=yes 3877 fi 3878 fi 3879 $RM conftest* 3880]) 3881 3882if test yes = "[$]$2"; then 3883 m4_if([$5], , :, [$5]) 3884else 3885 m4_if([$6], , :, [$6]) 3886fi 3887])# _LT_COMPILER_OPTION 3888 3889# Old name: 3890AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 3891dnl aclocal-1.4 backwards compatibility: 3892dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 3893 3894 3895# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3896# [ACTION-SUCCESS], [ACTION-FAILURE]) 3897# ---------------------------------------------------- 3898# Check whether the given linker option works 3899AC_DEFUN([_LT_LINKER_OPTION], 3900[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3901m4_require([_LT_DECL_SED])dnl 3902AC_CACHE_CHECK([$1], [$2], 3903 [$2=no 3904 save_LDFLAGS=$LDFLAGS 3905 LDFLAGS="$LDFLAGS $3" 3906 echo "$lt_simple_link_test_code" > conftest.$ac_ext 3907 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 3908 # The linker can only warn and ignore the option if not recognized 3909 # So say no if there are warnings 3910 if test -s conftest.err; then 3911 # Append any errors to the config.log. 3912 cat conftest.err 1>&AS_MESSAGE_LOG_FD 3913 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 3914 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3915 if diff conftest.exp conftest.er2 >/dev/null; then 3916 $2=yes 3917 fi 3918 else 3919 $2=yes 3920 fi 3921 fi 3922 $RM -r conftest* 3923 LDFLAGS=$save_LDFLAGS 3924]) 3925 3926if test yes = "[$]$2"; then 3927 m4_if([$4], , :, [$4]) 3928else 3929 m4_if([$5], , :, [$5]) 3930fi 3931])# _LT_LINKER_OPTION 3932 3933# Old name: 3934AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 3935dnl aclocal-1.4 backwards compatibility: 3936dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 3937 3938 3939# LT_CMD_MAX_LEN 3940#--------------- 3941AC_DEFUN([LT_CMD_MAX_LEN], 3942[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3943# find the maximum length of command line arguments 3944AC_MSG_CHECKING([the maximum length of command line arguments]) 3945AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 3946 i=0 3947 teststring=ABCD 3948 3949 case $build_os in 3950 msdosdjgpp*) 3951 # On DJGPP, this test can blow up pretty badly due to problems in libc 3952 # (any single argument exceeding 2000 bytes causes a buffer overrun 3953 # during glob expansion). Even if it were fixed, the result of this 3954 # check would be larger than it should be. 3955 lt_cv_sys_max_cmd_len=12288; # 12K is about right 3956 ;; 3957 3958 gnu*) 3959 # Under GNU Hurd, this test is not required because there is 3960 # no limit to the length of command line arguments. 3961 # Libtool will interpret -1 as no limit whatsoever 3962 lt_cv_sys_max_cmd_len=-1; 3963 ;; 3964 3965 cygwin* | mingw* | cegcc*) 3966 # On Win9x/ME, this test blows up -- it succeeds, but takes 3967 # about 5 minutes as the teststring grows exponentially. 3968 # Worse, since 9x/ME are not pre-emptively multitasking, 3969 # you end up with a "frozen" computer, even though with patience 3970 # the test eventually succeeds (with a max line length of 256k). 3971 # Instead, let's just punt: use the minimum linelength reported by 3972 # all of the supported platforms: 8192 (on NT/2K/XP). 3973 lt_cv_sys_max_cmd_len=8192; 3974 ;; 3975 3976 mint*) 3977 # On MiNT this can take a long time and run out of memory. 3978 lt_cv_sys_max_cmd_len=8192; 3979 ;; 3980 3981 amigaos*) 3982 # On AmigaOS with pdksh, this test takes hours, literally. 3983 # So we just punt and use a minimum line length of 8192. 3984 lt_cv_sys_max_cmd_len=8192; 3985 ;; 3986 3987 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 3988 # This has been around since 386BSD, at least. Likely further. 3989 if test -x /sbin/sysctl; then 3990 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 3991 elif test -x /usr/sbin/sysctl; then 3992 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 3993 else 3994 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 3995 fi 3996 # And add a safety zone 3997 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 3998 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 3999 ;; 4000 4001 interix*) 4002 # We know the value 262144 and hardcode it with a safety zone (like BSD) 4003 lt_cv_sys_max_cmd_len=196608 4004 ;; 4005 4006 os2*) 4007 # The test takes a long time on OS/2. 4008 lt_cv_sys_max_cmd_len=8192 4009 ;; 4010 4011 osf*) 4012 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 4013 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 4014 # nice to cause kernel panics so lets avoid the loop below. 4015 # First set a reasonable default. 4016 lt_cv_sys_max_cmd_len=16384 4017 # 4018 if test -x /sbin/sysconfig; then 4019 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 4020 *1*) lt_cv_sys_max_cmd_len=-1 ;; 4021 esac 4022 fi 4023 ;; 4024 sco3.2v5*) 4025 lt_cv_sys_max_cmd_len=102400 4026 ;; 4027 sysv5* | sco5v6* | sysv4.2uw2*) 4028 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 4029 if test -n "$kargmax"; then 4030 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 4031 else 4032 lt_cv_sys_max_cmd_len=32768 4033 fi 4034 ;; 4035 *) 4036 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 4037 if test -n "$lt_cv_sys_max_cmd_len" && \ 4038 test undefined != "$lt_cv_sys_max_cmd_len"; then 4039 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 4040 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 4041 else 4042 # Make teststring a little bigger before we do anything with it. 4043 # a 1K string should be a reasonable start. 4044 for i in 1 2 3 4 5 6 7 8; do 4045 teststring=$teststring$teststring 4046 done 4047 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 4048 # If test is not a shell built-in, we'll probably end up computing a 4049 # maximum length that is only half of the actual maximum length, but 4050 # we can't tell. 4051 while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 4052 = "X$teststring$teststring"; } >/dev/null 2>&1 && 4053 test 17 != "$i" # 1/2 MB should be enough 4054 do 4055 i=`expr $i + 1` 4056 teststring=$teststring$teststring 4057 done 4058 # Only check the string length outside the loop. 4059 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 4060 teststring= 4061 # Add a significant safety factor because C++ compilers can tack on 4062 # massive amounts of additional arguments before passing them to the 4063 # linker. It appears as though 1/2 is a usable value. 4064 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 4065 fi 4066 ;; 4067 esac 4068]) 4069if test -n "$lt_cv_sys_max_cmd_len"; then 4070 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 4071else 4072 AC_MSG_RESULT(none) 4073fi 4074max_cmd_len=$lt_cv_sys_max_cmd_len 4075_LT_DECL([], [max_cmd_len], [0], 4076 [What is the maximum length of a command?]) 4077])# LT_CMD_MAX_LEN 4078 4079# Old name: 4080AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 4081dnl aclocal-1.4 backwards compatibility: 4082dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 4083 4084 4085# _LT_HEADER_DLFCN 4086# ---------------- 4087m4_defun([_LT_HEADER_DLFCN], 4088[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 4089])# _LT_HEADER_DLFCN 4090 4091 4092# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 4093# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 4094# ---------------------------------------------------------------- 4095m4_defun([_LT_TRY_DLOPEN_SELF], 4096[m4_require([_LT_HEADER_DLFCN])dnl 4097if test yes = "$cross_compiling"; then : 4098 [$4] 4099else 4100 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 4101 lt_status=$lt_dlunknown 4102 cat > conftest.$ac_ext <<_LT_EOF 4103[#line $LINENO "configure" 4104#include "confdefs.h" 4105 4106#if HAVE_DLFCN_H 4107#include <dlfcn.h> 4108#endif 4109 4110#include <stdio.h> 4111 4112#ifdef RTLD_GLOBAL 4113# define LT_DLGLOBAL RTLD_GLOBAL 4114#else 4115# ifdef DL_GLOBAL 4116# define LT_DLGLOBAL DL_GLOBAL 4117# else 4118# define LT_DLGLOBAL 0 4119# endif 4120#endif 4121 4122/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 4123 find out it does not work in some platform. */ 4124#ifndef LT_DLLAZY_OR_NOW 4125# ifdef RTLD_LAZY 4126# define LT_DLLAZY_OR_NOW RTLD_LAZY 4127# else 4128# ifdef DL_LAZY 4129# define LT_DLLAZY_OR_NOW DL_LAZY 4130# else 4131# ifdef RTLD_NOW 4132# define LT_DLLAZY_OR_NOW RTLD_NOW 4133# else 4134# ifdef DL_NOW 4135# define LT_DLLAZY_OR_NOW DL_NOW 4136# else 4137# define LT_DLLAZY_OR_NOW 0 4138# endif 4139# endif 4140# endif 4141# endif 4142#endif 4143 4144/* When -fvisibility=hidden is used, assume the code has been annotated 4145 correspondingly for the symbols needed. */ 4146#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 4147int fnord () __attribute__((visibility("default"))); 4148#endif 4149 4150int fnord () { return 42; } 4151int main () 4152{ 4153 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 4154 int status = $lt_dlunknown; 4155 4156 if (self) 4157 { 4158 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 4159 else 4160 { 4161 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 4162 else puts (dlerror ()); 4163 } 4164 /* dlclose (self); */ 4165 } 4166 else 4167 puts (dlerror ()); 4168 4169 return status; 4170}] 4171_LT_EOF 4172 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 4173 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 4174 lt_status=$? 4175 case x$lt_status in 4176 x$lt_dlno_uscore) $1 ;; 4177 x$lt_dlneed_uscore) $2 ;; 4178 x$lt_dlunknown|x*) $3 ;; 4179 esac 4180 else : 4181 # compilation failed 4182 $3 4183 fi 4184fi 4185rm -fr conftest* 4186])# _LT_TRY_DLOPEN_SELF 4187 4188 4189# LT_SYS_DLOPEN_SELF 4190# ------------------ 4191AC_DEFUN([LT_SYS_DLOPEN_SELF], 4192[m4_require([_LT_HEADER_DLFCN])dnl 4193if test yes != "$enable_dlopen"; then 4194 enable_dlopen=unknown 4195 enable_dlopen_self=unknown 4196 enable_dlopen_self_static=unknown 4197else 4198 lt_cv_dlopen=no 4199 lt_cv_dlopen_libs= 4200 4201 case $host_os in 4202 beos*) 4203 lt_cv_dlopen=load_add_on 4204 lt_cv_dlopen_libs= 4205 lt_cv_dlopen_self=yes 4206 ;; 4207 4208 mingw* | pw32* | cegcc*) 4209 lt_cv_dlopen=LoadLibrary 4210 lt_cv_dlopen_libs= 4211 ;; 4212 4213 cygwin*) 4214 lt_cv_dlopen=dlopen 4215 lt_cv_dlopen_libs= 4216 ;; 4217 4218 darwin*) 4219 # if libdl is installed we need to link against it 4220 AC_CHECK_LIB([dl], [dlopen], 4221 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 4222 lt_cv_dlopen=dyld 4223 lt_cv_dlopen_libs= 4224 lt_cv_dlopen_self=yes 4225 ]) 4226 ;; 4227 4228 tpf*) 4229 # Don't try to run any link tests for TPF. We know it's impossible 4230 # because TPF is a cross-compiler, and we know how we open DSOs. 4231 lt_cv_dlopen=dlopen 4232 lt_cv_dlopen_libs= 4233 lt_cv_dlopen_self=no 4234 ;; 4235 4236 *) 4237 AC_CHECK_FUNC([shl_load], 4238 [lt_cv_dlopen=shl_load], 4239 [AC_CHECK_LIB([dld], [shl_load], 4240 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 4241 [AC_CHECK_FUNC([dlopen], 4242 [lt_cv_dlopen=dlopen], 4243 [AC_CHECK_LIB([dl], [dlopen], 4244 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 4245 [AC_CHECK_LIB([svld], [dlopen], 4246 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 4247 [AC_CHECK_LIB([dld], [dld_link], 4248 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 4249 ]) 4250 ]) 4251 ]) 4252 ]) 4253 ]) 4254 ;; 4255 esac 4256 4257 if test no = "$lt_cv_dlopen"; then 4258 enable_dlopen=no 4259 else 4260 enable_dlopen=yes 4261 fi 4262 4263 case $lt_cv_dlopen in 4264 dlopen) 4265 save_CPPFLAGS=$CPPFLAGS 4266 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 4267 4268 save_LDFLAGS=$LDFLAGS 4269 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 4270 4271 save_LIBS=$LIBS 4272 LIBS="$lt_cv_dlopen_libs $LIBS" 4273 4274 AC_CACHE_CHECK([whether a program can dlopen itself], 4275 lt_cv_dlopen_self, [dnl 4276 _LT_TRY_DLOPEN_SELF( 4277 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 4278 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 4279 ]) 4280 4281 if test yes = "$lt_cv_dlopen_self"; then 4282 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 4283 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 4284 lt_cv_dlopen_self_static, [dnl 4285 _LT_TRY_DLOPEN_SELF( 4286 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 4287 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 4288 ]) 4289 fi 4290 4291 CPPFLAGS=$save_CPPFLAGS 4292 LDFLAGS=$save_LDFLAGS 4293 LIBS=$save_LIBS 4294 ;; 4295 esac 4296 4297 case $lt_cv_dlopen_self in 4298 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 4299 *) enable_dlopen_self=unknown ;; 4300 esac 4301 4302 case $lt_cv_dlopen_self_static in 4303 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 4304 *) enable_dlopen_self_static=unknown ;; 4305 esac 4306fi 4307_LT_DECL([dlopen_support], [enable_dlopen], [0], 4308 [Whether dlopen is supported]) 4309_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 4310 [Whether dlopen of programs is supported]) 4311_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 4312 [Whether dlopen of statically linked programs is supported]) 4313])# LT_SYS_DLOPEN_SELF 4314 4315# Old name: 4316AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 4317dnl aclocal-1.4 backwards compatibility: 4318dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 4319 4320 4321# _LT_COMPILER_C_O([TAGNAME]) 4322# --------------------------- 4323# Check to see if options -c and -o are simultaneously supported by compiler. 4324# This macro does not hard code the compiler like AC_PROG_CC_C_O. 4325m4_defun([_LT_COMPILER_C_O], 4326[m4_require([_LT_DECL_SED])dnl 4327m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4328m4_require([_LT_TAG_COMPILER])dnl 4329AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 4330 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 4331 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 4332 $RM -r conftest 2>/dev/null 4333 mkdir conftest 4334 cd conftest 4335 mkdir out 4336 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4337 4338 lt_compiler_flag="-o out/conftest2.$ac_objext" 4339 # Insert the option either (1) after the last *FLAGS variable, or 4340 # (2) before a word containing "conftest.", or (3) at the end. 4341 # Note that $ac_compile itself does not contain backslashes and begins 4342 # with a dollar sign (not a hyphen), so the echo should work correctly. 4343 lt_compile=`echo "$ac_compile" | $SED \ 4344 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4345 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4346 -e 's:$: $lt_compiler_flag:'` 4347 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4348 (eval "$lt_compile" 2>out/conftest.err) 4349 ac_status=$? 4350 cat out/conftest.err >&AS_MESSAGE_LOG_FD 4351 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4352 if (exit $ac_status) && test -s out/conftest2.$ac_objext 4353 then 4354 # The compiler can only warn and ignore the option if not recognized 4355 # So say no if there are warnings 4356 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 4357 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 4358 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 4359 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4360 fi 4361 fi 4362 chmod u+w . 2>&AS_MESSAGE_LOG_FD 4363 $RM conftest* 4364 # SGI C++ compiler will create directory out/ii_files/ for 4365 # template instantiation 4366 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 4367 $RM out/* && rmdir out 4368 cd .. 4369 $RM -r conftest 4370 $RM conftest* 4371]) 4372_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 4373 [Does compiler simultaneously support -c and -o options?]) 4374])# _LT_COMPILER_C_O 4375 4376 4377# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 4378# ---------------------------------- 4379# Check to see if we can do hard links to lock some files if needed 4380m4_defun([_LT_COMPILER_FILE_LOCKS], 4381[m4_require([_LT_ENABLE_LOCK])dnl 4382m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4383_LT_COMPILER_C_O([$1]) 4384 4385hard_links=nottested 4386if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 4387 # do not overwrite the value of need_locks provided by the user 4388 AC_MSG_CHECKING([if we can lock with hard links]) 4389 hard_links=yes 4390 $RM conftest* 4391 ln conftest.a conftest.b 2>/dev/null && hard_links=no 4392 touch conftest.a 4393 ln conftest.a conftest.b 2>&5 || hard_links=no 4394 ln conftest.a conftest.b 2>/dev/null && hard_links=no 4395 AC_MSG_RESULT([$hard_links]) 4396 if test no = "$hard_links"; then 4397 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 4398 need_locks=warn 4399 fi 4400else 4401 need_locks=no 4402fi 4403_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 4404])# _LT_COMPILER_FILE_LOCKS 4405 4406 4407# _LT_CHECK_OBJDIR 4408# ---------------- 4409m4_defun([_LT_CHECK_OBJDIR], 4410[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 4411[rm -f .libs 2>/dev/null 4412mkdir .libs 2>/dev/null 4413if test -d .libs; then 4414 lt_cv_objdir=.libs 4415else 4416 # MS-DOS does not allow filenames that begin with a dot. 4417 lt_cv_objdir=_libs 4418fi 4419rmdir .libs 2>/dev/null]) 4420objdir=$lt_cv_objdir 4421_LT_DECL([], [objdir], [0], 4422 [The name of the directory that contains temporary libtool files])dnl 4423m4_pattern_allow([LT_OBJDIR])dnl 4424AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 4425 [Define to the sub-directory where libtool stores uninstalled libraries.]) 4426])# _LT_CHECK_OBJDIR 4427 4428 4429# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 4430# -------------------------------------- 4431# Check hardcoding attributes. 4432m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 4433[AC_MSG_CHECKING([how to hardcode library paths into programs]) 4434_LT_TAGVAR(hardcode_action, $1)= 4435if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 4436 test -n "$_LT_TAGVAR(runpath_var, $1)" || 4437 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 4438 4439 # We can hardcode non-existent directories. 4440 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 4441 # If the only mechanism to avoid hardcoding is shlibpath_var, we 4442 # have to relink, otherwise we might link with an installed library 4443 # when we should be linking with a yet-to-be-installed one 4444 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 4445 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 4446 # Linking always hardcodes the temporary library directory. 4447 _LT_TAGVAR(hardcode_action, $1)=relink 4448 else 4449 # We can link without hardcoding, and we can hardcode nonexisting dirs. 4450 _LT_TAGVAR(hardcode_action, $1)=immediate 4451 fi 4452else 4453 # We cannot hardcode anything, or else we can only hardcode existing 4454 # directories. 4455 _LT_TAGVAR(hardcode_action, $1)=unsupported 4456fi 4457AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 4458 4459if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 4460 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 4461 # Fast installation is not supported 4462 enable_fast_install=no 4463elif test yes = "$shlibpath_overrides_runpath" || 4464 test no = "$enable_shared"; then 4465 # Fast installation is not necessary 4466 enable_fast_install=needless 4467fi 4468_LT_TAGDECL([], [hardcode_action], [0], 4469 [How to hardcode a shared library path into an executable]) 4470])# _LT_LINKER_HARDCODE_LIBPATH 4471 4472 4473# _LT_CMD_STRIPLIB 4474# ---------------- 4475m4_defun([_LT_CMD_STRIPLIB], 4476[m4_require([_LT_DECL_EGREP]) 4477striplib= 4478old_striplib= 4479AC_MSG_CHECKING([whether stripping libraries is possible]) 4480if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 4481 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 4482 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 4483 AC_MSG_RESULT([yes]) 4484else 4485# FIXME - insert some real tests, host_os isn't really good enough 4486 case $host_os in 4487 darwin*) 4488 if test -n "$STRIP"; then 4489 striplib="$STRIP -x" 4490 old_striplib="$STRIP -S" 4491 AC_MSG_RESULT([yes]) 4492 else 4493 AC_MSG_RESULT([no]) 4494 fi 4495 ;; 4496 *) 4497 AC_MSG_RESULT([no]) 4498 ;; 4499 esac 4500fi 4501_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 4502_LT_DECL([], [striplib], [1]) 4503])# _LT_CMD_STRIPLIB 4504 4505 4506# _LT_PREPARE_MUNGE_PATH_LIST 4507# --------------------------- 4508# Make sure func_munge_path_list() is defined correctly. 4509m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 4510[[# func_munge_path_list VARIABLE PATH 4511# ----------------------------------- 4512# VARIABLE is name of variable containing _space_ separated list of 4513# directories to be munged by the contents of PATH, which is string 4514# having a format: 4515# "DIR[:DIR]:" 4516# string "DIR[ DIR]" will be prepended to VARIABLE 4517# ":DIR[:DIR]" 4518# string "DIR[ DIR]" will be appended to VARIABLE 4519# "DIRP[:DIRP]::[DIRA:]DIRA" 4520# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 4521# "DIRA[ DIRA]" will be appended to VARIABLE 4522# "DIR[:DIR]" 4523# VARIABLE will be replaced by "DIR[ DIR]" 4524func_munge_path_list () 4525{ 4526 case x@S|@2 in 4527 x) 4528 ;; 4529 *:) 4530 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 4531 ;; 4532 x:*) 4533 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 4534 ;; 4535 *::*) 4536 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 4537 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 4538 ;; 4539 *) 4540 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 4541 ;; 4542 esac 4543} 4544]])# _LT_PREPARE_PATH_LIST 4545 4546 4547# _LT_SYS_DYNAMIC_LINKER([TAG]) 4548# ----------------------------- 4549# PORTME Fill in your ld.so characteristics 4550m4_defun([_LT_SYS_DYNAMIC_LINKER], 4551[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4552m4_require([_LT_DECL_EGREP])dnl 4553m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4554m4_require([_LT_DECL_OBJDUMP])dnl 4555m4_require([_LT_DECL_SED])dnl 4556m4_require([_LT_CHECK_SHELL_FEATURES])dnl 4557m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 4558AC_MSG_CHECKING([dynamic linker characteristics]) 4559m4_if([$1], 4560 [], [ 4561if test yes = "$GCC"; then 4562 case $host_os in 4563 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 4564 *) lt_awk_arg='/^libraries:/' ;; 4565 esac 4566 case $host_os in 4567 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 4568 *) lt_sed_strip_eq='s|=/|/|g' ;; 4569 esac 4570 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 4571 case $lt_search_path_spec in 4572 *\;*) 4573 # if the path contains ";" then we assume it to be the separator 4574 # otherwise default to the standard path separator (i.e. ":") - it is 4575 # assumed that no part of a normal pathname contains ";" but that should 4576 # okay in the real world where ";" in dirpaths is itself problematic. 4577 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 4578 ;; 4579 *) 4580 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 4581 ;; 4582 esac 4583 # Ok, now we have the path, separated by spaces, we can step through it 4584 # and add multilib dir if necessary... 4585 lt_tmp_lt_search_path_spec= 4586 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 4587 # ...but if some path component already ends with the multilib dir we assume 4588 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 4589 case "$lt_multi_os_dir; $lt_search_path_spec " in 4590 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 4591 lt_multi_os_dir= 4592 ;; 4593 esac 4594 for lt_sys_path in $lt_search_path_spec; do 4595 if test -d "$lt_sys_path$lt_multi_os_dir"; then 4596 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 4597 elif test -n "$lt_multi_os_dir"; then 4598 test -d "$lt_sys_path" && \ 4599 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 4600 fi 4601 done 4602 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 4603BEGIN {RS = " "; FS = "/|\n";} { 4604 lt_foo = ""; 4605 lt_count = 0; 4606 for (lt_i = NF; lt_i > 0; lt_i--) { 4607 if ($lt_i != "" && $lt_i != ".") { 4608 if ($lt_i == "..") { 4609 lt_count++; 4610 } else { 4611 if (lt_count == 0) { 4612 lt_foo = "/" $lt_i lt_foo; 4613 } else { 4614 lt_count--; 4615 } 4616 } 4617 } 4618 } 4619 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 4620 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 4621}'` 4622 # AWK program above erroneously prepends '/' to C:/dos/paths 4623 # for these hosts. 4624 case $host_os in 4625 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 4626 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 4627 esac 4628 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 4629else 4630 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 4631fi]) 4632library_names_spec= 4633libname_spec='lib$name' 4634soname_spec= 4635shrext_cmds=.so 4636postinstall_cmds= 4637postuninstall_cmds= 4638finish_cmds= 4639finish_eval= 4640shlibpath_var= 4641shlibpath_overrides_runpath=unknown 4642version_type=none 4643dynamic_linker="$host_os ld.so" 4644sys_lib_dlsearch_path_spec="/lib /usr/lib" 4645need_lib_prefix=unknown 4646hardcode_into_libs=no 4647 4648# when you set need_version to no, make sure it does not cause -set_version 4649# flags to be left without arguments 4650need_version=unknown 4651 4652AC_ARG_VAR([LT_SYS_LIBRARY_PATH], 4653[User-defined run-time library search path.]) 4654 4655case $host_os in 4656aix3*) 4657 version_type=linux # correct to gnu/linux during the next big refactor 4658 library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 4659 shlibpath_var=LIBPATH 4660 4661 # AIX 3 has no versioning support, so we append a major version to the name. 4662 soname_spec='$libname$release$shared_ext$major' 4663 ;; 4664 4665aix[[4-9]]*) 4666 version_type=linux # correct to gnu/linux during the next big refactor 4667 need_lib_prefix=no 4668 need_version=no 4669 hardcode_into_libs=yes 4670 if test ia64 = "$host_cpu"; then 4671 # AIX 5 supports IA64 4672 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 4673 shlibpath_var=LD_LIBRARY_PATH 4674 else 4675 # With GCC up to 2.95.x, collect2 would create an import file 4676 # for dependence libraries. The import file would start with 4677 # the line '#! .'. This would cause the generated library to 4678 # depend on '.', always an invalid library. This was fixed in 4679 # development snapshots of GCC prior to 3.0. 4680 case $host_os in 4681 aix4 | aix4.[[01]] | aix4.[[01]].*) 4682 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 4683 echo ' yes ' 4684 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 4685 : 4686 else 4687 can_build_shared=no 4688 fi 4689 ;; 4690 esac 4691 # Using Import Files as archive members, it is possible to support 4692 # filename-based versioning of shared library archives on AIX. While 4693 # this would work for both with and without runtime linking, it will 4694 # prevent static linking of such archives. So we do filename-based 4695 # shared library versioning with .so extension only, which is used 4696 # when both runtime linking and shared linking is enabled. 4697 # Unfortunately, runtime linking may impact performance, so we do 4698 # not want this to be the default eventually. Also, we use the 4699 # versioned .so libs for executables only if there is the -brtl 4700 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 4701 # To allow for filename-based versioning support, we need to create 4702 # libNAME.so.V as an archive file, containing: 4703 # *) an Import File, referring to the versioned filename of the 4704 # archive as well as the shared archive member, telling the 4705 # bitwidth (32 or 64) of that shared object, and providing the 4706 # list of exported symbols of that shared object, eventually 4707 # decorated with the 'weak' keyword 4708 # *) the shared object with the F_LOADONLY flag set, to really avoid 4709 # it being seen by the linker. 4710 # At run time we better use the real file rather than another symlink, 4711 # but for link time we create the symlink libNAME.so -> libNAME.so.V 4712 4713 case $with_aix_soname,$aix_use_runtimelinking in 4714 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 4715 # soname into executable. Probably we can add versioning support to 4716 # collect2, so additional links can be useful in future. 4717 aix,yes) # traditional libtool 4718 dynamic_linker='AIX unversionable lib.so' 4719 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 4720 # instead of lib<name>.a to let people know that these are not 4721 # typical AIX shared libraries. 4722 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 4723 ;; 4724 aix,no) # traditional AIX only 4725 dynamic_linker='AIX lib.a[(]lib.so.V[)]' 4726 # We preserve .a as extension for shared libraries through AIX4.2 4727 # and later when we are not doing run time linking. 4728 library_names_spec='$libname$release.a $libname.a' 4729 soname_spec='$libname$release$shared_ext$major' 4730 ;; 4731 svr4,*) # full svr4 only 4732 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 4733 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 4734 # We do not specify a path in Import Files, so LIBPATH fires. 4735 shlibpath_overrides_runpath=yes 4736 ;; 4737 *,yes) # both, prefer svr4 4738 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 4739 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 4740 # unpreferred sharedlib libNAME.a needs extra handling 4741 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 4742 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 4743 # We do not specify a path in Import Files, so LIBPATH fires. 4744 shlibpath_overrides_runpath=yes 4745 ;; 4746 *,no) # both, prefer aix 4747 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 4748 library_names_spec='$libname$release.a $libname.a' 4749 soname_spec='$libname$release$shared_ext$major' 4750 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 4751 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 4752 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 4753 ;; 4754 esac 4755 shlibpath_var=LIBPATH 4756 fi 4757 ;; 4758 4759amigaos*) 4760 case $host_cpu in 4761 powerpc) 4762 # Since July 2007 AmigaOS4 officially supports .so libraries. 4763 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 4764 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 4765 ;; 4766 m68k) 4767 library_names_spec='$libname.ixlibrary $libname.a' 4768 # Create ${libname}_ixlibrary.a entries in /sys/libs. 4769 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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' 4770 ;; 4771 esac 4772 ;; 4773 4774beos*) 4775 library_names_spec='$libname$shared_ext' 4776 dynamic_linker="$host_os ld.so" 4777 shlibpath_var=LIBRARY_PATH 4778 ;; 4779 4780bsdi[[45]]*) 4781 version_type=linux # correct to gnu/linux during the next big refactor 4782 need_version=no 4783 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 4784 soname_spec='$libname$release$shared_ext$major' 4785 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 4786 shlibpath_var=LD_LIBRARY_PATH 4787 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 4788 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 4789 # the default ld.so.conf also contains /usr/contrib/lib and 4790 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 4791 # libtool to hard-code these into programs 4792 ;; 4793 4794cygwin* | mingw* | pw32* | cegcc*) 4795 version_type=windows 4796 shrext_cmds=.dll 4797 need_version=no 4798 need_lib_prefix=no 4799 4800 case $GCC,$cc_basename in 4801 yes,*) 4802 # gcc 4803 library_names_spec='$libname.dll.a' 4804 # DLL is installed to $(libdir)/../bin by postinstall_cmds 4805 postinstall_cmds='base_file=`basename \$file`~ 4806 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 4807 dldir=$destdir/`dirname \$dlpath`~ 4808 test -d \$dldir || mkdir -p \$dldir~ 4809 $install_prog $dir/$dlname \$dldir/$dlname~ 4810 chmod a+x \$dldir/$dlname~ 4811 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 4812 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 4813 fi' 4814 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 4815 dlpath=$dir/\$dldll~ 4816 $RM \$dlpath' 4817 shlibpath_overrides_runpath=yes 4818 4819 case $host_os in 4820 cygwin*) 4821 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 4822 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 4823m4_if([$1], [],[ 4824 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 4825 ;; 4826 mingw* | cegcc*) 4827 # MinGW DLLs use traditional 'lib' prefix 4828 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 4829 ;; 4830 pw32*) 4831 # pw32 DLLs use 'pw' prefix rather than 'lib' 4832 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 4833 ;; 4834 esac 4835 dynamic_linker='Win32 ld.exe' 4836 ;; 4837 4838 *,cl*) 4839 # Native MSVC 4840 libname_spec='$name' 4841 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 4842 library_names_spec='$libname.dll.lib' 4843 4844 case $build_os in 4845 mingw*) 4846 sys_lib_search_path_spec= 4847 lt_save_ifs=$IFS 4848 IFS=';' 4849 for lt_path in $LIB 4850 do 4851 IFS=$lt_save_ifs 4852 # Let DOS variable expansion print the short 8.3 style file name. 4853 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 4854 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 4855 done 4856 IFS=$lt_save_ifs 4857 # Convert to MSYS style. 4858 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 4859 ;; 4860 cygwin*) 4861 # Convert to unix form, then to dos form, then back to unix form 4862 # but this time dos style (no spaces!) so that the unix form looks 4863 # like /cygdrive/c/PROGRA~1:/cygdr... 4864 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 4865 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 4866 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 4867 ;; 4868 *) 4869 sys_lib_search_path_spec=$LIB 4870 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 4871 # It is most probably a Windows format PATH. 4872 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 4873 else 4874 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 4875 fi 4876 # FIXME: find the short name or the path components, as spaces are 4877 # common. (e.g. "Program Files" -> "PROGRA~1") 4878 ;; 4879 esac 4880 4881 # DLL is installed to $(libdir)/../bin by postinstall_cmds 4882 postinstall_cmds='base_file=`basename \$file`~ 4883 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 4884 dldir=$destdir/`dirname \$dlpath`~ 4885 test -d \$dldir || mkdir -p \$dldir~ 4886 $install_prog $dir/$dlname \$dldir/$dlname' 4887 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 4888 dlpath=$dir/\$dldll~ 4889 $RM \$dlpath' 4890 shlibpath_overrides_runpath=yes 4891 dynamic_linker='Win32 link.exe' 4892 ;; 4893 4894 *) 4895 # Assume MSVC wrapper 4896 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 4897 dynamic_linker='Win32 ld.exe' 4898 ;; 4899 esac 4900 # FIXME: first we should search . and the directory the executable is in 4901 shlibpath_var=PATH 4902 ;; 4903 4904darwin* | rhapsody*) 4905 dynamic_linker="$host_os dyld" 4906 version_type=darwin 4907 need_lib_prefix=no 4908 need_version=no 4909 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 4910 soname_spec='$libname$release$major$shared_ext' 4911 shlibpath_overrides_runpath=yes 4912 shlibpath_var=DYLD_LIBRARY_PATH 4913 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 4914m4_if([$1], [],[ 4915 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 4916 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 4917 ;; 4918 4919dgux*) 4920 version_type=linux # correct to gnu/linux during the next big refactor 4921 need_lib_prefix=no 4922 need_version=no 4923 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 4924 soname_spec='$libname$release$shared_ext$major' 4925 shlibpath_var=LD_LIBRARY_PATH 4926 ;; 4927 4928freebsd* | dragonfly*) 4929 # DragonFly does not have aout. When/if they implement a new 4930 # versioning mechanism, adjust this. 4931 if test -x /usr/bin/objformat; then 4932 objformat=`/usr/bin/objformat` 4933 else 4934 case $host_os in 4935 freebsd[[23]].*) objformat=aout ;; 4936 *) objformat=elf ;; 4937 esac 4938 fi 4939 version_type=freebsd-$objformat 4940 case $version_type in 4941 freebsd-elf*) 4942 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 4943 soname_spec='$libname$release$shared_ext$major' 4944 need_version=no 4945 need_lib_prefix=no 4946 ;; 4947 freebsd-*) 4948 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 4949 need_version=yes 4950 ;; 4951 esac 4952 shlibpath_var=LD_LIBRARY_PATH 4953 case $host_os in 4954 freebsd2.*) 4955 shlibpath_overrides_runpath=yes 4956 ;; 4957 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 4958 shlibpath_overrides_runpath=yes 4959 hardcode_into_libs=yes 4960 ;; 4961 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 4962 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 4963 shlibpath_overrides_runpath=no 4964 hardcode_into_libs=yes 4965 ;; 4966 *) # from 4.6 on, and DragonFly 4967 shlibpath_overrides_runpath=yes 4968 hardcode_into_libs=yes 4969 ;; 4970 esac 4971 ;; 4972 4973haiku*) 4974 version_type=linux # correct to gnu/linux during the next big refactor 4975 need_lib_prefix=no 4976 need_version=no 4977 dynamic_linker="$host_os runtime_loader" 4978 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 4979 soname_spec='$libname$release$shared_ext$major' 4980 shlibpath_var=LIBRARY_PATH 4981 shlibpath_overrides_runpath=no 4982 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 4983 hardcode_into_libs=yes 4984 ;; 4985 4986hpux9* | hpux10* | hpux11*) 4987 # Give a soname corresponding to the major version so that dld.sl refuses to 4988 # link against other versions. 4989 version_type=sunos 4990 need_lib_prefix=no 4991 need_version=no 4992 case $host_cpu in 4993 ia64*) 4994 shrext_cmds='.so' 4995 hardcode_into_libs=yes 4996 dynamic_linker="$host_os dld.so" 4997 shlibpath_var=LD_LIBRARY_PATH 4998 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4999 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5000 soname_spec='$libname$release$shared_ext$major' 5001 if test 32 = "$HPUX_IA64_MODE"; then 5002 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 5003 sys_lib_dlsearch_path_spec=/usr/lib/hpux32 5004 else 5005 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 5006 sys_lib_dlsearch_path_spec=/usr/lib/hpux64 5007 fi 5008 ;; 5009 hppa*64*) 5010 shrext_cmds='.sl' 5011 hardcode_into_libs=yes 5012 dynamic_linker="$host_os dld.sl" 5013 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 5014 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 5015 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5016 soname_spec='$libname$release$shared_ext$major' 5017 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 5018 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 5019 ;; 5020 *) 5021 shrext_cmds='.sl' 5022 dynamic_linker="$host_os dld.sl" 5023 shlibpath_var=SHLIB_PATH 5024 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 5025 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5026 soname_spec='$libname$release$shared_ext$major' 5027 ;; 5028 esac 5029 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 5030 postinstall_cmds='chmod 555 $lib' 5031 # or fails outright, so override atomically: 5032 install_override_mode=555 5033 ;; 5034 5035interix[[3-9]]*) 5036 version_type=linux # correct to gnu/linux during the next big refactor 5037 need_lib_prefix=no 5038 need_version=no 5039 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5040 soname_spec='$libname$release$shared_ext$major' 5041 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 5042 shlibpath_var=LD_LIBRARY_PATH 5043 shlibpath_overrides_runpath=no 5044 hardcode_into_libs=yes 5045 ;; 5046 5047irix5* | irix6* | nonstopux*) 5048 case $host_os in 5049 nonstopux*) version_type=nonstopux ;; 5050 *) 5051 if test yes = "$lt_cv_prog_gnu_ld"; then 5052 version_type=linux # correct to gnu/linux during the next big refactor 5053 else 5054 version_type=irix 5055 fi ;; 5056 esac 5057 need_lib_prefix=no 5058 need_version=no 5059 soname_spec='$libname$release$shared_ext$major' 5060 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 5061 case $host_os in 5062 irix5* | nonstopux*) 5063 libsuff= shlibsuff= 5064 ;; 5065 *) 5066 case $LD in # libtool.m4 will add one of these switches to LD 5067 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 5068 libsuff= shlibsuff= libmagic=32-bit;; 5069 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 5070 libsuff=32 shlibsuff=N32 libmagic=N32;; 5071 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 5072 libsuff=64 shlibsuff=64 libmagic=64-bit;; 5073 *) libsuff= shlibsuff= libmagic=never-match;; 5074 esac 5075 ;; 5076 esac 5077 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 5078 shlibpath_overrides_runpath=no 5079 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 5080 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 5081 hardcode_into_libs=yes 5082 ;; 5083 5084# No shared lib support for Linux oldld, aout, or coff. 5085linux*oldld* | linux*aout* | linux*coff*) 5086 dynamic_linker=no 5087 ;; 5088 5089linux*android*) 5090 version_type=none # Android doesn't support versioned libraries. 5091 need_lib_prefix=no 5092 need_version=no 5093 library_names_spec='$libname$release$shared_ext' 5094 soname_spec='$libname$release$shared_ext' 5095 finish_cmds= 5096 shlibpath_var=LD_LIBRARY_PATH 5097 shlibpath_overrides_runpath=yes 5098 5099 # This implies no fast_install, which is unacceptable. 5100 # Some rework will be needed to allow for fast_install 5101 # before this can be enabled. 5102 hardcode_into_libs=yes 5103 5104 dynamic_linker='Android linker' 5105 # Don't embed -rpath directories since the linker doesn't support them. 5106 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5107 ;; 5108 5109# This must be glibc/ELF. 5110linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 5111 version_type=linux # correct to gnu/linux during the next big refactor 5112 need_lib_prefix=no 5113 need_version=no 5114 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5115 soname_spec='$libname$release$shared_ext$major' 5116 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 5117 shlibpath_var=LD_LIBRARY_PATH 5118 shlibpath_overrides_runpath=no 5119 5120 # Some binutils ld are patched to set DT_RUNPATH 5121 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 5122 [lt_cv_shlibpath_overrides_runpath=no 5123 save_LDFLAGS=$LDFLAGS 5124 save_libdir=$libdir 5125 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 5126 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 5127 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 5128 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 5129 [lt_cv_shlibpath_overrides_runpath=yes])]) 5130 LDFLAGS=$save_LDFLAGS 5131 libdir=$save_libdir 5132 ]) 5133 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 5134 5135 # This implies no fast_install, which is unacceptable. 5136 # Some rework will be needed to allow for fast_install 5137 # before this can be enabled. 5138 hardcode_into_libs=yes 5139 5140 # Ideally, we could use ldconfig to report *all* directores which are 5141 # searched for libraries, however this is still not possible. Aside from not 5142 # being certain /sbin/ldconfig is available, command 5143 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 5144 # even though it is searched at run-time. Try to do the best guess by 5145 # appending ld.so.conf contents (and includes) to the search path. 5146 if test -f /etc/ld.so.conf; then 5147 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 5148 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 5149 fi 5150 5151 # We used to test for /lib/ld.so.1 and disable shared libraries on 5152 # powerpc, because MkLinux only supported shared libraries with the 5153 # GNU dynamic linker. Since this was broken with cross compilers, 5154 # most powerpc-linux boxes support dynamic linking these days and 5155 # people can always --disable-shared, the test was removed, and we 5156 # assume the GNU/Linux dynamic linker is in use. 5157 dynamic_linker='GNU/Linux ld.so' 5158 ;; 5159 5160netbsd*) 5161 version_type=sunos 5162 need_lib_prefix=no 5163 need_version=no 5164 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5165 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 5166 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 5167 dynamic_linker='NetBSD (a.out) ld.so' 5168 else 5169 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5170 soname_spec='$libname$release$shared_ext$major' 5171 dynamic_linker='NetBSD ld.elf_so' 5172 fi 5173 shlibpath_var=LD_LIBRARY_PATH 5174 shlibpath_overrides_runpath=yes 5175 hardcode_into_libs=yes 5176 ;; 5177 5178newsos6) 5179 version_type=linux # correct to gnu/linux during the next big refactor 5180 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5181 shlibpath_var=LD_LIBRARY_PATH 5182 shlibpath_overrides_runpath=yes 5183 ;; 5184 5185*nto* | *qnx*) 5186 version_type=qnx 5187 need_lib_prefix=no 5188 need_version=no 5189 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5190 soname_spec='$libname$release$shared_ext$major' 5191 shlibpath_var=LD_LIBRARY_PATH 5192 shlibpath_overrides_runpath=no 5193 hardcode_into_libs=yes 5194 dynamic_linker='ldqnx.so' 5195 ;; 5196 5197openbsd* | bitrig*) 5198 version_type=sunos 5199 sys_lib_dlsearch_path_spec=/usr/lib 5200 need_lib_prefix=no 5201 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5202 need_version=no 5203 else 5204 need_version=yes 5205 fi 5206 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 5207 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 5208 shlibpath_var=LD_LIBRARY_PATH 5209 shlibpath_overrides_runpath=yes 5210 ;; 5211 5212os2*) 5213 libname_spec='$name' 5214 version_type=windows 5215 shrext_cmds=.dll 5216 need_version=no 5217 need_lib_prefix=no 5218 # OS/2 can only load a DLL with a base name of 8 characters or less. 5219 soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 5220 v=$($ECHO $release$versuffix | tr -d .-); 5221 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 5222 $ECHO $n$v`$shared_ext' 5223 library_names_spec='${libname}_dll.$libext' 5224 dynamic_linker='OS/2 ld.exe' 5225 shlibpath_var=BEGINLIBPATH 5226 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5227 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 5228 postinstall_cmds='base_file=`basename \$file`~ 5229 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 5230 dldir=$destdir/`dirname \$dlpath`~ 5231 test -d \$dldir || mkdir -p \$dldir~ 5232 $install_prog $dir/$dlname \$dldir/$dlname~ 5233 chmod a+x \$dldir/$dlname~ 5234 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5235 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5236 fi' 5237 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 5238 dlpath=$dir/\$dldll~ 5239 $RM \$dlpath' 5240 ;; 5241 5242osf3* | osf4* | osf5*) 5243 version_type=osf 5244 need_lib_prefix=no 5245 need_version=no 5246 soname_spec='$libname$release$shared_ext$major' 5247 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5248 shlibpath_var=LD_LIBRARY_PATH 5249 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 5250 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 5251 ;; 5252 5253rdos*) 5254 dynamic_linker=no 5255 ;; 5256 5257solaris*) 5258 version_type=linux # correct to gnu/linux during the next big refactor 5259 need_lib_prefix=no 5260 need_version=no 5261 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5262 soname_spec='$libname$release$shared_ext$major' 5263 shlibpath_var=LD_LIBRARY_PATH 5264 shlibpath_overrides_runpath=yes 5265 hardcode_into_libs=yes 5266 # ldd complains unless libraries are executable 5267 postinstall_cmds='chmod +x $lib' 5268 ;; 5269 5270sunos4*) 5271 version_type=sunos 5272 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 5273 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 5274 shlibpath_var=LD_LIBRARY_PATH 5275 shlibpath_overrides_runpath=yes 5276 if test yes = "$with_gnu_ld"; then 5277 need_lib_prefix=no 5278 fi 5279 need_version=yes 5280 ;; 5281 5282sysv4 | sysv4.3*) 5283 version_type=linux # correct to gnu/linux during the next big refactor 5284 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5285 soname_spec='$libname$release$shared_ext$major' 5286 shlibpath_var=LD_LIBRARY_PATH 5287 case $host_vendor in 5288 sni) 5289 shlibpath_overrides_runpath=no 5290 need_lib_prefix=no 5291 runpath_var=LD_RUN_PATH 5292 ;; 5293 siemens) 5294 need_lib_prefix=no 5295 ;; 5296 motorola) 5297 need_lib_prefix=no 5298 need_version=no 5299 shlibpath_overrides_runpath=no 5300 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 5301 ;; 5302 esac 5303 ;; 5304 5305sysv4*MP*) 5306 if test -d /usr/nec; then 5307 version_type=linux # correct to gnu/linux during the next big refactor 5308 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 5309 soname_spec='$libname$shared_ext.$major' 5310 shlibpath_var=LD_LIBRARY_PATH 5311 fi 5312 ;; 5313 5314sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5315 version_type=sco 5316 need_lib_prefix=no 5317 need_version=no 5318 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 5319 soname_spec='$libname$release$shared_ext$major' 5320 shlibpath_var=LD_LIBRARY_PATH 5321 shlibpath_overrides_runpath=yes 5322 hardcode_into_libs=yes 5323 if test yes = "$with_gnu_ld"; then 5324 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 5325 else 5326 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 5327 case $host_os in 5328 sco3.2v5*) 5329 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 5330 ;; 5331 esac 5332 fi 5333 sys_lib_dlsearch_path_spec='/usr/lib' 5334 ;; 5335 5336tpf*) 5337 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 5338 version_type=linux # correct to gnu/linux during the next big refactor 5339 need_lib_prefix=no 5340 need_version=no 5341 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5342 shlibpath_var=LD_LIBRARY_PATH 5343 shlibpath_overrides_runpath=no 5344 hardcode_into_libs=yes 5345 ;; 5346 5347uts4*) 5348 version_type=linux # correct to gnu/linux during the next big refactor 5349 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5350 soname_spec='$libname$release$shared_ext$major' 5351 shlibpath_var=LD_LIBRARY_PATH 5352 ;; 5353 5354*) 5355 dynamic_linker=no 5356 ;; 5357esac 5358AC_MSG_RESULT([$dynamic_linker]) 5359test no = "$dynamic_linker" && can_build_shared=no 5360 5361variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 5362if test yes = "$GCC"; then 5363 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 5364fi 5365 5366if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 5367 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 5368fi 5369 5370if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 5371 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 5372fi 5373 5374# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 5375configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 5376 5377# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 5378func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 5379 5380# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 5381configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 5382 5383_LT_DECL([], [variables_saved_for_relink], [1], 5384 [Variables whose values should be saved in libtool wrapper scripts and 5385 restored at link time]) 5386_LT_DECL([], [need_lib_prefix], [0], 5387 [Do we need the "lib" prefix for modules?]) 5388_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 5389_LT_DECL([], [version_type], [0], [Library versioning type]) 5390_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 5391_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 5392_LT_DECL([], [shlibpath_overrides_runpath], [0], 5393 [Is shlibpath searched before the hard-coded library search path?]) 5394_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 5395_LT_DECL([], [library_names_spec], [1], 5396 [[List of archive names. First name is the real one, the rest are links. 5397 The last name is the one that the linker finds with -lNAME]]) 5398_LT_DECL([], [soname_spec], [1], 5399 [[The coded name of the library, if different from the real name]]) 5400_LT_DECL([], [install_override_mode], [1], 5401 [Permission mode override for installation of shared libraries]) 5402_LT_DECL([], [postinstall_cmds], [2], 5403 [Command to use after installation of a shared archive]) 5404_LT_DECL([], [postuninstall_cmds], [2], 5405 [Command to use after uninstallation of a shared archive]) 5406_LT_DECL([], [finish_cmds], [2], 5407 [Commands used to finish a libtool library installation in a directory]) 5408_LT_DECL([], [finish_eval], [1], 5409 [[As "finish_cmds", except a single script fragment to be evaled but 5410 not shown]]) 5411_LT_DECL([], [hardcode_into_libs], [0], 5412 [Whether we should hardcode library paths into libraries]) 5413_LT_DECL([], [sys_lib_search_path_spec], [2], 5414 [Compile-time system search path for libraries]) 5415_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 5416 [Detected run-time system search path for libraries]) 5417_LT_DECL([], [configure_time_lt_sys_library_path], [2], 5418 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 5419])# _LT_SYS_DYNAMIC_LINKER 5420 5421 5422# _LT_PATH_TOOL_PREFIX(TOOL) 5423# -------------------------- 5424# find a file program that can recognize shared library 5425AC_DEFUN([_LT_PATH_TOOL_PREFIX], 5426[m4_require([_LT_DECL_EGREP])dnl 5427AC_MSG_CHECKING([for $1]) 5428AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 5429[case $MAGIC_CMD in 5430[[\\/*] | ?:[\\/]*]) 5431 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 5432 ;; 5433*) 5434 lt_save_MAGIC_CMD=$MAGIC_CMD 5435 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 5436dnl $ac_dummy forces splitting on constant user-supplied paths. 5437dnl POSIX.2 word splitting is done only on the output of word expansions, 5438dnl not every word. This closes a longstanding sh security hole. 5439 ac_dummy="m4_if([$2], , $PATH, [$2])" 5440 for ac_dir in $ac_dummy; do 5441 IFS=$lt_save_ifs 5442 test -z "$ac_dir" && ac_dir=. 5443 if test -f "$ac_dir/$1"; then 5444 lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 5445 if test -n "$file_magic_test_file"; then 5446 case $deplibs_check_method in 5447 "file_magic "*) 5448 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 5449 MAGIC_CMD=$lt_cv_path_MAGIC_CMD 5450 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 5451 $EGREP "$file_magic_regex" > /dev/null; then 5452 : 5453 else 5454 cat <<_LT_EOF 1>&2 5455 5456*** Warning: the command libtool uses to detect shared libraries, 5457*** $file_magic_cmd, produces output that libtool cannot recognize. 5458*** The result is that libtool may fail to recognize shared libraries 5459*** as such. This will affect the creation of libtool libraries that 5460*** depend on shared libraries, but programs linked with such libtool 5461*** libraries will work regardless of this problem. Nevertheless, you 5462*** may want to report the problem to your system manager and/or to 5463*** bug-libtool@gnu.org 5464 5465_LT_EOF 5466 fi ;; 5467 esac 5468 fi 5469 break 5470 fi 5471 done 5472 IFS=$lt_save_ifs 5473 MAGIC_CMD=$lt_save_MAGIC_CMD 5474 ;; 5475esac]) 5476MAGIC_CMD=$lt_cv_path_MAGIC_CMD 5477if test -n "$MAGIC_CMD"; then 5478 AC_MSG_RESULT($MAGIC_CMD) 5479else 5480 AC_MSG_RESULT(no) 5481fi 5482_LT_DECL([], [MAGIC_CMD], [0], 5483 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 5484])# _LT_PATH_TOOL_PREFIX 5485 5486# Old name: 5487AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 5488dnl aclocal-1.4 backwards compatibility: 5489dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 5490 5491 5492# _LT_PATH_MAGIC 5493# -------------- 5494# find a file program that can recognize a shared library 5495m4_defun([_LT_PATH_MAGIC], 5496[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 5497if test -z "$lt_cv_path_MAGIC_CMD"; then 5498 if test -n "$ac_tool_prefix"; then 5499 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 5500 else 5501 MAGIC_CMD=: 5502 fi 5503fi 5504])# _LT_PATH_MAGIC 5505 5506 5507# LT_PATH_LD 5508# ---------- 5509# find the pathname to the GNU or non-GNU linker 5510AC_DEFUN([LT_PATH_LD], 5511[AC_REQUIRE([AC_PROG_CC])dnl 5512AC_REQUIRE([AC_CANONICAL_HOST])dnl 5513AC_REQUIRE([AC_CANONICAL_BUILD])dnl 5514m4_require([_LT_DECL_SED])dnl 5515m4_require([_LT_DECL_EGREP])dnl 5516m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 5517 5518AC_ARG_WITH([gnu-ld], 5519 [AS_HELP_STRING([--with-gnu-ld], 5520 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 5521 [test no = "$withval" || with_gnu_ld=yes], 5522 [with_gnu_ld=no])dnl 5523 5524ac_prog=ld 5525if test yes = "$GCC"; then 5526 # Check if gcc -print-prog-name=ld gives a path. 5527 AC_MSG_CHECKING([for ld used by $CC]) 5528 case $host in 5529 *-*-mingw*) 5530 # gcc leaves a trailing carriage return, which upsets mingw 5531 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 5532 *) 5533 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 5534 esac 5535 case $ac_prog in 5536 # Accept absolute paths. 5537 [[\\/]]* | ?:[[\\/]]*) 5538 re_direlt='/[[^/]][[^/]]*/\.\./' 5539 # Canonicalize the pathname of ld 5540 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 5541 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 5542 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 5543 done 5544 test -z "$LD" && LD=$ac_prog 5545 ;; 5546 "") 5547 # If it fails, then pretend we aren't using GCC. 5548 ac_prog=ld 5549 ;; 5550 *) 5551 # If it is relative, then search for the first ld in PATH. 5552 with_gnu_ld=unknown 5553 ;; 5554 esac 5555elif test yes = "$with_gnu_ld"; then 5556 AC_MSG_CHECKING([for GNU ld]) 5557else 5558 AC_MSG_CHECKING([for non-GNU ld]) 5559fi 5560AC_CACHE_VAL(lt_cv_path_LD, 5561[if test -z "$LD"; then 5562 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 5563 for ac_dir in $PATH; do 5564 IFS=$lt_save_ifs 5565 test -z "$ac_dir" && ac_dir=. 5566 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 5567 lt_cv_path_LD=$ac_dir/$ac_prog 5568 # Check to see if the program is GNU ld. I'd rather use --version, 5569 # but apparently some variants of GNU ld only accept -v. 5570 # Break only if it was the GNU/non-GNU ld that we prefer. 5571 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 5572 *GNU* | *'with BFD'*) 5573 test no != "$with_gnu_ld" && break 5574 ;; 5575 *) 5576 test yes != "$with_gnu_ld" && break 5577 ;; 5578 esac 5579 fi 5580 done 5581 IFS=$lt_save_ifs 5582else 5583 lt_cv_path_LD=$LD # Let the user override the test with a path. 5584fi]) 5585LD=$lt_cv_path_LD 5586if test -n "$LD"; then 5587 AC_MSG_RESULT($LD) 5588else 5589 AC_MSG_RESULT(no) 5590fi 5591test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 5592_LT_PATH_LD_GNU 5593AC_SUBST([LD]) 5594 5595_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 5596])# LT_PATH_LD 5597 5598# Old names: 5599AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 5600AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 5601dnl aclocal-1.4 backwards compatibility: 5602dnl AC_DEFUN([AM_PROG_LD], []) 5603dnl AC_DEFUN([AC_PROG_LD], []) 5604 5605 5606# _LT_PATH_LD_GNU 5607#- -------------- 5608m4_defun([_LT_PATH_LD_GNU], 5609[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 5610[# I'd rather use --version here, but apparently some GNU lds only accept -v. 5611case `$LD -v 2>&1 </dev/null` in 5612*GNU* | *'with BFD'*) 5613 lt_cv_prog_gnu_ld=yes 5614 ;; 5615*) 5616 lt_cv_prog_gnu_ld=no 5617 ;; 5618esac]) 5619with_gnu_ld=$lt_cv_prog_gnu_ld 5620])# _LT_PATH_LD_GNU 5621 5622 5623# _LT_CMD_RELOAD 5624# -------------- 5625# find reload flag for linker 5626# -- PORTME Some linkers may need a different reload flag. 5627m4_defun([_LT_CMD_RELOAD], 5628[AC_CACHE_CHECK([for $LD option to reload object files], 5629 lt_cv_ld_reload_flag, 5630 [lt_cv_ld_reload_flag='-r']) 5631reload_flag=$lt_cv_ld_reload_flag 5632case $reload_flag in 5633"" | " "*) ;; 5634*) reload_flag=" $reload_flag" ;; 5635esac 5636reload_cmds='$LD$reload_flag -o $output$reload_objs' 5637case $host_os in 5638 cygwin* | mingw* | pw32* | cegcc*) 5639 if test yes != "$GCC"; then 5640 reload_cmds=false 5641 fi 5642 ;; 5643 darwin*) 5644 if test yes = "$GCC"; then 5645 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 5646 else 5647 reload_cmds='$LD$reload_flag -o $output$reload_objs' 5648 fi 5649 ;; 5650esac 5651_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 5652_LT_TAGDECL([], [reload_cmds], [2])dnl 5653])# _LT_CMD_RELOAD 5654 5655 5656# _LT_PATH_DD 5657# ----------- 5658# find a working dd 5659m4_defun([_LT_PATH_DD], 5660[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 5661[printf 0123456789abcdef0123456789abcdef >conftest.i 5662cat conftest.i conftest.i >conftest2.i 5663: ${lt_DD:=$DD} 5664AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 5665[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 5666 cmp -s conftest.i conftest.out \ 5667 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 5668fi]) 5669rm -f conftest.i conftest2.i conftest.out]) 5670])# _LT_PATH_DD 5671 5672 5673# _LT_CMD_TRUNCATE 5674# ---------------- 5675# find command to truncate a binary pipe 5676m4_defun([_LT_CMD_TRUNCATE], 5677[m4_require([_LT_PATH_DD]) 5678AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 5679[printf 0123456789abcdef0123456789abcdef >conftest.i 5680cat conftest.i conftest.i >conftest2.i 5681lt_cv_truncate_bin= 5682if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 5683 cmp -s conftest.i conftest.out \ 5684 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 5685fi 5686rm -f conftest.i conftest2.i conftest.out 5687test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 5688_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 5689 [Command to truncate a binary pipe]) 5690])# _LT_CMD_TRUNCATE 5691 5692 5693# _LT_CHECK_MAGIC_METHOD 5694# ---------------------- 5695# how to check for library dependencies 5696# -- PORTME fill in with the dynamic library characteristics 5697m4_defun([_LT_CHECK_MAGIC_METHOD], 5698[m4_require([_LT_DECL_EGREP]) 5699m4_require([_LT_DECL_OBJDUMP]) 5700AC_CACHE_CHECK([how to recognize dependent libraries], 5701lt_cv_deplibs_check_method, 5702[lt_cv_file_magic_cmd='$MAGIC_CMD' 5703lt_cv_file_magic_test_file= 5704lt_cv_deplibs_check_method='unknown' 5705# Need to set the preceding variable on all platforms that support 5706# interlibrary dependencies. 5707# 'none' -- dependencies not supported. 5708# 'unknown' -- same as none, but documents that we really don't know. 5709# 'pass_all' -- all dependencies passed with no checks. 5710# 'test_compile' -- check by making test program. 5711# 'file_magic [[regex]]' -- check by looking for files in library path 5712# that responds to the $file_magic_cmd with a given extended regex. 5713# If you have 'file' or equivalent on your system and you're not sure 5714# whether 'pass_all' will *always* work, you probably want this one. 5715 5716case $host_os in 5717aix[[4-9]]*) 5718 lt_cv_deplibs_check_method=pass_all 5719 ;; 5720 5721beos*) 5722 lt_cv_deplibs_check_method=pass_all 5723 ;; 5724 5725bsdi[[45]]*) 5726 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 5727 lt_cv_file_magic_cmd='/usr/bin/file -L' 5728 lt_cv_file_magic_test_file=/shlib/libc.so 5729 ;; 5730 5731cygwin*) 5732 # func_win32_libid is a shell function defined in ltmain.sh 5733 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5734 lt_cv_file_magic_cmd='func_win32_libid' 5735 ;; 5736 5737mingw* | pw32*) 5738 # Base MSYS/MinGW do not provide the 'file' command needed by 5739 # func_win32_libid shell function, so use a weaker test based on 'objdump', 5740 # unless we find 'file', for example because we are cross-compiling. 5741 if ( file / ) >/dev/null 2>&1; then 5742 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5743 lt_cv_file_magic_cmd='func_win32_libid' 5744 else 5745 # Keep this pattern in sync with the one in func_win32_libid. 5746 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 5747 lt_cv_file_magic_cmd='$OBJDUMP -f' 5748 fi 5749 ;; 5750 5751cegcc*) 5752 # use the weaker test based on 'objdump'. See mingw*. 5753 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 5754 lt_cv_file_magic_cmd='$OBJDUMP -f' 5755 ;; 5756 5757darwin* | rhapsody*) 5758 lt_cv_deplibs_check_method=pass_all 5759 ;; 5760 5761freebsd* | dragonfly*) 5762 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5763 case $host_cpu in 5764 i*86 ) 5765 # Not sure whether the presence of OpenBSD here was a mistake. 5766 # Let's accept both of them until this is cleared up. 5767 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 5768 lt_cv_file_magic_cmd=/usr/bin/file 5769 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 5770 ;; 5771 esac 5772 else 5773 lt_cv_deplibs_check_method=pass_all 5774 fi 5775 ;; 5776 5777haiku*) 5778 lt_cv_deplibs_check_method=pass_all 5779 ;; 5780 5781hpux10.20* | hpux11*) 5782 lt_cv_file_magic_cmd=/usr/bin/file 5783 case $host_cpu in 5784 ia64*) 5785 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 5786 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 5787 ;; 5788 hppa*64*) 5789 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 5790 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 5791 ;; 5792 *) 5793 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 5794 lt_cv_file_magic_test_file=/usr/lib/libc.sl 5795 ;; 5796 esac 5797 ;; 5798 5799interix[[3-9]]*) 5800 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 5801 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 5802 ;; 5803 5804irix5* | irix6* | nonstopux*) 5805 case $LD in 5806 *-32|*"-32 ") libmagic=32-bit;; 5807 *-n32|*"-n32 ") libmagic=N32;; 5808 *-64|*"-64 ") libmagic=64-bit;; 5809 *) libmagic=never-match;; 5810 esac 5811 lt_cv_deplibs_check_method=pass_all 5812 ;; 5813 5814# This must be glibc/ELF. 5815linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 5816 lt_cv_deplibs_check_method=pass_all 5817 ;; 5818 5819netbsd*) 5820 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5821 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5822 else 5823 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 5824 fi 5825 ;; 5826 5827newos6*) 5828 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 5829 lt_cv_file_magic_cmd=/usr/bin/file 5830 lt_cv_file_magic_test_file=/usr/lib/libnls.so 5831 ;; 5832 5833*nto* | *qnx*) 5834 lt_cv_deplibs_check_method=pass_all 5835 ;; 5836 5837openbsd* | bitrig*) 5838 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5839 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 5840 else 5841 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5842 fi 5843 ;; 5844 5845osf3* | osf4* | osf5*) 5846 lt_cv_deplibs_check_method=pass_all 5847 ;; 5848 5849rdos*) 5850 lt_cv_deplibs_check_method=pass_all 5851 ;; 5852 5853solaris*) 5854 lt_cv_deplibs_check_method=pass_all 5855 ;; 5856 5857sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5858 lt_cv_deplibs_check_method=pass_all 5859 ;; 5860 5861sysv4 | sysv4.3*) 5862 case $host_vendor in 5863 motorola) 5864 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]]' 5865 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 5866 ;; 5867 ncr) 5868 lt_cv_deplibs_check_method=pass_all 5869 ;; 5870 sequent) 5871 lt_cv_file_magic_cmd='/bin/file' 5872 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 5873 ;; 5874 sni) 5875 lt_cv_file_magic_cmd='/bin/file' 5876 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 5877 lt_cv_file_magic_test_file=/lib/libc.so 5878 ;; 5879 siemens) 5880 lt_cv_deplibs_check_method=pass_all 5881 ;; 5882 pc) 5883 lt_cv_deplibs_check_method=pass_all 5884 ;; 5885 esac 5886 ;; 5887 5888tpf*) 5889 lt_cv_deplibs_check_method=pass_all 5890 ;; 5891os2*) 5892 lt_cv_deplibs_check_method=pass_all 5893 ;; 5894esac 5895]) 5896 5897file_magic_glob= 5898want_nocaseglob=no 5899if test "$build" = "$host"; then 5900 case $host_os in 5901 mingw* | pw32*) 5902 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 5903 want_nocaseglob=yes 5904 else 5905 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 5906 fi 5907 ;; 5908 esac 5909fi 5910 5911file_magic_cmd=$lt_cv_file_magic_cmd 5912deplibs_check_method=$lt_cv_deplibs_check_method 5913test -z "$deplibs_check_method" && deplibs_check_method=unknown 5914 5915_LT_DECL([], [deplibs_check_method], [1], 5916 [Method to check whether dependent libraries are shared objects]) 5917_LT_DECL([], [file_magic_cmd], [1], 5918 [Command to use when deplibs_check_method = "file_magic"]) 5919_LT_DECL([], [file_magic_glob], [1], 5920 [How to find potential files when deplibs_check_method = "file_magic"]) 5921_LT_DECL([], [want_nocaseglob], [1], 5922 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 5923])# _LT_CHECK_MAGIC_METHOD 5924 5925 5926# LT_PATH_NM 5927# ---------- 5928# find the pathname to a BSD- or MS-compatible name lister 5929AC_DEFUN([LT_PATH_NM], 5930[AC_REQUIRE([AC_PROG_CC])dnl 5931AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 5932[if test -n "$NM"; then 5933 # Let the user override the test. 5934 lt_cv_path_NM=$NM 5935else 5936 lt_nm_to_check=${ac_tool_prefix}nm 5937 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 5938 lt_nm_to_check="$lt_nm_to_check nm" 5939 fi 5940 for lt_tmp_nm in $lt_nm_to_check; do 5941 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 5942 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 5943 IFS=$lt_save_ifs 5944 test -z "$ac_dir" && ac_dir=. 5945 tmp_nm=$ac_dir/$lt_tmp_nm 5946 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 5947 # Check to see if the nm accepts a BSD-compat flag. 5948 # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 5949 # nm: unknown option "B" ignored 5950 # Tru64's nm complains that /dev/null is an invalid object file 5951 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 5952 case $build_os in 5953 mingw*) lt_bad_file=conftest.nm/nofile ;; 5954 *) lt_bad_file=/dev/null ;; 5955 esac 5956 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 5957 *$lt_bad_file* | *'Invalid file or object type'*) 5958 lt_cv_path_NM="$tmp_nm -B" 5959 break 2 5960 ;; 5961 *) 5962 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 5963 */dev/null*) 5964 lt_cv_path_NM="$tmp_nm -p" 5965 break 2 5966 ;; 5967 *) 5968 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 5969 continue # so that we can try to find one that supports BSD flags 5970 ;; 5971 esac 5972 ;; 5973 esac 5974 fi 5975 done 5976 IFS=$lt_save_ifs 5977 done 5978 : ${lt_cv_path_NM=no} 5979fi]) 5980if test no != "$lt_cv_path_NM"; then 5981 NM=$lt_cv_path_NM 5982else 5983 # Didn't find any BSD compatible name lister, look for dumpbin. 5984 if test -n "$DUMPBIN"; then : 5985 # Let the user override the test. 5986 else 5987 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 5988 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 5989 *COFF*) 5990 DUMPBIN="$DUMPBIN -symbols -headers" 5991 ;; 5992 *) 5993 DUMPBIN=: 5994 ;; 5995 esac 5996 fi 5997 AC_SUBST([DUMPBIN]) 5998 if test : != "$DUMPBIN"; then 5999 NM=$DUMPBIN 6000 fi 6001fi 6002test -z "$NM" && NM=nm 6003AC_SUBST([NM]) 6004_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 6005 6006AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 6007 [lt_cv_nm_interface="BSD nm" 6008 echo "int some_variable = 0;" > conftest.$ac_ext 6009 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 6010 (eval "$ac_compile" 2>conftest.err) 6011 cat conftest.err >&AS_MESSAGE_LOG_FD 6012 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 6013 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 6014 cat conftest.err >&AS_MESSAGE_LOG_FD 6015 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 6016 cat conftest.out >&AS_MESSAGE_LOG_FD 6017 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 6018 lt_cv_nm_interface="MS dumpbin" 6019 fi 6020 rm -f conftest*]) 6021])# LT_PATH_NM 6022 6023# Old names: 6024AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 6025AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 6026dnl aclocal-1.4 backwards compatibility: 6027dnl AC_DEFUN([AM_PROG_NM], []) 6028dnl AC_DEFUN([AC_PROG_NM], []) 6029 6030# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 6031# -------------------------------- 6032# how to determine the name of the shared library 6033# associated with a specific link library. 6034# -- PORTME fill in with the dynamic library characteristics 6035m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 6036[m4_require([_LT_DECL_EGREP]) 6037m4_require([_LT_DECL_OBJDUMP]) 6038m4_require([_LT_DECL_DLLTOOL]) 6039AC_CACHE_CHECK([how to associate runtime and link libraries], 6040lt_cv_sharedlib_from_linklib_cmd, 6041[lt_cv_sharedlib_from_linklib_cmd='unknown' 6042 6043case $host_os in 6044cygwin* | mingw* | pw32* | cegcc*) 6045 # two different shell functions defined in ltmain.sh; 6046 # decide which one to use based on capabilities of $DLLTOOL 6047 case `$DLLTOOL --help 2>&1` in 6048 *--identify-strict*) 6049 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 6050 ;; 6051 *) 6052 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 6053 ;; 6054 esac 6055 ;; 6056*) 6057 # fallback: assume linklib IS sharedlib 6058 lt_cv_sharedlib_from_linklib_cmd=$ECHO 6059 ;; 6060esac 6061]) 6062sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 6063test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 6064 6065_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 6066 [Command to associate shared and link libraries]) 6067])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 6068 6069 6070# _LT_PATH_MANIFEST_TOOL 6071# ---------------------- 6072# locate the manifest tool 6073m4_defun([_LT_PATH_MANIFEST_TOOL], 6074[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 6075test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 6076AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 6077 [lt_cv_path_mainfest_tool=no 6078 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 6079 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 6080 cat conftest.err >&AS_MESSAGE_LOG_FD 6081 if $GREP 'Manifest Tool' conftest.out > /dev/null; then 6082 lt_cv_path_mainfest_tool=yes 6083 fi 6084 rm -f conftest*]) 6085if test yes != "$lt_cv_path_mainfest_tool"; then 6086 MANIFEST_TOOL=: 6087fi 6088_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 6089])# _LT_PATH_MANIFEST_TOOL 6090 6091 6092# _LT_DLL_DEF_P([FILE]) 6093# --------------------- 6094# True iff FILE is a Windows DLL '.def' file. 6095# Keep in sync with func_dll_def_p in the libtool script 6096AC_DEFUN([_LT_DLL_DEF_P], 6097[dnl 6098 test DEF = "`$SED -n dnl 6099 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 6100 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 6101 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 6102 -e q dnl Only consider the first "real" line 6103 $1`" dnl 6104])# _LT_DLL_DEF_P 6105 6106 6107# LT_LIB_M 6108# -------- 6109# check for math library 6110AC_DEFUN([LT_LIB_M], 6111[AC_REQUIRE([AC_CANONICAL_HOST])dnl 6112LIBM= 6113case $host in 6114*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 6115 # These system don't have libm, or don't need it 6116 ;; 6117*-ncr-sysv4.3*) 6118 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 6119 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 6120 ;; 6121*) 6122 AC_CHECK_LIB(m, cos, LIBM=-lm) 6123 ;; 6124esac 6125AC_SUBST([LIBM]) 6126])# LT_LIB_M 6127 6128# Old name: 6129AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 6130dnl aclocal-1.4 backwards compatibility: 6131dnl AC_DEFUN([AC_CHECK_LIBM], []) 6132 6133 6134# _LT_COMPILER_NO_RTTI([TAGNAME]) 6135# ------------------------------- 6136m4_defun([_LT_COMPILER_NO_RTTI], 6137[m4_require([_LT_TAG_COMPILER])dnl 6138 6139_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6140 6141if test yes = "$GCC"; then 6142 case $cc_basename in 6143 nvcc*) 6144 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 6145 *) 6146 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 6147 esac 6148 6149 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 6150 lt_cv_prog_compiler_rtti_exceptions, 6151 [-fno-rtti -fno-exceptions], [], 6152 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 6153fi 6154_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 6155 [Compiler flag to turn off builtin functions]) 6156])# _LT_COMPILER_NO_RTTI 6157 6158 6159# _LT_CMD_GLOBAL_SYMBOLS 6160# ---------------------- 6161m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 6162[AC_REQUIRE([AC_CANONICAL_HOST])dnl 6163AC_REQUIRE([AC_PROG_CC])dnl 6164AC_REQUIRE([AC_PROG_AWK])dnl 6165AC_REQUIRE([LT_PATH_NM])dnl 6166AC_REQUIRE([LT_PATH_LD])dnl 6167m4_require([_LT_DECL_SED])dnl 6168m4_require([_LT_DECL_EGREP])dnl 6169m4_require([_LT_TAG_COMPILER])dnl 6170 6171# Check for command to grab the raw symbol name followed by C symbol from nm. 6172AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 6173AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 6174[ 6175# These are sane defaults that work on at least a few old systems. 6176# [They come from Ultrix. What could be older than Ultrix?!! ;)] 6177 6178# Character class describing NM global symbol codes. 6179symcode='[[BCDEGRST]]' 6180 6181# Regexp to match symbols that can be accessed directly from C. 6182sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 6183 6184# Define system-specific variables. 6185case $host_os in 6186aix*) 6187 symcode='[[BCDT]]' 6188 ;; 6189cygwin* | mingw* | pw32* | cegcc*) 6190 symcode='[[ABCDGISTW]]' 6191 ;; 6192hpux*) 6193 if test ia64 = "$host_cpu"; then 6194 symcode='[[ABCDEGRST]]' 6195 fi 6196 ;; 6197irix* | nonstopux*) 6198 symcode='[[BCDEGRST]]' 6199 ;; 6200osf*) 6201 symcode='[[BCDEGQRST]]' 6202 ;; 6203solaris*) 6204 symcode='[[BDRT]]' 6205 ;; 6206sco3.2v5*) 6207 symcode='[[DT]]' 6208 ;; 6209sysv4.2uw2*) 6210 symcode='[[DT]]' 6211 ;; 6212sysv5* | sco5v6* | unixware* | OpenUNIX*) 6213 symcode='[[ABDT]]' 6214 ;; 6215sysv4) 6216 symcode='[[DFNSTU]]' 6217 ;; 6218esac 6219 6220# If we're using GNU nm, then use its standard symbol codes. 6221case `$NM -V 2>&1` in 6222*GNU* | *'with BFD'*) 6223 symcode='[[ABCDGIRSTW]]' ;; 6224esac 6225 6226if test "$lt_cv_nm_interface" = "MS dumpbin"; then 6227 # Gets list of data symbols to import. 6228 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 6229 # Adjust the below global symbol transforms to fixup imported variables. 6230 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 6231 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 6232 lt_c_name_lib_hook="\ 6233 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 6234 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 6235else 6236 # Disable hooks by default. 6237 lt_cv_sys_global_symbol_to_import= 6238 lt_cdecl_hook= 6239 lt_c_name_hook= 6240 lt_c_name_lib_hook= 6241fi 6242 6243# Transform an extracted symbol line into a proper C declaration. 6244# Some systems (esp. on ia64) link data and code symbols differently, 6245# so use this general approach. 6246lt_cv_sys_global_symbol_to_cdecl="sed -n"\ 6247$lt_cdecl_hook\ 6248" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 6249" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 6250 6251# Transform an extracted symbol line into symbol name and symbol address 6252lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 6253$lt_c_name_hook\ 6254" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 6255" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 6256 6257# Transform an extracted symbol line into symbol name with lib prefix and 6258# symbol address. 6259lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 6260$lt_c_name_lib_hook\ 6261" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 6262" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 6263" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 6264 6265# Handle CRLF in mingw tool chain 6266opt_cr= 6267case $build_os in 6268mingw*) 6269 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 6270 ;; 6271esac 6272 6273# Try without a prefix underscore, then with it. 6274for ac_symprfx in "" "_"; do 6275 6276 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 6277 symxfrm="\\1 $ac_symprfx\\2 \\2" 6278 6279 # Write the raw and C identifiers. 6280 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 6281 # Fake it for dumpbin and say T for any non-static function, 6282 # D for any global variable and I for any imported variable. 6283 # Also find C++ and __fastcall symbols from MSVC++, 6284 # which start with @ or ?. 6285 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 6286" {last_section=section; section=\$ 3};"\ 6287" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 6288" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 6289" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 6290" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 6291" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 6292" \$ 0!~/External *\|/{next};"\ 6293" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 6294" {if(hide[section]) next};"\ 6295" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 6296" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 6297" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 6298" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 6299" ' prfx=^$ac_symprfx]" 6300 else 6301 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 6302 fi 6303 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 6304 6305 # Check to see that the pipe works correctly. 6306 pipe_works=no 6307 6308 rm -f conftest* 6309 cat > conftest.$ac_ext <<_LT_EOF 6310#ifdef __cplusplus 6311extern "C" { 6312#endif 6313char nm_test_var; 6314void nm_test_func(void); 6315void nm_test_func(void){} 6316#ifdef __cplusplus 6317} 6318#endif 6319int main(){nm_test_var='a';nm_test_func();return(0);} 6320_LT_EOF 6321 6322 if AC_TRY_EVAL(ac_compile); then 6323 # Now try to grab the symbols. 6324 nlist=conftest.nm 6325 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 6326 # Try sorting and uniquifying the output. 6327 if sort "$nlist" | uniq > "$nlist"T; then 6328 mv -f "$nlist"T "$nlist" 6329 else 6330 rm -f "$nlist"T 6331 fi 6332 6333 # Make sure that we snagged all the symbols we need. 6334 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 6335 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 6336 cat <<_LT_EOF > conftest.$ac_ext 6337/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 6338#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 6339/* DATA imports from DLLs on WIN32 can't be const, because runtime 6340 relocations are performed -- see ld's documentation on pseudo-relocs. */ 6341# define LT@&t@_DLSYM_CONST 6342#elif defined __osf__ 6343/* This system does not cope well with relocations in const data. */ 6344# define LT@&t@_DLSYM_CONST 6345#else 6346# define LT@&t@_DLSYM_CONST const 6347#endif 6348 6349#ifdef __cplusplus 6350extern "C" { 6351#endif 6352 6353_LT_EOF 6354 # Now generate the symbol file. 6355 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 6356 6357 cat <<_LT_EOF >> conftest.$ac_ext 6358 6359/* The mapping between symbol names and symbols. */ 6360LT@&t@_DLSYM_CONST struct { 6361 const char *name; 6362 void *address; 6363} 6364lt__PROGRAM__LTX_preloaded_symbols[[]] = 6365{ 6366 { "@PROGRAM@", (void *) 0 }, 6367_LT_EOF 6368 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 6369 cat <<\_LT_EOF >> conftest.$ac_ext 6370 {0, (void *) 0} 6371}; 6372 6373/* This works around a problem in FreeBSD linker */ 6374#ifdef FREEBSD_WORKAROUND 6375static const void *lt_preloaded_setup() { 6376 return lt__PROGRAM__LTX_preloaded_symbols; 6377} 6378#endif 6379 6380#ifdef __cplusplus 6381} 6382#endif 6383_LT_EOF 6384 # Now try linking the two files. 6385 mv conftest.$ac_objext conftstm.$ac_objext 6386 lt_globsym_save_LIBS=$LIBS 6387 lt_globsym_save_CFLAGS=$CFLAGS 6388 LIBS=conftstm.$ac_objext 6389 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 6390 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 6391 pipe_works=yes 6392 fi 6393 LIBS=$lt_globsym_save_LIBS 6394 CFLAGS=$lt_globsym_save_CFLAGS 6395 else 6396 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 6397 fi 6398 else 6399 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 6400 fi 6401 else 6402 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 6403 fi 6404 else 6405 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 6406 cat conftest.$ac_ext >&5 6407 fi 6408 rm -rf conftest* conftst* 6409 6410 # Do not use the global_symbol_pipe unless it works. 6411 if test yes = "$pipe_works"; then 6412 break 6413 else 6414 lt_cv_sys_global_symbol_pipe= 6415 fi 6416done 6417]) 6418if test -z "$lt_cv_sys_global_symbol_pipe"; then 6419 lt_cv_sys_global_symbol_to_cdecl= 6420fi 6421if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 6422 AC_MSG_RESULT(failed) 6423else 6424 AC_MSG_RESULT(ok) 6425fi 6426 6427# Response file support. 6428if test "$lt_cv_nm_interface" = "MS dumpbin"; then 6429 nm_file_list_spec='@' 6430elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 6431 nm_file_list_spec='@' 6432fi 6433 6434_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 6435 [Take the output of nm and produce a listing of raw symbols and C names]) 6436_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 6437 [Transform the output of nm in a proper C declaration]) 6438_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 6439 [Transform the output of nm into a list of symbols to manually relocate]) 6440_LT_DECL([global_symbol_to_c_name_address], 6441 [lt_cv_sys_global_symbol_to_c_name_address], [1], 6442 [Transform the output of nm in a C name address pair]) 6443_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 6444 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 6445 [Transform the output of nm in a C name address pair when lib prefix is needed]) 6446_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 6447 [The name lister interface]) 6448_LT_DECL([], [nm_file_list_spec], [1], 6449 [Specify filename containing input files for $NM]) 6450]) # _LT_CMD_GLOBAL_SYMBOLS 6451 6452 6453# _LT_COMPILER_PIC([TAGNAME]) 6454# --------------------------- 6455m4_defun([_LT_COMPILER_PIC], 6456[m4_require([_LT_TAG_COMPILER])dnl 6457_LT_TAGVAR(lt_prog_compiler_wl, $1)= 6458_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6459_LT_TAGVAR(lt_prog_compiler_static, $1)= 6460 6461m4_if([$1], [CXX], [ 6462 # C++ specific cases for pic, static, wl, etc. 6463 if test yes = "$GXX"; then 6464 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6465 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6466 6467 case $host_os in 6468 aix*) 6469 # All AIX code is PIC. 6470 if test ia64 = "$host_cpu"; then 6471 # AIX 5 now supports IA64 processor 6472 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6473 fi 6474 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6475 ;; 6476 6477 amigaos*) 6478 case $host_cpu in 6479 powerpc) 6480 # see comment about AmigaOS4 .so support 6481 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6482 ;; 6483 m68k) 6484 # FIXME: we need at least 68020 code to build shared libraries, but 6485 # adding the '-m68020' flag to GCC prevents building anything better, 6486 # like '-m68040'. 6487 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6488 ;; 6489 esac 6490 ;; 6491 6492 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6493 # PIC is the default for these OSes. 6494 ;; 6495 mingw* | cygwin* | os2* | pw32* | cegcc*) 6496 # This hack is so that the source file can tell whether it is being 6497 # built for inclusion in a dll (and should export symbols for example). 6498 # Although the cygwin gcc ignores -fPIC, still need this for old-style 6499 # (--disable-auto-import) libraries 6500 m4_if([$1], [GCJ], [], 6501 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6502 case $host_os in 6503 os2*) 6504 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 6505 ;; 6506 esac 6507 ;; 6508 darwin* | rhapsody*) 6509 # PIC is the default on this platform 6510 # Common symbols not allowed in MH_DYLIB files 6511 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6512 ;; 6513 *djgpp*) 6514 # DJGPP does not support shared libraries at all 6515 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6516 ;; 6517 haiku*) 6518 # PIC is the default for Haiku. 6519 # The "-static" flag exists, but is broken. 6520 _LT_TAGVAR(lt_prog_compiler_static, $1)= 6521 ;; 6522 interix[[3-9]]*) 6523 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6524 # Instead, we relocate shared libraries at runtime. 6525 ;; 6526 sysv4*MP*) 6527 if test -d /usr/nec; then 6528 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6529 fi 6530 ;; 6531 hpux*) 6532 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6533 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6534 # sets the default TLS model and affects inlining. 6535 case $host_cpu in 6536 hppa*64*) 6537 ;; 6538 *) 6539 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6540 ;; 6541 esac 6542 ;; 6543 *qnx* | *nto*) 6544 # QNX uses GNU C++, but need to define -shared option too, otherwise 6545 # it will coredump. 6546 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6547 ;; 6548 *) 6549 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6550 ;; 6551 esac 6552 else 6553 case $host_os in 6554 aix[[4-9]]*) 6555 # All AIX code is PIC. 6556 if test ia64 = "$host_cpu"; then 6557 # AIX 5 now supports IA64 processor 6558 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6559 else 6560 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6561 fi 6562 ;; 6563 chorus*) 6564 case $cc_basename in 6565 cxch68*) 6566 # Green Hills C++ Compiler 6567 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" 6568 ;; 6569 esac 6570 ;; 6571 mingw* | cygwin* | os2* | pw32* | cegcc*) 6572 # This hack is so that the source file can tell whether it is being 6573 # built for inclusion in a dll (and should export symbols for example). 6574 m4_if([$1], [GCJ], [], 6575 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6576 ;; 6577 dgux*) 6578 case $cc_basename in 6579 ec++*) 6580 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6581 ;; 6582 ghcx*) 6583 # Green Hills C++ Compiler 6584 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6585 ;; 6586 *) 6587 ;; 6588 esac 6589 ;; 6590 freebsd* | dragonfly*) 6591 # FreeBSD uses GNU C++ 6592 ;; 6593 hpux9* | hpux10* | hpux11*) 6594 case $cc_basename in 6595 CC*) 6596 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6597 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 6598 if test ia64 != "$host_cpu"; then 6599 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6600 fi 6601 ;; 6602 aCC*) 6603 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6604 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 6605 case $host_cpu in 6606 hppa*64*|ia64*) 6607 # +Z the default 6608 ;; 6609 *) 6610 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6611 ;; 6612 esac 6613 ;; 6614 *) 6615 ;; 6616 esac 6617 ;; 6618 interix*) 6619 # This is c89, which is MS Visual C++ (no shared libs) 6620 # Anyone wants to do a port? 6621 ;; 6622 irix5* | irix6* | nonstopux*) 6623 case $cc_basename in 6624 CC*) 6625 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6626 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6627 # CC pic flag -KPIC is the default. 6628 ;; 6629 *) 6630 ;; 6631 esac 6632 ;; 6633 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6634 case $cc_basename in 6635 KCC*) 6636 # KAI C++ Compiler 6637 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6638 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6639 ;; 6640 ecpc* ) 6641 # old Intel C++ for x86_64, which still supported -KPIC. 6642 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6643 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6645 ;; 6646 icpc* ) 6647 # Intel C++, used to be incompatible with GCC. 6648 # ICC 10 doesn't accept -KPIC any more. 6649 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6650 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6651 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6652 ;; 6653 pgCC* | pgcpp*) 6654 # Portland Group C++ compiler 6655 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6656 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6657 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6658 ;; 6659 cxx*) 6660 # Compaq C++ 6661 # Make sure the PIC flag is empty. It appears that all Alpha 6662 # Linux and Compaq Tru64 Unix objects are PIC. 6663 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6664 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6665 ;; 6666 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 6667 # IBM XL 8.0, 9.0 on PPC and BlueGene 6668 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6669 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6670 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6671 ;; 6672 *) 6673 case `$CC -V 2>&1 | sed 5q` in 6674 *Sun\ C*) 6675 # Sun C++ 5.9 6676 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6677 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6678 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6679 ;; 6680 esac 6681 ;; 6682 esac 6683 ;; 6684 lynxos*) 6685 ;; 6686 m88k*) 6687 ;; 6688 mvs*) 6689 case $cc_basename in 6690 cxx*) 6691 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6692 ;; 6693 *) 6694 ;; 6695 esac 6696 ;; 6697 netbsd*) 6698 ;; 6699 *qnx* | *nto*) 6700 # QNX uses GNU C++, but need to define -shared option too, otherwise 6701 # it will coredump. 6702 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6703 ;; 6704 osf3* | osf4* | osf5*) 6705 case $cc_basename in 6706 KCC*) 6707 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6708 ;; 6709 RCC*) 6710 # Rational C++ 2.4.1 6711 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6712 ;; 6713 cxx*) 6714 # Digital/Compaq C++ 6715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6716 # Make sure the PIC flag is empty. It appears that all Alpha 6717 # Linux and Compaq Tru64 Unix objects are PIC. 6718 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6719 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6720 ;; 6721 *) 6722 ;; 6723 esac 6724 ;; 6725 psos*) 6726 ;; 6727 solaris*) 6728 case $cc_basename in 6729 CC* | sunCC*) 6730 # Sun C++ 4.2, 5.x and Centerline C++ 6731 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6732 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6733 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6734 ;; 6735 gcx*) 6736 # Green Hills C++ Compiler 6737 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6738 ;; 6739 *) 6740 ;; 6741 esac 6742 ;; 6743 sunos4*) 6744 case $cc_basename in 6745 CC*) 6746 # Sun C++ 4.x 6747 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6748 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6749 ;; 6750 lcc*) 6751 # Lucid 6752 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6753 ;; 6754 *) 6755 ;; 6756 esac 6757 ;; 6758 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6759 case $cc_basename in 6760 CC*) 6761 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6762 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6763 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6764 ;; 6765 esac 6766 ;; 6767 tandem*) 6768 case $cc_basename in 6769 NCC*) 6770 # NonStop-UX NCC 3.20 6771 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6772 ;; 6773 *) 6774 ;; 6775 esac 6776 ;; 6777 vxworks*) 6778 ;; 6779 *) 6780 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6781 ;; 6782 esac 6783 fi 6784], 6785[ 6786 if test yes = "$GCC"; then 6787 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6788 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6789 6790 case $host_os in 6791 aix*) 6792 # All AIX code is PIC. 6793 if test ia64 = "$host_cpu"; then 6794 # AIX 5 now supports IA64 processor 6795 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6796 fi 6797 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6798 ;; 6799 6800 amigaos*) 6801 case $host_cpu in 6802 powerpc) 6803 # see comment about AmigaOS4 .so support 6804 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6805 ;; 6806 m68k) 6807 # FIXME: we need at least 68020 code to build shared libraries, but 6808 # adding the '-m68020' flag to GCC prevents building anything better, 6809 # like '-m68040'. 6810 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6811 ;; 6812 esac 6813 ;; 6814 6815 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6816 # PIC is the default for these OSes. 6817 ;; 6818 6819 mingw* | cygwin* | pw32* | os2* | cegcc*) 6820 # This hack is so that the source file can tell whether it is being 6821 # built for inclusion in a dll (and should export symbols for example). 6822 # Although the cygwin gcc ignores -fPIC, still need this for old-style 6823 # (--disable-auto-import) libraries 6824 m4_if([$1], [GCJ], [], 6825 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6826 case $host_os in 6827 os2*) 6828 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 6829 ;; 6830 esac 6831 ;; 6832 6833 darwin* | rhapsody*) 6834 # PIC is the default on this platform 6835 # Common symbols not allowed in MH_DYLIB files 6836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6837 ;; 6838 6839 haiku*) 6840 # PIC is the default for Haiku. 6841 # The "-static" flag exists, but is broken. 6842 _LT_TAGVAR(lt_prog_compiler_static, $1)= 6843 ;; 6844 6845 hpux*) 6846 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6847 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6848 # sets the default TLS model and affects inlining. 6849 case $host_cpu in 6850 hppa*64*) 6851 # +Z the default 6852 ;; 6853 *) 6854 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6855 ;; 6856 esac 6857 ;; 6858 6859 interix[[3-9]]*) 6860 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6861 # Instead, we relocate shared libraries at runtime. 6862 ;; 6863 6864 msdosdjgpp*) 6865 # Just because we use GCC doesn't mean we suddenly get shared libraries 6866 # on systems that don't support them. 6867 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6868 enable_shared=no 6869 ;; 6870 6871 *nto* | *qnx*) 6872 # QNX uses GNU C++, but need to define -shared option too, otherwise 6873 # it will coredump. 6874 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6875 ;; 6876 6877 sysv4*MP*) 6878 if test -d /usr/nec; then 6879 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6880 fi 6881 ;; 6882 6883 *) 6884 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6885 ;; 6886 esac 6887 6888 case $cc_basename in 6889 nvcc*) # Cuda Compiler Driver 2.2 6890 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 6891 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 6892 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 6893 fi 6894 ;; 6895 esac 6896 else 6897 # PORTME Check for flag to pass linker flags through the system compiler. 6898 case $host_os in 6899 aix*) 6900 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6901 if test ia64 = "$host_cpu"; then 6902 # AIX 5 now supports IA64 processor 6903 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6904 else 6905 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6906 fi 6907 ;; 6908 6909 darwin* | rhapsody*) 6910 # PIC is the default on this platform 6911 # Common symbols not allowed in MH_DYLIB files 6912 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6913 case $cc_basename in 6914 nagfor*) 6915 # NAG Fortran compiler 6916 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 6917 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6918 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6919 ;; 6920 esac 6921 ;; 6922 6923 mingw* | cygwin* | pw32* | os2* | cegcc*) 6924 # This hack is so that the source file can tell whether it is being 6925 # built for inclusion in a dll (and should export symbols for example). 6926 m4_if([$1], [GCJ], [], 6927 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6928 case $host_os in 6929 os2*) 6930 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 6931 ;; 6932 esac 6933 ;; 6934 6935 hpux9* | hpux10* | hpux11*) 6936 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6937 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6938 # not for PA HP-UX. 6939 case $host_cpu in 6940 hppa*64*|ia64*) 6941 # +Z the default 6942 ;; 6943 *) 6944 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6945 ;; 6946 esac 6947 # Is there a better lt_prog_compiler_static that works with the bundled CC? 6948 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 6949 ;; 6950 6951 irix5* | irix6* | nonstopux*) 6952 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6953 # PIC (with -KPIC) is the default. 6954 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6955 ;; 6956 6957 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6958 case $cc_basename in 6959 # old Intel for x86_64, which still supported -KPIC. 6960 ecc*) 6961 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6962 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6963 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6964 ;; 6965 # icc used to be incompatible with GCC. 6966 # ICC 10 doesn't accept -KPIC any more. 6967 icc* | ifort*) 6968 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6969 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6970 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6971 ;; 6972 # Lahey Fortran 8.1. 6973 lf95*) 6974 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6975 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 6976 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 6977 ;; 6978 nagfor*) 6979 # NAG Fortran compiler 6980 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 6981 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6982 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6983 ;; 6984 tcc*) 6985 # Fabrice Bellard et al's Tiny C Compiler 6986 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6987 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6988 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6989 ;; 6990 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 6991 # Portland Group compilers (*not* the Pentium gcc compiler, 6992 # which looks to be a dead project) 6993 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6994 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6995 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6996 ;; 6997 ccc*) 6998 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6999 # All Alpha code is PIC. 7000 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7001 ;; 7002 xl* | bgxl* | bgf* | mpixl*) 7003 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 7004 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7005 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7006 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7007 ;; 7008 *) 7009 case `$CC -V 2>&1 | sed 5q` in 7010 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 7011 # Sun Fortran 8.3 passes all unrecognized flags to the linker 7012 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7013 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7014 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 7015 ;; 7016 *Sun\ F* | *Sun*Fortran*) 7017 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7018 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7019 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7020 ;; 7021 *Sun\ C*) 7022 # Sun C 5.9 7023 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7024 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7025 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7026 ;; 7027 *Intel*\ [[CF]]*Compiler*) 7028 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7029 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7030 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7031 ;; 7032 *Portland\ Group*) 7033 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7034 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7035 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7036 ;; 7037 esac 7038 ;; 7039 esac 7040 ;; 7041 7042 newsos6) 7043 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7044 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7045 ;; 7046 7047 *nto* | *qnx*) 7048 # QNX uses GNU C++, but need to define -shared option too, otherwise 7049 # it will coredump. 7050 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7051 ;; 7052 7053 osf3* | osf4* | osf5*) 7054 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7055 # All OSF/1 code is PIC. 7056 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7057 ;; 7058 7059 rdos*) 7060 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7061 ;; 7062 7063 solaris*) 7064 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7065 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7066 case $cc_basename in 7067 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 7068 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 7069 *) 7070 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 7071 esac 7072 ;; 7073 7074 sunos4*) 7075 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7076 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7077 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7078 ;; 7079 7080 sysv4 | sysv4.2uw2* | sysv4.3*) 7081 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7082 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7083 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7084 ;; 7085 7086 sysv4*MP*) 7087 if test -d /usr/nec; then 7088 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 7089 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7090 fi 7091 ;; 7092 7093 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7094 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7095 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7096 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7097 ;; 7098 7099 unicos*) 7100 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7101 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7102 ;; 7103 7104 uts4*) 7105 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7106 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7107 ;; 7108 7109 *) 7110 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7111 ;; 7112 esac 7113 fi 7114]) 7115case $host_os in 7116 # For platforms that do not support PIC, -DPIC is meaningless: 7117 *djgpp*) 7118 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7119 ;; 7120 *) 7121 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 7122 ;; 7123esac 7124 7125AC_CACHE_CHECK([for $compiler option to produce PIC], 7126 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 7127 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 7128_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 7129 7130# 7131# Check to make sure the PIC flag actually works. 7132# 7133if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 7134 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 7135 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 7136 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 7137 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 7138 "" | " "*) ;; 7139 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 7140 esac], 7141 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7142 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 7143fi 7144_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 7145 [Additional compiler flags for building library objects]) 7146 7147_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 7148 [How to pass a linker flag through the compiler]) 7149# 7150# Check to make sure the static flag actually works. 7151# 7152wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 7153_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 7154 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 7155 $lt_tmp_static_flag, 7156 [], 7157 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 7158_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 7159 [Compiler flag to prevent dynamic linking]) 7160])# _LT_COMPILER_PIC 7161 7162 7163# _LT_LINKER_SHLIBS([TAGNAME]) 7164# ---------------------------- 7165# See if the linker supports building shared libraries. 7166m4_defun([_LT_LINKER_SHLIBS], 7167[AC_REQUIRE([LT_PATH_LD])dnl 7168AC_REQUIRE([LT_PATH_NM])dnl 7169m4_require([_LT_PATH_MANIFEST_TOOL])dnl 7170m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7171m4_require([_LT_DECL_EGREP])dnl 7172m4_require([_LT_DECL_SED])dnl 7173m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 7174m4_require([_LT_TAG_COMPILER])dnl 7175AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7176m4_if([$1], [CXX], [ 7177 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7178 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 7179 case $host_os in 7180 aix[[4-9]]*) 7181 # If we're using GNU nm, then we don't want the "-C" option. 7182 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 7183 # Without the "-l" option, or with the "-B" option, AIX nm treats 7184 # weak defined symbols like other global defined symbols, whereas 7185 # GNU nm marks them as "W". 7186 # While the 'weak' keyword is ignored in the Export File, we need 7187 # it in the Import File for the 'aix-soname' feature, so we have 7188 # to replace the "-B" option with "-P" for AIX nm. 7189 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 7190 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 7191 else 7192 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 7193 fi 7194 ;; 7195 pw32*) 7196 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 7197 ;; 7198 cygwin* | mingw* | cegcc*) 7199 case $cc_basename in 7200 cl*) 7201 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 7202 ;; 7203 *) 7204 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 7205 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 7206 ;; 7207 esac 7208 ;; 7209 *) 7210 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7211 ;; 7212 esac 7213], [ 7214 runpath_var= 7215 _LT_TAGVAR(allow_undefined_flag, $1)= 7216 _LT_TAGVAR(always_export_symbols, $1)=no 7217 _LT_TAGVAR(archive_cmds, $1)= 7218 _LT_TAGVAR(archive_expsym_cmds, $1)= 7219 _LT_TAGVAR(compiler_needs_object, $1)=no 7220 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7221 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 7222 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7223 _LT_TAGVAR(hardcode_automatic, $1)=no 7224 _LT_TAGVAR(hardcode_direct, $1)=no 7225 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 7226 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7227 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7228 _LT_TAGVAR(hardcode_minus_L, $1)=no 7229 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7230 _LT_TAGVAR(inherit_rpath, $1)=no 7231 _LT_TAGVAR(link_all_deplibs, $1)=unknown 7232 _LT_TAGVAR(module_cmds, $1)= 7233 _LT_TAGVAR(module_expsym_cmds, $1)= 7234 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 7235 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 7236 _LT_TAGVAR(thread_safe_flag_spec, $1)= 7237 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7238 # include_expsyms should be a list of space-separated symbols to be *always* 7239 # included in the symbol list 7240 _LT_TAGVAR(include_expsyms, $1)= 7241 # exclude_expsyms can be an extended regexp of symbols to exclude 7242 # it will be wrapped by ' (' and ')$', so one must not match beginning or 7243 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 7244 # as well as any symbol that contains 'd'. 7245 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 7246 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 7247 # platforms (ab)use it in PIC code, but their linkers get confused if 7248 # the symbol is explicitly referenced. Since portable code cannot 7249 # rely on this symbol name, it's probably fine to never include it in 7250 # preloaded symbol tables. 7251 # Exclude shared library initialization/finalization symbols. 7252dnl Note also adjust exclude_expsyms for C++ above. 7253 extract_expsyms_cmds= 7254 7255 case $host_os in 7256 cygwin* | mingw* | pw32* | cegcc*) 7257 # FIXME: the MSVC++ port hasn't been tested in a loooong time 7258 # When not using gcc, we currently assume that we are using 7259 # Microsoft Visual C++. 7260 if test yes != "$GCC"; then 7261 with_gnu_ld=no 7262 fi 7263 ;; 7264 interix*) 7265 # we just hope/assume this is gcc and not c89 (= MSVC++) 7266 with_gnu_ld=yes 7267 ;; 7268 openbsd* | bitrig*) 7269 with_gnu_ld=no 7270 ;; 7271 esac 7272 7273 _LT_TAGVAR(ld_shlibs, $1)=yes 7274 7275 # On some targets, GNU ld is compatible enough with the native linker 7276 # that we're better off using the native interface for both. 7277 lt_use_gnu_ld_interface=no 7278 if test yes = "$with_gnu_ld"; then 7279 case $host_os in 7280 aix*) 7281 # The AIX port of GNU ld has always aspired to compatibility 7282 # with the native linker. However, as the warning in the GNU ld 7283 # block says, versions before 2.19.5* couldn't really create working 7284 # shared libraries, regardless of the interface used. 7285 case `$LD -v 2>&1` in 7286 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 7287 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 7288 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 7289 *) 7290 lt_use_gnu_ld_interface=yes 7291 ;; 7292 esac 7293 ;; 7294 *) 7295 lt_use_gnu_ld_interface=yes 7296 ;; 7297 esac 7298 fi 7299 7300 if test yes = "$lt_use_gnu_ld_interface"; then 7301 # If archive_cmds runs LD, not CC, wlarc should be empty 7302 wlarc='$wl' 7303 7304 # Set some defaults for GNU ld with shared library support. These 7305 # are reset later if shared libraries are not supported. Putting them 7306 # here allows them to be overridden if necessary. 7307 runpath_var=LD_RUN_PATH 7308 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7309 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7310 # ancient GNU ld didn't support --whole-archive et. al. 7311 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 7312 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7313 else 7314 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7315 fi 7316 supports_anon_versioning=no 7317 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 7318 *GNU\ gold*) supports_anon_versioning=yes ;; 7319 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 7320 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 7321 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 7322 *\ 2.11.*) ;; # other 2.11 versions 7323 *) supports_anon_versioning=yes ;; 7324 esac 7325 7326 # See if GNU ld supports shared libraries. 7327 case $host_os in 7328 aix[[3-9]]*) 7329 # On AIX/PPC, the GNU linker is very broken 7330 if test ia64 != "$host_cpu"; then 7331 _LT_TAGVAR(ld_shlibs, $1)=no 7332 cat <<_LT_EOF 1>&2 7333 7334*** Warning: the GNU linker, at least up to release 2.19, is reported 7335*** to be unable to reliably create shared libraries on AIX. 7336*** Therefore, libtool is disabling shared libraries support. If you 7337*** really care for shared libraries, you may want to install binutils 7338*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 7339*** You will then need to restart the configuration process. 7340 7341_LT_EOF 7342 fi 7343 ;; 7344 7345 amigaos*) 7346 case $host_cpu in 7347 powerpc) 7348 # see comment about AmigaOS4 .so support 7349 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7350 _LT_TAGVAR(archive_expsym_cmds, $1)='' 7351 ;; 7352 m68k) 7353 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 7354 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7355 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7356 ;; 7357 esac 7358 ;; 7359 7360 beos*) 7361 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7362 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7363 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7364 # support --undefined. This deserves some investigation. FIXME 7365 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7366 else 7367 _LT_TAGVAR(ld_shlibs, $1)=no 7368 fi 7369 ;; 7370 7371 cygwin* | mingw* | pw32* | cegcc*) 7372 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7373 # as there is no search path for DLLs. 7374 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7375 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 7376 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7377 _LT_TAGVAR(always_export_symbols, $1)=no 7378 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7379 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 7380 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 7381 7382 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7383 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 7384 # If the export-symbols file already is a .def file, use it as 7385 # is; otherwise, prepend EXPORTS... 7386 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 7387 cp $export_symbols $output_objdir/$soname.def; 7388 else 7389 echo EXPORTS > $output_objdir/$soname.def; 7390 cat $export_symbols >> $output_objdir/$soname.def; 7391 fi~ 7392 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 7393 else 7394 _LT_TAGVAR(ld_shlibs, $1)=no 7395 fi 7396 ;; 7397 7398 haiku*) 7399 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7400 _LT_TAGVAR(link_all_deplibs, $1)=yes 7401 ;; 7402 7403 os2*) 7404 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7405 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7406 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7407 shrext_cmds=.dll 7408 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 7409 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 7410 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 7411 $ECHO EXPORTS >> $output_objdir/$libname.def~ 7412 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 7413 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 7414 emximp -o $lib $output_objdir/$libname.def' 7415 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 7416 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 7417 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 7418 $ECHO EXPORTS >> $output_objdir/$libname.def~ 7419 prefix_cmds="$SED"~ 7420 if test EXPORTS = "`$SED 1q $export_symbols`"; then 7421 prefix_cmds="$prefix_cmds -e 1d"; 7422 fi~ 7423 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 7424 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 7425 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 7426 emximp -o $lib $output_objdir/$libname.def' 7427 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 7428 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7429 ;; 7430 7431 interix[[3-9]]*) 7432 _LT_TAGVAR(hardcode_direct, $1)=no 7433 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7434 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7435 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7436 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7437 # Instead, shared libraries are loaded at an image base (0x10000000 by 7438 # default) and relocated if they conflict, which is a slow very memory 7439 # consuming and fragmenting process. To avoid this, we pick a random, 7440 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7441 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7442 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 7443 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 7444 ;; 7445 7446 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 7447 tmp_diet=no 7448 if test linux-dietlibc = "$host_os"; then 7449 case $cc_basename in 7450 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 7451 esac 7452 fi 7453 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 7454 && test no = "$tmp_diet" 7455 then 7456 tmp_addflag=' $pic_flag' 7457 tmp_sharedflag='-shared' 7458 case $cc_basename,$host_cpu in 7459 pgcc*) # Portland Group C compiler 7460 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 7461 tmp_addflag=' $pic_flag' 7462 ;; 7463 pgf77* | pgf90* | pgf95* | pgfortran*) 7464 # Portland Group f77 and f90 compilers 7465 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 7466 tmp_addflag=' $pic_flag -Mnomain' ;; 7467 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 7468 tmp_addflag=' -i_dynamic' ;; 7469 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 7470 tmp_addflag=' -i_dynamic -nofor_main' ;; 7471 ifc* | ifort*) # Intel Fortran compiler 7472 tmp_addflag=' -nofor_main' ;; 7473 lf95*) # Lahey Fortran 8.1 7474 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7475 tmp_sharedflag='--shared' ;; 7476 nagfor*) # NAGFOR 5.3 7477 tmp_sharedflag='-Wl,-shared' ;; 7478 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 7479 tmp_sharedflag='-qmkshrobj' 7480 tmp_addflag= ;; 7481 nvcc*) # Cuda Compiler Driver 2.2 7482 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 7483 _LT_TAGVAR(compiler_needs_object, $1)=yes 7484 ;; 7485 esac 7486 case `$CC -V 2>&1 | sed 5q` in 7487 *Sun\ C*) # Sun C 5.9 7488 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 7489 _LT_TAGVAR(compiler_needs_object, $1)=yes 7490 tmp_sharedflag='-G' ;; 7491 *Sun\ F*) # Sun Fortran 8.3 7492 tmp_sharedflag='-G' ;; 7493 esac 7494 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7495 7496 if test yes = "$supports_anon_versioning"; then 7497 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7498 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7499 echo "local: *; };" >> $output_objdir/$libname.ver~ 7500 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7501 fi 7502 7503 case $cc_basename in 7504 tcc*) 7505 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 7506 ;; 7507 xlf* | bgf* | bgxlf* | mpixlf*) 7508 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 7509 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 7510 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7511 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 7512 if test yes = "$supports_anon_versioning"; then 7513 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7514 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7515 echo "local: *; };" >> $output_objdir/$libname.ver~ 7516 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 7517 fi 7518 ;; 7519 esac 7520 else 7521 _LT_TAGVAR(ld_shlibs, $1)=no 7522 fi 7523 ;; 7524 7525 netbsd*) 7526 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7527 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 7528 wlarc= 7529 else 7530 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7531 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 7532 fi 7533 ;; 7534 7535 solaris*) 7536 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 7537 _LT_TAGVAR(ld_shlibs, $1)=no 7538 cat <<_LT_EOF 1>&2 7539 7540*** Warning: The releases 2.8.* of the GNU linker cannot reliably 7541*** create shared libraries on Solaris systems. Therefore, libtool 7542*** is disabling shared libraries support. We urge you to upgrade GNU 7543*** binutils to release 2.9.1 or newer. Another option is to modify 7544*** your PATH or compiler configuration so that the native linker is 7545*** used, and then restart. 7546 7547_LT_EOF 7548 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7549 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7550 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 7551 else 7552 _LT_TAGVAR(ld_shlibs, $1)=no 7553 fi 7554 ;; 7555 7556 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 7557 case `$LD -v 2>&1` in 7558 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 7559 _LT_TAGVAR(ld_shlibs, $1)=no 7560 cat <<_LT_EOF 1>&2 7561 7562*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 7563*** reliably create shared libraries on SCO systems. Therefore, libtool 7564*** is disabling shared libraries support. We urge you to upgrade GNU 7565*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 7566*** your PATH or compiler configuration so that the native linker is 7567*** used, and then restart. 7568 7569_LT_EOF 7570 ;; 7571 *) 7572 # For security reasons, it is highly recommended that you always 7573 # use absolute paths for naming shared libraries, and exclude the 7574 # DT_RUNPATH tag from executables and libraries. But doing so 7575 # requires that you compile everything twice, which is a pain. 7576 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7577 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7578 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7579 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 7580 else 7581 _LT_TAGVAR(ld_shlibs, $1)=no 7582 fi 7583 ;; 7584 esac 7585 ;; 7586 7587 sunos4*) 7588 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7589 wlarc= 7590 _LT_TAGVAR(hardcode_direct, $1)=yes 7591 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7592 ;; 7593 7594 *) 7595 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7596 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7597 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 7598 else 7599 _LT_TAGVAR(ld_shlibs, $1)=no 7600 fi 7601 ;; 7602 esac 7603 7604 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 7605 runpath_var= 7606 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7607 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 7608 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7609 fi 7610 else 7611 # PORTME fill in a description of your system's linker (not GNU ld) 7612 case $host_os in 7613 aix3*) 7614 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7615 _LT_TAGVAR(always_export_symbols, $1)=yes 7616 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' 7617 # Note: this linker hardcodes the directories in LIBPATH if there 7618 # are no directories specified by -L. 7619 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7620 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 7621 # Neither direct hardcoding nor static linking is supported with a 7622 # broken collect2. 7623 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7624 fi 7625 ;; 7626 7627 aix[[4-9]]*) 7628 if test ia64 = "$host_cpu"; then 7629 # On IA64, the linker does run time linking by default, so we don't 7630 # have to do anything special. 7631 aix_use_runtimelinking=no 7632 exp_sym_flag='-Bexport' 7633 no_entry_flag= 7634 else 7635 # If we're using GNU nm, then we don't want the "-C" option. 7636 # -C means demangle to GNU nm, but means don't demangle to AIX nm. 7637 # Without the "-l" option, or with the "-B" option, AIX nm treats 7638 # weak defined symbols like other global defined symbols, whereas 7639 # GNU nm marks them as "W". 7640 # While the 'weak' keyword is ignored in the Export File, we need 7641 # it in the Import File for the 'aix-soname' feature, so we have 7642 # to replace the "-B" option with "-P" for AIX nm. 7643 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 7644 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 7645 else 7646 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 7647 fi 7648 aix_use_runtimelinking=no 7649 7650 # Test if we are trying to use run time linking or normal 7651 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7652 # have runtime linking enabled, and use it for executables. 7653 # For shared libraries, we enable/disable runtime linking 7654 # depending on the kind of the shared library created - 7655 # when "with_aix_soname,aix_use_runtimelinking" is: 7656 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 7657 # "aix,yes" lib.so shared, rtl:yes, for executables 7658 # lib.a static archive 7659 # "both,no" lib.so.V(shr.o) shared, rtl:yes 7660 # lib.a(lib.so.V) shared, rtl:no, for executables 7661 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 7662 # lib.a(lib.so.V) shared, rtl:no 7663 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 7664 # lib.a static archive 7665 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7666 for ld_flag in $LDFLAGS; do 7667 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 7668 aix_use_runtimelinking=yes 7669 break 7670 fi 7671 done 7672 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 7673 # With aix-soname=svr4, we create the lib.so.V shared archives only, 7674 # so we don't have lib.a shared libs to link our executables. 7675 # We have to force runtime linking in this case. 7676 aix_use_runtimelinking=yes 7677 LDFLAGS="$LDFLAGS -Wl,-brtl" 7678 fi 7679 ;; 7680 esac 7681 7682 exp_sym_flag='-bexport' 7683 no_entry_flag='-bnoentry' 7684 fi 7685 7686 # When large executables or shared objects are built, AIX ld can 7687 # have problems creating the table of contents. If linking a library 7688 # or program results in "error TOC overflow" add -mminimal-toc to 7689 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7690 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7691 7692 _LT_TAGVAR(archive_cmds, $1)='' 7693 _LT_TAGVAR(hardcode_direct, $1)=yes 7694 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7695 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7696 _LT_TAGVAR(link_all_deplibs, $1)=yes 7697 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 7698 case $with_aix_soname,$aix_use_runtimelinking in 7699 aix,*) ;; # traditional, no import file 7700 svr4,* | *,yes) # use import file 7701 # The Import File defines what to hardcode. 7702 _LT_TAGVAR(hardcode_direct, $1)=no 7703 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 7704 ;; 7705 esac 7706 7707 if test yes = "$GCC"; then 7708 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7709 # We only want to do this on AIX 4.2 and lower, the check 7710 # below for broken collect2 doesn't work under 4.3+ 7711 collect2name=`$CC -print-prog-name=collect2` 7712 if test -f "$collect2name" && 7713 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7714 then 7715 # We have reworked collect2 7716 : 7717 else 7718 # We have old collect2 7719 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7720 # It fails to find uninstalled libraries when the uninstalled 7721 # path is not listed in the libpath. Setting hardcode_minus_L 7722 # to unsupported forces relinking 7723 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7724 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7725 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7726 fi 7727 ;; 7728 esac 7729 shared_flag='-shared' 7730 if test yes = "$aix_use_runtimelinking"; then 7731 shared_flag="$shared_flag "'$wl-G' 7732 fi 7733 # Need to ensure runtime linking is disabled for the traditional 7734 # shared library, or the linker may eventually find shared libraries 7735 # /with/ Import File - we do not want to mix them. 7736 shared_flag_aix='-shared' 7737 shared_flag_svr4='-shared $wl-G' 7738 else 7739 # not using gcc 7740 if test ia64 = "$host_cpu"; then 7741 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7742 # chokes on -Wl,-G. The following line is correct: 7743 shared_flag='-G' 7744 else 7745 if test yes = "$aix_use_runtimelinking"; then 7746 shared_flag='$wl-G' 7747 else 7748 shared_flag='$wl-bM:SRE' 7749 fi 7750 shared_flag_aix='$wl-bM:SRE' 7751 shared_flag_svr4='$wl-G' 7752 fi 7753 fi 7754 7755 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 7756 # It seems that -bexpall does not export symbols beginning with 7757 # underscore (_), so it is better to generate a list of symbols to export. 7758 _LT_TAGVAR(always_export_symbols, $1)=yes 7759 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 7760 # Warning - without using the other runtime loading flags (-brtl), 7761 # -berok will link without error, but may produce a broken library. 7762 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7763 # Determine the default libpath from the value encoded in an 7764 # empty executable. 7765 _LT_SYS_MODULE_PATH_AIX([$1]) 7766 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 7767 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 7768 else 7769 if test ia64 = "$host_cpu"; then 7770 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 7771 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7772 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 7773 else 7774 # Determine the default libpath from the value encoded in an 7775 # empty executable. 7776 _LT_SYS_MODULE_PATH_AIX([$1]) 7777 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 7778 # Warning - without using the other run time loading flags, 7779 # -berok will link without error, but may produce a broken library. 7780 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 7781 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 7782 if test yes = "$with_gnu_ld"; then 7783 # We only use this code for GNU lds that support --whole-archive. 7784 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7785 else 7786 # Exported symbols can be pulled into shared objects from archives 7787 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7788 fi 7789 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7790 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 7791 # -brtl affects multiple linker settings, -berok does not and is overridden later 7792 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 7793 if test svr4 != "$with_aix_soname"; then 7794 # This is similar to how AIX traditionally builds its shared libraries. 7795 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 7796 fi 7797 if test aix != "$with_aix_soname"; then 7798 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 7799 else 7800 # used by -dlpreopen to get the symbols 7801 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 7802 fi 7803 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 7804 fi 7805 fi 7806 ;; 7807 7808 amigaos*) 7809 case $host_cpu in 7810 powerpc) 7811 # see comment about AmigaOS4 .so support 7812 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7813 _LT_TAGVAR(archive_expsym_cmds, $1)='' 7814 ;; 7815 m68k) 7816 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 7817 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7818 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7819 ;; 7820 esac 7821 ;; 7822 7823 bsdi[[45]]*) 7824 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 7825 ;; 7826 7827 cygwin* | mingw* | pw32* | cegcc*) 7828 # When not using gcc, we currently assume that we are using 7829 # Microsoft Visual C++. 7830 # hardcode_libdir_flag_spec is actually meaningless, as there is 7831 # no search path for DLLs. 7832 case $cc_basename in 7833 cl*) 7834 # Native MSVC 7835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7836 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7837 _LT_TAGVAR(always_export_symbols, $1)=yes 7838 _LT_TAGVAR(file_list_spec, $1)='@' 7839 # Tell ltmain to make .lib files, not .a files. 7840 libext=lib 7841 # Tell ltmain to make .dll files, not .so files. 7842 shrext_cmds=.dll 7843 # FIXME: Setting linknames here is a bad hack. 7844 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 7845 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 7846 cp "$export_symbols" "$output_objdir/$soname.def"; 7847 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 7848 else 7849 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 7850 fi~ 7851 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7852 linknames=' 7853 # The linker will not automatically build a static lib if we build a DLL. 7854 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7855 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7856 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 7857 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 7858 # Don't use ranlib 7859 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7860 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7861 lt_tool_outputfile="@TOOL_OUTPUT@"~ 7862 case $lt_outputfile in 7863 *.exe|*.EXE) ;; 7864 *) 7865 lt_outputfile=$lt_outputfile.exe 7866 lt_tool_outputfile=$lt_tool_outputfile.exe 7867 ;; 7868 esac~ 7869 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 7870 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7871 $RM "$lt_outputfile.manifest"; 7872 fi' 7873 ;; 7874 *) 7875 # Assume MSVC wrapper 7876 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7877 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7878 # Tell ltmain to make .lib files, not .a files. 7879 libext=lib 7880 # Tell ltmain to make .dll files, not .so files. 7881 shrext_cmds=.dll 7882 # FIXME: Setting linknames here is a bad hack. 7883 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 7884 # The linker will automatically build a .lib file if we build a DLL. 7885 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7886 # FIXME: Should let the user specify the lib program. 7887 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 7888 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7889 ;; 7890 esac 7891 ;; 7892 7893 darwin* | rhapsody*) 7894 _LT_DARWIN_LINKER_FEATURES($1) 7895 ;; 7896 7897 dgux*) 7898 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7899 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7900 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7901 ;; 7902 7903 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7904 # support. Future versions do this automatically, but an explicit c++rt0.o 7905 # does not break anything, and helps significantly (at the cost of a little 7906 # extra space). 7907 freebsd2.2*) 7908 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7910 _LT_TAGVAR(hardcode_direct, $1)=yes 7911 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7912 ;; 7913 7914 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7915 freebsd2.*) 7916 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7917 _LT_TAGVAR(hardcode_direct, $1)=yes 7918 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7919 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7920 ;; 7921 7922 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7923 freebsd* | dragonfly*) 7924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7925 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7926 _LT_TAGVAR(hardcode_direct, $1)=yes 7927 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7928 ;; 7929 7930 hpux9*) 7931 if test yes = "$GCC"; then 7932 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 7933 else 7934 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 7935 fi 7936 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 7937 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7938 _LT_TAGVAR(hardcode_direct, $1)=yes 7939 7940 # hardcode_minus_L: Not really in the search PATH, 7941 # but as the default location of the library. 7942 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7943 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7944 ;; 7945 7946 hpux10*) 7947 if test yes,no = "$GCC,$with_gnu_ld"; then 7948 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7949 else 7950 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7951 fi 7952 if test no = "$with_gnu_ld"; then 7953 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 7954 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7955 _LT_TAGVAR(hardcode_direct, $1)=yes 7956 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7957 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7958 # hardcode_minus_L: Not really in the search PATH, 7959 # but as the default location of the library. 7960 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7961 fi 7962 ;; 7963 7964 hpux11*) 7965 if test yes,no = "$GCC,$with_gnu_ld"; then 7966 case $host_cpu in 7967 hppa*64*) 7968 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 7969 ;; 7970 ia64*) 7971 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7972 ;; 7973 *) 7974 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7975 ;; 7976 esac 7977 else 7978 case $host_cpu in 7979 hppa*64*) 7980 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 7981 ;; 7982 ia64*) 7983 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7984 ;; 7985 *) 7986 m4_if($1, [], [ 7987 # Older versions of the 11.00 compiler do not understand -b yet 7988 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 7989 _LT_LINKER_OPTION([if $CC understands -b], 7990 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 7991 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 7992 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 7993 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 7994 ;; 7995 esac 7996 fi 7997 if test no = "$with_gnu_ld"; then 7998 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 7999 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8000 8001 case $host_cpu in 8002 hppa*64*|ia64*) 8003 _LT_TAGVAR(hardcode_direct, $1)=no 8004 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8005 ;; 8006 *) 8007 _LT_TAGVAR(hardcode_direct, $1)=yes 8008 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8009 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8010 8011 # hardcode_minus_L: Not really in the search PATH, 8012 # but as the default location of the library. 8013 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8014 ;; 8015 esac 8016 fi 8017 ;; 8018 8019 irix5* | irix6* | nonstopux*) 8020 if test yes = "$GCC"; then 8021 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 8022 # Try to use the -exported_symbol ld option, if it does not 8023 # work, assume that -exports_file does not work either and 8024 # implicitly export all symbols. 8025 # This should be the same for all languages, so no per-tag cache variable. 8026 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 8027 [lt_cv_irix_exported_symbol], 8028 [save_LDFLAGS=$LDFLAGS 8029 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 8030 AC_LINK_IFELSE( 8031 [AC_LANG_SOURCE( 8032 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 8033 [C++], [[int foo (void) { return 0; }]], 8034 [Fortran 77], [[ 8035 subroutine foo 8036 end]], 8037 [Fortran], [[ 8038 subroutine foo 8039 end]])])], 8040 [lt_cv_irix_exported_symbol=yes], 8041 [lt_cv_irix_exported_symbol=no]) 8042 LDFLAGS=$save_LDFLAGS]) 8043 if test yes = "$lt_cv_irix_exported_symbol"; then 8044 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' 8045 fi 8046 else 8047 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 8048 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' 8049 fi 8050 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 8051 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8052 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8053 _LT_TAGVAR(inherit_rpath, $1)=yes 8054 _LT_TAGVAR(link_all_deplibs, $1)=yes 8055 ;; 8056 8057 linux*) 8058 case $cc_basename in 8059 tcc*) 8060 # Fabrice Bellard et al's Tiny C Compiler 8061 _LT_TAGVAR(ld_shlibs, $1)=yes 8062 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 8063 ;; 8064 esac 8065 ;; 8066 8067 netbsd*) 8068 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8069 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 8070 else 8071 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 8072 fi 8073 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8074 _LT_TAGVAR(hardcode_direct, $1)=yes 8075 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8076 ;; 8077 8078 newsos6) 8079 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8080 _LT_TAGVAR(hardcode_direct, $1)=yes 8081 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8082 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8083 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8084 ;; 8085 8086 *nto* | *qnx*) 8087 ;; 8088 8089 openbsd* | bitrig*) 8090 if test -f /usr/libexec/ld.so; then 8091 _LT_TAGVAR(hardcode_direct, $1)=yes 8092 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8093 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8094 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 8095 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 8096 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 8097 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8098 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8099 else 8100 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 8101 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8102 fi 8103 else 8104 _LT_TAGVAR(ld_shlibs, $1)=no 8105 fi 8106 ;; 8107 8108 os2*) 8109 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8110 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8111 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8112 shrext_cmds=.dll 8113 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8114 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8115 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8116 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8117 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8118 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8119 emximp -o $lib $output_objdir/$libname.def' 8120 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8121 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8122 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8123 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8124 prefix_cmds="$SED"~ 8125 if test EXPORTS = "`$SED 1q $export_symbols`"; then 8126 prefix_cmds="$prefix_cmds -e 1d"; 8127 fi~ 8128 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8129 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8130 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8131 emximp -o $lib $output_objdir/$libname.def' 8132 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8133 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8134 ;; 8135 8136 osf3*) 8137 if test yes = "$GCC"; then 8138 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 8139 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 8140 else 8141 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8142 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 8143 fi 8144 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 8145 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8146 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8147 ;; 8148 8149 osf4* | osf5*) # as osf3* with the addition of -msym flag 8150 if test yes = "$GCC"; then 8151 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 8152 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 8153 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8154 else 8155 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8156 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 8157 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ 8158 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' 8159 8160 # Both c and cxx compiler support -rpath directly 8161 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8162 fi 8163 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 8164 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8165 ;; 8166 8167 solaris*) 8168 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 8169 if test yes = "$GCC"; then 8170 wlarc='$wl' 8171 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 8172 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8173 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 8174 else 8175 case `$CC -V 2>&1` in 8176 *"Compilers 5.0"*) 8177 wlarc='' 8178 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 8179 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8180 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 8181 ;; 8182 *) 8183 wlarc='$wl' 8184 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 8185 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8186 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 8187 ;; 8188 esac 8189 fi 8190 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8191 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8192 case $host_os in 8193 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8194 *) 8195 # The compiler driver will combine and reorder linker options, 8196 # but understands '-z linker_flag'. GCC discards it without '$wl', 8197 # but is careful enough not to reorder. 8198 # Supported since Solaris 2.6 (maybe 2.5.1?) 8199 if test yes = "$GCC"; then 8200 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 8201 else 8202 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 8203 fi 8204 ;; 8205 esac 8206 _LT_TAGVAR(link_all_deplibs, $1)=yes 8207 ;; 8208 8209 sunos4*) 8210 if test sequent = "$host_vendor"; then 8211 # Use $CC to link under sequent, because it throws in some extra .o 8212 # files that make .init and .fini sections work. 8213 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 8214 else 8215 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 8216 fi 8217 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8218 _LT_TAGVAR(hardcode_direct, $1)=yes 8219 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8220 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8221 ;; 8222 8223 sysv4) 8224 case $host_vendor in 8225 sni) 8226 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8227 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 8228 ;; 8229 siemens) 8230 ## LD is ld it makes a PLAMLIB 8231 ## CC just makes a GrossModule. 8232 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 8233 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 8234 _LT_TAGVAR(hardcode_direct, $1)=no 8235 ;; 8236 motorola) 8237 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8238 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 8239 ;; 8240 esac 8241 runpath_var='LD_RUN_PATH' 8242 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8243 ;; 8244 8245 sysv4.3*) 8246 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8247 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8248 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 8249 ;; 8250 8251 sysv4*MP*) 8252 if test -d /usr/nec; then 8253 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8254 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8255 runpath_var=LD_RUN_PATH 8256 hardcode_runpath_var=yes 8257 _LT_TAGVAR(ld_shlibs, $1)=yes 8258 fi 8259 ;; 8260 8261 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 8262 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 8263 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8264 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8265 runpath_var='LD_RUN_PATH' 8266 8267 if test yes = "$GCC"; then 8268 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8269 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8270 else 8271 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8272 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8273 fi 8274 ;; 8275 8276 sysv5* | sco3.2v5* | sco5v6*) 8277 # Note: We CANNOT use -z defs as we might desire, because we do not 8278 # link with -lc, and that would cause any symbols used from libc to 8279 # always be unresolved, which means just about no library would 8280 # ever link correctly. If we're not using GNU ld we use -z text 8281 # though, which does catch some bad symbols but isn't as heavy-handed 8282 # as -z defs. 8283 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 8284 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 8285 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8286 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8287 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 8288 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8289 _LT_TAGVAR(link_all_deplibs, $1)=yes 8290 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 8291 runpath_var='LD_RUN_PATH' 8292 8293 if test yes = "$GCC"; then 8294 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8295 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8296 else 8297 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8298 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8299 fi 8300 ;; 8301 8302 uts4*) 8303 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8304 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8305 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8306 ;; 8307 8308 *) 8309 _LT_TAGVAR(ld_shlibs, $1)=no 8310 ;; 8311 esac 8312 8313 if test sni = "$host_vendor"; then 8314 case $host in 8315 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 8316 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 8317 ;; 8318 esac 8319 fi 8320 fi 8321]) 8322AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8323test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 8324 8325_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 8326 8327_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 8328_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 8329_LT_DECL([], [extract_expsyms_cmds], [2], 8330 [The commands to extract the exported symbol list from a shared archive]) 8331 8332# 8333# Do we need to explicitly link libc? 8334# 8335case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 8336x|xyes) 8337 # Assume -lc should be added 8338 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8339 8340 if test yes,yes = "$GCC,$enable_shared"; then 8341 case $_LT_TAGVAR(archive_cmds, $1) in 8342 *'~'*) 8343 # FIXME: we may have to deal with multi-command sequences. 8344 ;; 8345 '$CC '*) 8346 # Test whether the compiler implicitly links with -lc since on some 8347 # systems, -lgcc has to come before -lc. If gcc already passes -lc 8348 # to ld, don't add -lc before -lgcc. 8349 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 8350 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 8351 [$RM conftest* 8352 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 8353 8354 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 8355 soname=conftest 8356 lib=conftest 8357 libobjs=conftest.$ac_objext 8358 deplibs= 8359 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 8360 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 8361 compiler_flags=-v 8362 linker_flags=-v 8363 verstring= 8364 output_objdir=. 8365 libname=conftest 8366 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 8367 _LT_TAGVAR(allow_undefined_flag, $1)= 8368 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 8369 then 8370 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8371 else 8372 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8373 fi 8374 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 8375 else 8376 cat conftest.err 1>&5 8377 fi 8378 $RM conftest* 8379 ]) 8380 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 8381 ;; 8382 esac 8383 fi 8384 ;; 8385esac 8386 8387_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 8388 [Whether or not to add -lc for building shared libraries]) 8389_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 8390 [enable_shared_with_static_runtimes], [0], 8391 [Whether or not to disallow shared libs when runtime libs are static]) 8392_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 8393 [Compiler flag to allow reflexive dlopens]) 8394_LT_TAGDECL([], [whole_archive_flag_spec], [1], 8395 [Compiler flag to generate shared objects directly from archives]) 8396_LT_TAGDECL([], [compiler_needs_object], [1], 8397 [Whether the compiler copes with passing no objects directly]) 8398_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 8399 [Create an old-style archive from a shared archive]) 8400_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 8401 [Create a temporary old-style archive to link instead of a shared archive]) 8402_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 8403_LT_TAGDECL([], [archive_expsym_cmds], [2]) 8404_LT_TAGDECL([], [module_cmds], [2], 8405 [Commands used to build a loadable module if different from building 8406 a shared archive.]) 8407_LT_TAGDECL([], [module_expsym_cmds], [2]) 8408_LT_TAGDECL([], [with_gnu_ld], [1], 8409 [Whether we are building with GNU ld or not]) 8410_LT_TAGDECL([], [allow_undefined_flag], [1], 8411 [Flag that allows shared libraries with undefined symbols to be built]) 8412_LT_TAGDECL([], [no_undefined_flag], [1], 8413 [Flag that enforces no undefined symbols]) 8414_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 8415 [Flag to hardcode $libdir into a binary during linking. 8416 This must work even if $libdir does not exist]) 8417_LT_TAGDECL([], [hardcode_libdir_separator], [1], 8418 [Whether we need a single "-rpath" flag with a separated argument]) 8419_LT_TAGDECL([], [hardcode_direct], [0], 8420 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 8421 DIR into the resulting binary]) 8422_LT_TAGDECL([], [hardcode_direct_absolute], [0], 8423 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 8424 DIR into the resulting binary and the resulting library dependency is 8425 "absolute", i.e impossible to change by setting $shlibpath_var if the 8426 library is relocated]) 8427_LT_TAGDECL([], [hardcode_minus_L], [0], 8428 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 8429 into the resulting binary]) 8430_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 8431 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 8432 into the resulting binary]) 8433_LT_TAGDECL([], [hardcode_automatic], [0], 8434 [Set to "yes" if building a shared library automatically hardcodes DIR 8435 into the library and all subsequent libraries and executables linked 8436 against it]) 8437_LT_TAGDECL([], [inherit_rpath], [0], 8438 [Set to yes if linker adds runtime paths of dependent libraries 8439 to runtime path list]) 8440_LT_TAGDECL([], [link_all_deplibs], [0], 8441 [Whether libtool must link a program against all its dependency libraries]) 8442_LT_TAGDECL([], [always_export_symbols], [0], 8443 [Set to "yes" if exported symbols are required]) 8444_LT_TAGDECL([], [export_symbols_cmds], [2], 8445 [The commands to list exported symbols]) 8446_LT_TAGDECL([], [exclude_expsyms], [1], 8447 [Symbols that should not be listed in the preloaded symbols]) 8448_LT_TAGDECL([], [include_expsyms], [1], 8449 [Symbols that must always be exported]) 8450_LT_TAGDECL([], [prelink_cmds], [2], 8451 [Commands necessary for linking programs (against libraries) with templates]) 8452_LT_TAGDECL([], [postlink_cmds], [2], 8453 [Commands necessary for finishing linking programs]) 8454_LT_TAGDECL([], [file_list_spec], [1], 8455 [Specify filename containing input files]) 8456dnl FIXME: Not yet implemented 8457dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 8458dnl [Compiler flag to generate thread safe objects]) 8459])# _LT_LINKER_SHLIBS 8460 8461 8462# _LT_LANG_C_CONFIG([TAG]) 8463# ------------------------ 8464# Ensure that the configuration variables for a C compiler are suitably 8465# defined. These variables are subsequently used by _LT_CONFIG to write 8466# the compiler configuration to 'libtool'. 8467m4_defun([_LT_LANG_C_CONFIG], 8468[m4_require([_LT_DECL_EGREP])dnl 8469lt_save_CC=$CC 8470AC_LANG_PUSH(C) 8471 8472# Source file extension for C test sources. 8473ac_ext=c 8474 8475# Object file extension for compiled C test sources. 8476objext=o 8477_LT_TAGVAR(objext, $1)=$objext 8478 8479# Code to be used in simple compile tests 8480lt_simple_compile_test_code="int some_variable = 0;" 8481 8482# Code to be used in simple link tests 8483lt_simple_link_test_code='int main(){return(0);}' 8484 8485_LT_TAG_COMPILER 8486# Save the default compiler, since it gets overwritten when the other 8487# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 8488compiler_DEFAULT=$CC 8489 8490# save warnings/boilerplate of simple test code 8491_LT_COMPILER_BOILERPLATE 8492_LT_LINKER_BOILERPLATE 8493 8494if test -n "$compiler"; then 8495 _LT_COMPILER_NO_RTTI($1) 8496 _LT_COMPILER_PIC($1) 8497 _LT_COMPILER_C_O($1) 8498 _LT_COMPILER_FILE_LOCKS($1) 8499 _LT_LINKER_SHLIBS($1) 8500 _LT_SYS_DYNAMIC_LINKER($1) 8501 _LT_LINKER_HARDCODE_LIBPATH($1) 8502 LT_SYS_DLOPEN_SELF 8503 _LT_CMD_STRIPLIB 8504 8505 # Report what library types will actually be built 8506 AC_MSG_CHECKING([if libtool supports shared libraries]) 8507 AC_MSG_RESULT([$can_build_shared]) 8508 8509 AC_MSG_CHECKING([whether to build shared libraries]) 8510 test no = "$can_build_shared" && enable_shared=no 8511 8512 # On AIX, shared libraries and static libraries use the same namespace, and 8513 # are all built from PIC. 8514 case $host_os in 8515 aix3*) 8516 test yes = "$enable_shared" && enable_static=no 8517 if test -n "$RANLIB"; then 8518 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8519 postinstall_cmds='$RANLIB $lib' 8520 fi 8521 ;; 8522 8523 aix[[4-9]]*) 8524 if test ia64 != "$host_cpu"; then 8525 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 8526 yes,aix,yes) ;; # shared object as lib.so file only 8527 yes,svr4,*) ;; # shared object as lib.so archive member only 8528 yes,*) enable_static=no ;; # shared object in lib.a archive as well 8529 esac 8530 fi 8531 ;; 8532 esac 8533 AC_MSG_RESULT([$enable_shared]) 8534 8535 AC_MSG_CHECKING([whether to build static libraries]) 8536 # Make sure either enable_shared or enable_static is yes. 8537 test yes = "$enable_shared" || enable_static=yes 8538 AC_MSG_RESULT([$enable_static]) 8539 8540 _LT_CONFIG($1) 8541fi 8542AC_LANG_POP 8543CC=$lt_save_CC 8544])# _LT_LANG_C_CONFIG 8545 8546 8547# _LT_LANG_CXX_CONFIG([TAG]) 8548# -------------------------- 8549# Ensure that the configuration variables for a C++ compiler are suitably 8550# defined. These variables are subsequently used by _LT_CONFIG to write 8551# the compiler configuration to 'libtool'. 8552m4_defun([_LT_LANG_CXX_CONFIG], 8553[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8554m4_require([_LT_DECL_EGREP])dnl 8555m4_require([_LT_PATH_MANIFEST_TOOL])dnl 8556if test -n "$CXX" && ( test no != "$CXX" && 8557 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 8558 (test g++ != "$CXX"))); then 8559 AC_PROG_CXXCPP 8560else 8561 _lt_caught_CXX_error=yes 8562fi 8563 8564AC_LANG_PUSH(C++) 8565_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8566_LT_TAGVAR(allow_undefined_flag, $1)= 8567_LT_TAGVAR(always_export_symbols, $1)=no 8568_LT_TAGVAR(archive_expsym_cmds, $1)= 8569_LT_TAGVAR(compiler_needs_object, $1)=no 8570_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8571_LT_TAGVAR(hardcode_direct, $1)=no 8572_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8573_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8574_LT_TAGVAR(hardcode_libdir_separator, $1)= 8575_LT_TAGVAR(hardcode_minus_L, $1)=no 8576_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8577_LT_TAGVAR(hardcode_automatic, $1)=no 8578_LT_TAGVAR(inherit_rpath, $1)=no 8579_LT_TAGVAR(module_cmds, $1)= 8580_LT_TAGVAR(module_expsym_cmds, $1)= 8581_LT_TAGVAR(link_all_deplibs, $1)=unknown 8582_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8583_LT_TAGVAR(reload_flag, $1)=$reload_flag 8584_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8585_LT_TAGVAR(no_undefined_flag, $1)= 8586_LT_TAGVAR(whole_archive_flag_spec, $1)= 8587_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8588 8589# Source file extension for C++ test sources. 8590ac_ext=cpp 8591 8592# Object file extension for compiled C++ test sources. 8593objext=o 8594_LT_TAGVAR(objext, $1)=$objext 8595 8596# No sense in running all these tests if we already determined that 8597# the CXX compiler isn't working. Some variables (like enable_shared) 8598# are currently assumed to apply to all compilers on this platform, 8599# and will be corrupted by setting them based on a non-working compiler. 8600if test yes != "$_lt_caught_CXX_error"; then 8601 # Code to be used in simple compile tests 8602 lt_simple_compile_test_code="int some_variable = 0;" 8603 8604 # Code to be used in simple link tests 8605 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 8606 8607 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8608 _LT_TAG_COMPILER 8609 8610 # save warnings/boilerplate of simple test code 8611 _LT_COMPILER_BOILERPLATE 8612 _LT_LINKER_BOILERPLATE 8613 8614 # Allow CC to be a program name with arguments. 8615 lt_save_CC=$CC 8616 lt_save_CFLAGS=$CFLAGS 8617 lt_save_LD=$LD 8618 lt_save_GCC=$GCC 8619 GCC=$GXX 8620 lt_save_with_gnu_ld=$with_gnu_ld 8621 lt_save_path_LD=$lt_cv_path_LD 8622 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 8623 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 8624 else 8625 $as_unset lt_cv_prog_gnu_ld 8626 fi 8627 if test -n "${lt_cv_path_LDCXX+set}"; then 8628 lt_cv_path_LD=$lt_cv_path_LDCXX 8629 else 8630 $as_unset lt_cv_path_LD 8631 fi 8632 test -z "${LDCXX+set}" || LD=$LDCXX 8633 CC=${CXX-"c++"} 8634 CFLAGS=$CXXFLAGS 8635 compiler=$CC 8636 _LT_TAGVAR(compiler, $1)=$CC 8637 _LT_CC_BASENAME([$compiler]) 8638 8639 if test -n "$compiler"; then 8640 # We don't want -fno-exception when compiling C++ code, so set the 8641 # no_builtin_flag separately 8642 if test yes = "$GXX"; then 8643 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 8644 else 8645 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 8646 fi 8647 8648 if test yes = "$GXX"; then 8649 # Set up default GNU C++ configuration 8650 8651 LT_PATH_LD 8652 8653 # Check if GNU C++ uses GNU ld as the underlying linker, since the 8654 # archiving commands below assume that GNU ld is being used. 8655 if test yes = "$with_gnu_ld"; then 8656 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 8657 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 8658 8659 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8660 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8661 8662 # If archive_cmds runs LD, not CC, wlarc should be empty 8663 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 8664 # investigate it a little bit more. (MM) 8665 wlarc='$wl' 8666 8667 # ancient GNU ld didn't support --whole-archive et. al. 8668 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 8669 $GREP 'no-whole-archive' > /dev/null; then 8670 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8671 else 8672 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8673 fi 8674 else 8675 with_gnu_ld=no 8676 wlarc= 8677 8678 # A generic and very simple default shared library creation 8679 # command for GNU C++ for the case where it uses the native 8680 # linker, instead of GNU ld. If possible, this setting should 8681 # overridden to take advantage of the native linker features on 8682 # the platform it is being used on. 8683 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8684 fi 8685 8686 # Commands to make compiler produce verbose output that lists 8687 # what "hidden" libraries, object files and flags are used when 8688 # linking a shared library. 8689 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8690 8691 else 8692 GXX=no 8693 with_gnu_ld=no 8694 wlarc= 8695 fi 8696 8697 # PORTME: fill in a description of your system's C++ link characteristics 8698 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8699 _LT_TAGVAR(ld_shlibs, $1)=yes 8700 case $host_os in 8701 aix3*) 8702 # FIXME: insert proper C++ library support 8703 _LT_TAGVAR(ld_shlibs, $1)=no 8704 ;; 8705 aix[[4-9]]*) 8706 if test ia64 = "$host_cpu"; then 8707 # On IA64, the linker does run time linking by default, so we don't 8708 # have to do anything special. 8709 aix_use_runtimelinking=no 8710 exp_sym_flag='-Bexport' 8711 no_entry_flag= 8712 else 8713 aix_use_runtimelinking=no 8714 8715 # Test if we are trying to use run time linking or normal 8716 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8717 # have runtime linking enabled, and use it for executables. 8718 # For shared libraries, we enable/disable runtime linking 8719 # depending on the kind of the shared library created - 8720 # when "with_aix_soname,aix_use_runtimelinking" is: 8721 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8722 # "aix,yes" lib.so shared, rtl:yes, for executables 8723 # lib.a static archive 8724 # "both,no" lib.so.V(shr.o) shared, rtl:yes 8725 # lib.a(lib.so.V) shared, rtl:no, for executables 8726 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8727 # lib.a(lib.so.V) shared, rtl:no 8728 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8729 # lib.a static archive 8730 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8731 for ld_flag in $LDFLAGS; do 8732 case $ld_flag in 8733 *-brtl*) 8734 aix_use_runtimelinking=yes 8735 break 8736 ;; 8737 esac 8738 done 8739 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8740 # With aix-soname=svr4, we create the lib.so.V shared archives only, 8741 # so we don't have lib.a shared libs to link our executables. 8742 # We have to force runtime linking in this case. 8743 aix_use_runtimelinking=yes 8744 LDFLAGS="$LDFLAGS -Wl,-brtl" 8745 fi 8746 ;; 8747 esac 8748 8749 exp_sym_flag='-bexport' 8750 no_entry_flag='-bnoentry' 8751 fi 8752 8753 # When large executables or shared objects are built, AIX ld can 8754 # have problems creating the table of contents. If linking a library 8755 # or program results in "error TOC overflow" add -mminimal-toc to 8756 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8757 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8758 8759 _LT_TAGVAR(archive_cmds, $1)='' 8760 _LT_TAGVAR(hardcode_direct, $1)=yes 8761 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8762 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8763 _LT_TAGVAR(link_all_deplibs, $1)=yes 8764 _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8765 case $with_aix_soname,$aix_use_runtimelinking in 8766 aix,*) ;; # no import file 8767 svr4,* | *,yes) # use import file 8768 # The Import File defines what to hardcode. 8769 _LT_TAGVAR(hardcode_direct, $1)=no 8770 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8771 ;; 8772 esac 8773 8774 if test yes = "$GXX"; then 8775 case $host_os in aix4.[[012]]|aix4.[[012]].*) 8776 # We only want to do this on AIX 4.2 and lower, the check 8777 # below for broken collect2 doesn't work under 4.3+ 8778 collect2name=`$CC -print-prog-name=collect2` 8779 if test -f "$collect2name" && 8780 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8781 then 8782 # We have reworked collect2 8783 : 8784 else 8785 # We have old collect2 8786 _LT_TAGVAR(hardcode_direct, $1)=unsupported 8787 # It fails to find uninstalled libraries when the uninstalled 8788 # path is not listed in the libpath. Setting hardcode_minus_L 8789 # to unsupported forces relinking 8790 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8791 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8792 _LT_TAGVAR(hardcode_libdir_separator, $1)= 8793 fi 8794 esac 8795 shared_flag='-shared' 8796 if test yes = "$aix_use_runtimelinking"; then 8797 shared_flag=$shared_flag' $wl-G' 8798 fi 8799 # Need to ensure runtime linking is disabled for the traditional 8800 # shared library, or the linker may eventually find shared libraries 8801 # /with/ Import File - we do not want to mix them. 8802 shared_flag_aix='-shared' 8803 shared_flag_svr4='-shared $wl-G' 8804 else 8805 # not using gcc 8806 if test ia64 = "$host_cpu"; then 8807 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8808 # chokes on -Wl,-G. The following line is correct: 8809 shared_flag='-G' 8810 else 8811 if test yes = "$aix_use_runtimelinking"; then 8812 shared_flag='$wl-G' 8813 else 8814 shared_flag='$wl-bM:SRE' 8815 fi 8816 shared_flag_aix='$wl-bM:SRE' 8817 shared_flag_svr4='$wl-G' 8818 fi 8819 fi 8820 8821 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8822 # It seems that -bexpall does not export symbols beginning with 8823 # underscore (_), so it is better to generate a list of symbols to 8824 # export. 8825 _LT_TAGVAR(always_export_symbols, $1)=yes 8826 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8827 # Warning - without using the other runtime loading flags (-brtl), 8828 # -berok will link without error, but may produce a broken library. 8829 # The "-G" linker flag allows undefined symbols. 8830 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 8831 # Determine the default libpath from the value encoded in an empty 8832 # executable. 8833 _LT_SYS_MODULE_PATH_AIX([$1]) 8834 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8835 8836 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 8837 else 8838 if test ia64 = "$host_cpu"; then 8839 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8840 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8841 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 8842 else 8843 # Determine the default libpath from the value encoded in an 8844 # empty executable. 8845 _LT_SYS_MODULE_PATH_AIX([$1]) 8846 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8847 # Warning - without using the other run time loading flags, 8848 # -berok will link without error, but may produce a broken library. 8849 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8850 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8851 if test yes = "$with_gnu_ld"; then 8852 # We only use this code for GNU lds that support --whole-archive. 8853 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8854 else 8855 # Exported symbols can be pulled into shared objects from archives 8856 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8857 fi 8858 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8859 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8860 # -brtl affects multiple linker settings, -berok does not and is overridden later 8861 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8862 if test svr4 != "$with_aix_soname"; then 8863 # This is similar to how AIX traditionally builds its shared 8864 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 8865 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 8866 fi 8867 if test aix != "$with_aix_soname"; then 8868 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 8869 else 8870 # used by -dlpreopen to get the symbols 8871 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8872 fi 8873 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8874 fi 8875 fi 8876 ;; 8877 8878 beos*) 8879 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8880 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8881 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8882 # support --undefined. This deserves some investigation. FIXME 8883 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8884 else 8885 _LT_TAGVAR(ld_shlibs, $1)=no 8886 fi 8887 ;; 8888 8889 chorus*) 8890 case $cc_basename in 8891 *) 8892 # FIXME: insert proper C++ library support 8893 _LT_TAGVAR(ld_shlibs, $1)=no 8894 ;; 8895 esac 8896 ;; 8897 8898 cygwin* | mingw* | pw32* | cegcc*) 8899 case $GXX,$cc_basename in 8900 ,cl* | no,cl*) 8901 # Native MSVC 8902 # hardcode_libdir_flag_spec is actually meaningless, as there is 8903 # no search path for DLLs. 8904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8905 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8906 _LT_TAGVAR(always_export_symbols, $1)=yes 8907 _LT_TAGVAR(file_list_spec, $1)='@' 8908 # Tell ltmain to make .lib files, not .a files. 8909 libext=lib 8910 # Tell ltmain to make .dll files, not .so files. 8911 shrext_cmds=.dll 8912 # FIXME: Setting linknames here is a bad hack. 8913 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 8914 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8915 cp "$export_symbols" "$output_objdir/$soname.def"; 8916 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 8917 else 8918 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 8919 fi~ 8920 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 8921 linknames=' 8922 # The linker will not automatically build a static lib if we build a DLL. 8923 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8924 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8925 # Don't use ranlib 8926 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 8927 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 8928 lt_tool_outputfile="@TOOL_OUTPUT@"~ 8929 case $lt_outputfile in 8930 *.exe|*.EXE) ;; 8931 *) 8932 lt_outputfile=$lt_outputfile.exe 8933 lt_tool_outputfile=$lt_tool_outputfile.exe 8934 ;; 8935 esac~ 8936 func_to_tool_file "$lt_outputfile"~ 8937 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 8938 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 8939 $RM "$lt_outputfile.manifest"; 8940 fi' 8941 ;; 8942 *) 8943 # g++ 8944 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8945 # as there is no search path for DLLs. 8946 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8947 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8948 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8949 _LT_TAGVAR(always_export_symbols, $1)=no 8950 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8951 8952 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8953 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8954 # If the export-symbols file already is a .def file, use it as 8955 # is; otherwise, prepend EXPORTS... 8956 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8957 cp $export_symbols $output_objdir/$soname.def; 8958 else 8959 echo EXPORTS > $output_objdir/$soname.def; 8960 cat $export_symbols >> $output_objdir/$soname.def; 8961 fi~ 8962 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8963 else 8964 _LT_TAGVAR(ld_shlibs, $1)=no 8965 fi 8966 ;; 8967 esac 8968 ;; 8969 darwin* | rhapsody*) 8970 _LT_DARWIN_LINKER_FEATURES($1) 8971 ;; 8972 8973 os2*) 8974 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8975 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8976 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8977 shrext_cmds=.dll 8978 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8979 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8980 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8981 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8982 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8983 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8984 emximp -o $lib $output_objdir/$libname.def' 8985 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8986 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8987 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8988 $ECHO EXPORTS >> $output_objdir/$libname.def~ 8989 prefix_cmds="$SED"~ 8990 if test EXPORTS = "`$SED 1q $export_symbols`"; then 8991 prefix_cmds="$prefix_cmds -e 1d"; 8992 fi~ 8993 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8994 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8995 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8996 emximp -o $lib $output_objdir/$libname.def' 8997 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8998 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8999 ;; 9000 9001 dgux*) 9002 case $cc_basename in 9003 ec++*) 9004 # FIXME: insert proper C++ library support 9005 _LT_TAGVAR(ld_shlibs, $1)=no 9006 ;; 9007 ghcx*) 9008 # Green Hills C++ Compiler 9009 # FIXME: insert proper C++ library support 9010 _LT_TAGVAR(ld_shlibs, $1)=no 9011 ;; 9012 *) 9013 # FIXME: insert proper C++ library support 9014 _LT_TAGVAR(ld_shlibs, $1)=no 9015 ;; 9016 esac 9017 ;; 9018 9019 freebsd2.*) 9020 # C++ shared libraries reported to be fairly broken before 9021 # switch to ELF 9022 _LT_TAGVAR(ld_shlibs, $1)=no 9023 ;; 9024 9025 freebsd-elf*) 9026 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9027 ;; 9028 9029 freebsd* | dragonfly*) 9030 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 9031 # conventions 9032 _LT_TAGVAR(ld_shlibs, $1)=yes 9033 ;; 9034 9035 haiku*) 9036 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9037 _LT_TAGVAR(link_all_deplibs, $1)=yes 9038 ;; 9039 9040 hpux9*) 9041 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9042 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9043 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9044 _LT_TAGVAR(hardcode_direct, $1)=yes 9045 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 9046 # but as the default 9047 # location of the library. 9048 9049 case $cc_basename in 9050 CC*) 9051 # FIXME: insert proper C++ library support 9052 _LT_TAGVAR(ld_shlibs, $1)=no 9053 ;; 9054 aCC*) 9055 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9056 # Commands to make compiler produce verbose output that lists 9057 # what "hidden" libraries, object files and flags are used when 9058 # linking a shared library. 9059 # 9060 # There doesn't appear to be a way to prevent this compiler from 9061 # explicitly linking system object files so we need to strip them 9062 # from the output so that they don't get included in the library 9063 # dependencies. 9064 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 9065 ;; 9066 *) 9067 if test yes = "$GXX"; then 9068 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9069 else 9070 # FIXME: insert proper C++ library support 9071 _LT_TAGVAR(ld_shlibs, $1)=no 9072 fi 9073 ;; 9074 esac 9075 ;; 9076 9077 hpux10*|hpux11*) 9078 if test no = "$with_gnu_ld"; then 9079 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9080 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9081 9082 case $host_cpu in 9083 hppa*64*|ia64*) 9084 ;; 9085 *) 9086 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9087 ;; 9088 esac 9089 fi 9090 case $host_cpu in 9091 hppa*64*|ia64*) 9092 _LT_TAGVAR(hardcode_direct, $1)=no 9093 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9094 ;; 9095 *) 9096 _LT_TAGVAR(hardcode_direct, $1)=yes 9097 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9098 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 9099 # but as the default 9100 # location of the library. 9101 ;; 9102 esac 9103 9104 case $cc_basename in 9105 CC*) 9106 # FIXME: insert proper C++ library support 9107 _LT_TAGVAR(ld_shlibs, $1)=no 9108 ;; 9109 aCC*) 9110 case $host_cpu in 9111 hppa*64*) 9112 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 9113 ;; 9114 ia64*) 9115 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 9116 ;; 9117 *) 9118 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 9119 ;; 9120 esac 9121 # Commands to make compiler produce verbose output that lists 9122 # what "hidden" libraries, object files and flags are used when 9123 # linking a shared library. 9124 # 9125 # There doesn't appear to be a way to prevent this compiler from 9126 # explicitly linking system object files so we need to strip them 9127 # from the output so that they don't get included in the library 9128 # dependencies. 9129 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 9130 ;; 9131 *) 9132 if test yes = "$GXX"; then 9133 if test no = "$with_gnu_ld"; then 9134 case $host_cpu in 9135 hppa*64*) 9136 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 9137 ;; 9138 ia64*) 9139 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 9140 ;; 9141 *) 9142 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 9143 ;; 9144 esac 9145 fi 9146 else 9147 # FIXME: insert proper C++ library support 9148 _LT_TAGVAR(ld_shlibs, $1)=no 9149 fi 9150 ;; 9151 esac 9152 ;; 9153 9154 interix[[3-9]]*) 9155 _LT_TAGVAR(hardcode_direct, $1)=no 9156 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9157 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9158 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9159 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 9160 # Instead, shared libraries are loaded at an image base (0x10000000 by 9161 # default) and relocated if they conflict, which is a slow very memory 9162 # consuming and fragmenting process. To avoid this, we pick a random, 9163 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 9164 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 9165 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 9166 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 9167 ;; 9168 irix5* | irix6*) 9169 case $cc_basename in 9170 CC*) 9171 # SGI C++ 9172 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 9173 9174 # Archives containing C++ object files must be created using 9175 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 9176 # necessary to make sure instantiated templates are included 9177 # in the archive. 9178 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 9179 ;; 9180 *) 9181 if test yes = "$GXX"; then 9182 if test no = "$with_gnu_ld"; then 9183 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9184 else 9185 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' 9186 fi 9187 fi 9188 _LT_TAGVAR(link_all_deplibs, $1)=yes 9189 ;; 9190 esac 9191 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9192 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9193 _LT_TAGVAR(inherit_rpath, $1)=yes 9194 ;; 9195 9196 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 9197 case $cc_basename in 9198 KCC*) 9199 # Kuck and Associates, Inc. (KAI) C++ Compiler 9200 9201 # KCC will only create a shared library if the output file 9202 # ends with ".so" (or ".sl" for HP-UX), so rename the library 9203 # to its proper name (with version) after linking. 9204 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 9205 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' 9206 # Commands to make compiler produce verbose output that lists 9207 # what "hidden" libraries, object files and flags are used when 9208 # linking a shared library. 9209 # 9210 # There doesn't appear to be a way to prevent this compiler from 9211 # explicitly linking system object files so we need to strip them 9212 # from the output so that they don't get included in the library 9213 # dependencies. 9214 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 9215 9216 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9217 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9218 9219 # Archives containing C++ object files must be created using 9220 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 9221 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 9222 ;; 9223 icpc* | ecpc* ) 9224 # Intel C++ 9225 with_gnu_ld=yes 9226 # version 8.0 and above of icpc choke on multiply defined symbols 9227 # if we add $predep_objects and $postdep_objects, however 7.1 and 9228 # earlier do not add the objects themselves. 9229 case `$CC -V 2>&1` in 9230 *"Version 7."*) 9231 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9232 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9233 ;; 9234 *) # Version 8.0 or newer 9235 tmp_idyn= 9236 case $host_cpu in 9237 ia64*) tmp_idyn=' -i_dynamic';; 9238 esac 9239 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9240 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9241 ;; 9242 esac 9243 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9244 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9245 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9246 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 9247 ;; 9248 pgCC* | pgcpp*) 9249 # Portland Group C++ compiler 9250 case `$CC -V` in 9251 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 9252 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 9253 rm -rf $tpldir~ 9254 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 9255 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 9256 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 9257 rm -rf $tpldir~ 9258 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 9259 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 9260 $RANLIB $oldlib' 9261 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 9262 rm -rf $tpldir~ 9263 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 9264 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9265 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 9266 rm -rf $tpldir~ 9267 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 9268 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9269 ;; 9270 *) # Version 6 and above use weak symbols 9271 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9272 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9273 ;; 9274 esac 9275 9276 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 9277 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9278 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 9279 ;; 9280 cxx*) 9281 # Compaq C++ 9282 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9283 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' 9284 9285 runpath_var=LD_RUN_PATH 9286 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9287 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9288 9289 # Commands to make compiler produce verbose output that lists 9290 # what "hidden" libraries, object files and flags are used when 9291 # linking a shared library. 9292 # 9293 # There doesn't appear to be a way to prevent this compiler from 9294 # explicitly linking system object files so we need to strip them 9295 # from the output so that they don't get included in the library 9296 # dependencies. 9297 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 9298 ;; 9299 xl* | mpixl* | bgxl*) 9300 # IBM XL 8.0 on PPC, with GNU ld 9301 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9302 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9303 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9304 if test yes = "$supports_anon_versioning"; then 9305 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 9306 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 9307 echo "local: *; };" >> $output_objdir/$libname.ver~ 9308 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 9309 fi 9310 ;; 9311 *) 9312 case `$CC -V 2>&1 | sed 5q` in 9313 *Sun\ C*) 9314 # Sun C++ 5.9 9315 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 9316 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 9317 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' 9318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9319 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 9320 _LT_TAGVAR(compiler_needs_object, $1)=yes 9321 9322 # Not sure whether something based on 9323 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 9324 # would be better. 9325 output_verbose_link_cmd='func_echo_all' 9326 9327 # Archives containing C++ object files must be created using 9328 # "CC -xar", where "CC" is the Sun C++ compiler. This is 9329 # necessary to make sure instantiated templates are included 9330 # in the archive. 9331 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 9332 ;; 9333 esac 9334 ;; 9335 esac 9336 ;; 9337 9338 lynxos*) 9339 # FIXME: insert proper C++ library support 9340 _LT_TAGVAR(ld_shlibs, $1)=no 9341 ;; 9342 9343 m88k*) 9344 # FIXME: insert proper C++ library support 9345 _LT_TAGVAR(ld_shlibs, $1)=no 9346 ;; 9347 9348 mvs*) 9349 case $cc_basename in 9350 cxx*) 9351 # FIXME: insert proper C++ library support 9352 _LT_TAGVAR(ld_shlibs, $1)=no 9353 ;; 9354 *) 9355 # FIXME: insert proper C++ library support 9356 _LT_TAGVAR(ld_shlibs, $1)=no 9357 ;; 9358 esac 9359 ;; 9360 9361 netbsd*) 9362 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9363 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 9364 wlarc= 9365 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9366 _LT_TAGVAR(hardcode_direct, $1)=yes 9367 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9368 fi 9369 # Workaround some broken pre-1.5 toolchains 9370 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 9371 ;; 9372 9373 *nto* | *qnx*) 9374 _LT_TAGVAR(ld_shlibs, $1)=yes 9375 ;; 9376 9377 openbsd* | bitrig*) 9378 if test -f /usr/libexec/ld.so; then 9379 _LT_TAGVAR(hardcode_direct, $1)=yes 9380 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9381 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9382 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9383 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9384 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 9385 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' 9386 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9387 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9388 fi 9389 output_verbose_link_cmd=func_echo_all 9390 else 9391 _LT_TAGVAR(ld_shlibs, $1)=no 9392 fi 9393 ;; 9394 9395 osf3* | osf4* | osf5*) 9396 case $cc_basename in 9397 KCC*) 9398 # Kuck and Associates, Inc. (KAI) C++ Compiler 9399 9400 # KCC will only create a shared library if the output file 9401 # ends with ".so" (or ".sl" for HP-UX), so rename the library 9402 # to its proper name (with version) after linking. 9403 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 9404 9405 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9406 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9407 9408 # Archives containing C++ object files must be created using 9409 # the KAI C++ compiler. 9410 case $host in 9411 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 9412 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 9413 esac 9414 ;; 9415 RCC*) 9416 # Rational C++ 2.4.1 9417 # FIXME: insert proper C++ library support 9418 _LT_TAGVAR(ld_shlibs, $1)=no 9419 ;; 9420 cxx*) 9421 case $host in 9422 osf3*) 9423 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9424 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 9425 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9426 ;; 9427 *) 9428 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9429 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 9430 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 9431 echo "-hidden">> $lib.exp~ 9432 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ 9433 $RM $lib.exp' 9434 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9435 ;; 9436 esac 9437 9438 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9439 9440 # Commands to make compiler produce verbose output that lists 9441 # what "hidden" libraries, object files and flags are used when 9442 # linking a shared library. 9443 # 9444 # There doesn't appear to be a way to prevent this compiler from 9445 # explicitly linking system object files so we need to strip them 9446 # from the output so that they don't get included in the library 9447 # dependencies. 9448 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 9449 ;; 9450 *) 9451 if test yes,no = "$GXX,$with_gnu_ld"; then 9452 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9453 case $host in 9454 osf3*) 9455 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9456 ;; 9457 *) 9458 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9459 ;; 9460 esac 9461 9462 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9463 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9464 9465 # Commands to make compiler produce verbose output that lists 9466 # what "hidden" libraries, object files and flags are used when 9467 # linking a shared library. 9468 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9469 9470 else 9471 # FIXME: insert proper C++ library support 9472 _LT_TAGVAR(ld_shlibs, $1)=no 9473 fi 9474 ;; 9475 esac 9476 ;; 9477 9478 psos*) 9479 # FIXME: insert proper C++ library support 9480 _LT_TAGVAR(ld_shlibs, $1)=no 9481 ;; 9482 9483 sunos4*) 9484 case $cc_basename in 9485 CC*) 9486 # Sun C++ 4.x 9487 # FIXME: insert proper C++ library support 9488 _LT_TAGVAR(ld_shlibs, $1)=no 9489 ;; 9490 lcc*) 9491 # Lucid 9492 # FIXME: insert proper C++ library support 9493 _LT_TAGVAR(ld_shlibs, $1)=no 9494 ;; 9495 *) 9496 # FIXME: insert proper C++ library support 9497 _LT_TAGVAR(ld_shlibs, $1)=no 9498 ;; 9499 esac 9500 ;; 9501 9502 solaris*) 9503 case $cc_basename in 9504 CC* | sunCC*) 9505 # Sun C++ 4.2, 5.x and Centerline C++ 9506 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 9507 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 9508 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 9509 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9510 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 9511 9512 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9513 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9514 case $host_os in 9515 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9516 *) 9517 # The compiler driver will combine and reorder linker options, 9518 # but understands '-z linker_flag'. 9519 # Supported since Solaris 2.6 (maybe 2.5.1?) 9520 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9521 ;; 9522 esac 9523 _LT_TAGVAR(link_all_deplibs, $1)=yes 9524 9525 output_verbose_link_cmd='func_echo_all' 9526 9527 # Archives containing C++ object files must be created using 9528 # "CC -xar", where "CC" is the Sun C++ compiler. This is 9529 # necessary to make sure instantiated templates are included 9530 # in the archive. 9531 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 9532 ;; 9533 gcx*) 9534 # Green Hills C++ Compiler 9535 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 9536 9537 # The C++ compiler must be used to create the archive. 9538 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 9539 ;; 9540 *) 9541 # GNU C++ compiler with Solaris linker 9542 if test yes,no = "$GXX,$with_gnu_ld"; then 9543 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 9544 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 9545 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 9546 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9547 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 9548 9549 # Commands to make compiler produce verbose output that lists 9550 # what "hidden" libraries, object files and flags are used when 9551 # linking a shared library. 9552 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9553 else 9554 # g++ 2.7 appears to require '-G' NOT '-shared' on this 9555 # platform. 9556 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 9557 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9558 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 9559 9560 # Commands to make compiler produce verbose output that lists 9561 # what "hidden" libraries, object files and flags are used when 9562 # linking a shared library. 9563 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9564 fi 9565 9566 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 9567 case $host_os in 9568 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9569 *) 9570 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9571 ;; 9572 esac 9573 fi 9574 ;; 9575 esac 9576 ;; 9577 9578 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9579 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9580 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9581 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9582 runpath_var='LD_RUN_PATH' 9583 9584 case $cc_basename in 9585 CC*) 9586 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9587 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9588 ;; 9589 *) 9590 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9591 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9592 ;; 9593 esac 9594 ;; 9595 9596 sysv5* | sco3.2v5* | sco5v6*) 9597 # Note: We CANNOT use -z defs as we might desire, because we do not 9598 # link with -lc, and that would cause any symbols used from libc to 9599 # always be unresolved, which means just about no library would 9600 # ever link correctly. If we're not using GNU ld we use -z text 9601 # though, which does catch some bad symbols but isn't as heavy-handed 9602 # as -z defs. 9603 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9604 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9605 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9606 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9607 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9608 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9609 _LT_TAGVAR(link_all_deplibs, $1)=yes 9610 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9611 runpath_var='LD_RUN_PATH' 9612 9613 case $cc_basename in 9614 CC*) 9615 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9616 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9617 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 9618 '"$_LT_TAGVAR(old_archive_cmds, $1)" 9619 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 9620 '"$_LT_TAGVAR(reload_cmds, $1)" 9621 ;; 9622 *) 9623 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9624 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9625 ;; 9626 esac 9627 ;; 9628 9629 tandem*) 9630 case $cc_basename in 9631 NCC*) 9632 # NonStop-UX NCC 3.20 9633 # FIXME: insert proper C++ library support 9634 _LT_TAGVAR(ld_shlibs, $1)=no 9635 ;; 9636 *) 9637 # FIXME: insert proper C++ library support 9638 _LT_TAGVAR(ld_shlibs, $1)=no 9639 ;; 9640 esac 9641 ;; 9642 9643 vxworks*) 9644 # FIXME: insert proper C++ library support 9645 _LT_TAGVAR(ld_shlibs, $1)=no 9646 ;; 9647 9648 *) 9649 # FIXME: insert proper C++ library support 9650 _LT_TAGVAR(ld_shlibs, $1)=no 9651 ;; 9652 esac 9653 9654 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9655 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9656 9657 _LT_TAGVAR(GCC, $1)=$GXX 9658 _LT_TAGVAR(LD, $1)=$LD 9659 9660 ## CAVEAT EMPTOR: 9661 ## There is no encapsulation within the following macros, do not change 9662 ## the running order or otherwise move them around unless you know exactly 9663 ## what you are doing... 9664 _LT_SYS_HIDDEN_LIBDEPS($1) 9665 _LT_COMPILER_PIC($1) 9666 _LT_COMPILER_C_O($1) 9667 _LT_COMPILER_FILE_LOCKS($1) 9668 _LT_LINKER_SHLIBS($1) 9669 _LT_SYS_DYNAMIC_LINKER($1) 9670 _LT_LINKER_HARDCODE_LIBPATH($1) 9671 9672 _LT_CONFIG($1) 9673 fi # test -n "$compiler" 9674 9675 CC=$lt_save_CC 9676 CFLAGS=$lt_save_CFLAGS 9677 LDCXX=$LD 9678 LD=$lt_save_LD 9679 GCC=$lt_save_GCC 9680 with_gnu_ld=$lt_save_with_gnu_ld 9681 lt_cv_path_LDCXX=$lt_cv_path_LD 9682 lt_cv_path_LD=$lt_save_path_LD 9683 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 9684 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 9685fi # test yes != "$_lt_caught_CXX_error" 9686 9687AC_LANG_POP 9688])# _LT_LANG_CXX_CONFIG 9689 9690 9691# _LT_FUNC_STRIPNAME_CNF 9692# ---------------------- 9693# func_stripname_cnf prefix suffix name 9694# strip PREFIX and SUFFIX off of NAME. 9695# PREFIX and SUFFIX must not contain globbing or regex special 9696# characters, hashes, percent signs, but SUFFIX may contain a leading 9697# dot (in which case that matches only a dot). 9698# 9699# This function is identical to the (non-XSI) version of func_stripname, 9700# except this one can be used by m4 code that may be executed by configure, 9701# rather than the libtool script. 9702m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 9703AC_REQUIRE([_LT_DECL_SED]) 9704AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 9705func_stripname_cnf () 9706{ 9707 case @S|@2 in 9708 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 9709 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 9710 esac 9711} # func_stripname_cnf 9712])# _LT_FUNC_STRIPNAME_CNF 9713 9714 9715# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 9716# --------------------------------- 9717# Figure out "hidden" library dependencies from verbose 9718# compiler output when linking a shared library. 9719# Parse the compiler output and extract the necessary 9720# objects, libraries and library flags. 9721m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 9722[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9723AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 9724# Dependencies to place before and after the object being linked: 9725_LT_TAGVAR(predep_objects, $1)= 9726_LT_TAGVAR(postdep_objects, $1)= 9727_LT_TAGVAR(predeps, $1)= 9728_LT_TAGVAR(postdeps, $1)= 9729_LT_TAGVAR(compiler_lib_search_path, $1)= 9730 9731dnl we can't use the lt_simple_compile_test_code here, 9732dnl because it contains code intended for an executable, 9733dnl not a library. It's possible we should let each 9734dnl tag define a new lt_????_link_test_code variable, 9735dnl but it's only used here... 9736m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 9737int a; 9738void foo (void) { a = 0; } 9739_LT_EOF 9740], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 9741class Foo 9742{ 9743public: 9744 Foo (void) { a = 0; } 9745private: 9746 int a; 9747}; 9748_LT_EOF 9749], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 9750 subroutine foo 9751 implicit none 9752 integer*4 a 9753 a=0 9754 return 9755 end 9756_LT_EOF 9757], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 9758 subroutine foo 9759 implicit none 9760 integer a 9761 a=0 9762 return 9763 end 9764_LT_EOF 9765], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 9766public class foo { 9767 private int a; 9768 public void bar (void) { 9769 a = 0; 9770 } 9771}; 9772_LT_EOF 9773], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 9774package foo 9775func foo() { 9776} 9777_LT_EOF 9778]) 9779 9780_lt_libdeps_save_CFLAGS=$CFLAGS 9781case "$CC $CFLAGS " in #( 9782*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 9783*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 9784*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 9785esac 9786 9787dnl Parse the compiler output and extract the necessary 9788dnl objects, libraries and library flags. 9789if AC_TRY_EVAL(ac_compile); then 9790 # Parse the compiler output and extract the necessary 9791 # objects, libraries and library flags. 9792 9793 # Sentinel used to keep track of whether or not we are before 9794 # the conftest object file. 9795 pre_test_object_deps_done=no 9796 9797 for p in `eval "$output_verbose_link_cmd"`; do 9798 case $prev$p in 9799 9800 -L* | -R* | -l*) 9801 # Some compilers place space between "-{L,R}" and the path. 9802 # Remove the space. 9803 if test x-L = "$p" || 9804 test x-R = "$p"; then 9805 prev=$p 9806 continue 9807 fi 9808 9809 # Expand the sysroot to ease extracting the directories later. 9810 if test -z "$prev"; then 9811 case $p in 9812 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 9813 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 9814 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 9815 esac 9816 fi 9817 case $p in 9818 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 9819 esac 9820 if test no = "$pre_test_object_deps_done"; then 9821 case $prev in 9822 -L | -R) 9823 # Internal compiler library paths should come after those 9824 # provided the user. The postdeps already come after the 9825 # user supplied libs so there is no need to process them. 9826 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 9827 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 9828 else 9829 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 9830 fi 9831 ;; 9832 # The "-l" case would never come before the object being 9833 # linked, so don't bother handling this case. 9834 esac 9835 else 9836 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 9837 _LT_TAGVAR(postdeps, $1)=$prev$p 9838 else 9839 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 9840 fi 9841 fi 9842 prev= 9843 ;; 9844 9845 *.lto.$objext) ;; # Ignore GCC LTO objects 9846 *.$objext) 9847 # This assumes that the test object file only shows up 9848 # once in the compiler output. 9849 if test "$p" = "conftest.$objext"; then 9850 pre_test_object_deps_done=yes 9851 continue 9852 fi 9853 9854 if test no = "$pre_test_object_deps_done"; then 9855 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 9856 _LT_TAGVAR(predep_objects, $1)=$p 9857 else 9858 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 9859 fi 9860 else 9861 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 9862 _LT_TAGVAR(postdep_objects, $1)=$p 9863 else 9864 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 9865 fi 9866 fi 9867 ;; 9868 9869 *) ;; # Ignore the rest. 9870 9871 esac 9872 done 9873 9874 # Clean up. 9875 rm -f a.out a.exe 9876else 9877 echo "libtool.m4: error: problem compiling $1 test program" 9878fi 9879 9880$RM -f confest.$objext 9881CFLAGS=$_lt_libdeps_save_CFLAGS 9882 9883# PORTME: override above test on systems where it is broken 9884m4_if([$1], [CXX], 9885[case $host_os in 9886interix[[3-9]]*) 9887 # Interix 3.5 installs completely hosed .la files for C++, so rather than 9888 # hack all around it, let's just trust "g++" to DTRT. 9889 _LT_TAGVAR(predep_objects,$1)= 9890 _LT_TAGVAR(postdep_objects,$1)= 9891 _LT_TAGVAR(postdeps,$1)= 9892 ;; 9893esac 9894]) 9895 9896case " $_LT_TAGVAR(postdeps, $1) " in 9897*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 9898esac 9899 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 9900if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 9901 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 9902fi 9903_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 9904 [The directories searched by this compiler when creating a shared library]) 9905_LT_TAGDECL([], [predep_objects], [1], 9906 [Dependencies to place before and after the objects being linked to 9907 create a shared library]) 9908_LT_TAGDECL([], [postdep_objects], [1]) 9909_LT_TAGDECL([], [predeps], [1]) 9910_LT_TAGDECL([], [postdeps], [1]) 9911_LT_TAGDECL([], [compiler_lib_search_path], [1], 9912 [The library search path used internally by the compiler when linking 9913 a shared library]) 9914])# _LT_SYS_HIDDEN_LIBDEPS 9915 9916 9917# _LT_LANG_F77_CONFIG([TAG]) 9918# -------------------------- 9919# Ensure that the configuration variables for a Fortran 77 compiler are 9920# suitably defined. These variables are subsequently used by _LT_CONFIG 9921# to write the compiler configuration to 'libtool'. 9922m4_defun([_LT_LANG_F77_CONFIG], 9923[AC_LANG_PUSH(Fortran 77) 9924if test -z "$F77" || test no = "$F77"; then 9925 _lt_disable_F77=yes 9926fi 9927 9928_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9929_LT_TAGVAR(allow_undefined_flag, $1)= 9930_LT_TAGVAR(always_export_symbols, $1)=no 9931_LT_TAGVAR(archive_expsym_cmds, $1)= 9932_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9933_LT_TAGVAR(hardcode_direct, $1)=no 9934_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9935_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9936_LT_TAGVAR(hardcode_libdir_separator, $1)= 9937_LT_TAGVAR(hardcode_minus_L, $1)=no 9938_LT_TAGVAR(hardcode_automatic, $1)=no 9939_LT_TAGVAR(inherit_rpath, $1)=no 9940_LT_TAGVAR(module_cmds, $1)= 9941_LT_TAGVAR(module_expsym_cmds, $1)= 9942_LT_TAGVAR(link_all_deplibs, $1)=unknown 9943_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9944_LT_TAGVAR(reload_flag, $1)=$reload_flag 9945_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9946_LT_TAGVAR(no_undefined_flag, $1)= 9947_LT_TAGVAR(whole_archive_flag_spec, $1)= 9948_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9949 9950# Source file extension for f77 test sources. 9951ac_ext=f 9952 9953# Object file extension for compiled f77 test sources. 9954objext=o 9955_LT_TAGVAR(objext, $1)=$objext 9956 9957# No sense in running all these tests if we already determined that 9958# the F77 compiler isn't working. Some variables (like enable_shared) 9959# are currently assumed to apply to all compilers on this platform, 9960# and will be corrupted by setting them based on a non-working compiler. 9961if test yes != "$_lt_disable_F77"; then 9962 # Code to be used in simple compile tests 9963 lt_simple_compile_test_code="\ 9964 subroutine t 9965 return 9966 end 9967" 9968 9969 # Code to be used in simple link tests 9970 lt_simple_link_test_code="\ 9971 program t 9972 end 9973" 9974 9975 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9976 _LT_TAG_COMPILER 9977 9978 # save warnings/boilerplate of simple test code 9979 _LT_COMPILER_BOILERPLATE 9980 _LT_LINKER_BOILERPLATE 9981 9982 # Allow CC to be a program name with arguments. 9983 lt_save_CC=$CC 9984 lt_save_GCC=$GCC 9985 lt_save_CFLAGS=$CFLAGS 9986 CC=${F77-"f77"} 9987 CFLAGS=$FFLAGS 9988 compiler=$CC 9989 _LT_TAGVAR(compiler, $1)=$CC 9990 _LT_CC_BASENAME([$compiler]) 9991 GCC=$G77 9992 if test -n "$compiler"; then 9993 AC_MSG_CHECKING([if libtool supports shared libraries]) 9994 AC_MSG_RESULT([$can_build_shared]) 9995 9996 AC_MSG_CHECKING([whether to build shared libraries]) 9997 test no = "$can_build_shared" && enable_shared=no 9998 9999 # On AIX, shared libraries and static libraries use the same namespace, and 10000 # are all built from PIC. 10001 case $host_os in 10002 aix3*) 10003 test yes = "$enable_shared" && enable_static=no 10004 if test -n "$RANLIB"; then 10005 archive_cmds="$archive_cmds~\$RANLIB \$lib" 10006 postinstall_cmds='$RANLIB $lib' 10007 fi 10008 ;; 10009 aix[[4-9]]*) 10010 if test ia64 != "$host_cpu"; then 10011 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 10012 yes,aix,yes) ;; # shared object as lib.so file only 10013 yes,svr4,*) ;; # shared object as lib.so archive member only 10014 yes,*) enable_static=no ;; # shared object in lib.a archive as well 10015 esac 10016 fi 10017 ;; 10018 esac 10019 AC_MSG_RESULT([$enable_shared]) 10020 10021 AC_MSG_CHECKING([whether to build static libraries]) 10022 # Make sure either enable_shared or enable_static is yes. 10023 test yes = "$enable_shared" || enable_static=yes 10024 AC_MSG_RESULT([$enable_static]) 10025 10026 _LT_TAGVAR(GCC, $1)=$G77 10027 _LT_TAGVAR(LD, $1)=$LD 10028 10029 ## CAVEAT EMPTOR: 10030 ## There is no encapsulation within the following macros, do not change 10031 ## the running order or otherwise move them around unless you know exactly 10032 ## what you are doing... 10033 _LT_COMPILER_PIC($1) 10034 _LT_COMPILER_C_O($1) 10035 _LT_COMPILER_FILE_LOCKS($1) 10036 _LT_LINKER_SHLIBS($1) 10037 _LT_SYS_DYNAMIC_LINKER($1) 10038 _LT_LINKER_HARDCODE_LIBPATH($1) 10039 10040 _LT_CONFIG($1) 10041 fi # test -n "$compiler" 10042 10043 GCC=$lt_save_GCC 10044 CC=$lt_save_CC 10045 CFLAGS=$lt_save_CFLAGS 10046fi # test yes != "$_lt_disable_F77" 10047 10048AC_LANG_POP 10049])# _LT_LANG_F77_CONFIG 10050 10051 10052# _LT_LANG_FC_CONFIG([TAG]) 10053# ------------------------- 10054# Ensure that the configuration variables for a Fortran compiler are 10055# suitably defined. These variables are subsequently used by _LT_CONFIG 10056# to write the compiler configuration to 'libtool'. 10057m4_defun([_LT_LANG_FC_CONFIG], 10058[AC_LANG_PUSH(Fortran) 10059 10060if test -z "$FC" || test no = "$FC"; then 10061 _lt_disable_FC=yes 10062fi 10063 10064_LT_TAGVAR(archive_cmds_need_lc, $1)=no 10065_LT_TAGVAR(allow_undefined_flag, $1)= 10066_LT_TAGVAR(always_export_symbols, $1)=no 10067_LT_TAGVAR(archive_expsym_cmds, $1)= 10068_LT_TAGVAR(export_dynamic_flag_spec, $1)= 10069_LT_TAGVAR(hardcode_direct, $1)=no 10070_LT_TAGVAR(hardcode_direct_absolute, $1)=no 10071_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 10072_LT_TAGVAR(hardcode_libdir_separator, $1)= 10073_LT_TAGVAR(hardcode_minus_L, $1)=no 10074_LT_TAGVAR(hardcode_automatic, $1)=no 10075_LT_TAGVAR(inherit_rpath, $1)=no 10076_LT_TAGVAR(module_cmds, $1)= 10077_LT_TAGVAR(module_expsym_cmds, $1)= 10078_LT_TAGVAR(link_all_deplibs, $1)=unknown 10079_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 10080_LT_TAGVAR(reload_flag, $1)=$reload_flag 10081_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 10082_LT_TAGVAR(no_undefined_flag, $1)= 10083_LT_TAGVAR(whole_archive_flag_spec, $1)= 10084_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 10085 10086# Source file extension for fc test sources. 10087ac_ext=${ac_fc_srcext-f} 10088 10089# Object file extension for compiled fc test sources. 10090objext=o 10091_LT_TAGVAR(objext, $1)=$objext 10092 10093# No sense in running all these tests if we already determined that 10094# the FC compiler isn't working. Some variables (like enable_shared) 10095# are currently assumed to apply to all compilers on this platform, 10096# and will be corrupted by setting them based on a non-working compiler. 10097if test yes != "$_lt_disable_FC"; then 10098 # Code to be used in simple compile tests 10099 lt_simple_compile_test_code="\ 10100 subroutine t 10101 return 10102 end 10103" 10104 10105 # Code to be used in simple link tests 10106 lt_simple_link_test_code="\ 10107 program t 10108 end 10109" 10110 10111 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 10112 _LT_TAG_COMPILER 10113 10114 # save warnings/boilerplate of simple test code 10115 _LT_COMPILER_BOILERPLATE 10116 _LT_LINKER_BOILERPLATE 10117 10118 # Allow CC to be a program name with arguments. 10119 lt_save_CC=$CC 10120 lt_save_GCC=$GCC 10121 lt_save_CFLAGS=$CFLAGS 10122 CC=${FC-"f95"} 10123 CFLAGS=$FCFLAGS 10124 compiler=$CC 10125 GCC=$ac_cv_fc_compiler_gnu 10126 10127 _LT_TAGVAR(compiler, $1)=$CC 10128 _LT_CC_BASENAME([$compiler]) 10129 10130 if test -n "$compiler"; then 10131 AC_MSG_CHECKING([if libtool supports shared libraries]) 10132 AC_MSG_RESULT([$can_build_shared]) 10133 10134 AC_MSG_CHECKING([whether to build shared libraries]) 10135 test no = "$can_build_shared" && enable_shared=no 10136 10137 # On AIX, shared libraries and static libraries use the same namespace, and 10138 # are all built from PIC. 10139 case $host_os in 10140 aix3*) 10141 test yes = "$enable_shared" && enable_static=no 10142 if test -n "$RANLIB"; then 10143 archive_cmds="$archive_cmds~\$RANLIB \$lib" 10144 postinstall_cmds='$RANLIB $lib' 10145 fi 10146 ;; 10147 aix[[4-9]]*) 10148 if test ia64 != "$host_cpu"; then 10149 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 10150 yes,aix,yes) ;; # shared object as lib.so file only 10151 yes,svr4,*) ;; # shared object as lib.so archive member only 10152 yes,*) enable_static=no ;; # shared object in lib.a archive as well 10153 esac 10154 fi 10155 ;; 10156 esac 10157 AC_MSG_RESULT([$enable_shared]) 10158 10159 AC_MSG_CHECKING([whether to build static libraries]) 10160 # Make sure either enable_shared or enable_static is yes. 10161 test yes = "$enable_shared" || enable_static=yes 10162 AC_MSG_RESULT([$enable_static]) 10163 10164 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 10165 _LT_TAGVAR(LD, $1)=$LD 10166 10167 ## CAVEAT EMPTOR: 10168 ## There is no encapsulation within the following macros, do not change 10169 ## the running order or otherwise move them around unless you know exactly 10170 ## what you are doing... 10171 _LT_SYS_HIDDEN_LIBDEPS($1) 10172 _LT_COMPILER_PIC($1) 10173 _LT_COMPILER_C_O($1) 10174 _LT_COMPILER_FILE_LOCKS($1) 10175 _LT_LINKER_SHLIBS($1) 10176 _LT_SYS_DYNAMIC_LINKER($1) 10177 _LT_LINKER_HARDCODE_LIBPATH($1) 10178 10179 _LT_CONFIG($1) 10180 fi # test -n "$compiler" 10181 10182 GCC=$lt_save_GCC 10183 CC=$lt_save_CC 10184 CFLAGS=$lt_save_CFLAGS 10185fi # test yes != "$_lt_disable_FC" 10186 10187AC_LANG_POP 10188])# _LT_LANG_FC_CONFIG 10189 10190 10191# _LT_LANG_GCJ_CONFIG([TAG]) 10192# -------------------------- 10193# Ensure that the configuration variables for the GNU Java Compiler compiler 10194# are suitably defined. These variables are subsequently used by _LT_CONFIG 10195# to write the compiler configuration to 'libtool'. 10196m4_defun([_LT_LANG_GCJ_CONFIG], 10197[AC_REQUIRE([LT_PROG_GCJ])dnl 10198AC_LANG_SAVE 10199 10200# Source file extension for Java test sources. 10201ac_ext=java 10202 10203# Object file extension for compiled Java test sources. 10204objext=o 10205_LT_TAGVAR(objext, $1)=$objext 10206 10207# Code to be used in simple compile tests 10208lt_simple_compile_test_code="class foo {}" 10209 10210# Code to be used in simple link tests 10211lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 10212 10213# ltmain only uses $CC for tagged configurations so make sure $CC is set. 10214_LT_TAG_COMPILER 10215 10216# save warnings/boilerplate of simple test code 10217_LT_COMPILER_BOILERPLATE 10218_LT_LINKER_BOILERPLATE 10219 10220# Allow CC to be a program name with arguments. 10221lt_save_CC=$CC 10222lt_save_CFLAGS=$CFLAGS 10223lt_save_GCC=$GCC 10224GCC=yes 10225CC=${GCJ-"gcj"} 10226CFLAGS=$GCJFLAGS 10227compiler=$CC 10228_LT_TAGVAR(compiler, $1)=$CC 10229_LT_TAGVAR(LD, $1)=$LD 10230_LT_CC_BASENAME([$compiler]) 10231 10232# GCJ did not exist at the time GCC didn't implicitly link libc in. 10233_LT_TAGVAR(archive_cmds_need_lc, $1)=no 10234 10235_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 10236_LT_TAGVAR(reload_flag, $1)=$reload_flag 10237_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 10238 10239if test -n "$compiler"; then 10240 _LT_COMPILER_NO_RTTI($1) 10241 _LT_COMPILER_PIC($1) 10242 _LT_COMPILER_C_O($1) 10243 _LT_COMPILER_FILE_LOCKS($1) 10244 _LT_LINKER_SHLIBS($1) 10245 _LT_LINKER_HARDCODE_LIBPATH($1) 10246 10247 _LT_CONFIG($1) 10248fi 10249 10250AC_LANG_RESTORE 10251 10252GCC=$lt_save_GCC 10253CC=$lt_save_CC 10254CFLAGS=$lt_save_CFLAGS 10255])# _LT_LANG_GCJ_CONFIG 10256 10257 10258# _LT_LANG_GO_CONFIG([TAG]) 10259# -------------------------- 10260# Ensure that the configuration variables for the GNU Go compiler 10261# are suitably defined. These variables are subsequently used by _LT_CONFIG 10262# to write the compiler configuration to 'libtool'. 10263m4_defun([_LT_LANG_GO_CONFIG], 10264[AC_REQUIRE([LT_PROG_GO])dnl 10265AC_LANG_SAVE 10266 10267# Source file extension for Go test sources. 10268ac_ext=go 10269 10270# Object file extension for compiled Go test sources. 10271objext=o 10272_LT_TAGVAR(objext, $1)=$objext 10273 10274# Code to be used in simple compile tests 10275lt_simple_compile_test_code="package main; func main() { }" 10276 10277# Code to be used in simple link tests 10278lt_simple_link_test_code='package main; func main() { }' 10279 10280# ltmain only uses $CC for tagged configurations so make sure $CC is set. 10281_LT_TAG_COMPILER 10282 10283# save warnings/boilerplate of simple test code 10284_LT_COMPILER_BOILERPLATE 10285_LT_LINKER_BOILERPLATE 10286 10287# Allow CC to be a program name with arguments. 10288lt_save_CC=$CC 10289lt_save_CFLAGS=$CFLAGS 10290lt_save_GCC=$GCC 10291GCC=yes 10292CC=${GOC-"gccgo"} 10293CFLAGS=$GOFLAGS 10294compiler=$CC 10295_LT_TAGVAR(compiler, $1)=$CC 10296_LT_TAGVAR(LD, $1)=$LD 10297_LT_CC_BASENAME([$compiler]) 10298 10299# Go did not exist at the time GCC didn't implicitly link libc in. 10300_LT_TAGVAR(archive_cmds_need_lc, $1)=no 10301 10302_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 10303_LT_TAGVAR(reload_flag, $1)=$reload_flag 10304_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 10305 10306if test -n "$compiler"; then 10307 _LT_COMPILER_NO_RTTI($1) 10308 _LT_COMPILER_PIC($1) 10309 _LT_COMPILER_C_O($1) 10310 _LT_COMPILER_FILE_LOCKS($1) 10311 _LT_LINKER_SHLIBS($1) 10312 _LT_LINKER_HARDCODE_LIBPATH($1) 10313 10314 _LT_CONFIG($1) 10315fi 10316 10317AC_LANG_RESTORE 10318 10319GCC=$lt_save_GCC 10320CC=$lt_save_CC 10321CFLAGS=$lt_save_CFLAGS 10322])# _LT_LANG_GO_CONFIG 10323 10324 10325# _LT_LANG_RC_CONFIG([TAG]) 10326# ------------------------- 10327# Ensure that the configuration variables for the Windows resource compiler 10328# are suitably defined. These variables are subsequently used by _LT_CONFIG 10329# to write the compiler configuration to 'libtool'. 10330m4_defun([_LT_LANG_RC_CONFIG], 10331[AC_REQUIRE([LT_PROG_RC])dnl 10332AC_LANG_SAVE 10333 10334# Source file extension for RC test sources. 10335ac_ext=rc 10336 10337# Object file extension for compiled RC test sources. 10338objext=o 10339_LT_TAGVAR(objext, $1)=$objext 10340 10341# Code to be used in simple compile tests 10342lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 10343 10344# Code to be used in simple link tests 10345lt_simple_link_test_code=$lt_simple_compile_test_code 10346 10347# ltmain only uses $CC for tagged configurations so make sure $CC is set. 10348_LT_TAG_COMPILER 10349 10350# save warnings/boilerplate of simple test code 10351_LT_COMPILER_BOILERPLATE 10352_LT_LINKER_BOILERPLATE 10353 10354# Allow CC to be a program name with arguments. 10355lt_save_CC=$CC 10356lt_save_CFLAGS=$CFLAGS 10357lt_save_GCC=$GCC 10358GCC= 10359CC=${RC-"windres"} 10360CFLAGS= 10361compiler=$CC 10362_LT_TAGVAR(compiler, $1)=$CC 10363_LT_CC_BASENAME([$compiler]) 10364_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 10365 10366if test -n "$compiler"; then 10367 : 10368 _LT_CONFIG($1) 10369fi 10370 10371GCC=$lt_save_GCC 10372AC_LANG_RESTORE 10373CC=$lt_save_CC 10374CFLAGS=$lt_save_CFLAGS 10375])# _LT_LANG_RC_CONFIG 10376 10377 10378# LT_PROG_GCJ 10379# ----------- 10380AC_DEFUN([LT_PROG_GCJ], 10381[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 10382 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 10383 [AC_CHECK_TOOL(GCJ, gcj,) 10384 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 10385 AC_SUBST(GCJFLAGS)])])[]dnl 10386]) 10387 10388# Old name: 10389AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 10390dnl aclocal-1.4 backwards compatibility: 10391dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 10392 10393 10394# LT_PROG_GO 10395# ---------- 10396AC_DEFUN([LT_PROG_GO], 10397[AC_CHECK_TOOL(GOC, gccgo,) 10398]) 10399 10400 10401# LT_PROG_RC 10402# ---------- 10403AC_DEFUN([LT_PROG_RC], 10404[AC_CHECK_TOOL(RC, windres,) 10405]) 10406 10407# Old name: 10408AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 10409dnl aclocal-1.4 backwards compatibility: 10410dnl AC_DEFUN([LT_AC_PROG_RC], []) 10411 10412 10413# _LT_DECL_EGREP 10414# -------------- 10415# If we don't have a new enough Autoconf to choose the best grep 10416# available, choose the one first in the user's PATH. 10417m4_defun([_LT_DECL_EGREP], 10418[AC_REQUIRE([AC_PROG_EGREP])dnl 10419AC_REQUIRE([AC_PROG_FGREP])dnl 10420test -z "$GREP" && GREP=grep 10421_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 10422_LT_DECL([], [EGREP], [1], [An ERE matcher]) 10423_LT_DECL([], [FGREP], [1], [A literal string matcher]) 10424dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 10425AC_SUBST([GREP]) 10426]) 10427 10428 10429# _LT_DECL_OBJDUMP 10430# -------------- 10431# If we don't have a new enough Autoconf to choose the best objdump 10432# available, choose the one first in the user's PATH. 10433m4_defun([_LT_DECL_OBJDUMP], 10434[AC_CHECK_TOOL(OBJDUMP, objdump, false) 10435test -z "$OBJDUMP" && OBJDUMP=objdump 10436_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 10437AC_SUBST([OBJDUMP]) 10438]) 10439 10440# _LT_DECL_DLLTOOL 10441# ---------------- 10442# Ensure DLLTOOL variable is set. 10443m4_defun([_LT_DECL_DLLTOOL], 10444[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 10445test -z "$DLLTOOL" && DLLTOOL=dlltool 10446_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 10447AC_SUBST([DLLTOOL]) 10448]) 10449 10450# _LT_DECL_SED 10451# ------------ 10452# Check for a fully-functional sed program, that truncates 10453# as few characters as possible. Prefer GNU sed if found. 10454m4_defun([_LT_DECL_SED], 10455[AC_PROG_SED 10456test -z "$SED" && SED=sed 10457Xsed="$SED -e 1s/^X//" 10458_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 10459_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 10460 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 10461])# _LT_DECL_SED 10462 10463m4_ifndef([AC_PROG_SED], [ 10464# NOTE: This macro has been submitted for inclusion into # 10465# GNU Autoconf as AC_PROG_SED. When it is available in # 10466# a released version of Autoconf we should remove this # 10467# macro and use it instead. # 10468 10469m4_defun([AC_PROG_SED], 10470[AC_MSG_CHECKING([for a sed that does not truncate output]) 10471AC_CACHE_VAL(lt_cv_path_SED, 10472[# Loop through the user's path and test for sed and gsed. 10473# Then use that list of sed's as ones to test for truncation. 10474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10475for as_dir in $PATH 10476do 10477 IFS=$as_save_IFS 10478 test -z "$as_dir" && as_dir=. 10479 for lt_ac_prog in sed gsed; do 10480 for ac_exec_ext in '' $ac_executable_extensions; do 10481 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 10482 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 10483 fi 10484 done 10485 done 10486done 10487IFS=$as_save_IFS 10488lt_ac_max=0 10489lt_ac_count=0 10490# Add /usr/xpg4/bin/sed as it is typically found on Solaris 10491# along with /bin/sed that truncates output. 10492for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 10493 test ! -f "$lt_ac_sed" && continue 10494 cat /dev/null > conftest.in 10495 lt_ac_count=0 10496 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 10497 # Check for GNU sed and select it if it is found. 10498 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 10499 lt_cv_path_SED=$lt_ac_sed 10500 break 10501 fi 10502 while true; do 10503 cat conftest.in conftest.in >conftest.tmp 10504 mv conftest.tmp conftest.in 10505 cp conftest.in conftest.nl 10506 echo >>conftest.nl 10507 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 10508 cmp -s conftest.out conftest.nl || break 10509 # 10000 chars as input seems more than enough 10510 test 10 -lt "$lt_ac_count" && break 10511 lt_ac_count=`expr $lt_ac_count + 1` 10512 if test "$lt_ac_count" -gt "$lt_ac_max"; then 10513 lt_ac_max=$lt_ac_count 10514 lt_cv_path_SED=$lt_ac_sed 10515 fi 10516 done 10517done 10518]) 10519SED=$lt_cv_path_SED 10520AC_SUBST([SED]) 10521AC_MSG_RESULT([$SED]) 10522])#AC_PROG_SED 10523])#m4_ifndef 10524 10525# Old name: 10526AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 10527dnl aclocal-1.4 backwards compatibility: 10528dnl AC_DEFUN([LT_AC_PROG_SED], []) 10529 10530 10531# _LT_CHECK_SHELL_FEATURES 10532# ------------------------ 10533# Find out whether the shell is Bourne or XSI compatible, 10534# or has some other useful features. 10535m4_defun([_LT_CHECK_SHELL_FEATURES], 10536[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 10537 lt_unset=unset 10538else 10539 lt_unset=false 10540fi 10541_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 10542 10543# test EBCDIC or ASCII 10544case `echo X|tr X '\101'` in 10545 A) # ASCII based system 10546 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 10547 lt_SP2NL='tr \040 \012' 10548 lt_NL2SP='tr \015\012 \040\040' 10549 ;; 10550 *) # EBCDIC based system 10551 lt_SP2NL='tr \100 \n' 10552 lt_NL2SP='tr \r\n \100\100' 10553 ;; 10554esac 10555_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 10556_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 10557])# _LT_CHECK_SHELL_FEATURES 10558 10559 10560# _LT_PATH_CONVERSION_FUNCTIONS 10561# ----------------------------- 10562# Determine what file name conversion functions should be used by 10563# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 10564# for certain cross-compile configurations and native mingw. 10565m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 10566[AC_REQUIRE([AC_CANONICAL_HOST])dnl 10567AC_REQUIRE([AC_CANONICAL_BUILD])dnl 10568AC_MSG_CHECKING([how to convert $build file names to $host format]) 10569AC_CACHE_VAL(lt_cv_to_host_file_cmd, 10570[case $host in 10571 *-*-mingw* ) 10572 case $build in 10573 *-*-mingw* ) # actually msys 10574 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 10575 ;; 10576 *-*-cygwin* ) 10577 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 10578 ;; 10579 * ) # otherwise, assume *nix 10580 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 10581 ;; 10582 esac 10583 ;; 10584 *-*-cygwin* ) 10585 case $build in 10586 *-*-mingw* ) # actually msys 10587 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 10588 ;; 10589 *-*-cygwin* ) 10590 lt_cv_to_host_file_cmd=func_convert_file_noop 10591 ;; 10592 * ) # otherwise, assume *nix 10593 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 10594 ;; 10595 esac 10596 ;; 10597 * ) # unhandled hosts (and "normal" native builds) 10598 lt_cv_to_host_file_cmd=func_convert_file_noop 10599 ;; 10600esac 10601]) 10602to_host_file_cmd=$lt_cv_to_host_file_cmd 10603AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 10604_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 10605 [0], [convert $build file names to $host format])dnl 10606 10607AC_MSG_CHECKING([how to convert $build file names to toolchain format]) 10608AC_CACHE_VAL(lt_cv_to_tool_file_cmd, 10609[#assume ordinary cross tools, or native build. 10610lt_cv_to_tool_file_cmd=func_convert_file_noop 10611case $host in 10612 *-*-mingw* ) 10613 case $build in 10614 *-*-mingw* ) # actually msys 10615 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 10616 ;; 10617 esac 10618 ;; 10619esac 10620]) 10621to_tool_file_cmd=$lt_cv_to_tool_file_cmd 10622AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 10623_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 10624 [0], [convert $build files to toolchain format])dnl 10625])# _LT_PATH_CONVERSION_FUNCTIONS 10626 10627# Helper functions for option handling. -*- Autoconf -*- 10628# 10629# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 10630# Foundation, Inc. 10631# Written by Gary V. Vaughan, 2004 10632# 10633# This file is free software; the Free Software Foundation gives 10634# unlimited permission to copy and/or distribute it, with or without 10635# modifications, as long as this notice is preserved. 10636 10637# serial 8 ltoptions.m4 10638 10639# This is to help aclocal find these macros, as it can't see m4_define. 10640AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 10641 10642 10643# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 10644# ------------------------------------------ 10645m4_define([_LT_MANGLE_OPTION], 10646[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 10647 10648 10649# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 10650# --------------------------------------- 10651# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 10652# matching handler defined, dispatch to it. Other OPTION-NAMEs are 10653# saved as a flag. 10654m4_define([_LT_SET_OPTION], 10655[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 10656m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 10657 _LT_MANGLE_DEFUN([$1], [$2]), 10658 [m4_warning([Unknown $1 option '$2'])])[]dnl 10659]) 10660 10661 10662# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 10663# ------------------------------------------------------------ 10664# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 10665m4_define([_LT_IF_OPTION], 10666[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 10667 10668 10669# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 10670# ------------------------------------------------------- 10671# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 10672# are set. 10673m4_define([_LT_UNLESS_OPTIONS], 10674[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 10675 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 10676 [m4_define([$0_found])])])[]dnl 10677m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 10678])[]dnl 10679]) 10680 10681 10682# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 10683# ---------------------------------------- 10684# OPTION-LIST is a space-separated list of Libtool options associated 10685# with MACRO-NAME. If any OPTION has a matching handler declared with 10686# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 10687# the unknown option and exit. 10688m4_defun([_LT_SET_OPTIONS], 10689[# Set options 10690m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 10691 [_LT_SET_OPTION([$1], _LT_Option)]) 10692 10693m4_if([$1],[LT_INIT],[ 10694 dnl 10695 dnl Simply set some default values (i.e off) if boolean options were not 10696 dnl specified: 10697 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 10698 ]) 10699 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 10700 ]) 10701 dnl 10702 dnl If no reference was made to various pairs of opposing options, then 10703 dnl we run the default mode handler for the pair. For example, if neither 10704 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 10705 dnl archives by default: 10706 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 10707 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 10708 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 10709 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 10710 [_LT_ENABLE_FAST_INSTALL]) 10711 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 10712 [_LT_WITH_AIX_SONAME([aix])]) 10713 ]) 10714])# _LT_SET_OPTIONS 10715 10716 10717 10718# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 10719# ----------------------------------------- 10720m4_define([_LT_MANGLE_DEFUN], 10721[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 10722 10723 10724# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 10725# ----------------------------------------------- 10726m4_define([LT_OPTION_DEFINE], 10727[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 10728])# LT_OPTION_DEFINE 10729 10730 10731# dlopen 10732# ------ 10733LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 10734]) 10735 10736AU_DEFUN([AC_LIBTOOL_DLOPEN], 10737[_LT_SET_OPTION([LT_INIT], [dlopen]) 10738AC_DIAGNOSE([obsolete], 10739[$0: Remove this warning and the call to _LT_SET_OPTION when you 10740put the 'dlopen' option into LT_INIT's first parameter.]) 10741]) 10742 10743dnl aclocal-1.4 backwards compatibility: 10744dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 10745 10746 10747# win32-dll 10748# --------- 10749# Declare package support for building win32 dll's. 10750LT_OPTION_DEFINE([LT_INIT], [win32-dll], 10751[enable_win32_dll=yes 10752 10753case $host in 10754*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 10755 AC_CHECK_TOOL(AS, as, false) 10756 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 10757 AC_CHECK_TOOL(OBJDUMP, objdump, false) 10758 ;; 10759esac 10760 10761test -z "$AS" && AS=as 10762_LT_DECL([], [AS], [1], [Assembler program])dnl 10763 10764test -z "$DLLTOOL" && DLLTOOL=dlltool 10765_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 10766 10767test -z "$OBJDUMP" && OBJDUMP=objdump 10768_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 10769])# win32-dll 10770 10771AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 10772[AC_REQUIRE([AC_CANONICAL_HOST])dnl 10773_LT_SET_OPTION([LT_INIT], [win32-dll]) 10774AC_DIAGNOSE([obsolete], 10775[$0: Remove this warning and the call to _LT_SET_OPTION when you 10776put the 'win32-dll' option into LT_INIT's first parameter.]) 10777]) 10778 10779dnl aclocal-1.4 backwards compatibility: 10780dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 10781 10782 10783# _LT_ENABLE_SHARED([DEFAULT]) 10784# ---------------------------- 10785# implement the --enable-shared flag, and supports the 'shared' and 10786# 'disable-shared' LT_INIT options. 10787# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 10788m4_define([_LT_ENABLE_SHARED], 10789[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 10790AC_ARG_ENABLE([shared], 10791 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 10792 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 10793 [p=${PACKAGE-default} 10794 case $enableval in 10795 yes) enable_shared=yes ;; 10796 no) enable_shared=no ;; 10797 *) 10798 enable_shared=no 10799 # Look at the argument we got. We use all the common list separators. 10800 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 10801 for pkg in $enableval; do 10802 IFS=$lt_save_ifs 10803 if test "X$pkg" = "X$p"; then 10804 enable_shared=yes 10805 fi 10806 done 10807 IFS=$lt_save_ifs 10808 ;; 10809 esac], 10810 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 10811 10812 _LT_DECL([build_libtool_libs], [enable_shared], [0], 10813 [Whether or not to build shared libraries]) 10814])# _LT_ENABLE_SHARED 10815 10816LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 10817LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 10818 10819# Old names: 10820AC_DEFUN([AC_ENABLE_SHARED], 10821[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 10822]) 10823 10824AC_DEFUN([AC_DISABLE_SHARED], 10825[_LT_SET_OPTION([LT_INIT], [disable-shared]) 10826]) 10827 10828AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 10829AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 10830 10831dnl aclocal-1.4 backwards compatibility: 10832dnl AC_DEFUN([AM_ENABLE_SHARED], []) 10833dnl AC_DEFUN([AM_DISABLE_SHARED], []) 10834 10835 10836 10837# _LT_ENABLE_STATIC([DEFAULT]) 10838# ---------------------------- 10839# implement the --enable-static flag, and support the 'static' and 10840# 'disable-static' LT_INIT options. 10841# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 10842m4_define([_LT_ENABLE_STATIC], 10843[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 10844AC_ARG_ENABLE([static], 10845 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 10846 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 10847 [p=${PACKAGE-default} 10848 case $enableval in 10849 yes) enable_static=yes ;; 10850 no) enable_static=no ;; 10851 *) 10852 enable_static=no 10853 # Look at the argument we got. We use all the common list separators. 10854 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 10855 for pkg in $enableval; do 10856 IFS=$lt_save_ifs 10857 if test "X$pkg" = "X$p"; then 10858 enable_static=yes 10859 fi 10860 done 10861 IFS=$lt_save_ifs 10862 ;; 10863 esac], 10864 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 10865 10866 _LT_DECL([build_old_libs], [enable_static], [0], 10867 [Whether or not to build static libraries]) 10868])# _LT_ENABLE_STATIC 10869 10870LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 10871LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 10872 10873# Old names: 10874AC_DEFUN([AC_ENABLE_STATIC], 10875[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 10876]) 10877 10878AC_DEFUN([AC_DISABLE_STATIC], 10879[_LT_SET_OPTION([LT_INIT], [disable-static]) 10880]) 10881 10882AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 10883AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 10884 10885dnl aclocal-1.4 backwards compatibility: 10886dnl AC_DEFUN([AM_ENABLE_STATIC], []) 10887dnl AC_DEFUN([AM_DISABLE_STATIC], []) 10888 10889 10890 10891# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 10892# ---------------------------------- 10893# implement the --enable-fast-install flag, and support the 'fast-install' 10894# and 'disable-fast-install' LT_INIT options. 10895# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 10896m4_define([_LT_ENABLE_FAST_INSTALL], 10897[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 10898AC_ARG_ENABLE([fast-install], 10899 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 10900 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 10901 [p=${PACKAGE-default} 10902 case $enableval in 10903 yes) enable_fast_install=yes ;; 10904 no) enable_fast_install=no ;; 10905 *) 10906 enable_fast_install=no 10907 # Look at the argument we got. We use all the common list separators. 10908 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 10909 for pkg in $enableval; do 10910 IFS=$lt_save_ifs 10911 if test "X$pkg" = "X$p"; then 10912 enable_fast_install=yes 10913 fi 10914 done 10915 IFS=$lt_save_ifs 10916 ;; 10917 esac], 10918 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 10919 10920_LT_DECL([fast_install], [enable_fast_install], [0], 10921 [Whether or not to optimize for fast installation])dnl 10922])# _LT_ENABLE_FAST_INSTALL 10923 10924LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 10925LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 10926 10927# Old names: 10928AU_DEFUN([AC_ENABLE_FAST_INSTALL], 10929[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 10930AC_DIAGNOSE([obsolete], 10931[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10932the 'fast-install' option into LT_INIT's first parameter.]) 10933]) 10934 10935AU_DEFUN([AC_DISABLE_FAST_INSTALL], 10936[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 10937AC_DIAGNOSE([obsolete], 10938[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10939the 'disable-fast-install' option into LT_INIT's first parameter.]) 10940]) 10941 10942dnl aclocal-1.4 backwards compatibility: 10943dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 10944dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 10945 10946 10947# _LT_WITH_AIX_SONAME([DEFAULT]) 10948# ---------------------------------- 10949# implement the --with-aix-soname flag, and support the `aix-soname=aix' 10950# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 10951# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 10952m4_define([_LT_WITH_AIX_SONAME], 10953[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 10954shared_archive_member_spec= 10955case $host,$enable_shared in 10956power*-*-aix[[5-9]]*,yes) 10957 AC_MSG_CHECKING([which variant of shared library versioning to provide]) 10958 AC_ARG_WITH([aix-soname], 10959 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 10960 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 10961 [case $withval in 10962 aix|svr4|both) 10963 ;; 10964 *) 10965 AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 10966 ;; 10967 esac 10968 lt_cv_with_aix_soname=$with_aix_soname], 10969 [AC_CACHE_VAL([lt_cv_with_aix_soname], 10970 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 10971 with_aix_soname=$lt_cv_with_aix_soname]) 10972 AC_MSG_RESULT([$with_aix_soname]) 10973 if test aix != "$with_aix_soname"; then 10974 # For the AIX way of multilib, we name the shared archive member 10975 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 10976 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 10977 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 10978 # the AIX toolchain works better with OBJECT_MODE set (default 32). 10979 if test 64 = "${OBJECT_MODE-32}"; then 10980 shared_archive_member_spec=shr_64 10981 else 10982 shared_archive_member_spec=shr 10983 fi 10984 fi 10985 ;; 10986*) 10987 with_aix_soname=aix 10988 ;; 10989esac 10990 10991_LT_DECL([], [shared_archive_member_spec], [0], 10992 [Shared archive member basename, for filename based shared library versioning on AIX])dnl 10993])# _LT_WITH_AIX_SONAME 10994 10995LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 10996LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 10997LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 10998 10999 11000# _LT_WITH_PIC([MODE]) 11001# -------------------- 11002# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 11003# LT_INIT options. 11004# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 11005m4_define([_LT_WITH_PIC], 11006[AC_ARG_WITH([pic], 11007 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 11008 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 11009 [lt_p=${PACKAGE-default} 11010 case $withval in 11011 yes|no) pic_mode=$withval ;; 11012 *) 11013 pic_mode=default 11014 # Look at the argument we got. We use all the common list separators. 11015 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11016 for lt_pkg in $withval; do 11017 IFS=$lt_save_ifs 11018 if test "X$lt_pkg" = "X$lt_p"; then 11019 pic_mode=yes 11020 fi 11021 done 11022 IFS=$lt_save_ifs 11023 ;; 11024 esac], 11025 [pic_mode=m4_default([$1], [default])]) 11026 11027_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 11028])# _LT_WITH_PIC 11029 11030LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 11031LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 11032 11033# Old name: 11034AU_DEFUN([AC_LIBTOOL_PICMODE], 11035[_LT_SET_OPTION([LT_INIT], [pic-only]) 11036AC_DIAGNOSE([obsolete], 11037[$0: Remove this warning and the call to _LT_SET_OPTION when you 11038put the 'pic-only' option into LT_INIT's first parameter.]) 11039]) 11040 11041dnl aclocal-1.4 backwards compatibility: 11042dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 11043 11044 11045m4_define([_LTDL_MODE], []) 11046LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 11047 [m4_define([_LTDL_MODE], [nonrecursive])]) 11048LT_OPTION_DEFINE([LTDL_INIT], [recursive], 11049 [m4_define([_LTDL_MODE], [recursive])]) 11050LT_OPTION_DEFINE([LTDL_INIT], [subproject], 11051 [m4_define([_LTDL_MODE], [subproject])]) 11052 11053m4_define([_LTDL_TYPE], []) 11054LT_OPTION_DEFINE([LTDL_INIT], [installable], 11055 [m4_define([_LTDL_TYPE], [installable])]) 11056LT_OPTION_DEFINE([LTDL_INIT], [convenience], 11057 [m4_define([_LTDL_TYPE], [convenience])]) 11058 11059# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 11060# 11061# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 11062# Foundation, Inc. 11063# Written by Gary V. Vaughan, 2004 11064# 11065# This file is free software; the Free Software Foundation gives 11066# unlimited permission to copy and/or distribute it, with or without 11067# modifications, as long as this notice is preserved. 11068 11069# serial 6 ltsugar.m4 11070 11071# This is to help aclocal find these macros, as it can't see m4_define. 11072AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 11073 11074 11075# lt_join(SEP, ARG1, [ARG2...]) 11076# ----------------------------- 11077# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 11078# associated separator. 11079# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 11080# versions in m4sugar had bugs. 11081m4_define([lt_join], 11082[m4_if([$#], [1], [], 11083 [$#], [2], [[$2]], 11084 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 11085m4_define([_lt_join], 11086[m4_if([$#$2], [2], [], 11087 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 11088 11089 11090# lt_car(LIST) 11091# lt_cdr(LIST) 11092# ------------ 11093# Manipulate m4 lists. 11094# These macros are necessary as long as will still need to support 11095# Autoconf-2.59, which quotes differently. 11096m4_define([lt_car], [[$1]]) 11097m4_define([lt_cdr], 11098[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 11099 [$#], 1, [], 11100 [m4_dquote(m4_shift($@))])]) 11101m4_define([lt_unquote], $1) 11102 11103 11104# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 11105# ------------------------------------------ 11106# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 11107# Note that neither SEPARATOR nor STRING are expanded; they are appended 11108# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 11109# No SEPARATOR is output if MACRO-NAME was previously undefined (different 11110# than defined and empty). 11111# 11112# This macro is needed until we can rely on Autoconf 2.62, since earlier 11113# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 11114m4_define([lt_append], 11115[m4_define([$1], 11116 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 11117 11118 11119 11120# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 11121# ---------------------------------------------------------- 11122# Produce a SEP delimited list of all paired combinations of elements of 11123# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 11124# has the form PREFIXmINFIXSUFFIXn. 11125# Needed until we can rely on m4_combine added in Autoconf 2.62. 11126m4_define([lt_combine], 11127[m4_if(m4_eval([$# > 3]), [1], 11128 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 11129[[m4_foreach([_Lt_prefix], [$2], 11130 [m4_foreach([_Lt_suffix], 11131 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 11132 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 11133 11134 11135# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 11136# ----------------------------------------------------------------------- 11137# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 11138# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 11139m4_define([lt_if_append_uniq], 11140[m4_ifdef([$1], 11141 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 11142 [lt_append([$1], [$2], [$3])$4], 11143 [$5])], 11144 [lt_append([$1], [$2], [$3])$4])]) 11145 11146 11147# lt_dict_add(DICT, KEY, VALUE) 11148# ----------------------------- 11149m4_define([lt_dict_add], 11150[m4_define([$1($2)], [$3])]) 11151 11152 11153# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 11154# -------------------------------------------- 11155m4_define([lt_dict_add_subkey], 11156[m4_define([$1($2:$3)], [$4])]) 11157 11158 11159# lt_dict_fetch(DICT, KEY, [SUBKEY]) 11160# ---------------------------------- 11161m4_define([lt_dict_fetch], 11162[m4_ifval([$3], 11163 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 11164 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 11165 11166 11167# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 11168# ----------------------------------------------------------------- 11169m4_define([lt_if_dict_fetch], 11170[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 11171 [$5], 11172 [$6])]) 11173 11174 11175# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 11176# -------------------------------------------------------------- 11177m4_define([lt_dict_filter], 11178[m4_if([$5], [], [], 11179 [lt_join(m4_quote(m4_default([$4], [[, ]])), 11180 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 11181 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 11182]) 11183 11184# ltversion.m4 -- version numbers -*- Autoconf -*- 11185# 11186# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 11187# Written by Scott James Remnant, 2004 11188# 11189# This file is free software; the Free Software Foundation gives 11190# unlimited permission to copy and/or distribute it, with or without 11191# modifications, as long as this notice is preserved. 11192 11193# @configure_input@ 11194 11195# serial 4179 ltversion.m4 11196# This file is part of GNU Libtool 11197 11198m4_define([LT_PACKAGE_VERSION], [2.4.6]) 11199m4_define([LT_PACKAGE_REVISION], [2.4.6]) 11200 11201AC_DEFUN([LTVERSION_VERSION], 11202[macro_version='2.4.6' 11203macro_revision='2.4.6' 11204_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 11205_LT_DECL(, macro_revision, 0) 11206]) 11207 11208# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 11209# 11210# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 11211# Foundation, Inc. 11212# Written by Scott James Remnant, 2004. 11213# 11214# This file is free software; the Free Software Foundation gives 11215# unlimited permission to copy and/or distribute it, with or without 11216# modifications, as long as this notice is preserved. 11217 11218# serial 5 lt~obsolete.m4 11219 11220# These exist entirely to fool aclocal when bootstrapping libtool. 11221# 11222# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 11223# which have later been changed to m4_define as they aren't part of the 11224# exported API, or moved to Autoconf or Automake where they belong. 11225# 11226# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 11227# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 11228# using a macro with the same name in our local m4/libtool.m4 it'll 11229# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 11230# and doesn't know about Autoconf macros at all.) 11231# 11232# So we provide this file, which has a silly filename so it's always 11233# included after everything else. This provides aclocal with the 11234# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 11235# because those macros already exist, or will be overwritten later. 11236# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 11237# 11238# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 11239# Yes, that means every name once taken will need to remain here until 11240# we give up compatibility with versions before 1.7, at which point 11241# we need to keep only those names which we still refer to. 11242 11243# This is to help aclocal find these macros, as it can't see m4_define. 11244AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 11245 11246m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 11247m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 11248m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 11249m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 11250m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 11251m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 11252m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 11253m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 11254m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 11255m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 11256m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 11257m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 11258m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 11259m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 11260m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 11261m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 11262m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 11263m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 11264m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 11265m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 11266m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 11267m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 11268m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 11269m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 11270m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 11271m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 11272m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 11273m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 11274m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 11275m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 11276m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 11277m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 11278m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 11279m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 11280m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 11281m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 11282m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 11283m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 11284m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 11285m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 11286m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 11287m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 11288m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 11289m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 11290m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 11291m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 11292m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 11293m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 11294m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 11295m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 11296m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 11297m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 11298m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 11299m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 11300m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 11301m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 11302m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 11303m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 11304m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 11305m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 11306m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 11307 11308# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 11309# serial 11 (pkg-config-0.29.1) 11310 11311dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 11312dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 11313dnl 11314dnl This program is free software; you can redistribute it and/or modify 11315dnl it under the terms of the GNU General Public License as published by 11316dnl the Free Software Foundation; either version 2 of the License, or 11317dnl (at your option) any later version. 11318dnl 11319dnl This program is distributed in the hope that it will be useful, but 11320dnl WITHOUT ANY WARRANTY; without even the implied warranty of 11321dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11322dnl General Public License for more details. 11323dnl 11324dnl You should have received a copy of the GNU General Public License 11325dnl along with this program; if not, write to the Free Software 11326dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 11327dnl 02111-1307, USA. 11328dnl 11329dnl As a special exception to the GNU General Public License, if you 11330dnl distribute this file as part of a program that contains a 11331dnl configuration script generated by Autoconf, you may include it under 11332dnl the same distribution terms that you use for the rest of that 11333dnl program. 11334 11335dnl PKG_PREREQ(MIN-VERSION) 11336dnl ----------------------- 11337dnl Since: 0.29 11338dnl 11339dnl Verify that the version of the pkg-config macros are at least 11340dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 11341dnl installed version of pkg-config, this checks the developer's version 11342dnl of pkg.m4 when generating configure. 11343dnl 11344dnl To ensure that this macro is defined, also add: 11345dnl m4_ifndef([PKG_PREREQ], 11346dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 11347dnl 11348dnl See the "Since" comment for each macro you use to see what version 11349dnl of the macros you require. 11350m4_defun([PKG_PREREQ], 11351[m4_define([PKG_MACROS_VERSION], [0.29.1]) 11352m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 11353 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 11354])dnl PKG_PREREQ 11355 11356dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 11357dnl ---------------------------------- 11358dnl Since: 0.16 11359dnl 11360dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 11361dnl first found in the path. Checks that the version of pkg-config found 11362dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 11363dnl used since that's the first version where most current features of 11364dnl pkg-config existed. 11365AC_DEFUN([PKG_PROG_PKG_CONFIG], 11366[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 11367m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 11368m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 11369AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 11370AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 11371AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 11372 11373if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 11374 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 11375fi 11376if test -n "$PKG_CONFIG"; then 11377 _pkg_min_version=m4_default([$1], [0.9.0]) 11378 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 11379 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 11380 AC_MSG_RESULT([yes]) 11381 else 11382 AC_MSG_RESULT([no]) 11383 PKG_CONFIG="" 11384 fi 11385fi[]dnl 11386])dnl PKG_PROG_PKG_CONFIG 11387 11388dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 11389dnl ------------------------------------------------------------------- 11390dnl Since: 0.18 11391dnl 11392dnl Check to see whether a particular set of modules exists. Similar to 11393dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 11394dnl 11395dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11396dnl only at the first occurence in configure.ac, so if the first place 11397dnl it's called might be skipped (such as if it is within an "if", you 11398dnl have to call PKG_CHECK_EXISTS manually 11399AC_DEFUN([PKG_CHECK_EXISTS], 11400[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 11401if test -n "$PKG_CONFIG" && \ 11402 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 11403 m4_default([$2], [:]) 11404m4_ifvaln([$3], [else 11405 $3])dnl 11406fi]) 11407 11408dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 11409dnl --------------------------------------------- 11410dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 11411dnl pkg_failed based on the result. 11412m4_define([_PKG_CONFIG], 11413[if test -n "$$1"; then 11414 pkg_cv_[]$1="$$1" 11415 elif test -n "$PKG_CONFIG"; then 11416 PKG_CHECK_EXISTS([$3], 11417 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 11418 test "x$?" != "x0" && pkg_failed=yes ], 11419 [pkg_failed=yes]) 11420 else 11421 pkg_failed=untried 11422fi[]dnl 11423])dnl _PKG_CONFIG 11424 11425dnl _PKG_SHORT_ERRORS_SUPPORTED 11426dnl --------------------------- 11427dnl Internal check to see if pkg-config supports short errors. 11428AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 11429[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11430if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 11431 _pkg_short_errors_supported=yes 11432else 11433 _pkg_short_errors_supported=no 11434fi[]dnl 11435])dnl _PKG_SHORT_ERRORS_SUPPORTED 11436 11437 11438dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 11439dnl [ACTION-IF-NOT-FOUND]) 11440dnl -------------------------------------------------------------- 11441dnl Since: 0.4.0 11442dnl 11443dnl Note that if there is a possibility the first call to 11444dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 11445dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 11446AC_DEFUN([PKG_CHECK_MODULES], 11447[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 11448AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 11449AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 11450 11451pkg_failed=no 11452AC_MSG_CHECKING([for $1]) 11453 11454_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 11455_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 11456 11457m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 11458and $1[]_LIBS to avoid the need to call pkg-config. 11459See the pkg-config man page for more details.]) 11460 11461if test $pkg_failed = yes; then 11462 AC_MSG_RESULT([no]) 11463 _PKG_SHORT_ERRORS_SUPPORTED 11464 if test $_pkg_short_errors_supported = yes; then 11465 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 11466 else 11467 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 11468 fi 11469 # Put the nasty error message in config.log where it belongs 11470 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 11471 11472 m4_default([$4], [AC_MSG_ERROR( 11473[Package requirements ($2) were not met: 11474 11475$$1_PKG_ERRORS 11476 11477Consider adjusting the PKG_CONFIG_PATH environment variable if you 11478installed software in a non-standard prefix. 11479 11480_PKG_TEXT])[]dnl 11481 ]) 11482elif test $pkg_failed = untried; then 11483 AC_MSG_RESULT([no]) 11484 m4_default([$4], [AC_MSG_FAILURE( 11485[The pkg-config script could not be found or is too old. Make sure it 11486is in your PATH or set the PKG_CONFIG environment variable to the full 11487path to pkg-config. 11488 11489_PKG_TEXT 11490 11491To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 11492 ]) 11493else 11494 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 11495 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 11496 AC_MSG_RESULT([yes]) 11497 $3 11498fi[]dnl 11499])dnl PKG_CHECK_MODULES 11500 11501 11502dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 11503dnl [ACTION-IF-NOT-FOUND]) 11504dnl --------------------------------------------------------------------- 11505dnl Since: 0.29 11506dnl 11507dnl Checks for existence of MODULES and gathers its build flags with 11508dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 11509dnl and VARIABLE-PREFIX_LIBS from --libs. 11510dnl 11511dnl Note that if there is a possibility the first call to 11512dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 11513dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 11514dnl configure.ac. 11515AC_DEFUN([PKG_CHECK_MODULES_STATIC], 11516[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 11517_save_PKG_CONFIG=$PKG_CONFIG 11518PKG_CONFIG="$PKG_CONFIG --static" 11519PKG_CHECK_MODULES($@) 11520PKG_CONFIG=$_save_PKG_CONFIG[]dnl 11521])dnl PKG_CHECK_MODULES_STATIC 11522 11523 11524dnl PKG_INSTALLDIR([DIRECTORY]) 11525dnl ------------------------- 11526dnl Since: 0.27 11527dnl 11528dnl Substitutes the variable pkgconfigdir as the location where a module 11529dnl should install pkg-config .pc files. By default the directory is 11530dnl $libdir/pkgconfig, but the default can be changed by passing 11531dnl DIRECTORY. The user can override through the --with-pkgconfigdir 11532dnl parameter. 11533AC_DEFUN([PKG_INSTALLDIR], 11534[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 11535m4_pushdef([pkg_description], 11536 [pkg-config installation directory @<:@]pkg_default[@:>@]) 11537AC_ARG_WITH([pkgconfigdir], 11538 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 11539 [with_pkgconfigdir=]pkg_default) 11540AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 11541m4_popdef([pkg_default]) 11542m4_popdef([pkg_description]) 11543])dnl PKG_INSTALLDIR 11544 11545 11546dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 11547dnl -------------------------------- 11548dnl Since: 0.27 11549dnl 11550dnl Substitutes the variable noarch_pkgconfigdir as the location where a 11551dnl module should install arch-independent pkg-config .pc files. By 11552dnl default the directory is $datadir/pkgconfig, but the default can be 11553dnl changed by passing DIRECTORY. The user can override through the 11554dnl --with-noarch-pkgconfigdir parameter. 11555AC_DEFUN([PKG_NOARCH_INSTALLDIR], 11556[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 11557m4_pushdef([pkg_description], 11558 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 11559AC_ARG_WITH([noarch-pkgconfigdir], 11560 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 11561 [with_noarch_pkgconfigdir=]pkg_default) 11562AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 11563m4_popdef([pkg_default]) 11564m4_popdef([pkg_description]) 11565])dnl PKG_NOARCH_INSTALLDIR 11566 11567 11568dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 11569dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 11570dnl ------------------------------------------- 11571dnl Since: 0.28 11572dnl 11573dnl Retrieves the value of the pkg-config variable for the given module. 11574AC_DEFUN([PKG_CHECK_VAR], 11575[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 11576AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 11577 11578_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 11579AS_VAR_COPY([$1], [pkg_cv_][$1]) 11580 11581AS_VAR_IF([$1], [""], [$5], [$4])dnl 11582])dnl PKG_CHECK_VAR 11583 11584dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 11585dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 11586dnl [DESCRIPTION], [DEFAULT]) 11587dnl ------------------------------------------ 11588dnl 11589dnl Prepare a "--with-" configure option using the lowercase 11590dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 11591dnl PKG_CHECK_MODULES in a single macro. 11592AC_DEFUN([PKG_WITH_MODULES], 11593[ 11594m4_pushdef([with_arg], m4_tolower([$1])) 11595 11596m4_pushdef([description], 11597 [m4_default([$5], [build with ]with_arg[ support])]) 11598 11599m4_pushdef([def_arg], [m4_default([$6], [auto])]) 11600m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 11601m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 11602 11603m4_case(def_arg, 11604 [yes],[m4_pushdef([with_without], [--without-]with_arg)], 11605 [m4_pushdef([with_without],[--with-]with_arg)]) 11606 11607AC_ARG_WITH(with_arg, 11608 AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 11609 [AS_TR_SH([with_]with_arg)=def_arg]) 11610 11611AS_CASE([$AS_TR_SH([with_]with_arg)], 11612 [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 11613 [auto],[PKG_CHECK_MODULES([$1],[$2], 11614 [m4_n([def_action_if_found]) $3], 11615 [m4_n([def_action_if_not_found]) $4])]) 11616 11617m4_popdef([with_arg]) 11618m4_popdef([description]) 11619m4_popdef([def_arg]) 11620 11621])dnl PKG_WITH_MODULES 11622 11623dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 11624dnl [DESCRIPTION], [DEFAULT]) 11625dnl ----------------------------------------------- 11626dnl 11627dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 11628dnl check._[VARIABLE-PREFIX] is exported as make variable. 11629AC_DEFUN([PKG_HAVE_WITH_MODULES], 11630[ 11631PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 11632 11633AM_CONDITIONAL([HAVE_][$1], 11634 [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 11635])dnl PKG_HAVE_WITH_MODULES 11636 11637dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 11638dnl [DESCRIPTION], [DEFAULT]) 11639dnl ------------------------------------------------------ 11640dnl 11641dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 11642dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 11643dnl and preprocessor variable. 11644AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 11645[ 11646PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 11647 11648AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 11649 [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 11650])dnl PKG_HAVE_DEFINE_WITH_MODULES 11651 11652# Copyright (C) 2002-2020 Free Software Foundation, Inc. 11653# 11654# This file is free software; the Free Software Foundation 11655# gives unlimited permission to copy and/or distribute it, 11656# with or without modifications, as long as this notice is preserved. 11657 11658# AM_AUTOMAKE_VERSION(VERSION) 11659# ---------------------------- 11660# Automake X.Y traces this macro to ensure aclocal.m4 has been 11661# generated from the m4 files accompanying Automake X.Y. 11662# (This private macro should not be called outside this file.) 11663AC_DEFUN([AM_AUTOMAKE_VERSION], 11664[am__api_version='1.16' 11665dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11666dnl require some minimum version. Point them to the right macro. 11667m4_if([$1], [1.16.2], [], 11668 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11669]) 11670 11671# _AM_AUTOCONF_VERSION(VERSION) 11672# ----------------------------- 11673# aclocal traces this macro to find the Autoconf version. 11674# This is a private macro too. Using m4_define simplifies 11675# the logic in aclocal, which can simply ignore this definition. 11676m4_define([_AM_AUTOCONF_VERSION], []) 11677 11678# AM_SET_CURRENT_AUTOMAKE_VERSION 11679# ------------------------------- 11680# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11681# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11682AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11683[AM_AUTOMAKE_VERSION([1.16.2])dnl 11684m4_ifndef([AC_AUTOCONF_VERSION], 11685 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11686_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11687 11688# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11689 11690# Copyright (C) 2001-2020 Free Software Foundation, Inc. 11691# 11692# This file is free software; the Free Software Foundation 11693# gives unlimited permission to copy and/or distribute it, 11694# with or without modifications, as long as this notice is preserved. 11695 11696# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11697# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11698# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11699# 11700# Of course, Automake must honor this variable whenever it calls a 11701# tool from the auxiliary directory. The problem is that $srcdir (and 11702# therefore $ac_aux_dir as well) can be either absolute or relative, 11703# depending on how configure is run. This is pretty annoying, since 11704# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11705# source directory, any form will work fine, but in subdirectories a 11706# relative path needs to be adjusted first. 11707# 11708# $ac_aux_dir/missing 11709# fails when called from a subdirectory if $ac_aux_dir is relative 11710# $top_srcdir/$ac_aux_dir/missing 11711# fails if $ac_aux_dir is absolute, 11712# fails when called from a subdirectory in a VPATH build with 11713# a relative $ac_aux_dir 11714# 11715# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11716# are both prefixed by $srcdir. In an in-source build this is usually 11717# harmless because $srcdir is '.', but things will broke when you 11718# start a VPATH build or use an absolute $srcdir. 11719# 11720# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11721# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11722# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11723# and then we would define $MISSING as 11724# MISSING="\${SHELL} $am_aux_dir/missing" 11725# This will work as long as MISSING is not called from configure, because 11726# unfortunately $(top_srcdir) has no meaning in configure. 11727# However there are other variables, like CC, which are often used in 11728# configure, and could therefore not use this "fixed" $ac_aux_dir. 11729# 11730# Another solution, used here, is to always expand $ac_aux_dir to an 11731# absolute PATH. The drawback is that using absolute paths prevent a 11732# configured tree to be moved without reconfiguration. 11733 11734AC_DEFUN([AM_AUX_DIR_EXPAND], 11735[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11736# Expand $ac_aux_dir to an absolute path. 11737am_aux_dir=`cd "$ac_aux_dir" && pwd` 11738]) 11739 11740# AM_CONDITIONAL -*- Autoconf -*- 11741 11742# Copyright (C) 1997-2020 Free Software Foundation, Inc. 11743# 11744# This file is free software; the Free Software Foundation 11745# gives unlimited permission to copy and/or distribute it, 11746# with or without modifications, as long as this notice is preserved. 11747 11748# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11749# ------------------------------------- 11750# Define a conditional. 11751AC_DEFUN([AM_CONDITIONAL], 11752[AC_PREREQ([2.52])dnl 11753 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11754 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11755AC_SUBST([$1_TRUE])dnl 11756AC_SUBST([$1_FALSE])dnl 11757_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11758_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11759m4_define([_AM_COND_VALUE_$1], [$2])dnl 11760if $2; then 11761 $1_TRUE= 11762 $1_FALSE='#' 11763else 11764 $1_TRUE='#' 11765 $1_FALSE= 11766fi 11767AC_CONFIG_COMMANDS_PRE( 11768[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11769 AC_MSG_ERROR([[conditional "$1" was never defined. 11770Usually this means the macro was only invoked conditionally.]]) 11771fi])]) 11772 11773# Copyright (C) 1999-2020 Free Software Foundation, Inc. 11774# 11775# This file is free software; the Free Software Foundation 11776# gives unlimited permission to copy and/or distribute it, 11777# with or without modifications, as long as this notice is preserved. 11778 11779 11780# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11781# written in clear, in which case automake, when reading aclocal.m4, 11782# will think it sees a *use*, and therefore will trigger all it's 11783# C support machinery. Also note that it means that autoscan, seeing 11784# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11785 11786 11787# _AM_DEPENDENCIES(NAME) 11788# ---------------------- 11789# See how the compiler implements dependency checking. 11790# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11791# We try a few techniques and use that to set a single cache variable. 11792# 11793# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11794# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11795# dependency, and given that the user is not expected to run this macro, 11796# just rely on AC_PROG_CC. 11797AC_DEFUN([_AM_DEPENDENCIES], 11798[AC_REQUIRE([AM_SET_DEPDIR])dnl 11799AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11800AC_REQUIRE([AM_MAKE_INCLUDE])dnl 11801AC_REQUIRE([AM_DEP_TRACK])dnl 11802 11803m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11804 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11805 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11806 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11807 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11808 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11809 [depcc="$$1" am_compiler_list=]) 11810 11811AC_CACHE_CHECK([dependency style of $depcc], 11812 [am_cv_$1_dependencies_compiler_type], 11813[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11814 # We make a subdir and do the tests there. Otherwise we can end up 11815 # making bogus files that we don't know about and never remove. For 11816 # instance it was reported that on HP-UX the gcc test will end up 11817 # making a dummy file named 'D' -- because '-MD' means "put the output 11818 # in D". 11819 rm -rf conftest.dir 11820 mkdir conftest.dir 11821 # Copy depcomp to subdir because otherwise we won't find it if we're 11822 # using a relative directory. 11823 cp "$am_depcomp" conftest.dir 11824 cd conftest.dir 11825 # We will build objects and dependencies in a subdirectory because 11826 # it helps to detect inapplicable dependency modes. For instance 11827 # both Tru64's cc and ICC support -MD to output dependencies as a 11828 # side effect of compilation, but ICC will put the dependencies in 11829 # the current directory while Tru64 will put them in the object 11830 # directory. 11831 mkdir sub 11832 11833 am_cv_$1_dependencies_compiler_type=none 11834 if test "$am_compiler_list" = ""; then 11835 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11836 fi 11837 am__universal=false 11838 m4_case([$1], [CC], 11839 [case " $depcc " in #( 11840 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11841 esac], 11842 [CXX], 11843 [case " $depcc " in #( 11844 *\ -arch\ *\ -arch\ *) am__universal=true ;; 11845 esac]) 11846 11847 for depmode in $am_compiler_list; do 11848 # Setup a source with many dependencies, because some compilers 11849 # like to wrap large dependency lists on column 80 (with \), and 11850 # we should not choose a depcomp mode which is confused by this. 11851 # 11852 # We need to recreate these files for each test, as the compiler may 11853 # overwrite some of them when testing with obscure command lines. 11854 # This happens at least with the AIX C compiler. 11855 : > sub/conftest.c 11856 for i in 1 2 3 4 5 6; do 11857 echo '#include "conftst'$i'.h"' >> sub/conftest.c 11858 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11859 # Solaris 10 /bin/sh. 11860 echo '/* dummy */' > sub/conftst$i.h 11861 done 11862 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11863 11864 # We check with '-c' and '-o' for the sake of the "dashmstdout" 11865 # mode. It turns out that the SunPro C++ compiler does not properly 11866 # handle '-M -o', and we need to detect this. Also, some Intel 11867 # versions had trouble with output in subdirs. 11868 am__obj=sub/conftest.${OBJEXT-o} 11869 am__minus_obj="-o $am__obj" 11870 case $depmode in 11871 gcc) 11872 # This depmode causes a compiler race in universal mode. 11873 test "$am__universal" = false || continue 11874 ;; 11875 nosideeffect) 11876 # After this tag, mechanisms are not by side-effect, so they'll 11877 # only be used when explicitly requested. 11878 if test "x$enable_dependency_tracking" = xyes; then 11879 continue 11880 else 11881 break 11882 fi 11883 ;; 11884 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11885 # This compiler won't grok '-c -o', but also, the minuso test has 11886 # not run yet. These depmodes are late enough in the game, and 11887 # so weak that their functioning should not be impacted. 11888 am__obj=conftest.${OBJEXT-o} 11889 am__minus_obj= 11890 ;; 11891 none) break ;; 11892 esac 11893 if depmode=$depmode \ 11894 source=sub/conftest.c object=$am__obj \ 11895 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11896 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11897 >/dev/null 2>conftest.err && 11898 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11899 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11900 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11901 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11902 # icc doesn't choke on unknown options, it will just issue warnings 11903 # or remarks (even with -Werror). So we grep stderr for any message 11904 # that says an option was ignored or not supported. 11905 # When given -MP, icc 7.0 and 7.1 complain thusly: 11906 # icc: Command line warning: ignoring option '-M'; no argument required 11907 # The diagnosis changed in icc 8.0: 11908 # icc: Command line remark: option '-MP' not supported 11909 if (grep 'ignoring option' conftest.err || 11910 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11911 am_cv_$1_dependencies_compiler_type=$depmode 11912 break 11913 fi 11914 fi 11915 done 11916 11917 cd .. 11918 rm -rf conftest.dir 11919else 11920 am_cv_$1_dependencies_compiler_type=none 11921fi 11922]) 11923AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11924AM_CONDITIONAL([am__fastdep$1], [ 11925 test "x$enable_dependency_tracking" != xno \ 11926 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11927]) 11928 11929 11930# AM_SET_DEPDIR 11931# ------------- 11932# Choose a directory name for dependency files. 11933# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11934AC_DEFUN([AM_SET_DEPDIR], 11935[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11936AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11937]) 11938 11939 11940# AM_DEP_TRACK 11941# ------------ 11942AC_DEFUN([AM_DEP_TRACK], 11943[AC_ARG_ENABLE([dependency-tracking], [dnl 11944AS_HELP_STRING( 11945 [--enable-dependency-tracking], 11946 [do not reject slow dependency extractors]) 11947AS_HELP_STRING( 11948 [--disable-dependency-tracking], 11949 [speeds up one-time build])]) 11950if test "x$enable_dependency_tracking" != xno; then 11951 am_depcomp="$ac_aux_dir/depcomp" 11952 AMDEPBACKSLASH='\' 11953 am__nodep='_no' 11954fi 11955AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11956AC_SUBST([AMDEPBACKSLASH])dnl 11957_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11958AC_SUBST([am__nodep])dnl 11959_AM_SUBST_NOTMAKE([am__nodep])dnl 11960]) 11961 11962# Generate code to set up dependency tracking. -*- Autoconf -*- 11963 11964# Copyright (C) 1999-2020 Free Software Foundation, Inc. 11965# 11966# This file is free software; the Free Software Foundation 11967# gives unlimited permission to copy and/or distribute it, 11968# with or without modifications, as long as this notice is preserved. 11969 11970# _AM_OUTPUT_DEPENDENCY_COMMANDS 11971# ------------------------------ 11972AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11973[{ 11974 # Older Autoconf quotes --file arguments for eval, but not when files 11975 # are listed without --file. Let's play safe and only enable the eval 11976 # if we detect the quoting. 11977 # TODO: see whether this extra hack can be removed once we start 11978 # requiring Autoconf 2.70 or later. 11979 AS_CASE([$CONFIG_FILES], 11980 [*\'*], [eval set x "$CONFIG_FILES"], 11981 [*], [set x $CONFIG_FILES]) 11982 shift 11983 # Used to flag and report bootstrapping failures. 11984 am_rc=0 11985 for am_mf 11986 do 11987 # Strip MF so we end up with the name of the file. 11988 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 11989 # Check whether this is an Automake generated Makefile which includes 11990 # dependency-tracking related rules and includes. 11991 # Grep'ing the whole file directly is not great: AIX grep has a line 11992 # limit of 2048, but all sed's we know have understand at least 4000. 11993 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 11994 || continue 11995 am_dirpart=`AS_DIRNAME(["$am_mf"])` 11996 am_filepart=`AS_BASENAME(["$am_mf"])` 11997 AM_RUN_LOG([cd "$am_dirpart" \ 11998 && sed -e '/# am--include-marker/d' "$am_filepart" \ 11999 | $MAKE -f - am--depfiles]) || am_rc=$? 12000 done 12001 if test $am_rc -ne 0; then 12002 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 12003 for automatic dependency tracking. If GNU make was not used, consider 12004 re-running the configure script with MAKE="gmake" (or whatever is 12005 necessary). You can also try re-running configure with the 12006 '--disable-dependency-tracking' option to at least be able to build 12007 the package (albeit without support for automatic dependency tracking).]) 12008 fi 12009 AS_UNSET([am_dirpart]) 12010 AS_UNSET([am_filepart]) 12011 AS_UNSET([am_mf]) 12012 AS_UNSET([am_rc]) 12013 rm -f conftest-deps.mk 12014} 12015])# _AM_OUTPUT_DEPENDENCY_COMMANDS 12016 12017 12018# AM_OUTPUT_DEPENDENCY_COMMANDS 12019# ----------------------------- 12020# This macro should only be invoked once -- use via AC_REQUIRE. 12021# 12022# This code is only required when automatic dependency tracking is enabled. 12023# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 12024# order to bootstrap the dependency handling code. 12025AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 12026[AC_CONFIG_COMMANDS([depfiles], 12027 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 12028 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 12029 12030 12031# Copyright (C) 1996-2020 Free Software Foundation, Inc. 12032# 12033# This file is free software; the Free Software Foundation 12034# gives unlimited permission to copy and/or distribute it, 12035# with or without modifications, as long as this notice is preserved. 12036 12037AC_DEFUN([AM_WITH_DMALLOC], 12038[AC_MSG_CHECKING([if malloc debugging is wanted]) 12039AC_ARG_WITH([dmalloc], 12040[AS_HELP_STRING([--with-dmalloc], 12041 [use dmalloc, as in http://www.dmalloc.com])], 12042[if test "$withval" = yes; then 12043 AC_MSG_RESULT([yes]) 12044 AC_DEFINE([WITH_DMALLOC], [1], 12045 [Define if using the dmalloc debugging malloc package]) 12046 LIBS="$LIBS -ldmalloc" 12047 LDFLAGS="$LDFLAGS -g" 12048else 12049 AC_MSG_RESULT([no]) 12050fi], [AC_MSG_RESULT([no])]) 12051]) 12052 12053# Do all the work for Automake. -*- Autoconf -*- 12054 12055# Copyright (C) 1996-2020 Free Software Foundation, Inc. 12056# 12057# This file is free software; the Free Software Foundation 12058# gives unlimited permission to copy and/or distribute it, 12059# with or without modifications, as long as this notice is preserved. 12060 12061# This macro actually does too much. Some checks are only needed if 12062# your package does certain things. But this isn't really a big deal. 12063 12064dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 12065m4_define([AC_PROG_CC], 12066m4_defn([AC_PROG_CC]) 12067[_AM_PROG_CC_C_O 12068]) 12069 12070# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 12071# AM_INIT_AUTOMAKE([OPTIONS]) 12072# ----------------------------------------------- 12073# The call with PACKAGE and VERSION arguments is the old style 12074# call (pre autoconf-2.50), which is being phased out. PACKAGE 12075# and VERSION should now be passed to AC_INIT and removed from 12076# the call to AM_INIT_AUTOMAKE. 12077# We support both call styles for the transition. After 12078# the next Automake release, Autoconf can make the AC_INIT 12079# arguments mandatory, and then we can depend on a new Autoconf 12080# release and drop the old call support. 12081AC_DEFUN([AM_INIT_AUTOMAKE], 12082[AC_PREREQ([2.65])dnl 12083dnl Autoconf wants to disallow AM_ names. We explicitly allow 12084dnl the ones we care about. 12085m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 12086AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 12087AC_REQUIRE([AC_PROG_INSTALL])dnl 12088if test "`cd $srcdir && pwd`" != "`pwd`"; then 12089 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 12090 # is not polluted with repeated "-I." 12091 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 12092 # test to see if srcdir already configured 12093 if test -f $srcdir/config.status; then 12094 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 12095 fi 12096fi 12097 12098# test whether we have cygpath 12099if test -z "$CYGPATH_W"; then 12100 if (cygpath --version) >/dev/null 2>/dev/null; then 12101 CYGPATH_W='cygpath -w' 12102 else 12103 CYGPATH_W=echo 12104 fi 12105fi 12106AC_SUBST([CYGPATH_W]) 12107 12108# Define the identity of the package. 12109dnl Distinguish between old-style and new-style calls. 12110m4_ifval([$2], 12111[AC_DIAGNOSE([obsolete], 12112 [$0: two- and three-arguments forms are deprecated.]) 12113m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 12114 AC_SUBST([PACKAGE], [$1])dnl 12115 AC_SUBST([VERSION], [$2])], 12116[_AM_SET_OPTIONS([$1])dnl 12117dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 12118m4_if( 12119 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 12120 [ok:ok],, 12121 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 12122 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 12123 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 12124 12125_AM_IF_OPTION([no-define],, 12126[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 12127 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 12128 12129# Some tools Automake needs. 12130AC_REQUIRE([AM_SANITY_CHECK])dnl 12131AC_REQUIRE([AC_ARG_PROGRAM])dnl 12132AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 12133AM_MISSING_PROG([AUTOCONF], [autoconf]) 12134AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 12135AM_MISSING_PROG([AUTOHEADER], [autoheader]) 12136AM_MISSING_PROG([MAKEINFO], [makeinfo]) 12137AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12138AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 12139AC_REQUIRE([AC_PROG_MKDIR_P])dnl 12140# For better backward compatibility. To be removed once Automake 1.9.x 12141# dies out for good. For more background, see: 12142# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 12143# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 12144AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 12145# We need awk for the "check" target (and possibly the TAP driver). The 12146# system "awk" is bad on some platforms. 12147AC_REQUIRE([AC_PROG_AWK])dnl 12148AC_REQUIRE([AC_PROG_MAKE_SET])dnl 12149AC_REQUIRE([AM_SET_LEADING_DOT])dnl 12150_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 12151 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 12152 [_AM_PROG_TAR([v7])])]) 12153_AM_IF_OPTION([no-dependencies],, 12154[AC_PROVIDE_IFELSE([AC_PROG_CC], 12155 [_AM_DEPENDENCIES([CC])], 12156 [m4_define([AC_PROG_CC], 12157 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 12158AC_PROVIDE_IFELSE([AC_PROG_CXX], 12159 [_AM_DEPENDENCIES([CXX])], 12160 [m4_define([AC_PROG_CXX], 12161 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 12162AC_PROVIDE_IFELSE([AC_PROG_OBJC], 12163 [_AM_DEPENDENCIES([OBJC])], 12164 [m4_define([AC_PROG_OBJC], 12165 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 12166AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 12167 [_AM_DEPENDENCIES([OBJCXX])], 12168 [m4_define([AC_PROG_OBJCXX], 12169 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 12170]) 12171AC_REQUIRE([AM_SILENT_RULES])dnl 12172dnl The testsuite driver may need to know about EXEEXT, so add the 12173dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 12174dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 12175AC_CONFIG_COMMANDS_PRE(dnl 12176[m4_provide_if([_AM_COMPILER_EXEEXT], 12177 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 12178 12179# POSIX will say in a future version that running "rm -f" with no argument 12180# is OK; and we want to be able to make that assumption in our Makefile 12181# recipes. So use an aggressive probe to check that the usage we want is 12182# actually supported "in the wild" to an acceptable degree. 12183# See automake bug#10828. 12184# To make any issue more visible, cause the running configure to be aborted 12185# by default if the 'rm' program in use doesn't match our expectations; the 12186# user can still override this though. 12187if rm -f && rm -fr && rm -rf; then : OK; else 12188 cat >&2 <<'END' 12189Oops! 12190 12191Your 'rm' program seems unable to run without file operands specified 12192on the command line, even when the '-f' option is present. This is contrary 12193to the behaviour of most rm programs out there, and not conforming with 12194the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 12195 12196Please tell bug-automake@gnu.org about your system, including the value 12197of your $PATH and any error possibly output before this message. This 12198can help us improve future automake versions. 12199 12200END 12201 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 12202 echo 'Configuration will proceed anyway, since you have set the' >&2 12203 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 12204 echo >&2 12205 else 12206 cat >&2 <<'END' 12207Aborting the configuration process, to ensure you take notice of the issue. 12208 12209You can download and install GNU coreutils to get an 'rm' implementation 12210that behaves properly: <https://www.gnu.org/software/coreutils/>. 12211 12212If you want to complete the configuration process using your problematic 12213'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 12214to "yes", and re-run configure. 12215 12216END 12217 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 12218 fi 12219fi 12220dnl The trailing newline in this macro's definition is deliberate, for 12221dnl backward compatibility and to allow trailing 'dnl'-style comments 12222dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 12223]) 12224 12225dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 12226dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 12227dnl mangled by Autoconf and run in a shell conditional statement. 12228m4_define([_AC_COMPILER_EXEEXT], 12229m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 12230 12231# When config.status generates a header, we must update the stamp-h file. 12232# This file resides in the same directory as the config header 12233# that is generated. The stamp files are numbered to have different names. 12234 12235# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 12236# loop where config.status creates the headers, so we can generate 12237# our stamp files there. 12238AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 12239[# Compute $1's index in $config_headers. 12240_am_arg=$1 12241_am_stamp_count=1 12242for _am_header in $config_headers :; do 12243 case $_am_header in 12244 $_am_arg | $_am_arg:* ) 12245 break ;; 12246 * ) 12247 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 12248 esac 12249done 12250echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 12251 12252# Copyright (C) 2001-2020 Free Software Foundation, Inc. 12253# 12254# This file is free software; the Free Software Foundation 12255# gives unlimited permission to copy and/or distribute it, 12256# with or without modifications, as long as this notice is preserved. 12257 12258# AM_PROG_INSTALL_SH 12259# ------------------ 12260# Define $install_sh. 12261AC_DEFUN([AM_PROG_INSTALL_SH], 12262[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12263if test x"${install_sh+set}" != xset; then 12264 case $am_aux_dir in 12265 *\ * | *\ *) 12266 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 12267 *) 12268 install_sh="\${SHELL} $am_aux_dir/install-sh" 12269 esac 12270fi 12271AC_SUBST([install_sh])]) 12272 12273# Copyright (C) 2003-2020 Free Software Foundation, Inc. 12274# 12275# This file is free software; the Free Software Foundation 12276# gives unlimited permission to copy and/or distribute it, 12277# with or without modifications, as long as this notice is preserved. 12278 12279# Check whether the underlying file-system supports filenames 12280# with a leading dot. For instance MS-DOS doesn't. 12281AC_DEFUN([AM_SET_LEADING_DOT], 12282[rm -rf .tst 2>/dev/null 12283mkdir .tst 2>/dev/null 12284if test -d .tst; then 12285 am__leading_dot=. 12286else 12287 am__leading_dot=_ 12288fi 12289rmdir .tst 2>/dev/null 12290AC_SUBST([am__leading_dot])]) 12291 12292# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 12293# From Jim Meyering 12294 12295# Copyright (C) 1996-2020 Free Software Foundation, Inc. 12296# 12297# This file is free software; the Free Software Foundation 12298# gives unlimited permission to copy and/or distribute it, 12299# with or without modifications, as long as this notice is preserved. 12300 12301# AM_MAINTAINER_MODE([DEFAULT-MODE]) 12302# ---------------------------------- 12303# Control maintainer-specific portions of Makefiles. 12304# Default is to disable them, unless 'enable' is passed literally. 12305# For symmetry, 'disable' may be passed as well. Anyway, the user 12306# can override the default with the --enable/--disable switch. 12307AC_DEFUN([AM_MAINTAINER_MODE], 12308[m4_case(m4_default([$1], [disable]), 12309 [enable], [m4_define([am_maintainer_other], [disable])], 12310 [disable], [m4_define([am_maintainer_other], [enable])], 12311 [m4_define([am_maintainer_other], [enable]) 12312 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 12313AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 12314 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 12315 AC_ARG_ENABLE([maintainer-mode], 12316 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 12317 am_maintainer_other[ make rules and dependencies not useful 12318 (and sometimes confusing) to the casual installer])], 12319 [USE_MAINTAINER_MODE=$enableval], 12320 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 12321 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 12322 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 12323 MAINT=$MAINTAINER_MODE_TRUE 12324 AC_SUBST([MAINT])dnl 12325] 12326) 12327 12328# Check to see how 'make' treats includes. -*- Autoconf -*- 12329 12330# Copyright (C) 2001-2020 Free Software Foundation, Inc. 12331# 12332# This file is free software; the Free Software Foundation 12333# gives unlimited permission to copy and/or distribute it, 12334# with or without modifications, as long as this notice is preserved. 12335 12336# AM_MAKE_INCLUDE() 12337# ----------------- 12338# Check whether make has an 'include' directive that can support all 12339# the idioms we need for our automatic dependency tracking code. 12340AC_DEFUN([AM_MAKE_INCLUDE], 12341[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 12342cat > confinc.mk << 'END' 12343am__doit: 12344 @echo this is the am__doit target >confinc.out 12345.PHONY: am__doit 12346END 12347am__include="#" 12348am__quote= 12349# BSD make does it like this. 12350echo '.include "confinc.mk" # ignored' > confmf.BSD 12351# Other make implementations (GNU, Solaris 10, AIX) do it like this. 12352echo 'include confinc.mk # ignored' > confmf.GNU 12353_am_result=no 12354for s in GNU BSD; do 12355 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 12356 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 12357 ['0:this is the am__doit target'], 12358 [AS_CASE([$s], 12359 [BSD], [am__include='.include' am__quote='"'], 12360 [am__include='include' am__quote=''])]) 12361 if test "$am__include" != "#"; then 12362 _am_result="yes ($s style)" 12363 break 12364 fi 12365done 12366rm -f confinc.* confmf.* 12367AC_MSG_RESULT([${_am_result}]) 12368AC_SUBST([am__include])]) 12369AC_SUBST([am__quote])]) 12370 12371# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 12372 12373# Copyright (C) 1997-2020 Free Software Foundation, Inc. 12374# 12375# This file is free software; the Free Software Foundation 12376# gives unlimited permission to copy and/or distribute it, 12377# with or without modifications, as long as this notice is preserved. 12378 12379# AM_MISSING_PROG(NAME, PROGRAM) 12380# ------------------------------ 12381AC_DEFUN([AM_MISSING_PROG], 12382[AC_REQUIRE([AM_MISSING_HAS_RUN]) 12383$1=${$1-"${am_missing_run}$2"} 12384AC_SUBST($1)]) 12385 12386# AM_MISSING_HAS_RUN 12387# ------------------ 12388# Define MISSING if not defined so far and test if it is modern enough. 12389# If it is, set am_missing_run to use it, otherwise, to nothing. 12390AC_DEFUN([AM_MISSING_HAS_RUN], 12391[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12392AC_REQUIRE_AUX_FILE([missing])dnl 12393if test x"${MISSING+set}" != xset; then 12394 case $am_aux_dir in 12395 *\ * | *\ *) 12396 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 12397 *) 12398 MISSING="\${SHELL} $am_aux_dir/missing" ;; 12399 esac 12400fi 12401# Use eval to expand $SHELL 12402if eval "$MISSING --is-lightweight"; then 12403 am_missing_run="$MISSING " 12404else 12405 am_missing_run= 12406 AC_MSG_WARN(['missing' script is too old or missing]) 12407fi 12408]) 12409 12410# Helper functions for option handling. -*- Autoconf -*- 12411 12412# Copyright (C) 2001-2020 Free Software Foundation, Inc. 12413# 12414# This file is free software; the Free Software Foundation 12415# gives unlimited permission to copy and/or distribute it, 12416# with or without modifications, as long as this notice is preserved. 12417 12418# _AM_MANGLE_OPTION(NAME) 12419# ----------------------- 12420AC_DEFUN([_AM_MANGLE_OPTION], 12421[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 12422 12423# _AM_SET_OPTION(NAME) 12424# -------------------- 12425# Set option NAME. Presently that only means defining a flag for this option. 12426AC_DEFUN([_AM_SET_OPTION], 12427[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 12428 12429# _AM_SET_OPTIONS(OPTIONS) 12430# ------------------------ 12431# OPTIONS is a space-separated list of Automake options. 12432AC_DEFUN([_AM_SET_OPTIONS], 12433[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 12434 12435# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 12436# ------------------------------------------- 12437# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12438AC_DEFUN([_AM_IF_OPTION], 12439[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 12440 12441# Copyright (C) 1999-2020 Free Software Foundation, Inc. 12442# 12443# This file is free software; the Free Software Foundation 12444# gives unlimited permission to copy and/or distribute it, 12445# with or without modifications, as long as this notice is preserved. 12446 12447# _AM_PROG_CC_C_O 12448# --------------- 12449# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 12450# to automatically call this. 12451AC_DEFUN([_AM_PROG_CC_C_O], 12452[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12453AC_REQUIRE_AUX_FILE([compile])dnl 12454AC_LANG_PUSH([C])dnl 12455AC_CACHE_CHECK( 12456 [whether $CC understands -c and -o together], 12457 [am_cv_prog_cc_c_o], 12458 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 12459 # Make sure it works both with $CC and with simple cc. 12460 # Following AC_PROG_CC_C_O, we do the test twice because some 12461 # compilers refuse to overwrite an existing .o file with -o, 12462 # though they will create one. 12463 am_cv_prog_cc_c_o=yes 12464 for am_i in 1 2; do 12465 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 12466 && test -f conftest2.$ac_objext; then 12467 : OK 12468 else 12469 am_cv_prog_cc_c_o=no 12470 break 12471 fi 12472 done 12473 rm -f core conftest* 12474 unset am_i]) 12475if test "$am_cv_prog_cc_c_o" != yes; then 12476 # Losing compiler, so override with the script. 12477 # FIXME: It is wrong to rewrite CC. 12478 # But if we don't then we get into trouble of one sort or another. 12479 # A longer-term fix would be to have automake use am__CC in this case, 12480 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 12481 CC="$am_aux_dir/compile $CC" 12482fi 12483AC_LANG_POP([C])]) 12484 12485# For backward compatibility. 12486AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 12487 12488# Copyright (C) 2001-2020 Free Software Foundation, Inc. 12489# 12490# This file is free software; the Free Software Foundation 12491# gives unlimited permission to copy and/or distribute it, 12492# with or without modifications, as long as this notice is preserved. 12493 12494# AM_RUN_LOG(COMMAND) 12495# ------------------- 12496# Run COMMAND, save the exit status in ac_status, and log it. 12497# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 12498AC_DEFUN([AM_RUN_LOG], 12499[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 12500 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 12501 ac_status=$? 12502 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 12503 (exit $ac_status); }]) 12504 12505# Check to make sure that the build environment is sane. -*- Autoconf -*- 12506 12507# Copyright (C) 1996-2020 Free Software Foundation, Inc. 12508# 12509# This file is free software; the Free Software Foundation 12510# gives unlimited permission to copy and/or distribute it, 12511# with or without modifications, as long as this notice is preserved. 12512 12513# AM_SANITY_CHECK 12514# --------------- 12515AC_DEFUN([AM_SANITY_CHECK], 12516[AC_MSG_CHECKING([whether build environment is sane]) 12517# Reject unsafe characters in $srcdir or the absolute working directory 12518# name. Accept space and tab only in the latter. 12519am_lf=' 12520' 12521case `pwd` in 12522 *[[\\\"\#\$\&\'\`$am_lf]]*) 12523 AC_MSG_ERROR([unsafe absolute working directory name]);; 12524esac 12525case $srcdir in 12526 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12527 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12528esac 12529 12530# Do 'set' in a subshell so we don't clobber the current shell's 12531# arguments. Must try -L first in case configure is actually a 12532# symlink; some systems play weird games with the mod time of symlinks 12533# (eg FreeBSD returns the mod time of the symlink's containing 12534# directory). 12535if ( 12536 am_has_slept=no 12537 for am_try in 1 2; do 12538 echo "timestamp, slept: $am_has_slept" > conftest.file 12539 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12540 if test "$[*]" = "X"; then 12541 # -L didn't work. 12542 set X `ls -t "$srcdir/configure" conftest.file` 12543 fi 12544 if test "$[*]" != "X $srcdir/configure conftest.file" \ 12545 && test "$[*]" != "X conftest.file $srcdir/configure"; then 12546 12547 # If neither matched, then we have a broken ls. This can happen 12548 # if, for instance, CONFIG_SHELL is bash and it inherits a 12549 # broken ls alias from the environment. This has actually 12550 # happened. Such a system could not be considered "sane". 12551 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12552 alias in your environment]) 12553 fi 12554 if test "$[2]" = conftest.file || test $am_try -eq 2; then 12555 break 12556 fi 12557 # Just in case. 12558 sleep 1 12559 am_has_slept=yes 12560 done 12561 test "$[2]" = conftest.file 12562 ) 12563then 12564 # Ok. 12565 : 12566else 12567 AC_MSG_ERROR([newly created file is older than distributed files! 12568Check your system clock]) 12569fi 12570AC_MSG_RESULT([yes]) 12571# If we didn't sleep, we still need to ensure time stamps of config.status and 12572# generated files are strictly newer. 12573am_sleep_pid= 12574if grep 'slept: no' conftest.file >/dev/null 2>&1; then 12575 ( sleep 1 ) & 12576 am_sleep_pid=$! 12577fi 12578AC_CONFIG_COMMANDS_PRE( 12579 [AC_MSG_CHECKING([that generated files are newer than configure]) 12580 if test -n "$am_sleep_pid"; then 12581 # Hide warnings about reused PIDs. 12582 wait $am_sleep_pid 2>/dev/null 12583 fi 12584 AC_MSG_RESULT([done])]) 12585rm -f conftest.file 12586]) 12587 12588# Copyright (C) 2009-2020 Free Software Foundation, Inc. 12589# 12590# This file is free software; the Free Software Foundation 12591# gives unlimited permission to copy and/or distribute it, 12592# with or without modifications, as long as this notice is preserved. 12593 12594# AM_SILENT_RULES([DEFAULT]) 12595# -------------------------- 12596# Enable less verbose build rules; with the default set to DEFAULT 12597# ("yes" being less verbose, "no" or empty being verbose). 12598AC_DEFUN([AM_SILENT_RULES], 12599[AC_ARG_ENABLE([silent-rules], [dnl 12600AS_HELP_STRING( 12601 [--enable-silent-rules], 12602 [less verbose build output (undo: "make V=1")]) 12603AS_HELP_STRING( 12604 [--disable-silent-rules], 12605 [verbose build output (undo: "make V=0")])dnl 12606]) 12607case $enable_silent_rules in @%:@ ((( 12608 yes) AM_DEFAULT_VERBOSITY=0;; 12609 no) AM_DEFAULT_VERBOSITY=1;; 12610 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12611esac 12612dnl 12613dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12614dnl do not support nested variable expansions. 12615dnl See automake bug#9928 and bug#10237. 12616am_make=${MAKE-make} 12617AC_CACHE_CHECK([whether $am_make supports nested variables], 12618 [am_cv_make_support_nested_variables], 12619 [if AS_ECHO([['TRUE=$(BAR$(V)) 12620BAR0=false 12621BAR1=true 12622V=1 12623am__doit: 12624 @$(TRUE) 12625.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12626 am_cv_make_support_nested_variables=yes 12627else 12628 am_cv_make_support_nested_variables=no 12629fi]) 12630if test $am_cv_make_support_nested_variables = yes; then 12631 dnl Using '$V' instead of '$(V)' breaks IRIX make. 12632 AM_V='$(V)' 12633 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12634else 12635 AM_V=$AM_DEFAULT_VERBOSITY 12636 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12637fi 12638AC_SUBST([AM_V])dnl 12639AM_SUBST_NOTMAKE([AM_V])dnl 12640AC_SUBST([AM_DEFAULT_V])dnl 12641AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12642AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12643AM_BACKSLASH='\' 12644AC_SUBST([AM_BACKSLASH])dnl 12645_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12646]) 12647 12648# Copyright (C) 2001-2020 Free Software Foundation, Inc. 12649# 12650# This file is free software; the Free Software Foundation 12651# gives unlimited permission to copy and/or distribute it, 12652# with or without modifications, as long as this notice is preserved. 12653 12654# AM_PROG_INSTALL_STRIP 12655# --------------------- 12656# One issue with vendor 'install' (even GNU) is that you can't 12657# specify the program used to strip binaries. This is especially 12658# annoying in cross-compiling environments, where the build's strip 12659# is unlikely to handle the host's binaries. 12660# Fortunately install-sh will honor a STRIPPROG variable, so we 12661# always use install-sh in "make install-strip", and initialize 12662# STRIPPROG with the value of the STRIP variable (set by the user). 12663AC_DEFUN([AM_PROG_INSTALL_STRIP], 12664[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12665# Installed binaries are usually stripped using 'strip' when the user 12666# run "make install-strip". However 'strip' might not be the right 12667# tool to use in cross-compilation environments, therefore Automake 12668# will honor the 'STRIP' environment variable to overrule this program. 12669dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12670if test "$cross_compiling" != no; then 12671 AC_CHECK_TOOL([STRIP], [strip], :) 12672fi 12673INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12674AC_SUBST([INSTALL_STRIP_PROGRAM])]) 12675 12676# Copyright (C) 2006-2020 Free Software Foundation, Inc. 12677# 12678# This file is free software; the Free Software Foundation 12679# gives unlimited permission to copy and/or distribute it, 12680# with or without modifications, as long as this notice is preserved. 12681 12682# _AM_SUBST_NOTMAKE(VARIABLE) 12683# --------------------------- 12684# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12685# This macro is traced by Automake. 12686AC_DEFUN([_AM_SUBST_NOTMAKE]) 12687 12688# AM_SUBST_NOTMAKE(VARIABLE) 12689# -------------------------- 12690# Public sister of _AM_SUBST_NOTMAKE. 12691AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12692 12693# Check how to create a tarball. -*- Autoconf -*- 12694 12695# Copyright (C) 2004-2020 Free Software Foundation, Inc. 12696# 12697# This file is free software; the Free Software Foundation 12698# gives unlimited permission to copy and/or distribute it, 12699# with or without modifications, as long as this notice is preserved. 12700 12701# _AM_PROG_TAR(FORMAT) 12702# -------------------- 12703# Check how to create a tarball in format FORMAT. 12704# FORMAT should be one of 'v7', 'ustar', or 'pax'. 12705# 12706# Substitute a variable $(am__tar) that is a command 12707# writing to stdout a FORMAT-tarball containing the directory 12708# $tardir. 12709# tardir=directory && $(am__tar) > result.tar 12710# 12711# Substitute a variable $(am__untar) that extract such 12712# a tarball read from stdin. 12713# $(am__untar) < result.tar 12714# 12715AC_DEFUN([_AM_PROG_TAR], 12716[# Always define AMTAR for backward compatibility. Yes, it's still used 12717# in the wild :-( We should find a proper way to deprecate it ... 12718AC_SUBST([AMTAR], ['$${TAR-tar}']) 12719 12720# We'll loop over all known methods to create a tar archive until one works. 12721_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12722 12723m4_if([$1], [v7], 12724 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12725 12726 [m4_case([$1], 12727 [ustar], 12728 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12729 # There is notably a 21 bits limit for the UID and the GID. In fact, 12730 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12731 # and bug#13588). 12732 am_max_uid=2097151 # 2^21 - 1 12733 am_max_gid=$am_max_uid 12734 # The $UID and $GID variables are not portable, so we need to resort 12735 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12736 # below are definitely unexpected, so allow the users to see them 12737 # (that is, avoid stderr redirection). 12738 am_uid=`id -u || echo unknown` 12739 am_gid=`id -g || echo unknown` 12740 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12741 if test $am_uid -le $am_max_uid; then 12742 AC_MSG_RESULT([yes]) 12743 else 12744 AC_MSG_RESULT([no]) 12745 _am_tools=none 12746 fi 12747 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12748 if test $am_gid -le $am_max_gid; then 12749 AC_MSG_RESULT([yes]) 12750 else 12751 AC_MSG_RESULT([no]) 12752 _am_tools=none 12753 fi], 12754 12755 [pax], 12756 [], 12757 12758 [m4_fatal([Unknown tar format])]) 12759 12760 AC_MSG_CHECKING([how to create a $1 tar archive]) 12761 12762 # Go ahead even if we have the value already cached. We do so because we 12763 # need to set the values for the 'am__tar' and 'am__untar' variables. 12764 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12765 12766 for _am_tool in $_am_tools; do 12767 case $_am_tool in 12768 gnutar) 12769 for _am_tar in tar gnutar gtar; do 12770 AM_RUN_LOG([$_am_tar --version]) && break 12771 done 12772 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12773 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12774 am__untar="$_am_tar -xf -" 12775 ;; 12776 plaintar) 12777 # Must skip GNU tar: if it does not support --format= it doesn't create 12778 # ustar tarball either. 12779 (tar --version) >/dev/null 2>&1 && continue 12780 am__tar='tar chf - "$$tardir"' 12781 am__tar_='tar chf - "$tardir"' 12782 am__untar='tar xf -' 12783 ;; 12784 pax) 12785 am__tar='pax -L -x $1 -w "$$tardir"' 12786 am__tar_='pax -L -x $1 -w "$tardir"' 12787 am__untar='pax -r' 12788 ;; 12789 cpio) 12790 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12791 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12792 am__untar='cpio -i -H $1 -d' 12793 ;; 12794 none) 12795 am__tar=false 12796 am__tar_=false 12797 am__untar=false 12798 ;; 12799 esac 12800 12801 # If the value was cached, stop now. We just wanted to have am__tar 12802 # and am__untar set. 12803 test -n "${am_cv_prog_tar_$1}" && break 12804 12805 # tar/untar a dummy directory, and stop if the command works. 12806 rm -rf conftest.dir 12807 mkdir conftest.dir 12808 echo GrepMe > conftest.dir/file 12809 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12810 rm -rf conftest.dir 12811 if test -s conftest.tar; then 12812 AM_RUN_LOG([$am__untar <conftest.tar]) 12813 AM_RUN_LOG([cat conftest.dir/file]) 12814 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12815 fi 12816 done 12817 rm -rf conftest.dir 12818 12819 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12820 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12821 12822AC_SUBST([am__tar]) 12823AC_SUBST([am__untar]) 12824]) # _AM_PROG_TAR 12825 12826m4_include([acinclude.m4]) 12827