1 dnl Check if the compiler can handle unsigned long constants, ie 2ul.
2 AC_DEFUN([AMANDA_C_UNSIGNED_LONG_CONSTANTS],
5 [for working unsigned long constants],
6 amanda_cv_c_unsigned_long_constants,
14 amanda_cv_c_unsigned_long_constants=yes,
15 amanda_cv_c_unsigned_long_constants=no
19 if test "$amanda_cv_c_unsigned_long_constants" = yes; then
20 AC_DEFINE(HAVE_UNSIGNED_LONG_CONSTANTS,1,[Define if the compiler support unsigned long constants. ])
25 dnl Check for the argument type for shmat() and shmdt()
26 AC_DEFUN([AMANDA_FUNC_SHM_ARG_TYPE],
29 [for shmdt() argument type],
30 amanda_cv_shmdt_arg_type,
32 if test "$ac_cv_func_shmget" = yes; then
33 cat <<EOF >conftest.$ac_ext
35 #ifdef HAVE_SYS_TYPES_H
36 # include <sys/types.h>
46 extern "C" void *shmat(int, void *, int);
57 ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >/dev/null 2>/dev/null
59 amanda_cv_shmdt_arg_type=void
61 amanda_cv_shmdt_arg_type=char
65 amanda_cv_shmdt_arg_type=nothing
69 AC_DEFINE_UNQUOTED(SHM_ARG_TYPE,$amanda_cv_shmdt_arg_type,[Define to type of shmget() function argument. ])
73 dnl Figure out the select() argument type.
74 AC_DEFUN([AMANDA_FUNC_SELECT_ARG_TYPE],
77 [for select() argument type],
78 amanda_cv_select_arg_type,
81 cat <<EOF >conftest.$ac_ext
83 #ifdef HAVE_SYS_TIME_H
84 # include <sys/time.h>
86 #ifdef HAVE_SYS_TYPES_H
87 # include <sys/types.h>
89 #ifdef HAVE_SYS_SELECT_H
90 # include <sys/select.h>
92 #ifdef HAVE_SYS_SOCKET_H
93 # include <sys/socket.h>
101 #ifdef FD_SET_POINTER
102 (void)select(0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, 0);
104 (void)select(0, (int *) 0, (int *) 0, (int *) 0, 0);
110 dnl Figure out the select argument type by first trying to
111 dnl compile with the fd_set argument. If the compile fails,
112 dnl then we know to use the int. If it suceeds, then try to
113 dnl use the int. If the int fails, then use fd_set. If
114 dnl both suceeed, then do a line count on the number of
115 dnl lines that the compiler spit out, assuming that the
116 dnl compile outputing more lines had more errors.
117 amanda_cv_select_arg_type=no
118 select_compile="${CC-cc} -c $CFLAGS $CPPFLAGS"
119 $select_compile -DFD_SET_POINTER conftest.$ac_ext 1>conftest.fd_set 2>&1
120 if test $? -ne 0; then
121 amanda_cv_select_arg_type=int
123 if test "$amanda_cv_select_arg_type" = no; then
124 $select_compile conftest.$ac_ext 1>conftest.int 2>&1
125 if test $? -ne 0; then
126 amanda_cv_select_arg_type=fd_set
129 if test "$amanda_cv_select_arg_type" = no; then
130 wc_fdset=`wc -l <conftest.fd_set`
131 wc_int=`wc -l <conftest.int`
132 if test "$wc_fdset" -le "$wc_int"; then
133 amanda_cv_select_arg_type=fd_set
135 amanda_cv_select_arg_type=int
141 AC_DEFINE_UNQUOTED(SELECT_ARG_TYPE,$amanda_cv_select_arg_type,[Define to type of select arguments. ])
145 dnl Check if setsockopt can use the SO_SNDTIMEO option.
146 dnl This defines HAVE_SO_SNDTIMEO if setsockopt works
147 dnl with SO_SNDTIMEO.
148 AC_DEFUN([AMANDA_FUNC_SETSOCKOPT_SO_SNDTIMEO],
151 [for setsockopt SO_SNDTIMEO option],
152 amanda_cv_setsockopt_SO_SNDTIMEO,
156 #include <sys/types.h>
157 #include <sys/socket.h>
158 #ifdef TIME_WITH_SYS_TIME
159 # include <sys/time.h>
162 # ifdef HAVE_SYS_TIME_H
163 # include <sys/time.h>
171 int sock = socket(AF_INET, SOCK_STREAM, 0);
172 struct timeval timeout;
175 return (setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO,
176 (void *)&timeout, sizeof(timeout)));
182 amanda_cv_setsockopt_SO_SNDTIMEO=yes,
183 amanda_cv_setsockopt_SO_SNDTIMEO=no,
184 amanda_cv_setsockopt_SO_SNDTIMEO=no
188 if test "$amanda_cv_setsockopt_SO_SNDTIMEO" = yes; then
189 AC_DEFINE(HAVE_SO_SNDTIMEO,1,[Define if SO_SNDTIMEO is available. ])
194 dnl Find out how {awk,gawk,nawk,mawk} likes to assign variables, if it
195 dnl can do so at all.
196 AC_DEFUN([AMANDA_PROG_AWK_VAR],
198 AC_REQUIRE([AC_PROG_AWK])
200 [for $AWK command line variable assignment],
201 amanda_cv_awk_var_assignment,
203 echo 'BEGIN{print i; exit}' > conftest.awk
204 result=`$AWK -f conftest.awk i=xx | wc -c`
205 if test "$result" -le 1; then
206 result=`$AWK -f conftest.awk -v i=xx | wc -c`
207 if test "$result" -le 1; then
208 amanda_cv_awk_var_assignment=no
210 amanda_cv_awk_var_assignment="yes with -v"
213 amanda_cv_awk_var_assignment="yes"
218 AWK_VAR_ASSIGNMENT_OPT=
219 case "$amanda_cv_awk_var_assignment" in
224 HAVE_AWK_WITH_VAR=yes
227 HAVE_AWK_WITH_VAR=yes
228 AWK_VAR_ASSIGNMENT_OPT=-v
231 AC_SUBST(AWK_VAR_ASSIGNMENT_OPT)
235 dnl Check for the one or two argument version of gettimeofday.
236 AC_DEFUN([AMANDA_FUNC_GETTIMEOFDAY_ARGS],
238 AC_REQUIRE([AC_HEADER_TIME])
240 [for gettimeofday number of arguments],
241 amanda_cv_gettimeofday_args,
245 #ifdef TIME_WITH_SYS_TIME
246 # include <sys/time.h>
249 # ifdef HAVE_SYS_TIME_H
250 # include <sys/time.h>
258 struct timezone zone;
259 gettimeofday(&val, &zone);
261 amanda_cv_gettimeofday_args=2,
262 amanda_cv_gettimeofday_args=1
266 if test "$amanda_cv_gettimeofday_args" = 2; then
267 AC_DEFINE(HAVE_TWO_ARG_GETTIMEOFDAY,1,[Define if gettimeofday takes two arguments. ])
274 dnl Check if the compiler understands volatile.
275 AC_DEFUN([AMANDA_C_VOLATILE],
278 [for working volatile],
279 amanda_cv_c_volatile,
283 volatile int aaa = 0;
285 amanda_cv_c_volatile=yes,
286 amanda_cv_c_volatile=no
290 if test $amanda_cv_c_volatile = no; then
291 AC_DEFINE(volatile, [],[Define to empty if the compiler does not support volatile. ])
297 dnl Check for if pid_t is a long, int, or short.
298 AC_DEFUN([AMANDA_TYPE_PID_T],
300 AC_REQUIRE([AC_TYPE_PID_T])
301 AC_CACHE_CHECK([for pid_t type], amanda_cv_pid_type,
303 amanda_cv_pid_type=unknown
304 if test "$ac_cv_type_pid_t" = no; then
305 amanda_cv_pid_type=int
307 for TEST_amanda_cv_pid_type in long short int; do
308 if test $amanda_cv_pid_type = unknown; then
309 AC_EGREP_CPP(typedef.*${TEST_amanda_cv_pid_type}.*pid_t,
311 #include <sys/types.h>
317 amanda_cv_pid_type=$TEST_amanda_cv_pid_type)
319 if test $amanda_cv_pid_type = unknown; then
320 AC_EGREP_CPP(ZZZZ.*${TEST_amanda_cv_pid_type},
322 #include <sys/types.h>
329 amanda_cv_pid_type=$TEST_amanda_cv_pid_type)
332 if test $amanda_cv_pid_type = unknown; then
333 amanda_cv_pid_type=int
337 case $amanda_cv_pid_type in
338 int) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%d",[Define to printf formatting string to print a PID. ]) ;;
339 long) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%ld") ;;
340 short) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%d") ;;
347 dnl ICE_CHECK_DECL (FUNCTION, HEADER-FILE...)
348 dnl If FUNCTION is available, define `HAVE_FUNCTION'. If it is declared
349 dnl in one of the headers named in the whitespace-separated list
350 dnl HEADER_FILE, define `HAVE_FUNCTION_DECL` (in all capitals).
352 AC_DEFUN([ICE_CHECK_DECL],
355 AC_CHECK_FUNCS($1, ice_have_$1=yes)
356 if test "${ice_have_$1}" = yes; then
357 AC_MSG_CHECKING(for $1 declaration in $2)
358 AC_CACHE_VAL(ice_cv_have_$1_decl,
360 ice_cv_have_$1_decl=no
362 ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
363 ice_re_word='(^|[^a-zA-Z0-9_])'
366 # Check for ordinary declaration
367 AC_EGREP_HEADER([${ice_re_word}$1[ ]*\(], $header,
368 ice_cv_have_$1_decl=yes)
369 if test "$ice_cv_have_$1_decl" = yes; then
372 # Check for "fixed" declaration like "getpid _PARAMS((int))"
373 AC_EGREP_HEADER([${ice_re_word}$1[ ]*$ice_re_params\(\(], $header,
374 ice_cv_have_$1_decl=yes)
375 if test "$ice_cv_have_$1_decl" = yes; then
380 AC_MSG_RESULT($ice_cv_have_$1_decl)
381 if test "$ice_cv_have_$1_decl" = yes; then
382 AC_DEFINE_UNQUOTED([HAVE_]translit($1,[a-z],[A-Z])[_DECL],1,[Define if $1 is declared. ])
386 dnl Test for the presence of <sys/wait.h>, 'union wait', arg-type of 'wait()'.
387 dnl by T.E.Dickey" , Jim Spath <jspath@mail.bcpl.lib.md.us>
389 dnl FIXME: These tests should have been in autoconf 1.11!
391 dnl Note that we cannot simply grep for 'union wait' in the wait.h file,
392 dnl because some Posix systems turn this on only when a BSD variable is
393 dnl defined. Since I'm trying to do without special defines, I'll live
394 dnl with the default behavior of the include-file.
396 dnl I do _2_ compile checks, because we may have union-wait, but the
397 dnl prototype for 'wait()' may want an int.
399 dnl Don't use HAVE_UNION_WAIT, because the autoconf documentation implies
400 dnl that if we've got union-wait, we'll automatically use it.
402 dnl Garrett Wollman adds:
403 dnl The tests described above don't quite do the right thing,
404 dnl since some systems have hacks which allow `union wait' to
405 dnl still work even though `int' is preferred (and generates
406 dnl fewer warnings). Since all of these systems use prototypes,
407 dnl we can use the prototype of wait(2) to disambiguate them.
409 dnl Alexandre Oliva adds:
410 dnl A single compile check is enough. If we don't have union wait,
411 dnl it's obvious that the test will fail, and that we must use int.
412 dnl If we do, the prototype (on STDC systems) and WIFEXITED will tell
413 dnl whether we're supposed to be using union wait instead of int.
417 AC_REQUIRE([AC_TYPE_PID_T])
418 AC_HAVE_HEADERS(sys/wait.h wait.h)
419 AC_CACHE_CHECK([whether wait uses union wait], [cf_cv_arg_union_wait],
421 #include <sys/types.h>
424 # include <sys/wait.h>
432 pid_t wait(union wait *);
436 wait(&x); i = WIFEXITED(x)
437 ], [cf_cv_arg_union_wait=yes], [cf_cv_arg_union_wait=no])])
438 if test $cf_cv_arg_union_wait = yes; then
439 AC_DEFINE(WAIT_USES_UNION,1,[Defined if wait() puts the status in a union wait instead of int. ])
444 dnl @synopsis AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])]
446 dnl the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
447 dnl existence of an include file <stdint.h> that defines a set of
448 dnl typedefs, especially uint8_t,int32_t,uintptr_t.
449 dnl Many older installations will not provide this file, but some will
450 dnl have the very same definitions in <inttypes.h>. In other enviroments
451 dnl we can use the inet-types in <sys/types.h> which would define the
452 dnl typedefs int8_t and u_int8_t respectivly.
454 dnl This macros will create a local "_stdint.h" or the headerfile given as
455 dnl an argument. In many cases that file will just "#include <stdint.h>"
456 dnl or "#include <inttypes.h>", while in other environments it will provide
457 dnl the set of basic 'stdint's definitions/typedefs:
458 dnl int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t
459 dnl int_least32_t.. int_fast32_t.. intmax_t
460 dnl which may or may not rely on the definitions of other files,
461 dnl or using the AC_CHECK_SIZEOF macro to determine the actual
462 dnl sizeof each type.
464 dnl if your header files require the stdint-types you will want to create an
465 dnl installable file mylib-int.h that all your other installable header
466 dnl may include. So if you have a library package named "mylib", just use
467 dnl AX_CREATE_STDINT_H(mylib-int.h)
468 dnl in configure.ac and go to install that very header file in Makefile.am
469 dnl along with the other headers (mylib.h) - and the mylib-specific headers
470 dnl can simply use "#include <mylib-int.h>" to obtain the stdint-types.
472 dnl Remember, if the system already had a valid <stdint.h>, the generated
473 dnl file will include it directly. No need for fuzzy HAVE_STDINT_H things...
475 dnl @, (status: used on new platforms) (see http://ac-archive.sf.net/gstdint/)
476 dnl @version $Id: acinclude.m4i,v 1.1.2.5.6.2 2004/04/29 20:47:40 martinea Exp $
477 dnl @author Guido Draheim <guidod@gmx.de>
479 AC_DEFUN([AX_CREATE_STDINT_H],
480 [# ------ AX CREATE STDINT H -------------------------------------
481 AC_MSG_CHECKING([for stdint types])
482 ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)`
483 # try to shortcircuit - if the default include path of the compiler
484 # can find a "stdint.h" header then we assume that all compilers can.
485 AC_CACHE_VAL([ac_cv_header_stdint_t],[
486 old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
487 old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
488 old_CFLAGS="$CFLAGS" ; CFLAGS=""
489 AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
490 [ac_cv_stdint_result="(assuming C99 compatible system)"
491 ac_cv_header_stdint_t="stdint.h"; ],
492 [ac_cv_header_stdint_t=""])
493 CXXFLAGS="$old_CXXFLAGS"
494 CPPFLAGS="$old_CPPFLAGS"
495 CFLAGS="$old_CFLAGS" ])
497 v="... $ac_cv_header_stdint_h"
498 if test "$ac_stdint_h" = "stdint.h" ; then
499 AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)])
500 elif test "$ac_stdint_h" = "inttypes.h" ; then
501 AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)])
502 elif test "_$ac_cv_header_stdint_t" = "_" ; then
503 AC_MSG_RESULT([(putting them into $ac_stdint_h)$v])
505 ac_cv_header_stdint="$ac_cv_header_stdint_t"
506 AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)])
509 if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit..
511 dnl .....intro message done, now do a few system checks.....
512 dnl btw, all CHECK_TYPE macros do automatically "DEFINE" a type, therefore
513 dnl we use the autoconf implementation detail _AC CHECK_TYPE_NEW instead
515 inttype_headers=`echo $2 | sed -e 's/,/ /g'`
517 ac_cv_stdint_result="(no helpful system typedefs seen)"
518 AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[
519 ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h)
520 AC_MSG_RESULT([(..)])
521 for i in stdint.h inttypes.h sys/inttypes.h $inttype_headers ; do
522 unset ac_cv_type_uintptr_t
523 unset ac_cv_type_uint64_t
524 _AC_CHECK_TYPE_NEW(uintptr_t,[ac_cv_header_stdint_x=$i],dnl
525 continue,[#include <$i>])
526 AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
527 ac_cv_stdint_result="(seen uintptr_t$and64 in $i)"
530 AC_MSG_CHECKING([for stdint uintptr_t])
533 if test "_$ac_cv_header_stdint_x" = "_" ; then
534 AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[
535 ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h)
536 AC_MSG_RESULT([(..)])
537 for i in inttypes.h sys/inttypes.h stdint.h $inttype_headers ; do
538 unset ac_cv_type_uint32_t
539 unset ac_cv_type_uint64_t
540 AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],dnl
541 continue,[#include <$i>])
542 AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
543 ac_cv_stdint_result="(seen uint32_t$and64 in $i)"
546 AC_MSG_CHECKING([for stdint uint32_t])
550 if test "_$ac_cv_header_stdint_x" = "_" ; then
551 if test "_$ac_cv_header_stdint_o" = "_" ; then
552 AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[
553 ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h)
554 AC_MSG_RESULT([(..)])
555 for i in sys/types.h inttypes.h sys/inttypes.h $inttype_headers ; do
556 unset ac_cv_type_u_int32_t
557 unset ac_cv_type_u_int64_t
558 AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],dnl
559 continue,[#include <$i>])
560 AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>])
561 ac_cv_stdint_result="(seen u_int32_t$and64 in $i)"
564 AC_MSG_CHECKING([for stdint u_int32_t])
568 dnl if there was no good C99 header file, do some typedef checks...
569 if test "_$ac_cv_header_stdint_x" = "_" ; then
570 AC_MSG_CHECKING([for stdint datatype model])
571 AC_MSG_RESULT([(..)])
572 AC_CHECK_SIZEOF(char)
573 AC_CHECK_SIZEOF(short)
575 AC_CHECK_SIZEOF(long)
576 AC_CHECK_SIZEOF(void*)
577 ac_cv_stdint_char_model=""
578 ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_char"
579 ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_short"
580 ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_int"
581 ac_cv_stdint_long_model=""
582 ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_int"
583 ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_long"
584 ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_voidp"
585 name="$ac_cv_stdint_long_model"
586 case "$ac_cv_stdint_char_model/$ac_cv_stdint_long_model" in
587 122/242) name="$name, IP16 (standard 16bit machine)" ;;
588 122/244) name="$name, LP32 (standard 32bit mac/win)" ;;
589 122/*) name="$name (unusual int16 model)" ;;
590 124/444) name="$name, ILP32 (standard 32bit unixish)" ;;
591 124/488) name="$name, LP64 (standard 64bit unixish)" ;;
592 124/448) name="$name, LLP64 (unusual 64bit unixish)" ;;
593 124/*) name="$name (unusual int32 model)" ;;
594 128/888) name="$name, ILP64 (unusual 64bit numeric)" ;;
595 128/*) name="$name (unusual int64 model)" ;;
596 222/*|444/*) name="$name (unusual dsptype)" ;;
597 *) name="$name (very unusal model)" ;;
599 AC_MSG_RESULT([combined for stdint datatype model... $name])
602 if test "_$ac_cv_header_stdint_x" != "_" ; then
603 ac_cv_header_stdint="$ac_cv_header_stdint_x"
604 elif test "_$ac_cv_header_stdint_o" != "_" ; then
605 ac_cv_header_stdint="$ac_cv_header_stdint_o"
606 elif test "_$ac_cv_header_stdint_u" != "_" ; then
607 ac_cv_header_stdint="$ac_cv_header_stdint_u"
609 ac_cv_header_stdint="stddef.h"
612 AC_MSG_CHECKING([for extra inttypes in chosen header])
613 AC_MSG_RESULT([($ac_cv_header_stdint)])
614 dnl see if int_least and int_fast types are present in _this_ header.
615 unset ac_cv_type_int_least32_t
616 unset ac_cv_type_int_fast32_t
617 AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>])
618 AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
619 AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
621 fi # shortcircut to system "stdint.h"
622 # ------------------ PREPARE VARIABLES ------------------------------
623 if test "$GCC" = "yes" ; then
624 ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
626 ac_cv_stdint_message="using $CC"
629 AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl
630 $ac_cv_stdint_result])
632 # ----------------- DONE inttypes.h checks START header -------------
633 AC_CONFIG_COMMANDS([$ac_stdint_h],[
634 AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h)
635 ac_stdint=$tmp/_stdint.h
637 echo "#ifndef" $_ac_stdint_h >$ac_stdint
638 echo "#define" $_ac_stdint_h "1" >>$ac_stdint
639 echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint
640 echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint
641 echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint
642 if test "_$ac_cv_header_stdint_t" != "_" ; then
643 echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint
646 cat >>$ac_stdint <<STDINT_EOF
648 /* ................... shortcircuit part ........................... */
650 #if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H
655 /* .................... configured part ............................ */
659 echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint
660 if test "_$ac_cv_header_stdint_x" != "_" ; then
661 ac_header="$ac_cv_header_stdint_x"
662 echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint
664 echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint
667 echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint
668 if test "_$ac_cv_header_stdint_o" != "_" ; then
669 ac_header="$ac_cv_header_stdint_o"
670 echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint
672 echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint
675 echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint
676 if test "_$ac_cv_header_stdint_u" != "_" ; then
677 ac_header="$ac_cv_header_stdint_u"
678 echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint
680 echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint
685 if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then
686 echo "#include <$ac_header>" >>$ac_stdint
690 echo "/* which 64bit typedef has been found */" >>$ac_stdint
691 if test "$ac_cv_type_uint64_t" = "yes" ; then
692 echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint
694 echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint
696 if test "$ac_cv_type_u_int64_t" = "yes" ; then
697 echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint
699 echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint
703 echo "/* which type model has been detected */" >>$ac_stdint
704 if test "_$ac_cv_stdint_char_model" != "_" ; then
705 echo "#define _STDINT_CHAR_MODEL" "$ac_cv_stdint_char_model" >>$ac_stdint
706 echo "#define _STDINT_LONG_MODEL" "$ac_cv_stdint_long_model" >>$ac_stdint
708 echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint
709 echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint
713 echo "/* whether int_least types were detected */" >>$ac_stdint
714 if test "$ac_cv_type_int_least32_t" = "yes"; then
715 echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint
717 echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint
719 echo "/* whether int_fast types were detected */" >>$ac_stdint
720 if test "$ac_cv_type_int_fast32_t" = "yes"; then
721 echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint
723 echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint
725 echo "/* whether intmax_t type was detected */" >>$ac_stdint
726 if test "$ac_cv_type_intmax_t" = "yes"; then
727 echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint
729 echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint
733 cat >>$ac_stdint <<STDINT_EOF
734 /* .................... detections part ............................ */
736 /* whether we need to define bitspecific types from compiler base types */
737 #ifndef _STDINT_HEADER_INTPTR
738 #ifndef _STDINT_HEADER_UINT32
739 #ifndef _STDINT_HEADER_U_INT32
740 #define _STDINT_NEED_INT_MODEL_T
742 #define _STDINT_HAVE_U_INT_TYPES
747 #ifdef _STDINT_HAVE_U_INT_TYPES
748 #undef _STDINT_NEED_INT_MODEL_T
751 #ifdef _STDINT_CHAR_MODEL
752 #if _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124
753 #ifndef _STDINT_BYTE_MODEL
754 #define _STDINT_BYTE_MODEL 12
759 #ifndef _STDINT_HAVE_INT_LEAST32_T
760 #define _STDINT_NEED_INT_LEAST_T
763 #ifndef _STDINT_HAVE_INT_FAST32_T
764 #define _STDINT_NEED_INT_FAST_T
767 #ifndef _STDINT_HEADER_INTPTR
768 #define _STDINT_NEED_INTPTR_T
769 #ifndef _STDINT_HAVE_INTMAX_T
770 #define _STDINT_NEED_INTMAX_T
775 /* .................... definition part ............................ */
777 /* some system headers have good uint64_t */
778 #ifndef _HAVE_UINT64_T
779 #if defined _STDINT_HAVE_UINT64_T || defined HAVE_UINT64_T
780 #define _HAVE_UINT64_T
781 #elif defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T
782 #define _HAVE_UINT64_T
783 typedef u_int64_t uint64_t;
787 #ifndef _HAVE_UINT64_T
788 /* .. here are some common heuristics using compiler runtime specifics */
789 #if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L
790 #define _HAVE_UINT64_T
791 typedef long long int64_t;
792 typedef unsigned long long uint64_t;
794 #elif !defined __STRICT_ANSI__
795 #if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
796 #define _HAVE_UINT64_T
797 typedef __int64 int64_t;
798 typedef unsigned __int64 uint64_t;
800 #elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__
801 /* note: all ELF-systems seem to have loff-support which needs 64-bit */
802 #if !defined _NO_LONGLONG
803 #define _HAVE_UINT64_T
804 typedef long long int64_t;
805 typedef unsigned long long uint64_t;
808 #elif defined __alpha || (defined __mips && defined _ABIN32)
809 #if !defined _NO_LONGLONG
810 typedef long int64_t;
811 typedef unsigned long uint64_t;
813 /* compiler/cpu type to define int64_t */
818 #if defined _STDINT_HAVE_U_INT_TYPES
819 /* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */
820 typedef u_int8_t uint8_t;
821 typedef u_int16_t uint16_t;
822 typedef u_int32_t uint32_t;
824 /* glibc compatibility */
825 #ifndef __int8_t_defined
826 #define __int8_t_defined
830 #ifdef _STDINT_NEED_INT_MODEL_T
831 /* we must guess all the basic types. Apart from byte-adressable system, */
832 /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
833 /* (btw, those nibble-addressable systems are way off, or so we assume) */
835 dnl /* have a look at "64bit and data size neutrality" at */
836 dnl /* http://unix.org/version2/whatsnew/login_64bit.html */
837 dnl /* (the shorthand "ILP" types always have a "P" part) */
839 #if defined _STDINT_BYTE_MODEL
840 #if _STDINT_LONG_MODEL+0 == 242
841 /* 2:4:2 = IP16 = a normal 16-bit system */
842 typedef unsigned char uint8_t;
843 typedef unsigned short uint16_t;
844 typedef unsigned long uint32_t;
845 #ifndef __int8_t_defined
846 #define __int8_t_defined
848 typedef short int16_t;
849 typedef long int32_t;
851 #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444
852 /* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */
853 /* 4:4:4 = ILP32 = a normal 32-bit system */
854 typedef unsigned char uint8_t;
855 typedef unsigned short uint16_t;
856 typedef unsigned int uint32_t;
857 #ifndef __int8_t_defined
858 #define __int8_t_defined
860 typedef short int16_t;
863 #elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488
864 /* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */
865 /* 4:8:8 = LP64 = a normal 64-bit system */
866 typedef unsigned char uint8_t;
867 typedef unsigned short uint16_t;
868 typedef unsigned int uint32_t;
869 #ifndef __int8_t_defined
870 #define __int8_t_defined
872 typedef short int16_t;
875 /* this system has a "long" of 64bit */
876 #ifndef _HAVE_UINT64_T
877 #define _HAVE_UINT64_T
878 typedef unsigned long uint64_t;
879 typedef long int64_t;
881 #elif _STDINT_LONG_MODEL+0 == 448
882 /* LLP64 a 64-bit system derived from a 32-bit system */
883 typedef unsigned char uint8_t;
884 typedef unsigned short uint16_t;
885 typedef unsigned int uint32_t;
886 #ifndef __int8_t_defined
887 #define __int8_t_defined
889 typedef short int16_t;
892 /* assuming the system has a "long long" */
893 #ifndef _HAVE_UINT64_T
894 #define _HAVE_UINT64_T
895 typedef unsigned long long uint64_t;
896 typedef long long int64_t;
899 #define _STDINT_NO_INT32_T
902 #define _STDINT_NO_INT8_T
903 #define _STDINT_NO_INT32_T
908 * quote from SunOS-5.8 sys/inttypes.h:
909 * Use at your own risk. As of February 1996, the committee is squarely
910 * behind the fixed sized types; the "least" and "fast" types are still being
911 * discussed. The probability that the "fast" types may be removed before
912 * the standard is finalized is high enough that they are not currently
916 #if defined _STDINT_NEED_INT_LEAST_T
917 typedef int8_t int_least8_t;
918 typedef int16_t int_least16_t;
919 typedef int32_t int_least32_t;
920 #ifdef _HAVE_UINT64_T
921 typedef int64_t int_least64_t;
924 typedef uint8_t uint_least8_t;
925 typedef uint16_t uint_least16_t;
926 typedef uint32_t uint_least32_t;
927 #ifdef _HAVE_UINT64_T
928 typedef uint64_t uint_least64_t;
933 #if defined _STDINT_NEED_INT_FAST_T
934 typedef int8_t int_fast8_t;
935 typedef int int_fast16_t;
936 typedef int32_t int_fast32_t;
937 #ifdef _HAVE_UINT64_T
938 typedef int64_t int_fast64_t;
941 typedef uint8_t uint_fast8_t;
942 typedef unsigned uint_fast16_t;
943 typedef uint32_t uint_fast32_t;
944 #ifdef _HAVE_UINT64_T
945 typedef uint64_t uint_fast64_t;
950 #ifdef _STDINT_NEED_INTMAX_T
951 #ifdef _HAVE_UINT64_T
952 typedef int64_t intmax_t;
953 typedef uint64_t uintmax_t;
955 typedef long intmax_t;
956 typedef unsigned long uintmax_t;
960 #ifdef _STDINT_NEED_INTPTR_T
961 #ifndef __intptr_t_defined
962 #define __intptr_t_defined
963 /* we encourage using "long" to store pointer values, never use "int" ! */
964 #if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484
965 typedef unsinged int uintptr_t;
966 typedef int intptr_t;
967 #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444
968 typedef unsigned long uintptr_t;
969 typedef long intptr_t;
970 #elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T
971 typedef uint64_t uintptr_t;
972 typedef int64_t intptr_t;
973 #else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */
974 typedef unsigned long uintptr_t;
975 typedef long intptr_t;
986 if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then
987 AC_MSG_NOTICE([$ac_stdint_h is unchanged])
989 ac_dir=`AS_DIRNAME(["$ac_stdint_h"])`
990 AS_MKDIR_P(["$ac_dir"])
992 mv $ac_stdint $ac_stdint_h
994 ],[# variables for create stdint.h replacement
997 ac_stdint_h="$ac_stdint_h"
998 _ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h)
999 ac_cv_stdint_message="$ac_cv_stdint_message"
1000 ac_cv_header_stdint_t="$ac_cv_header_stdint_t"
1001 ac_cv_header_stdint_x="$ac_cv_header_stdint_x"
1002 ac_cv_header_stdint_o="$ac_cv_header_stdint_o"
1003 ac_cv_header_stdint_u="$ac_cv_header_stdint_u"
1004 ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
1005 ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
1006 ac_cv_stdint_char_model="$ac_cv_stdint_char_model"
1007 ac_cv_stdint_long_model="$ac_cv_stdint_long_model"
1008 ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
1009 ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
1010 ac_cv_type_intmax_t="$ac_cv_type_intmax_t"
1013 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1014 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
1015 ## Free Software Foundation, Inc.
1016 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
1018 ## This program is free software; you can redistribute it and/or modify
1019 ## it under the terms of the GNU General Public License as published by
1020 ## the Free Software Foundation; either version 2 of the License, or
1021 ## (at your option) any later version.
1023 ## This program is distributed in the hope that it will be useful, but
1024 ## WITHOUT ANY WARRANTY; without even the implied warranty of
1025 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1026 ## General Public License for more details.
1028 ## You should have received a copy of the GNU General Public License
1029 ## along with this program; if not, write to the Free Software
1030 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1032 ## As a special exception to the GNU General Public License, if you
1033 ## distribute this file as part of a program that contains a
1034 ## configuration script generated by Autoconf, you may include it under
1035 ## the same distribution terms that you use for the rest of that program.
1037 # serial 47 AC_PROG_LIBTOOL
1040 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1041 # -----------------------------------------------------------
1042 # If this macro is not defined by Autoconf, define it here.
1043 m4_ifdef([AC_PROVIDE_IFELSE],
1045 [m4_define([AC_PROVIDE_IFELSE],
1046 [m4_ifdef([AC_PROVIDE_$1],
1052 AC_DEFUN([AC_PROG_LIBTOOL],
1053 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1054 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1055 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1056 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1058 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1060 dnl And a similar setup for Fortran 77 support
1061 AC_PROVIDE_IFELSE([AC_PROG_F77],
1063 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1066 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1067 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1068 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1069 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1071 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1073 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1075 [ifdef([AC_PROG_GCJ],
1076 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1077 ifdef([A][M_PROG_GCJ],
1078 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1079 ifdef([LT_AC_PROG_GCJ],
1080 [define([LT_AC_PROG_GCJ],
1081 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1082 ])])# AC_PROG_LIBTOOL
1087 AC_DEFUN([_AC_PROG_LIBTOOL],
1088 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1089 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1090 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1091 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1093 # This can be used to rebuild libtool when needed
1094 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1096 # Always use our own libtool.
1097 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1098 AC_SUBST(LIBTOOL)dnl
1100 # Prevent multiple expansion
1101 define([AC_PROG_LIBTOOL], [])
1102 ])# _AC_PROG_LIBTOOL
1107 AC_DEFUN([AC_LIBTOOL_SETUP],
1109 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1110 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1111 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1112 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1113 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1114 AC_REQUIRE([AC_PROG_CC])dnl
1115 AC_REQUIRE([AC_PROG_LD])dnl
1116 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1117 AC_REQUIRE([AC_PROG_NM])dnl
1119 AC_REQUIRE([AC_PROG_LN_S])dnl
1120 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1121 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1122 AC_REQUIRE([AC_OBJEXT])dnl
1123 AC_REQUIRE([AC_EXEEXT])dnl
1126 AC_LIBTOOL_SYS_MAX_CMD_LEN
1127 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1130 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1131 _LT_AC_PROG_ECHO_BACKSLASH
1135 # AIX sometimes has problems with the GCC collect2 program. For some
1136 # reason, if we set the COLLECT_NAMES environment variable, the problems
1137 # vanish in a puff of smoke.
1138 if test "X${COLLECT_NAMES+set}" != Xset; then
1140 export COLLECT_NAMES
1145 # Sed substitution that helps us do robust quoting. It backslashifies
1146 # metacharacters that are still active within double-quoted strings.
1147 Xsed='sed -e s/^X//'
1148 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1150 # Same as above, but do not quote variable references.
1151 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1153 # Sed substitution to delay expansion of an escaped shell variable in a
1154 # double_quote_subst'ed string.
1155 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1157 # Sed substitution to avoid accidental globbing in evaled expressions
1158 no_glob_subst='s/\*/\\\*/g'
1164 default_ofile=libtool
1165 can_build_shared=yes
1167 # All known linkers require a `.a' archive for static linking (except M$VC,
1168 # which needs '.lib').
1170 ltmain="$ac_aux_dir/ltmain.sh"
1171 ofile="$default_ofile"
1172 with_gnu_ld="$lt_cv_prog_gnu_ld"
1174 AC_CHECK_TOOL(AR, ar, false)
1175 AC_CHECK_TOOL(RANLIB, ranlib, :)
1176 AC_CHECK_TOOL(STRIP, strip, :)
1179 old_CFLAGS="$CFLAGS"
1181 # Set sane defaults for various variables
1182 test -z "$AR" && AR=ar
1183 test -z "$AR_FLAGS" && AR_FLAGS=cru
1184 test -z "$AS" && AS=as
1185 test -z "$CC" && CC=cc
1186 test -z "$LTCC" && LTCC=$CC
1187 test -z "$DLLTOOL" && DLLTOOL=dlltool
1188 test -z "$LD" && LD=ld
1189 test -z "$LN_S" && LN_S="ln -s"
1190 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1191 test -z "$NM" && NM=nm
1192 test -z "$SED" && SED=sed
1193 test -z "$OBJDUMP" && OBJDUMP=objdump
1194 test -z "$RANLIB" && RANLIB=:
1195 test -z "$STRIP" && STRIP=:
1196 test -z "$ac_objext" && ac_objext=o
1198 # Determine commands to create old-style static archives.
1199 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1200 old_postinstall_cmds='chmod 644 $oldlib'
1201 old_postuninstall_cmds=
1203 if test -n "$RANLIB"; then
1206 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1209 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1212 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1215 # Only perform the check for file, if the check method requires it
1216 case $deplibs_check_method in
1218 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1224 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1225 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1226 enable_win32_dll=yes, enable_win32_dll=no)
1228 AC_ARG_ENABLE([libtool-lock],
1229 [AC_HELP_STRING([--disable-libtool-lock],
1230 [avoid locking (might break parallel builds)])])
1231 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1234 [AC_HELP_STRING([--with-pic],
1235 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1236 [pic_mode="$withval"],
1238 test -z "$pic_mode" && pic_mode=default
1240 # Use C for the default configuration in the libtool script
1242 AC_LIBTOOL_LANG_C_CONFIG
1244 ])# AC_LIBTOOL_SETUP
1247 # _LT_AC_SYS_COMPILER
1248 # -------------------
1249 AC_DEFUN([_LT_AC_SYS_COMPILER],
1250 [AC_REQUIRE([AC_PROG_CC])dnl
1252 # If no C compiler was specified, use CC.
1255 # Allow CC to be a program name with arguments.
1257 ])# _LT_AC_SYS_COMPILER
1260 # _LT_AC_SYS_LIBPATH_AIX
1261 # ----------------------
1262 # Links a minimal program and checks the executable
1263 # for the system default hardcoded library path. In most cases,
1264 # this is /usr/lib:/lib, but when the MPI compilers are used
1265 # the location of the communication and MPI libs are included too.
1266 # If we don't find anything, use the default library path according
1267 # to the aix ld manual.
1268 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1269 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1270 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1272 # Check for a 64-bit object if we didn't find anything.
1273 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1275 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1276 ])# _LT_AC_SYS_LIBPATH_AIX
1279 # _LT_AC_SHELL_INIT(ARG)
1280 # ----------------------
1281 AC_DEFUN([_LT_AC_SHELL_INIT],
1282 [ifdef([AC_DIVERSION_NOTICE],
1283 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1284 [AC_DIVERT_PUSH(NOTICE)])
1287 ])# _LT_AC_SHELL_INIT
1290 # _LT_AC_PROG_ECHO_BACKSLASH
1291 # --------------------------
1292 # Add some code to the start of the generated configure script which
1293 # will find an echo command which doesn't interpret backslashes.
1294 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1295 [_LT_AC_SHELL_INIT([
1296 # Check that we are running under the correct shell.
1297 SHELL=${CONFIG_SHELL-/bin/sh}
1301 # Remove one level of quotation (which was required for Make).
1302 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1307 if test "X[$]1" = X--no-reexec; then
1308 # Discard the --no-reexec flag, and continue.
1310 elif test "X[$]1" = X--fallback-echo; then
1311 # Avoid inline document here, it may be left over
1313 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1314 # Yippee, $echo works!
1317 # Restart under the correct shell.
1318 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1321 if test "X[$]1" = X--fallback-echo; then
1322 # used as fallback echo
1330 # The HP-UX ksh and POSIX shell print the target directory to stdout
1332 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1334 if test -z "$ECHO"; then
1335 if test "X${echo_test_string+set}" != Xset; then
1336 # find a string as large as possible, as long as the shell can cope with it
1337 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1338 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1339 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1340 echo_test_string="`eval $cmd`" &&
1341 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1348 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1349 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1350 test "X$echo_testing_string" = "X$echo_test_string"; then
1353 # The Solaris, AIX, and Digital Unix default echo programs unquote
1354 # backslashes. This makes it impossible to quote backslashes using
1355 # echo "$something" | sed 's/\\/\\\\/g'
1357 # So, first we look for a working echo in the user's PATH.
1359 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1360 for dir in $PATH /usr/ucb; do
1362 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1363 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1364 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1365 test "X$echo_testing_string" = "X$echo_test_string"; then
1372 if test "X$echo" = Xecho; then
1373 # We didn't find a better echo, so look for alternatives.
1374 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1375 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1376 test "X$echo_testing_string" = "X$echo_test_string"; then
1377 # This shell has a builtin print -r that does the trick.
1379 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1380 test "X$CONFIG_SHELL" != X/bin/ksh; then
1381 # If we have ksh, try running configure again with it.
1382 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1383 export ORIGINAL_CONFIG_SHELL
1384 CONFIG_SHELL=/bin/ksh
1386 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1390 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1391 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1392 test "X$echo_testing_string" = "X$echo_test_string"; then
1393 # Cool, printf works
1395 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1396 test "X$echo_testing_string" = 'X\t' &&
1397 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1398 test "X$echo_testing_string" = "X$echo_test_string"; then
1399 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1401 SHELL="$CONFIG_SHELL"
1403 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1404 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1405 test "X$echo_testing_string" = 'X\t' &&
1406 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1407 test "X$echo_testing_string" = "X$echo_test_string"; then
1408 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1410 # maybe with a smaller string...
1413 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1414 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1421 if test "$prev" != 'sed 50q "[$]0"'; then
1422 echo_test_string=`eval $prev`
1423 export echo_test_string
1424 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1426 # Oops. We lost completely, so just stick with echo.
1435 # Copy echo and quote the copy suitably for passing to libtool from
1436 # the Makefile, instead of quoting the original, which is used later.
1438 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1439 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1443 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1448 AC_DEFUN([_LT_AC_LOCK],
1449 [AC_ARG_ENABLE([libtool-lock],
1450 [AC_HELP_STRING([--disable-libtool-lock],
1451 [avoid locking (might break parallel builds)])])
1452 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1454 # Some flags need to be propagated to the compiler or linker for good
1458 # Find out which ABI we are using.
1459 echo 'int i;' > conftest.$ac_ext
1460 if AC_TRY_EVAL(ac_compile); then
1461 case `/usr/bin/file conftest.$ac_objext` in
1473 # Find out which ABI we are using.
1474 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1475 if AC_TRY_EVAL(ac_compile); then
1476 if test "$lt_cv_prog_gnu_ld" = yes; then
1477 case `/usr/bin/file conftest.$ac_objext` in
1479 LD="${LD-ld} -melf32bsmip"
1482 LD="${LD-ld} -melf32bmipn32"
1485 LD="${LD-ld} -melf64bmip"
1489 case `/usr/bin/file conftest.$ac_objext` in
1505 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1506 # Find out which ABI we are using.
1507 echo 'int i;' > conftest.$ac_ext
1508 if AC_TRY_EVAL(ac_compile); then
1509 case "`/usr/bin/file conftest.o`" in
1513 LD="${LD-ld} -m elf_i386"
1515 ppc64-*linux*|powerpc64-*linux*)
1516 LD="${LD-ld} -m elf32ppclinux"
1519 LD="${LD-ld} -m elf_s390"
1522 LD="${LD-ld} -m elf32_sparc"
1529 LD="${LD-ld} -m elf_x86_64"
1531 ppc*-*linux*|powerpc*-*linux*)
1532 LD="${LD-ld} -m elf64ppc"
1535 LD="${LD-ld} -m elf64_s390"
1538 LD="${LD-ld} -m elf64_sparc"
1548 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1549 SAVE_CFLAGS="$CFLAGS"
1550 CFLAGS="$CFLAGS -belf"
1551 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1553 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1555 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1556 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1557 CFLAGS="$SAVE_CFLAGS"
1560 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1561 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1562 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1563 AC_CHECK_TOOL(AS, as, false)
1564 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1569 need_locks="$enable_libtool_lock"
1574 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1575 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1576 # ----------------------------------------------------------------
1577 # Check whether the given compiler option works
1578 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1579 [AC_REQUIRE([LT_AC_PROG_SED])
1580 AC_CACHE_CHECK([$1], [$2],
1582 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1583 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1584 lt_compiler_flag="$3"
1585 # Insert the option either (1) after the last *FLAGS variable, or
1586 # (2) before a word containing "conftest.", or (3) at the end.
1587 # Note that $ac_compile itself does not contain backslashes and begins
1588 # with a dollar sign (not a hyphen), so the echo should work correctly.
1589 # The option is referenced via a variable to avoid confusing sed.
1590 lt_compile=`echo "$ac_compile" | $SED \
1591 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1592 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1593 -e 's:$: $lt_compiler_flag:'`
1594 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1595 (eval "$lt_compile" 2>conftest.err)
1597 cat conftest.err >&AS_MESSAGE_LOG_FD
1598 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1599 if (exit $ac_status) && test -s "$ac_outfile"; then
1600 # The compiler can only warn and ignore the option if not recognized
1601 # So say no if there are warnings
1602 if test ! -s conftest.err; then
1609 if test x"[$]$2" = xyes; then
1610 ifelse([$5], , :, [$5])
1612 ifelse([$6], , :, [$6])
1614 ])# AC_LIBTOOL_COMPILER_OPTION
1617 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1618 # [ACTION-SUCCESS], [ACTION-FAILURE])
1619 # ------------------------------------------------------------
1620 # Check whether the given compiler option works
1621 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1622 [AC_CACHE_CHECK([$1], [$2],
1624 save_LDFLAGS="$LDFLAGS"
1625 LDFLAGS="$LDFLAGS $3"
1626 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1627 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1628 # The compiler can only warn and ignore the option if not recognized
1629 # So say no if there are warnings
1630 if test -s conftest.err; then
1631 # Append any errors to the config.log.
1632 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1638 LDFLAGS="$save_LDFLAGS"
1641 if test x"[$]$2" = xyes; then
1642 ifelse([$4], , :, [$4])
1644 ifelse([$5], , :, [$5])
1646 ])# AC_LIBTOOL_LINKER_OPTION
1649 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1650 # --------------------------
1651 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1652 [# find the maximum length of command line arguments
1653 AC_MSG_CHECKING([the maximum length of command line arguments])
1654 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1660 # On DJGPP, this test can blow up pretty badly due to problems in libc
1661 # (any single argument exceeding 2000 bytes causes a buffer overrun
1662 # during glob expansion). Even if it were fixed, the result of this
1663 # check would be larger than it should be.
1664 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1668 # Under GNU Hurd, this test is not required because there is
1669 # no limit to the length of command line arguments.
1670 # Libtool will interpret -1 as no limit whatsoever
1671 lt_cv_sys_max_cmd_len=-1;
1675 # On Win9x/ME, this test blows up -- it succeeds, but takes
1676 # about 5 minutes as the teststring grows exponentially.
1677 # Worse, since 9x/ME are not pre-emptively multitasking,
1678 # you end up with a "frozen" computer, even though with patience
1679 # the test eventually succeeds (with a max line length of 256k).
1680 # Instead, let's just punt: use the minimum linelength reported by
1681 # all of the supported platforms: 8192 (on NT/2K/XP).
1682 lt_cv_sys_max_cmd_len=8192;
1686 # On AmigaOS with pdksh, this test takes hours, literally.
1687 # So we just punt and use a minimum line length of 8192.
1688 lt_cv_sys_max_cmd_len=8192;
1692 # If test is not a shell built-in, we'll probably end up computing a
1693 # maximum length that is only half of the actual maximum length, but
1695 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1696 = "XX$teststring") >/dev/null 2>&1 &&
1697 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1698 lt_cv_sys_max_cmd_len=$new_result &&
1699 test $i != 17 # 1/2 MB should be enough
1702 teststring=$teststring$teststring
1705 # Add a significant safety factor because C++ compilers can tack on massive
1706 # amounts of additional arguments before passing them to the linker.
1707 # It appears as though 1/2 is a usable value.
1708 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1712 if test -n $lt_cv_sys_max_cmd_len ; then
1713 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1717 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1720 # _LT_AC_CHECK_DLFCN
1721 # --------------------
1722 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1723 [AC_CHECK_HEADERS(dlfcn.h)dnl
1724 ])# _LT_AC_CHECK_DLFCN
1727 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1728 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1729 # ------------------------------------------------------------------
1730 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1731 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1732 if test "$cross_compiling" = yes; then :
1735 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1736 lt_status=$lt_dlunknown
1737 cat > conftest.$ac_ext <<EOF
1738 [#line __oline__ "configure"
1739 #include "confdefs.h"
1748 # define LT_DLGLOBAL RTLD_GLOBAL
1751 # define LT_DLGLOBAL DL_GLOBAL
1753 # define LT_DLGLOBAL 0
1757 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1758 find out it does not work in some platform. */
1759 #ifndef LT_DLLAZY_OR_NOW
1761 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1764 # define LT_DLLAZY_OR_NOW DL_LAZY
1767 # define LT_DLLAZY_OR_NOW RTLD_NOW
1770 # define LT_DLLAZY_OR_NOW DL_NOW
1772 # define LT_DLLAZY_OR_NOW 0
1780 extern "C" void exit (int);
1783 void fnord() { int i=42;}
1786 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1787 int status = $lt_dlunknown;
1791 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1792 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1793 /* dlclose (self); */
1799 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1800 (./conftest; exit; ) 2>/dev/null
1803 x$lt_dlno_uscore) $1 ;;
1804 x$lt_dlneed_uscore) $2 ;;
1805 x$lt_unknown|x*) $3 ;;
1808 # compilation failed
1813 ])# _LT_AC_TRY_DLOPEN_SELF
1816 # AC_LIBTOOL_DLOPEN_SELF
1817 # -------------------
1818 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1819 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1820 if test "x$enable_dlopen" != xyes; then
1821 enable_dlopen=unknown
1822 enable_dlopen_self=unknown
1823 enable_dlopen_self_static=unknown
1830 lt_cv_dlopen="load_add_on"
1832 lt_cv_dlopen_self=yes
1836 lt_cv_dlopen="LoadLibrary"
1841 lt_cv_dlopen="dlopen"
1846 # if libdl is installed we need to link against it
1847 AC_CHECK_LIB([dl], [dlopen],
1848 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1851 lt_cv_dlopen_self=yes
1856 AC_CHECK_FUNC([shl_load],
1857 [lt_cv_dlopen="shl_load"],
1858 [AC_CHECK_LIB([dld], [shl_load],
1859 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1860 [AC_CHECK_FUNC([dlopen],
1861 [lt_cv_dlopen="dlopen"],
1862 [AC_CHECK_LIB([dl], [dlopen],
1863 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1864 [AC_CHECK_LIB([svld], [dlopen],
1865 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1866 [AC_CHECK_LIB([dld], [dld_link],
1867 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1876 if test "x$lt_cv_dlopen" != xno; then
1882 case $lt_cv_dlopen in
1884 save_CPPFLAGS="$CPPFLAGS"
1885 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1887 save_LDFLAGS="$LDFLAGS"
1888 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1891 LIBS="$lt_cv_dlopen_libs $LIBS"
1893 AC_CACHE_CHECK([whether a program can dlopen itself],
1894 lt_cv_dlopen_self, [dnl
1895 _LT_AC_TRY_DLOPEN_SELF(
1896 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1897 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1900 if test "x$lt_cv_dlopen_self" = xyes; then
1901 LDFLAGS="$LDFLAGS $link_static_flag"
1902 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1903 lt_cv_dlopen_self_static, [dnl
1904 _LT_AC_TRY_DLOPEN_SELF(
1905 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1906 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1910 CPPFLAGS="$save_CPPFLAGS"
1911 LDFLAGS="$save_LDFLAGS"
1916 case $lt_cv_dlopen_self in
1917 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1918 *) enable_dlopen_self=unknown ;;
1921 case $lt_cv_dlopen_self_static in
1922 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1923 *) enable_dlopen_self_static=unknown ;;
1926 ])# AC_LIBTOOL_DLOPEN_SELF
1929 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1930 # ---------------------------------
1931 # Check to see if options -c and -o are simultaneously supported by compiler
1932 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1933 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1934 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1935 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1936 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1937 $rm -r conftest 2>/dev/null
1941 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1943 lt_compiler_flag="-o out/conftest2.$ac_objext"
1944 # Insert the option either (1) after the last *FLAGS variable, or
1945 # (2) before a word containing "conftest.", or (3) at the end.
1946 # Note that $ac_compile itself does not contain backslashes and begins
1947 # with a dollar sign (not a hyphen), so the echo should work correctly.
1948 lt_compile=`echo "$ac_compile" | $SED \
1949 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1950 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1951 -e 's:$: $lt_compiler_flag:'`
1952 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1953 (eval "$lt_compile" 2>out/conftest.err)
1955 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1956 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1957 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1959 # The compiler can only warn and ignore the option if not recognized
1960 # So say no if there are warnings
1961 if test ! -s out/conftest.err; then
1962 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1967 # SGI C++ compiler will create directory out/ii_files/ for
1968 # template instantiation
1969 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1970 $rm out/* && rmdir out
1975 ])# AC_LIBTOOL_PROG_CC_C_O
1978 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1979 # -----------------------------------------
1980 # Check to see if we can do hard links to lock some files if needed
1981 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1982 [AC_REQUIRE([_LT_AC_LOCK])dnl
1984 hard_links="nottested"
1985 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1986 # do not overwrite the value of need_locks provided by the user
1987 AC_MSG_CHECKING([if we can lock with hard links])
1990 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1992 ln conftest.a conftest.b 2>&5 || hard_links=no
1993 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1994 AC_MSG_RESULT([$hard_links])
1995 if test "$hard_links" = no; then
1996 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2002 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2007 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2008 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2009 [rm -f .libs 2>/dev/null
2010 mkdir .libs 2>/dev/null
2011 if test -d .libs; then
2014 # MS-DOS does not allow filenames that begin with a dot.
2017 rmdir .libs 2>/dev/null])
2018 objdir=$lt_cv_objdir
2019 ])# AC_LIBTOOL_OBJDIR
2022 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2023 # ----------------------------------------------
2024 # Check hardcoding attributes.
2025 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2026 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2027 _LT_AC_TAGVAR(hardcode_action, $1)=
2028 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2029 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
2030 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
2032 # We can hardcode non-existant directories.
2033 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2034 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2035 # have to relink, otherwise we might link with an installed library
2036 # when we should be linking with a yet-to-be-installed one
2037 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2038 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2039 # Linking always hardcodes the temporary library directory.
2040 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2042 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2043 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2046 # We cannot hardcode anything, or else we can only hardcode existing
2048 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2050 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2052 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2053 # Fast installation is not supported
2054 enable_fast_install=no
2055 elif test "$shlibpath_overrides_runpath" = yes ||
2056 test "$enable_shared" = no; then
2057 # Fast installation is not necessary
2058 enable_fast_install=needless
2060 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2063 # AC_LIBTOOL_SYS_LIB_STRIP
2064 # ------------------------
2065 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2068 AC_MSG_CHECKING([whether stripping libraries is possible])
2069 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2070 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2071 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2072 AC_MSG_RESULT([yes])
2074 # FIXME - insert some real tests, host_os isn't really good enough
2077 if test -n "$STRIP" ; then
2078 striplib="$STRIP -x"
2079 AC_MSG_RESULT([yes])
2089 ])# AC_LIBTOOL_SYS_LIB_STRIP
2092 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2093 # -----------------------------
2094 # PORTME Fill in your ld.so characteristics
2095 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2096 [AC_MSG_CHECKING([dynamic linker characteristics])
2098 libname_spec='lib$name'
2106 shlibpath_overrides_runpath=unknown
2108 dynamic_linker="$host_os ld.so"
2109 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2110 if test "$GCC" = yes; then
2111 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2112 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2113 # if the path contains ";" then we assume it to be the separator
2114 # otherwise default to the standard path separator (i.e. ":") - it is
2115 # assumed that no part of a normal pathname contains ";" but that should
2116 # okay in the real world where ";" in dirpaths is itself problematic.
2117 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2119 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2122 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2124 need_lib_prefix=unknown
2125 hardcode_into_libs=no
2127 # when you set need_version to no, make sure it does not cause -set_version
2128 # flags to be left without arguments
2129 need_version=unknown
2134 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2135 shlibpath_var=LIBPATH
2137 # AIX 3 has no versioning support, so we append a major version to the name.
2138 soname_spec='${libname}${release}${shared_ext}$major'
2145 hardcode_into_libs=yes
2146 if test "$host_cpu" = ia64; then
2147 # AIX 5 supports IA64
2148 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2149 shlibpath_var=LD_LIBRARY_PATH
2151 # With GCC up to 2.95.x, collect2 would create an import file
2152 # for dependence libraries. The import file would start with
2153 # the line `#! .'. This would cause the generated library to
2154 # depend on `.', always an invalid library. This was fixed in
2155 # development snapshots of GCC prior to 3.0.
2157 aix4 | aix4.[[01]] | aix4.[[01]].*)
2158 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2160 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2167 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2168 # soname into executable. Probably we can add versioning support to
2169 # collect2, so additional links can be useful in future.
2170 if test "$aix_use_runtimelinking" = yes; then
2171 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2172 # instead of lib<name>.a to let people know that these are not
2173 # typical AIX shared libraries.
2174 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2176 # We preserve .a as extension for shared libraries through AIX4.2
2177 # and later when we are not doing run time linking.
2178 library_names_spec='${libname}${release}.a $libname.a'
2179 soname_spec='${libname}${release}${shared_ext}$major'
2181 shlibpath_var=LIBPATH
2186 library_names_spec='$libname.ixlibrary $libname.a'
2187 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2188 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2192 library_names_spec='${libname}${shared_ext}'
2193 dynamic_linker="$host_os ld.so"
2194 shlibpath_var=LIBRARY_PATH
2200 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2201 soname_spec='${libname}${release}${shared_ext}$major'
2202 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2203 shlibpath_var=LD_LIBRARY_PATH
2204 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2205 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2206 # the default ld.so.conf also contains /usr/contrib/lib and
2207 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2208 # libtool to hard-code these into programs
2211 cygwin* | mingw* | pw32*)
2212 version_type=windows
2217 case $GCC,$host_os in
2218 yes,cygwin* | yes,mingw* | yes,pw32*)
2219 library_names_spec='$libname.dll.a'
2220 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2221 postinstall_cmds='base_file=`basename \${file}`~
2222 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2223 dldir=$destdir/`dirname \$dlpath`~
2224 test -d \$dldir || mkdir -p \$dldir~
2225 $install_prog $dir/$dlname \$dldir/$dlname'
2226 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2227 dlpath=$dir/\$dldll~
2229 shlibpath_overrides_runpath=yes
2233 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2234 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2235 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2238 # MinGW DLLs use traditional 'lib' prefix
2239 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2240 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2241 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2242 # It is most probably a Windows format PATH printed by
2243 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2244 # path with ; separators, and with drive letters. We can handle the
2245 # drive letters (cygwin fileutils understands them), so leave them,
2246 # especially as we might pass files found there to a mingw objdump,
2247 # which wouldn't understand a cygwinified path. Ahh.
2248 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2250 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2254 # pw32 DLLs use 'pw' prefix rather than 'lib'
2255 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2261 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2264 dynamic_linker='Win32 ld.exe'
2265 # FIXME: first we should search . and the directory the executable is in
2269 darwin* | rhapsody*)
2270 dynamic_linker="$host_os dyld"
2274 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2275 soname_spec='${libname}${release}${major}$shared_ext'
2276 shlibpath_overrides_runpath=yes
2277 shlibpath_var=DYLD_LIBRARY_PATH
2278 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
2279 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2280 if test "$GCC" = yes; then
2281 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2283 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2285 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2292 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2293 soname_spec='${libname}${release}${shared_ext}$major'
2294 shlibpath_var=LD_LIBRARY_PATH
2305 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2306 soname_spec='${libname}${release}${shared_ext}$major'
2307 shlibpath_var=LD_LIBRARY_PATH
2308 shlibpath_overrides_runpath=no
2309 hardcode_into_libs=yes
2310 dynamic_linker='GNU ld.so'
2314 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2315 version_type=freebsd-$objformat
2316 case $version_type in
2318 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2323 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2327 shlibpath_var=LD_LIBRARY_PATH
2330 shlibpath_overrides_runpath=yes
2332 freebsd3.[01]* | freebsdelf3.[01]*)
2333 shlibpath_overrides_runpath=yes
2334 hardcode_into_libs=yes
2337 shlibpath_overrides_runpath=no
2338 hardcode_into_libs=yes
2347 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2348 soname_spec='${libname}${release}${shared_ext}$major'
2349 shlibpath_var=LD_LIBRARY_PATH
2350 hardcode_into_libs=yes
2353 hpux9* | hpux10* | hpux11*)
2354 # Give a soname corresponding to the major version so that dld.sl refuses to
2355 # link against other versions.
2362 hardcode_into_libs=yes
2363 dynamic_linker="$host_os dld.so"
2364 shlibpath_var=LD_LIBRARY_PATH
2365 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2366 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2367 soname_spec='${libname}${release}${shared_ext}$major'
2368 if test "X$HPUX_IA64_MODE" = X32; then
2369 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2371 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2373 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2377 hardcode_into_libs=yes
2378 dynamic_linker="$host_os dld.sl"
2379 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2380 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2381 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2382 soname_spec='${libname}${release}${shared_ext}$major'
2383 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2384 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2388 dynamic_linker="$host_os dld.sl"
2389 shlibpath_var=SHLIB_PATH
2390 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2391 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2392 soname_spec='${libname}${release}${shared_ext}$major'
2395 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2396 postinstall_cmds='chmod 555 $lib'
2399 irix5* | irix6* | nonstopux*)
2401 nonstopux*) version_type=nonstopux ;;
2403 if test "$lt_cv_prog_gnu_ld" = yes; then
2411 soname_spec='${libname}${release}${shared_ext}$major'
2412 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2414 irix5* | nonstopux*)
2418 case $LD in # libtool.m4 will add one of these switches to LD
2419 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2420 libsuff= shlibsuff= libmagic=32-bit;;
2421 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2422 libsuff=32 shlibsuff=N32 libmagic=N32;;
2423 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2424 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2425 *) libsuff= shlibsuff= libmagic=never-match;;
2429 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2430 shlibpath_overrides_runpath=no
2431 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2432 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2433 hardcode_into_libs=yes
2436 # No shared lib support for Linux oldld, aout, or coff.
2437 linux*oldld* | linux*aout* | linux*coff*)
2441 # This must be Linux ELF.
2446 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2447 soname_spec='${libname}${release}${shared_ext}$major'
2448 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2449 shlibpath_var=LD_LIBRARY_PATH
2450 shlibpath_overrides_runpath=no
2451 # This implies no fast_install, which is unacceptable.
2452 # Some rework will be needed to allow for fast_install
2453 # before this can be enabled.
2454 hardcode_into_libs=yes
2456 # Append ld.so.conf contents to the search path
2457 if test -f /etc/ld.so.conf; then
2458 lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
2459 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2462 # We used to test for /lib/ld.so.1 and disable shared libraries on
2463 # powerpc, because MkLinux only supported shared libraries with the
2464 # GNU dynamic linker. Since this was broken with cross compilers,
2465 # most powerpc-linux boxes support dynamic linking these days and
2466 # people can always --disable-shared, the test was removed, and we
2467 # assume the GNU/Linux dynamic linker is in use.
2468 dynamic_linker='GNU/Linux ld.so'
2475 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2476 soname_spec='${libname}${release}${shared_ext}$major'
2477 shlibpath_var=LD_LIBRARY_PATH
2478 shlibpath_overrides_runpath=no
2479 hardcode_into_libs=yes
2480 dynamic_linker='GNU ld.so'
2487 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2488 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2489 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2490 dynamic_linker='NetBSD (a.out) ld.so'
2492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2493 soname_spec='${libname}${release}${shared_ext}$major'
2494 dynamic_linker='NetBSD ld.elf_so'
2496 shlibpath_var=LD_LIBRARY_PATH
2497 shlibpath_overrides_runpath=yes
2498 hardcode_into_libs=yes
2503 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2504 shlibpath_var=LD_LIBRARY_PATH
2505 shlibpath_overrides_runpath=yes
2512 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2513 soname_spec='${libname}${release}${shared_ext}$major'
2514 shlibpath_var=LD_LIBRARY_PATH
2515 shlibpath_overrides_runpath=yes
2522 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2523 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2524 shlibpath_var=LD_LIBRARY_PATH
2525 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2527 openbsd2.[[89]] | openbsd2.[[89]].*)
2528 shlibpath_overrides_runpath=no
2531 shlibpath_overrides_runpath=yes
2535 shlibpath_overrides_runpath=yes
2540 libname_spec='$name'
2543 library_names_spec='$libname${shared_ext} $libname.a'
2544 dynamic_linker='OS/2 ld.exe'
2545 shlibpath_var=LIBPATH
2548 osf3* | osf4* | osf5*)
2552 soname_spec='${libname}${release}${shared_ext}$major'
2553 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2554 shlibpath_var=LD_LIBRARY_PATH
2555 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2556 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2561 soname_spec='${libname}${release}${shared_ext}$major'
2562 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2563 shlibpath_var=LD_LIBRARY_PATH
2570 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2571 soname_spec='${libname}${release}${shared_ext}$major'
2572 shlibpath_var=LD_LIBRARY_PATH
2573 shlibpath_overrides_runpath=yes
2574 hardcode_into_libs=yes
2575 # ldd complains unless libraries are executable
2576 postinstall_cmds='chmod +x $lib'
2581 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2582 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2583 shlibpath_var=LD_LIBRARY_PATH
2584 shlibpath_overrides_runpath=yes
2585 if test "$with_gnu_ld" = yes; then
2591 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2593 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2594 soname_spec='${libname}${release}${shared_ext}$major'
2595 shlibpath_var=LD_LIBRARY_PATH
2596 case $host_vendor in
2598 shlibpath_overrides_runpath=no
2600 export_dynamic_flag_spec='${wl}-Blargedynsym'
2601 runpath_var=LD_RUN_PATH
2609 shlibpath_overrides_runpath=no
2610 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2616 if test -d /usr/nec ;then
2618 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2619 soname_spec='$libname${shared_ext}.$major'
2620 shlibpath_var=LD_LIBRARY_PATH
2626 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2627 soname_spec='${libname}${release}${shared_ext}$major'
2628 shlibpath_var=LD_LIBRARY_PATH
2635 AC_MSG_RESULT([$dynamic_linker])
2636 test "$dynamic_linker" = no && can_build_shared=no
2637 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2642 AC_DEFUN([_LT_AC_TAGCONFIG],
2643 [AC_ARG_WITH([tags],
2644 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2645 [include additional configurations @<:@automatic@:>@])],
2646 [tagnames="$withval"])
2648 if test -f "$ltmain" && test -n "$tagnames"; then
2649 if test ! -f "${ofile}"; then
2650 AC_MSG_WARN([output file `$ofile' does not exist])
2653 if test -z "$LTCC"; then
2654 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2655 if test -z "$LTCC"; then
2656 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2658 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2662 # Extract list of available tagged configurations in $ofile.
2663 # Note that this assumes the entire list is on one line.
2664 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2666 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2667 for tagname in $tagnames; do
2669 # Check whether tagname contains only valid characters
2670 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2672 *) AC_MSG_ERROR([invalid tag name: $tagname])
2676 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2678 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2681 # Update the list of available tags.
2682 if test -n "$tagname"; then
2683 echo appending configuration tag \"$tagname\" to $ofile
2687 if test -n "$CXX" && test "X$CXX" != "Xno"; then
2688 AC_LIBTOOL_LANG_CXX_CONFIG
2695 if test -n "$F77" && test "X$F77" != "Xno"; then
2696 AC_LIBTOOL_LANG_F77_CONFIG
2703 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2704 AC_LIBTOOL_LANG_GCJ_CONFIG
2711 AC_LIBTOOL_LANG_RC_CONFIG
2715 AC_MSG_ERROR([Unsupported tag name: $tagname])
2719 # Append the new tag name to the list of available tags.
2720 if test -n "$tagname" ; then
2721 available_tags="$available_tags $tagname"
2727 # Now substitute the updated list of available tags.
2728 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2729 mv "${ofile}T" "$ofile"
2733 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2736 ])# _LT_AC_TAGCONFIG
2741 # enable checks for dlopen support
2742 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2743 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2744 ])# AC_LIBTOOL_DLOPEN
2747 # AC_LIBTOOL_WIN32_DLL
2748 # --------------------
2749 # declare package support for building win32 dll's
2750 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2751 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2752 ])# AC_LIBTOOL_WIN32_DLL
2755 # AC_ENABLE_SHARED([DEFAULT])
2756 # ---------------------------
2757 # implement the --enable-shared flag
2758 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2759 AC_DEFUN([AC_ENABLE_SHARED],
2760 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2761 AC_ARG_ENABLE([shared],
2762 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2763 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2764 [p=${PACKAGE-default}
2766 yes) enable_shared=yes ;;
2767 no) enable_shared=no ;;
2770 # Look at the argument we got. We use all the common list separators.
2771 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2772 for pkg in $enableval; do
2774 if test "X$pkg" = "X$p"; then
2781 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2782 ])# AC_ENABLE_SHARED
2787 #- set the default shared flag to --disable-shared
2788 AC_DEFUN([AC_DISABLE_SHARED],
2789 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2790 AC_ENABLE_SHARED(no)
2791 ])# AC_DISABLE_SHARED
2794 # AC_ENABLE_STATIC([DEFAULT])
2795 # ---------------------------
2796 # implement the --enable-static flag
2797 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2798 AC_DEFUN([AC_ENABLE_STATIC],
2799 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2800 AC_ARG_ENABLE([static],
2801 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2802 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2803 [p=${PACKAGE-default}
2805 yes) enable_static=yes ;;
2806 no) enable_static=no ;;
2809 # Look at the argument we got. We use all the common list separators.
2810 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2811 for pkg in $enableval; do
2813 if test "X$pkg" = "X$p"; then
2820 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2821 ])# AC_ENABLE_STATIC
2826 # set the default static flag to --disable-static
2827 AC_DEFUN([AC_DISABLE_STATIC],
2828 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2829 AC_ENABLE_STATIC(no)
2830 ])# AC_DISABLE_STATIC
2833 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2834 # ---------------------------------
2835 # implement the --enable-fast-install flag
2836 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2837 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2838 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2839 AC_ARG_ENABLE([fast-install],
2840 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2841 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2842 [p=${PACKAGE-default}
2844 yes) enable_fast_install=yes ;;
2845 no) enable_fast_install=no ;;
2847 enable_fast_install=no
2848 # Look at the argument we got. We use all the common list separators.
2849 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2850 for pkg in $enableval; do
2852 if test "X$pkg" = "X$p"; then
2853 enable_fast_install=yes
2859 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2860 ])# AC_ENABLE_FAST_INSTALL
2863 # AC_DISABLE_FAST_INSTALL
2864 # -----------------------
2865 # set the default to --disable-fast-install
2866 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2867 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2868 AC_ENABLE_FAST_INSTALL(no)
2869 ])# AC_DISABLE_FAST_INSTALL
2872 # AC_LIBTOOL_PICMODE([MODE])
2873 # --------------------------
2874 # implement the --with-pic flag
2875 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2876 AC_DEFUN([AC_LIBTOOL_PICMODE],
2877 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2878 pic_mode=ifelse($#,1,$1,default)
2879 ])# AC_LIBTOOL_PICMODE
2884 # This is predefined starting with Autoconf 2.54, so this conditional
2885 # definition can be removed once we require Autoconf 2.54 or later.
2886 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2887 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2888 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2889 then ac_cv_prog_egrep='grep -E'
2890 else ac_cv_prog_egrep='egrep'
2892 EGREP=$ac_cv_prog_egrep
2897 # AC_PATH_TOOL_PREFIX
2898 # -------------------
2899 # find a file program which can recognise shared library
2900 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2901 [AC_REQUIRE([AC_PROG_EGREP])dnl
2902 AC_MSG_CHECKING([for $1])
2903 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2905 [[\\/*] | ?:[\\/]*])
2906 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2909 lt_save_MAGIC_CMD="$MAGIC_CMD"
2910 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2911 dnl $ac_dummy forces splitting on constant user-supplied paths.
2912 dnl POSIX.2 word splitting is done only on the output of word expansions,
2913 dnl not every word. This closes a longstanding sh security hole.
2914 ac_dummy="ifelse([$2], , $PATH, [$2])"
2915 for ac_dir in $ac_dummy; do
2917 test -z "$ac_dir" && ac_dir=.
2918 if test -f $ac_dir/$1; then
2919 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2920 if test -n "$file_magic_test_file"; then
2921 case $deplibs_check_method in
2923 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2924 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2925 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2926 $EGREP "$file_magic_regex" > /dev/null; then
2931 *** Warning: the command libtool uses to detect shared libraries,
2932 *** $file_magic_cmd, produces output that libtool cannot recognize.
2933 *** The result is that libtool may fail to recognize shared libraries
2934 *** as such. This will affect the creation of libtool libraries that
2935 *** depend on shared libraries, but programs linked with such libtool
2936 *** libraries will work regardless of this problem. Nevertheless, you
2937 *** may want to report the problem to your system manager and/or to
2938 *** bug-libtool@gnu.org
2948 MAGIC_CMD="$lt_save_MAGIC_CMD"
2951 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2952 if test -n "$MAGIC_CMD"; then
2953 AC_MSG_RESULT($MAGIC_CMD)
2957 ])# AC_PATH_TOOL_PREFIX
2962 # find a file program which can recognise a shared library
2963 AC_DEFUN([AC_PATH_MAGIC],
2964 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2965 if test -z "$lt_cv_path_MAGIC_CMD"; then
2966 if test -n "$ac_tool_prefix"; then
2967 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2977 # find the pathname to the GNU or non-GNU linker
2978 AC_DEFUN([AC_PROG_LD],
2979 [AC_ARG_WITH([gnu-ld],
2980 [AC_HELP_STRING([--with-gnu-ld],
2981 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2982 [test "$withval" = no || with_gnu_ld=yes],
2984 AC_REQUIRE([LT_AC_PROG_SED])dnl
2985 AC_REQUIRE([AC_PROG_CC])dnl
2986 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2987 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2989 if test "$GCC" = yes; then
2990 # Check if gcc -print-prog-name=ld gives a path.
2991 AC_MSG_CHECKING([for ld used by $CC])
2994 # gcc leaves a trailing carriage return which upsets mingw
2995 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2997 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3000 # Accept absolute paths.
3001 [[\\/]]* | ?:[[\\/]]*)
3002 re_direlt='/[[^/]][[^/]]*/\.\./'
3003 # Canonicalize the pathname of ld
3004 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3005 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3006 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3008 test -z "$LD" && LD="$ac_prog"
3011 # If it fails, then pretend we aren't using GCC.
3015 # If it is relative, then search for the first ld in PATH.
3019 elif test "$with_gnu_ld" = yes; then
3020 AC_MSG_CHECKING([for GNU ld])
3022 AC_MSG_CHECKING([for non-GNU ld])
3024 AC_CACHE_VAL(lt_cv_path_LD,
3025 [if test -z "$LD"; then
3026 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3027 for ac_dir in $PATH; do
3029 test -z "$ac_dir" && ac_dir=.
3030 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3031 lt_cv_path_LD="$ac_dir/$ac_prog"
3032 # Check to see if the program is GNU ld. I'd rather use --version,
3033 # but apparently some GNU ld's only accept -v.
3034 # Break only if it was the GNU/non-GNU ld that we prefer.
3035 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3036 *GNU* | *'with BFD'*)
3037 test "$with_gnu_ld" != no && break
3040 test "$with_gnu_ld" != yes && break
3047 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3050 if test -n "$LD"; then
3055 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3062 AC_DEFUN([AC_PROG_LD_GNU],
3063 [AC_REQUIRE([AC_PROG_EGREP])dnl
3064 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3065 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3066 case `$LD -v 2>&1 </dev/null` in
3067 *GNU* | *'with BFD'*)
3068 lt_cv_prog_gnu_ld=yes
3071 lt_cv_prog_gnu_ld=no
3074 with_gnu_ld=$lt_cv_prog_gnu_ld
3078 # AC_PROG_LD_RELOAD_FLAG
3079 # ----------------------
3080 # find reload flag for linker
3081 # -- PORTME Some linkers may need a different reload flag.
3082 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3083 [AC_CACHE_CHECK([for $LD option to reload object files],
3084 lt_cv_ld_reload_flag,
3085 [lt_cv_ld_reload_flag='-r'])
3086 reload_flag=$lt_cv_ld_reload_flag
3087 case $reload_flag in
3089 *) reload_flag=" $reload_flag" ;;
3091 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3092 ])# AC_PROG_LD_RELOAD_FLAG
3095 # AC_DEPLIBS_CHECK_METHOD
3096 # -----------------------
3097 # how to check for library dependencies
3098 # -- PORTME fill in with the dynamic library characteristics
3099 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3100 [AC_CACHE_CHECK([how to recognise dependent libraries],
3101 lt_cv_deplibs_check_method,
3102 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3103 lt_cv_file_magic_test_file=
3104 lt_cv_deplibs_check_method='unknown'
3105 # Need to set the preceding variable on all platforms that support
3106 # interlibrary dependencies.
3107 # 'none' -- dependencies not supported.
3108 # `unknown' -- same as none, but documents that we really don't know.
3109 # 'pass_all' -- all dependencies passed with no checks.
3110 # 'test_compile' -- check by making test program.
3111 # 'file_magic [[regex]]' -- check by looking for files in library path
3112 # which responds to the $file_magic_cmd with a given extended regex.
3113 # If you have `file' or equivalent on your system and you're not sure
3114 # whether `pass_all' will *always* work, you probably want this one.
3118 lt_cv_deplibs_check_method=pass_all
3122 lt_cv_deplibs_check_method=pass_all
3126 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3127 lt_cv_file_magic_cmd='/usr/bin/file -L'
3128 lt_cv_file_magic_test_file=/shlib/libc.so
3132 # func_win32_libid is a shell function defined in ltmain.sh
3133 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3134 lt_cv_file_magic_cmd='func_win32_libid'
3138 # Base MSYS/MinGW do not provide the 'file' command needed by
3139 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3140 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3141 lt_cv_file_magic_cmd='$OBJDUMP -f'
3144 darwin* | rhapsody*)
3145 lt_cv_deplibs_check_method=pass_all
3148 freebsd* | kfreebsd*-gnu)
3149 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3152 # Not sure whether the presence of OpenBSD here was a mistake.
3153 # Let's accept both of them until this is cleared up.
3154 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3155 lt_cv_file_magic_cmd=/usr/bin/file
3156 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3160 lt_cv_deplibs_check_method=pass_all
3165 lt_cv_deplibs_check_method=pass_all
3168 hpux10.20* | hpux11*)
3169 lt_cv_file_magic_cmd=/usr/bin/file
3172 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3173 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3176 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3177 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3180 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3181 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3186 irix5* | irix6* | nonstopux*)
3188 *-32|*"-32 ") libmagic=32-bit;;
3189 *-n32|*"-n32 ") libmagic=N32;;
3190 *-64|*"-64 ") libmagic=64-bit;;
3191 *) libmagic=never-match;;
3193 lt_cv_deplibs_check_method=pass_all
3196 # This must be Linux ELF.
3199 alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
3200 lt_cv_deplibs_check_method=pass_all ;;
3202 # glibc up to 2.1.1 does not perform some relocations on ARM
3203 # this will be overridden with pass_all, but let us keep it just in case
3204 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3206 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3207 lt_cv_deplibs_check_method=pass_all
3211 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3212 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3214 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3219 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3220 lt_cv_file_magic_cmd=/usr/bin/file
3221 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3225 lt_cv_deplibs_check_method=unknown
3229 lt_cv_file_magic_cmd=/usr/bin/file
3230 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3231 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3232 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3234 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3238 osf3* | osf4* | osf5*)
3239 lt_cv_deplibs_check_method=pass_all
3243 lt_cv_deplibs_check_method=pass_all
3247 lt_cv_deplibs_check_method=pass_all
3250 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3251 case $host_vendor in
3253 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]]'
3254 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3257 lt_cv_deplibs_check_method=pass_all
3260 lt_cv_file_magic_cmd='/bin/file'
3261 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3264 lt_cv_file_magic_cmd='/bin/file'
3265 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3266 lt_cv_file_magic_test_file=/lib/libc.so
3269 lt_cv_deplibs_check_method=pass_all
3274 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3275 lt_cv_deplibs_check_method=pass_all
3279 file_magic_cmd=$lt_cv_file_magic_cmd
3280 deplibs_check_method=$lt_cv_deplibs_check_method
3281 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3282 ])# AC_DEPLIBS_CHECK_METHOD
3287 # find the pathname to a BSD-compatible name lister
3288 AC_DEFUN([AC_PROG_NM],
3289 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3290 [if test -n "$NM"; then
3291 # Let the user override the test.
3294 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3295 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3297 test -z "$ac_dir" && ac_dir=.
3298 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3299 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3300 # Check to see if the nm accepts a BSD-compat flag.
3301 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3302 # nm: unknown option "B" ignored
3303 # Tru64's nm complains that /dev/null is an invalid object file
3304 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3305 */dev/null* | *'Invalid file or object type'*)
3306 lt_cv_path_NM="$tmp_nm -B"
3310 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3312 lt_cv_path_NM="$tmp_nm -p"
3316 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3317 continue # so that we can try to find one that supports BSD flags
3324 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3332 # check for math library
3333 AC_DEFUN([AC_CHECK_LIBM],
3334 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3337 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3338 # These system don't have libm, or don't need it
3341 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3342 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3345 AC_CHECK_LIB(m, cos, LIBM="-lm")
3351 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3352 # -----------------------------------
3353 # sets LIBLTDL to the link flags for the libltdl convenience library and
3354 # LTDLINCL to the include flags for the libltdl header and adds
3355 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3356 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3357 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3358 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3359 # '${top_srcdir}/' (note the single quotes!). If your package is not
3360 # flat and you're not using automake, define top_builddir and
3361 # top_srcdir appropriately in the Makefiles.
3362 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3363 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3364 case $enable_ltdl_convenience in
3365 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3366 "") enable_ltdl_convenience=yes
3367 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3369 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3370 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3371 # For backwards non-gettext consistent compatibility...
3373 ])# AC_LIBLTDL_CONVENIENCE
3376 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3377 # -----------------------------------
3378 # sets LIBLTDL to the link flags for the libltdl installable library and
3379 # LTDLINCL to the include flags for the libltdl header and adds
3380 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3381 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3382 # DIRECTORY is not provided and an installed libltdl is not found, it is
3383 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3384 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3385 # quotes!). If your package is not flat and you're not using automake,
3386 # define top_builddir and top_srcdir appropriately in the Makefiles.
3387 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3388 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3389 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3390 AC_CHECK_LIB(ltdl, lt_dlinit,
3391 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3392 [if test x"$enable_ltdl_install" = xno; then
3393 AC_MSG_WARN([libltdl not installed, but installation disabled])
3395 enable_ltdl_install=yes
3398 if test x"$enable_ltdl_install" = x"yes"; then
3399 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3400 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3401 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3403 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3407 # For backwards non-gettext consistent compatibility...
3409 ])# AC_LIBLTDL_INSTALLABLE
3414 # enable support for C++ libraries
3415 AC_DEFUN([AC_LIBTOOL_CXX],
3416 [AC_REQUIRE([_LT_AC_LANG_CXX])
3422 AC_DEFUN([_LT_AC_LANG_CXX],
3423 [AC_REQUIRE([AC_PROG_CXX])
3424 AC_REQUIRE([AC_PROG_CXXCPP])
3425 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3431 # enable support for Fortran 77 libraries
3432 AC_DEFUN([AC_LIBTOOL_F77],
3433 [AC_REQUIRE([_LT_AC_LANG_F77])
3439 AC_DEFUN([_LT_AC_LANG_F77],
3440 [AC_REQUIRE([AC_PROG_F77])
3441 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3447 # enable support for GCJ libraries
3448 AC_DEFUN([AC_LIBTOOL_GCJ],
3449 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3455 AC_DEFUN([_LT_AC_LANG_GCJ],
3456 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3457 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3458 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3459 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3460 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3461 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3462 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3468 # enable support for Windows resource files
3469 AC_DEFUN([AC_LIBTOOL_RC],
3470 [AC_REQUIRE([LT_AC_PROG_RC])
3471 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3475 # AC_LIBTOOL_LANG_C_CONFIG
3476 # ------------------------
3477 # Ensure that the configuration vars for the C compiler are
3478 # suitably defined. Those variables are subsequently used by
3479 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3480 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3481 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3485 # Source file extension for C test sources.
3488 # Object file extension for compiled C test sources.
3490 _LT_AC_TAGVAR(objext, $1)=$objext
3492 # Code to be used in simple compile tests
3493 lt_simple_compile_test_code="int some_variable = 0;\n"
3495 # Code to be used in simple link tests
3496 lt_simple_link_test_code='int main(){return(0);}\n'
3501 # Check for any special shared library compilation flags.
3503 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3504 if test "$GCC" = no; then
3507 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3511 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3512 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3513 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3515 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3516 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3522 # Check to make sure the static flag actually works.
3524 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3525 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3526 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3528 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3532 ## There is no encapsulation within the following macros, do not change
3533 ## the running order or otherwise move them around unless you know exactly
3534 ## what you are doing...
3535 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3536 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3537 AC_LIBTOOL_PROG_CC_C_O($1)
3538 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3539 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3540 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3541 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3542 AC_LIBTOOL_SYS_LIB_STRIP
3543 AC_LIBTOOL_DLOPEN_SELF($1)
3545 # Report which librarie types wil actually be built
3546 AC_MSG_CHECKING([if libtool supports shared libraries])
3547 AC_MSG_RESULT([$can_build_shared])
3549 AC_MSG_CHECKING([whether to build shared libraries])
3550 test "$can_build_shared" = "no" && enable_shared=no
3552 # On AIX, shared libraries and static libraries use the same namespace, and
3553 # are all built from PIC.
3556 test "$enable_shared" = yes && enable_static=no
3557 if test -n "$RANLIB"; then
3558 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3559 postinstall_cmds='$RANLIB $lib'
3564 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3565 test "$enable_shared" = yes && enable_static=no
3568 darwin* | rhapsody*)
3569 if test "$GCC" = yes; then
3570 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3572 rhapsody* | darwin1.[[012]])
3573 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3576 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3577 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3579 case ${MACOSX_DEPLOYMENT_TARGET} in
3581 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3584 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3590 output_verbose_link_cmd='echo'
3591 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3592 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3593 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3594 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3595 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3596 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3597 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3598 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3599 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3600 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3602 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3606 AC_MSG_RESULT([$enable_shared])
3608 AC_MSG_CHECKING([whether to build static libraries])
3609 # Make sure either enable_shared or enable_static is yes.
3610 test "$enable_shared" = yes || enable_static=yes
3611 AC_MSG_RESULT([$enable_static])
3613 AC_LIBTOOL_CONFIG($1)
3617 ])# AC_LIBTOOL_LANG_C_CONFIG
3620 # AC_LIBTOOL_LANG_CXX_CONFIG
3621 # --------------------------
3622 # Ensure that the configuration vars for the C compiler are
3623 # suitably defined. Those variables are subsequently used by
3624 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3625 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3626 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3628 AC_REQUIRE([AC_PROG_CXX])
3629 AC_REQUIRE([AC_PROG_CXXCPP])
3631 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3632 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3633 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3634 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3635 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3636 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3637 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3638 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3639 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3640 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3641 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3642 _LT_AC_TAGVAR(module_cmds, $1)=
3643 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3644 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3645 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3646 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3647 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3648 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3650 # Dependencies to place before and after the object being linked:
3651 _LT_AC_TAGVAR(predep_objects, $1)=
3652 _LT_AC_TAGVAR(postdep_objects, $1)=
3653 _LT_AC_TAGVAR(predeps, $1)=
3654 _LT_AC_TAGVAR(postdeps, $1)=
3655 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3657 # Source file extension for C++ test sources.
3660 # Object file extension for compiled C++ test sources.
3662 _LT_AC_TAGVAR(objext, $1)=$objext
3664 # Code to be used in simple compile tests
3665 lt_simple_compile_test_code="int some_variable = 0;\n"
3667 # Code to be used in simple link tests
3668 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3670 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3673 # Allow CC to be a program name with arguments.
3678 lt_save_with_gnu_ld=$with_gnu_ld
3679 lt_save_path_LD=$lt_cv_path_LD
3680 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3681 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3683 unset lt_cv_prog_gnu_ld
3685 if test -n "${lt_cv_path_LDCXX+set}"; then
3686 lt_cv_path_LD=$lt_cv_path_LDCXX
3690 test -z "${LDCXX+set}" || LD=$LDCXX
3693 _LT_AC_TAGVAR(compiler, $1)=$CC
3694 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3696 # We don't want -fno-exception wen compiling C++ code, so set the
3697 # no_builtin_flag separately
3698 if test "$GXX" = yes; then
3699 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3701 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3704 if test "$GXX" = yes; then
3705 # Set up default GNU C++ configuration
3709 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3710 # archiving commands below assume that GNU ld is being used.
3711 if test "$with_gnu_ld" = yes; then
3712 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3713 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3715 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3716 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3718 # If archive_cmds runs LD, not CC, wlarc should be empty
3719 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3720 # investigate it a little bit more. (MM)
3723 # ancient GNU ld didn't support --whole-archive et. al.
3724 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3725 grep 'no-whole-archive' > /dev/null; then
3726 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3728 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3734 # A generic and very simple default shared library creation
3735 # command for GNU C++ for the case where it uses the native
3736 # linker, instead of GNU ld. If possible, this setting should
3737 # overridden to take advantage of the native linker features on
3738 # the platform it is being used on.
3739 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3742 # Commands to make compiler produce verbose output that lists
3743 # what "hidden" libraries, object files and flags are used when
3744 # linking a shared library.
3745 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3753 # PORTME: fill in a description of your system's C++ link characteristics
3754 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3755 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3758 # FIXME: insert proper C++ library support
3759 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3762 if test "$host_cpu" = ia64; then
3763 # On IA64, the linker does run time linking by default, so we don't
3764 # have to do anything special.
3765 aix_use_runtimelinking=no
3766 exp_sym_flag='-Bexport'
3769 aix_use_runtimelinking=no
3771 # Test if we are trying to use run time linking or normal
3772 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3773 # need to do runtime linking.
3774 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3775 for ld_flag in $LDFLAGS; do
3778 aix_use_runtimelinking=yes
3785 exp_sym_flag='-bexport'
3786 no_entry_flag='-bnoentry'
3789 # When large executables or shared objects are built, AIX ld can
3790 # have problems creating the table of contents. If linking a library
3791 # or program results in "error TOC overflow" add -mminimal-toc to
3792 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3793 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3795 _LT_AC_TAGVAR(archive_cmds, $1)=''
3796 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3797 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3798 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3800 if test "$GXX" = yes; then
3801 case $host_os in aix4.[012]|aix4.[012].*)
3802 # We only want to do this on AIX 4.2 and lower, the check
3803 # below for broken collect2 doesn't work under 4.3+
3804 collect2name=`${CC} -print-prog-name=collect2`
3805 if test -f "$collect2name" && \
3806 strings "$collect2name" | grep resolve_lib_name >/dev/null
3808 # We have reworked collect2
3809 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3811 # We have old collect2
3812 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3813 # It fails to find uninstalled libraries when the uninstalled
3814 # path is not listed in the libpath. Setting hardcode_minus_L
3815 # to unsupported forces relinking
3816 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3817 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3818 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3821 shared_flag='-shared'
3824 if test "$host_cpu" = ia64; then
3825 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3826 # chokes on -Wl,-G. The following line is correct:
3829 if test "$aix_use_runtimelinking" = yes; then
3830 shared_flag='${wl}-G'
3832 shared_flag='${wl}-bM:SRE'
3837 # It seems that -bexpall does not export symbols beginning with
3838 # underscore (_), so it is better to generate a list of symbols to export.
3839 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3840 if test "$aix_use_runtimelinking" = yes; then
3841 # Warning - without using the other runtime loading flags (-brtl),
3842 # -berok will link without error, but may produce a broken library.
3843 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3844 # Determine the default libpath from the value encoded in an empty executable.
3845 _LT_AC_SYS_LIBPATH_AIX
3846 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3848 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3850 if test "$host_cpu" = ia64; then
3851 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3852 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3853 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3855 # Determine the default libpath from the value encoded in an empty executable.
3856 _LT_AC_SYS_LIBPATH_AIX
3857 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3858 # Warning - without using the other run time loading flags,
3859 # -berok will link without error, but may produce a broken library.
3860 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3861 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3862 # -bexpall does not export symbols beginning with underscore (_)
3863 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3864 # Exported symbols can be pulled into shared objects from archives
3865 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3866 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3867 # This is similar to how AIX traditionally builds it's shared libraries.
3868 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3873 case $cc_basename in
3875 # FIXME: insert proper C++ library support
3876 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3881 cygwin* | mingw* | pw32*)
3882 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3883 # as there is no search path for DLLs.
3884 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3885 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3886 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3887 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3889 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3890 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3891 # If the export-symbols file already is a .def file (1st line
3892 # is EXPORTS), use it as is; otherwise, prepend...
3893 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3894 cp $export_symbols $output_objdir/$soname.def;
3896 echo EXPORTS > $output_objdir/$soname.def;
3897 cat $export_symbols >> $output_objdir/$soname.def;
3899 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3901 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3905 darwin* | rhapsody*)
3906 if test "$GXX" = yes; then
3907 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3909 rhapsody* | darwin1.[[012]])
3910 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3913 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3914 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3916 case ${MACOSX_DEPLOYMENT_TARGET} in
3918 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3921 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3927 lt_int_apple_cc_single_mod=no
3928 output_verbose_link_cmd='echo'
3929 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3930 lt_int_apple_cc_single_mod=yes
3932 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3933 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3935 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3937 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3939 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3940 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3941 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3943 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3945 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3946 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3947 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3948 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3949 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3950 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3952 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3957 case $cc_basename in
3959 # FIXME: insert proper C++ library support
3960 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3963 # Green Hills C++ Compiler
3964 # FIXME: insert proper C++ library support
3965 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3968 # FIXME: insert proper C++ library support
3969 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3974 # C++ shared libraries reported to be fairly broken before switch to ELF
3975 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3978 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3980 freebsd* | kfreebsd*-gnu)
3981 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3983 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3988 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3989 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3990 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3991 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3992 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3993 # but as the default
3994 # location of the library.
3996 case $cc_basename in
3998 # FIXME: insert proper C++ library support
3999 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4002 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4003 # Commands to make compiler produce verbose output that lists
4004 # what "hidden" libraries, object files and flags are used when
4005 # linking a shared library.
4007 # There doesn't appear to be a way to prevent this compiler from
4008 # explicitly linking system object files so we need to strip them
4009 # from the output so that they don't get included in the library
4011 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4014 if test "$GXX" = yes; then
4015 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4017 # FIXME: insert proper C++ library support
4018 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4024 if test $with_gnu_ld = no; then
4027 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4028 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4029 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4032 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4035 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4036 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4037 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4043 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4044 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4047 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4048 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4049 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4050 # but as the default
4051 # location of the library.
4054 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4055 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4056 # but as the default
4057 # location of the library.
4061 case $cc_basename in
4063 # FIXME: insert proper C++ library support
4064 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4069 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4072 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4075 # Commands to make compiler produce verbose output that lists
4076 # what "hidden" libraries, object files and flags are used when
4077 # linking a shared library.
4079 # There doesn't appear to be a way to prevent this compiler from
4080 # explicitly linking system object files so we need to strip them
4081 # from the output so that they don't get included in the library
4083 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4086 if test "$GXX" = yes; then
4087 if test $with_gnu_ld = no; then
4090 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4093 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4098 # FIXME: insert proper C++ library support
4099 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4105 case $cc_basename in
4108 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
4110 # Archives containing C++ object files must be created using
4111 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4112 # necessary to make sure instantiated templates are included
4114 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4117 if test "$GXX" = yes; then
4118 if test "$with_gnu_ld" = no; then
4119 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
4121 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4124 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4127 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4128 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4131 case $cc_basename in
4133 # Kuck and Associates, Inc. (KAI) C++ Compiler
4135 # KCC will only create a shared library if the output file
4136 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4137 # to its proper name (with version) after linking.
4138 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4139 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4140 # Commands to make compiler produce verbose output that lists
4141 # what "hidden" libraries, object files and flags are used when
4142 # linking a shared library.
4144 # There doesn't appear to be a way to prevent this compiler from
4145 # explicitly linking system object files so we need to strip them
4146 # from the output so that they don't get included in the library
4148 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4150 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4151 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4153 # Archives containing C++ object files must be created using
4154 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4155 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4160 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4161 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4162 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4163 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4164 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4165 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4169 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4170 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4172 runpath_var=LD_RUN_PATH
4173 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4174 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4176 # Commands to make compiler produce verbose output that lists
4177 # what "hidden" libraries, object files and flags are used when
4178 # linking a shared library.
4180 # There doesn't appear to be a way to prevent this compiler from
4181 # explicitly linking system object files so we need to strip them
4182 # from the output so that they don't get included in the library
4184 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4189 # FIXME: insert proper C++ library support
4190 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4193 # FIXME: insert proper C++ library support
4194 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4197 case $cc_basename in
4199 # FIXME: insert proper C++ library support
4200 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4203 # FIXME: insert proper C++ library support
4204 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4209 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4210 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4212 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4213 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4214 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4216 # Workaround some broken pre-1.5 toolchains
4217 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4220 case $cc_basename in
4222 # Kuck and Associates, Inc. (KAI) C++ Compiler
4224 # KCC will only create a shared library if the output file
4225 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4226 # to its proper name (with version) after linking.
4227 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4229 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4230 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4232 # Archives containing C++ object files must be created using
4233 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4234 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4238 # Rational C++ 2.4.1
4239 # FIXME: insert proper C++ library support
4240 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4243 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4244 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
4246 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4247 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4249 # Commands to make compiler produce verbose output that lists
4250 # what "hidden" libraries, object files and flags are used when
4251 # linking a shared library.
4253 # There doesn't appear to be a way to prevent this compiler from
4254 # explicitly linking system object files so we need to strip them
4255 # from the output so that they don't get included in the library
4257 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4260 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4261 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4262 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
4264 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4265 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4267 # Commands to make compiler produce verbose output that lists
4268 # what "hidden" libraries, object files and flags are used when
4269 # linking a shared library.
4270 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4273 # FIXME: insert proper C++ library support
4274 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4280 case $cc_basename in
4282 # Kuck and Associates, Inc. (KAI) C++ Compiler
4284 # KCC will only create a shared library if the output file
4285 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4286 # to its proper name (with version) after linking.
4287 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4289 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4290 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4292 # Archives containing C++ object files must be created using
4293 # the KAI C++ compiler.
4294 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4297 # Rational C++ 2.4.1
4298 # FIXME: insert proper C++ library support
4299 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4302 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4303 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
4304 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4305 echo "-hidden">> $lib.exp~
4306 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
4309 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4310 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4312 # Commands to make compiler produce verbose output that lists
4313 # what "hidden" libraries, object files and flags are used when
4314 # linking a shared library.
4316 # There doesn't appear to be a way to prevent this compiler from
4317 # explicitly linking system object files so we need to strip them
4318 # from the output so that they don't get included in the library
4320 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4323 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4324 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4325 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
4327 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4328 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4330 # Commands to make compiler produce verbose output that lists
4331 # what "hidden" libraries, object files and flags are used when
4332 # linking a shared library.
4333 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4336 # FIXME: insert proper C++ library support
4337 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4343 # FIXME: insert proper C++ library support
4344 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4347 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4348 case $cc_basename in
4350 # FIXME: insert proper C++ library support
4351 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4354 # FIXME: insert proper C++ library support
4355 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4360 case $cc_basename in
4363 # FIXME: insert proper C++ library support
4364 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4368 # FIXME: insert proper C++ library support
4369 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4372 # FIXME: insert proper C++ library support
4373 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4378 case $cc_basename in
4380 # Sun C++ 4.2, 5.x and Centerline C++
4381 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4382 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4383 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4384 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4386 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4387 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4389 solaris2.[0-5] | solaris2.[0-5].*) ;;
4391 # The C++ compiler is used as linker so we must use $wl
4392 # flag to pass the commands to the underlying system
4394 # Supported since Solaris 2.6 (maybe 2.5.1?)
4395 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4398 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4400 # Commands to make compiler produce verbose output that lists
4401 # what "hidden" libraries, object files and flags are used when
4402 # linking a shared library.
4404 # There doesn't appear to be a way to prevent this compiler from
4405 # explicitly linking system object files so we need to strip them
4406 # from the output so that they don't get included in the library
4408 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4410 # Archives containing C++ object files must be created using
4411 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4412 # necessary to make sure instantiated templates are included
4414 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4417 # Green Hills C++ Compiler
4418 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4420 # The C++ compiler must be used to create the archive.
4421 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4424 # GNU C++ compiler with Solaris linker
4425 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4426 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4427 if $CC --version | grep -v '^2\.7' > /dev/null; then
4428 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4429 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4430 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4432 # Commands to make compiler produce verbose output that lists
4433 # what "hidden" libraries, object files and flags are used when
4434 # linking a shared library.
4435 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4437 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4439 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4440 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4441 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4443 # Commands to make compiler produce verbose output that lists
4444 # what "hidden" libraries, object files and flags are used when
4445 # linking a shared library.
4446 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4449 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4454 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4455 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4458 case $cc_basename in
4460 # NonStop-UX NCC 3.20
4461 # FIXME: insert proper C++ library support
4462 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4465 # FIXME: insert proper C++ library support
4466 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4471 # FIXME: insert proper C++ library support
4472 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4475 # FIXME: insert proper C++ library support
4476 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4479 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4480 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4482 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4483 _LT_AC_TAGVAR(LD, $1)="$LD"
4486 ## There is no encapsulation within the following macros, do not change
4487 ## the running order or otherwise move them around unless you know exactly
4488 ## what you are doing...
4489 AC_LIBTOOL_POSTDEP_PREDEP($1)
4490 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4491 AC_LIBTOOL_PROG_CC_C_O($1)
4492 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4493 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4494 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4495 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4496 AC_LIBTOOL_SYS_LIB_STRIP
4497 AC_LIBTOOL_DLOPEN_SELF($1)
4499 AC_LIBTOOL_CONFIG($1)
4506 with_gnu_ldcxx=$with_gnu_ld
4507 with_gnu_ld=$lt_save_with_gnu_ld
4508 lt_cv_path_LDCXX=$lt_cv_path_LD
4509 lt_cv_path_LD=$lt_save_path_LD
4510 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4511 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4512 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4514 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4515 # ------------------------
4516 # Figure out "hidden" library dependencies from verbose
4517 # compiler output when linking a shared library.
4518 # Parse the compiler output and extract the necessary
4519 # objects, libraries and library flags.
4520 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4521 dnl we can't use the lt_simple_compile_test_code here,
4522 dnl because it contains code intended for an executable,
4523 dnl not a library. It's possible we should let each
4524 dnl tag define a new lt_????_link_test_code variable,
4525 dnl but it's only used here...
4526 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4528 void foo (void) { a = 0; }
4530 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4534 Foo (void) { a = 0; }
4539 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4547 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4550 public void bar (void) {
4556 dnl Parse the compiler output and extract the necessary
4557 dnl objects, libraries and library flags.
4558 if AC_TRY_EVAL(ac_compile); then
4559 # Parse the compiler output and extract the necessary
4560 # objects, libraries and library flags.
4562 # Sentinel used to keep track of whether or not we are before
4563 # the conftest object file.
4564 pre_test_object_deps_done=no
4566 # The `*' in the case matches for architectures that use `case' in
4567 # $output_verbose_cmd can trigger glob expansion during the loop
4568 # eval without this substitution.
4569 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4571 for p in `eval $output_verbose_link_cmd`; do
4575 # Some compilers place space between "-{L,R}" and the path.
4578 || test $p = "-R"; then
4585 if test "$pre_test_object_deps_done" = no; then
4588 # Internal compiler library paths should come after those
4589 # provided the user. The postdeps already come after the
4590 # user supplied libs so there is no need to process them.
4591 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4592 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4594 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4597 # The "-l" case would never come before the object being
4598 # linked, so don't bother handling this case.
4601 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4602 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4604 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4610 # This assumes that the test object file only shows up
4611 # once in the compiler output.
4612 if test "$p" = "conftest.$objext"; then
4613 pre_test_object_deps_done=yes
4617 if test "$pre_test_object_deps_done" = no; then
4618 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4619 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4621 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4624 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4625 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4627 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4632 *) ;; # Ignore the rest.
4640 echo "libtool.m4: error: problem compiling $1 test program"
4643 $rm -f confest.$objext
4645 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4646 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4648 ])# AC_LIBTOOL_POSTDEP_PREDEP
4650 # AC_LIBTOOL_LANG_F77_CONFIG
4651 # ------------------------
4652 # Ensure that the configuration vars for the C compiler are
4653 # suitably defined. Those variables are subsequently used by
4654 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4655 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4656 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4657 [AC_REQUIRE([AC_PROG_F77])
4658 AC_LANG_PUSH(Fortran 77)
4660 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4661 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4662 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4663 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4664 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4665 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4666 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4667 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4668 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4669 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4670 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4671 _LT_AC_TAGVAR(module_cmds, $1)=
4672 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4673 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4674 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4675 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4676 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4677 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4679 # Source file extension for f77 test sources.
4682 # Object file extension for compiled f77 test sources.
4684 _LT_AC_TAGVAR(objext, $1)=$objext
4686 # Code to be used in simple compile tests
4687 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4689 # Code to be used in simple link tests
4690 lt_simple_link_test_code=" program t\n end\n"
4692 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4695 # Allow CC to be a program name with arguments.
4699 _LT_AC_TAGVAR(compiler, $1)=$CC
4700 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4702 AC_MSG_CHECKING([if libtool supports shared libraries])
4703 AC_MSG_RESULT([$can_build_shared])
4705 AC_MSG_CHECKING([whether to build shared libraries])
4706 test "$can_build_shared" = "no" && enable_shared=no
4708 # On AIX, shared libraries and static libraries use the same namespace, and
4709 # are all built from PIC.
4712 test "$enable_shared" = yes && enable_static=no
4713 if test -n "$RANLIB"; then
4714 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4715 postinstall_cmds='$RANLIB $lib'
4719 test "$enable_shared" = yes && enable_static=no
4722 AC_MSG_RESULT([$enable_shared])
4724 AC_MSG_CHECKING([whether to build static libraries])
4725 # Make sure either enable_shared or enable_static is yes.
4726 test "$enable_shared" = yes || enable_static=yes
4727 AC_MSG_RESULT([$enable_static])
4729 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4731 _LT_AC_TAGVAR(GCC, $1)="$G77"
4732 _LT_AC_TAGVAR(LD, $1)="$LD"
4734 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4735 AC_LIBTOOL_PROG_CC_C_O($1)
4736 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4737 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4738 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4739 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4740 AC_LIBTOOL_SYS_LIB_STRIP
4743 AC_LIBTOOL_CONFIG($1)
4747 ])# AC_LIBTOOL_LANG_F77_CONFIG
4750 # AC_LIBTOOL_LANG_GCJ_CONFIG
4751 # --------------------------
4752 # Ensure that the configuration vars for the C compiler are
4753 # suitably defined. Those variables are subsequently used by
4754 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4755 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4756 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4759 # Source file extension for Java test sources.
4762 # Object file extension for compiled Java test sources.
4764 _LT_AC_TAGVAR(objext, $1)=$objext
4766 # Code to be used in simple compile tests
4767 lt_simple_compile_test_code="class foo {}\n"
4769 # Code to be used in simple link tests
4770 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4772 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4775 # Allow CC to be a program name with arguments.
4779 _LT_AC_TAGVAR(compiler, $1)=$CC
4781 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4782 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4785 ## There is no encapsulation within the following macros, do not change
4786 ## the running order or otherwise move them around unless you know exactly
4787 ## what you are doing...
4788 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4789 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4790 AC_LIBTOOL_PROG_CC_C_O($1)
4791 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4792 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4793 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4794 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4795 AC_LIBTOOL_SYS_LIB_STRIP
4796 AC_LIBTOOL_DLOPEN_SELF($1)
4798 AC_LIBTOOL_CONFIG($1)
4802 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4805 # AC_LIBTOOL_LANG_RC_CONFIG
4806 # --------------------------
4807 # Ensure that the configuration vars for the Windows resource compiler are
4808 # suitably defined. Those variables are subsequently used by
4809 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4810 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4811 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4814 # Source file extension for RC test sources.
4817 # Object file extension for compiled RC test sources.
4819 _LT_AC_TAGVAR(objext, $1)=$objext
4821 # Code to be used in simple compile tests
4822 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4824 # Code to be used in simple link tests
4825 lt_simple_link_test_code="$lt_simple_compile_test_code"
4827 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4830 # Allow CC to be a program name with arguments.
4834 _LT_AC_TAGVAR(compiler, $1)=$CC
4835 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4837 AC_LIBTOOL_CONFIG($1)
4841 ])# AC_LIBTOOL_LANG_RC_CONFIG
4844 # AC_LIBTOOL_CONFIG([TAGNAME])
4845 # ----------------------------
4846 # If TAGNAME is not passed, then create an initial libtool script
4847 # with a default configuration from the untagged config vars. Otherwise
4848 # add code to config.status for appending the configuration named by
4849 # TAGNAME from the matching tagged config vars.
4850 AC_DEFUN([AC_LIBTOOL_CONFIG],
4851 [# The else clause should only fire when bootstrapping the
4852 # libtool distribution, otherwise you forgot to ship ltmain.sh
4853 # with your package, and you will get complaints that there are
4854 # no rules to generate ltmain.sh.
4855 if test -f "$ltmain"; then
4856 # See if we are running on zsh, and set the options which allow our commands through
4857 # without removal of \ escapes.
4858 if test -n "${ZSH_VERSION+set}" ; then
4859 setopt NO_GLOB_SUBST
4861 # Now quote all the things that may contain metacharacters while being
4862 # careful not to overquote the AC_SUBSTed values. We take copies of the
4863 # variables and quote the copies for generation of the libtool script.
4864 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4866 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4867 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4868 deplibs_check_method reload_flag reload_cmds need_locks \
4869 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4870 lt_cv_sys_global_symbol_to_c_name_address \
4871 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4872 old_postinstall_cmds old_postuninstall_cmds \
4873 _LT_AC_TAGVAR(compiler, $1) \
4874 _LT_AC_TAGVAR(CC, $1) \
4875 _LT_AC_TAGVAR(LD, $1) \
4876 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4877 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4878 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4879 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4880 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4881 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4882 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4883 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4884 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4885 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4886 _LT_AC_TAGVAR(predep_objects, $1) \
4887 _LT_AC_TAGVAR(postdep_objects, $1) \
4888 _LT_AC_TAGVAR(predeps, $1) \
4889 _LT_AC_TAGVAR(postdeps, $1) \
4890 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4891 _LT_AC_TAGVAR(archive_cmds, $1) \
4892 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4893 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4894 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4895 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4896 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4897 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4898 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4899 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4900 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4901 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4902 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4903 _LT_AC_TAGVAR(module_cmds, $1) \
4904 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4905 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4906 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4907 _LT_AC_TAGVAR(include_expsyms, $1); do
4910 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4911 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4912 _LT_AC_TAGVAR(archive_cmds, $1) | \
4913 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4914 _LT_AC_TAGVAR(module_cmds, $1) | \
4915 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4916 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4917 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4918 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4919 postinstall_cmds | postuninstall_cmds | \
4920 old_postinstall_cmds | old_postuninstall_cmds | \
4921 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4922 # Double-quote double-evaled strings.
4923 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4926 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4932 *'\[$]0 --fallback-echo"')
4933 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4938 [cfgfile="${ofile}T"
4939 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4941 AC_MSG_NOTICE([creating $ofile])],
4944 cat <<__EOF__ >> "$cfgfile"
4948 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4949 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4950 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4952 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4953 # Free Software Foundation, Inc.
4955 # This file is part of GNU Libtool:
4956 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4958 # This program is free software; you can redistribute it and/or modify
4959 # it under the terms of the GNU General Public License as published by
4960 # the Free Software Foundation; either version 2 of the License, or
4961 # (at your option) any later version.
4963 # This program is distributed in the hope that it will be useful, but
4964 # WITHOUT ANY WARRANTY; without even the implied warranty of
4965 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4966 # General Public License for more details.
4968 # You should have received a copy of the GNU General Public License
4969 # along with this program; if not, write to the Free Software
4970 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4972 # As a special exception to the GNU General Public License, if you
4973 # distribute this file as part of a program that contains a
4974 # configuration script generated by Autoconf, you may include it under
4975 # the same distribution terms that you use for the rest of that program.
4977 # A sed program that does not truncate output.
4980 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4981 Xsed="$SED -e s/^X//"
4983 # The HP-UX ksh and POSIX shell print the target directory to stdout
4985 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4987 # The names of the tagged configurations supported by this script.
4990 # ### BEGIN LIBTOOL CONFIG],
4991 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4993 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4995 # Shell to use when invoking shell scripts.
4998 # Whether or not to build shared libraries.
4999 build_libtool_libs=$enable_shared
5001 # Whether or not to build static libraries.
5002 build_old_libs=$enable_static
5004 # Whether or not to add -lc for building shared libraries.
5005 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5007 # Whether or not to disallow shared libs when runtime libs are static
5008 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5010 # Whether or not to optimize for fast installation.
5011 fast_install=$enable_fast_install
5014 host_alias=$host_alias
5017 # An echo program that does not interpret backslashes.
5022 AR_FLAGS=$lt_AR_FLAGS
5027 # A language-specific compiler.
5028 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5030 # Is the compiler the GNU C compiler?
5031 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5036 # The linker used to build libraries.
5037 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5039 # Whether we need hard or soft links.
5042 # A BSD-compatible nm program.
5045 # A symbol stripping program
5048 # Used to examine libraries when file_magic_cmd begins "file"
5049 MAGIC_CMD=$MAGIC_CMD
5051 # Used on cygwin: DLL creation program.
5054 # Used on cygwin: object dumper.
5057 # Used on cygwin: assembler.
5060 # The name of the directory that contains temporary libtool files.
5063 # How to create reloadable object files.
5064 reload_flag=$lt_reload_flag
5065 reload_cmds=$lt_reload_cmds
5067 # How to pass a linker flag through the compiler.
5068 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5070 # Object file suffix (normally "o").
5073 # Old archive suffix (normally "a").
5076 # Shared library suffix (normally ".so").
5077 shrext_cmds='$shrext_cmds'
5079 # Executable file suffix (normally "").
5082 # Additional compiler flags for building library objects.
5083 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5086 # What is the maximum length of a command?
5087 max_cmd_len=$lt_cv_sys_max_cmd_len
5089 # Does compiler simultaneously support -c and -o options?
5090 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5092 # Must we lock files when doing compilation ?
5093 need_locks=$lt_need_locks
5095 # Do we need the lib prefix for modules?
5096 need_lib_prefix=$need_lib_prefix
5098 # Do we need a version for libraries?
5099 need_version=$need_version
5101 # Whether dlopen is supported.
5102 dlopen_support=$enable_dlopen
5104 # Whether dlopen of programs is supported.
5105 dlopen_self=$enable_dlopen_self
5107 # Whether dlopen of statically linked programs is supported.
5108 dlopen_self_static=$enable_dlopen_self_static
5110 # Compiler flag to prevent dynamic linking.
5111 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5113 # Compiler flag to turn off builtin functions.
5114 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5116 # Compiler flag to allow reflexive dlopens.
5117 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5119 # Compiler flag to generate shared objects directly from archives.
5120 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5122 # Compiler flag to generate thread-safe objects.
5123 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5125 # Library versioning type.
5126 version_type=$version_type
5128 # Format of library name prefix.
5129 libname_spec=$lt_libname_spec
5131 # List of archive names. First name is the real one, the rest are links.
5132 # The last name is the one that the linker finds with -lNAME.
5133 library_names_spec=$lt_library_names_spec
5135 # The coded name of the library, if different from the real name.
5136 soname_spec=$lt_soname_spec
5138 # Commands used to build and install an old-style archive.
5140 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5141 old_postinstall_cmds=$lt_old_postinstall_cmds
5142 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5144 # Create an old-style archive from a shared archive.
5145 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5147 # Create a temporary old-style archive to link instead of a shared archive.
5148 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5150 # Commands used to build and install a shared archive.
5151 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5152 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5153 postinstall_cmds=$lt_postinstall_cmds
5154 postuninstall_cmds=$lt_postuninstall_cmds
5156 # Commands used to build a loadable module (assumed same as above if empty)
5157 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5158 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5160 # Commands to strip libraries.
5161 old_striplib=$lt_old_striplib
5162 striplib=$lt_striplib
5164 # Dependencies to place before the objects being linked to create a
5166 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5168 # Dependencies to place after the objects being linked to create a
5170 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5172 # Dependencies to place before the objects being linked to create a
5174 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5176 # Dependencies to place after the objects being linked to create a
5178 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5180 # The library search path used internally by the compiler when linking
5182 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5184 # Method to check whether dependent libraries are shared objects.
5185 deplibs_check_method=$lt_deplibs_check_method
5187 # Command to use when deplibs_check_method == file_magic.
5188 file_magic_cmd=$lt_file_magic_cmd
5190 # Flag that allows shared libraries with undefined symbols to be built.
5191 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5193 # Flag that forces no undefined symbols.
5194 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5196 # Commands used to finish a libtool library installation in a directory.
5197 finish_cmds=$lt_finish_cmds
5199 # Same as above, but a single script fragment to be evaled but not shown.
5200 finish_eval=$lt_finish_eval
5202 # Take the output of nm and produce a listing of raw symbols and C names.
5203 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5205 # Transform the output of nm in a proper C declaration
5206 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5208 # Transform the output of nm in a C name address pair
5209 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5211 # This is the shared library runtime path variable.
5212 runpath_var=$runpath_var
5214 # This is the shared library path variable.
5215 shlibpath_var=$shlibpath_var
5217 # Is shlibpath searched before the hard-coded library search path?
5218 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5220 # How to hardcode a shared library path into an executable.
5221 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5223 # Whether we should hardcode library paths into libraries.
5224 hardcode_into_libs=$hardcode_into_libs
5226 # Flag to hardcode \$libdir into a binary during linking.
5227 # This must work even if \$libdir does not exist.
5228 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5230 # If ld is used when linking, flag to hardcode \$libdir into
5231 # a binary during linking. This must work even if \$libdir does
5233 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5235 # Whether we need a single -rpath flag with a separated argument.
5236 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5238 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5240 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5242 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5244 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5246 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5247 # the resulting binary.
5248 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5250 # Set to yes if building a shared library automatically hardcodes DIR into the library
5251 # and all subsequent libraries and executables linked against it.
5252 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5254 # Variables whose values should be saved in libtool wrapper scripts and
5255 # restored at relink time.
5256 variables_saved_for_relink="$variables_saved_for_relink"
5258 # Whether libtool must link a program against all its dependency libraries.
5259 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5261 # Compile-time system search path for libraries
5262 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5264 # Run-time system search path for libraries
5265 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5267 # Fix the shell variable \$srcfile for the compiler.
5268 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5270 # Set to yes if exported symbols are required.
5271 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5273 # The commands to list exported symbols.
5274 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5276 # The commands to extract the exported symbol list from a shared archive.
5277 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5279 # Symbols that should not be listed in the preloaded symbols.
5280 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5282 # Symbols that must always be exported.
5283 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5286 [# ### END LIBTOOL CONFIG],
5287 [# ### END LIBTOOL TAG CONFIG: $tagname])
5294 cat <<\EOF >> "$cfgfile"
5296 # AIX sometimes has problems with the GCC collect2 program. For some
5297 # reason, if we set the COLLECT_NAMES environment variable, the problems
5298 # vanish in a puff of smoke.
5299 if test "X${COLLECT_NAMES+set}" != Xset; then
5301 export COLLECT_NAMES
5307 # We use sed instead of cat because bash on DJGPP gets confused if
5308 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5309 # text mode, it properly converts lines to CR/LF. This bash problem
5310 # is reportedly fixed, but why not run on old versions too?
5311 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5313 mv -f "$cfgfile" "$ofile" || \
5314 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5318 # If there is no Makefile yet, we rely on a make rule to execute
5319 # `config.status --recheck' to rerun these tests and create the
5320 # libtool script then.
5321 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5322 if test -f "$ltmain_in"; then
5323 test -f Makefile && make "$ltmain"
5326 ])# AC_LIBTOOL_CONFIG
5329 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5330 # -------------------------------------------
5331 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5332 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5334 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5336 if test "$GCC" = yes; then
5337 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5339 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5340 lt_cv_prog_compiler_rtti_exceptions,
5341 [-fno-rtti -fno-exceptions], [],
5342 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5344 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5347 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5348 # ---------------------------------
5349 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5350 [AC_REQUIRE([AC_CANONICAL_HOST])
5351 AC_REQUIRE([AC_PROG_NM])
5352 AC_REQUIRE([AC_OBJEXT])
5353 # Check for command to grab the raw symbol name followed by C symbol from nm.
5354 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5355 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5357 # These are sane defaults that work on at least a few old systems.
5358 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5360 # Character class describing NM global symbol codes.
5361 symcode='[[BCDEGRST]]'
5363 # Regexp to match symbols that can be accessed directly from C.
5364 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5366 # Transform the above into a raw symbol and a C symbol.
5367 symxfrm='\1 \2\3 \3'
5369 # Transform an extracted symbol line into a proper C declaration
5370 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5372 # Transform an extracted symbol line into symbol name and symbol address
5373 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5375 # Define system-specific variables.
5380 cygwin* | mingw* | pw32*)
5381 symcode='[[ABCDGISTW]]'
5383 hpux*) # Its linker distinguishes data from code symbols
5384 if test "$host_cpu" = ia64; then
5385 symcode='[[ABCDEGRST]]'
5387 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5388 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5391 symcode='[[BCDEGRST]]'
5394 symcode='[[BCDEGQRST]]'
5400 symcode='[[DFNSTU]]'
5404 # Handle CRLF in mingw tool chain
5408 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5412 # If we're using GNU nm, then use its standard symbol codes.
5413 case `$NM -V 2>&1` in
5414 *GNU* | *'with BFD'*)
5415 symcode='[[ABCDGIRSTW]]' ;;
5418 # Try without a prefix undercore, then with it.
5419 for ac_symprfx in "" "_"; do
5421 # Write the raw and C identifiers.
5422 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5424 # Check to see that the pipe works correctly.
5428 cat > conftest.$ac_ext <<EOF
5433 void nm_test_func(){}
5437 int main(){nm_test_var='a';nm_test_func();return(0);}
5440 if AC_TRY_EVAL(ac_compile); then
5441 # Now try to grab the symbols.
5443 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5444 # Try sorting and uniquifying the output.
5445 if sort "$nlist" | uniq > "$nlist"T; then
5446 mv -f "$nlist"T "$nlist"
5451 # Make sure that we snagged all the symbols we need.
5452 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5453 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5454 cat <<EOF > conftest.$ac_ext
5460 # Now generate the symbol file.
5461 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5463 cat <<EOF >> conftest.$ac_ext
5464 #if defined (__STDC__) && __STDC__
5465 # define lt_ptr_t void *
5467 # define lt_ptr_t char *
5471 /* The mapping between symbol names and symbols. */
5476 lt_preloaded_symbols[[]] =
5479 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5480 cat <<\EOF >> conftest.$ac_ext
5488 # Now try linking the two files.
5489 mv conftest.$ac_objext conftstm.$ac_objext
5490 lt_save_LIBS="$LIBS"
5491 lt_save_CFLAGS="$CFLAGS"
5492 LIBS="conftstm.$ac_objext"
5493 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5494 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5497 LIBS="$lt_save_LIBS"
5498 CFLAGS="$lt_save_CFLAGS"
5500 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5503 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5506 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5509 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5510 cat conftest.$ac_ext >&5
5512 rm -f conftest* conftst*
5514 # Do not use the global_symbol_pipe unless it works.
5515 if test "$pipe_works" = yes; then
5518 lt_cv_sys_global_symbol_pipe=
5522 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5523 lt_cv_sys_global_symbol_to_cdecl=
5525 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5526 AC_MSG_RESULT(failed)
5530 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5533 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5534 # ---------------------------------------
5535 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5536 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5537 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5538 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5540 AC_MSG_CHECKING([for $compiler option to produce PIC])
5542 # C++ specific cases for pic, static, wl, etc.
5543 if test "$GXX" = yes; then
5544 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5545 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5549 # All AIX code is PIC.
5550 if test "$host_cpu" = ia64; then
5551 # AIX 5 now supports IA64 processor
5552 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5556 # FIXME: we need at least 68020 code to build shared libraries, but
5557 # adding the `-m68020' flag to GCC prevents building anything better,
5559 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5561 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5562 # PIC is the default for these OSes.
5564 mingw* | os2* | pw32*)
5565 # This hack is so that the source file can tell whether it is being
5566 # built for inclusion in a dll (and should export symbols for example).
5567 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5569 darwin* | rhapsody*)
5570 # PIC is the default on this platform
5571 # Common symbols not allowed in MH_DYLIB files
5572 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5575 # DJGPP does not support shared libraries at all
5576 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5579 if test -d /usr/nec; then
5580 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5584 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5590 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5595 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5601 # All AIX code is PIC.
5602 if test "$host_cpu" = ia64; then
5603 # AIX 5 now supports IA64 processor
5604 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5606 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5610 case $cc_basename in
5612 # Green Hills C++ Compiler
5613 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5618 case $cc_basename in
5620 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5623 # Green Hills C++ Compiler
5624 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5630 freebsd* | kfreebsd*-gnu)
5631 # FreeBSD uses GNU C++
5633 hpux9* | hpux10* | hpux11*)
5634 case $cc_basename in
5636 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5637 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5638 if test "$host_cpu" != ia64; then
5639 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5643 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5644 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5650 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5658 irix5* | irix6* | nonstopux*)
5659 case $cc_basename in
5661 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5662 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5663 # CC pic flag -KPIC is the default.
5670 case $cc_basename in
5673 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5674 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5678 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5679 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5680 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5684 # Make sure the PIC flag is empty. It appears that all Alpha
5685 # Linux and Compaq Tru64 Unix objects are PIC.
5686 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5687 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5698 case $cc_basename in
5700 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5708 osf3* | osf4* | osf5*)
5709 case $cc_basename in
5711 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5714 # Rational C++ 2.4.1
5715 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5718 # Digital/Compaq C++
5719 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5720 # Make sure the PIC flag is empty. It appears that all Alpha
5721 # Linux and Compaq Tru64 Unix objects are PIC.
5722 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5723 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5732 case $cc_basename in
5734 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5741 case $cc_basename in
5743 # Sun C++ 4.2, 5.x and Centerline C++
5744 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5745 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5746 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5749 # Green Hills C++ Compiler
5750 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5757 case $cc_basename in
5760 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5761 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5765 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5772 case $cc_basename in
5774 # NonStop-UX NCC 3.20
5775 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5786 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5792 if test "$GCC" = yes; then
5793 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5794 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5798 # All AIX code is PIC.
5799 if test "$host_cpu" = ia64; then
5800 # AIX 5 now supports IA64 processor
5801 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5806 # FIXME: we need at least 68020 code to build shared libraries, but
5807 # adding the `-m68020' flag to GCC prevents building anything better,
5809 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5812 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5813 # PIC is the default for these OSes.
5816 mingw* | pw32* | os2*)
5817 # This hack is so that the source file can tell whether it is being
5818 # built for inclusion in a dll (and should export symbols for example).
5819 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5822 darwin* | rhapsody*)
5823 # PIC is the default on this platform
5824 # Common symbols not allowed in MH_DYLIB files
5825 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5829 # Just because we use GCC doesn't mean we suddenly get shared libraries
5830 # on systems that don't support them.
5831 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5836 if test -d /usr/nec; then
5837 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5842 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5849 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5855 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5859 # PORTME Check for flag to pass linker flags through the system compiler.
5862 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5863 if test "$host_cpu" = ia64; then
5864 # AIX 5 now supports IA64 processor
5865 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5867 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5871 mingw* | pw32* | os2*)
5872 # This hack is so that the source file can tell whether it is being
5873 # built for inclusion in a dll (and should export symbols for example).
5874 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5877 hpux9* | hpux10* | hpux11*)
5878 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5879 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5886 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5889 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5890 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5893 irix5* | irix6* | nonstopux*)
5894 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5895 # PIC (with -KPIC) is the default.
5896 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5900 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5901 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5907 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5908 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5909 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5912 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5913 # All Alpha code is PIC.
5914 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5919 osf3* | osf4* | osf5*)
5920 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5921 # All OSF/1 code is PIC.
5922 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5926 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5927 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5931 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5932 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5933 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5937 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5938 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5939 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5942 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5943 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5944 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5945 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5949 if test -d /usr/nec ;then
5950 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5951 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5956 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5957 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5961 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5966 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5969 # Check to make sure the PIC flag actually works.
5971 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5972 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5973 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5974 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5975 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5977 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5979 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5980 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5983 # For platforms which do not support PIC, -DPIC is meaningless:
5985 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5988 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5994 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5995 # ------------------------------------
5996 # See if the linker supports building shared libraries.
5997 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5998 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6000 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6003 # If we're using GNU nm, then we don't want the "-C" option.
6004 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6005 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6006 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6008 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6012 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6015 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6018 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6023 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6024 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6025 _LT_AC_TAGVAR(archive_cmds, $1)=
6026 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6027 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6028 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6029 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6030 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6031 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6032 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6033 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6034 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6035 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6036 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6037 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6038 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6039 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6040 _LT_AC_TAGVAR(module_cmds, $1)=
6041 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6042 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6043 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6044 # include_expsyms should be a list of space-separated symbols to be *always*
6045 # included in the symbol list
6046 _LT_AC_TAGVAR(include_expsyms, $1)=
6047 # exclude_expsyms can be an extended regexp of symbols to exclude
6048 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6049 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6050 # as well as any symbol that contains `d'.
6051 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6052 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6053 # platforms (ab)use it in PIC code, but their linkers get confused if
6054 # the symbol is explicitly referenced. Since portable code cannot
6055 # rely on this symbol name, it's probably fine to never include it in
6056 # preloaded symbol tables.
6057 extract_expsyms_cmds=
6060 cygwin* | mingw* | pw32*)
6061 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6062 # When not using gcc, we currently assume that we are using
6063 # Microsoft Visual C++.
6064 if test "$GCC" != yes; then
6073 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6074 if test "$with_gnu_ld" = yes; then
6075 # If archive_cmds runs LD, not CC, wlarc should be empty
6078 # See if GNU ld supports shared libraries.
6080 aix3* | aix4* | aix5*)
6081 # On AIX/PPC, the GNU linker is very broken
6082 if test "$host_cpu" != ia64; then
6083 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6086 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6087 *** to be unable to reliably create shared libraries on AIX.
6088 *** Therefore, libtool is disabling shared libraries support. If you
6089 *** really care for shared libraries, you may want to modify your PATH
6090 *** so that a non-GNU linker is found, and then restart.
6097 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6098 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6099 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6101 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6102 # that the semantics of dynamic libraries on AmigaOS, at least up
6103 # to version 4, is to share data among multiple programs linked
6104 # with the same dynamic library. Since this doesn't match the
6105 # behavior of shared libraries on other platforms, we can't use
6107 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6111 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6112 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6113 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6114 # support --undefined. This deserves some investigation. FIXME
6115 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6117 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6121 cygwin* | mingw* | pw32*)
6122 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6123 # as there is no search path for DLLs.
6124 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6125 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6126 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6127 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6128 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6130 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6131 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6132 # If the export-symbols file already is a .def file (1st line
6133 # is EXPORTS), use it as is; otherwise, prepend...
6134 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6135 cp $export_symbols $output_objdir/$soname.def;
6137 echo EXPORTS > $output_objdir/$soname.def;
6138 cat $export_symbols >> $output_objdir/$soname.def;
6140 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6147 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6148 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6151 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6152 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6157 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6158 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6161 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6162 *** create shared libraries on Solaris systems. Therefore, libtool
6163 *** is disabling shared libraries support. We urge you to upgrade GNU
6164 *** binutils to release 2.9.1 or newer. Another option is to modify
6165 *** your PATH or compiler configuration so that the native linker is
6166 *** used, and then restart.
6169 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6170 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6171 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6173 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6178 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6180 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6181 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6185 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6186 tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6187 _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
6188 supports_anon_versioning=no
6189 case `$LD -v 2>/dev/null` in
6190 *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6191 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6192 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6193 *\ 2.11.*) ;; # other 2.11 versions
6194 *) supports_anon_versioning=yes ;;
6196 if test $supports_anon_versioning = yes; then
6197 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6198 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6199 $echo "local: *; };" >> $output_objdir/$libname.ver~
6200 $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6202 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
6205 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6210 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6211 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6212 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6214 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6219 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
6220 runpath_var=LD_RUN_PATH
6221 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6222 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6223 # ancient GNU ld didn't support --whole-archive et. al.
6224 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6225 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6227 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6231 # PORTME fill in a description of your system's linker (not GNU ld)
6234 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6235 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6236 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6237 # Note: this linker hardcodes the directories in LIBPATH if there
6238 # are no directories specified by -L.
6239 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6240 if test "$GCC" = yes && test -z "$link_static_flag"; then
6241 # Neither direct hardcoding nor static linking is supported with a
6243 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6248 if test "$host_cpu" = ia64; then
6249 # On IA64, the linker does run time linking by default, so we don't
6250 # have to do anything special.
6251 aix_use_runtimelinking=no
6252 exp_sym_flag='-Bexport'
6255 # If we're using GNU nm, then we don't want the "-C" option.
6256 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6257 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6258 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6260 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6262 aix_use_runtimelinking=no
6264 # Test if we are trying to use run time linking or normal
6265 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6266 # need to do runtime linking.
6267 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6268 for ld_flag in $LDFLAGS; do
6269 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6270 aix_use_runtimelinking=yes
6276 exp_sym_flag='-bexport'
6277 no_entry_flag='-bnoentry'
6280 # When large executables or shared objects are built, AIX ld can
6281 # have problems creating the table of contents. If linking a library
6282 # or program results in "error TOC overflow" add -mminimal-toc to
6283 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6284 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6286 _LT_AC_TAGVAR(archive_cmds, $1)=''
6287 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6288 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6289 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6291 if test "$GCC" = yes; then
6292 case $host_os in aix4.[012]|aix4.[012].*)
6293 # We only want to do this on AIX 4.2 and lower, the check
6294 # below for broken collect2 doesn't work under 4.3+
6295 collect2name=`${CC} -print-prog-name=collect2`
6296 if test -f "$collect2name" && \
6297 strings "$collect2name" | grep resolve_lib_name >/dev/null
6299 # We have reworked collect2
6300 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6302 # We have old collect2
6303 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6304 # It fails to find uninstalled libraries when the uninstalled
6305 # path is not listed in the libpath. Setting hardcode_minus_L
6306 # to unsupported forces relinking
6307 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6308 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6309 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6312 shared_flag='-shared'
6315 if test "$host_cpu" = ia64; then
6316 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6317 # chokes on -Wl,-G. The following line is correct:
6320 if test "$aix_use_runtimelinking" = yes; then
6321 shared_flag='${wl}-G'
6323 shared_flag='${wl}-bM:SRE'
6328 # It seems that -bexpall does not export symbols beginning with
6329 # underscore (_), so it is better to generate a list of symbols to export.
6330 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6331 if test "$aix_use_runtimelinking" = yes; then
6332 # Warning - without using the other runtime loading flags (-brtl),
6333 # -berok will link without error, but may produce a broken library.
6334 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6335 # Determine the default libpath from the value encoded in an empty executable.
6336 _LT_AC_SYS_LIBPATH_AIX
6337 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6338 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6340 if test "$host_cpu" = ia64; then
6341 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6342 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6343 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
6345 # Determine the default libpath from the value encoded in an empty executable.
6346 _LT_AC_SYS_LIBPATH_AIX
6347 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6348 # Warning - without using the other run time loading flags,
6349 # -berok will link without error, but may produce a broken library.
6350 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6351 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6352 # -bexpall does not export symbols beginning with underscore (_)
6353 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6354 # Exported symbols can be pulled into shared objects from archives
6355 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6356 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6357 # This is similar to how AIX traditionally builds it's shared libraries.
6358 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6364 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6365 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6366 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6367 # see comment about different semantics on the GNU ld section
6368 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6372 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6375 cygwin* | mingw* | pw32*)
6376 # When not using gcc, we currently assume that we are using
6377 # Microsoft Visual C++.
6378 # hardcode_libdir_flag_spec is actually meaningless, as there is
6379 # no search path for DLLs.
6380 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6381 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6382 # Tell ltmain to make .lib files, not .a files.
6384 # Tell ltmain to make .dll files, not .so files.
6386 # FIXME: Setting linknames here is a bad hack.
6387 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6388 # The linker will automatically build a .lib file if we build a DLL.
6389 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6390 # FIXME: Should let the user specify the lib program.
6391 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6392 fix_srcfile_path='`cygpath -w "$srcfile"`'
6393 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6396 darwin* | rhapsody*)
6397 if test "$GXX" = yes ; then
6398 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6400 rhapsody* | darwin1.[[012]])
6401 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6404 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6405 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6407 case ${MACOSX_DEPLOYMENT_TARGET} in
6409 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6412 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6418 lt_int_apple_cc_single_mod=no
6419 output_verbose_link_cmd='echo'
6420 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6421 lt_int_apple_cc_single_mod=yes
6423 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6424 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6426 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6428 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6429 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6430 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6431 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6433 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6435 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6436 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6437 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6438 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6439 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6440 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6442 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6447 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6448 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6449 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6453 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6456 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6457 # support. Future versions do this automatically, but an explicit c++rt0.o
6458 # does not break anything, and helps significantly (at the cost of a little
6461 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6462 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6463 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6464 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6467 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6469 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6470 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6471 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6472 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6475 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6476 freebsd* | kfreebsd*-gnu)
6477 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6478 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6479 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6480 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6484 if test "$GCC" = yes; then
6485 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6487 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6489 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6490 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6491 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6493 # hardcode_minus_L: Not really in the search PATH,
6494 # but as the default location of the library.
6495 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6496 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6500 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6503 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6506 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6512 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6515 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6519 if test "$with_gnu_ld" = no; then
6522 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6523 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6524 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6525 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6526 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6529 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6530 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6531 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6533 # hardcode_minus_L: Not really in the search PATH,
6534 # but as the default location of the library.
6535 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6538 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6539 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6540 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6541 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6543 # hardcode_minus_L: Not really in the search PATH,
6544 # but as the default location of the library.
6545 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6551 irix5* | irix6* | nonstopux*)
6552 if test "$GCC" = yes; then
6553 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6555 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6556 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6558 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6559 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6560 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6564 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6565 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6567 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6569 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6570 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6571 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6575 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6576 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6577 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6578 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6579 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6583 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6584 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6585 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6586 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6587 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6588 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6591 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6592 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6593 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6596 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6597 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6604 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6605 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6606 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6607 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6608 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6612 if test "$GCC" = yes; then
6613 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6614 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6616 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6617 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6619 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6620 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6623 osf4* | osf5*) # as osf3* with the addition of -msym flag
6624 if test "$GCC" = yes; then
6625 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6626 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6627 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6629 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6630 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6631 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6632 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
6634 # Both c and cxx compiler support -rpath directly
6635 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6637 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6641 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6642 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6643 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6644 runpath_var=LD_RUN_PATH
6645 hardcode_runpath_var=yes
6649 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6650 if test "$GCC" = yes; then
6651 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6652 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6653 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6655 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6656 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6657 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6659 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6660 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6662 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6663 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6664 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6666 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6670 if test "x$host_vendor" = xsequent; then
6671 # Use $CC to link under sequent, because it throws in some extra .o
6672 # files that make .init and .fini sections work.
6673 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6675 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6677 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6678 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6679 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6680 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6684 case $host_vendor in
6686 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6687 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6690 ## LD is ld it makes a PLAMLIB
6691 ## CC just makes a GrossModule.
6692 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6693 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6694 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6697 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6698 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6701 runpath_var='LD_RUN_PATH'
6702 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6706 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6707 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6708 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6712 if test -d /usr/nec; then
6713 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6714 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6715 runpath_var=LD_RUN_PATH
6716 hardcode_runpath_var=yes
6717 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6722 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6723 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6724 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6725 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6726 hardcode_runpath_var=yes
6727 runpath_var=LD_RUN_PATH
6730 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6731 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6732 if test "$GCC" = yes; then
6733 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6735 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6737 runpath_var='LD_RUN_PATH'
6738 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6742 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6743 # $CC -shared without GNU ld will not create a library from C++
6744 # object files and a static libstdc++, better avoid it by now
6745 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6746 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6747 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6748 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6749 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6750 runpath_var='LD_RUN_PATH'
6754 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6755 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6756 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6760 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6765 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6766 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6768 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6769 if test "$GCC" = yes; then
6770 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6774 # Do we need to explicitly link libc?
6776 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6778 # Assume -lc should be added
6779 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6781 if test "$enable_shared" = yes && test "$GCC" = yes; then
6782 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6784 # FIXME: we may have to deal with multi-command sequences.
6787 # Test whether the compiler implicitly links with -lc since on some
6788 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6789 # to ld, don't add -lc before -lgcc.
6790 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6792 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6794 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6797 libobjs=conftest.$ac_objext
6799 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6805 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6806 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6807 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6809 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6811 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6813 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6815 cat conftest.err 1>&5
6818 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6824 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6827 # _LT_AC_FILE_LTDLL_C
6828 # -------------------
6829 # Be careful that the start marker always follows a newline.
6830 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6831 # /* ltdll.c starts here */
6832 # #define WIN32_LEAN_AND_MEAN
6833 # #include <windows.h>
6834 # #undef WIN32_LEAN_AND_MEAN
6835 # #include <stdio.h>
6837 # #ifndef __CYGWIN__
6838 # # ifdef __CYGWIN32__
6839 # # define __CYGWIN__ __CYGWIN32__
6843 # #ifdef __cplusplus
6846 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6847 # #ifdef __cplusplus
6852 # #include <cygwin/cygwin_dll.h>
6853 # DECLARE_CYGWIN_DLL( DllMain );
6855 # HINSTANCE __hDllInstance_base;
6858 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6860 # __hDllInstance_base = hInst;
6863 # /* ltdll.c ends here */
6864 ])# _LT_AC_FILE_LTDLL_C
6867 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6868 # ---------------------------------
6869 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6873 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6874 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6875 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6876 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6877 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6878 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6879 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6881 # This is just to silence aclocal about the macro not being used
6882 ifelse([AC_DISABLE_FAST_INSTALL])
6884 AC_DEFUN([LT_AC_PROG_GCJ],
6885 [AC_CHECK_TOOL(GCJ, gcj, no)
6886 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6890 AC_DEFUN([LT_AC_PROG_RC],
6891 [AC_CHECK_TOOL(RC, windres, no)
6894 ############################################################
6895 # NOTE: This macro has been submitted for inclusion into #
6896 # GNU Autoconf as AC_PROG_SED. When it is available in #
6897 # a released version of Autoconf we should remove this #
6898 # macro and use it instead. #
6899 ############################################################
6902 # Check for a fully-functional sed program, that truncates
6903 # as few characters as possible. Prefer GNU sed if found.
6904 AC_DEFUN([LT_AC_PROG_SED],
6905 [AC_MSG_CHECKING([for a sed that does not truncate output])
6906 AC_CACHE_VAL(lt_cv_path_SED,
6907 [# Loop through the user's path and test for sed and gsed.
6908 # Then use that list of sed's as ones to test for truncation.
6909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6913 test -z "$as_dir" && as_dir=.
6914 for lt_ac_prog in sed gsed; do
6915 for ac_exec_ext in '' $ac_executable_extensions; do
6916 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6917 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6924 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6925 # along with /bin/sed that truncates output.
6926 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6927 test ! -f $lt_ac_sed && break
6928 cat /dev/null > conftest.in
6930 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6931 # Check for GNU sed and select it if it is found.
6932 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6933 lt_cv_path_SED=$lt_ac_sed
6937 cat conftest.in conftest.in >conftest.tmp
6938 mv conftest.tmp conftest.in
6939 cp conftest.in conftest.nl
6941 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6942 cmp -s conftest.out conftest.nl || break
6943 # 10000 chars as input seems more than enough
6944 test $lt_ac_count -gt 10 && break
6945 lt_ac_count=`expr $lt_ac_count + 1`
6946 if test $lt_ac_count -gt $lt_ac_max; then
6947 lt_ac_max=$lt_ac_count
6948 lt_cv_path_SED=$lt_ac_sed
6954 AC_MSG_RESULT([$SED])