1 AH_TEMPLATE(socklen_t, [The type for socklen])
2 AC_DEFUN([AC_TYPE_SOCKLEN_T],
3 [AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
6 [#include <sys/types.h>
7 #include <sys/socket.h>],
8 [socklen_t len = 42; return 0;],
9 ac_cv_type_socklen_t=yes,
10 ac_cv_type_socklen_t=no)
12 if test $ac_cv_type_socklen_t != yes; then
13 AC_DEFINE(socklen_t, int)
17 dnl Available from the GNU Autoconf Macro Archive at:
18 dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_compile_check_sizeof.html
20 AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
21 [changequote(<<, >>)dnl
22 dnl The name to #define.
23 define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
24 dnl The cache variable name.
25 define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
27 AC_MSG_CHECKING(size of $1)
28 AC_CACHE_VAL(AC_CV_NAME,
29 [for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence.
30 AC_TRY_COMPILE([#include "confdefs.h"
31 #include <sys/types.h>
33 ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
34 if test x$AC_CV_NAME != x ; then break; fi
37 if test x$AC_CV_NAME = x ; then
38 AC_MSG_ERROR([cannot determine a size for $1])
40 AC_MSG_RESULT($AC_CV_NAME)
41 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
42 undefine([AC_TYPE_NAME])dnl
43 undefine([AC_CV_NAME])dnl
46 dnl Available from the GNU Autoconf Macro Archive at:
47 dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_create_stdint_h.html
49 AC_DEFUN([AC_CREATE_STDINT_H],
50 [# ------ AC CREATE STDINT H -------------------------------------
51 AC_MSG_CHECKING([for stdint-types....])
52 ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)`
53 if test "$ac_stdint_h" = "stdint.h" ; then
54 AC_MSG_RESULT("(are you sure you want them in ./stdint.h?)")
55 elif test "$ac_stdint_h" = "inttypes.h" ; then
56 AC_MSG_RESULT("(are you sure you want them in ./inttypes.h?)")
58 AC_MSG_RESULT("(putting them into $ac_stdint_h)")
61 inttype_headers=`echo inttypes.h sys/inttypes.h sys/inttypes.h $2 \
64 ac_cv_header_stdint_x="no-file"
65 ac_cv_header_stdint_o="no-file"
66 ac_cv_header_stdint_u="no-file"
67 for i in stdint.h $inttype_headers ; do
68 unset ac_cv_type_uintptr_t
69 unset ac_cv_type_uint64_t
70 _AC_CHECK_TYPE_NEW(uintptr_t,[ac_cv_header_stdint_x=$i],dnl
71 continue,[#include <$i>])
72 AC_CHECK_TYPE(uint64_t,[and64="(uint64_t too)"],[and64=""],[#include<$i>])
73 AC_MSG_RESULT(... seen our uintptr_t in $i $and64)
76 if test "$ac_cv_header_stdint_x" = "no-file" ; then
77 for i in stdint.h $inttype_headers ; do
78 unset ac_cv_type_uint32_t
79 unset ac_cv_type_uint64_t
80 AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],dnl
81 continue,[#include <$i>])
82 AC_CHECK_TYPE(uint64_t,[and64="(uint64_t too)"],[and64=""],[#include<$i>])
83 AC_MSG_RESULT(... seen our uint32_t in $i $and64)
86 if test "$ac_cv_header_stdint_o" = "no-file" ; then
87 for i in sys/types.h $inttype_headers ; do
88 unset ac_cv_type_u_int32_t
89 unset ac_cv_type_u_int64_t
90 AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],dnl
91 continue,[#include <$i>])
92 AC_CHECK_TYPE(uint64_t,[and64="(u_int64_t too)"],[and64=""],[#include<$i>])
93 AC_MSG_RESULT(... seen our u_int32_t in $i $and64)
99 # ----------------- DONE inttypes.h checks MAYBE C basic types --------
101 if test "$ac_cv_header_stdint_x" = "no-file" ; then
102 AC_COMPILE_CHECK_SIZEOF(char)
103 AC_COMPILE_CHECK_SIZEOF(short)
104 AC_COMPILE_CHECK_SIZEOF(int)
105 AC_COMPILE_CHECK_SIZEOF(long)
106 AC_COMPILE_CHECK_SIZEOF(void*)
107 ac_cv_header_stdint_test="yes"
109 ac_cv_header_stdint_test="no"
112 # ----------------- DONE inttypes.h checks START header -------------
113 _ac_stdint_h=AS_TR_CPP(_$ac_stdint_h)
114 AC_MSG_RESULT(creating $ac_stdint_h : $_ac_stdint_h)
115 echo "#ifndef" $_ac_stdint_h >$ac_stdint_h
116 echo "#define" $_ac_stdint_h "1" >>$ac_stdint_h
117 echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint_h
118 echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint_h
119 if test "$GCC" = "yes" ; then
120 echo "/* generated using a gnu compiler version" `$CC --version` "*/" \
123 echo "/* generated using $CC */" >>$ac_stdint_h
125 echo "" >>$ac_stdint_h
127 if test "$ac_cv_header_stdint_x" != "no-file" ; then
128 ac_cv_header_stdint="$ac_cv_header_stdint_x"
129 elif test "$ac_cv_header_stdint_o" != "no-file" ; then
130 ac_cv_header_stdint="$ac_cv_header_stdint_o"
131 elif test "$ac_cv_header_stdint_u" != "no-file" ; then
132 ac_cv_header_stdint="$ac_cv_header_stdint_u"
134 ac_cv_header_stdint="stddef.h"
137 # ----------------- See if int_least and int_fast types are present
138 unset ac_cv_type_int_least32_t
139 unset ac_cv_type_int_fast32_t
140 AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>])
141 AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
143 if test "$ac_cv_header_stdint" != "stddef.h" ; then
144 if test "$ac_cv_header_stdint" != "stdint.h" ; then
145 AC_MSG_RESULT(..adding include stddef.h)
146 echo "#include <stddef.h>" >>$ac_stdint_h
148 AC_MSG_RESULT(..adding include $ac_cv_header_stdint)
149 echo "#include <$ac_cv_header_stdint>" >>$ac_stdint_h
150 echo "" >>$ac_stdint_h
152 # ----------------- DONE header START basic int types -------------
153 if test "$ac_cv_header_stdint_x" = "no-file" ; then
154 AC_MSG_RESULT(... need to look at C basic types)
155 dnl ac_cv_header_stdint_test="yes" # moved up before creating the file
157 AC_MSG_RESULT(... seen good stdint.h inttypes)
158 dnl ac_cv_header_stdint_test="no" # moved up before creating the file
161 if test "$ac_cv_header_stdint_u" != "no-file" ; then
162 AC_MSG_RESULT(... seen bsd/sysv typedefs)
163 cat >>$ac_stdint_h <<EOF
165 /* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */
166 typedef u_int8_t uint8_t;
167 typedef u_int16_t uint16_t;
168 typedef u_int32_t uint32_t;
170 cat >>$ac_stdint_h <<EOF
172 /* glibc compatibility */
173 #ifndef __int8_t_defined
174 #define __int8_t_defined
179 ac_cv_sizeof_x="$ac_cv_sizeof_char:$ac_cv_sizeof_short"
180 ac_cv_sizeof_X="$ac_cv_sizeof_x:$ac_cv_sizeof_int"
181 ac_cv_sizeof_X="$ac_cv_sizeof_X:$ac_cv_sizeof_voidp:$ac_cv_sizeof_long"
182 if test "$ac_cv_header_stdint" = "stddef.h" ; then
183 # we must guess all the basic types. Apart from byte-adressable system,
184 # there a few 32-bit-only dsp-systems. nibble-addressable systems are way off.
185 cat >>$ac_stdint_h <<EOF
186 /* ------------ BITSPECIFIC INTTYPES SECTION --------------- */
189 case "$ac_cv_sizeof_X" in
190 1:2:2:2:4) AC_MSG_RESULT(..adding $t normal 16-bit system)
191 cat >>$ac_stdint_h <<EOF
192 /* a normal 16-bit system */
193 typedef unsigned char uint8_t;
194 typedef unsigned short uint16_t;
195 typedef unsigned long uint32_t;
196 #ifndef __int8_t_defined
197 #define __int8_t_defined
199 typedef short int16_t;
200 typedef long int32_t;
204 1:2:2:4:4) AC_MSG_RESULT(..adding $t 32-bit system derived from a 16-bit)
205 cat >>$ac_stdint_h <<EOF
206 /* a 32-bit system derived from a 16-bit */
207 typedef unsigned char uint8_t;
208 typedef unsigned short uint16_t;
209 typedef unsigned int uint32_t;
210 #ifndef __int8_t_defined
211 #define __int8_t_defined
213 typedef short int16_t;
218 1:2:4:4:4) AC_MSG_RESULT(..adding $t normal 32-bit system)
219 cat >>$ac_stdint_h <<EOF
220 /* a normal 32-bit system */
221 typedef unsigned char uint8_t;
222 typedef unsigned short uint16_t;
223 typedef unsigned int uint32_t;
224 #ifndef __int8_t_defined
225 #define __int8_t_defined
227 typedef short int16_t;
232 1:2:4:4:8) AC_MSG_RESULT(..adding $t 32-bit system prepared for 64-bit)
233 cat >>$ac_stdint_h <<EOF
235 /* a 32-bit system prepared for 64-bit */
236 typedef unsigned char uint8_t;
237 typedef unsigned short uint16_t;
238 typedef unsigned int uint32_t;
239 #ifndef __int8_t_defined
240 #define __int8_t_defined
242 typedef short int16_t;
247 1:2:4:8:8) AC_MSG_RESULT(..adding $t normal 64-bit system)
248 cat >>$ac_stdint_h <<EOF
250 /* a normal 64-bit system */
251 typedef unsigned char uint8_t;
252 typedef unsigned short uint16_t;
253 typedef unsigned int uint32_t;
254 #ifndef __int8_t_defined
255 #define __int8_t_defined
257 typedef short int16_t;
262 1:2:4:8:4) AC_MSG_RESULT(..adding $t 64-bit system derived from a 32-bit)
263 cat >>$ac_stdint_h <<EOF
265 /* a 64-bit system derived from a 32-bit system */
266 typedef unsigned char uint8_t;
267 typedef unsigned short uint16_t;
268 typedef unsigned int uint32_t;
269 #ifndef __int8_t_defined
270 #define __int8_t_defined
272 typedef short int16_t;
278 AC_MSG_ERROR([ $ac_cv_sizeof_X dnl
279 what is that a system? contact the author, quick! http://ac-archive.sf.net])
285 # ------------- DONE basic int types START int64_t types ------------
286 if test "$ac_cv_type_uint64_t" = "yes"
287 then AC_MSG_RESULT(... seen good uint64_t)
288 cat >>$ac_stdint_h <<EOF
290 /* system headers have good uint64_t */
291 #ifndef _HAVE_UINT64_T
292 #define _HAVE_UINT64_T
296 elif test "$ac_cv_type_u_int64_t" = "yes"
297 then AC_MSG_RESULT(..adding typedef u_int64_t uint64_t)
298 cat >>$ac_stdint_h <<EOF
300 /* system headers have an u_int64_t */
301 #ifndef _HAVE_UINT64_T
302 #define _HAVE_UINT64_T
303 typedef u_int64_t uint64_t;
306 else AC_MSG_RESULT(..adding generic uint64_t runtime checks)
307 cat >>$ac_stdint_h <<EOF
309 /* -------------------- 64 BIT GENERIC SECTION -------------------- */
310 /* here are some common heuristics using compiler runtime specifics */
311 #if defined __STDC_VERSION__ && defined __STDC_VERSION__ > 199901L
313 #ifndef _HAVE_UINT64_T
314 #define _HAVE_UINT64_T
315 typedef long long int64_t;
316 typedef unsigned long long uint64_t;
319 #elif !defined __STRICT_ANSI__
320 #if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
322 #ifndef _HAVE_UINT64_T
323 #define _HAVE_UINT64_T
324 typedef __int64 int64_t;
325 typedef unsigned __int64 uint64_t;
328 #elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__
329 dnl /* note: all ELF-systems seem to have loff-support which needs 64-bit */
331 #if !defined _NO_LONGLONG
332 #ifndef _HAVE_UINT64_T
333 #define _HAVE_UINT64_T
334 typedef long long int64_t;
335 typedef unsigned long long uint64_t;
339 #elif defined __alpha || (defined __mips && defined _ABIN32)
341 #if !defined _NO_LONGLONG
342 #ifndef _HAVE_UINT64_T
343 #define _HAVE_UINT64_T
344 typedef long int64_t;
345 typedef unsigned long uint64_t;
348 /* compiler/cpu type ... or just ISO C99 */
353 # plus a default 64-bit for systems that are likely to be 64-bit ready
354 case "$ac_cv_sizeof_x:$ac_cv_sizeof_voidp:$ac_cv_sizeof_long" in
355 1:2:8:8) AC_MSG_RESULT(..adding uint64_t default, normal 64-bit system)
356 cat >>$ac_stdint_h <<EOF
358 /* seen normal 64-bit system, CC has sizeof(long and void*) == 8 bytes */
359 #ifndef _HAVE_UINT64_T
360 #define _HAVE_UINT64_T
361 typedef long int64_t;
362 typedef unsigned long uint64_t;
366 1:2:4:8) AC_MSG_RESULT(..adding uint64_t default, typedef to long)
367 cat >>$ac_stdint_h <<EOF
369 /* seen 32-bit system prepared for 64-bit, CC has sizeof(long) == 8 bytes */
370 #ifndef _HAVE_UINT64_T
371 #define _HAVE_UINT64_T
372 typedef long int64_t;
373 typedef unsigned long uint64_t;
377 1:2:8:4) AC_MSG_RESULT(..adding uint64_t default, typedef long long)
378 cat >>$ac_stdint_h <<EOF
380 /* seen 64-bit derived from a 32-bit, CC has sizeof(long) == 4 bytes */
381 #ifndef _HAVE_UINT64_T
382 #define _HAVE_UINT64_T
383 typedef long long int64_t;
384 typedef unsigned long long uint64_t;
389 cat >>$ac_stdint_h <<EOF
391 /* the configure-checks for the basic types did not make us believe */
392 /* that we could add a fallback to a 'long long' typedef to int64_t */
397 # ------------- DONE int64_t types START intptr types ------------
398 if test "$ac_cv_header_stdint_x" = "no-file" ; then
399 cat >>$ac_stdint_h <<EOF
401 /* -------------------------- INPTR SECTION --------------------------- */
403 case "$ac_cv_sizeof_x:$ac_cv_sizeof_voidp" in
405 a="int16_t" ; cat >>$ac_stdint_h <<EOF
406 /* we tested sizeof(void*) to be of 2 chars, hence we declare it 16-bit */
408 typedef uint16_t uintptr_t;
409 typedef int16_t intptr_t;
413 a="int32_t" ; cat >>$ac_stdint_h <<EOF
414 /* we tested sizeof(void*) to be of 4 chars, hence we declare it 32-bit */
416 typedef uint32_t uintptr_t;
417 typedef int32_t intptr_t;
421 a="int64_t" ; cat >>$ac_stdint_h <<EOF
422 /* we tested sizeof(void*) to be of 8 chars, hence we declare it 64-bit */
424 typedef uint64_t uintptr_t;
425 typedef int64_t intptr_t;
429 a="long" ; cat >>$ac_stdint_h <<EOF
430 /* we tested sizeof(void*) but got no guess, hence we declare it as if long */
432 typedef unsigned long uintptr_t;
433 typedef long intptr_t;
437 AC_MSG_RESULT(..adding typedef $a intptr_t)
440 # ------------- DONE intptr types START int_least types ------------
441 if test "$ac_cv_type_int_least32_t" = "no"; then
442 AC_MSG_RESULT(..adding generic int_least-types)
443 cat >>$ac_stdint_h <<EOF
445 /* --------------GENERIC INT_LEAST ------------------ */
447 typedef int8_t int_least8_t;
448 typedef int16_t int_least16_t;
449 typedef int32_t int_least32_t;
451 typedef int64_t int_least64_t;
454 typedef uint8_t uint_least8_t;
455 typedef uint16_t uint_least16_t;
456 typedef uint32_t uint_least32_t;
458 typedef uint64_t uint_least64_t;
463 # ------------- DONE intptr types START int_least types ------------
464 if test "$ac_cv_type_int_fast32_t" = "no"; then
465 AC_MSG_RESULT(..adding generic int_fast-types)
466 cat >>$ac_stdint_h <<EOF
468 /* --------------GENERIC INT_FAST ------------------ */
470 typedef int8_t int_fast8_t;
471 typedef int32_t int_fast16_t;
472 typedef int32_t int_fast32_t;
474 typedef int64_t int_fast64_t;
477 typedef uint8_t uint_fast8_t;
478 typedef uint32_t uint_fast16_t;
479 typedef uint32_t uint_fast32_t;
481 typedef uint64_t uint_fast64_t;
486 if test "$ac_cv_header_stdint_x" = "no-file" ; then
487 cat >>$ac_stdint_h <<EOF
490 typedef int64_t intmax_t;
491 typedef uint64_t uintmax_t;
493 typedef long int intmax_t;
494 typedef unsigned long uintmax_t;
499 AC_MSG_RESULT(... DONE $ac_stdint_h)
500 cat >>$ac_stdint_h <<EOF
508 dnl quote from SunOS-5.8 sys/inttypes.h:
509 dnl Use at your own risk. As of February 1996, the committee is squarely
510 dnl behind the fixed sized types; the "least" and "fast" types are still being
511 dnl discussed. The probability that the "fast" types may be removed before
512 dnl the standard is finalized is high enough that they are not currently
515 dnl Available from the GNU Autoconf Macro Archive at:
516 dnl http://www.gnu.org/software/ac-archive/htmldoc/ax_prefix_config_h.html
518 AC_DEFUN([AX_PREFIX_CONFIG_H],[AC_REQUIRE([AC_CONFIG_HEADER])
519 AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl
520 AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl
521 AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl
522 AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl
523 AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl
524 AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl
525 AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl
526 m4_pushdef([_script],[conftest.prefix])dnl
527 m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl
528 _OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)`
529 _DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"`
530 _PKG=`echo ifelse($2, , $PACKAGE, $2)`
531 _LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"`
532 _UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`
533 _INP=`echo ifelse($3, , _, $3)`
534 if test "$ac_prefix_conf_INP" = "_"; then
535 for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue
536 test -f "$ac_prefix_conf_INP" && continue
538 *.h) test -f $ac_file && _INP=$ac_file ;;
543 if test "$_INP" = "_"; then
545 */*) _INP=`basename "$_OUT"`
547 *-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"`
553 if test -z "$_PKG" ; then
554 AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
556 if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then
559 AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines)
560 if test -f $_INP ; then
561 echo "s/@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/" > _script
562 # no! these are things like socklen_t, const, vfork
563 # echo "s/@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/" >> _script
564 echo "s/@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1 \\" >> _script
565 echo "@%:@def[]ine $_UPP""_\\1 \\2 \\" >> _script
566 echo "@%:@endif/" >>_script
567 # no! these are things like socklen_t, const, vfork
568 # echo "s/@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1 \\" >> _script
569 # echo "@%:@define $_LOW""_\\1 \\2 \\" >> _script
570 # echo "@%:@endif/" >> _script
571 # now executing _script on _DEF input to create _OUT output file
572 echo "@%:@ifndef $_DEF" >$tmp/pconfig.h
573 echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h
574 echo ' ' >>$tmp/pconfig.h
575 echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h
577 sed -f _script $_INP >>$tmp/pconfig.h
578 echo ' ' >>$tmp/pconfig.h
579 echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h
580 echo "@%:@endif" >>$tmp/pconfig.h
581 if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then
582 AC_MSG_NOTICE([$_OUT is unchanged])
584 ac_dir=`AS_DIRNAME(["$_OUT"])`
585 AS_MKDIR_P(["$ac_dir"])
587 mv $tmp/pconfig.h "$_OUT"
589 cp _script _configs.sed
591 AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT])
595 m4_popdef([_symbol])dnl
596 m4_popdef([_script])dnl
597 AS_VAR_POPDEF([_INP])dnl
598 AS_VAR_POPDEF([_UPP])dnl
599 AS_VAR_POPDEF([_LOW])dnl
600 AS_VAR_POPDEF([_PKG])dnl
601 AS_VAR_POPDEF([_DEF])dnl
602 AS_VAR_POPDEF([_OUT])dnl
603 ],[PACKAGE="$PACKAGE"])])
605 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
606 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
607 ## Free Software Foundation, Inc.
608 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
610 ## This file is free software; the Free Software Foundation gives
611 ## unlimited permission to copy and/or distribute it, with or without
612 ## modifications, as long as this notice is preserved.
614 # serial 48 AC_PROG_LIBTOOL
617 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
618 # -----------------------------------------------------------
619 # If this macro is not defined by Autoconf, define it here.
620 m4_ifdef([AC_PROVIDE_IFELSE],
622 [m4_define([AC_PROVIDE_IFELSE],
623 [m4_ifdef([AC_PROVIDE_$1],
629 AC_DEFUN([AC_PROG_LIBTOOL],
630 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
631 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
632 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
633 AC_PROVIDE_IFELSE([AC_PROG_CXX],
635 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
637 dnl And a similar setup for Fortran 77 support
638 AC_PROVIDE_IFELSE([AC_PROG_F77],
640 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
643 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
644 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
645 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
646 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
648 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
650 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
652 [ifdef([AC_PROG_GCJ],
653 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
654 ifdef([A][M_PROG_GCJ],
655 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
656 ifdef([LT_AC_PROG_GCJ],
657 [define([LT_AC_PROG_GCJ],
658 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
659 ])])# AC_PROG_LIBTOOL
664 AC_DEFUN([_AC_PROG_LIBTOOL],
665 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
666 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
667 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
668 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
670 # This can be used to rebuild libtool when needed
671 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
673 # Always use our own libtool.
674 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
677 # Prevent multiple expansion
678 define([AC_PROG_LIBTOOL], [])
684 AC_DEFUN([AC_LIBTOOL_SETUP],
686 AC_REQUIRE([AC_ENABLE_SHARED])dnl
687 AC_REQUIRE([AC_ENABLE_STATIC])dnl
688 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
689 AC_REQUIRE([AC_CANONICAL_HOST])dnl
690 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
691 AC_REQUIRE([AC_PROG_CC])dnl
692 AC_REQUIRE([AC_PROG_LD])dnl
693 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
694 AC_REQUIRE([AC_PROG_NM])dnl
696 AC_REQUIRE([AC_PROG_LN_S])dnl
697 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
698 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
699 AC_REQUIRE([AC_OBJEXT])dnl
700 AC_REQUIRE([AC_EXEEXT])dnl
703 AC_LIBTOOL_SYS_MAX_CMD_LEN
704 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
707 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
708 _LT_AC_PROG_ECHO_BACKSLASH
712 # AIX sometimes has problems with the GCC collect2 program. For some
713 # reason, if we set the COLLECT_NAMES environment variable, the problems
714 # vanish in a puff of smoke.
715 if test "X${COLLECT_NAMES+set}" != Xset; then
722 # Sed substitution that helps us do robust quoting. It backslashifies
723 # metacharacters that are still active within double-quoted strings.
724 Xsed='sed -e 1s/^X//'
725 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
727 # Same as above, but do not quote variable references.
728 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
730 # Sed substitution to delay expansion of an escaped shell variable in a
731 # double_quote_subst'ed string.
732 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
734 # Sed substitution to avoid accidental globbing in evaled expressions
735 no_glob_subst='s/\*/\\\*/g'
741 default_ofile=libtool
744 # All known linkers require a `.a' archive for static linking (except MSVC,
745 # which needs '.lib').
747 ltmain="$ac_aux_dir/ltmain.sh"
748 ofile="$default_ofile"
749 with_gnu_ld="$lt_cv_prog_gnu_ld"
751 AC_CHECK_TOOL(AR, ar, false)
752 AC_CHECK_TOOL(RANLIB, ranlib, :)
753 AC_CHECK_TOOL(STRIP, strip, :)
758 # Set sane defaults for various variables
759 test -z "$AR" && AR=ar
760 test -z "$AR_FLAGS" && AR_FLAGS=cru
761 test -z "$AS" && AS=as
762 test -z "$CC" && CC=cc
763 test -z "$LTCC" && LTCC=$CC
764 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
765 test -z "$DLLTOOL" && DLLTOOL=dlltool
766 test -z "$LD" && LD=ld
767 test -z "$LN_S" && LN_S="ln -s"
768 test -z "$MAGIC_CMD" && MAGIC_CMD=file
769 test -z "$NM" && NM=nm
770 test -z "$SED" && SED=sed
771 test -z "$OBJDUMP" && OBJDUMP=objdump
772 test -z "$RANLIB" && RANLIB=:
773 test -z "$STRIP" && STRIP=:
774 test -z "$ac_objext" && ac_objext=o
776 # Determine commands to create old-style static archives.
777 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
778 old_postinstall_cmds='chmod 644 $oldlib'
779 old_postuninstall_cmds=
781 if test -n "$RANLIB"; then
784 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
787 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
790 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
793 _LT_CC_BASENAME([$compiler])
795 # Only perform the check for file, if the check method requires it
796 case $deplibs_check_method in
798 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
804 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
805 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
806 enable_win32_dll=yes, enable_win32_dll=no)
808 AC_ARG_ENABLE([libtool-lock],
809 [AC_HELP_STRING([--disable-libtool-lock],
810 [avoid locking (might break parallel builds)])])
811 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
814 [AC_HELP_STRING([--with-pic],
815 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
816 [pic_mode="$withval"],
818 test -z "$pic_mode" && pic_mode=default
820 # Use C for the default configuration in the libtool script
822 AC_LIBTOOL_LANG_C_CONFIG
827 # _LT_AC_SYS_COMPILER
828 # -------------------
829 AC_DEFUN([_LT_AC_SYS_COMPILER],
830 [AC_REQUIRE([AC_PROG_CC])dnl
832 # If no C compiler was specified, use CC.
835 # If no C compiler flags were specified, use CFLAGS.
836 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
838 # Allow CC to be a program name with arguments.
840 ])# _LT_AC_SYS_COMPILER
843 # _LT_CC_BASENAME(CC)
844 # -------------------
845 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
846 AC_DEFUN([_LT_CC_BASENAME],
847 [for cc_temp in $1""; do
849 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
850 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
855 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
859 # _LT_COMPILER_BOILERPLATE
860 # ------------------------
861 # Check for compiler boilerplate output or warnings with
862 # the simple compiler test code.
863 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
864 [ac_outfile=conftest.$ac_objext
865 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
866 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
867 _lt_compiler_boilerplate=`cat conftest.err`
869 ])# _LT_COMPILER_BOILERPLATE
872 # _LT_LINKER_BOILERPLATE
873 # ----------------------
874 # Check for linker boilerplate output or warnings with
875 # the simple link test code.
876 AC_DEFUN([_LT_LINKER_BOILERPLATE],
877 [ac_outfile=conftest.$ac_objext
878 printf "$lt_simple_link_test_code" >conftest.$ac_ext
879 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
880 _lt_linker_boilerplate=`cat conftest.err`
882 ])# _LT_LINKER_BOILERPLATE
885 # _LT_AC_SYS_LIBPATH_AIX
886 # ----------------------
887 # Links a minimal program and checks the executable
888 # for the system default hardcoded library path. In most cases,
889 # this is /usr/lib:/lib, but when the MPI compilers are used
890 # the location of the communication and MPI libs are included too.
891 # If we don't find anything, use the default library path according
892 # to the aix ld manual.
893 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
894 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
895 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
897 # Check for a 64-bit object if we didn't find anything.
898 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; }
900 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
901 ])# _LT_AC_SYS_LIBPATH_AIX
904 # _LT_AC_SHELL_INIT(ARG)
905 # ----------------------
906 AC_DEFUN([_LT_AC_SHELL_INIT],
907 [ifdef([AC_DIVERSION_NOTICE],
908 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
909 [AC_DIVERT_PUSH(NOTICE)])
912 ])# _LT_AC_SHELL_INIT
915 # _LT_AC_PROG_ECHO_BACKSLASH
916 # --------------------------
917 # Add some code to the start of the generated configure script which
918 # will find an echo command which doesn't interpret backslashes.
919 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
921 # Check that we are running under the correct shell.
922 SHELL=${CONFIG_SHELL-/bin/sh}
926 # Remove one level of quotation (which was required for Make).
927 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
932 if test "X[$]1" = X--no-reexec; then
933 # Discard the --no-reexec flag, and continue.
935 elif test "X[$]1" = X--fallback-echo; then
936 # Avoid inline document here, it may be left over
938 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
939 # Yippee, $echo works!
942 # Restart under the correct shell.
943 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
946 if test "X[$]1" = X--fallback-echo; then
947 # used as fallback echo
955 # The HP-UX ksh and POSIX shell print the target directory to stdout
957 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
959 if test -z "$ECHO"; then
960 if test "X${echo_test_string+set}" != Xset; then
961 # find a string as large as possible, as long as the shell can cope with it
962 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
963 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
964 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
965 echo_test_string=`eval $cmd` &&
966 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
973 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
974 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
975 test "X$echo_testing_string" = "X$echo_test_string"; then
978 # The Solaris, AIX, and Digital Unix default echo programs unquote
979 # backslashes. This makes it impossible to quote backslashes using
980 # echo "$something" | sed 's/\\/\\\\/g'
982 # So, first we look for a working echo in the user's PATH.
984 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
985 for dir in $PATH /usr/ucb; do
987 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
988 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
989 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
990 test "X$echo_testing_string" = "X$echo_test_string"; then
997 if test "X$echo" = Xecho; then
998 # We didn't find a better echo, so look for alternatives.
999 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1000 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1001 test "X$echo_testing_string" = "X$echo_test_string"; then
1002 # This shell has a builtin print -r that does the trick.
1004 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1005 test "X$CONFIG_SHELL" != X/bin/ksh; then
1006 # If we have ksh, try running configure again with it.
1007 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1008 export ORIGINAL_CONFIG_SHELL
1009 CONFIG_SHELL=/bin/ksh
1011 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1015 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1016 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1017 test "X$echo_testing_string" = "X$echo_test_string"; then
1018 # Cool, printf works
1020 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1021 test "X$echo_testing_string" = 'X\t' &&
1022 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1023 test "X$echo_testing_string" = "X$echo_test_string"; then
1024 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1026 SHELL="$CONFIG_SHELL"
1028 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1029 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1030 test "X$echo_testing_string" = 'X\t' &&
1031 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1032 test "X$echo_testing_string" = "X$echo_test_string"; then
1033 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1035 # maybe with a smaller string...
1038 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1039 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1046 if test "$prev" != 'sed 50q "[$]0"'; then
1047 echo_test_string=`eval $prev`
1048 export echo_test_string
1049 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1051 # Oops. We lost completely, so just stick with echo.
1060 # Copy echo and quote the copy suitably for passing to libtool from
1061 # the Makefile, instead of quoting the original, which is used later.
1063 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1064 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1068 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1073 AC_DEFUN([_LT_AC_LOCK],
1074 [AC_ARG_ENABLE([libtool-lock],
1075 [AC_HELP_STRING([--disable-libtool-lock],
1076 [avoid locking (might break parallel builds)])])
1077 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1079 # Some flags need to be propagated to the compiler or linker for good
1083 # Find out which ABI we are using.
1084 echo 'int i;' > conftest.$ac_ext
1085 if AC_TRY_EVAL(ac_compile); then
1086 case `/usr/bin/file conftest.$ac_objext` in
1098 # Find out which ABI we are using.
1099 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1100 if AC_TRY_EVAL(ac_compile); then
1101 if test "$lt_cv_prog_gnu_ld" = yes; then
1102 case `/usr/bin/file conftest.$ac_objext` in
1104 LD="${LD-ld} -melf32bsmip"
1107 LD="${LD-ld} -melf32bmipn32"
1110 LD="${LD-ld} -melf64bmip"
1114 case `/usr/bin/file conftest.$ac_objext` in
1130 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1131 # Find out which ABI we are using.
1132 echo 'int i;' > conftest.$ac_ext
1133 if AC_TRY_EVAL(ac_compile); then
1134 case `/usr/bin/file conftest.o` in
1138 LD="${LD-ld} -m elf_i386"
1140 ppc64-*linux*|powerpc64-*linux*)
1141 LD="${LD-ld} -m elf32ppclinux"
1144 LD="${LD-ld} -m elf_s390"
1147 LD="${LD-ld} -m elf32_sparc"
1154 LD="${LD-ld} -m elf_x86_64"
1156 ppc*-*linux*|powerpc*-*linux*)
1157 LD="${LD-ld} -m elf64ppc"
1160 LD="${LD-ld} -m elf64_s390"
1163 LD="${LD-ld} -m elf64_sparc"
1173 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1174 SAVE_CFLAGS="$CFLAGS"
1175 CFLAGS="$CFLAGS -belf"
1176 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1178 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1180 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1181 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1182 CFLAGS="$SAVE_CFLAGS"
1186 # Find out which ABI we are using.
1187 echo 'int i;' > conftest.$ac_ext
1188 if AC_TRY_EVAL(ac_compile); then
1189 case `/usr/bin/file conftest.o` in
1191 case $lt_cv_prog_gnu_ld in
1192 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1193 *) LD="${LD-ld} -64" ;;
1201 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1202 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1203 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1204 AC_CHECK_TOOL(AS, as, false)
1205 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1210 need_locks="$enable_libtool_lock"
1215 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1216 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1217 # ----------------------------------------------------------------
1218 # Check whether the given compiler option works
1219 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1220 [AC_REQUIRE([LT_AC_PROG_SED])
1221 AC_CACHE_CHECK([$1], [$2],
1223 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1224 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1225 lt_compiler_flag="$3"
1226 # Insert the option either (1) after the last *FLAGS variable, or
1227 # (2) before a word containing "conftest.", or (3) at the end.
1228 # Note that $ac_compile itself does not contain backslashes and begins
1229 # with a dollar sign (not a hyphen), so the echo should work correctly.
1230 # The option is referenced via a variable to avoid confusing sed.
1231 lt_compile=`echo "$ac_compile" | $SED \
1232 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1233 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1234 -e 's:$: $lt_compiler_flag:'`
1235 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1236 (eval "$lt_compile" 2>conftest.err)
1238 cat conftest.err >&AS_MESSAGE_LOG_FD
1239 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1240 if (exit $ac_status) && test -s "$ac_outfile"; then
1241 # The compiler can only warn and ignore the option if not recognized
1242 # So say no if there are warnings other than the usual output.
1243 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1244 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1245 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1252 if test x"[$]$2" = xyes; then
1253 ifelse([$5], , :, [$5])
1255 ifelse([$6], , :, [$6])
1257 ])# AC_LIBTOOL_COMPILER_OPTION
1260 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1261 # [ACTION-SUCCESS], [ACTION-FAILURE])
1262 # ------------------------------------------------------------
1263 # Check whether the given compiler option works
1264 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1265 [AC_CACHE_CHECK([$1], [$2],
1267 save_LDFLAGS="$LDFLAGS"
1268 LDFLAGS="$LDFLAGS $3"
1269 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1270 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1271 # The linker can only warn and ignore the option if not recognized
1272 # So say no if there are warnings
1273 if test -s conftest.err; then
1274 # Append any errors to the config.log.
1275 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1276 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1277 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1278 if diff conftest.exp conftest.er2 >/dev/null; then
1286 LDFLAGS="$save_LDFLAGS"
1289 if test x"[$]$2" = xyes; then
1290 ifelse([$4], , :, [$4])
1292 ifelse([$5], , :, [$5])
1294 ])# AC_LIBTOOL_LINKER_OPTION
1297 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1298 # --------------------------
1299 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1300 [# find the maximum length of command line arguments
1301 AC_MSG_CHECKING([the maximum length of command line arguments])
1302 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1308 # On DJGPP, this test can blow up pretty badly due to problems in libc
1309 # (any single argument exceeding 2000 bytes causes a buffer overrun
1310 # during glob expansion). Even if it were fixed, the result of this
1311 # check would be larger than it should be.
1312 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1316 # Under GNU Hurd, this test is not required because there is
1317 # no limit to the length of command line arguments.
1318 # Libtool will interpret -1 as no limit whatsoever
1319 lt_cv_sys_max_cmd_len=-1;
1323 # On Win9x/ME, this test blows up -- it succeeds, but takes
1324 # about 5 minutes as the teststring grows exponentially.
1325 # Worse, since 9x/ME are not pre-emptively multitasking,
1326 # you end up with a "frozen" computer, even though with patience
1327 # the test eventually succeeds (with a max line length of 256k).
1328 # Instead, let's just punt: use the minimum linelength reported by
1329 # all of the supported platforms: 8192 (on NT/2K/XP).
1330 lt_cv_sys_max_cmd_len=8192;
1334 # On AmigaOS with pdksh, this test takes hours, literally.
1335 # So we just punt and use a minimum line length of 8192.
1336 lt_cv_sys_max_cmd_len=8192;
1339 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1340 # This has been around since 386BSD, at least. Likely further.
1341 if test -x /sbin/sysctl; then
1342 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1343 elif test -x /usr/sbin/sysctl; then
1344 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1346 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1348 # And add a safety zone
1349 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1350 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1354 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1355 lt_cv_sys_max_cmd_len=196608
1359 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1360 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1361 # nice to cause kernel panics so lets avoid the loop below.
1362 # First set a reasonable default.
1363 lt_cv_sys_max_cmd_len=16384
1365 if test -x /sbin/sysconfig; then
1366 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1367 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1372 lt_cv_sys_max_cmd_len=102400
1374 sysv5* | sco5v6* | sysv4.2uw2*)
1375 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1376 if test -n "$kargmax"; then
1377 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1379 lt_cv_sys_max_cmd_len=32768
1383 # If test is not a shell built-in, we'll probably end up computing a
1384 # maximum length that is only half of the actual maximum length, but
1386 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1387 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1388 = "XX$teststring") >/dev/null 2>&1 &&
1389 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1390 lt_cv_sys_max_cmd_len=$new_result &&
1391 test $i != 17 # 1/2 MB should be enough
1394 teststring=$teststring$teststring
1397 # Add a significant safety factor because C++ compilers can tack on massive
1398 # amounts of additional arguments before passing them to the linker.
1399 # It appears as though 1/2 is a usable value.
1400 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1404 if test -n $lt_cv_sys_max_cmd_len ; then
1405 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1409 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1412 # _LT_AC_CHECK_DLFCN
1413 # ------------------
1414 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1415 [AC_CHECK_HEADERS(dlfcn.h)dnl
1416 ])# _LT_AC_CHECK_DLFCN
1419 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1420 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1421 # ---------------------------------------------------------------------
1422 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1423 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1424 if test "$cross_compiling" = yes; then :
1427 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1428 lt_status=$lt_dlunknown
1429 cat > conftest.$ac_ext <<EOF
1430 [#line __oline__ "configure"
1431 #include "confdefs.h"
1440 # define LT_DLGLOBAL RTLD_GLOBAL
1443 # define LT_DLGLOBAL DL_GLOBAL
1445 # define LT_DLGLOBAL 0
1449 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1450 find out it does not work in some platform. */
1451 #ifndef LT_DLLAZY_OR_NOW
1453 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1456 # define LT_DLLAZY_OR_NOW DL_LAZY
1459 # define LT_DLLAZY_OR_NOW RTLD_NOW
1462 # define LT_DLLAZY_OR_NOW DL_NOW
1464 # define LT_DLLAZY_OR_NOW 0
1472 extern "C" void exit (int);
1475 void fnord() { int i=42;}
1478 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1479 int status = $lt_dlunknown;
1483 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1484 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1485 /* dlclose (self); */
1493 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1494 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1497 x$lt_dlno_uscore) $1 ;;
1498 x$lt_dlneed_uscore) $2 ;;
1499 x$lt_dlunknown|x*) $3 ;;
1502 # compilation failed
1507 ])# _LT_AC_TRY_DLOPEN_SELF
1510 # AC_LIBTOOL_DLOPEN_SELF
1511 # ----------------------
1512 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1513 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1514 if test "x$enable_dlopen" != xyes; then
1515 enable_dlopen=unknown
1516 enable_dlopen_self=unknown
1517 enable_dlopen_self_static=unknown
1524 lt_cv_dlopen="load_add_on"
1526 lt_cv_dlopen_self=yes
1530 lt_cv_dlopen="LoadLibrary"
1535 lt_cv_dlopen="dlopen"
1540 # if libdl is installed we need to link against it
1541 AC_CHECK_LIB([dl], [dlopen],
1542 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1545 lt_cv_dlopen_self=yes
1550 AC_CHECK_FUNC([shl_load],
1551 [lt_cv_dlopen="shl_load"],
1552 [AC_CHECK_LIB([dld], [shl_load],
1553 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1554 [AC_CHECK_FUNC([dlopen],
1555 [lt_cv_dlopen="dlopen"],
1556 [AC_CHECK_LIB([dl], [dlopen],
1557 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1558 [AC_CHECK_LIB([svld], [dlopen],
1559 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1560 [AC_CHECK_LIB([dld], [dld_link],
1561 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1570 if test "x$lt_cv_dlopen" != xno; then
1576 case $lt_cv_dlopen in
1578 save_CPPFLAGS="$CPPFLAGS"
1579 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1581 save_LDFLAGS="$LDFLAGS"
1582 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1585 LIBS="$lt_cv_dlopen_libs $LIBS"
1587 AC_CACHE_CHECK([whether a program can dlopen itself],
1588 lt_cv_dlopen_self, [dnl
1589 _LT_AC_TRY_DLOPEN_SELF(
1590 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1591 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1594 if test "x$lt_cv_dlopen_self" = xyes; then
1595 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1596 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1597 lt_cv_dlopen_self_static, [dnl
1598 _LT_AC_TRY_DLOPEN_SELF(
1599 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1600 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1604 CPPFLAGS="$save_CPPFLAGS"
1605 LDFLAGS="$save_LDFLAGS"
1610 case $lt_cv_dlopen_self in
1611 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1612 *) enable_dlopen_self=unknown ;;
1615 case $lt_cv_dlopen_self_static in
1616 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1617 *) enable_dlopen_self_static=unknown ;;
1620 ])# AC_LIBTOOL_DLOPEN_SELF
1623 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1624 # ---------------------------------
1625 # Check to see if options -c and -o are simultaneously supported by compiler
1626 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1627 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1628 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1629 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1630 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1631 $rm -r conftest 2>/dev/null
1635 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1637 lt_compiler_flag="-o out/conftest2.$ac_objext"
1638 # Insert the option either (1) after the last *FLAGS variable, or
1639 # (2) before a word containing "conftest.", or (3) at the end.
1640 # Note that $ac_compile itself does not contain backslashes and begins
1641 # with a dollar sign (not a hyphen), so the echo should work correctly.
1642 lt_compile=`echo "$ac_compile" | $SED \
1643 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1644 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1645 -e 's:$: $lt_compiler_flag:'`
1646 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1647 (eval "$lt_compile" 2>out/conftest.err)
1649 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1650 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1651 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1653 # The compiler can only warn and ignore the option if not recognized
1654 # So say no if there are warnings
1655 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1656 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1657 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1658 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1661 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1663 # SGI C++ compiler will create directory out/ii_files/ for
1664 # template instantiation
1665 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1666 $rm out/* && rmdir out
1671 ])# AC_LIBTOOL_PROG_CC_C_O
1674 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1675 # -----------------------------------------
1676 # Check to see if we can do hard links to lock some files if needed
1677 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1678 [AC_REQUIRE([_LT_AC_LOCK])dnl
1680 hard_links="nottested"
1681 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1682 # do not overwrite the value of need_locks provided by the user
1683 AC_MSG_CHECKING([if we can lock with hard links])
1686 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1688 ln conftest.a conftest.b 2>&5 || hard_links=no
1689 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1690 AC_MSG_RESULT([$hard_links])
1691 if test "$hard_links" = no; then
1692 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1698 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1703 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1704 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1705 [rm -f .libs 2>/dev/null
1706 mkdir .libs 2>/dev/null
1707 if test -d .libs; then
1710 # MS-DOS does not allow filenames that begin with a dot.
1713 rmdir .libs 2>/dev/null])
1714 objdir=$lt_cv_objdir
1715 ])# AC_LIBTOOL_OBJDIR
1718 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1719 # ----------------------------------------------
1720 # Check hardcoding attributes.
1721 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1722 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1723 _LT_AC_TAGVAR(hardcode_action, $1)=
1724 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1725 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1726 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1728 # We can hardcode non-existant directories.
1729 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1730 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1731 # have to relink, otherwise we might link with an installed library
1732 # when we should be linking with a yet-to-be-installed one
1733 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1734 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1735 # Linking always hardcodes the temporary library directory.
1736 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1738 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1739 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1742 # We cannot hardcode anything, or else we can only hardcode existing
1744 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1746 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1748 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1749 # Fast installation is not supported
1750 enable_fast_install=no
1751 elif test "$shlibpath_overrides_runpath" = yes ||
1752 test "$enable_shared" = no; then
1753 # Fast installation is not necessary
1754 enable_fast_install=needless
1756 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1759 # AC_LIBTOOL_SYS_LIB_STRIP
1760 # ------------------------
1761 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1764 AC_MSG_CHECKING([whether stripping libraries is possible])
1765 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1766 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1767 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1768 AC_MSG_RESULT([yes])
1770 # FIXME - insert some real tests, host_os isn't really good enough
1773 if test -n "$STRIP" ; then
1774 striplib="$STRIP -x"
1775 AC_MSG_RESULT([yes])
1785 ])# AC_LIBTOOL_SYS_LIB_STRIP
1788 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1789 # -----------------------------
1790 # PORTME Fill in your ld.so characteristics
1791 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1792 [AC_MSG_CHECKING([dynamic linker characteristics])
1794 libname_spec='lib$name'
1802 shlibpath_overrides_runpath=unknown
1804 dynamic_linker="$host_os ld.so"
1805 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1806 if test "$GCC" = yes; then
1807 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1808 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1809 # if the path contains ";" then we assume it to be the separator
1810 # otherwise default to the standard path separator (i.e. ":") - it is
1811 # assumed that no part of a normal pathname contains ";" but that should
1812 # okay in the real world where ";" in dirpaths is itself problematic.
1813 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1815 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1818 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1820 need_lib_prefix=unknown
1821 hardcode_into_libs=no
1823 # when you set need_version to no, make sure it does not cause -set_version
1824 # flags to be left without arguments
1825 need_version=unknown
1830 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1831 shlibpath_var=LIBPATH
1833 # AIX 3 has no versioning support, so we append a major version to the name.
1834 soname_spec='${libname}${release}${shared_ext}$major'
1841 hardcode_into_libs=yes
1842 if test "$host_cpu" = ia64; then
1843 # AIX 5 supports IA64
1844 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1845 shlibpath_var=LD_LIBRARY_PATH
1847 # With GCC up to 2.95.x, collect2 would create an import file
1848 # for dependence libraries. The import file would start with
1849 # the line `#! .'. This would cause the generated library to
1850 # depend on `.', always an invalid library. This was fixed in
1851 # development snapshots of GCC prior to 3.0.
1853 aix4 | aix4.[[01]] | aix4.[[01]].*)
1854 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1856 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1863 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1864 # soname into executable. Probably we can add versioning support to
1865 # collect2, so additional links can be useful in future.
1866 if test "$aix_use_runtimelinking" = yes; then
1867 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1868 # instead of lib<name>.a to let people know that these are not
1869 # typical AIX shared libraries.
1870 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1872 # We preserve .a as extension for shared libraries through AIX4.2
1873 # and later when we are not doing run time linking.
1874 library_names_spec='${libname}${release}.a $libname.a'
1875 soname_spec='${libname}${release}${shared_ext}$major'
1877 shlibpath_var=LIBPATH
1882 library_names_spec='$libname.ixlibrary $libname.a'
1883 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1884 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'
1888 library_names_spec='${libname}${shared_ext}'
1889 dynamic_linker="$host_os ld.so"
1890 shlibpath_var=LIBRARY_PATH
1896 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1897 soname_spec='${libname}${release}${shared_ext}$major'
1898 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1899 shlibpath_var=LD_LIBRARY_PATH
1900 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1901 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1902 # the default ld.so.conf also contains /usr/contrib/lib and
1903 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1904 # libtool to hard-code these into programs
1907 cygwin* | mingw* | pw32*)
1908 version_type=windows
1913 case $GCC,$host_os in
1914 yes,cygwin* | yes,mingw* | yes,pw32*)
1915 library_names_spec='$libname.dll.a'
1916 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1917 postinstall_cmds='base_file=`basename \${file}`~
1918 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1919 dldir=$destdir/`dirname \$dlpath`~
1920 test -d \$dldir || mkdir -p \$dldir~
1921 $install_prog $dir/$dlname \$dldir/$dlname~
1922 chmod a+x \$dldir/$dlname'
1923 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1924 dlpath=$dir/\$dldll~
1926 shlibpath_overrides_runpath=yes
1930 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1931 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1932 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1935 # MinGW DLLs use traditional 'lib' prefix
1936 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1937 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1938 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1939 # It is most probably a Windows format PATH printed by
1940 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1941 # path with ; separators, and with drive letters. We can handle the
1942 # drive letters (cygwin fileutils understands them), so leave them,
1943 # especially as we might pass files found there to a mingw objdump,
1944 # which wouldn't understand a cygwinified path. Ahh.
1945 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1947 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1951 # pw32 DLLs use 'pw' prefix rather than 'lib'
1952 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1958 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1961 dynamic_linker='Win32 ld.exe'
1962 # FIXME: first we should search . and the directory the executable is in
1966 darwin* | rhapsody*)
1967 dynamic_linker="$host_os dyld"
1971 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1972 soname_spec='${libname}${release}${major}$shared_ext'
1973 shlibpath_overrides_runpath=yes
1974 shlibpath_var=DYLD_LIBRARY_PATH
1975 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1976 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1977 if test "$GCC" = yes; then
1978 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"`
1980 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1982 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1989 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1990 soname_spec='${libname}${release}${shared_ext}$major'
1991 shlibpath_var=LD_LIBRARY_PATH
2002 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2003 soname_spec='${libname}${release}${shared_ext}$major'
2004 shlibpath_var=LD_LIBRARY_PATH
2005 shlibpath_overrides_runpath=no
2006 hardcode_into_libs=yes
2007 dynamic_linker='GNU ld.so'
2010 freebsd* | dragonfly*)
2011 # DragonFly does not have aout. When/if they implement a new
2012 # versioning mechanism, adjust this.
2013 if test -x /usr/bin/objformat; then
2014 objformat=`/usr/bin/objformat`
2017 freebsd[[123]]*) objformat=aout ;;
2021 version_type=freebsd-$objformat
2022 case $version_type in
2024 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2029 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2033 shlibpath_var=LD_LIBRARY_PATH
2036 shlibpath_overrides_runpath=yes
2038 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2039 shlibpath_overrides_runpath=yes
2040 hardcode_into_libs=yes
2042 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2043 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2044 shlibpath_overrides_runpath=no
2045 hardcode_into_libs=yes
2047 freebsd*) # from 4.6 on
2048 shlibpath_overrides_runpath=yes
2049 hardcode_into_libs=yes
2058 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2059 soname_spec='${libname}${release}${shared_ext}$major'
2060 shlibpath_var=LD_LIBRARY_PATH
2061 hardcode_into_libs=yes
2064 hpux9* | hpux10* | hpux11*)
2065 # Give a soname corresponding to the major version so that dld.sl refuses to
2066 # link against other versions.
2073 hardcode_into_libs=yes
2074 dynamic_linker="$host_os dld.so"
2075 shlibpath_var=LD_LIBRARY_PATH
2076 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2077 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2078 soname_spec='${libname}${release}${shared_ext}$major'
2079 if test "X$HPUX_IA64_MODE" = X32; then
2080 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2082 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2084 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2088 hardcode_into_libs=yes
2089 dynamic_linker="$host_os dld.sl"
2090 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2091 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2092 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2093 soname_spec='${libname}${release}${shared_ext}$major'
2094 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2095 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2099 dynamic_linker="$host_os dld.sl"
2100 shlibpath_var=SHLIB_PATH
2101 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2102 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2103 soname_spec='${libname}${release}${shared_ext}$major'
2106 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2107 postinstall_cmds='chmod 555 $lib'
2114 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2115 soname_spec='${libname}${release}${shared_ext}$major'
2116 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2117 shlibpath_var=LD_LIBRARY_PATH
2118 shlibpath_overrides_runpath=no
2119 hardcode_into_libs=yes
2122 irix5* | irix6* | nonstopux*)
2124 nonstopux*) version_type=nonstopux ;;
2126 if test "$lt_cv_prog_gnu_ld" = yes; then
2134 soname_spec='${libname}${release}${shared_ext}$major'
2135 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2137 irix5* | nonstopux*)
2141 case $LD in # libtool.m4 will add one of these switches to LD
2142 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2143 libsuff= shlibsuff= libmagic=32-bit;;
2144 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2145 libsuff=32 shlibsuff=N32 libmagic=N32;;
2146 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2147 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2148 *) libsuff= shlibsuff= libmagic=never-match;;
2152 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2153 shlibpath_overrides_runpath=no
2154 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2155 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2156 hardcode_into_libs=yes
2159 # No shared lib support for Linux oldld, aout, or coff.
2160 linux*oldld* | linux*aout* | linux*coff*)
2164 # This must be Linux ELF.
2169 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2170 soname_spec='${libname}${release}${shared_ext}$major'
2171 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2172 shlibpath_var=LD_LIBRARY_PATH
2173 shlibpath_overrides_runpath=no
2174 # This implies no fast_install, which is unacceptable.
2175 # Some rework will be needed to allow for fast_install
2176 # before this can be enabled.
2177 hardcode_into_libs=yes
2179 # Append ld.so.conf contents to the search path
2180 if test -f /etc/ld.so.conf; then
2181 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2182 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2185 # We used to test for /lib/ld.so.1 and disable shared libraries on
2186 # powerpc, because MkLinux only supported shared libraries with the
2187 # GNU dynamic linker. Since this was broken with cross compilers,
2188 # most powerpc-linux boxes support dynamic linking these days and
2189 # people can always --disable-shared, the test was removed, and we
2190 # assume the GNU/Linux dynamic linker is in use.
2191 dynamic_linker='GNU/Linux ld.so'
2198 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2199 soname_spec='${libname}${release}${shared_ext}$major'
2200 shlibpath_var=LD_LIBRARY_PATH
2201 shlibpath_overrides_runpath=no
2202 hardcode_into_libs=yes
2203 dynamic_linker='GNU ld.so'
2210 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2211 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2212 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2213 dynamic_linker='NetBSD (a.out) ld.so'
2215 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2216 soname_spec='${libname}${release}${shared_ext}$major'
2217 dynamic_linker='NetBSD ld.elf_so'
2219 shlibpath_var=LD_LIBRARY_PATH
2220 shlibpath_overrides_runpath=yes
2221 hardcode_into_libs=yes
2226 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2227 shlibpath_var=LD_LIBRARY_PATH
2228 shlibpath_overrides_runpath=yes
2235 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2236 soname_spec='${libname}${release}${shared_ext}$major'
2237 shlibpath_var=LD_LIBRARY_PATH
2238 shlibpath_overrides_runpath=yes
2243 sys_lib_dlsearch_path_spec="/usr/lib"
2245 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2247 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2248 *) need_version=no ;;
2250 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2251 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2252 shlibpath_var=LD_LIBRARY_PATH
2253 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2255 openbsd2.[[89]] | openbsd2.[[89]].*)
2256 shlibpath_overrides_runpath=no
2259 shlibpath_overrides_runpath=yes
2263 shlibpath_overrides_runpath=yes
2268 libname_spec='$name'
2271 library_names_spec='$libname${shared_ext} $libname.a'
2272 dynamic_linker='OS/2 ld.exe'
2273 shlibpath_var=LIBPATH
2276 osf3* | osf4* | osf5*)
2280 soname_spec='${libname}${release}${shared_ext}$major'
2281 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2282 shlibpath_var=LD_LIBRARY_PATH
2283 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2284 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2291 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2292 soname_spec='${libname}${release}${shared_ext}$major'
2293 shlibpath_var=LD_LIBRARY_PATH
2294 shlibpath_overrides_runpath=yes
2295 hardcode_into_libs=yes
2296 # ldd complains unless libraries are executable
2297 postinstall_cmds='chmod +x $lib'
2302 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2303 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2304 shlibpath_var=LD_LIBRARY_PATH
2305 shlibpath_overrides_runpath=yes
2306 if test "$with_gnu_ld" = yes; then
2314 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2315 soname_spec='${libname}${release}${shared_ext}$major'
2316 shlibpath_var=LD_LIBRARY_PATH
2317 case $host_vendor in
2319 shlibpath_overrides_runpath=no
2321 export_dynamic_flag_spec='${wl}-Blargedynsym'
2322 runpath_var=LD_RUN_PATH
2330 shlibpath_overrides_runpath=no
2331 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2337 if test -d /usr/nec ;then
2339 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2340 soname_spec='$libname${shared_ext}.$major'
2341 shlibpath_var=LD_LIBRARY_PATH
2345 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2346 version_type=freebsd-elf
2349 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2350 soname_spec='${libname}${release}${shared_ext}$major'
2351 shlibpath_var=LD_LIBRARY_PATH
2352 hardcode_into_libs=yes
2353 if test "$with_gnu_ld" = yes; then
2354 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2355 shlibpath_overrides_runpath=no
2357 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2358 shlibpath_overrides_runpath=yes
2361 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2365 sys_lib_dlsearch_path_spec='/usr/lib'
2370 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2371 soname_spec='${libname}${release}${shared_ext}$major'
2372 shlibpath_var=LD_LIBRARY_PATH
2379 AC_MSG_RESULT([$dynamic_linker])
2380 test "$dynamic_linker" = no && can_build_shared=no
2382 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2383 if test "$GCC" = yes; then
2384 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2386 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2391 AC_DEFUN([_LT_AC_TAGCONFIG],
2392 [AC_ARG_WITH([tags],
2393 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2394 [include additional configurations @<:@automatic@:>@])],
2395 [tagnames="$withval"])
2397 if test -f "$ltmain" && test -n "$tagnames"; then
2398 if test ! -f "${ofile}"; then
2399 AC_MSG_WARN([output file `$ofile' does not exist])
2402 if test -z "$LTCC"; then
2403 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2404 if test -z "$LTCC"; then
2405 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2407 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2410 if test -z "$LTCFLAGS"; then
2411 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2414 # Extract list of available tagged configurations in $ofile.
2415 # Note that this assumes the entire list is on one line.
2416 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2418 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2419 for tagname in $tagnames; do
2421 # Check whether tagname contains only valid characters
2422 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2424 *) AC_MSG_ERROR([invalid tag name: $tagname])
2428 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2430 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2433 # Update the list of available tags.
2434 if test -n "$tagname"; then
2435 echo appending configuration tag \"$tagname\" to $ofile
2439 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2440 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2441 (test "X$CXX" != "Xg++"))) ; then
2442 AC_LIBTOOL_LANG_CXX_CONFIG
2449 if test -n "$F77" && test "X$F77" != "Xno"; then
2450 AC_LIBTOOL_LANG_F77_CONFIG
2457 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2458 AC_LIBTOOL_LANG_GCJ_CONFIG
2465 AC_LIBTOOL_LANG_RC_CONFIG
2469 AC_MSG_ERROR([Unsupported tag name: $tagname])
2473 # Append the new tag name to the list of available tags.
2474 if test -n "$tagname" ; then
2475 available_tags="$available_tags $tagname"
2481 # Now substitute the updated list of available tags.
2482 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2483 mv "${ofile}T" "$ofile"
2487 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2490 ])# _LT_AC_TAGCONFIG
2495 # enable checks for dlopen support
2496 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2497 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2498 ])# AC_LIBTOOL_DLOPEN
2501 # AC_LIBTOOL_WIN32_DLL
2502 # --------------------
2503 # declare package support for building win32 DLLs
2504 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2505 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2506 ])# AC_LIBTOOL_WIN32_DLL
2509 # AC_ENABLE_SHARED([DEFAULT])
2510 # ---------------------------
2511 # implement the --enable-shared flag
2512 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2513 AC_DEFUN([AC_ENABLE_SHARED],
2514 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2515 AC_ARG_ENABLE([shared],
2516 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2517 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2518 [p=${PACKAGE-default}
2520 yes) enable_shared=yes ;;
2521 no) enable_shared=no ;;
2524 # Look at the argument we got. We use all the common list separators.
2525 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2526 for pkg in $enableval; do
2528 if test "X$pkg" = "X$p"; then
2535 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2536 ])# AC_ENABLE_SHARED
2541 # set the default shared flag to --disable-shared
2542 AC_DEFUN([AC_DISABLE_SHARED],
2543 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2544 AC_ENABLE_SHARED(no)
2545 ])# AC_DISABLE_SHARED
2548 # AC_ENABLE_STATIC([DEFAULT])
2549 # ---------------------------
2550 # implement the --enable-static flag
2551 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2552 AC_DEFUN([AC_ENABLE_STATIC],
2553 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2554 AC_ARG_ENABLE([static],
2555 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2556 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2557 [p=${PACKAGE-default}
2559 yes) enable_static=yes ;;
2560 no) enable_static=no ;;
2563 # Look at the argument we got. We use all the common list separators.
2564 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2565 for pkg in $enableval; do
2567 if test "X$pkg" = "X$p"; then
2574 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2575 ])# AC_ENABLE_STATIC
2580 # set the default static flag to --disable-static
2581 AC_DEFUN([AC_DISABLE_STATIC],
2582 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2583 AC_ENABLE_STATIC(no)
2584 ])# AC_DISABLE_STATIC
2587 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2588 # ---------------------------------
2589 # implement the --enable-fast-install flag
2590 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2591 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2592 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2593 AC_ARG_ENABLE([fast-install],
2594 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2595 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2596 [p=${PACKAGE-default}
2598 yes) enable_fast_install=yes ;;
2599 no) enable_fast_install=no ;;
2601 enable_fast_install=no
2602 # Look at the argument we got. We use all the common list separators.
2603 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2604 for pkg in $enableval; do
2606 if test "X$pkg" = "X$p"; then
2607 enable_fast_install=yes
2613 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2614 ])# AC_ENABLE_FAST_INSTALL
2617 # AC_DISABLE_FAST_INSTALL
2618 # -----------------------
2619 # set the default to --disable-fast-install
2620 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2621 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2622 AC_ENABLE_FAST_INSTALL(no)
2623 ])# AC_DISABLE_FAST_INSTALL
2626 # AC_LIBTOOL_PICMODE([MODE])
2627 # --------------------------
2628 # implement the --with-pic flag
2629 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2630 AC_DEFUN([AC_LIBTOOL_PICMODE],
2631 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2632 pic_mode=ifelse($#,1,$1,default)
2633 ])# AC_LIBTOOL_PICMODE
2638 # This is predefined starting with Autoconf 2.54, so this conditional
2639 # definition can be removed once we require Autoconf 2.54 or later.
2640 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2641 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2642 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2643 then ac_cv_prog_egrep='grep -E'
2644 else ac_cv_prog_egrep='egrep'
2646 EGREP=$ac_cv_prog_egrep
2651 # AC_PATH_TOOL_PREFIX
2652 # -------------------
2653 # find a file program which can recognise shared library
2654 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2655 [AC_REQUIRE([AC_PROG_EGREP])dnl
2656 AC_MSG_CHECKING([for $1])
2657 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2659 [[\\/*] | ?:[\\/]*])
2660 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2663 lt_save_MAGIC_CMD="$MAGIC_CMD"
2664 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2665 dnl $ac_dummy forces splitting on constant user-supplied paths.
2666 dnl POSIX.2 word splitting is done only on the output of word expansions,
2667 dnl not every word. This closes a longstanding sh security hole.
2668 ac_dummy="ifelse([$2], , $PATH, [$2])"
2669 for ac_dir in $ac_dummy; do
2671 test -z "$ac_dir" && ac_dir=.
2672 if test -f $ac_dir/$1; then
2673 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2674 if test -n "$file_magic_test_file"; then
2675 case $deplibs_check_method in
2677 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2678 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2679 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2680 $EGREP "$file_magic_regex" > /dev/null; then
2685 *** Warning: the command libtool uses to detect shared libraries,
2686 *** $file_magic_cmd, produces output that libtool cannot recognize.
2687 *** The result is that libtool may fail to recognize shared libraries
2688 *** as such. This will affect the creation of libtool libraries that
2689 *** depend on shared libraries, but programs linked with such libtool
2690 *** libraries will work regardless of this problem. Nevertheless, you
2691 *** may want to report the problem to your system manager and/or to
2692 *** bug-libtool@gnu.org
2702 MAGIC_CMD="$lt_save_MAGIC_CMD"
2705 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2706 if test -n "$MAGIC_CMD"; then
2707 AC_MSG_RESULT($MAGIC_CMD)
2711 ])# AC_PATH_TOOL_PREFIX
2716 # find a file program which can recognise a shared library
2717 AC_DEFUN([AC_PATH_MAGIC],
2718 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2719 if test -z "$lt_cv_path_MAGIC_CMD"; then
2720 if test -n "$ac_tool_prefix"; then
2721 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2731 # find the pathname to the GNU or non-GNU linker
2732 AC_DEFUN([AC_PROG_LD],
2733 [AC_ARG_WITH([gnu-ld],
2734 [AC_HELP_STRING([--with-gnu-ld],
2735 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2736 [test "$withval" = no || with_gnu_ld=yes],
2738 AC_REQUIRE([LT_AC_PROG_SED])dnl
2739 AC_REQUIRE([AC_PROG_CC])dnl
2740 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2741 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2743 if test "$GCC" = yes; then
2744 # Check if gcc -print-prog-name=ld gives a path.
2745 AC_MSG_CHECKING([for ld used by $CC])
2748 # gcc leaves a trailing carriage return which upsets mingw
2749 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2751 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2754 # Accept absolute paths.
2755 [[\\/]]* | ?:[[\\/]]*)
2756 re_direlt='/[[^/]][[^/]]*/\.\./'
2757 # Canonicalize the pathname of ld
2758 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2759 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2760 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2762 test -z "$LD" && LD="$ac_prog"
2765 # If it fails, then pretend we aren't using GCC.
2769 # If it is relative, then search for the first ld in PATH.
2773 elif test "$with_gnu_ld" = yes; then
2774 AC_MSG_CHECKING([for GNU ld])
2776 AC_MSG_CHECKING([for non-GNU ld])
2778 AC_CACHE_VAL(lt_cv_path_LD,
2779 [if test -z "$LD"; then
2780 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2781 for ac_dir in $PATH; do
2783 test -z "$ac_dir" && ac_dir=.
2784 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2785 lt_cv_path_LD="$ac_dir/$ac_prog"
2786 # Check to see if the program is GNU ld. I'd rather use --version,
2787 # but apparently some variants of GNU ld only accept -v.
2788 # Break only if it was the GNU/non-GNU ld that we prefer.
2789 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2790 *GNU* | *'with BFD'*)
2791 test "$with_gnu_ld" != no && break
2794 test "$with_gnu_ld" != yes && break
2801 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2804 if test -n "$LD"; then
2809 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2816 AC_DEFUN([AC_PROG_LD_GNU],
2817 [AC_REQUIRE([AC_PROG_EGREP])dnl
2818 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2819 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2820 case `$LD -v 2>&1 </dev/null` in
2821 *GNU* | *'with BFD'*)
2822 lt_cv_prog_gnu_ld=yes
2825 lt_cv_prog_gnu_ld=no
2828 with_gnu_ld=$lt_cv_prog_gnu_ld
2832 # AC_PROG_LD_RELOAD_FLAG
2833 # ----------------------
2834 # find reload flag for linker
2835 # -- PORTME Some linkers may need a different reload flag.
2836 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2837 [AC_CACHE_CHECK([for $LD option to reload object files],
2838 lt_cv_ld_reload_flag,
2839 [lt_cv_ld_reload_flag='-r'])
2840 reload_flag=$lt_cv_ld_reload_flag
2841 case $reload_flag in
2843 *) reload_flag=" $reload_flag" ;;
2845 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2848 if test "$GCC" = yes; then
2849 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2851 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2855 ])# AC_PROG_LD_RELOAD_FLAG
2858 # AC_DEPLIBS_CHECK_METHOD
2859 # -----------------------
2860 # how to check for library dependencies
2861 # -- PORTME fill in with the dynamic library characteristics
2862 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2863 [AC_CACHE_CHECK([how to recognise dependent libraries],
2864 lt_cv_deplibs_check_method,
2865 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2866 lt_cv_file_magic_test_file=
2867 lt_cv_deplibs_check_method='unknown'
2868 # Need to set the preceding variable on all platforms that support
2869 # interlibrary dependencies.
2870 # 'none' -- dependencies not supported.
2871 # `unknown' -- same as none, but documents that we really don't know.
2872 # 'pass_all' -- all dependencies passed with no checks.
2873 # 'test_compile' -- check by making test program.
2874 # 'file_magic [[regex]]' -- check by looking for files in library path
2875 # which responds to the $file_magic_cmd with a given extended regex.
2876 # If you have `file' or equivalent on your system and you're not sure
2877 # whether `pass_all' will *always* work, you probably want this one.
2881 lt_cv_deplibs_check_method=pass_all
2885 lt_cv_deplibs_check_method=pass_all
2889 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2890 lt_cv_file_magic_cmd='/usr/bin/file -L'
2891 lt_cv_file_magic_test_file=/shlib/libc.so
2895 # func_win32_libid is a shell function defined in ltmain.sh
2896 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2897 lt_cv_file_magic_cmd='func_win32_libid'
2901 # Base MSYS/MinGW do not provide the 'file' command needed by
2902 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2903 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2904 lt_cv_file_magic_cmd='$OBJDUMP -f'
2907 darwin* | rhapsody*)
2908 lt_cv_deplibs_check_method=pass_all
2911 freebsd* | kfreebsd*-gnu | dragonfly*)
2912 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2915 # Not sure whether the presence of OpenBSD here was a mistake.
2916 # Let's accept both of them until this is cleared up.
2917 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2918 lt_cv_file_magic_cmd=/usr/bin/file
2919 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2923 lt_cv_deplibs_check_method=pass_all
2928 lt_cv_deplibs_check_method=pass_all
2931 hpux10.20* | hpux11*)
2932 lt_cv_file_magic_cmd=/usr/bin/file
2935 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2936 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2939 [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]']
2940 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2943 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2944 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2950 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2951 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2954 irix5* | irix6* | nonstopux*)
2956 *-32|*"-32 ") libmagic=32-bit;;
2957 *-n32|*"-n32 ") libmagic=N32;;
2958 *-64|*"-64 ") libmagic=64-bit;;
2959 *) libmagic=never-match;;
2961 lt_cv_deplibs_check_method=pass_all
2964 # This must be Linux ELF.
2966 lt_cv_deplibs_check_method=pass_all
2970 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2971 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2973 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2978 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2979 lt_cv_file_magic_cmd=/usr/bin/file
2980 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2984 lt_cv_deplibs_check_method=unknown
2988 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2989 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2991 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2995 osf3* | osf4* | osf5*)
2996 lt_cv_deplibs_check_method=pass_all
3000 lt_cv_deplibs_check_method=pass_all
3004 case $host_vendor in
3006 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]]'
3007 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3010 lt_cv_deplibs_check_method=pass_all
3013 lt_cv_file_magic_cmd='/bin/file'
3014 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3017 lt_cv_file_magic_cmd='/bin/file'
3018 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3019 lt_cv_file_magic_test_file=/lib/libc.so
3022 lt_cv_deplibs_check_method=pass_all
3025 lt_cv_deplibs_check_method=pass_all
3030 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3031 lt_cv_deplibs_check_method=pass_all
3035 file_magic_cmd=$lt_cv_file_magic_cmd
3036 deplibs_check_method=$lt_cv_deplibs_check_method
3037 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3038 ])# AC_DEPLIBS_CHECK_METHOD
3043 # find the pathname to a BSD-compatible name lister
3044 AC_DEFUN([AC_PROG_NM],
3045 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3046 [if test -n "$NM"; then
3047 # Let the user override the test.
3050 lt_nm_to_check="${ac_tool_prefix}nm"
3051 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3052 lt_nm_to_check="$lt_nm_to_check nm"
3054 for lt_tmp_nm in $lt_nm_to_check; do
3055 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3056 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3058 test -z "$ac_dir" && ac_dir=.
3059 tmp_nm="$ac_dir/$lt_tmp_nm"
3060 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3061 # Check to see if the nm accepts a BSD-compat flag.
3062 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3063 # nm: unknown option "B" ignored
3064 # Tru64's nm complains that /dev/null is an invalid object file
3065 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3066 */dev/null* | *'Invalid file or object type'*)
3067 lt_cv_path_NM="$tmp_nm -B"
3071 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3073 lt_cv_path_NM="$tmp_nm -p"
3077 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3078 continue # so that we can try to find one that supports BSD flags
3087 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3095 # check for math library
3096 AC_DEFUN([AC_CHECK_LIBM],
3097 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3100 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3101 # These system don't have libm, or don't need it
3104 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3105 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3108 AC_CHECK_LIB(m, cos, LIBM="-lm")
3114 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3115 # -----------------------------------
3116 # sets LIBLTDL to the link flags for the libltdl convenience library and
3117 # LTDLINCL to the include flags for the libltdl header and adds
3118 # --enable-ltdl-convenience to the configure arguments. Note that
3119 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3120 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
3121 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3122 # (note the single quotes!). If your package is not flat and you're not
3123 # using automake, define top_builddir and top_srcdir appropriately in
3125 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3126 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3127 case $enable_ltdl_convenience in
3128 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3129 "") enable_ltdl_convenience=yes
3130 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3132 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3133 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3134 # For backwards non-gettext consistent compatibility...
3136 ])# AC_LIBLTDL_CONVENIENCE
3139 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3140 # -----------------------------------
3141 # sets LIBLTDL to the link flags for the libltdl installable library and
3142 # LTDLINCL to the include flags for the libltdl header and adds
3143 # --enable-ltdl-install to the configure arguments. Note that
3144 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3145 # and an installed libltdl is not found, it is assumed to be `libltdl'.
3146 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3147 # '${top_srcdir}/' (note the single quotes!). If your package is not
3148 # flat and you're not using automake, define top_builddir and top_srcdir
3149 # appropriately in the Makefiles.
3150 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3151 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3152 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3153 AC_CHECK_LIB(ltdl, lt_dlinit,
3154 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3155 [if test x"$enable_ltdl_install" = xno; then
3156 AC_MSG_WARN([libltdl not installed, but installation disabled])
3158 enable_ltdl_install=yes
3161 if test x"$enable_ltdl_install" = x"yes"; then
3162 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3163 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3164 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3166 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3170 # For backwards non-gettext consistent compatibility...
3172 ])# AC_LIBLTDL_INSTALLABLE
3177 # enable support for C++ libraries
3178 AC_DEFUN([AC_LIBTOOL_CXX],
3179 [AC_REQUIRE([_LT_AC_LANG_CXX])
3185 AC_DEFUN([_LT_AC_LANG_CXX],
3186 [AC_REQUIRE([AC_PROG_CXX])
3187 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3188 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3191 # _LT_AC_PROG_CXXCPP
3192 # ------------------
3193 AC_DEFUN([_LT_AC_PROG_CXXCPP],
3195 AC_REQUIRE([AC_PROG_CXX])
3196 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3197 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3198 (test "X$CXX" != "Xg++"))) ; then
3201 ])# _LT_AC_PROG_CXXCPP
3205 # enable support for Fortran 77 libraries
3206 AC_DEFUN([AC_LIBTOOL_F77],
3207 [AC_REQUIRE([_LT_AC_LANG_F77])
3213 AC_DEFUN([_LT_AC_LANG_F77],
3214 [AC_REQUIRE([AC_PROG_F77])
3215 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3221 # enable support for GCJ libraries
3222 AC_DEFUN([AC_LIBTOOL_GCJ],
3223 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3229 AC_DEFUN([_LT_AC_LANG_GCJ],
3230 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3231 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3232 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3233 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3234 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3235 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3236 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3242 # enable support for Windows resource files
3243 AC_DEFUN([AC_LIBTOOL_RC],
3244 [AC_REQUIRE([LT_AC_PROG_RC])
3245 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3249 # AC_LIBTOOL_LANG_C_CONFIG
3250 # ------------------------
3251 # Ensure that the configuration vars for the C compiler are
3252 # suitably defined. Those variables are subsequently used by
3253 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3254 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3255 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3259 # Source file extension for C test sources.
3262 # Object file extension for compiled C test sources.
3264 _LT_AC_TAGVAR(objext, $1)=$objext
3266 # Code to be used in simple compile tests
3267 lt_simple_compile_test_code="int some_variable = 0;\n"
3269 # Code to be used in simple link tests
3270 lt_simple_link_test_code='int main(){return(0);}\n'
3274 # save warnings/boilerplate of simple test code
3275 _LT_COMPILER_BOILERPLATE
3276 _LT_LINKER_BOILERPLATE
3279 ## There is no encapsulation within the following macros, do not change
3280 ## the running order or otherwise move them around unless you know exactly
3281 ## what you are doing...
3282 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3283 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3284 AC_LIBTOOL_PROG_CC_C_O($1)
3285 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3286 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3287 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3288 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3289 AC_LIBTOOL_SYS_LIB_STRIP
3290 AC_LIBTOOL_DLOPEN_SELF
3292 # Report which library types will actually be built
3293 AC_MSG_CHECKING([if libtool supports shared libraries])
3294 AC_MSG_RESULT([$can_build_shared])
3296 AC_MSG_CHECKING([whether to build shared libraries])
3297 test "$can_build_shared" = "no" && enable_shared=no
3299 # On AIX, shared libraries and static libraries use the same namespace, and
3300 # are all built from PIC.
3303 test "$enable_shared" = yes && enable_static=no
3304 if test -n "$RANLIB"; then
3305 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3306 postinstall_cmds='$RANLIB $lib'
3311 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3312 test "$enable_shared" = yes && enable_static=no
3316 AC_MSG_RESULT([$enable_shared])
3318 AC_MSG_CHECKING([whether to build static libraries])
3319 # Make sure either enable_shared or enable_static is yes.
3320 test "$enable_shared" = yes || enable_static=yes
3321 AC_MSG_RESULT([$enable_static])
3323 AC_LIBTOOL_CONFIG($1)
3327 ])# AC_LIBTOOL_LANG_C_CONFIG
3330 # AC_LIBTOOL_LANG_CXX_CONFIG
3331 # --------------------------
3332 # Ensure that the configuration vars for the C compiler are
3333 # suitably defined. Those variables are subsequently used by
3334 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3335 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3336 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3338 AC_REQUIRE([AC_PROG_CXX])
3339 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3341 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3342 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3343 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3344 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3345 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3346 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3347 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3348 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3349 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3350 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3351 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3352 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3353 _LT_AC_TAGVAR(module_cmds, $1)=
3354 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3355 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3356 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3357 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3358 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3359 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3361 # Dependencies to place before and after the object being linked:
3362 _LT_AC_TAGVAR(predep_objects, $1)=
3363 _LT_AC_TAGVAR(postdep_objects, $1)=
3364 _LT_AC_TAGVAR(predeps, $1)=
3365 _LT_AC_TAGVAR(postdeps, $1)=
3366 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3368 # Source file extension for C++ test sources.
3371 # Object file extension for compiled C++ test sources.
3373 _LT_AC_TAGVAR(objext, $1)=$objext
3375 # Code to be used in simple compile tests
3376 lt_simple_compile_test_code="int some_variable = 0;\n"
3378 # Code to be used in simple link tests
3379 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
3381 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3384 # save warnings/boilerplate of simple test code
3385 _LT_COMPILER_BOILERPLATE
3386 _LT_LINKER_BOILERPLATE
3388 # Allow CC to be a program name with arguments.
3393 lt_save_with_gnu_ld=$with_gnu_ld
3394 lt_save_path_LD=$lt_cv_path_LD
3395 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3396 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3398 $as_unset lt_cv_prog_gnu_ld
3400 if test -n "${lt_cv_path_LDCXX+set}"; then
3401 lt_cv_path_LD=$lt_cv_path_LDCXX
3403 $as_unset lt_cv_path_LD
3405 test -z "${LDCXX+set}" || LD=$LDCXX
3408 _LT_AC_TAGVAR(compiler, $1)=$CC
3409 _LT_CC_BASENAME([$compiler])
3411 # We don't want -fno-exception wen compiling C++ code, so set the
3412 # no_builtin_flag separately
3413 if test "$GXX" = yes; then
3414 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3416 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3419 if test "$GXX" = yes; then
3420 # Set up default GNU C++ configuration
3424 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3425 # archiving commands below assume that GNU ld is being used.
3426 if test "$with_gnu_ld" = yes; then
3427 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3428 _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'
3430 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3431 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3433 # If archive_cmds runs LD, not CC, wlarc should be empty
3434 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3435 # investigate it a little bit more. (MM)
3438 # ancient GNU ld didn't support --whole-archive et. al.
3439 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3440 grep 'no-whole-archive' > /dev/null; then
3441 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3443 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3449 # A generic and very simple default shared library creation
3450 # command for GNU C++ for the case where it uses the native
3451 # linker, instead of GNU ld. If possible, this setting should
3452 # overridden to take advantage of the native linker features on
3453 # the platform it is being used on.
3454 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3457 # Commands to make compiler produce verbose output that lists
3458 # what "hidden" libraries, object files and flags are used when
3459 # linking a shared library.
3460 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3468 # PORTME: fill in a description of your system's C++ link characteristics
3469 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3470 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3473 # FIXME: insert proper C++ library support
3474 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3477 if test "$host_cpu" = ia64; then
3478 # On IA64, the linker does run time linking by default, so we don't
3479 # have to do anything special.
3480 aix_use_runtimelinking=no
3481 exp_sym_flag='-Bexport'
3484 aix_use_runtimelinking=no
3486 # Test if we are trying to use run time linking or normal
3487 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3488 # need to do runtime linking.
3489 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3490 for ld_flag in $LDFLAGS; do
3493 aix_use_runtimelinking=yes
3501 exp_sym_flag='-bexport'
3502 no_entry_flag='-bnoentry'
3505 # When large executables or shared objects are built, AIX ld can
3506 # have problems creating the table of contents. If linking a library
3507 # or program results in "error TOC overflow" add -mminimal-toc to
3508 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3509 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3511 _LT_AC_TAGVAR(archive_cmds, $1)=''
3512 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3513 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3514 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3516 if test "$GXX" = yes; then
3517 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3518 # We only want to do this on AIX 4.2 and lower, the check
3519 # below for broken collect2 doesn't work under 4.3+
3520 collect2name=`${CC} -print-prog-name=collect2`
3521 if test -f "$collect2name" && \
3522 strings "$collect2name" | grep resolve_lib_name >/dev/null
3524 # We have reworked collect2
3525 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3527 # We have old collect2
3528 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3529 # It fails to find uninstalled libraries when the uninstalled
3530 # path is not listed in the libpath. Setting hardcode_minus_L
3531 # to unsupported forces relinking
3532 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3533 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3534 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3538 shared_flag='-shared'
3539 if test "$aix_use_runtimelinking" = yes; then
3540 shared_flag="$shared_flag "'${wl}-G'
3544 if test "$host_cpu" = ia64; then
3545 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3546 # chokes on -Wl,-G. The following line is correct:
3549 if test "$aix_use_runtimelinking" = yes; then
3550 shared_flag='${wl}-G'
3552 shared_flag='${wl}-bM:SRE'
3557 # It seems that -bexpall does not export symbols beginning with
3558 # underscore (_), so it is better to generate a list of symbols to export.
3559 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3560 if test "$aix_use_runtimelinking" = yes; then
3561 # Warning - without using the other runtime loading flags (-brtl),
3562 # -berok will link without error, but may produce a broken library.
3563 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3564 # Determine the default libpath from the value encoded in an empty executable.
3565 _LT_AC_SYS_LIBPATH_AIX
3566 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3568 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3570 if test "$host_cpu" = ia64; then
3571 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3572 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3573 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3575 # Determine the default libpath from the value encoded in an empty executable.
3576 _LT_AC_SYS_LIBPATH_AIX
3577 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3578 # Warning - without using the other run time loading flags,
3579 # -berok will link without error, but may produce a broken library.
3580 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3581 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3582 # Exported symbols can be pulled into shared objects from archives
3583 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3584 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3585 # This is similar to how AIX traditionally builds its shared libraries.
3586 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3592 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3593 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3594 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3595 # support --undefined. This deserves some investigation. FIXME
3596 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3598 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3603 case $cc_basename in
3605 # FIXME: insert proper C++ library support
3606 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3611 cygwin* | mingw* | pw32*)
3612 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3613 # as there is no search path for DLLs.
3614 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3615 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3616 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3617 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3619 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3620 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3621 # If the export-symbols file already is a .def file (1st line
3622 # is EXPORTS), use it as is; otherwise, prepend...
3623 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3624 cp $export_symbols $output_objdir/$soname.def;
3626 echo EXPORTS > $output_objdir/$soname.def;
3627 cat $export_symbols >> $output_objdir/$soname.def;
3629 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3631 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3634 darwin* | rhapsody*)
3636 rhapsody* | darwin1.[[012]])
3637 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3640 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3641 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3643 case ${MACOSX_DEPLOYMENT_TARGET} in
3645 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3648 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3654 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3655 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3656 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3657 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3658 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3659 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3661 if test "$GXX" = yes ; then
3662 lt_int_apple_cc_single_mod=no
3663 output_verbose_link_cmd='echo'
3664 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3665 lt_int_apple_cc_single_mod=yes
3667 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3668 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3670 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3672 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3673 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3674 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3675 _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}'
3677 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3679 _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}'
3681 case $cc_basename in
3683 output_verbose_link_cmd='echo'
3684 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3685 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3686 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3687 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3688 _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}'
3691 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3698 case $cc_basename in
3700 # FIXME: insert proper C++ library support
3701 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3704 # Green Hills C++ Compiler
3705 # FIXME: insert proper C++ library support
3706 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3709 # FIXME: insert proper C++ library support
3710 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3715 # C++ shared libraries reported to be fairly broken before switch to ELF
3716 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3719 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3721 freebsd* | kfreebsd*-gnu | dragonfly*)
3722 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3724 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3729 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3730 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3731 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3732 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3733 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3734 # but as the default
3735 # location of the library.
3737 case $cc_basename in
3739 # FIXME: insert proper C++ library support
3740 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3743 _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'
3744 # Commands to make compiler produce verbose output that lists
3745 # what "hidden" libraries, object files and flags are used when
3746 # linking a shared library.
3748 # There doesn't appear to be a way to prevent this compiler from
3749 # explicitly linking system object files so we need to strip them
3750 # from the output so that they don't get included in the library
3752 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'
3755 if test "$GXX" = yes; then
3756 _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'
3758 # FIXME: insert proper C++ library support
3759 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3765 if test $with_gnu_ld = no; then
3766 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3767 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3771 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3774 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3780 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3781 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3784 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3785 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3786 # but as the default
3787 # location of the library.
3791 case $cc_basename in
3793 # FIXME: insert proper C++ library support
3794 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3799 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3802 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3805 _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'
3808 # Commands to make compiler produce verbose output that lists
3809 # what "hidden" libraries, object files and flags are used when
3810 # linking a shared library.
3812 # There doesn't appear to be a way to prevent this compiler from
3813 # explicitly linking system object files so we need to strip them
3814 # from the output so that they don't get included in the library
3816 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'
3819 if test "$GXX" = yes; then
3820 if test $with_gnu_ld = no; then
3823 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3826 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3829 _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'
3834 # FIXME: insert proper C++ library support
3835 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3841 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3842 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3843 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3844 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3845 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3846 # Instead, shared libraries are loaded at an image base (0x10000000 by
3847 # default) and relocated if they conflict, which is a slow very memory
3848 # consuming and fragmenting process. To avoid this, we pick a random,
3849 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3850 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3851 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3852 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3855 case $cc_basename in
3858 _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 ${output_objdir}/so_locations -o $lib'
3860 # Archives containing C++ object files must be created using
3861 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3862 # necessary to make sure instantiated templates are included
3864 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3867 if test "$GXX" = yes; then
3868 if test "$with_gnu_ld" = no; then
3869 _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}${output_objdir}/so_locations -o $lib'
3871 _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'
3874 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3877 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3878 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3881 case $cc_basename in
3883 # Kuck and Associates, Inc. (KAI) C++ Compiler
3885 # KCC will only create a shared library if the output file
3886 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3887 # to its proper name (with version) after linking.
3888 _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'
3889 _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'
3890 # Commands to make compiler produce verbose output that lists
3891 # what "hidden" libraries, object files and flags are used when
3892 # linking a shared library.
3894 # There doesn't appear to be a way to prevent this compiler from
3895 # explicitly linking system object files so we need to strip them
3896 # from the output so that they don't get included in the library
3898 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'
3900 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3901 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3903 # Archives containing C++ object files must be created using
3904 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3905 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3910 # version 8.0 and above of icpc choke on multiply defined symbols
3911 # if we add $predep_objects and $postdep_objects, however 7.1 and
3912 # earlier do not add the objects themselves.
3913 case `$CC -V 2>&1` in
3915 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3916 _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'
3918 *) # Version 8.0 or newer
3921 ia64*) tmp_idyn=' -i_dynamic';;
3923 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3924 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3927 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3928 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3929 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3930 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3933 # Portland Group C++ compiler
3934 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3935 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3937 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3938 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3939 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3943 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3944 _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'
3946 runpath_var=LD_RUN_PATH
3947 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3948 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3950 # Commands to make compiler produce verbose output that lists
3951 # what "hidden" libraries, object files and flags are used when
3952 # linking a shared library.
3954 # There doesn't appear to be a way to prevent this compiler from
3955 # explicitly linking system object files so we need to strip them
3956 # from the output so that they don't get included in the library
3958 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'
3963 # FIXME: insert proper C++ library support
3964 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3967 # FIXME: insert proper C++ library support
3968 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3971 case $cc_basename in
3973 # FIXME: insert proper C++ library support
3974 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3977 # FIXME: insert proper C++ library support
3978 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3983 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3984 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3986 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3987 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3988 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3990 # Workaround some broken pre-1.5 toolchains
3991 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3994 # C++ shared libraries are fairly broken
3995 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3998 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3999 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4000 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4001 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4002 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4003 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4004 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4005 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4007 output_verbose_link_cmd='echo'
4010 case $cc_basename in
4012 # Kuck and Associates, Inc. (KAI) C++ Compiler
4014 # KCC will only create a shared library if the output file
4015 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4016 # to its proper name (with version) after linking.
4017 _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'
4019 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4020 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4022 # Archives containing C++ object files must be created using
4023 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4024 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4028 # Rational C++ 2.4.1
4029 # FIXME: insert proper C++ library support
4030 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4033 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4034 _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 ${output_objdir}/so_locations -o $lib'
4036 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4037 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4039 # Commands to make compiler produce verbose output that lists
4040 # what "hidden" libraries, object files and flags are used when
4041 # linking a shared library.
4043 # There doesn't appear to be a way to prevent this compiler from
4044 # explicitly linking system object files so we need to strip them
4045 # from the output so that they don't get included in the library
4047 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'
4050 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4051 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4052 _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}${output_objdir}/so_locations -o $lib'
4054 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4055 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4057 # Commands to make compiler produce verbose output that lists
4058 # what "hidden" libraries, object files and flags are used when
4059 # linking a shared library.
4060 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4063 # FIXME: insert proper C++ library support
4064 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4070 case $cc_basename in
4072 # Kuck and Associates, Inc. (KAI) C++ Compiler
4074 # KCC will only create a shared library if the output file
4075 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4076 # to its proper name (with version) after linking.
4077 _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'
4079 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4080 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4082 # Archives containing C++ object files must be created using
4083 # the KAI C++ compiler.
4084 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4087 # Rational C++ 2.4.1
4088 # FIXME: insert proper C++ library support
4089 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4092 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4093 _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 ${output_objdir}/so_locations -o $lib'
4094 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4095 echo "-hidden">> $lib.exp~
4096 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
4099 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4100 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4102 # Commands to make compiler produce verbose output that lists
4103 # what "hidden" libraries, object files and flags are used when
4104 # linking a shared library.
4106 # There doesn't appear to be a way to prevent this compiler from
4107 # explicitly linking system object files so we need to strip them
4108 # from the output so that they don't get included in the library
4110 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'
4113 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4114 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4115 _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}${output_objdir}/so_locations -o $lib'
4117 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4118 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4120 # Commands to make compiler produce verbose output that lists
4121 # what "hidden" libraries, object files and flags are used when
4122 # linking a shared library.
4123 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4126 # FIXME: insert proper C++ library support
4127 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4133 # FIXME: insert proper C++ library support
4134 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4137 case $cc_basename in
4140 # FIXME: insert proper C++ library support
4141 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4145 # FIXME: insert proper C++ library support
4146 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4149 # FIXME: insert proper C++ library support
4150 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4155 case $cc_basename in
4157 # Sun C++ 4.2, 5.x and Centerline C++
4158 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4159 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4160 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4161 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4162 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4164 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4165 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4167 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4169 # The C++ compiler is used as linker so we must use $wl
4170 # flag to pass the commands to the underlying system
4171 # linker. We must also pass each convience library through
4172 # to the system linker between allextract/defaultextract.
4173 # The C++ compiler will combine linker options so we
4174 # cannot just pass the convience library names through
4176 # Supported since Solaris 2.6 (maybe 2.5.1?)
4177 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4180 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4182 output_verbose_link_cmd='echo'
4184 # Archives containing C++ object files must be created using
4185 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4186 # necessary to make sure instantiated templates are included
4188 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4191 # Green Hills C++ Compiler
4192 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4194 # The C++ compiler must be used to create the archive.
4195 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4198 # GNU C++ compiler with Solaris linker
4199 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4200 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4201 if $CC --version | grep -v '^2\.7' > /dev/null; then
4202 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4203 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4204 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4206 # Commands to make compiler produce verbose output that lists
4207 # what "hidden" libraries, object files and flags are used when
4208 # linking a shared library.
4209 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4211 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4213 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4214 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4215 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4217 # Commands to make compiler produce verbose output that lists
4218 # what "hidden" libraries, object files and flags are used when
4219 # linking a shared library.
4220 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4223 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4228 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4229 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4230 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4231 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4232 runpath_var='LD_RUN_PATH'
4234 case $cc_basename in
4236 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4237 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4240 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4241 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4245 sysv5* | sco3.2v5* | sco5v6*)
4246 # Note: We can NOT use -z defs as we might desire, because we do not
4247 # link with -lc, and that would cause any symbols used from libc to
4248 # always be unresolved, which means just about no library would
4249 # ever link correctly. If we're not using GNU ld we use -z text
4250 # though, which does catch some bad symbols but isn't as heavy-handed
4252 # For security reasons, it is highly recommended that you always
4253 # use absolute paths for naming shared libraries, and exclude the
4254 # DT_RUNPATH tag from executables and libraries. But doing so
4255 # requires that you compile everything twice, which is a pain.
4256 # So that behaviour is only enabled if SCOABSPATH is set to a
4257 # non-empty value in the environment. Most likely only useful for
4258 # creating official distributions of packages.
4259 # This is a hack until libtool officially supports absolute path
4260 # names for shared libraries.
4261 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4262 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4263 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4264 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4265 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4266 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4267 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4268 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4269 runpath_var='LD_RUN_PATH'
4271 case $cc_basename in
4273 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4274 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4277 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4278 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4283 case $cc_basename in
4285 # NonStop-UX NCC 3.20
4286 # FIXME: insert proper C++ library support
4287 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4290 # FIXME: insert proper C++ library support
4291 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4296 # FIXME: insert proper C++ library support
4297 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4300 # FIXME: insert proper C++ library support
4301 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4304 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4305 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4307 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4308 _LT_AC_TAGVAR(LD, $1)="$LD"
4311 ## There is no encapsulation within the following macros, do not change
4312 ## the running order or otherwise move them around unless you know exactly
4313 ## what you are doing...
4314 AC_LIBTOOL_POSTDEP_PREDEP($1)
4315 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4316 AC_LIBTOOL_PROG_CC_C_O($1)
4317 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4318 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4319 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4320 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4322 AC_LIBTOOL_CONFIG($1)
4329 with_gnu_ldcxx=$with_gnu_ld
4330 with_gnu_ld=$lt_save_with_gnu_ld
4331 lt_cv_path_LDCXX=$lt_cv_path_LD
4332 lt_cv_path_LD=$lt_save_path_LD
4333 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4334 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4335 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4337 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4338 # ------------------------------------
4339 # Figure out "hidden" library dependencies from verbose
4340 # compiler output when linking a shared library.
4341 # Parse the compiler output and extract the necessary
4342 # objects, libraries and library flags.
4343 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4344 dnl we can't use the lt_simple_compile_test_code here,
4345 dnl because it contains code intended for an executable,
4346 dnl not a library. It's possible we should let each
4347 dnl tag define a new lt_????_link_test_code variable,
4348 dnl but it's only used here...
4349 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4351 void foo (void) { a = 0; }
4353 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4357 Foo (void) { a = 0; }
4362 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4370 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4373 public void bar (void) {
4379 dnl Parse the compiler output and extract the necessary
4380 dnl objects, libraries and library flags.
4381 if AC_TRY_EVAL(ac_compile); then
4382 # Parse the compiler output and extract the necessary
4383 # objects, libraries and library flags.
4385 # Sentinel used to keep track of whether or not we are before
4386 # the conftest object file.
4387 pre_test_object_deps_done=no
4389 # The `*' in the case matches for architectures that use `case' in
4390 # $output_verbose_cmd can trigger glob expansion during the loop
4391 # eval without this substitution.
4392 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4394 for p in `eval $output_verbose_link_cmd`; do
4398 # Some compilers place space between "-{L,R}" and the path.
4401 || test $p = "-R"; then
4408 if test "$pre_test_object_deps_done" = no; then
4411 # Internal compiler library paths should come after those
4412 # provided the user. The postdeps already come after the
4413 # user supplied libs so there is no need to process them.
4414 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4415 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4417 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4420 # The "-l" case would never come before the object being
4421 # linked, so don't bother handling this case.
4424 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4425 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4427 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4433 # This assumes that the test object file only shows up
4434 # once in the compiler output.
4435 if test "$p" = "conftest.$objext"; then
4436 pre_test_object_deps_done=yes
4440 if test "$pre_test_object_deps_done" = no; then
4441 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4442 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4444 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4447 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4448 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4450 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4455 *) ;; # Ignore the rest.
4463 echo "libtool.m4: error: problem compiling $1 test program"
4466 $rm -f confest.$objext
4468 # PORTME: override above test on systems where it is broken
4472 # Interix 3.5 installs completely hosed .la files for C++, so rather than
4473 # hack all around it, let's just trust "g++" to DTRT.
4474 _LT_AC_TAGVAR(predep_objects,$1)=
4475 _LT_AC_TAGVAR(postdep_objects,$1)=
4476 _LT_AC_TAGVAR(postdeps,$1)=
4480 case $cc_basename in
4482 # Adding this requires a known-good setup of shared libraries for
4483 # Sun compiler versions before 5.6, else PIC objects from an old
4484 # archive will be linked into the output, leading to subtle bugs.
4485 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4492 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4493 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4495 ])# AC_LIBTOOL_POSTDEP_PREDEP
4497 # AC_LIBTOOL_LANG_F77_CONFIG
4498 # --------------------------
4499 # Ensure that the configuration vars for the C compiler are
4500 # suitably defined. Those variables are subsequently used by
4501 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4502 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4503 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4504 [AC_REQUIRE([AC_PROG_F77])
4505 AC_LANG_PUSH(Fortran 77)
4507 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4508 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4509 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4510 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4511 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4512 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4513 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4514 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4515 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4516 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4517 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4518 _LT_AC_TAGVAR(module_cmds, $1)=
4519 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4520 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4521 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4522 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4523 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4524 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4526 # Source file extension for f77 test sources.
4529 # Object file extension for compiled f77 test sources.
4531 _LT_AC_TAGVAR(objext, $1)=$objext
4533 # Code to be used in simple compile tests
4534 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4536 # Code to be used in simple link tests
4537 lt_simple_link_test_code=" program t\n end\n"
4539 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4542 # save warnings/boilerplate of simple test code
4543 _LT_COMPILER_BOILERPLATE
4544 _LT_LINKER_BOILERPLATE
4546 # Allow CC to be a program name with arguments.
4550 _LT_AC_TAGVAR(compiler, $1)=$CC
4551 _LT_CC_BASENAME([$compiler])
4553 AC_MSG_CHECKING([if libtool supports shared libraries])
4554 AC_MSG_RESULT([$can_build_shared])
4556 AC_MSG_CHECKING([whether to build shared libraries])
4557 test "$can_build_shared" = "no" && enable_shared=no
4559 # On AIX, shared libraries and static libraries use the same namespace, and
4560 # are all built from PIC.
4563 test "$enable_shared" = yes && enable_static=no
4564 if test -n "$RANLIB"; then
4565 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4566 postinstall_cmds='$RANLIB $lib'
4570 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4571 test "$enable_shared" = yes && enable_static=no
4575 AC_MSG_RESULT([$enable_shared])
4577 AC_MSG_CHECKING([whether to build static libraries])
4578 # Make sure either enable_shared or enable_static is yes.
4579 test "$enable_shared" = yes || enable_static=yes
4580 AC_MSG_RESULT([$enable_static])
4582 _LT_AC_TAGVAR(GCC, $1)="$G77"
4583 _LT_AC_TAGVAR(LD, $1)="$LD"
4585 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4586 AC_LIBTOOL_PROG_CC_C_O($1)
4587 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4588 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4589 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4590 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4592 AC_LIBTOOL_CONFIG($1)
4596 ])# AC_LIBTOOL_LANG_F77_CONFIG
4599 # AC_LIBTOOL_LANG_GCJ_CONFIG
4600 # --------------------------
4601 # Ensure that the configuration vars for the C compiler are
4602 # suitably defined. Those variables are subsequently used by
4603 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4604 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4605 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4608 # Source file extension for Java test sources.
4611 # Object file extension for compiled Java test sources.
4613 _LT_AC_TAGVAR(objext, $1)=$objext
4615 # Code to be used in simple compile tests
4616 lt_simple_compile_test_code="class foo {}\n"
4618 # Code to be used in simple link tests
4619 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4621 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4624 # save warnings/boilerplate of simple test code
4625 _LT_COMPILER_BOILERPLATE
4626 _LT_LINKER_BOILERPLATE
4628 # Allow CC to be a program name with arguments.
4632 _LT_AC_TAGVAR(compiler, $1)=$CC
4633 _LT_CC_BASENAME([$compiler])
4635 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4636 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4638 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4641 ## There is no encapsulation within the following macros, do not change
4642 ## the running order or otherwise move them around unless you know exactly
4643 ## what you are doing...
4644 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4645 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4646 AC_LIBTOOL_PROG_CC_C_O($1)
4647 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4648 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4649 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4650 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4652 AC_LIBTOOL_CONFIG($1)
4656 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4659 # AC_LIBTOOL_LANG_RC_CONFIG
4660 # -------------------------
4661 # Ensure that the configuration vars for the Windows resource compiler are
4662 # suitably defined. Those variables are subsequently used by
4663 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4664 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4665 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4668 # Source file extension for RC test sources.
4671 # Object file extension for compiled RC test sources.
4673 _LT_AC_TAGVAR(objext, $1)=$objext
4675 # Code to be used in simple compile tests
4676 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4678 # Code to be used in simple link tests
4679 lt_simple_link_test_code="$lt_simple_compile_test_code"
4681 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4684 # save warnings/boilerplate of simple test code
4685 _LT_COMPILER_BOILERPLATE
4686 _LT_LINKER_BOILERPLATE
4688 # Allow CC to be a program name with arguments.
4692 _LT_AC_TAGVAR(compiler, $1)=$CC
4693 _LT_CC_BASENAME([$compiler])
4694 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4696 AC_LIBTOOL_CONFIG($1)
4700 ])# AC_LIBTOOL_LANG_RC_CONFIG
4703 # AC_LIBTOOL_CONFIG([TAGNAME])
4704 # ----------------------------
4705 # If TAGNAME is not passed, then create an initial libtool script
4706 # with a default configuration from the untagged config vars. Otherwise
4707 # add code to config.status for appending the configuration named by
4708 # TAGNAME from the matching tagged config vars.
4709 AC_DEFUN([AC_LIBTOOL_CONFIG],
4710 [# The else clause should only fire when bootstrapping the
4711 # libtool distribution, otherwise you forgot to ship ltmain.sh
4712 # with your package, and you will get complaints that there are
4713 # no rules to generate ltmain.sh.
4714 if test -f "$ltmain"; then
4715 # See if we are running on zsh, and set the options which allow our commands through
4716 # without removal of \ escapes.
4717 if test -n "${ZSH_VERSION+set}" ; then
4718 setopt NO_GLOB_SUBST
4720 # Now quote all the things that may contain metacharacters while being
4721 # careful not to overquote the AC_SUBSTed values. We take copies of the
4722 # variables and quote the copies for generation of the libtool script.
4723 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4725 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4726 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4727 deplibs_check_method reload_flag reload_cmds need_locks \
4728 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4729 lt_cv_sys_global_symbol_to_c_name_address \
4730 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4731 old_postinstall_cmds old_postuninstall_cmds \
4732 _LT_AC_TAGVAR(compiler, $1) \
4733 _LT_AC_TAGVAR(CC, $1) \
4734 _LT_AC_TAGVAR(LD, $1) \
4735 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4736 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4737 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4738 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4739 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4740 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4741 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4742 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4743 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4744 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4745 _LT_AC_TAGVAR(predep_objects, $1) \
4746 _LT_AC_TAGVAR(postdep_objects, $1) \
4747 _LT_AC_TAGVAR(predeps, $1) \
4748 _LT_AC_TAGVAR(postdeps, $1) \
4749 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4750 _LT_AC_TAGVAR(archive_cmds, $1) \
4751 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4752 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4753 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4754 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4755 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4756 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4757 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4758 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4759 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4760 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4761 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4762 _LT_AC_TAGVAR(module_cmds, $1) \
4763 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4764 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4765 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4766 _LT_AC_TAGVAR(include_expsyms, $1); do
4769 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4770 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4771 _LT_AC_TAGVAR(archive_cmds, $1) | \
4772 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4773 _LT_AC_TAGVAR(module_cmds, $1) | \
4774 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4775 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4776 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4777 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4778 postinstall_cmds | postuninstall_cmds | \
4779 old_postinstall_cmds | old_postuninstall_cmds | \
4780 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4781 # Double-quote double-evaled strings.
4782 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4785 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4791 *'\[$]0 --fallback-echo"')
4792 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4797 [cfgfile="${ofile}T"
4798 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4800 AC_MSG_NOTICE([creating $ofile])],
4803 cat <<__EOF__ >> "$cfgfile"
4807 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4808 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4809 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4811 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4812 # Free Software Foundation, Inc.
4814 # This file is part of GNU Libtool:
4815 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4817 # This program is free software; you can redistribute it and/or modify
4818 # it under the terms of the GNU General Public License as published by
4819 # the Free Software Foundation; either version 2 of the License, or
4820 # (at your option) any later version.
4822 # This program is distributed in the hope that it will be useful, but
4823 # WITHOUT ANY WARRANTY; without even the implied warranty of
4824 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4825 # General Public License for more details.
4827 # You should have received a copy of the GNU General Public License
4828 # along with this program; if not, write to the Free Software
4829 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4831 # As a special exception to the GNU General Public License, if you
4832 # distribute this file as part of a program that contains a
4833 # configuration script generated by Autoconf, you may include it under
4834 # the same distribution terms that you use for the rest of that program.
4836 # A sed program that does not truncate output.
4839 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4840 Xsed="$SED -e 1s/^X//"
4842 # The HP-UX ksh and POSIX shell print the target directory to stdout
4844 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4846 # The names of the tagged configurations supported by this script.
4849 # ### BEGIN LIBTOOL CONFIG],
4850 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4852 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4854 # Shell to use when invoking shell scripts.
4857 # Whether or not to build shared libraries.
4858 build_libtool_libs=$enable_shared
4860 # Whether or not to build static libraries.
4861 build_old_libs=$enable_static
4863 # Whether or not to add -lc for building shared libraries.
4864 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4866 # Whether or not to disallow shared libs when runtime libs are static
4867 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4869 # Whether or not to optimize for fast installation.
4870 fast_install=$enable_fast_install
4873 host_alias=$host_alias
4878 build_alias=$build_alias
4882 # An echo program that does not interpret backslashes.
4887 AR_FLAGS=$lt_AR_FLAGS
4892 # LTCC compiler flags.
4893 LTCFLAGS=$lt_LTCFLAGS
4895 # A language-specific compiler.
4896 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4898 # Is the compiler the GNU C compiler?
4899 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4904 # The linker used to build libraries.
4905 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4907 # Whether we need hard or soft links.
4910 # A BSD-compatible nm program.
4913 # A symbol stripping program
4916 # Used to examine libraries when file_magic_cmd begins "file"
4917 MAGIC_CMD=$MAGIC_CMD
4919 # Used on cygwin: DLL creation program.
4922 # Used on cygwin: object dumper.
4925 # Used on cygwin: assembler.
4928 # The name of the directory that contains temporary libtool files.
4931 # How to create reloadable object files.
4932 reload_flag=$lt_reload_flag
4933 reload_cmds=$lt_reload_cmds
4935 # How to pass a linker flag through the compiler.
4936 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4938 # Object file suffix (normally "o").
4941 # Old archive suffix (normally "a").
4944 # Shared library suffix (normally ".so").
4945 shrext_cmds='$shrext_cmds'
4947 # Executable file suffix (normally "").
4950 # Additional compiler flags for building library objects.
4951 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4954 # What is the maximum length of a command?
4955 max_cmd_len=$lt_cv_sys_max_cmd_len
4957 # Does compiler simultaneously support -c and -o options?
4958 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4960 # Must we lock files when doing compilation?
4961 need_locks=$lt_need_locks
4963 # Do we need the lib prefix for modules?
4964 need_lib_prefix=$need_lib_prefix
4966 # Do we need a version for libraries?
4967 need_version=$need_version
4969 # Whether dlopen is supported.
4970 dlopen_support=$enable_dlopen
4972 # Whether dlopen of programs is supported.
4973 dlopen_self=$enable_dlopen_self
4975 # Whether dlopen of statically linked programs is supported.
4976 dlopen_self_static=$enable_dlopen_self_static
4978 # Compiler flag to prevent dynamic linking.
4979 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4981 # Compiler flag to turn off builtin functions.
4982 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4984 # Compiler flag to allow reflexive dlopens.
4985 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4987 # Compiler flag to generate shared objects directly from archives.
4988 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4990 # Compiler flag to generate thread-safe objects.
4991 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4993 # Library versioning type.
4994 version_type=$version_type
4996 # Format of library name prefix.
4997 libname_spec=$lt_libname_spec
4999 # List of archive names. First name is the real one, the rest are links.
5000 # The last name is the one that the linker finds with -lNAME.
5001 library_names_spec=$lt_library_names_spec
5003 # The coded name of the library, if different from the real name.
5004 soname_spec=$lt_soname_spec
5006 # Commands used to build and install an old-style archive.
5008 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5009 old_postinstall_cmds=$lt_old_postinstall_cmds
5010 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5012 # Create an old-style archive from a shared archive.
5013 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5015 # Create a temporary old-style archive to link instead of a shared archive.
5016 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5018 # Commands used to build and install a shared archive.
5019 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5020 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5021 postinstall_cmds=$lt_postinstall_cmds
5022 postuninstall_cmds=$lt_postuninstall_cmds
5024 # Commands used to build a loadable module (assumed same as above if empty)
5025 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5026 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5028 # Commands to strip libraries.
5029 old_striplib=$lt_old_striplib
5030 striplib=$lt_striplib
5032 # Dependencies to place before the objects being linked to create a
5034 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5036 # Dependencies to place after the objects being linked to create a
5038 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5040 # Dependencies to place before the objects being linked to create a
5042 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5044 # Dependencies to place after the objects being linked to create a
5046 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5048 # The library search path used internally by the compiler when linking
5050 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5052 # Method to check whether dependent libraries are shared objects.
5053 deplibs_check_method=$lt_deplibs_check_method
5055 # Command to use when deplibs_check_method == file_magic.
5056 file_magic_cmd=$lt_file_magic_cmd
5058 # Flag that allows shared libraries with undefined symbols to be built.
5059 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5061 # Flag that forces no undefined symbols.
5062 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5064 # Commands used to finish a libtool library installation in a directory.
5065 finish_cmds=$lt_finish_cmds
5067 # Same as above, but a single script fragment to be evaled but not shown.
5068 finish_eval=$lt_finish_eval
5070 # Take the output of nm and produce a listing of raw symbols and C names.
5071 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5073 # Transform the output of nm in a proper C declaration
5074 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5076 # Transform the output of nm in a C name address pair
5077 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5079 # This is the shared library runtime path variable.
5080 runpath_var=$runpath_var
5082 # This is the shared library path variable.
5083 shlibpath_var=$shlibpath_var
5085 # Is shlibpath searched before the hard-coded library search path?
5086 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5088 # How to hardcode a shared library path into an executable.
5089 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5091 # Whether we should hardcode library paths into libraries.
5092 hardcode_into_libs=$hardcode_into_libs
5094 # Flag to hardcode \$libdir into a binary during linking.
5095 # This must work even if \$libdir does not exist.
5096 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5098 # If ld is used when linking, flag to hardcode \$libdir into
5099 # a binary during linking. This must work even if \$libdir does
5101 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5103 # Whether we need a single -rpath flag with a separated argument.
5104 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5106 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5108 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5110 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5112 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5114 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5115 # the resulting binary.
5116 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5118 # Set to yes if building a shared library automatically hardcodes DIR into the library
5119 # and all subsequent libraries and executables linked against it.
5120 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5122 # Variables whose values should be saved in libtool wrapper scripts and
5123 # restored at relink time.
5124 variables_saved_for_relink="$variables_saved_for_relink"
5126 # Whether libtool must link a program against all its dependency libraries.
5127 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5129 # Compile-time system search path for libraries
5130 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5132 # Run-time system search path for libraries
5133 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5135 # Fix the shell variable \$srcfile for the compiler.
5136 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5138 # Set to yes if exported symbols are required.
5139 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5141 # The commands to list exported symbols.
5142 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5144 # The commands to extract the exported symbol list from a shared archive.
5145 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5147 # Symbols that should not be listed in the preloaded symbols.
5148 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5150 # Symbols that must always be exported.
5151 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5154 [# ### END LIBTOOL CONFIG],
5155 [# ### END LIBTOOL TAG CONFIG: $tagname])
5162 cat <<\EOF >> "$cfgfile"
5164 # AIX sometimes has problems with the GCC collect2 program. For some
5165 # reason, if we set the COLLECT_NAMES environment variable, the problems
5166 # vanish in a puff of smoke.
5167 if test "X${COLLECT_NAMES+set}" != Xset; then
5169 export COLLECT_NAMES
5175 # We use sed instead of cat because bash on DJGPP gets confused if
5176 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5177 # text mode, it properly converts lines to CR/LF. This bash problem
5178 # is reportedly fixed, but why not run on old versions too?
5179 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5181 mv -f "$cfgfile" "$ofile" || \
5182 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5186 # If there is no Makefile yet, we rely on a make rule to execute
5187 # `config.status --recheck' to rerun these tests and create the
5188 # libtool script then.
5189 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5190 if test -f "$ltmain_in"; then
5191 test -f Makefile && make "$ltmain"
5194 ])# AC_LIBTOOL_CONFIG
5197 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5198 # -------------------------------------------
5199 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5200 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5202 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5204 if test "$GCC" = yes; then
5205 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5207 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5208 lt_cv_prog_compiler_rtti_exceptions,
5209 [-fno-rtti -fno-exceptions], [],
5210 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5212 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5215 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5216 # ---------------------------------
5217 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5218 [AC_REQUIRE([AC_CANONICAL_HOST])
5219 AC_REQUIRE([AC_PROG_NM])
5220 AC_REQUIRE([AC_OBJEXT])
5221 # Check for command to grab the raw symbol name followed by C symbol from nm.
5222 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5223 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5225 # These are sane defaults that work on at least a few old systems.
5226 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5228 # Character class describing NM global symbol codes.
5229 symcode='[[BCDEGRST]]'
5231 # Regexp to match symbols that can be accessed directly from C.
5232 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5234 # Transform an extracted symbol line into a proper C declaration
5235 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5237 # Transform an extracted symbol line into symbol name and symbol address
5238 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'"
5240 # Define system-specific variables.
5245 cygwin* | mingw* | pw32*)
5246 symcode='[[ABCDGISTW]]'
5248 hpux*) # Its linker distinguishes data from code symbols
5249 if test "$host_cpu" = ia64; then
5250 symcode='[[ABCDEGRST]]'
5252 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5253 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'"
5256 if test "$host_cpu" = ia64; then
5257 symcode='[[ABCDGIRSTW]]'
5258 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5259 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'"
5263 symcode='[[BCDEGRST]]'
5266 symcode='[[BCDEGQRST]]'
5277 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5281 symcode='[[DFNSTU]]'
5285 # Handle CRLF in mingw tool chain
5289 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5293 # If we're using GNU nm, then use its standard symbol codes.
5294 case `$NM -V 2>&1` in
5295 *GNU* | *'with BFD'*)
5296 symcode='[[ABCDGIRSTW]]' ;;
5299 # Try without a prefix undercore, then with it.
5300 for ac_symprfx in "" "_"; do
5302 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5303 symxfrm="\\1 $ac_symprfx\\2 \\2"
5305 # Write the raw and C identifiers.
5306 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5308 # Check to see that the pipe works correctly.
5312 cat > conftest.$ac_ext <<EOF
5317 void nm_test_func(){}
5321 int main(){nm_test_var='a';nm_test_func();return(0);}
5324 if AC_TRY_EVAL(ac_compile); then
5325 # Now try to grab the symbols.
5327 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5328 # Try sorting and uniquifying the output.
5329 if sort "$nlist" | uniq > "$nlist"T; then
5330 mv -f "$nlist"T "$nlist"
5335 # Make sure that we snagged all the symbols we need.
5336 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5337 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5338 cat <<EOF > conftest.$ac_ext
5344 # Now generate the symbol file.
5345 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5347 cat <<EOF >> conftest.$ac_ext
5348 #if defined (__STDC__) && __STDC__
5349 # define lt_ptr_t void *
5351 # define lt_ptr_t char *
5355 /* The mapping between symbol names and symbols. */
5360 lt_preloaded_symbols[[]] =
5363 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5364 cat <<\EOF >> conftest.$ac_ext
5372 # Now try linking the two files.
5373 mv conftest.$ac_objext conftstm.$ac_objext
5374 lt_save_LIBS="$LIBS"
5375 lt_save_CFLAGS="$CFLAGS"
5376 LIBS="conftstm.$ac_objext"
5377 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5378 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5381 LIBS="$lt_save_LIBS"
5382 CFLAGS="$lt_save_CFLAGS"
5384 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5387 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5390 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5393 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5394 cat conftest.$ac_ext >&5
5396 rm -f conftest* conftst*
5398 # Do not use the global_symbol_pipe unless it works.
5399 if test "$pipe_works" = yes; then
5402 lt_cv_sys_global_symbol_pipe=
5406 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5407 lt_cv_sys_global_symbol_to_cdecl=
5409 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5410 AC_MSG_RESULT(failed)
5414 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5417 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5418 # ---------------------------------------
5419 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5420 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5421 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5422 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5424 AC_MSG_CHECKING([for $compiler option to produce PIC])
5426 # C++ specific cases for pic, static, wl, etc.
5427 if test "$GXX" = yes; then
5428 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5429 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5433 # All AIX code is PIC.
5434 if test "$host_cpu" = ia64; then
5435 # AIX 5 now supports IA64 processor
5436 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5440 # FIXME: we need at least 68020 code to build shared libraries, but
5441 # adding the `-m68020' flag to GCC prevents building anything better,
5443 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5445 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5446 # PIC is the default for these OSes.
5448 mingw* | os2* | pw32*)
5449 # This hack is so that the source file can tell whether it is being
5450 # built for inclusion in a dll (and should export symbols for example).
5451 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5453 darwin* | rhapsody*)
5454 # PIC is the default on this platform
5455 # Common symbols not allowed in MH_DYLIB files
5456 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5459 # DJGPP does not support shared libraries at all
5460 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5463 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5464 # Instead, we relocate shared libraries at runtime.
5467 if test -d /usr/nec; then
5468 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5472 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5478 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5483 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5489 # All AIX code is PIC.
5490 if test "$host_cpu" = ia64; then
5491 # AIX 5 now supports IA64 processor
5492 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5494 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5498 case $cc_basename in
5500 # Green Hills C++ Compiler
5501 # _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"
5506 # PIC is the default on this platform
5507 # Common symbols not allowed in MH_DYLIB files
5508 case $cc_basename in
5510 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5511 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5516 case $cc_basename in
5518 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5521 # Green Hills C++ Compiler
5522 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5528 freebsd* | kfreebsd*-gnu | dragonfly*)
5529 # FreeBSD uses GNU C++
5531 hpux9* | hpux10* | hpux11*)
5532 case $cc_basename in
5534 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5535 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5536 if test "$host_cpu" != ia64; then
5537 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5541 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5542 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5548 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5557 # This is c89, which is MS Visual C++ (no shared libs)
5558 # Anyone wants to do a port?
5560 irix5* | irix6* | nonstopux*)
5561 case $cc_basename in
5563 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5564 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5565 # CC pic flag -KPIC is the default.
5572 case $cc_basename in
5575 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5576 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5580 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5581 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5582 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5585 # Portland Group C++ compiler.
5586 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5587 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5588 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5592 # Make sure the PIC flag is empty. It appears that all Alpha
5593 # Linux and Compaq Tru64 Unix objects are PIC.
5594 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5595 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5606 case $cc_basename in
5608 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5616 osf3* | osf4* | osf5*)
5617 case $cc_basename in
5619 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5622 # Rational C++ 2.4.1
5623 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5626 # Digital/Compaq C++
5627 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5628 # Make sure the PIC flag is empty. It appears that all Alpha
5629 # Linux and Compaq Tru64 Unix objects are PIC.
5630 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5631 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5640 case $cc_basename in
5642 # Sun C++ 4.2, 5.x and Centerline C++
5643 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5644 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5645 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5648 # Green Hills C++ Compiler
5649 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5656 case $cc_basename in
5659 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5660 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5664 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5671 case $cc_basename in
5673 # NonStop-UX NCC 3.20
5674 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5680 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5681 case $cc_basename in
5683 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5684 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5685 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5692 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5698 if test "$GCC" = yes; then
5699 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5700 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5704 # All AIX code is PIC.
5705 if test "$host_cpu" = ia64; then
5706 # AIX 5 now supports IA64 processor
5707 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5712 # FIXME: we need at least 68020 code to build shared libraries, but
5713 # adding the `-m68020' flag to GCC prevents building anything better,
5715 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5718 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5719 # PIC is the default for these OSes.
5722 mingw* | pw32* | os2*)
5723 # This hack is so that the source file can tell whether it is being
5724 # built for inclusion in a dll (and should export symbols for example).
5725 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5728 darwin* | rhapsody*)
5729 # PIC is the default on this platform
5730 # Common symbols not allowed in MH_DYLIB files
5731 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5735 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5736 # Instead, we relocate shared libraries at runtime.
5740 # Just because we use GCC doesn't mean we suddenly get shared libraries
5741 # on systems that don't support them.
5742 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5747 if test -d /usr/nec; then
5748 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5753 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5760 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5766 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5770 # PORTME Check for flag to pass linker flags through the system compiler.
5773 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5774 if test "$host_cpu" = ia64; then
5775 # AIX 5 now supports IA64 processor
5776 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5778 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5782 # PIC is the default on this platform
5783 # Common symbols not allowed in MH_DYLIB files
5784 case $cc_basename in
5786 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5787 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5792 mingw* | pw32* | os2*)
5793 # This hack is so that the source file can tell whether it is being
5794 # built for inclusion in a dll (and should export symbols for example).
5795 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5798 hpux9* | hpux10* | hpux11*)
5799 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5800 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5807 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5810 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5811 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5814 irix5* | irix6* | nonstopux*)
5815 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5816 # PIC (with -KPIC) is the default.
5817 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5821 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5822 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5826 case $cc_basename in
5828 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5829 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5830 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5832 pgcc* | pgf77* | pgf90* | pgf95*)
5833 # Portland Group compilers (*not* the Pentium gcc compiler,
5834 # which looks to be a dead project)
5835 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5836 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5837 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5840 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5841 # All Alpha code is PIC.
5842 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5847 osf3* | osf4* | osf5*)
5848 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5849 # All OSF/1 code is PIC.
5850 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5854 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5855 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5856 case $cc_basename in
5858 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5860 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5865 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5866 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5867 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5870 sysv4 | sysv4.2uw2* | sysv4.3*)
5871 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5872 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5873 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5877 if test -d /usr/nec ;then
5878 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5879 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5883 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5884 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5885 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5886 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5890 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5891 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5895 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5896 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5900 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5905 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5908 # Check to make sure the PIC flag actually works.
5910 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5911 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5912 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5913 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5914 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5916 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5918 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5919 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5922 # For platforms which do not support PIC, -DPIC is meaningless:
5924 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5927 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5932 # Check to make sure the static flag actually works.
5934 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5935 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5936 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5937 $lt_tmp_static_flag,
5939 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5943 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5944 # ------------------------------------
5945 # See if the linker supports building shared libraries.
5946 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5947 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5949 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5952 # If we're using GNU nm, then we don't want the "-C" option.
5953 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5954 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5955 _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'
5957 _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'
5961 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5964 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5967 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5972 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5973 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5974 _LT_AC_TAGVAR(archive_cmds, $1)=
5975 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5976 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5977 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5978 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5979 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5980 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5981 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5982 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5983 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5984 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5985 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5986 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5987 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5988 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5989 _LT_AC_TAGVAR(module_cmds, $1)=
5990 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5991 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5992 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5993 # include_expsyms should be a list of space-separated symbols to be *always*
5994 # included in the symbol list
5995 _LT_AC_TAGVAR(include_expsyms, $1)=
5996 # exclude_expsyms can be an extended regexp of symbols to exclude
5997 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5998 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5999 # as well as any symbol that contains `d'.
6000 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6001 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6002 # platforms (ab)use it in PIC code, but their linkers get confused if
6003 # the symbol is explicitly referenced. Since portable code cannot
6004 # rely on this symbol name, it's probably fine to never include it in
6005 # preloaded symbol tables.
6006 extract_expsyms_cmds=
6007 # Just being paranoid about ensuring that cc_basename is set.
6008 _LT_CC_BASENAME([$compiler])
6010 cygwin* | mingw* | pw32*)
6011 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6012 # When not using gcc, we currently assume that we are using
6013 # Microsoft Visual C++.
6014 if test "$GCC" != yes; then
6019 # we just hope/assume this is gcc and not c89 (= MSVC++)
6027 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6028 if test "$with_gnu_ld" = yes; then
6029 # If archive_cmds runs LD, not CC, wlarc should be empty
6032 # Set some defaults for GNU ld with shared library support. These
6033 # are reset later if shared libraries are not supported. Putting them
6034 # here allows them to be overridden if necessary.
6035 runpath_var=LD_RUN_PATH
6036 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6037 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6038 # ancient GNU ld didn't support --whole-archive et. al.
6039 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6040 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6042 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6044 supports_anon_versioning=no
6045 case `$LD -v 2>/dev/null` in
6046 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6047 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6048 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6049 *\ 2.11.*) ;; # other 2.11 versions
6050 *) supports_anon_versioning=yes ;;
6053 # See if GNU ld supports shared libraries.
6055 aix3* | aix4* | aix5*)
6056 # On AIX/PPC, the GNU linker is very broken
6057 if test "$host_cpu" != ia64; then
6058 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6061 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6062 *** to be unable to reliably create shared libraries on AIX.
6063 *** Therefore, libtool is disabling shared libraries support. If you
6064 *** really care for shared libraries, you may want to modify your PATH
6065 *** so that a non-GNU linker is found, and then restart.
6072 _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)'
6073 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6074 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6076 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6077 # that the semantics of dynamic libraries on AmigaOS, at least up
6078 # to version 4, is to share data among multiple programs linked
6079 # with the same dynamic library. Since this doesn't match the
6080 # behavior of shared libraries on other platforms, we can't use
6082 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6086 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6087 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6088 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6089 # support --undefined. This deserves some investigation. FIXME
6090 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6092 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6096 cygwin* | mingw* | pw32*)
6097 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6098 # as there is no search path for DLLs.
6099 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6100 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6101 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6102 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6103 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6105 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6106 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6107 # If the export-symbols file already is a .def file (1st line
6108 # is EXPORTS), use it as is; otherwise, prepend...
6109 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6110 cp $export_symbols $output_objdir/$soname.def;
6112 echo EXPORTS > $output_objdir/$soname.def;
6113 cat $export_symbols >> $output_objdir/$soname.def;
6115 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6117 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6122 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6123 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6124 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6125 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6126 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6127 # Instead, shared libraries are loaded at an image base (0x10000000 by
6128 # default) and relocated if they conflict, which is a slow very memory
6129 # consuming and fragmenting process. To avoid this, we pick a random,
6130 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6131 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6132 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6133 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6137 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6139 case $cc_basename,$host_cpu in
6140 pgcc*) # Portland Group C compiler
6141 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6142 tmp_addflag=' $pic_flag'
6144 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6145 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6146 tmp_addflag=' $pic_flag -Mnomain' ;;
6147 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6148 tmp_addflag=' -i_dynamic' ;;
6149 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6150 tmp_addflag=' -i_dynamic -nofor_main' ;;
6151 ifc* | ifort*) # Intel Fortran compiler
6152 tmp_addflag=' -nofor_main' ;;
6154 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6156 if test $supports_anon_versioning = yes; then
6157 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6158 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6159 $echo "local: *; };" >> $output_objdir/$libname.ver~
6160 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6163 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6168 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6169 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6172 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6173 _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'
6178 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6179 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6182 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6183 *** create shared libraries on Solaris systems. Therefore, libtool
6184 *** is disabling shared libraries support. We urge you to upgrade GNU
6185 *** binutils to release 2.9.1 or newer. Another option is to modify
6186 *** your PATH or compiler configuration so that the native linker is
6187 *** used, and then restart.
6190 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6191 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6192 _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'
6194 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6198 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6199 case `$LD -v 2>&1` in
6200 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6201 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6204 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6205 *** reliably create shared libraries on SCO systems. Therefore, libtool
6206 *** is disabling shared libraries support. We urge you to upgrade GNU
6207 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6208 *** your PATH or compiler configuration so that the native linker is
6209 *** used, and then restart.
6214 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6215 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6216 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6217 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6219 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6226 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6228 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6229 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6233 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6234 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6235 _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'
6237 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6242 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6244 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6245 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6246 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6249 # PORTME fill in a description of your system's linker (not GNU ld)
6252 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6253 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6254 _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'
6255 # Note: this linker hardcodes the directories in LIBPATH if there
6256 # are no directories specified by -L.
6257 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6258 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6259 # Neither direct hardcoding nor static linking is supported with a
6261 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6266 if test "$host_cpu" = ia64; then
6267 # On IA64, the linker does run time linking by default, so we don't
6268 # have to do anything special.
6269 aix_use_runtimelinking=no
6270 exp_sym_flag='-Bexport'
6273 # If we're using GNU nm, then we don't want the "-C" option.
6274 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6275 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6276 _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'
6278 _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'
6280 aix_use_runtimelinking=no
6282 # Test if we are trying to use run time linking or normal
6283 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6284 # need to do runtime linking.
6285 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6286 for ld_flag in $LDFLAGS; do
6287 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6288 aix_use_runtimelinking=yes
6295 exp_sym_flag='-bexport'
6296 no_entry_flag='-bnoentry'
6299 # When large executables or shared objects are built, AIX ld can
6300 # have problems creating the table of contents. If linking a library
6301 # or program results in "error TOC overflow" add -mminimal-toc to
6302 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6303 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6305 _LT_AC_TAGVAR(archive_cmds, $1)=''
6306 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6307 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6308 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6310 if test "$GCC" = yes; then
6311 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6312 # We only want to do this on AIX 4.2 and lower, the check
6313 # below for broken collect2 doesn't work under 4.3+
6314 collect2name=`${CC} -print-prog-name=collect2`
6315 if test -f "$collect2name" && \
6316 strings "$collect2name" | grep resolve_lib_name >/dev/null
6318 # We have reworked collect2
6319 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6321 # We have old collect2
6322 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6323 # It fails to find uninstalled libraries when the uninstalled
6324 # path is not listed in the libpath. Setting hardcode_minus_L
6325 # to unsupported forces relinking
6326 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6327 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6328 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6332 shared_flag='-shared'
6333 if test "$aix_use_runtimelinking" = yes; then
6334 shared_flag="$shared_flag "'${wl}-G'
6338 if test "$host_cpu" = ia64; then
6339 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6340 # chokes on -Wl,-G. The following line is correct:
6343 if test "$aix_use_runtimelinking" = yes; then
6344 shared_flag='${wl}-G'
6346 shared_flag='${wl}-bM:SRE'
6351 # It seems that -bexpall does not export symbols beginning with
6352 # underscore (_), so it is better to generate a list of symbols to export.
6353 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6354 if test "$aix_use_runtimelinking" = yes; then
6355 # Warning - without using the other runtime loading flags (-brtl),
6356 # -berok will link without error, but may produce a broken library.
6357 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6358 # Determine the default libpath from the value encoded in an empty executable.
6359 _LT_AC_SYS_LIBPATH_AIX
6360 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6361 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6363 if test "$host_cpu" = ia64; then
6364 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6365 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6366 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6368 # Determine the default libpath from the value encoded in an empty executable.
6369 _LT_AC_SYS_LIBPATH_AIX
6370 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6371 # Warning - without using the other run time loading flags,
6372 # -berok will link without error, but may produce a broken library.
6373 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6374 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6375 # Exported symbols can be pulled into shared objects from archives
6376 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6377 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6378 # This is similar to how AIX traditionally builds its shared libraries.
6379 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6385 _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)'
6386 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6387 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6388 # see comment about different semantics on the GNU ld section
6389 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6393 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6396 cygwin* | mingw* | pw32*)
6397 # When not using gcc, we currently assume that we are using
6398 # Microsoft Visual C++.
6399 # hardcode_libdir_flag_spec is actually meaningless, as there is
6400 # no search path for DLLs.
6401 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6402 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6403 # Tell ltmain to make .lib files, not .a files.
6405 # Tell ltmain to make .dll files, not .so files.
6407 # FIXME: Setting linknames here is a bad hack.
6408 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6409 # The linker will automatically build a .lib file if we build a DLL.
6410 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6411 # FIXME: Should let the user specify the lib program.
6412 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6413 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6414 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6417 darwin* | rhapsody*)
6419 rhapsody* | darwin1.[[012]])
6420 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6423 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6424 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6426 case ${MACOSX_DEPLOYMENT_TARGET} in
6428 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6431 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6437 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6438 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6439 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6440 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6441 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6442 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6443 if test "$GCC" = yes ; then
6444 output_verbose_link_cmd='echo'
6445 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6446 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6447 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6448 _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}'
6449 _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}'
6451 case $cc_basename in
6453 output_verbose_link_cmd='echo'
6454 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6455 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6456 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6457 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6458 _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}'
6461 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6468 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6469 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6470 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6474 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6477 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6478 # support. Future versions do this automatically, but an explicit c++rt0.o
6479 # does not break anything, and helps significantly (at the cost of a little
6482 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6483 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6484 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6485 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6488 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6490 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6491 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6492 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6493 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6496 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6497 freebsd* | kfreebsd*-gnu | dragonfly*)
6498 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6499 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6500 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6501 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6505 if test "$GCC" = yes; then
6506 _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'
6508 _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'
6510 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6511 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6512 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6514 # hardcode_minus_L: Not really in the search PATH,
6515 # but as the default location of the library.
6516 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6517 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6521 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6522 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6524 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6526 if test "$with_gnu_ld" = no; then
6527 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6528 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6530 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6531 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
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
6540 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6543 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6546 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6549 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6555 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6558 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6561 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6565 if test "$with_gnu_ld" = no; then
6566 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6567 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6571 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6572 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6573 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6576 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6577 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6579 # hardcode_minus_L: Not really in the search PATH,
6580 # but as the default location of the library.
6581 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6587 irix5* | irix6* | nonstopux*)
6588 if test "$GCC" = yes; then
6589 _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'
6591 _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'
6592 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6594 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6595 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6596 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6600 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6601 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6603 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6605 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6606 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6607 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6611 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6612 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6613 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6614 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6615 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6619 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6620 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6621 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6622 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6623 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6624 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6625 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6628 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6629 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6630 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6633 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6634 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6641 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6642 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6643 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6644 _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'
6645 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6649 if test "$GCC" = yes; then
6650 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6651 _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'
6653 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6654 _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'
6656 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6657 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6660 osf4* | osf5*) # as osf3* with the addition of -msym flag
6661 if test "$GCC" = yes; then
6662 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6663 _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'
6664 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6666 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6667 _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'
6668 _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~
6669 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6671 # Both c and cxx compiler support -rpath directly
6672 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6674 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6678 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6679 if test "$GCC" = yes; then
6681 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6682 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6683 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6686 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6687 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6688 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6690 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6691 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6693 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6695 # The compiler driver will combine linker options so we
6696 # cannot just pass the convience library names through
6697 # without $wl, iff we do not link with $LD.
6698 # Luckily, gcc supports the same syntax we need for Sun Studio.
6699 # Supported since Solaris 2.6 (maybe 2.5.1?)
6702 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6704 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6707 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6711 if test "x$host_vendor" = xsequent; then
6712 # Use $CC to link under sequent, because it throws in some extra .o
6713 # files that make .init and .fini sections work.
6714 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6716 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6718 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6719 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6720 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6721 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6725 case $host_vendor in
6727 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6728 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6731 ## LD is ld it makes a PLAMLIB
6732 ## CC just makes a GrossModule.
6733 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6734 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6735 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6738 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6739 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6742 runpath_var='LD_RUN_PATH'
6743 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6747 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6748 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6749 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6753 if test -d /usr/nec; then
6754 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6755 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6756 runpath_var=LD_RUN_PATH
6757 hardcode_runpath_var=yes
6758 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6762 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
6763 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6764 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6765 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6766 runpath_var='LD_RUN_PATH'
6768 if test "$GCC" = yes; then
6769 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6770 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6772 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6773 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6777 sysv5* | sco3.2v5* | sco5v6*)
6778 # Note: We can NOT use -z defs as we might desire, because we do not
6779 # link with -lc, and that would cause any symbols used from libc to
6780 # always be unresolved, which means just about no library would
6781 # ever link correctly. If we're not using GNU ld we use -z text
6782 # though, which does catch some bad symbols but isn't as heavy-handed
6784 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6785 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6786 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6787 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6788 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6789 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6790 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6791 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6792 runpath_var='LD_RUN_PATH'
6794 if test "$GCC" = yes; then
6795 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6796 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6798 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6799 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6804 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6805 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6806 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6810 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6815 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6816 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6819 # Do we need to explicitly link libc?
6821 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6823 # Assume -lc should be added
6824 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6826 if test "$enable_shared" = yes && test "$GCC" = yes; then
6827 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6829 # FIXME: we may have to deal with multi-command sequences.
6832 # Test whether the compiler implicitly links with -lc since on some
6833 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6834 # to ld, don't add -lc before -lgcc.
6835 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6837 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6839 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6842 libobjs=conftest.$ac_objext
6844 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6845 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6851 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6852 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6853 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6855 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6857 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6859 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6861 cat conftest.err 1>&5
6864 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6870 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6873 # _LT_AC_FILE_LTDLL_C
6874 # -------------------
6875 # Be careful that the start marker always follows a newline.
6876 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6877 # /* ltdll.c starts here */
6878 # #define WIN32_LEAN_AND_MEAN
6879 # #include <windows.h>
6880 # #undef WIN32_LEAN_AND_MEAN
6881 # #include <stdio.h>
6883 # #ifndef __CYGWIN__
6884 # # ifdef __CYGWIN32__
6885 # # define __CYGWIN__ __CYGWIN32__
6889 # #ifdef __cplusplus
6892 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6893 # #ifdef __cplusplus
6898 # #include <cygwin/cygwin_dll.h>
6899 # DECLARE_CYGWIN_DLL( DllMain );
6901 # HINSTANCE __hDllInstance_base;
6904 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6906 # __hDllInstance_base = hInst;
6909 # /* ltdll.c ends here */
6910 ])# _LT_AC_FILE_LTDLL_C
6913 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6914 # ---------------------------------
6915 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6919 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6920 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6921 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6922 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6923 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6924 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6925 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6927 # This is just to silence aclocal about the macro not being used
6928 ifelse([AC_DISABLE_FAST_INSTALL])
6930 AC_DEFUN([LT_AC_PROG_GCJ],
6931 [AC_CHECK_TOOL(GCJ, gcj, no)
6932 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6936 AC_DEFUN([LT_AC_PROG_RC],
6937 [AC_CHECK_TOOL(RC, windres, no)
6940 ############################################################
6941 # NOTE: This macro has been submitted for inclusion into #
6942 # GNU Autoconf as AC_PROG_SED. When it is available in #
6943 # a released version of Autoconf we should remove this #
6944 # macro and use it instead. #
6945 ############################################################
6948 # Check for a fully-functional sed program, that truncates
6949 # as few characters as possible. Prefer GNU sed if found.
6950 AC_DEFUN([LT_AC_PROG_SED],
6951 [AC_MSG_CHECKING([for a sed that does not truncate output])
6952 AC_CACHE_VAL(lt_cv_path_SED,
6953 [# Loop through the user's path and test for sed and gsed.
6954 # Then use that list of sed's as ones to test for truncation.
6955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6959 test -z "$as_dir" && as_dir=.
6960 for lt_ac_prog in sed gsed; do
6961 for ac_exec_ext in '' $ac_executable_extensions; do
6962 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6963 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6970 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6971 # along with /bin/sed that truncates output.
6972 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6973 test ! -f $lt_ac_sed && continue
6974 cat /dev/null > conftest.in
6976 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6977 # Check for GNU sed and select it if it is found.
6978 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6979 lt_cv_path_SED=$lt_ac_sed
6983 cat conftest.in conftest.in >conftest.tmp
6984 mv conftest.tmp conftest.in
6985 cp conftest.in conftest.nl
6987 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6988 cmp -s conftest.out conftest.nl || break
6989 # 10000 chars as input seems more than enough
6990 test $lt_ac_count -gt 10 && break
6991 lt_ac_count=`expr $lt_ac_count + 1`
6992 if test $lt_ac_count -gt $lt_ac_max; then
6993 lt_ac_max=$lt_ac_count
6994 lt_cv_path_SED=$lt_ac_sed
7000 AC_MSG_RESULT([$SED])