1 dnl local autoconf macros
2 dnl Bruno Haible 21.9.1997
3 dnl Marcus Daniels 10.4.1997
7 dnl without AC_MSG_...: with AC_MSG_... and caching:
8 dnl AC_TRY_CPP CL_CPP_CHECK
9 dnl AC_TRY_COMPILE CL_COMPILE_CHECK
10 dnl AC_TRY_LINK CL_LINK_CHECK
11 dnl AC_TRY_RUN CL_RUN_CHECK - would require cross-compiling support
13 dnl AC_TRY_CPP(INCLUDES,
14 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
15 dnl CL_CPP_CHECK(ECHO-TEXT, CACHE-ID,
17 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
18 dnl AC_TRY_xxx(INCLUDES, FUNCTION-BODY,
19 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
20 dnl CL_xxx_CHECK(ECHO-TEXT, CACHE-ID,
21 dnl INCLUDES, FUNCTION-BODY,
22 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
25 [AC_MSG_CHECKING(for $1)
27 AC_TRY_CPP([$3], $2=yes, $2=no)
30 if test [$]$2 = yes; then
31 ifelse([$4], , :, [$4])
32 ifelse([$5], , , [else
38 define(CL_COMPILE_CHECK,
39 [AC_MSG_CHECKING(for $1)
41 AC_TRY_COMPILE([$3],[$4], $2=yes, $2=no)
44 if test [$]$2 = yes; then
45 ifelse([$5], , :, [$5])
46 ifelse([$6], , , [else
53 [AC_MSG_CHECKING(for $1)
55 AC_TRY_LINK([$3],[$4], $2=yes, $2=no)
58 if test [$]$2 = yes; then
59 ifelse([$5], , :, [$5])
60 ifelse([$6], , , [else
66 dnl CL_PROTO(IDENTIFIER, ACTION-IF-NOT-FOUND, FINAL-PROTOTYPE)
68 [AC_MSG_CHECKING([for $1 declaration])
69 AC_CACHE_VAL(cl_cv_proto_[$1], [$2
71 cl_cv_proto_$1=`echo "[$]cl_cv_proto_$1" | tr -s ' ' | sed -e 's/( /(/'`
72 AC_MSG_RESULTPROTO([$]cl_cv_proto_$1)
75 dnl CL_PROTO_RET(INCLUDES, DECL, CACHE-ID, TYPE-IF-OK, TYPE-IF-FAILS)
79 ], [], $3="$4", $3="$5")
82 dnl CL_PROTO_TRY(INCLUDES, ANSI-DECL, TRAD-DECL, ACTION-IF-OK, ACTION-IF-FAILS)
86 [#if defined(__STDC__) || defined(__cplusplus)
94 dnl CL_PROTO_CONST(INCLUDES, ANSI-DECL, TRAD-DECL, CACHE-ID)
95 define(CL_PROTO_CONST,
96 [CL_PROTO_TRY([$1], [$2], [$3], $4="", $4="const")]
100 dnl performs ACTION, with AC_MSG_CHECKING and AC_MSG_RESULT being defined away.
102 [pushdef([AC_MSG_CHECKING],[:])dnl
103 pushdef([AC_CHECKING],[:])dnl
104 pushdef([AC_MSG_RESULT],[:])dnl
105 pushdef([AC_MSG_RESULTPROTO],[:])dnl
107 popdef([AC_MSG_RESULTPROTO])dnl
108 popdef([AC_MSG_RESULT])dnl
109 popdef([AC_CHECKING])dnl
110 popdef([AC_MSG_CHECKING])dnl
113 AC_DEFUN(CL_AS_UNDERSCORE,
114 [AC_BEFORE([$0], [CL_GLOBAL_CONSTRUCTORS])
115 AC_CACHE_CHECK(for underscore in external names, cl_cv_prog_as_underscore, [
116 cat > conftest.c <<EOF
117 int foo() { return 0; }
119 # look for the assembly language name in the .s file
120 AC_TRY_COMMAND(${CC-cc} -S conftest.c) >/dev/null 2>&1
121 if grep _foo conftest.s >/dev/null ; then
122 cl_cv_prog_as_underscore=yes
124 cl_cv_prog_as_underscore=no
128 if test $cl_cv_prog_as_underscore = yes; then
130 AC_DEFINE(ASM_UNDERSCORE)
134 AC_SUBST(AS_UNDERSCORE)dnl
137 AC_DEFUN(CL_PROG_RANLIB, [AC_CHECK_PROG(RANLIB, ranlib, ranlib, true)])dnl
139 AC_DEFUN(CL_PROG_INSTALL,
140 [dnl This is mostly copied from AC_PROG_INSTALL.
141 # Find a good install program. We prefer a C program (faster),
142 # so one script is as good as another. But avoid the broken or
143 # incompatible versions:
144 # SysV /etc/install, /usr/sbin/install
145 # SunOS /usr/etc/install
148 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
149 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
150 # ./install, which can be erroneously created by make from ./install.sh.
151 AC_MSG_CHECKING(for a BSD compatible install)
152 if test -z "$INSTALL"; then
153 AC_CACHE_VAL(cl_cv_path_install,
154 [ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
155 for ac_dir in $PATH; do
156 # Account for people who put trailing slashes in PATH elements.
158 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
160 # OSF1 and SCO ODT 3.0 have their own names for install.
161 for ac_prog in ginstall installbsd scoinst install; do
162 if test -f $ac_dir/$ac_prog; then
163 if test $ac_prog = install &&
164 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
165 # AIX install. It has an incompatible calling convention.
166 # OSF/1 installbsd also uses dspmsg, but is usable.
169 if test $ac_prog = installbsd &&
170 grep src/bos $ac_dir/$ac_prog >/dev/null 2>&1; then
171 # AIX installbsd doesn't work without option "-g".
174 cl_cv_path_install="$ac_dir/$ac_prog -c"
184 # As a last resort, use cp.
185 test -z "$cl_cv_path_install" && cl_cv_path_install="cp"
187 INSTALL="$cl_cv_path_install"
189 dnl We do special magic for INSTALL instead of AC_SUBST, to get
190 dnl relative paths right.
191 AC_MSG_RESULT($INSTALL)
193 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
194 # It thinks the first close brace ends the variable substitution.
195 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='$(INSTALL)'
196 AC_SUBST(INSTALL_PROGRAM)dnl
197 if test -z "$INSTALL_DATA"; then
199 cp | */cp ) INSTALL_DATA='$(INSTALL)' ;;
200 * ) INSTALL_DATA='$(INSTALL) -m 644' ;;
203 AC_SUBST(INSTALL_DATA)dnl
206 AC_DEFUN(CL_CANONICAL_HOST,
207 [AC_REQUIRE([AC_PROG_CC]) dnl Actually: AC_REQUIRE([CL_CC_WORKS])
208 dnl Set ac_aux_dir before the cache check, because AM_PROG_LIBTOOL needs it.
209 ac_aux_dir=${srcdir}/$1
210 AC_CACHE_CHECK(host system type, cl_cv_host, [
211 dnl A substitute for AC_CONFIG_AUX_DIR_DEFAULT, so we don't need install.sh.
212 ac_config_guess=$ac_aux_dir/config.guess
213 ac_config_sub=$ac_aux_dir/config.sub
214 dnl Mostly copied from AC_CANONICAL_HOST.
215 # Make sure we can run config.sub.
216 if $ac_config_sub sun4 >/dev/null 2>&1; then :
217 else AC_MSG_ERROR(can not run $ac_config_sub)
220 case "$host_alias" in
223 NONE) dnl config.guess needs to compile things
224 host_alias=`export CC; $ac_config_guess` ;;
225 *) host_alias=$nonopt ;;
228 # Don't fail just because the system is not listed in GNU's database.
229 if test -n "$host_alias"; then
230 host=`$ac_config_sub $host_alias`
232 host=unknown-unknown-unknown
238 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
239 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
240 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
243 AC_SUBST(host_cpu)dnl
244 AC_SUBST(host_vendor)dnl
248 AC_DEFUN(CL_CANONICAL_HOST_CPU,
249 [AC_REQUIRE([CL_CANONICAL_HOST])AC_REQUIRE([AC_PROG_CC])
255 alphaev[4-7] | alphaev56 | alphapca5[67] )
258 hppa1.0 | hppa1.1 | hppa2.0 )
264 c1 | c2 | c32 | c34 | c38 | c4 )
269 AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [
271 [#if defined(_MIPS_SZLONG)
272 #if (_MIPS_SZLONG == 64)
273 /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */
277 ], cl_cv_host_mips64=yes, cl_cv_host_mips64=no)
279 if test $cl_cv_host_mips64 = yes; then
283 dnl UltraSPARCs running Linux have `uname -m` = "sparc64", but the C compiler
284 dnl still generates 32-bit code.
286 AC_CACHE_CHECK([for 64-bit SPARC], cl_cv_host_sparc64, [
288 [#if defined(__sparcv9) || defined(__arch64__)
291 ], cl_cv_host_sparc64=yes, cl_cv_host_sparc64=no)
293 if test $cl_cv_host_sparc64 = yes; then
300 dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this
301 cat >> confdefs.h <<EOF
302 #ifndef __${host_cpu}__
303 #define __${host_cpu}__ 1
308 AC_DEFUN(CL_LONGLONG,
309 [AC_CACHE_CHECK(for long long type, cl_cv_c_longlong, [
310 AC_TRY_RUN([int main()
312 /* long longs don't work right with gcc-2.7.2 on m68k */
313 /* long longs don't work right with gcc-2.7.2 on rs6000: avcall/tests.c gets
316 #if defined(__m68k__) || (defined(_IBMR2) || defined(__powerpc))
318 #if (__GNUC_MINOR__ <= 7)
324 { long x = 944938507; long y = 737962842; long z = 162359677;
325 exit(!(((long long) x)*((long long) y)>>32 == z));
328 cl_cv_c_longlong=yes, cl_cv_c_longlong=no,
329 dnl When cross-compiling, don't assume anything.
330 cl_cv_c_longlong="guessing no")
332 case "$cl_cv_c_longlong" in
333 *yes) AC_DEFINE(HAVE_LONGLONG) ;;
338 AC_DEFUN(CL_LONGDOUBLE,
339 [AC_CACHE_CHECK(for long double type, cl_cv_c_longdouble, [
340 AC_TRY_RUN([int main()
341 { long double x = 2.7182818284590452354L; x = x*x; exit (x==0.0L); }],
342 cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no,
343 dnl When cross-compiling, don't assume anything.
344 cl_cv_c_longdouble="guessing no")
346 case "$cl_cv_c_longdouble" in
347 *yes) AC_DEFINE(HAVE_LONGDOUBLE) ;;
352 AC_DEFUN(CL_TEMPLATE_NULL,
353 [CL_COMPILE_CHECK([working template<>], cl_cv_c_templatenull,
354 [template <class T> class c {}; template <> class c<int> { int x; };], ,
355 AC_DEFINE(HAVE_TEMPLATE_NULL))
358 AC_DEFUN(CL_UNISTD_H,
359 [AC_CHECK_HEADERS(unistd.h)]
363 [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
364 # for constant arguments. Useless!
365 CL_LINK_CHECK(working alloca.h, cl_cv_header_alloca_h,
366 [#include <alloca.h>], [char *p = (char *) alloca(2 * sizeof(int));],
367 AC_DEFINE(HAVE_ALLOCA_H))dnl
368 decl="#ifdef __GNUC__
369 #define alloca __builtin_alloca
373 #define alloca _alloca
389 CL_LINK_CHECK([alloca], cl_cv_func_alloca,
390 $decl, [char *p = (char *) alloca(1);],
391 , [alloca_missing=1])dnl
392 if test -n "$alloca_missing"; then
393 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
394 # that cause trouble. Some versions do not even contain alloca or
395 # contain a buggy version. If you still want to use their alloca,
396 # use ar to extract alloca.o from them instead of compiling alloca.c.
397 ALLOCA=alloca.${ac_objext}
403 AC_DEFUN(CL_FPU_CONTROL,
404 [dnl Check for Linux with <fpu_control.h> and fpu_control_t or __setfpucw().
405 dnl glibc versions since October 1998 define fpu_control_t. Earlier versions
406 dnl define and declare __setfpucw(). Very early Linux libc versions have none,
407 dnl and __fpu_control is of type `unsigned short'.
408 CL_COMPILE_CHECK([fpu_control_t], cl_cv_type_fpu_control_t,
409 [#include <fpu_control.h>], [fpu_control_t x;],
410 AC_DEFINE(HAVE_FPU_CONTROL_T))
411 CL_COMPILE_CHECK([__setfpucw], cl_cv_func_setfpucw,
412 [#include <fpu_control.h>], [__setfpucw(_FPU_IEEE);],
413 AC_DEFINE(HAVE_SETFPUCW))
417 [AC_MSG_CHECKING(for perror declaration)
418 AC_CACHE_VAL(cl_cv_proto_perror, [
420 /* Some systems declare perror() in <errno.h>, some in <stdio.h>, some don't
421 declare it at all. */
424 ]AC_LANG_EXTERN[double perror ();], [],
425 cl_cv_proto_perror=no, cl_cv_proto_perror=yes)
427 AC_MSG_RESULT([$cl_cv_proto_perror])
428 if test $cl_cv_proto_perror = yes; then
429 AC_DEFINE(HAVE_PERROR_DECL)
434 [AC_CHECK_HEADERS(sys/resource.h sys/times.h)dnl
435 if test $ac_cv_header_sys_resource_h = yes; then
436 dnl HAVE_SYS_RESOURCE_H defined
437 CL_LINK_CHECK([getrusage], cl_cv_func_getrusage,
438 [#include <sys/types.h> /* NetBSD 1.0 needs this */
439 #include <sys/time.h>
440 #include <sys/resource.h>],
441 [struct rusage x; int y = RUSAGE_SELF; getrusage(y,&x); x.ru_utime.tv_sec;],
442 AC_DEFINE(HAVE_GETRUSAGE))dnl
443 if test $cl_cv_func_getrusage = yes; then
444 CL_PROTO([getrusage], [
450 #include <sys/types.h> /* NetBSD 1.0 needs this */
451 #include <sys/time.h>
452 #include <sys/resource.h>
454 [int getrusage (int who, struct rusage * rusage);],
456 [cl_cv_proto_getrusage_arg1="int"],
457 [cl_cv_proto_getrusage_arg1="enum __rusage_who"])
458 ], [extern int getrusage ($cl_cv_proto_getrusage_arg1, struct rusage *);])
459 AC_DEFINE_UNQUOTED(RUSAGE_WHO_T,$cl_cv_proto_getrusage_arg1)
464 AC_DEFUN(CL_GETTIMEOFDAY,
465 [AC_BEFORE([$0], [CL_TIMES_CLOCK])
466 AC_CHECK_FUNCS(gettimeofday)dnl
467 if test $ac_cv_func_gettimeofday = yes; then
468 dnl HAVE_GETTIMEOFDAY is defined
469 CL_PROTO([gettimeofday], [
471 #include <sys/types.h>
472 #include <sys/time.h>
473 ], [int gettimeofday (struct timeval * tp, struct timezone * tzp);],
474 [int gettimeofday();],
475 cl_cv_proto_gettimeofday_dots=no
476 cl_cv_proto_gettimeofday_arg2="struct timezone *",
478 #include <sys/types.h>
479 #include <sys/time.h>
480 ], [int gettimeofday (struct timeval * tp, void * tzp);],
481 [int gettimeofday();],
482 cl_cv_proto_gettimeofday_dots=no
483 cl_cv_proto_gettimeofday_arg2="void *",
484 cl_cv_proto_gettimeofday_dots=yes
485 cl_cv_proto_gettimeofday_arg2="..."))
486 ], [extern int gettimeofday (struct timeval *, $cl_cv_proto_gettimeofday_arg2);])
487 if test $cl_cv_proto_gettimeofday_dots = yes; then
488 AC_DEFINE(GETTIMEOFDAY_DOTS)
490 AC_DEFINE_UNQUOTED(GETTIMEOFDAY_TZP_T,$cl_cv_proto_gettimeofday_arg2)
496 [AC_BEFORE([$0], [CL_TIMES_CLOCK])
497 AC_CHECK_FUNCS(ftime)])dnl
499 AC_DEFUN(CL_TIMES_CLOCK,
500 [AC_REQUIRE([CL_GETTIMEOFDAY])dnl
501 AC_REQUIRE([CL_FTIME])dnl
502 if test $ac_cv_func_gettimeofday = no -a $ac_cv_func_ftime = no; then
503 AC_CHECK_FUNC(times, , no_times=1)dnl
504 if test -z "$no_times"; then
505 AC_CACHE_CHECK(for times return value, cl_cv_func_times_return, [
507 #include <sys/types.h>
508 #include <time.h> /* needed for CLK_TCK */
510 #include <sys/time.h> /* needed for CLK_TCK on SYSV PTX */
512 #include <sys/times.h>
518 result1 = times(&buffer);
519 if ((result1 == (clock_t)0) || (result1 == (clock_t)(-1))) exit(1);
521 result2 = times(&buffer);
522 if ((result2 == (clock_t)0) || (result2 == (clock_t)(-1))) exit(1);
523 ticks = result2 - result1;
524 exit(!((ticks >= CLK_TCK/2) && (ticks <= 3*CLK_TCK/2)));
525 }], cl_cv_func_times_return=yes, cl_cv_func_times_return=no,
526 dnl When cross-compiling, don't assume anything.
527 cl_cv_func_times_return="guessing no")
529 case "$cl_cv_func_times_return" in
530 *yes) AC_DEFINE(HAVE_TIMES_CLOCK) ;;
537 AC_DEFUN(CL_GLOBAL_CONSTRUCTORS,
538 [AC_REQUIRE([CL_AS_UNDERSCORE])dnl
539 if test -n "$GCC"; then
540 AC_CACHE_CHECK(for the global constructors function prefix,
541 cl_cv_cplusplus_ctorprefix, [
542 cat > conftest.cc << EOF
543 struct foo { foo (); };
546 # look for the assembly language name in the .s file
547 AC_TRY_COMMAND(${CXX-g++} $CXXFLAGS -S conftest.cc) >/dev/null 2>&1
548 if grep '_GLOBAL_\$I\$foobar' conftest.s >/dev/null ; then
549 cl_cv_cplusplus_ctorprefix='_GLOBAL_$I$'
551 if grep '_GLOBAL_\.I\.foobar' conftest.s >/dev/null ; then
552 cl_cv_cplusplus_ctorprefix='_GLOBAL_.I.'
554 if grep '_GLOBAL__I_foobar' conftest.s >/dev/null ; then
555 cl_cv_cplusplus_ctorprefix='_GLOBAL__I_'
557 cl_cv_cplusplus_ctorprefix=unknown
563 if test "$cl_cv_cplusplus_ctorprefix" '!=' unknown; then
564 ac_value='"'"$cl_cv_cplusplus_ctorprefix"'"'
565 AC_DEFINE_UNQUOTED(CL_GLOBAL_CONSTRUCTOR_PREFIX,$ac_value)
566 ac_value=`echo "$ac_value" | sed -e 's,I,D,'`
567 AC_DEFINE_UNQUOTED(CL_GLOBAL_DESTRUCTOR_PREFIX,$ac_value)
568 dnl Check whether the global constructors/destructors functions are file-scope
569 dnl only by default. This is the case in egcs-1.1.2 or newer.
570 AC_CACHE_CHECK(whether the global constructors function need to be exported,
571 cl_cv_cplusplus_ctorexport, [
572 cat > conftest1.cc << EOF
573 struct foo { foo (); };
576 cat > conftest2.cc << EOF
577 #include "confdefs.h"
578 #ifdef ASM_UNDERSCORE
579 #define ASM_UNDERSCORE_PREFIX "_"
581 #define ASM_UNDERSCORE_PREFIX ""
583 struct foo { foo (); };
585 extern "C" void ctor (void) __asm__ (ASM_UNDERSCORE_PREFIX CL_GLOBAL_CONSTRUCTOR_PREFIX "foobar");
586 int main() { ctor(); return 0; }
588 if AC_TRY_COMMAND(${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest1.cc conftest2.cc $LIBS 1>&5) >/dev/null 2>&1 && test -s conftest${ac_exeext}; then
589 cl_cv_cplusplus_ctorexport=no
591 cl_cv_cplusplus_ctorexport=yes
595 if test "$cl_cv_cplusplus_ctorexport" = yes; then
596 AC_DEFINE(CL_NEED_GLOBALIZE_CTORDTOR)
602 AC_DEFUN(CL_CHAR_UNSIGNED,
603 [dnl This is mostly copied from AC_C_CHAR_UNSIGNED.
604 AC_CACHE_CHECK(whether characters are unsigned, ac_cv_c_char_unsigned, [
605 if test $ac_cv_prog_gcc = yes; then
606 # GCC predefines this symbol on systems where it applies.
608 [#ifdef __CHAR_UNSIGNED__
611 ], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)
614 [/* volatile prevents gcc2 from optimizing the test away on sparcs. */
615 #if !defined(__STDC__) || __STDC__ != 1
619 volatile char c = 255; exit(c < 0);
620 }], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no,
621 ac_cv_c_char_unsigned="guessing no")
623 if test $ac_cv_prog_gcc = no; then
624 # GCC defines __CHAR_UNSIGNED__ by itself, no need to fix up.
625 case "$ac_cv_c_char_unsigned" in
626 *yes) AC_DEFINE(__CHAR_UNSIGNED__) ;;
635 CL_COMPILE_CHECK([bool type], cl_cv_cplusplus_bool, , [bool x;],
636 AC_DEFINE(HAVE_BOOL), AC_DEFINE(bool,int))dnl
641 [AC_REQUIRE([AC_PROG_CC])dnl
642 AC_REQUIRE([CL_CHAR_UNSIGNED])dnl
645 if test $cross_compiling = no; then
646 if test -z "$[$4]"; then
647 AC_CHECKING(for [$1])
648 cat > conftest.$ac_ext <<EOF
649 #include "confdefs.h"
651 cat "$cl_machine_file_c" >> conftest.$ac_ext
653 if test -s conftest; then
654 echo "creating $cl_machine_file_h"
655 ./conftest > conftest.h
656 if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
657 # The file exists and we would not be changing it
660 rm -f "$cl_machine_file_h"
661 mv conftest.h "$cl_machine_file_h"
665 echo "creation of $cl_machine_file_h failed"
670 echo "cross-compiling - cannot create $cl_machine_file_h"
675 # Is the gmp header file new enough? (should be implemented with an argument)
676 AC_DEFUN(CL_GMP_H_VERSION,
677 [AC_CACHE_CHECK([for recent enough gmp.h], cl_cv_new_gmp_h, [
678 AC_TRY_CPP([#include <gmp.h>
679 #if !defined(__GNU_MP_VERSION) || (__GNU_MP_VERSION < 3)
680 #error "ancient gmp.h"
682 cl_cv_new_gmp_h="yes", cl_cv_new_gmp_h="no")
685 # Does libgmp provide some functionality introduced in version 3.0?
686 AC_DEFUN(CL_GMP_CHECK,
687 [AC_CACHE_CHECK([for working libgmp], cl_cv_new_libgmp, [
690 AC_TRY_LINK([#include <gmp.h>],[mpn_divexact_by3(0,0,0)],
691 cl_cv_new_libgmp="yes", cl_cv_new_libgmp="no"; LIBS=$SAVELIBS)
694 # What is sizeof(mp_limb_t)? (It has to match sizeof(uintD) later.)
695 AC_DEFUN(CL_GMP_SET_UINTD,
696 [AC_CACHE_CHECK([how large gmp demands uintD to be], cl_cv_gmp_set_uintd, [
697 AC_TRY_RUN([#include <stdio.h>
700 FILE *f=fopen("conftestval", "w");
702 if (sizeof(mp_limb_t) > sizeof(long))
703 fprintf(f, "long long");
704 else if (sizeof(mp_limb_t) == sizeof(long))
706 else if (sizeof(mp_limb_t) == sizeof(int))
710 }], cl_cv_gmp_set_uintd=`cat conftestval`; \
711 cl_gmp_demands="GMP_DEMANDS_UINTD_`echo ${cl_cv_gmp_set_uintd} | sed -e 'y/ gilnot/_GILNOT/'`";
712 AC_DEFINE_UNQUOTED($cl_gmp_demands),
713 AC_MSG_ERROR([CLN can't handle the result]),dnl
714 AC_MSG_ERROR([cross-compiling - cannot determine]))
717 # =============================================================================
718 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
719 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
720 ## Free Software Foundation, Inc.
721 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
723 ## This program is free software; you can redistribute it and/or modify
724 ## it under the terms of the GNU General Public License as published by
725 ## the Free Software Foundation; either version 2 of the License, or
726 ## (at your option) any later version.
728 ## This program is distributed in the hope that it will be useful, but
729 ## WITHOUT ANY WARRANTY; without even the implied warranty of
730 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
731 ## General Public License for more details.
733 ## You should have received a copy of the GNU General Public License
734 ## along with this program; if not, write to the Free Software
735 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
737 ## As a special exception to the GNU General Public License, if you
738 ## distribute this file as part of a program that contains a
739 ## configuration script generated by Autoconf, you may include it under
740 ## the same distribution terms that you use for the rest of that program.
742 # The next line was added by Bruno Haible 2001-06-08.
745 # serial 46 AC_PROG_LIBTOOL
746 AC_DEFUN([AC_PROG_LIBTOOL],
747 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
749 # This can be used to rebuild libtool when needed
750 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
752 # Always use our own libtool.
753 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
756 # Prevent multiple expansion
757 define([AC_PROG_LIBTOOL], [])
760 AC_DEFUN([AC_LIBTOOL_SETUP],
762 AC_REQUIRE([AC_ENABLE_SHARED])dnl
763 AC_REQUIRE([AC_ENABLE_STATIC])dnl
764 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
765 AC_REQUIRE([AC_CANONICAL_HOST])dnl
766 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
767 AC_REQUIRE([AC_PROG_CC])dnl
768 AC_REQUIRE([AC_PROG_LD])dnl
769 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
770 AC_REQUIRE([AC_PROG_NM])dnl
771 AC_REQUIRE([AC_PROG_LN_S])dnl
772 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
773 AC_REQUIRE([AC_OBJEXT])dnl
774 AC_REQUIRE([AC_EXEEXT])dnl
777 _LT_AC_PROG_ECHO_BACKSLASH
778 # Only perform the check for file, if the check method requires it
779 case $deplibs_check_method in
781 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
787 AC_CHECK_TOOL(RANLIB, ranlib, :)
788 AC_CHECK_TOOL(STRIP, strip, :)
790 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
791 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
792 enable_win32_dll=yes, enable_win32_dll=no)
794 AC_ARG_ENABLE(libtool-lock,
795 [ --disable-libtool-lock avoid locking (might break parallel builds)])
796 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
798 # Some flags need to be propagated to the compiler or linker for good
802 # Find out which ABI we are using.
803 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
804 if AC_TRY_EVAL(ac_compile); then
805 case `/usr/bin/file conftest.$ac_objext` in
821 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
822 SAVE_CFLAGS="$CFLAGS"
823 CFLAGS="$CFLAGS -belf"
824 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
827 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
829 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
830 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
831 CFLAGS="$SAVE_CFLAGS"
835 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
836 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
837 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
838 AC_CHECK_TOOL(AS, as, false)
839 AC_CHECK_TOOL(OBJDUMP, objdump, false)
841 # recent cygwin and mingw systems supply a stub DllMain which the user
842 # can override, but on older systems we have to supply one
843 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
845 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
847 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
850 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
851 # old mingw systems require "-dll" to link a DLL, while more recent ones
853 SAVE_CFLAGS="$CFLAGS"
854 CFLAGS="$CFLAGS -mdll"
855 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
856 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
857 CFLAGS="$SAVE_CFLAGS" ;;
858 *-*-cygwin* | *-*-pw32*)
859 # cygwin systems need to pass --dll to the linker, and not link
860 # crt.o which will require a WinMain@16 definition.
861 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
872 # --------------------
873 AC_DEFUN(_LT_AC_CHECK_DLFCN,
874 [AC_CHECK_HEADERS(dlfcn.h)
875 ])# _LT_AC_CHECK_DLFCN
877 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
878 # ---------------------------------
879 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
880 [AC_REQUIRE([AC_CANONICAL_HOST])
881 AC_REQUIRE([AC_PROG_NM])
882 AC_REQUIRE([AC_OBJEXT])
883 # Check for command to grab the raw symbol name followed by C symbol from nm.
884 AC_MSG_CHECKING([command to parse $NM output])
885 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
887 # These are sane defaults that work on at least a few old systems.
888 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
890 # Character class describing NM global symbol codes.
891 [symcode='[BCDEGRST]']
893 # Regexp to match symbols that can be accessed directly from C.
894 [sympat='\([_A-Za-z][_A-Za-z0-9]*\)']
896 # Transform the above into a raw symbol and a C symbol.
899 # Transform an extracted symbol line into a proper C declaration
900 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
902 # Define system-specific variables.
907 cygwin* | mingw* | pw32*)
908 [symcode='[ABCDGISTW]']
910 hpux*) # Its linker distinguishes data from code symbols
911 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
914 [symcode='[BCDEGRST]']
924 # Handle CRLF in mingw tool chain
928 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
932 # If we're using GNU nm, then use its standard symbol codes.
933 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
934 [symcode='[ABCDGISTW]']
937 # Try without a prefix undercore, then with it.
938 for ac_symprfx in "" "_"; do
940 # Write the raw and C identifiers.
941 [lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"]
943 # Check to see that the pipe works correctly.
946 cat > conftest.$ac_ext <<EOF
951 void nm_test_func(){}
955 int main(){nm_test_var='a';nm_test_func();return(0);}
958 if AC_TRY_EVAL(ac_compile); then
959 # Now try to grab the symbols.
961 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
962 # Try sorting and uniquifying the output.
963 if sort "$nlist" | uniq > "$nlist"T; then
964 mv -f "$nlist"T "$nlist"
969 # Make sure that we snagged all the symbols we need.
970 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
971 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
972 cat <<EOF > conftest.$ac_ext
978 # Now generate the symbol file.
979 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
981 cat <<EOF >> conftest.$ac_ext
982 #if defined (__STDC__) && __STDC__
983 # define lt_ptr_t void *
985 # define lt_ptr_t char *
989 /* The mapping between symbol names and symbols. */
994 [lt_preloaded_symbols[] =]
997 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
998 cat <<\EOF >> conftest.$ac_ext
1006 # Now try linking the two files.
1007 mv conftest.$ac_objext conftstm.$ac_objext
1009 save_CFLAGS="$CFLAGS"
1010 LIBS="conftstm.$ac_objext"
1011 CFLAGS="$CFLAGS$no_builtin_flag"
1012 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1016 CFLAGS="$save_CFLAGS"
1018 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1021 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1024 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1027 echo "$progname: failed program was:" >&AC_FD_CC
1028 cat conftest.$ac_ext >&5
1030 rm -f conftest* conftst*
1032 # Do not use the global_symbol_pipe unless it works.
1033 if test "$pipe_works" = yes; then
1036 lt_cv_sys_global_symbol_pipe=
1040 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1041 if test -z "$lt_cv_sys_global_symbol_pipe"; then
1042 global_symbol_to_cdecl=
1044 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1046 if test -z "$global_symbol_pipe$global_symbol_to_cdecl"; then
1047 AC_MSG_RESULT(failed)
1051 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1053 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1054 # ---------------------------------
1055 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1056 [# Find the correct PATH separator. Usually this is `:', but
1057 # DJGPP uses `;' like DOS.
1058 if test "X${PATH_SEPARATOR+set}" != Xset; then
1059 UNAME=${UNAME-`uname 2>/dev/null`}
1061 *-DOS) lt_cv_sys_path_separator=';' ;;
1062 *) lt_cv_sys_path_separator=':' ;;
1065 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1067 # _LT_AC_PROG_ECHO_BACKSLASH
1068 # --------------------------
1069 # Add some code to the start of the generated configure script which
1070 # will find an echo command which doesn;t interpret backslashes.
1071 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1072 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1073 [AC_DIVERT_PUSH(NOTICE)])
1074 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1076 # Check that we are running under the correct shell.
1077 SHELL=${CONFIG_SHELL-/bin/sh}
1081 # Remove one level of quotation (which was required for Make).
1082 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1087 if test "X[$]1" = X--no-reexec; then
1088 # Discard the --no-reexec flag, and continue.
1090 elif test "X[$]1" = X--fallback-echo; then
1091 # Avoid inline document here, it may be left over
1093 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1094 # Yippee, $echo works!
1097 # Restart under the correct shell.
1098 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1101 if test "X[$]1" = X--fallback-echo; then
1102 # used as fallback echo
1110 # The HP-UX ksh and POSIX shell print the target directory to stdout
1112 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1114 if test -z "$ECHO"; then
1115 if test "X${echo_test_string+set}" != Xset; then
1116 # find a string as large as possible, as long as the shell can cope with it
1117 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1118 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1119 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1120 echo_test_string="`eval $cmd`" &&
1121 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1128 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1129 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1130 test "X$echo_testing_string" = "X$echo_test_string"; then
1133 # The Solaris, AIX, and Digital Unix default echo programs unquote
1134 # backslashes. This makes it impossible to quote backslashes using
1135 # echo "$something" | sed 's/\\/\\\\/g'
1137 # So, first we look for a working echo in the user's PATH.
1139 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1140 for dir in $PATH /usr/ucb; do
1141 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1142 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1143 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1144 test "X$echo_testing_string" = "X$echo_test_string"; then
1151 if test "X$echo" = Xecho; then
1152 # We didn't find a better echo, so look for alternatives.
1153 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1154 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1155 test "X$echo_testing_string" = "X$echo_test_string"; then
1156 # This shell has a builtin print -r that does the trick.
1158 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1159 test "X$CONFIG_SHELL" != X/bin/ksh; then
1160 # If we have ksh, try running configure again with it.
1161 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1162 export ORIGINAL_CONFIG_SHELL
1163 CONFIG_SHELL=/bin/ksh
1165 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1169 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1170 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1171 test "X$echo_testing_string" = "X$echo_test_string"; then
1172 # Cool, printf works
1174 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1175 test "X$echo_testing_string" = 'X\t' &&
1176 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1177 test "X$echo_testing_string" = "X$echo_test_string"; then
1178 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1180 SHELL="$CONFIG_SHELL"
1182 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1183 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1184 test "X$echo_testing_string" = 'X\t' &&
1185 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1186 test "X$echo_testing_string" = "X$echo_test_string"; then
1187 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1189 # maybe with a smaller string...
1192 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1193 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1200 if test "$prev" != 'sed 50q "[$]0"'; then
1201 echo_test_string=`eval $prev`
1202 export echo_test_string
1203 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1205 # Oops. We lost completely, so just stick with echo.
1214 # Copy echo and quote the copy suitably for passing to libtool from
1215 # the Makefile, instead of quoting the original, which is used later.
1217 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1218 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1223 ])# _LT_AC_PROG_ECHO_BACKSLASH
1225 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1226 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1227 # ------------------------------------------------------------------
1228 AC_DEFUN(_LT_AC_TRY_DLOPEN_SELF,
1229 [if test "$cross_compiling" = yes; then :
1232 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1233 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1234 lt_status=$lt_dlunknown
1235 cat > conftest.$ac_ext <<EOF
1236 [#line __oline__ "configure"
1237 #include "confdefs.h"
1246 # define LT_DLGLOBAL RTLD_GLOBAL
1249 # define LT_DLGLOBAL DL_GLOBAL
1251 # define LT_DLGLOBAL 0
1255 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1256 find out it does not work in some platform. */
1257 #ifndef LT_DLLAZY_OR_NOW
1259 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1262 # define LT_DLLAZY_OR_NOW DL_LAZY
1265 # define LT_DLLAZY_OR_NOW RTLD_NOW
1268 # define LT_DLLAZY_OR_NOW DL_NOW
1270 # define LT_DLLAZY_OR_NOW 0
1278 extern "C" void exit (int);
1281 void fnord() { int i=42;}
1284 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1285 int status = $lt_dlunknown;
1289 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1290 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1291 /* dlclose (self); */
1297 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1298 (./conftest; exit; ) 2>/dev/null
1301 x$lt_dlno_uscore) $1 ;;
1302 x$lt_dlneed_uscore) $2 ;;
1303 x$lt_unknown|x*) $3 ;;
1306 # compilation failed
1311 ])# _LT_AC_TRY_DLOPEN_SELF
1313 # AC_LIBTOOL_DLOPEN_SELF
1314 # -------------------
1315 AC_DEFUN(AC_LIBTOOL_DLOPEN_SELF,
1316 [if test "x$enable_dlopen" != xyes; then
1317 enable_dlopen=unknown
1318 enable_dlopen_self=unknown
1319 enable_dlopen_self_static=unknown
1326 lt_cv_dlopen="load_add_on"
1328 lt_cv_dlopen_self=yes
1331 cygwin* | mingw* | pw32*)
1332 lt_cv_dlopen="LoadLibrary"
1337 AC_CHECK_LIB(dl, dlopen, [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1338 [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen",
1339 [AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load",
1340 [AC_CHECK_LIB(svld, dlopen,
1341 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1342 [AC_CHECK_LIB(dld, shl_load,
1343 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1351 if test "x$lt_cv_dlopen" != xno; then
1357 case $lt_cv_dlopen in
1359 save_CPPFLAGS="$CPPFLAGS"
1360 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1361 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1363 save_LDFLAGS="$LDFLAGS"
1364 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1367 LIBS="$lt_cv_dlopen_libs $LIBS"
1369 AC_CACHE_CHECK([whether a program can dlopen itself],
1370 lt_cv_dlopen_self, [dnl
1371 _LT_AC_TRY_DLOPEN_SELF(
1372 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1373 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1376 if test "x$lt_cv_dlopen_self" = xyes; then
1377 LDFLAGS="$LDFLAGS $link_static_flag"
1378 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1379 lt_cv_dlopen_self_static, [dnl
1380 _LT_AC_TRY_DLOPEN_SELF(
1381 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1382 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1386 CPPFLAGS="$save_CPPFLAGS"
1387 LDFLAGS="$save_LDFLAGS"
1392 case $lt_cv_dlopen_self in
1393 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1394 *) enable_dlopen_self=unknown ;;
1397 case $lt_cv_dlopen_self_static in
1398 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1399 *) enable_dlopen_self_static=unknown ;;
1402 ])# AC_LIBTOOL_DLOPEN_SELF
1404 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1405 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1406 # Sed substitution that helps us do robust quoting. It backslashifies
1407 # metacharacters that are still active within double-quoted strings.
1408 Xsed='sed -e s/^X//'
1409 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1411 # Same as above, but do not quote variable references.
1412 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1414 # Sed substitution to delay expansion of an escaped shell variable in a
1415 # double_quote_subst'ed string.
1416 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1422 default_ofile=libtool
1423 can_build_shared=yes
1425 # All known linkers require a `.a' archive for static linking (except M$VC,
1426 # which needs '.lib').
1428 ltmain="$ac_aux_dir/ltmain.sh"
1429 ofile="$default_ofile"
1430 with_gnu_ld="$lt_cv_prog_gnu_ld"
1431 need_locks="$enable_libtool_lock"
1434 old_CFLAGS="$CFLAGS"
1436 # Set sane defaults for various variables
1437 test -z "$AR" && AR=ar
1438 test -z "$AR_FLAGS" && AR_FLAGS=cru
1439 test -z "$AS" && AS=as
1440 test -z "$CC" && CC=cc
1441 test -z "$DLLTOOL" && DLLTOOL=dlltool
1442 test -z "$LD" && LD=ld
1443 test -z "$LN_S" && LN_S="ln -s"
1444 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1445 test -z "$NM" && NM=nm
1446 test -z "$OBJDUMP" && OBJDUMP=objdump
1447 test -z "$RANLIB" && RANLIB=:
1448 test -z "$STRIP" && STRIP=:
1449 test -z "$ac_objext" && ac_objext=o
1451 if test x"$host" != x"$build"; then
1452 ac_tool_prefix=${host_alias}-
1457 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1460 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1465 # AIX sometimes has problems with the GCC collect2 program. For some
1466 # reason, if we set the COLLECT_NAMES environment variable, the problems
1467 # vanish in a puff of smoke.
1468 if test "X${COLLECT_NAMES+set}" != Xset; then
1470 export COLLECT_NAMES
1475 # Determine commands to create old-style static archives.
1476 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1477 old_postinstall_cmds='chmod 644 $oldlib'
1478 old_postuninstall_cmds=
1480 if test -n "$RANLIB"; then
1481 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1482 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1485 # Allow CC to be a program name with arguments.
1489 ## FIXME: this should be a separate macro
1491 AC_MSG_CHECKING([for objdir])
1492 rm -f .libs 2>/dev/null
1493 mkdir .libs 2>/dev/null
1494 if test -d .libs; then
1497 # MS-DOS does not allow filenames that begin with a dot.
1500 rmdir .libs 2>/dev/null
1501 AC_MSG_RESULT($objdir)
1506 ## FIXME: this should be a separate macro
1509 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1510 pic_mode="$withval", pic_mode=default)
1511 test -z "$pic_mode" && pic_mode=default
1513 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1514 # in isolation, and that seeing it set (from the cache) indicates that
1515 # the associated values are set (in the cache) correctly too.
1516 AC_MSG_CHECKING([for $compiler option to produce PIC])
1517 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1518 [ lt_cv_prog_cc_pic=
1519 lt_cv_prog_cc_shlib=
1521 lt_cv_prog_cc_static=
1522 lt_cv_prog_cc_no_builtin=
1523 lt_cv_prog_cc_can_build_shared=$can_build_shared
1525 if test "$GCC" = yes; then
1526 lt_cv_prog_cc_wl='-Wl,'
1527 lt_cv_prog_cc_static='-static'
1531 # Below there is a dirty hack to force normal static linking with -ldl
1532 # The problem is because libdl dynamically linked with both libc and
1533 # libC (AIX C++ library), which obviously doesn't included in libraries
1534 # list by gcc. This cause undefined symbols with -static flags.
1535 # This hack allows C programs to be linked with "-static -ldl", but
1536 # we not sure about C++ programs.
1537 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1540 # FIXME: we need at least 68020 code to build shared libraries, but
1541 # adding the `-m68020' flag to GCC prevents building anything better,
1543 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1545 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1546 # PIC is the default for these OSes.
1548 darwin* | rhapsody*)
1549 # PIC is the default on this platform
1550 # Common symbols not allowed in MH_DYLIB files
1551 lt_cv_prog_cc_pic='-fno-common'
1553 cygwin* | mingw* | pw32* | os2*)
1554 # This hack is so that the source file can tell whether it is being
1555 # built for inclusion in a dll (and should export symbols for example).
1556 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1559 if test -d /usr/nec; then
1560 lt_cv_prog_cc_pic=-Kconform_pic
1564 lt_cv_prog_cc_pic='-fPIC'
1568 # PORTME Check for PIC flags for the system compiler.
1570 aix3* | aix4* | aix5*)
1571 # All AIX code is PIC.
1572 if test "$host_cpu" = ia64; then
1573 # AIX 5 now supports IA64 processor
1574 lt_cv_prog_cc_static='-Bstatic'
1575 lt_cv_prog_cc_wl='-Wl,'
1577 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1581 hpux9* | hpux10* | hpux11*)
1582 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1583 lt_cv_prog_cc_wl='-Wl,'
1584 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1585 lt_cv_prog_cc_pic='+Z'
1589 lt_cv_prog_cc_wl='-Wl,'
1590 lt_cv_prog_cc_static='-non_shared'
1591 # PIC (with -KPIC) is the default.
1594 cygwin* | mingw* | pw32* | os2*)
1595 # This hack is so that the source file can tell whether it is being
1596 # built for inclusion in a dll (and should export symbols for example).
1597 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1601 lt_cv_prog_cc_pic='-KPIC'
1602 lt_cv_prog_cc_static='-Bstatic'
1605 osf3* | osf4* | osf5*)
1606 # All OSF/1 code is PIC.
1607 lt_cv_prog_cc_wl='-Wl,'
1608 lt_cv_prog_cc_static='-non_shared'
1612 lt_cv_prog_cc_pic='-Kpic'
1613 lt_cv_prog_cc_static='-dn'
1614 lt_cv_prog_cc_shlib='-belf'
1618 lt_cv_prog_cc_pic='-KPIC'
1619 lt_cv_prog_cc_static='-Bstatic'
1620 lt_cv_prog_cc_wl='-Wl,'
1624 lt_cv_prog_cc_pic='-PIC'
1625 lt_cv_prog_cc_static='-Bstatic'
1626 lt_cv_prog_cc_wl='-Qoption ld '
1629 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1630 lt_cv_prog_cc_pic='-KPIC'
1631 lt_cv_prog_cc_static='-Bstatic'
1632 if test "x$host_vendor" = xsni; then
1633 lt_cv_prog_cc_wl='-LD'
1635 lt_cv_prog_cc_wl='-Wl,'
1640 lt_cv_prog_cc_pic='-pic'
1641 lt_cv_prog_cc_static='-Bstatic'
1645 if test -d /usr/nec ;then
1646 lt_cv_prog_cc_pic='-Kconform_pic'
1647 lt_cv_prog_cc_static='-Bstatic'
1652 lt_cv_prog_cc_can_build_shared=no
1657 if test -z "$lt_cv_prog_cc_pic"; then
1658 AC_MSG_RESULT([none])
1660 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1662 # Check to make sure the pic_flag actually works.
1663 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1664 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1665 save_CFLAGS="$CFLAGS"
1666 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1667 AC_TRY_COMPILE([], [], [dnl
1669 hpux9* | hpux10* | hpux11*)
1670 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1671 # they create non-PIC objects. So, if there were any warnings, we
1672 # assume that PIC is not supported.
1673 if test -s conftest.err; then
1674 lt_cv_prog_cc_pic_works=no
1676 lt_cv_prog_cc_pic_works=yes
1680 lt_cv_prog_cc_pic_works=yes
1684 lt_cv_prog_cc_pic_works=no
1686 CFLAGS="$save_CFLAGS"
1689 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1691 lt_cv_prog_cc_can_build_shared=no
1693 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1696 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1701 # Check for any special shared library compilation flags.
1702 if test -n "$lt_cv_prog_cc_shlib"; then
1703 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1704 if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]"] >/dev/null; then :
1706 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1707 lt_cv_prog_cc_can_build_shared=no
1711 ## FIXME: this should be a separate macro
1713 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1714 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1715 lt_cv_prog_cc_static_works=no
1716 save_LDFLAGS="$LDFLAGS"
1717 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1718 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1719 LDFLAGS="$save_LDFLAGS"
1722 # Belt *and* braces to stop my trousers falling down:
1723 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1724 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1726 pic_flag="$lt_cv_prog_cc_pic"
1727 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1728 wl="$lt_cv_prog_cc_wl"
1729 link_static_flag="$lt_cv_prog_cc_static"
1730 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1731 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1736 ## FIXME: this should be a separate macro
1738 # Check to see if options -o and -c are simultaneously supported by compiler
1739 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1740 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1741 $rm -r conftest 2>/dev/null
1744 echo "int some_variable = 0;" > conftest.$ac_ext
1746 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1747 # that will create temporary files in the current directory regardless of
1748 # the output directory. Thus, making CWD read-only will cause this test
1749 # to fail, enabling locking or at least warning the user not to do parallel
1752 save_CFLAGS="$CFLAGS"
1753 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1755 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1756 # The compiler can only warn and ignore the option if not recognized
1757 # So say no if there are warnings
1758 if test -s out/conftest.err; then
1759 lt_cv_compiler_c_o=no
1761 lt_cv_compiler_c_o=yes
1764 # Append any errors to the config.log.
1765 cat out/conftest.err 1>&AC_FD_CC
1766 lt_cv_compiler_c_o=no
1768 CFLAGS="$save_CFLAGS"
1774 $rm -r conftest 2>/dev/null
1776 compiler_c_o=$lt_cv_compiler_c_o
1777 AC_MSG_RESULT([$compiler_c_o])
1779 if test x"$compiler_c_o" = x"yes"; then
1780 # Check to see if we can write to a .lo
1781 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1782 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1783 lt_cv_compiler_o_lo=no
1784 save_CFLAGS="$CFLAGS"
1785 CFLAGS="$CFLAGS -c -o conftest.lo"
1786 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1787 # The compiler can only warn and ignore the option if not recognized
1788 # So say no if there are warnings
1789 if test -s conftest.err; then
1790 lt_cv_compiler_o_lo=no
1792 lt_cv_compiler_o_lo=yes
1795 CFLAGS="$save_CFLAGS"
1797 compiler_o_lo=$lt_cv_compiler_o_lo
1798 AC_MSG_RESULT([$compiler_c_lo])
1805 ## FIXME: this should be a separate macro
1807 # Check to see if we can do hard links to lock some files if needed
1808 hard_links="nottested"
1809 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1810 # do not overwrite the value of need_locks provided by the user
1811 AC_MSG_CHECKING([if we can lock with hard links])
1814 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1816 ln conftest.a conftest.b 2>&5 || hard_links=no
1817 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1818 AC_MSG_RESULT([$hard_links])
1819 if test "$hard_links" = no; then
1820 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1829 ## FIXME: this should be a separate macro
1831 if test "$GCC" = yes; then
1832 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1833 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1834 echo "int some_variable = 0;" > conftest.$ac_ext
1835 save_CFLAGS="$CFLAGS"
1836 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1837 compiler_rtti_exceptions=no
1838 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1839 # The compiler can only warn and ignore the option if not recognized
1840 # So say no if there are warnings
1841 if test -s conftest.err; then
1842 compiler_rtti_exceptions=no
1844 compiler_rtti_exceptions=yes
1847 CFLAGS="$save_CFLAGS"
1848 AC_MSG_RESULT([$compiler_rtti_exceptions])
1850 if test "$compiler_rtti_exceptions" = "yes"; then
1851 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1853 no_builtin_flag=' -fno-builtin'
1859 ## FIXME: this should be a separate macro
1861 # See if the linker supports building shared libraries.
1862 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1864 allow_undefined_flag=
1866 need_lib_prefix=unknown
1867 need_version=unknown
1868 # when you set need_version to no, make sure it does not cause -set_version
1869 # flags to be left without arguments
1871 archive_expsym_cmds=
1872 old_archive_from_new_cmds=
1873 old_archive_from_expsyms_cmds=
1874 export_dynamic_flag_spec=
1875 whole_archive_flag_spec=
1876 thread_safe_flag_spec=
1877 hardcode_into_libs=no
1878 hardcode_libdir_flag_spec=
1879 hardcode_libdir_separator=
1882 hardcode_shlibpath_var=unsupported
1884 link_all_deplibs=unknown
1885 always_export_symbols=no
1886 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1887 # include_expsyms should be a list of space-separated symbols to be *always*
1888 # included in the symbol list
1890 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1891 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1892 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1893 # as well as any symbol that contains `d'.
1894 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1895 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1896 # platforms (ab)use it in PIC code, but their linkers get confused if
1897 # the symbol is explicitly referenced. Since portable code cannot
1898 # rely on this symbol name, it's probably fine to never include it in
1899 # preloaded symbol tables.
1900 extract_expsyms_cmds=
1903 cygwin* | mingw* | pw32* )
1904 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1905 # When not using gcc, we currently assume that we are using
1906 # Microsoft Visual C++.
1907 if test "$GCC" != yes; then
1915 if test "$with_gnu_ld" = yes; then
1916 # If archive_cmds runs LD, not CC, wlarc should be empty
1919 # See if GNU ld supports shared libraries.
1921 aix3* | aix4* | aix5*)
1922 # On AIX, the GNU linker is very broken
1923 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1927 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1928 *** to be unable to reliably create shared libraries on AIX.
1929 *** Therefore, libtool is disabling shared libraries support. If you
1930 *** really care for shared libraries, you may want to modify your PATH
1931 *** so that a non-GNU linker is found, and then restart.
1937 archive_cmds='$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)'
1938 hardcode_libdir_flag_spec='-L$libdir'
1939 hardcode_minus_L=yes
1941 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1942 # that the semantics of dynamic libraries on AmigaOS, at least up
1943 # to version 4, is to share data among multiple programs linked
1944 # with the same dynamic library. Since this doesn't match the
1945 # behavior of shared libraries on other platforms, we can use
1951 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1952 allow_undefined_flag=unsupported
1953 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1954 # support --undefined. This deserves some investigation. FIXME
1955 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1961 cygwin* | mingw* | pw32*)
1962 # hardcode_libdir_flag_spec is actually meaningless, as there is
1963 # no search path for DLLs.
1964 hardcode_libdir_flag_spec='-L$libdir'
1965 allow_undefined_flag=unsupported
1966 always_export_symbols=yes
1968 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1969 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1970 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1971 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1972 else $CC -o impgen impgen.c ; fi)~
1973 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1975 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1977 # cygwin and mingw dlls have different entry points and sets of symbols
1979 # FIXME: what about values for MSVC?
1980 dll_entry=__cygwin_dll_entry@12
1981 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1985 dll_entry=_DllMainCRTStartup@12
1986 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1990 # mingw and cygwin differ, and it's simplest to just exclude the union
1991 # of the two symbol sets.
1992 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1994 # recent cygwin and mingw systems supply a stub DllMain which the user
1995 # can override, but on older systems we have to supply one (in ltdll.c)
1996 if test "x$lt_cv_need_dllmain" = "xyes"; then
1997 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1998 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < [$]0 > $output_objdir/$soname-ltdll.c~
1999 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2005 # Extract the symbol export list from an `--export-all' def file,
2006 # then regenerate the def file from the symbol export list, so that
2007 # the compiled dll only exports the symbol export list.
2008 # Be careful not to strip the DATA tag left be newer dlltools.
2009 export_symbols_cmds="$ltdll_cmds"'
2010 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2011 [sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols'
2013 # If the export-symbols file already is a .def file (1st line
2014 # is EXPORTS), use it as is.
2015 # If DATA tags from a recent dlltool are present, honour them!
2016 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
2017 cp $export_symbols $output_objdir/$soname-def;
2019 echo EXPORTS > $output_objdir/$soname-def;
2021 cat $export_symbols | while read symbol; do
2024 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2025 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2027 _lt_hint=`expr 1 + \$_lt_hint`;
2031 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2032 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
2033 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2034 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
2035 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2039 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2040 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2043 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2044 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2049 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2053 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
2054 *** create shared libraries on Solaris systems. Therefore, libtool
2055 *** is disabling shared libraries support. We urge you to upgrade GNU
2056 *** binutils to release 2.9.1 or newer. Another option is to modify
2057 *** your PATH or compiler configuration so that the native linker is
2058 *** used, and then restart.
2061 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2062 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2063 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2070 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2073 hardcode_shlibpath_var=no
2077 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2078 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2079 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2086 if test "$ld_shlibs" = yes; then
2087 runpath_var=LD_RUN_PATH
2088 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2089 export_dynamic_flag_spec='${wl}--export-dynamic'
2091 cygwin* | mingw* | pw32*)
2092 # dlltool doesn't understand --whole-archive et. al.
2093 whole_archive_flag_spec=
2096 # ancient GNU ld didn't support --whole-archive et. al.
2097 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2098 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2100 whole_archive_flag_spec=
2106 # PORTME fill in a description of your system's linker (not GNU ld)
2109 allow_undefined_flag=unsupported
2110 always_export_symbols=yes
2111 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
2112 # Note: this linker hardcodes the directories in LIBPATH if there
2113 # are no directories specified by -L.
2114 hardcode_minus_L=yes
2115 if test "$GCC" = yes && test -z "$link_static_flag"; then
2116 # Neither direct hardcoding nor static linking is supported with a
2118 hardcode_direct=unsupported
2123 # When large executables or shared objects are built, AIX ld can
2124 # have problems creating the table of contents. If linking a library
2125 # or program results in "error TOC overflow" add -mminimal-toc to
2126 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2127 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2130 hardcode_libdir_separator=':'
2131 if test "$GCC" = yes; then
2132 collect2name=`${CC} -print-prog-name=collect2`
2133 if test -f "$collect2name" && \
2134 strings "$collect2name" | grep resolve_lib_name >/dev/null
2136 # We have reworked collect2
2139 # We have old collect2
2140 hardcode_direct=unsupported
2141 # It fails to find uninstalled libraries when the uninstalled
2142 # path is not listed in the libpath. Setting hardcode_minus_L
2143 # to unsupported forces relinking
2144 hardcode_minus_L=yes
2145 hardcode_libdir_flag_spec='-L$libdir'
2146 hardcode_libdir_separator=
2148 shared_flag='-shared'
2150 if test "$host_cpu" = ia64; then
2153 shared_flag='${wl}-bM:SRE'
2158 if test "$host_cpu" = ia64; then
2159 # On IA64, the linker does run time linking by default, so we don't
2160 # have to do anything special.
2161 aix_use_runtimelinking=no
2162 exp_sym_flag='-Bexport'
2165 # Test if we are trying to use run time linking, or normal AIX style linking.
2166 # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
2167 aix_use_runtimelinking=no
2168 for ld_flag in $LDFLAGS; do
2169 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
2170 aix_use_runtimelinking=yes
2174 exp_sym_flag='-bexport'
2175 no_entry_flag='-bnoentry'
2177 # It seems that -bexpall can do strange things, so it is better to
2178 # generate a list of symbols to export.
2179 always_export_symbols=yes
2180 if test "$aix_use_runtimelinking" = yes; then
2181 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2182 allow_undefined_flag=' -Wl,-G'
2183 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2185 if test "$host_cpu" = ia64; then
2186 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2187 allow_undefined_flag="-znodefs"
2188 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2190 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2191 # Warning - without using the other run time loading flags, -berok will
2192 # link without error, but may produce a broken library.
2193 allow_undefined_flag='${wl}-berok"
2194 # This is a bit strange, but is similar to how AIX traditionally builds
2195 # it's shared libraries.
2196 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2202 archive_cmds='$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)'
2203 hardcode_libdir_flag_spec='-L$libdir'
2204 hardcode_minus_L=yes
2205 # see comment about different semantics on the GNU ld section
2209 cygwin* | mingw* | pw32*)
2210 # When not using gcc, we currently assume that we are using
2211 # Microsoft Visual C++.
2212 # hardcode_libdir_flag_spec is actually meaningless, as there is
2213 # no search path for DLLs.
2214 hardcode_libdir_flag_spec=' '
2215 allow_undefined_flag=unsupported
2216 # Tell ltmain to make .lib files, not .a files.
2218 # FIXME: Setting linknames here is a bad hack.
2219 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2220 # The linker will automatically build a .lib file if we build a DLL.
2221 old_archive_from_new_cmds='true'
2222 # FIXME: Should let the user specify the lib program.
2223 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2224 fix_srcfile_path='`cygpath -w "$srcfile"`'
2227 darwin* | rhapsody*)
2228 allow_undefined_flag='-undefined suppress'
2229 # FIXME: Relying on posixy $() will cause problems for
2230 # cross-compilation, but unfortunately the echo tests do not
2231 # yet detect zsh echo's removal of \ escapes.
2232 archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
2233 # We need to add '_' to the symbols in $export_symbols first
2234 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2236 hardcode_shlibpath_var=no
2237 whole_archive_flag_spec='-all_load $convenience'
2244 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2245 # support. Future versions do this automatically, but an explicit c++rt0.o
2246 # does not break anything, and helps significantly (at the cost of a little
2249 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2250 hardcode_libdir_flag_spec='-R$libdir'
2252 hardcode_shlibpath_var=no
2255 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2257 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2259 hardcode_minus_L=yes
2260 hardcode_shlibpath_var=no
2263 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2265 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2266 hardcode_libdir_flag_spec='-R$libdir'
2268 hardcode_shlibpath_var=no
2271 hpux9* | hpux10* | hpux11*)
2273 hpux9*) archive_cmds='$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' ;;
2274 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2276 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2277 hardcode_libdir_separator=:
2279 hardcode_minus_L=yes # Not in the search PATH, but as the default
2280 # location of the library.
2281 export_dynamic_flag_spec='${wl}-E'
2285 if test "$GCC" = yes; then
2286 archive_cmds='$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'
2288 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2290 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2291 hardcode_libdir_separator=:
2292 link_all_deplibs=yes
2296 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2297 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2299 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2301 hardcode_libdir_flag_spec='-R$libdir'
2303 hardcode_shlibpath_var=no
2307 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
2309 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2310 hardcode_libdir_separator=:
2311 hardcode_shlibpath_var=no
2315 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2316 hardcode_libdir_flag_spec='-R$libdir'
2318 hardcode_shlibpath_var=no
2322 hardcode_libdir_flag_spec='-L$libdir'
2323 hardcode_minus_L=yes
2324 allow_undefined_flag=unsupported
2325 archive_cmds='$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'
2326 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2330 if test "$GCC" = yes; then
2331 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2332 archive_cmds='$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'
2334 allow_undefined_flag=' -expect_unresolved \*'
2335 archive_cmds='$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'
2337 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2338 hardcode_libdir_separator=:
2341 osf4* | osf5*) # as osf3* with the addition of -msym flag
2342 if test "$GCC" = yes; then
2343 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2344 archive_cmds='$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'
2345 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2347 allow_undefined_flag=' -expect_unresolved \*'
2348 archive_cmds='$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'
2349 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2350 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
2352 #Both c and cxx compiler support -rpath directly
2353 hardcode_libdir_flag_spec='-rpath $libdir'
2355 hardcode_libdir_separator=:
2359 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2360 hardcode_shlibpath_var=no
2361 runpath_var=LD_RUN_PATH
2362 hardcode_runpath_var=yes
2366 no_undefined_flag=' -z defs'
2367 # $CC -shared without GNU ld will not create a library from C++
2368 # object files and a static libstdc++, better avoid it by now
2369 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2370 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2371 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2372 hardcode_libdir_flag_spec='-R$libdir'
2373 hardcode_shlibpath_var=no
2375 [solaris2.[0-5] | solaris2.[0-5].*]) ;;
2376 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2377 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2379 link_all_deplibs=yes
2383 if test "x$host_vendor" = xsequent; then
2384 # Use $CC to link under sequent, because it throws in some extra .o
2385 # files that make .init and .fini sections work.
2386 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2388 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2390 hardcode_libdir_flag_spec='-L$libdir'
2392 hardcode_minus_L=yes
2393 hardcode_shlibpath_var=no
2397 if test "x$host_vendor" = xsno; then
2398 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts'
2399 hardcode_direct=yes # is this really true???
2401 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2402 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2404 runpath_var='LD_RUN_PATH'
2405 hardcode_shlibpath_var=no
2409 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2410 hardcode_shlibpath_var=no
2411 export_dynamic_flag_spec='-Bexport'
2415 no_undefined_flag=' -z text'
2416 # $CC -shared without GNU ld will not create a library from C++
2417 # object files and a static libstdc++, better avoid it by now
2418 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2419 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2420 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2421 hardcode_libdir_flag_spec=
2422 hardcode_shlibpath_var=no
2423 runpath_var='LD_RUN_PATH'
2427 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2428 hardcode_libdir_flag_spec='-L$libdir'
2429 hardcode_shlibpath_var=no
2433 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2434 hardcode_libdir_flag_spec='-L$libdir'
2435 hardcode_shlibpath_var=no
2439 if test -d /usr/nec; then
2440 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2441 hardcode_shlibpath_var=no
2442 runpath_var=LD_RUN_PATH
2443 hardcode_runpath_var=yes
2449 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2452 hardcode_shlibpath_var=no
2453 hardcode_runpath_var=yes
2454 runpath_var=LD_RUN_PATH
2457 sysv5uw7* | unixware7*)
2458 no_undefined_flag='${wl}-z ${wl}text'
2459 if test "$GCC" = yes; then
2460 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2462 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2464 runpath_var='LD_RUN_PATH'
2465 hardcode_shlibpath_var=no
2473 AC_MSG_RESULT([$ld_shlibs])
2474 test "$ld_shlibs" = no && can_build_shared=no
2478 ## FIXME: this should be a separate macro
2480 # Check hardcoding attributes.
2481 AC_MSG_CHECKING([how to hardcode library paths into programs])
2483 if test -n "$hardcode_libdir_flag_spec" || \
2484 test -n "$runpath_var"; then
2486 # We can hardcode non-existant directories.
2487 if test "$hardcode_direct" != no &&
2488 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2489 # have to relink, otherwise we might link with an installed library
2490 # when we should be linking with a yet-to-be-installed one
2491 ## test "$hardcode_shlibpath_var" != no &&
2492 test "$hardcode_minus_L" != no; then
2493 # Linking always hardcodes the temporary library directory.
2494 hardcode_action=relink
2496 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2497 hardcode_action=immediate
2500 # We cannot hardcode anything, or else we can only hardcode existing
2502 hardcode_action=unsupported
2504 AC_MSG_RESULT([$hardcode_action])
2508 ## FIXME: this should be a separate macro
2512 AC_MSG_CHECKING([whether stripping libraries is possible])
2513 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2514 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2515 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2516 AC_MSG_RESULT([yes])
2523 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2524 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2526 ## FIXME: this should be a separate macro
2528 # PORTME Fill in your ld.so characteristics
2529 AC_MSG_CHECKING([dynamic linker characteristics])
2531 libname_spec='lib$name'
2538 shlibpath_overrides_runpath=unknown
2540 dynamic_linker="$host_os ld.so"
2541 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2542 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2547 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2548 shlibpath_var=LIBPATH
2550 # AIX has no versioning support, so we append a major version to the name.
2551 soname_spec='${libname}${release}.so$major'
2556 if test "$host_cpu" = ia64; then
2557 # AIX 5 supports IA64
2558 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2559 shlibpath_var=LD_LIBRARY_PATH
2561 # With GCC up to 2.95.x, collect2 would create an import file
2562 # for dependence libraries. The import file would start with
2563 # the line `#! .'. This would cause the generated library to
2564 # depend on `.', always an invalid library. This was fixed in
2565 # development snapshots of GCC prior to 3.0.
2567 [ aix4 | aix4.[01] | aix4.[01].*)]
2568 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2570 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2577 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2578 # soname into executable. Probably we can add versioning support to
2579 # collect2, so additional links can be useful in future.
2580 if test "$aix_use_runtimelinking" = yes; then
2581 # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
2582 # lib<name>.a to let people know that these are not typical AIX shared libraries.
2583 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2585 # We preserve .a as extension for shared libraries through AIX4.2
2586 # and later when we are not doing run time linking.
2587 library_names_spec='${libname}${release}.a $libname.a'
2588 soname_spec='${libname}${release}.so$major'
2590 shlibpath_var=LIBPATH
2591 deplibs_check_method=pass_all
2596 library_names_spec='$libname.ixlibrary $libname.a'
2597 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2598 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'
2602 library_names_spec='${libname}.so'
2603 dynamic_linker="$host_os ld.so"
2604 shlibpath_var=LIBRARY_PATH
2610 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2611 soname_spec='${libname}${release}.so$major'
2612 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2613 shlibpath_var=LD_LIBRARY_PATH
2614 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2615 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2616 export_dynamic_flag_spec=-rdynamic
2617 # the default ld.so.conf also contains /usr/contrib/lib and
2618 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2619 # libtool to hard-code these into programs
2622 cygwin* | mingw* | pw32*)
2623 version_type=windows
2626 case $GCC,$host_os in
2628 library_names_spec='$libname.dll.a'
2629 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
2630 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2631 dldir=$destdir/`dirname \$dlpath`~
2632 test -d \$dldir || mkdir -p \$dldir~
2633 $install_prog .libs/$dlname \$dldir/$dlname'
2634 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2635 dlpath=$dir/\$dldll~
2639 library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
2640 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2643 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2646 library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll $libname.lib'
2649 dynamic_linker='Win32 ld.exe'
2650 # FIXME: first we should search . and the directory the executable is in
2654 darwin* | rhapsody*)
2655 dynamic_linker="$host_os dyld"
2659 # FIXME: Relying on posixy $() will cause problems for
2660 # cross-compilation, but unfortunately the echo tests do not
2661 # yet detect zsh echo's removal of \ escapes.
2662 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
2663 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2664 shlibpath_overrides_runpath=yes
2665 shlibpath_var=DYLD_LIBRARY_PATH
2673 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2674 version_type=freebsd-$objformat
2675 case $version_type in
2677 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2682 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2686 shlibpath_var=LD_LIBRARY_PATH
2689 shlibpath_overrides_runpath=yes
2692 shlibpath_overrides_runpath=no
2693 hardcode_into_libs=yes
2702 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2703 soname_spec='${libname}${release}.so$major'
2704 shlibpath_var=LD_LIBRARY_PATH
2705 hardcode_into_libs=yes
2708 hpux9* | hpux10* | hpux11*)
2709 # Give a soname corresponding to the major version so that dld.sl refuses to
2710 # link against other versions.
2711 dynamic_linker="$host_os dld.sl"
2715 shlibpath_var=SHLIB_PATH
2716 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2717 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2718 soname_spec='${libname}${release}.sl$major'
2719 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2720 postinstall_cmds='chmod 555 $lib'
2727 soname_spec='${libname}${release}.so$major'
2728 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2734 case $LD in # libtool.m4 will add one of these switches to LD
2735 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2736 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2737 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2738 *) libsuff= shlibsuff= libmagic=never-match;;
2742 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2743 shlibpath_overrides_runpath=no
2744 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2745 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2748 # No shared lib support for Linux oldld, aout, or coff.
2749 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2753 # This must be Linux ELF.
2758 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2759 soname_spec='${libname}${release}.so$major'
2760 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2761 shlibpath_var=LD_LIBRARY_PATH
2762 shlibpath_overrides_runpath=no
2763 # This implies no fast_install, which is unacceptable.
2764 # Some rework will be needed to allow for fast_install
2765 # before this can be enabled.
2766 hardcode_into_libs=yes
2768 # We used to test for /lib/ld.so.1 and disable shared libraries on
2769 # powerpc, because MkLinux only supported shared libraries with the
2770 # GNU dynamic linker. Since this was broken with cross compilers,
2771 # most powerpc-linux boxes support dynamic linking these days and
2772 # people can always --disable-shared, the test was removed, and we
2773 # assume the GNU/Linux dynamic linker is in use.
2774 dynamic_linker='GNU/Linux ld.so'
2781 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2782 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2783 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2784 dynamic_linker='NetBSD (a.out) ld.so'
2786 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2787 soname_spec='${libname}${release}.so$major'
2788 dynamic_linker='NetBSD ld.elf_so'
2790 shlibpath_var=LD_LIBRARY_PATH
2791 shlibpath_overrides_runpath=yes
2792 hardcode_into_libs=yes
2797 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2798 shlibpath_var=LD_LIBRARY_PATH
2799 shlibpath_overrides_runpath=yes
2804 if test "$with_gnu_ld" = yes; then
2808 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2809 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2810 shlibpath_var=LD_LIBRARY_PATH
2814 libname_spec='$name'
2816 library_names_spec='$libname.dll $libname.a'
2817 dynamic_linker='OS/2 ld.exe'
2818 shlibpath_var=LIBPATH
2821 osf3* | osf4* | osf5*)
2824 soname_spec='${libname}${release}.so'
2825 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2826 shlibpath_var=LD_LIBRARY_PATH
2827 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2828 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2833 soname_spec='${libname}${release}.so$major'
2834 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2835 shlibpath_var=LD_LIBRARY_PATH
2842 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2843 soname_spec='${libname}${release}.so$major'
2844 shlibpath_var=LD_LIBRARY_PATH
2845 shlibpath_overrides_runpath=yes
2846 hardcode_into_libs=yes
2847 # ldd complains unless libraries are executable
2848 postinstall_cmds='chmod +x $lib'
2853 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2854 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2855 shlibpath_var=LD_LIBRARY_PATH
2856 shlibpath_overrides_runpath=yes
2857 if test "$with_gnu_ld" = yes; then
2863 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2865 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2866 soname_spec='${libname}${release}.so$major'
2867 shlibpath_var=LD_LIBRARY_PATH
2868 case $host_vendor in
2870 shlibpath_overrides_runpath=no
2875 shlibpath_overrides_runpath=no
2876 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2883 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2884 soname_spec='${libname}${release}.so$major'
2885 shlibpath_var=LD_LIBRARY_PATH
2892 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2893 soname_spec='${libname}${release}.so$major'
2894 shlibpath_var=LD_LIBRARY_PATH
2898 if test -d /usr/nec ;then
2900 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2901 soname_spec='$libname.so.$major'
2902 shlibpath_var=LD_LIBRARY_PATH
2910 AC_MSG_RESULT([$dynamic_linker])
2911 test "$dynamic_linker" = no && can_build_shared=no
2915 ## FIXME: this should be a separate macro
2917 # Report the final consequences.
2918 AC_MSG_CHECKING([if libtool supports shared libraries])
2919 AC_MSG_RESULT([$can_build_shared])
2923 if test "$hardcode_action" = relink; then
2924 # Fast installation is not supported
2925 enable_fast_install=no
2926 elif test "$shlibpath_overrides_runpath" = yes ||
2927 test "$enable_shared" = no; then
2928 # Fast installation is not necessary
2929 enable_fast_install=needless
2932 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2933 if test "$GCC" = yes; then
2934 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2937 AC_LIBTOOL_DLOPEN_SELF
2939 ## FIXME: this should be a separate macro
2941 if test "$enable_shared" = yes && test "$GCC" = yes; then
2942 case $archive_cmds in
2944 # FIXME: we may have to deal with multi-command sequences.
2947 # Test whether the compiler implicitly links with -lc since on some
2948 # systems, -lgcc has to come before -lc. If gcc already passes -lc
2949 # to ld, don't add -lc before -lgcc.
2950 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2951 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2953 echo 'static int dummy;' > conftest.$ac_ext
2955 if AC_TRY_EVAL(ac_compile); then
2958 libobjs=conftest.$ac_objext
2960 wl=$lt_cv_prog_cc_wl
2966 save_allow_undefined_flag=$allow_undefined_flag
2967 allow_undefined_flag=
2968 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2970 lt_cv_archive_cmds_need_lc=no
2972 lt_cv_archive_cmds_need_lc=yes
2974 allow_undefined_flag=$save_allow_undefined_flag
2976 cat conftest.err 1>&5
2978 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2982 need_lc=${lt_cv_archive_cmds_need_lc-yes}
2986 ## FIXME: this should be a separate macro
2988 # The second clause should only fire when bootstrapping the
2989 # libtool distribution, otherwise you forgot to ship ltmain.sh
2990 # with your package, and you will get complaints that there are
2991 # no rules to generate ltmain.sh.
2992 if test -f "$ltmain"; then
2995 # If there is no Makefile yet, we rely on a make rule to execute
2996 # `config.status --recheck' to rerun these tests and create the
2997 # libtool script then.
2998 test -f Makefile && make "$ltmain"
3001 if test -f "$ltmain"; then
3002 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3005 echo creating $ofile
3007 # Now quote all the things that may contain metacharacters while being
3008 # careful not to overquote the AC_SUBSTed values. We take copies of the
3009 # variables and quote the copies for generation of the libtool script.
3010 for var in echo old_CC old_CFLAGS \
3011 AR AR_FLAGS CC LD LN_S NM SHELL \
3012 reload_flag reload_cmds wl \
3013 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3014 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3015 library_names_spec soname_spec \
3016 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3017 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3018 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3019 old_striplib striplib file_magic_cmd export_symbols_cmds \
3020 deplibs_check_method allow_undefined_flag no_undefined_flag \
3021 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3022 hardcode_libdir_flag_spec hardcode_libdir_separator \
3023 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3024 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3027 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3028 old_postinstall_cmds | old_postuninstall_cmds | \
3029 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3030 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3031 postinstall_cmds | postuninstall_cmds | \
3032 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3033 # Double-quote double-evaled strings.
3034 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3037 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3042 cat <<__EOF__ > "${ofile}T"
3045 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3046 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3047 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3049 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3050 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3052 # This program is free software; you can redistribute it and/or modify
3053 # it under the terms of the GNU General Public License as published by
3054 # the Free Software Foundation; either version 2 of the License, or
3055 # (at your option) any later version.
3057 # This program is distributed in the hope that it will be useful, but
3058 # WITHOUT ANY WARRANTY; without even the implied warranty of
3059 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3060 # General Public License for more details.
3062 # You should have received a copy of the GNU General Public License
3063 # along with this program; if not, write to the Free Software
3064 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3066 # As a special exception to the GNU General Public License, if you
3067 # distribute this file as part of a program that contains a
3068 # configuration script generated by Autoconf, you may include it under
3069 # the same distribution terms that you use for the rest of that program.
3071 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3072 Xsed="sed -e s/^X//"
3074 # The HP-UX ksh and POSIX shell print the target directory to stdout
3076 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3078 # ### BEGIN LIBTOOL CONFIG
3080 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3082 # Shell to use when invoking shell scripts.
3085 # Whether or not to build shared libraries.
3086 build_libtool_libs=$enable_shared
3088 # Whether or not to add -lc for building shared libraries.
3089 build_libtool_need_lc=$need_lc
3091 # Whether or not to build static libraries.
3092 build_old_libs=$enable_static
3094 # Whether or not to optimize for fast installation.
3095 fast_install=$enable_fast_install
3098 host_alias=$host_alias
3101 # An echo program that does not interpret backslashes.
3106 AR_FLAGS=$lt_AR_FLAGS
3108 # The default C compiler.
3111 # Is the compiler the GNU C compiler?
3114 # The linker used to build libraries.
3117 # Whether we need hard or soft links.
3120 # A BSD-compatible nm program.
3123 # A symbol stripping program
3126 # Used to examine libraries when file_magic_cmd begins "file"
3127 MAGIC_CMD=$MAGIC_CMD
3129 # Used on cygwin: DLL creation program.
3132 # Used on cygwin: object dumper.
3135 # Used on cygwin: assembler.
3138 # The name of the directory that contains temporary libtool files.
3141 # How to create reloadable object files.
3142 reload_flag=$lt_reload_flag
3143 reload_cmds=$lt_reload_cmds
3145 # How to pass a linker flag through the compiler.
3148 # Object file suffix (normally "o").
3151 # Old archive suffix (normally "a").
3154 # Executable file suffix (normally "").
3157 # Additional compiler flags for building library objects.
3158 pic_flag=$lt_pic_flag
3161 # Does compiler simultaneously support -c and -o options?
3162 compiler_c_o=$lt_compiler_c_o
3164 # Can we write directly to a .lo ?
3165 compiler_o_lo=$lt_compiler_o_lo
3167 # Must we lock files when doing compilation ?
3168 need_locks=$lt_need_locks
3170 # Do we need the lib prefix for modules?
3171 need_lib_prefix=$need_lib_prefix
3173 # Do we need a version for libraries?
3174 need_version=$need_version
3176 # Whether dlopen is supported.
3177 dlopen_support=$enable_dlopen
3179 # Whether dlopen of programs is supported.
3180 dlopen_self=$enable_dlopen_self
3182 # Whether dlopen of statically linked programs is supported.
3183 dlopen_self_static=$enable_dlopen_self_static
3185 # Compiler flag to prevent dynamic linking.
3186 link_static_flag=$lt_link_static_flag
3188 # Compiler flag to turn off builtin functions.
3189 no_builtin_flag=$lt_no_builtin_flag
3191 # Compiler flag to allow reflexive dlopens.
3192 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3194 # Compiler flag to generate shared objects directly from archives.
3195 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3197 # Compiler flag to generate thread-safe objects.
3198 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3200 # Library versioning type.
3201 version_type=$version_type
3203 # Format of library name prefix.
3204 libname_spec=$lt_libname_spec
3206 # List of archive names. First name is the real one, the rest are links.
3207 # The last name is the one that the linker finds with -lNAME.
3208 library_names_spec=$lt_library_names_spec
3210 # The coded name of the library, if different from the real name.
3211 soname_spec=$lt_soname_spec
3213 # Commands used to build and install an old-style archive.
3215 old_archive_cmds=$lt_old_archive_cmds
3216 old_postinstall_cmds=$lt_old_postinstall_cmds
3217 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3219 # Create an old-style archive from a shared archive.
3220 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3222 # Create a temporary old-style archive to link instead of a shared archive.
3223 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3225 # Commands used to build and install a shared archive.
3226 archive_cmds=$lt_archive_cmds
3227 archive_expsym_cmds=$lt_archive_expsym_cmds
3228 postinstall_cmds=$lt_postinstall_cmds
3229 postuninstall_cmds=$lt_postuninstall_cmds
3231 # Commands to strip libraries.
3232 old_striplib=$lt_old_striplib
3233 striplib=$lt_striplib
3235 # Method to check whether dependent libraries are shared objects.
3236 deplibs_check_method=$lt_deplibs_check_method
3238 # Command to use when deplibs_check_method == file_magic.
3239 file_magic_cmd=$lt_file_magic_cmd
3241 # Flag that allows shared libraries with undefined symbols to be built.
3242 allow_undefined_flag=$lt_allow_undefined_flag
3244 # Flag that forces no undefined symbols.
3245 no_undefined_flag=$lt_no_undefined_flag
3247 # Commands used to finish a libtool library installation in a directory.
3248 finish_cmds=$lt_finish_cmds
3250 # Same as above, but a single script fragment to be evaled but not shown.
3251 finish_eval=$lt_finish_eval
3253 # Take the output of nm and produce a listing of raw symbols and C names.
3254 global_symbol_pipe=$lt_global_symbol_pipe
3256 # Transform the output of nm in a proper C declaration
3257 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3259 # This is the shared library runtime path variable.
3260 runpath_var=$runpath_var
3262 # This is the shared library path variable.
3263 shlibpath_var=$shlibpath_var
3265 # Is shlibpath searched before the hard-coded library search path?
3266 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3268 # How to hardcode a shared library path into an executable.
3269 hardcode_action=$hardcode_action
3271 # Whether we should hardcode library paths into libraries.
3272 hardcode_into_libs=$hardcode_into_libs
3274 # Flag to hardcode \$libdir into a binary during linking.
3275 # This must work even if \$libdir does not exist.
3276 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3278 # Whether we need a single -rpath flag with a separated argument.
3279 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3281 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3283 hardcode_direct=$hardcode_direct
3285 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3287 hardcode_minus_L=$hardcode_minus_L
3289 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3290 # the resulting binary.
3291 hardcode_shlibpath_var=$hardcode_shlibpath_var
3293 # Variables whose values should be saved in libtool wrapper scripts and
3294 # restored at relink time.
3295 variables_saved_for_relink="$variables_saved_for_relink"
3297 # Whether libtool must link a program against all its dependency libraries.
3298 link_all_deplibs=$link_all_deplibs
3300 # Compile-time system search path for libraries
3301 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3303 # Run-time system search path for libraries
3304 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3306 # Fix the shell variable \$srcfile for the compiler.
3307 fix_srcfile_path="$fix_srcfile_path"
3309 # Set to yes if exported symbols are required.
3310 always_export_symbols=$always_export_symbols
3312 # The commands to list exported symbols.
3313 export_symbols_cmds=$lt_export_symbols_cmds
3315 # The commands to extract the exported symbol list from a shared archive.
3316 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3318 # Symbols that should not be listed in the preloaded symbols.
3319 exclude_expsyms=$lt_exclude_expsyms
3321 # Symbols that must always be exported.
3322 include_expsyms=$lt_include_expsyms
3324 # ### END LIBTOOL CONFIG
3330 cat <<\EOF >> "${ofile}T"
3332 # AIX sometimes has problems with the GCC collect2 program. For some
3333 # reason, if we set the COLLECT_NAMES environment variable, the problems
3334 # vanish in a puff of smoke.
3335 if test "X${COLLECT_NAMES+set}" != Xset; then
3337 export COLLECT_NAMES
3344 cygwin* | mingw* | pw32* | os2*)
3345 cat <<'EOF' >> "${ofile}T"
3346 # This is a source program that is used to create dlls on Windows
3347 # Don't remove nor modify the starting and closing comments
3348 # /* ltdll.c starts here */
3349 # #define WIN32_LEAN_AND_MEAN
3350 # #include <windows.h>
3351 # #undef WIN32_LEAN_AND_MEAN
3352 # #include <stdio.h>
3354 # #ifndef __CYGWIN__
3355 # # ifdef __CYGWIN32__
3356 # # define __CYGWIN__ __CYGWIN32__
3360 # #ifdef __cplusplus
3363 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3364 # #ifdef __cplusplus
3369 # #include <cygwin/cygwin_dll.h>
3370 # DECLARE_CYGWIN_DLL( DllMain );
3372 # HINSTANCE __hDllInstance_base;
3375 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3377 # __hDllInstance_base = hInst;
3380 # /* ltdll.c ends here */
3381 # This is a source program that is used to create import libraries
3382 # on Windows for dlls which lack them. Don't remove nor modify the
3383 # starting and closing comments
3384 # /* impgen.c starts here */
3385 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3387 # This file is part of GNU libtool.
3389 # This program is free software; you can redistribute it and/or modify
3390 # it under the terms of the GNU General Public License as published by
3391 # the Free Software Foundation; either version 2 of the License, or
3392 # (at your option) any later version.
3394 # This program is distributed in the hope that it will be useful,
3395 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3396 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3397 # GNU General Public License for more details.
3399 # You should have received a copy of the GNU General Public License
3400 # along with this program; if not, write to the Free Software
3401 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3404 # #include <stdio.h> /* for printf() */
3405 # #include <unistd.h> /* for open(), lseek(), read() */
3406 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3407 # #include <string.h> /* for strdup() */
3409 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3411 # #define O_BINARY 0
3414 # static unsigned int
3415 # pe_get16 (fd, offset)
3419 # unsigned char b[2];
3420 # lseek (fd, offset, SEEK_SET);
3422 # return b[0] + (b[1]<<8);
3425 # static unsigned int
3426 # pe_get32 (fd, offset)
3430 # unsigned char b[4];
3431 # lseek (fd, offset, SEEK_SET);
3433 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3436 # static unsigned int
3440 # unsigned char *b = ptr;
3441 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3450 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3451 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3452 # unsigned long name_rvas, nexp;
3453 # unsigned char *expdata, *erva;
3454 # char *filename, *dll_name;
3456 # filename = argv[1];
3458 # dll = open(filename, O_RDONLY|O_BINARY);
3462 # dll_name = filename;
3464 # for (i=0; filename[i]; i++)
3465 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3466 # dll_name = filename + i +1;
3468 # pe_header_offset = pe_get32 (dll, 0x3c);
3469 # opthdr_ofs = pe_header_offset + 4 + 20;
3470 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3472 # if (num_entries < 1) /* no exports */
3475 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3476 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3477 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3478 # secptr = (pe_header_offset + 4 + 20 +
3479 # pe_get16 (dll, pe_header_offset + 4 + 16));
3482 # for (i = 0; i < nsections; i++)
3485 # unsigned long secptr1 = secptr + 40 * i;
3486 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3487 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3488 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3489 # lseek(dll, secptr1, SEEK_SET);
3490 # read(dll, sname, 8);
3491 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3493 # expptr = fptr + (export_rva - vaddr);
3494 # if (export_rva + export_size > vaddr + vsize)
3495 # export_size = vsize - (export_rva - vaddr);
3500 # expdata = (unsigned char*)malloc(export_size);
3501 # lseek (dll, expptr, SEEK_SET);
3502 # read (dll, expdata, export_size);
3503 # erva = expdata - export_rva;
3505 # nexp = pe_as32 (expdata+24);
3506 # name_rvas = pe_as32 (expdata+32);
3508 # printf ("EXPORTS\n");
3509 # for (i = 0; i<nexp; i++)
3511 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3512 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3517 # /* impgen.c ends here */
3523 # We use sed instead of cat because bash on DJGPP gets confused if
3524 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3525 # text mode, it properly converts lines to CR/LF. This bash problem
3526 # is reportedly fixed, but why not run on old versions too?
3527 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3529 mv -f "${ofile}T" "$ofile" || \
3530 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3536 ])# _LT_AC_LTCONFIG_HACK
3538 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3539 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3541 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3542 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3544 # AC_ENABLE_SHARED - implement the --enable-shared flag
3545 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3546 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3548 AC_DEFUN([AC_ENABLE_SHARED],
3549 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3550 AC_ARG_ENABLE(shared,
3551 changequote(<<, >>)dnl
3552 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3553 changequote([, ])dnl
3554 [p=${PACKAGE-default}
3556 yes) enable_shared=yes ;;
3557 no) enable_shared=no ;;
3560 # Look at the argument we got. We use all the common list separators.
3561 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3562 for pkg in $enableval; do
3563 if test "X$pkg" = "X$p"; then
3570 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3573 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3574 AC_DEFUN([AC_DISABLE_SHARED],
3575 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3576 AC_ENABLE_SHARED(no)])
3578 # AC_ENABLE_STATIC - implement the --enable-static flag
3579 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3580 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3582 AC_DEFUN([AC_ENABLE_STATIC],
3583 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3584 AC_ARG_ENABLE(static,
3585 changequote(<<, >>)dnl
3586 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3587 changequote([, ])dnl
3588 [p=${PACKAGE-default}
3590 yes) enable_static=yes ;;
3591 no) enable_static=no ;;
3594 # Look at the argument we got. We use all the common list separators.
3595 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3596 for pkg in $enableval; do
3597 if test "X$pkg" = "X$p"; then
3604 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3607 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3608 AC_DEFUN([AC_DISABLE_STATIC],
3609 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3610 AC_ENABLE_STATIC(no)])
3613 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3614 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3615 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3617 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3618 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3619 AC_ARG_ENABLE(fast-install,
3620 changequote(<<, >>)dnl
3621 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3622 changequote([, ])dnl
3623 [p=${PACKAGE-default}
3625 yes) enable_fast_install=yes ;;
3626 no) enable_fast_install=no ;;
3628 enable_fast_install=no
3629 # Look at the argument we got. We use all the common list separators.
3630 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3631 for pkg in $enableval; do
3632 if test "X$pkg" = "X$p"; then
3633 enable_fast_install=yes
3639 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3642 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3643 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3644 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3645 AC_ENABLE_FAST_INSTALL(no)])
3647 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3648 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3649 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3651 AC_DEFUN([AC_LIBTOOL_PICMODE],
3652 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3653 pic_mode=ifelse($#,1,$1,default)])
3656 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3657 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3658 [AC_MSG_CHECKING([for $1])
3659 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3662 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3665 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3668 ac_save_MAGIC_CMD="$MAGIC_CMD"
3669 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3670 dnl $ac_dummy forces splitting on constant user-supplied paths.
3671 dnl POSIX.2 word splitting is done only on the output of word expansions,
3672 dnl not every word. This closes a longstanding sh security hole.
3673 ac_dummy="ifelse([$2], , $PATH, [$2])"
3674 for ac_dir in $ac_dummy; do
3675 test -z "$ac_dir" && ac_dir=.
3676 if test -f $ac_dir/$1; then
3677 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3678 if test -n "$file_magic_test_file"; then
3679 case $deplibs_check_method in
3681 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3682 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3683 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3684 egrep "$file_magic_regex" > /dev/null; then
3689 *** Warning: the command libtool uses to detect shared libraries,
3690 *** $file_magic_cmd, produces output that libtool cannot recognize.
3691 *** The result is that libtool may fail to recognize shared libraries
3692 *** as such. This will affect the creation of libtool libraries that
3693 *** depend on shared libraries, but programs linked with such libtool
3694 *** libraries will work regardless of this problem. Nevertheless, you
3695 *** may want to report the problem to your system manager and/or to
3696 *** bug-libtool@gnu.org
3706 MAGIC_CMD="$ac_save_MAGIC_CMD"
3709 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3710 if test -n "$MAGIC_CMD"; then
3711 AC_MSG_RESULT($MAGIC_CMD)
3718 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3719 AC_DEFUN([AC_PATH_MAGIC],
3720 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3721 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3722 if test -z "$lt_cv_path_MAGIC_CMD"; then
3723 if test -n "$ac_tool_prefix"; then
3724 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3732 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3733 AC_DEFUN([AC_PROG_LD],
3734 [AC_ARG_WITH(gnu-ld,
3735 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3736 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3737 AC_REQUIRE([AC_PROG_CC])dnl
3738 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3739 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3741 if test "$GCC" = yes; then
3742 # Check if gcc -print-prog-name=ld gives a path.
3743 AC_MSG_CHECKING([for ld used by GCC])
3746 # gcc leaves a trailing carriage return which upsets mingw
3747 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3749 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3752 # Accept absolute paths.
3753 [[\\/]* | [A-Za-z]:[\\/]*)]
3754 [re_direlt='/[^/][^/]*/\.\./']
3755 # Canonicalize the path of ld
3756 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3757 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3758 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3760 test -z "$LD" && LD="$ac_prog"
3763 # If it fails, then pretend we aren't using GCC.
3767 # If it is relative, then search for the first ld in PATH.
3771 elif test "$with_gnu_ld" = yes; then
3772 AC_MSG_CHECKING([for GNU ld])
3774 AC_MSG_CHECKING([for non-GNU ld])
3776 AC_CACHE_VAL(lt_cv_path_LD,
3777 [if test -z "$LD"; then
3778 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3779 for ac_dir in $PATH; do
3780 test -z "$ac_dir" && ac_dir=.
3781 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3782 lt_cv_path_LD="$ac_dir/$ac_prog"
3783 # Check to see if the program is GNU ld. I'd rather use --version,
3784 # but apparently some GNU ld's only accept -v.
3785 # Break only if it was the GNU/non-GNU ld that we prefer.
3786 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3787 test "$with_gnu_ld" != no && break
3789 test "$with_gnu_ld" != yes && break
3795 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3798 if test -n "$LD"; then
3803 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3808 AC_DEFUN([AC_PROG_LD_GNU],
3809 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3810 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3811 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3812 lt_cv_prog_gnu_ld=yes
3814 lt_cv_prog_gnu_ld=no
3816 with_gnu_ld=$lt_cv_prog_gnu_ld
3819 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3820 # -- PORTME Some linkers may need a different reload flag.
3821 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3822 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3823 [lt_cv_ld_reload_flag='-r'])
3824 reload_flag=$lt_cv_ld_reload_flag
3825 test -n "$reload_flag" && reload_flag=" $reload_flag"
3828 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3829 # -- PORTME fill in with the dynamic library characteristics
3830 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3831 [AC_CACHE_CHECK([how to recognise dependant libraries],
3832 lt_cv_deplibs_check_method,
3833 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3834 lt_cv_file_magic_test_file=
3835 lt_cv_deplibs_check_method='unknown'
3836 # Need to set the preceding variable on all platforms that support
3837 # interlibrary dependencies.
3838 # 'none' -- dependencies not supported.
3839 # `unknown' -- same as none, but documents that we really don't know.
3840 # 'pass_all' -- all dependencies passed with no checks.
3841 # 'test_compile' -- check by making test program.
3842 # ['file_magic [regex]'] -- check by looking for files in library path
3843 # which responds to the $file_magic_cmd with a given egrep regex.
3844 # If you have `file' or equivalent on your system and you're not sure
3845 # whether `pass_all' will *always* work, you probably want this one.
3849 lt_cv_deplibs_check_method=pass_all
3853 lt_cv_deplibs_check_method=pass_all
3857 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
3858 lt_cv_file_magic_cmd='/usr/bin/file -L'
3859 lt_cv_file_magic_test_file=/shlib/libc.so
3862 cygwin* | mingw* | pw32*)
3863 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3864 lt_cv_file_magic_cmd='$OBJDUMP -f'
3867 darwin* | rhapsody*)
3868 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3869 lt_cv_file_magic_cmd='/usr/bin/file -L'
3871 rhapsody* | darwin1.[012])
3872 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3875 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3881 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3884 # Not sure whether the presence of OpenBSD here was a mistake.
3885 # Let's accept both of them until this is cleared up.
3886 [lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
3887 lt_cv_file_magic_cmd=/usr/bin/file
3888 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3892 lt_cv_deplibs_check_method=pass_all
3897 lt_cv_deplibs_check_method=pass_all
3901 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
3902 lt_cv_file_magic_cmd=/usr/bin/file
3903 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3909 # this will be overridden with pass_all, but let us keep it just in case
3910 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3914 *-32|*"-32 ") libmagic=32-bit;;
3915 *-n32|*"-n32 ") libmagic=N32;;
3916 *-64|*"-64 ") libmagic=64-bit;;
3917 *) libmagic=never-match;;
3919 # this will be overridden with pass_all, but let us keep it just in case
3920 [lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
3923 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3924 lt_cv_deplibs_check_method=pass_all
3927 # This must be Linux ELF.
3930 alpha* | i*86 | powerpc* | sparc* | ia64* )
3931 lt_cv_deplibs_check_method=pass_all ;;
3933 # glibc up to 2.1.1 does not perform some relocations on ARM
3934 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;]
3936 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3940 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3941 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
3943 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
3948 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
3949 lt_cv_file_magic_cmd=/usr/bin/file
3950 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3953 osf3* | osf4* | osf5*)
3954 # this will be overridden with pass_all, but let us keep it just in case
3955 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3956 lt_cv_file_magic_test_file=/shlib/libc.so
3957 lt_cv_deplibs_check_method=pass_all
3961 lt_cv_deplibs_check_method=pass_all
3965 lt_cv_deplibs_check_method=pass_all
3966 lt_cv_file_magic_test_file=/lib/libc.so
3969 [sysv5uw[78]* | sysv4*uw2*)]
3970 lt_cv_deplibs_check_method=pass_all
3973 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3974 case $host_vendor in
3976 [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]']
3977 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3980 lt_cv_deplibs_check_method=pass_all
3983 lt_cv_file_magic_cmd='/bin/file'
3984 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )']
3987 lt_cv_file_magic_cmd='/bin/file'
3988 [lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"]
3989 lt_cv_file_magic_test_file=/lib/libc.so
3995 file_magic_cmd=$lt_cv_file_magic_cmd
3996 deplibs_check_method=$lt_cv_deplibs_check_method
4000 # AC_PROG_NM - find the path to a BSD-compatible name lister
4001 AC_DEFUN([AC_PROG_NM],
4002 [AC_MSG_CHECKING([for BSD-compatible nm])
4003 AC_CACHE_VAL(lt_cv_path_NM,
4004 [if test -n "$NM"; then
4005 # Let the user override the test.
4008 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4009 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4010 test -z "$ac_dir" && ac_dir=.
4011 tmp_nm=$ac_dir/${ac_tool_prefix}nm
4012 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4013 # Check to see if the nm accepts a BSD-compat flag.
4014 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4015 # nm: unknown option "B" ignored
4016 # Tru64's nm complains that /dev/null is an invalid object file
4017 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4018 lt_cv_path_NM="$tmp_nm -B"
4020 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4021 lt_cv_path_NM="$tmp_nm -p"
4024 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4025 continue # so that we can try to find one that supports BSD flags
4030 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4033 AC_MSG_RESULT([$NM])
4036 # AC_CHECK_LIBM - check for math library
4037 AC_DEFUN([AC_CHECK_LIBM],
4038 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4041 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4042 # These system don't have libm
4045 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4046 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4049 AC_CHECK_LIB(m, main, LIBM="-lm")
4054 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4055 # the libltdl convenience library and INCLTDL to the include flags for
4056 # the libltdl header and adds --enable-ltdl-convenience to the
4057 # configure arguments. Note that LIBLTDL and INCLTDL are not
4058 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4059 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4060 # with '${top_builddir}/' and INCLTDL will be prefixed with
4061 # '${top_srcdir}/' (note the single quotes!). If your package is not
4062 # flat and you're not using automake, define top_builddir and
4063 # top_srcdir appropriately in the Makefiles.
4064 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4065 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4066 case $enable_ltdl_convenience in
4067 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4068 "") enable_ltdl_convenience=yes
4069 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4071 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4072 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4075 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4076 # the libltdl installable library and INCLTDL to the include flags for
4077 # the libltdl header and adds --enable-ltdl-install to the configure
4078 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4079 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4080 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4081 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4082 # with '${top_srcdir}/' (note the single quotes!). If your package is
4083 # not flat and you're not using automake, define top_builddir and
4084 # top_srcdir appropriately in the Makefiles.
4085 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4086 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4087 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4088 AC_CHECK_LIB(ltdl, main,
4089 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4090 [if test x"$enable_ltdl_install" = xno; then
4091 AC_MSG_WARN([libltdl not installed, but installation disabled])
4093 enable_ltdl_install=yes
4096 if test x"$enable_ltdl_install" = x"yes"; then
4097 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4098 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4099 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4101 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4108 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4109 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4110 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4111 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4112 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4113 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4114 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4116 # This is just to silence aclocal about the macro not being used
4117 ifelse([AC_DISABLE_FAST_INSTALL])