1 # aclocal.m4 generated automatically by aclocal 1.5
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
16 dnl Copyright 1996 by the Massachusetts Institute of Technology.
18 dnl Permission to use, copy, modify, and distribute this
19 dnl software and its documentation for any purpose and without
20 dnl fee is hereby granted, provided that the above copyright
21 dnl notice appear in all copies and that both that copyright
22 dnl notice and this permission notice appear in supporting
23 dnl documentation, and that the name of M.I.T. not be used in
24 dnl advertising or publicity pertaining to distribution of the
25 dnl software without specific, written prior permission.
26 dnl M.I.T. makes no representations about the suitability of
27 dnl this software for any purpose. It is provided "as is"
28 dnl without express or implied warranty.
30 dnl This file provides local macros for packages which use specific
31 dnl external libraries. The public macros are:
33 dnl ATHENA_RESOLV_CHECK
34 dnl Checks to see if the resolver library is present and
35 dnl provides "res_send" or "__res_send" (the latter is used
37 dnl ATHENA_UTIL_COM_ERR
38 dnl Generates error if com_err not found.
40 dnl Generates error if ss not found.
42 dnl Sets REGEX_LIBS if rx library used; ensures POSIX
45 dnl Sets MOTIF_LIBS and defines HAVE_MOTIF if Motif used.
46 dnl ATHENA_MOTIF_REQUIRED
47 dnl Generates error if Motif not found.
49 dnl Sets AFS_LIBS and defines HAVE_AFS if AFS used. Pass
50 dnl in an argument giving the desired AFS libraries;
51 dnl AFS_LIBS will be set to that value if AFS is found.
52 dnl AFS_DIR will be set to the prefix given.
53 dnl ATHENA_AFS_REQUIRED
54 dnl Generates error if AFS libraries not found. AFS_DIR
55 dnl will be set to the prefix given.
57 dnl Sets KRB4_LIBS and defines HAVE_KRB4 if krb4 used.
58 dnl ATHENA_KRB4_REQUIRED
59 dnl Generates error if krb4 not found. Sets KRB4_LIBS
60 dnl otherwise. (Special behavior because krb4 libraries
61 dnl may be different if using krb4 compatibility libraries
64 dnl Sets KRB5_LIBS and defines HAVE_KRB5 if krb5 used.
65 dnl ATHENA_KRB5_REQUIRED
66 dnl Generates error if krb5 not found.
68 dnl Sets HESIOD_LIBS and defines HAVE_HESIOD if Hesiod
70 dnl ATHENA_HESIOD_REQUIRED
71 dnl Generates error if Hesiod not found.
73 dnl Sets ARES_LIBS and defines HAVE_ARES if libares
75 dnl ATHENA_ARES_REQUIRED
76 dnl Generates error if libares not found.
78 dnl Sets ZEPHYR_LIBS and defines HAVE_ZEPHYR if zephyr
80 dnl ATHENA_ZEPHYR_REQUIRED
81 dnl Generates error if zephyr not found.
83 dnl All of the macros may extend CPPFLAGS and LDFLAGS to let the
84 dnl compiler find the requested libraries. Put ATHENA_UTIL_COM_ERR
85 dnl and ATHENA_UTIL_SS before ATHENA_AFS or ATHENA_AFS_REQUIRED; there
86 dnl is a com_err library in the AFS libraries which requires -lutil.
88 dnl ----- resolv -----
90 AC_DEFUN(ATHENA_RESOLV_CHECK,
92 AC_CHECK_FUNC(res_send, :,
93 AC_CHECK_LIB(resolv, res_send, r=true,
94 AC_CHECK_LIB(resolv, __res_send, r=true)))
96 AC_DEFINE(HAVE_LIB_RESOLV)
100 dnl ----- com_err -----
102 AC_DEFUN(ATHENA_UTIL_COM_ERR,
103 [AC_ARG_WITH(com_err,
104 [ --with-com_err=PREFIX Specify location of com_err],
105 [com_err="$withval"], [com_err=yes])
106 if test "$com_err" != no; then
107 if test "$com_err" != yes; then
108 CPPFLAGS="$CPPFLAGS -I$com_err/include"
109 LDFLAGS="$LDFLAGS -L$com_err/lib"
111 AC_CHECK_LIB(com_err, com_err, :,
112 [AC_MSG_ERROR(com_err library not found)])
114 AC_MSG_ERROR(This package requires com_err.)
119 AC_DEFUN(ATHENA_UTIL_SS,
121 [ --with-ss=PREFIX Specify location of ss (requires com_err)],
122 [ss="$withval"], [ss=yes])
123 if test "$ss" != no; then
124 if test "$ss" != yes; then
125 CPPFLAGS="$CPPFLAGS -I$ss/include"
126 LDFLAGS="$LDFLAGS -L$ss/lib"
128 AC_CHECK_LIB(ss, ss_perror, :,
129 [unset ac_cv_lib_ss_ss_perror
130 AC_CHECK_LIB(ss, ss_perror, :,
131 [AC_MSG_ERROR(ss library not found)],
132 -ledit -lroken -ltermcap -lcom_err)],
135 AC_MSG_ERROR(This package requires ss.)
138 dnl ----- Regular expressions -----
140 AC_DEFUN(ATHENA_REGEXP,
142 [ --with-regex=PREFIX Use installed regex library],
143 [regex="$withval"], [regex=no])
144 if test "$regex" != no; then
145 if test "$regex" != yes; then
146 CPPFLAGS="$CPPFLAGS -I$regex/include"
147 LDFLAGS="$LDFLAGS -L$regex/lib"
149 AC_CHECK_LIB(regex, regcomp, REGEX_LIBS=-lregex,
150 [AC_MSG_ERROR(regex library not found)])
152 AC_CHECK_FUNC(regcomp, :,
153 [AC_MSG_ERROR(can't find POSIX regexp support)])
155 AC_SUBST(REGEX_LIBS)])
157 dnl ----- Motif -----
159 AC_DEFUN(ATHENA_MOTIF_CHECK,
160 [if test "$motif" != yes; then
161 CPPFLAGS="$CPPFLAGS -I$motif/include"
162 LDFLAGS="$LDFLAGS -L$motif/lib"
164 AC_CHECK_LIB(Xm, XmStringFree, :, [AC_MSG_ERROR(Motif library not found)])])
166 AC_DEFUN(ATHENA_MOTIF,
168 [ --with-motif=PREFIX Use Motif],
169 [motif="$withval"], [motif=no])
170 if test "$motif" != no; then
173 AC_DEFINE(HAVE_MOTIF)
175 AC_SUBST(MOTIF_LIBS)])
177 AC_DEFUN(ATHENA_MOTIF_REQUIRED,
179 [ --with-motif=PREFIX Specify location of Motif],
180 [motif="$withval"], [motif=yes])
181 if test "$motif" != no; then
184 AC_MSG_ERROR(This package requires Motif.)
189 AC_DEFUN(ATHENA_AFS_CHECK,
190 [AC_CHECK_FUNC(insque, :, AC_CHECK_LIB(compat, insque))
191 AC_CHECK_FUNC(gethostbyname, :, AC_CHECK_LIB(nsl, gethostbyname))
192 AC_CHECK_FUNC(socket, :, AC_CHECK_LIB(socket, socket))
193 if test "$afs" != yes; then
194 CPPFLAGS="$CPPFLAGS -I$afs/include"
195 LDFLAGS="$LDFLAGS -L$afs/lib -L$afs/lib/afs"
197 AC_CHECK_LIB(sys, pioctl, :, [AC_MSG_ERROR(AFS libraries not found)],
202 dnl Specify desired AFS libraries as a parameter.
205 [ --with-afs=PREFIX Use AFS libraries],
206 [afs="$withval"], [afs=no])
207 if test "$afs" != no; then
214 AC_DEFUN(ATHENA_AFS_REQUIRED,
216 [ --with-afs=PREFIX Specify location of AFS libraries],
217 [afs="$withval"], [afs=/usr/afsws])
218 if test "$afs" != no; then
221 AC_MSG_ERROR(This package requires AFS libraries.)
224 dnl ----- Kerberos 4 -----
226 AC_DEFUN(ATHENA_KRB4_CHECK,
227 [AC_CHECK_FUNC(gethostbyname, :, AC_CHECK_LIB(nsl, gethostbyname))
228 AC_CHECK_FUNC(socket, :, AC_CHECK_LIB(socket, socket))
229 AC_CHECK_LIB(gen, compile)
230 AC_REQUIRE([ATHENA_RESOLV_CHECK])
231 if test "$krb4" != yes; then
232 CPPFLAGS="$CPPFLAGS -I$krb4/include"
233 if test -d "$krb4/include/kerberosIV"; then
234 CPPFLAGS="$CPPFLAGS -I$krb4/include/kerberosIV"
236 LDFLAGS="$LDFLAGS -L$krb4/lib"
238 if test -d "/usr/include/kerberosIV"; then
239 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
242 AC_CHECK_LIB(krb4, krb_rd_req,
243 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
244 [AC_CHECK_LIB(krb, krb_rd_req,
245 [KRB4_LIBS="-lkrb -ldes -lroken -lcom_err"],
246 [AC_MSG_ERROR(Kerberos 4 libraries not found)],
247 -ldes -lroken -lcom_err)],
248 -ldes425 -lkrb5 -lk5crypto -lcom_err)])
250 AC_DEFUN(ATHENA_KRB4,
252 [ --with-krb4=PREFIX Use Kerberos 4],
253 [krb4="$withval"], [krb4=no])
254 if test "$krb4" != no; then
258 AC_SUBST(KRB4_LIBS)])
260 AC_DEFUN(ATHENA_KRB4_REQUIRED,
262 [ --with-krb4=PREFIX Specify location of Kerberos 4],
263 [krb4="$withval"], [krb4=yes])
264 if test "$krb4" != no; then
268 AC_MSG_ERROR(This package requires Kerberos 4.)
271 dnl ----- Kerberos 5 -----
273 AC_DEFUN(ATHENA_KRB5_CHECK,
274 [AC_SEARCH_LIBS(gethostbyname, nsl)
275 AC_SEARCH_LIBS(socket, socket)
276 AC_CHECK_LIB(gen, compile)
277 AC_REQUIRE([ATHENA_RESOLV_CHECK])
278 if test "$krb5" != yes; then
279 CPPFLAGS="$CPPFLAGS -I$krb5/include"
280 LDFLAGS="$LDFLAGS -L$krb5/lib"
282 AC_CHECK_LIB(krb5, krb5_init_context, :,
283 [AC_MSG_ERROR(Kerberos 5 libraries not found)],
284 -lk5crypto -lcom_err)])
286 AC_DEFUN(ATHENA_KRB5,
288 [ --with-krb5=PREFIX Use Kerberos 5],
289 [krb5="$withval"], [krb5=no])
290 if test "$krb5" != no; then
292 KRB5_LIBS="-lkrb5 -lk5crypto -lcom_err"
295 AC_SUBST(KRB5_LIBS)])
297 AC_DEFUN(ATHENA_KRB5_REQUIRED,
299 [ --with-krb5=PREFIX Specify location of Kerberos 5],
300 [krb5="$withval"], [krb5=yes])
301 if test "$krb5" != no; then
304 AC_MSG_ERROR(This package requires Kerberos 5.)
307 dnl ----- Hesiod -----
309 AC_DEFUN(ATHENA_HESIOD_CHECK,
310 [AC_REQUIRE([ATHENA_RESOLV_CHECK])
311 if test "$hesiod" != yes; then
312 CPPFLAGS="$CPPFLAGS -I$hesiod/include"
313 LDFLAGS="$LDFLAGS -L$hesiod/lib"
315 AC_CHECK_FUNC(hes_resolve, :,
316 AC_CHECK_LIB(hesiod, hes_resolve, HESIOD_LIBS="-lhesiod",
317 [AC_MSG_ERROR(Hesiod library not found)]))])
319 AC_DEFUN(ATHENA_HESIOD,
321 [ --with-hesiod=PREFIX Use Hesiod],
322 [hesiod="$withval"], [hesiod=no])
323 if test "$hesiod" != no; then
325 AC_DEFINE(HAVE_HESIOD)
327 AC_SUBST(HESIOD_LIBS)])
329 AC_DEFUN(ATHENA_HESIOD_REQUIRED,
331 [ --with-hesiod=PREFIX Specify location of Hesiod],
332 [hesiod="$withval"], [hesiod=yes])
333 if test "$hesiod" != no; then
336 AC_MSG_ERROR(This package requires Hesiod.)
339 dnl ----- libares -----
341 AC_DEFUN(ATHENA_ARES_CHECK,
342 [AC_REQUIRE([ATHENA_RESOLV_CHECK])
343 if test "$ares" != yes; then
344 CPPFLAGS="$CPPFLAGS -I$ares/include"
345 LDFLAGS="$LDFLAGS -L$ares/lib"
347 AC_CHECK_LIB(ares, ares_init, :, [AC_MSG_ERROR(libares not found)])])
349 AC_DEFUN(ATHENA_ARES,
351 [ --with-ares=PREFIX Use libares],
352 [ares="$withval"], [ares=no])
353 if test "$ares" != no; then
358 AC_SUBST(ARES_LIBS)])
360 AC_DEFUN(ATHENA_ARES_REQUIRED,
362 [ --with-ares=PREFIX Specify location of libares],
363 [ares="$withval"], [ares=yes])
364 if test "$ares" != no; then
367 AC_MSG_ERROR(This package requires libares.)
369 dnl ----- zephyr -----
371 AC_DEFUN(ATHENA_ZEPHYR_CHECK,
372 [if test "$zephyr" != yes; then
373 CPPFLAGS="$CPPFLAGS -I$zephyr/include"
374 LDFLAGS="$LDFLAGS -L$zephyr/lib"
376 AC_CHECK_LIB(zephyr, ZFreeNotice, :, [AC_MSG_ERROR(zephyr not found)])])
378 AC_DEFUN(ATHENA_ZEPHYR,
380 [ --with-zephyr=PREFIX Use zephyr],
381 [zephyr="$withval"], [zephyr=no])
382 if test "$zephyr" != no; then
384 ZEPHYR_LIBS="-lzephyr"
385 AC_DEFINE(HAVE_ZEPHYR)
387 AC_SUBST(ZEPHYR_LIBS)])
389 AC_DEFUN(ATHENA_ZEPHYR_REQUIRED,
391 [ --with-zephyr=PREFIX Specify location of zephyr],
392 [zephyr="$withval"], [zephyr=yes])
393 if test "$zephyr" != no; then
396 AC_MSG_ERROR(This package requires zephyr.)
399 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
401 # serial 46 AC_PROG_LIBTOOL
403 AC_DEFUN([AC_PROG_LIBTOOL],
404 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
406 # This can be used to rebuild libtool when needed
407 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
409 # Always use our own libtool.
410 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
413 # Prevent multiple expansion
414 define([AC_PROG_LIBTOOL], [])
417 AC_DEFUN([AC_LIBTOOL_SETUP],
419 AC_REQUIRE([AC_ENABLE_SHARED])dnl
420 AC_REQUIRE([AC_ENABLE_STATIC])dnl
421 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
422 AC_REQUIRE([AC_CANONICAL_HOST])dnl
423 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
424 AC_REQUIRE([AC_PROG_CC])dnl
425 AC_REQUIRE([AC_PROG_LD])dnl
426 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
427 AC_REQUIRE([AC_PROG_NM])dnl
428 AC_REQUIRE([LT_AC_PROG_SED])dnl
430 AC_REQUIRE([AC_PROG_LN_S])dnl
431 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
432 AC_REQUIRE([AC_OBJEXT])dnl
433 AC_REQUIRE([AC_EXEEXT])dnl
436 _LT_AC_PROG_ECHO_BACKSLASH
437 # Only perform the check for file, if the check method requires it
438 case $deplibs_check_method in
440 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
446 AC_CHECK_TOOL(RANLIB, ranlib, :)
447 AC_CHECK_TOOL(STRIP, strip, :)
449 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
450 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
451 enable_win32_dll=yes, enable_win32_dll=no)
453 AC_ARG_ENABLE(libtool-lock,
454 [ --disable-libtool-lock avoid locking (might break parallel builds)])
455 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
457 # Some flags need to be propagated to the compiler or linker for good
461 # Find out which ABI we are using.
462 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
463 if AC_TRY_EVAL(ac_compile); then
464 case `/usr/bin/file conftest.$ac_objext` in
480 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
481 SAVE_CFLAGS="$CFLAGS"
482 CFLAGS="$CFLAGS -belf"
483 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
486 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
488 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
489 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
490 CFLAGS="$SAVE_CFLAGS"
494 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
495 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
496 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
497 AC_CHECK_TOOL(AS, as, false)
498 AC_CHECK_TOOL(OBJDUMP, objdump, false)
500 # recent cygwin and mingw systems supply a stub DllMain which the user
501 # can override, but on older systems we have to supply one
502 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
504 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
506 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
509 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
510 # old mingw systems require "-dll" to link a DLL, while more recent ones
512 SAVE_CFLAGS="$CFLAGS"
513 CFLAGS="$CFLAGS -mdll"
514 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
515 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
516 CFLAGS="$SAVE_CFLAGS" ;;
517 *-*-cygwin* | *-*-pw32*)
518 # cygwin systems need to pass --dll to the linker, and not link
519 # crt.o which will require a WinMain@16 definition.
520 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
530 # AC_LIBTOOL_HEADER_ASSERT
531 # ------------------------
532 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
533 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
534 [lt_cv_func_assert_works],
537 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
538 case `$CC --version 2>/dev/null` in
539 [[12]].*) lt_cv_func_assert_works=no ;;
540 *) lt_cv_func_assert_works=yes ;;
546 if test "x$lt_cv_func_assert_works" = xyes; then
547 AC_CHECK_HEADERS(assert.h)
549 ])# AC_LIBTOOL_HEADER_ASSERT
552 # --------------------
553 AC_DEFUN([_LT_AC_CHECK_DLFCN],
554 [AC_CHECK_HEADERS(dlfcn.h)
555 ])# _LT_AC_CHECK_DLFCN
557 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
558 # ---------------------------------
559 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
560 [AC_REQUIRE([AC_CANONICAL_HOST])
561 AC_REQUIRE([AC_PROG_NM])
562 AC_REQUIRE([AC_OBJEXT])
563 # Check for command to grab the raw symbol name followed by C symbol from nm.
564 AC_MSG_CHECKING([command to parse $NM output])
565 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
567 # These are sane defaults that work on at least a few old systems.
568 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
570 # Character class describing NM global symbol codes.
571 symcode='[[BCDEGRST]]'
573 # Regexp to match symbols that can be accessed directly from C.
574 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
576 # Transform the above into a raw symbol and a C symbol.
579 # Transform an extracted symbol line into a proper C declaration
580 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
582 # Transform an extracted symbol line into symbol name and symbol address
583 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
585 # Define system-specific variables.
590 cygwin* | mingw* | pw32*)
591 symcode='[[ABCDGISTW]]'
593 hpux*) # Its linker distinguishes data from code symbols
594 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
595 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
598 symcode='[[BCDEGRST]]'
608 # Handle CRLF in mingw tool chain
612 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
616 # If we're using GNU nm, then use its standard symbol codes.
617 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
618 symcode='[[ABCDGISTW]]'
621 # Try without a prefix undercore, then with it.
622 for ac_symprfx in "" "_"; do
624 # Write the raw and C identifiers.
625 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
627 # Check to see that the pipe works correctly.
630 cat > conftest.$ac_ext <<EOF
635 void nm_test_func(){}
639 int main(){nm_test_var='a';nm_test_func();return(0);}
642 if AC_TRY_EVAL(ac_compile); then
643 # Now try to grab the symbols.
645 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
646 # Try sorting and uniquifying the output.
647 if sort "$nlist" | uniq > "$nlist"T; then
648 mv -f "$nlist"T "$nlist"
653 # Make sure that we snagged all the symbols we need.
654 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
655 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
656 cat <<EOF > conftest.$ac_ext
662 # Now generate the symbol file.
663 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
665 cat <<EOF >> conftest.$ac_ext
666 #if defined (__STDC__) && __STDC__
667 # define lt_ptr void *
669 # define lt_ptr char *
673 /* The mapping between symbol names and symbols. */
678 lt_preloaded_symbols[[]] =
681 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
682 cat <<\EOF >> conftest.$ac_ext
690 # Now try linking the two files.
691 mv conftest.$ac_objext conftstm.$ac_objext
693 save_CFLAGS="$CFLAGS"
694 LIBS="conftstm.$ac_objext"
695 CFLAGS="$CFLAGS$no_builtin_flag"
696 if AC_TRY_EVAL(ac_link) && test -s conftest; then
700 CFLAGS="$save_CFLAGS"
702 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
705 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
708 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
711 echo "$progname: failed program was:" >&AC_FD_CC
712 cat conftest.$ac_ext >&5
714 rm -f conftest* conftst*
716 # Do not use the global_symbol_pipe unless it works.
717 if test "$pipe_works" = yes; then
720 lt_cv_sys_global_symbol_pipe=
724 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
725 if test -z "$lt_cv_sys_global_symbol_pipe"; then
726 global_symbol_to_cdecl=
727 global_symbol_to_c_name_address=
729 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
730 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
732 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
734 AC_MSG_RESULT(failed)
738 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
740 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
741 # ---------------------------------
742 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
743 [# Find the correct PATH separator. Usually this is `:', but
744 # DJGPP uses `;' like DOS.
745 if test "X${PATH_SEPARATOR+set}" != Xset; then
746 UNAME=${UNAME-`uname 2>/dev/null`}
748 *-DOS) lt_cv_sys_path_separator=';' ;;
749 *) lt_cv_sys_path_separator=':' ;;
751 PATH_SEPARATOR=$lt_cv_sys_path_separator
753 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
755 # _LT_AC_PROG_ECHO_BACKSLASH
756 # --------------------------
757 # Add some code to the start of the generated configure script which
758 # will find an echo command which doesn't interpret backslashes.
759 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
760 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
761 [AC_DIVERT_PUSH(NOTICE)])
762 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
764 # Check that we are running under the correct shell.
765 SHELL=${CONFIG_SHELL-/bin/sh}
769 # Remove one level of quotation (which was required for Make).
770 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
775 if test "X[$]1" = X--no-reexec; then
776 # Discard the --no-reexec flag, and continue.
778 elif test "X[$]1" = X--fallback-echo; then
779 # Avoid inline document here, it may be left over
781 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
782 # Yippee, $echo works!
785 # Restart under the correct shell.
786 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
789 if test "X[$]1" = X--fallback-echo; then
790 # used as fallback echo
798 # The HP-UX ksh and POSIX shell print the target directory to stdout
800 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
802 if test -z "$ECHO"; then
803 if test "X${echo_test_string+set}" != Xset; then
804 # find a string as large as possible, as long as the shell can cope with it
805 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
806 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
807 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
808 echo_test_string="`eval $cmd`" &&
809 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
816 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
817 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
818 test "X$echo_testing_string" = "X$echo_test_string"; then
821 # The Solaris, AIX, and Digital Unix default echo programs unquote
822 # backslashes. This makes it impossible to quote backslashes using
823 # echo "$something" | sed 's/\\/\\\\/g'
825 # So, first we look for a working echo in the user's PATH.
827 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
828 for dir in $PATH /usr/ucb; do
829 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
830 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
831 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
832 test "X$echo_testing_string" = "X$echo_test_string"; then
839 if test "X$echo" = Xecho; then
840 # We didn't find a better echo, so look for alternatives.
841 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
842 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
843 test "X$echo_testing_string" = "X$echo_test_string"; then
844 # This shell has a builtin print -r that does the trick.
846 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
847 test "X$CONFIG_SHELL" != X/bin/ksh; then
848 # If we have ksh, try running configure again with it.
849 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
850 export ORIGINAL_CONFIG_SHELL
851 CONFIG_SHELL=/bin/ksh
853 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
857 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
858 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
859 test "X$echo_testing_string" = "X$echo_test_string"; then
862 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
863 test "X$echo_testing_string" = 'X\t' &&
864 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
865 test "X$echo_testing_string" = "X$echo_test_string"; then
866 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
868 SHELL="$CONFIG_SHELL"
870 echo="$CONFIG_SHELL [$]0 --fallback-echo"
871 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
872 test "X$echo_testing_string" = 'X\t' &&
873 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
874 test "X$echo_testing_string" = "X$echo_test_string"; then
875 echo="$CONFIG_SHELL [$]0 --fallback-echo"
877 # maybe with a smaller string...
880 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
881 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
888 if test "$prev" != 'sed 50q "[$]0"'; then
889 echo_test_string=`eval $prev`
890 export echo_test_string
891 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
893 # Oops. We lost completely, so just stick with echo.
902 # Copy echo and quote the copy suitably for passing to libtool from
903 # the Makefile, instead of quoting the original, which is used later.
905 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
906 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
911 ])# _LT_AC_PROG_ECHO_BACKSLASH
913 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
914 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
915 # ------------------------------------------------------------------
916 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
917 [if test "$cross_compiling" = yes; then :
920 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
921 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
922 lt_status=$lt_dlunknown
923 cat > conftest.$ac_ext <<EOF
924 [#line __oline__ "configure"
925 #include "confdefs.h"
934 # define LT_DLGLOBAL RTLD_GLOBAL
937 # define LT_DLGLOBAL DL_GLOBAL
939 # define LT_DLGLOBAL 0
943 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
944 find out it does not work in some platform. */
945 #ifndef LT_DLLAZY_OR_NOW
947 # define LT_DLLAZY_OR_NOW RTLD_LAZY
950 # define LT_DLLAZY_OR_NOW DL_LAZY
953 # define LT_DLLAZY_OR_NOW RTLD_NOW
956 # define LT_DLLAZY_OR_NOW DL_NOW
958 # define LT_DLLAZY_OR_NOW 0
966 extern "C" void exit (int);
969 void fnord() { int i=42;}
972 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
973 int status = $lt_dlunknown;
977 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
978 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
979 /* dlclose (self); */
985 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
986 (./conftest; exit; ) 2>/dev/null
989 x$lt_dlno_uscore) $1 ;;
990 x$lt_dlneed_uscore) $2 ;;
991 x$lt_unknown|x*) $3 ;;
999 ])# _LT_AC_TRY_DLOPEN_SELF
1001 # AC_LIBTOOL_DLOPEN_SELF
1002 # -------------------
1003 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1004 [if test "x$enable_dlopen" != xyes; then
1005 enable_dlopen=unknown
1006 enable_dlopen_self=unknown
1007 enable_dlopen_self_static=unknown
1014 lt_cv_dlopen="load_add_on"
1016 lt_cv_dlopen_self=yes
1019 cygwin* | mingw* | pw32*)
1020 lt_cv_dlopen="LoadLibrary"
1025 AC_CHECK_FUNC([shl_load],
1026 [lt_cv_dlopen="shl_load"],
1027 [AC_CHECK_LIB([dld], [shl_load],
1028 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1029 [AC_CHECK_FUNC([dlopen],
1030 [lt_cv_dlopen="dlopen"],
1031 [AC_CHECK_LIB([dl], [dlopen],
1032 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1033 [AC_CHECK_LIB([svld], [dlopen],
1034 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1035 [AC_CHECK_LIB([dld], [dld_link],
1036 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1045 if test "x$lt_cv_dlopen" != xno; then
1051 case $lt_cv_dlopen in
1053 save_CPPFLAGS="$CPPFLAGS"
1054 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1055 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1057 save_LDFLAGS="$LDFLAGS"
1058 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1061 LIBS="$lt_cv_dlopen_libs $LIBS"
1063 AC_CACHE_CHECK([whether a program can dlopen itself],
1064 lt_cv_dlopen_self, [dnl
1065 _LT_AC_TRY_DLOPEN_SELF(
1066 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1067 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1070 if test "x$lt_cv_dlopen_self" = xyes; then
1071 LDFLAGS="$LDFLAGS $link_static_flag"
1072 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1073 lt_cv_dlopen_self_static, [dnl
1074 _LT_AC_TRY_DLOPEN_SELF(
1075 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1076 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1080 CPPFLAGS="$save_CPPFLAGS"
1081 LDFLAGS="$save_LDFLAGS"
1086 case $lt_cv_dlopen_self in
1087 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1088 *) enable_dlopen_self=unknown ;;
1091 case $lt_cv_dlopen_self_static in
1092 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1093 *) enable_dlopen_self_static=unknown ;;
1096 ])# AC_LIBTOOL_DLOPEN_SELF
1098 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1099 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1100 # Sed substitution that helps us do robust quoting. It backslashifies
1101 # metacharacters that are still active within double-quoted strings.
1102 Xsed='sed -e s/^X//'
1103 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1105 # Same as above, but do not quote variable references.
1106 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1108 # Sed substitution to delay expansion of an escaped shell variable in a
1109 # double_quote_subst'ed string.
1110 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1116 default_ofile=libtool
1117 can_build_shared=yes
1119 # All known linkers require a `.a' archive for static linking (except M$VC,
1120 # which needs '.lib').
1122 ltmain="$ac_aux_dir/ltmain.sh"
1123 ofile="$default_ofile"
1124 with_gnu_ld="$lt_cv_prog_gnu_ld"
1125 need_locks="$enable_libtool_lock"
1128 old_CFLAGS="$CFLAGS"
1130 # Set sane defaults for various variables
1131 test -z "$AR" && AR=ar
1132 test -z "$AR_FLAGS" && AR_FLAGS=cru
1133 test -z "$AS" && AS=as
1134 test -z "$CC" && CC=cc
1135 test -z "$DLLTOOL" && DLLTOOL=dlltool
1136 test -z "$LD" && LD=ld
1137 test -z "$LN_S" && LN_S="ln -s"
1138 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1139 test -z "$NM" && NM=nm
1140 test -z "$OBJDUMP" && OBJDUMP=objdump
1141 test -z "$RANLIB" && RANLIB=:
1142 test -z "$STRIP" && STRIP=:
1143 test -z "$ac_objext" && ac_objext=o
1145 if test x"$host" != x"$build"; then
1146 ac_tool_prefix=${host_alias}-
1151 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1154 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1159 # AIX sometimes has problems with the GCC collect2 program. For some
1160 # reason, if we set the COLLECT_NAMES environment variable, the problems
1161 # vanish in a puff of smoke.
1162 if test "X${COLLECT_NAMES+set}" != Xset; then
1164 export COLLECT_NAMES
1169 # Determine commands to create old-style static archives.
1170 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1171 old_postinstall_cmds='chmod 644 $oldlib'
1172 old_postuninstall_cmds=
1174 if test -n "$RANLIB"; then
1177 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1180 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1183 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1186 # Allow CC to be a program name with arguments.
1190 AC_MSG_CHECKING([for objdir])
1191 rm -f .libs 2>/dev/null
1192 mkdir .libs 2>/dev/null
1193 if test -d .libs; then
1196 # MS-DOS does not allow filenames that begin with a dot.
1199 rmdir .libs 2>/dev/null
1200 AC_MSG_RESULT($objdir)
1204 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1205 pic_mode="$withval", pic_mode=default)
1206 test -z "$pic_mode" && pic_mode=default
1208 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1209 # in isolation, and that seeing it set (from the cache) indicates that
1210 # the associated values are set (in the cache) correctly too.
1211 AC_MSG_CHECKING([for $compiler option to produce PIC])
1212 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1213 [ lt_cv_prog_cc_pic=
1214 lt_cv_prog_cc_shlib=
1216 lt_cv_prog_cc_static=
1217 lt_cv_prog_cc_no_builtin=
1218 lt_cv_prog_cc_can_build_shared=$can_build_shared
1220 if test "$GCC" = yes; then
1221 lt_cv_prog_cc_wl='-Wl,'
1222 lt_cv_prog_cc_static='-static'
1226 # Below there is a dirty hack to force normal static linking with -ldl
1227 # The problem is because libdl dynamically linked with both libc and
1228 # libC (AIX C++ library), which obviously doesn't included in libraries
1229 # list by gcc. This cause undefined symbols with -static flags.
1230 # This hack allows C programs to be linked with "-static -ldl", but
1231 # not sure about C++ programs.
1232 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1235 # FIXME: we need at least 68020 code to build shared libraries, but
1236 # adding the `-m68020' flag to GCC prevents building anything better,
1238 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1240 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1241 # PIC is the default for these OSes.
1243 darwin* | rhapsody*)
1244 # PIC is the default on this platform
1245 # Common symbols not allowed in MH_DYLIB files
1246 lt_cv_prog_cc_pic='-fno-common'
1248 cygwin* | mingw* | pw32* | os2*)
1249 # This hack is so that the source file can tell whether it is being
1250 # built for inclusion in a dll (and should export symbols for example).
1251 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1254 if test -d /usr/nec; then
1255 lt_cv_prog_cc_pic=-Kconform_pic
1259 lt_cv_prog_cc_pic='-fPIC'
1263 # PORTME Check for PIC flags for the system compiler.
1265 aix3* | aix4* | aix5*)
1266 lt_cv_prog_cc_wl='-Wl,'
1267 # All AIX code is PIC.
1268 if test "$host_cpu" = ia64; then
1269 # AIX 5 now supports IA64 processor
1270 lt_cv_prog_cc_static='-Bstatic'
1272 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1276 hpux9* | hpux10* | hpux11*)
1277 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1278 lt_cv_prog_cc_wl='-Wl,'
1279 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1280 lt_cv_prog_cc_pic='+Z'
1283 irix5* | irix6* | nonstopux*)
1284 lt_cv_prog_cc_wl='-Wl,'
1285 lt_cv_prog_cc_static='-non_shared'
1286 # PIC (with -KPIC) is the default.
1289 cygwin* | mingw* | pw32* | os2*)
1290 # This hack is so that the source file can tell whether it is being
1291 # built for inclusion in a dll (and should export symbols for example).
1292 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1296 lt_cv_prog_cc_pic='-KPIC'
1297 lt_cv_prog_cc_static='-Bstatic'
1300 osf3* | osf4* | osf5*)
1301 # All OSF/1 code is PIC.
1302 lt_cv_prog_cc_wl='-Wl,'
1303 lt_cv_prog_cc_static='-non_shared'
1307 lt_cv_prog_cc_pic='-Kpic'
1308 lt_cv_prog_cc_static='-dn'
1309 lt_cv_prog_cc_shlib='-belf'
1313 lt_cv_prog_cc_pic='-KPIC'
1314 lt_cv_prog_cc_static='-Bstatic'
1315 lt_cv_prog_cc_wl='-Wl,'
1319 lt_cv_prog_cc_pic='-PIC'
1320 lt_cv_prog_cc_static='-Bstatic'
1321 lt_cv_prog_cc_wl='-Qoption ld '
1324 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1325 lt_cv_prog_cc_pic='-KPIC'
1326 lt_cv_prog_cc_static='-Bstatic'
1327 lt_cv_prog_cc_wl='-Wl,'
1331 lt_cv_prog_cc_pic='-pic'
1332 lt_cv_prog_cc_static='-Bstatic'
1336 if test -d /usr/nec ;then
1337 lt_cv_prog_cc_pic='-Kconform_pic'
1338 lt_cv_prog_cc_static='-Bstatic'
1343 lt_cv_prog_cc_can_build_shared=no
1348 if test -z "$lt_cv_prog_cc_pic"; then
1349 AC_MSG_RESULT([none])
1351 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1353 # Check to make sure the pic_flag actually works.
1354 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1355 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1356 save_CFLAGS="$CFLAGS"
1357 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1358 AC_TRY_COMPILE([], [], [dnl
1360 hpux9* | hpux10* | hpux11*)
1361 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1362 # they create non-PIC objects. So, if there were any warnings, we
1363 # assume that PIC is not supported.
1364 if test -s conftest.err; then
1365 lt_cv_prog_cc_pic_works=no
1367 lt_cv_prog_cc_pic_works=yes
1371 lt_cv_prog_cc_pic_works=yes
1375 lt_cv_prog_cc_pic_works=no
1377 CFLAGS="$save_CFLAGS"
1380 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1382 lt_cv_prog_cc_can_build_shared=no
1384 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1387 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1390 # Check for any special shared library compilation flags.
1391 if test -n "$lt_cv_prog_cc_shlib"; then
1392 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1393 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1395 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1396 lt_cv_prog_cc_can_build_shared=no
1400 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1401 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1402 lt_cv_prog_cc_static_works=no
1403 save_LDFLAGS="$LDFLAGS"
1404 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1405 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1406 LDFLAGS="$save_LDFLAGS"
1409 # Belt *and* braces to stop my trousers falling down:
1410 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1411 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1413 pic_flag="$lt_cv_prog_cc_pic"
1414 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1415 wl="$lt_cv_prog_cc_wl"
1416 link_static_flag="$lt_cv_prog_cc_static"
1417 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1418 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1421 # Check to see if options -o and -c are simultaneously supported by compiler
1422 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1423 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1424 $rm -r conftest 2>/dev/null
1427 echo "int some_variable = 0;" > conftest.$ac_ext
1429 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1430 # that will create temporary files in the current directory regardless of
1431 # the output directory. Thus, making CWD read-only will cause this test
1432 # to fail, enabling locking or at least warning the user not to do parallel
1435 save_CFLAGS="$CFLAGS"
1436 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1438 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1439 # The compiler can only warn and ignore the option if not recognized
1440 # So say no if there are warnings
1441 if test -s out/conftest.err; then
1442 lt_cv_compiler_c_o=no
1444 lt_cv_compiler_c_o=yes
1447 # Append any errors to the config.log.
1448 cat out/conftest.err 1>&AC_FD_CC
1449 lt_cv_compiler_c_o=no
1451 CFLAGS="$save_CFLAGS"
1457 $rm -r conftest 2>/dev/null
1459 compiler_c_o=$lt_cv_compiler_c_o
1460 AC_MSG_RESULT([$compiler_c_o])
1462 if test x"$compiler_c_o" = x"yes"; then
1463 # Check to see if we can write to a .lo
1464 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1465 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1466 lt_cv_compiler_o_lo=no
1467 save_CFLAGS="$CFLAGS"
1468 CFLAGS="$CFLAGS -c -o conftest.lo"
1469 save_objext="$ac_objext"
1471 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1472 # The compiler can only warn and ignore the option if not recognized
1473 # So say no if there are warnings
1474 if test -s conftest.err; then
1475 lt_cv_compiler_o_lo=no
1477 lt_cv_compiler_o_lo=yes
1480 ac_objext="$save_objext"
1481 CFLAGS="$save_CFLAGS"
1483 compiler_o_lo=$lt_cv_compiler_o_lo
1484 AC_MSG_RESULT([$compiler_o_lo])
1489 # Check to see if we can do hard links to lock some files if needed
1490 hard_links="nottested"
1491 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1492 # do not overwrite the value of need_locks provided by the user
1493 AC_MSG_CHECKING([if we can lock with hard links])
1496 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1498 ln conftest.a conftest.b 2>&5 || hard_links=no
1499 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1500 AC_MSG_RESULT([$hard_links])
1501 if test "$hard_links" = no; then
1502 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1509 if test "$GCC" = yes; then
1510 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1511 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1512 echo "int some_variable = 0;" > conftest.$ac_ext
1513 save_CFLAGS="$CFLAGS"
1514 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1515 compiler_rtti_exceptions=no
1516 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1517 # The compiler can only warn and ignore the option if not recognized
1518 # So say no if there are warnings
1519 if test -s conftest.err; then
1520 compiler_rtti_exceptions=no
1522 compiler_rtti_exceptions=yes
1525 CFLAGS="$save_CFLAGS"
1526 AC_MSG_RESULT([$compiler_rtti_exceptions])
1528 if test "$compiler_rtti_exceptions" = "yes"; then
1529 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1531 no_builtin_flag=' -fno-builtin'
1535 # See if the linker supports building shared libraries.
1536 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1538 allow_undefined_flag=
1540 need_lib_prefix=unknown
1541 need_version=unknown
1542 # when you set need_version to no, make sure it does not cause -set_version
1543 # flags to be left without arguments
1545 archive_expsym_cmds=
1546 old_archive_from_new_cmds=
1547 old_archive_from_expsyms_cmds=
1548 export_dynamic_flag_spec=
1549 whole_archive_flag_spec=
1550 thread_safe_flag_spec=
1551 hardcode_into_libs=no
1552 hardcode_libdir_flag_spec=
1553 hardcode_libdir_separator=
1556 hardcode_shlibpath_var=unsupported
1558 link_all_deplibs=unknown
1559 always_export_symbols=no
1560 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1561 # include_expsyms should be a list of space-separated symbols to be *always*
1562 # included in the symbol list
1564 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1565 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1566 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1567 # as well as any symbol that contains `d'.
1568 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1569 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1570 # platforms (ab)use it in PIC code, but their linkers get confused if
1571 # the symbol is explicitly referenced. Since portable code cannot
1572 # rely on this symbol name, it's probably fine to never include it in
1573 # preloaded symbol tables.
1574 extract_expsyms_cmds=
1577 cygwin* | mingw* | pw32*)
1578 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1579 # When not using gcc, we currently assume that we are using
1580 # Microsoft Visual C++.
1581 if test "$GCC" != yes; then
1591 if test "$with_gnu_ld" = yes; then
1592 # If archive_cmds runs LD, not CC, wlarc should be empty
1595 # See if GNU ld supports shared libraries.
1597 aix3* | aix4* | aix5*)
1598 # On AIX, the GNU linker is very broken
1599 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1603 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1604 *** to be unable to reliably create shared libraries on AIX.
1605 *** Therefore, libtool is disabling shared libraries support. If you
1606 *** really care for shared libraries, you may want to modify your PATH
1607 *** so that a non-GNU linker is found, and then restart.
1613 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)'
1614 hardcode_libdir_flag_spec='-L$libdir'
1615 hardcode_minus_L=yes
1617 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1618 # that the semantics of dynamic libraries on AmigaOS, at least up
1619 # to version 4, is to share data among multiple programs linked
1620 # with the same dynamic library. Since this doesn't match the
1621 # behavior of shared libraries on other platforms, we can use
1627 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1628 allow_undefined_flag=unsupported
1629 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1630 # support --undefined. This deserves some investigation. FIXME
1631 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1637 cygwin* | mingw* | pw32*)
1638 # hardcode_libdir_flag_spec is actually meaningless, as there is
1639 # no search path for DLLs.
1640 hardcode_libdir_flag_spec='-L$libdir'
1641 allow_undefined_flag=unsupported
1642 always_export_symbols=yes
1644 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1645 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1646 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1647 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1648 else $CC -o impgen impgen.c ; fi)~
1649 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1651 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1653 # cygwin and mingw dlls have different entry points and sets of symbols
1655 # FIXME: what about values for MSVC?
1656 dll_entry=__cygwin_dll_entry@12
1657 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1661 dll_entry=_DllMainCRTStartup@12
1662 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1666 # mingw and cygwin differ, and it's simplest to just exclude the union
1667 # of the two symbol sets.
1668 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1670 # recent cygwin and mingw systems supply a stub DllMain which the user
1671 # can override, but on older systems we have to supply one (in ltdll.c)
1672 if test "x$lt_cv_need_dllmain" = "xyes"; then
1673 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1674 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~
1675 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1681 # Extract the symbol export list from an `--export-all' def file,
1682 # then regenerate the def file from the symbol export list, so that
1683 # the compiled dll only exports the symbol export list.
1684 # Be careful not to strip the DATA tag left be newer dlltools.
1685 export_symbols_cmds="$ltdll_cmds"'
1686 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1687 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1689 # If the export-symbols file already is a .def file (1st line
1690 # is EXPORTS), use it as is.
1691 # If DATA tags from a recent dlltool are present, honour them!
1692 archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
1693 cp $export_symbols $output_objdir/$soname-def;
1695 echo EXPORTS > $output_objdir/$soname-def;
1697 cat $export_symbols | while read symbol; do
1700 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1701 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
1702 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1704 _lt_hint=`expr 1 + \$_lt_hint`;
1708 $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~
1709 $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~
1710 $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~
1711 $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~
1712 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1716 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1717 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1720 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1721 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1726 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1730 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1731 *** create shared libraries on Solaris systems. Therefore, libtool
1732 *** is disabling shared libraries support. We urge you to upgrade GNU
1733 *** binutils to release 2.9.1 or newer. Another option is to modify
1734 *** your PATH or compiler configuration so that the native linker is
1735 *** used, and then restart.
1738 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1739 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1740 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1747 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1750 hardcode_shlibpath_var=no
1754 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1755 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1756 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1763 if test "$ld_shlibs" = yes; then
1764 runpath_var=LD_RUN_PATH
1765 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1766 export_dynamic_flag_spec='${wl}--export-dynamic'
1768 cygwin* | mingw* | pw32*)
1769 # dlltool doesn't understand --whole-archive et. al.
1770 whole_archive_flag_spec=
1773 # ancient GNU ld didn't support --whole-archive et. al.
1774 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1775 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1777 whole_archive_flag_spec=
1783 # PORTME fill in a description of your system's linker (not GNU ld)
1786 allow_undefined_flag=unsupported
1787 always_export_symbols=yes
1788 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'
1789 # Note: this linker hardcodes the directories in LIBPATH if there
1790 # are no directories specified by -L.
1791 hardcode_minus_L=yes
1792 if test "$GCC" = yes && test -z "$link_static_flag"; then
1793 # Neither direct hardcoding nor static linking is supported with a
1795 hardcode_direct=unsupported
1800 if test "$host_cpu" = ia64; then
1801 # On IA64, the linker does run time linking by default, so we don't
1802 # have to do anything special.
1803 aix_use_runtimelinking=no
1804 exp_sym_flag='-Bexport'
1807 aix_use_runtimelinking=no
1809 # Test if we are trying to use run time linking or normal
1810 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1811 # need to do runtime linking.
1812 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1813 for ld_flag in $LDFLAGS; do
1814 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
1815 aix_use_runtimelinking=yes
1821 exp_sym_flag='-bexport'
1822 no_entry_flag='-bnoentry'
1825 # When large executables or shared objects are built, AIX ld can
1826 # have problems creating the table of contents. If linking a library
1827 # or program results in "error TOC overflow" add -mminimal-toc to
1828 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1829 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1833 hardcode_libdir_separator=':'
1834 if test "$GCC" = yes; then
1835 case $host_os in aix4.[[012]]|aix4.[[012]].*)
1836 collect2name=`${CC} -print-prog-name=collect2`
1837 if test -f "$collect2name" && \
1838 strings "$collect2name" | grep resolve_lib_name >/dev/null
1840 # We have reworked collect2
1843 # We have old collect2
1844 hardcode_direct=unsupported
1845 # It fails to find uninstalled libraries when the uninstalled
1846 # path is not listed in the libpath. Setting hardcode_minus_L
1847 # to unsupported forces relinking
1848 hardcode_minus_L=yes
1849 hardcode_libdir_flag_spec='-L$libdir'
1850 hardcode_libdir_separator=
1854 shared_flag='-shared'
1857 if test "$host_cpu" = ia64; then
1858 shared_flag='${wl}-G'
1860 if test "$aix_use_runtimelinking" = yes; then
1861 shared_flag='${wl}-G'
1863 shared_flag='${wl}-bM:SRE'
1868 # It seems that -bexpall can do strange things, so it is better to
1869 # generate a list of symbols to export.
1870 always_export_symbols=yes
1871 if test "$aix_use_runtimelinking" = yes; then
1872 # Warning - without using the other runtime loading flags (-brtl),
1873 # -berok will link without error, but may produce a broken library.
1874 allow_undefined_flag='-berok'
1875 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1876 archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1878 if test "$host_cpu" = ia64; then
1879 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1880 allow_undefined_flag="-z nodefs"
1881 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"
1883 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1884 # Warning - without using the other run time loading flags,
1885 # -berok will link without error, but may produce a broken library.
1886 allow_undefined_flag='${wl}-berok'
1887 # This is a bit strange, but is similar to how AIX traditionally builds
1888 # it's shared libraries.
1889 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'
1895 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)'
1896 hardcode_libdir_flag_spec='-L$libdir'
1897 hardcode_minus_L=yes
1898 # see comment about different semantics on the GNU ld section
1902 cygwin* | mingw* | pw32*)
1903 # When not using gcc, we currently assume that we are using
1904 # Microsoft Visual C++.
1905 # hardcode_libdir_flag_spec is actually meaningless, as there is
1906 # no search path for DLLs.
1907 hardcode_libdir_flag_spec=' '
1908 allow_undefined_flag=unsupported
1909 # Tell ltmain to make .lib files, not .a files.
1911 # FIXME: Setting linknames here is a bad hack.
1912 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1913 # The linker will automatically build a .lib file if we build a DLL.
1914 old_archive_from_new_cmds='true'
1915 # FIXME: Should let the user specify the lib program.
1916 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1917 fix_srcfile_path='`cygpath -w "$srcfile"`'
1920 darwin* | rhapsody*)
1922 rhapsody* | darwin1.[[012]])
1923 allow_undefined_flag='-undefined suppress'
1926 allow_undefined_flag='-flat_namespace -undefined suppress'
1929 # FIXME: Relying on posixy $() will cause problems for
1930 # cross-compilation, but unfortunately the echo tests do not
1931 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
1932 # `"' quotes if we put them in here... so don't!
1933 archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
1934 # We need to add '_' to the symbols in $export_symbols first
1935 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
1937 hardcode_shlibpath_var=no
1938 whole_archive_flag_spec='-all_load $convenience'
1945 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1946 # support. Future versions do this automatically, but an explicit c++rt0.o
1947 # does not break anything, and helps significantly (at the cost of a little
1950 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1951 hardcode_libdir_flag_spec='-R$libdir'
1953 hardcode_shlibpath_var=no
1956 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1958 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1960 hardcode_minus_L=yes
1961 hardcode_shlibpath_var=no
1964 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1966 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1967 hardcode_libdir_flag_spec='-R$libdir'
1969 hardcode_shlibpath_var=no
1972 hpux9* | hpux10* | hpux11*)
1974 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' ;;
1975 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
1977 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1978 hardcode_libdir_separator=:
1980 hardcode_minus_L=yes # Not in the search PATH, but as the default
1981 # location of the library.
1982 export_dynamic_flag_spec='${wl}-E'
1985 irix5* | irix6* | nonstopux*)
1986 if test "$GCC" = yes; then
1987 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'
1989 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'
1991 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1992 hardcode_libdir_separator=:
1993 link_all_deplibs=yes
1997 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1998 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2000 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2002 hardcode_libdir_flag_spec='-R$libdir'
2004 hardcode_shlibpath_var=no
2008 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2010 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2011 hardcode_libdir_separator=:
2012 hardcode_shlibpath_var=no
2017 hardcode_shlibpath_var=no
2018 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2019 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2020 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2021 export_dynamic_flag_spec='${wl}-E'
2024 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2025 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2026 hardcode_libdir_flag_spec='-R$libdir'
2029 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2030 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2037 hardcode_libdir_flag_spec='-L$libdir'
2038 hardcode_minus_L=yes
2039 allow_undefined_flag=unsupported
2040 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'
2041 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2045 if test "$GCC" = yes; then
2046 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2047 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'
2049 allow_undefined_flag=' -expect_unresolved \*'
2050 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'
2052 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2053 hardcode_libdir_separator=:
2056 osf4* | osf5*) # as osf3* with the addition of -msym flag
2057 if test "$GCC" = yes; then
2058 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2059 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'
2060 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2062 allow_undefined_flag=' -expect_unresolved \*'
2063 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'
2064 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2065 $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'
2067 #Both c and cxx compiler support -rpath directly
2068 hardcode_libdir_flag_spec='-rpath $libdir'
2070 hardcode_libdir_separator=:
2074 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2075 hardcode_shlibpath_var=no
2076 runpath_var=LD_RUN_PATH
2077 hardcode_runpath_var=yes
2078 export_dynamic_flag_spec='${wl}-Bexport'
2082 # gcc --version < 3.0 without binutils cannot create self contained
2083 # shared libraries reliably, requiring libgcc.a to resolve some of
2084 # the object symbols generated in some cases. Libraries that use
2085 # assert need libgcc.a to resolve __eprintf, for example. Linking
2086 # a copy of libgcc.a into every shared library to guarantee resolving
2087 # such symbols causes other problems: According to Tim Van Holder
2088 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2089 # (to the application) exception stack for one thing.
2090 no_undefined_flag=' -z defs'
2091 if test "$GCC" = yes; then
2092 case `$CC --version 2>/dev/null` in
2096 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2097 *** create self contained shared libraries on Solaris systems, without
2098 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2099 *** -no-undefined support, which will at least allow you to build shared
2100 *** libraries. However, you may find that when you link such libraries
2101 *** into an application without using GCC, you have to manually add
2102 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2103 *** upgrade to a newer version of GCC. Another option is to rebuild your
2104 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2111 # $CC -shared without GNU ld will not create a library from C++
2112 # object files and a static libstdc++, better avoid it by now
2113 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2114 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2115 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2116 hardcode_libdir_flag_spec='-R$libdir'
2117 hardcode_shlibpath_var=no
2119 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2120 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2121 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2123 link_all_deplibs=yes
2127 if test "x$host_vendor" = xsequent; then
2128 # Use $CC to link under sequent, because it throws in some extra .o
2129 # files that make .init and .fini sections work.
2130 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2132 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2134 hardcode_libdir_flag_spec='-L$libdir'
2136 hardcode_minus_L=yes
2137 hardcode_shlibpath_var=no
2141 case $host_vendor in
2143 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2144 hardcode_direct=yes # is this really true???
2147 ## LD is ld it makes a PLAMLIB
2148 ## CC just makes a GrossModule.
2149 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2150 reload_cmds='$CC -r -o $output$reload_objs'
2154 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2155 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2158 runpath_var='LD_RUN_PATH'
2159 hardcode_shlibpath_var=no
2163 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2164 hardcode_shlibpath_var=no
2165 export_dynamic_flag_spec='-Bexport'
2169 no_undefined_flag=' -z text'
2170 # $CC -shared without GNU ld will not create a library from C++
2171 # object files and a static libstdc++, better avoid it by now
2172 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2173 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2174 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2175 hardcode_libdir_flag_spec=
2176 hardcode_shlibpath_var=no
2177 runpath_var='LD_RUN_PATH'
2181 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2182 hardcode_libdir_flag_spec='-L$libdir'
2183 hardcode_shlibpath_var=no
2187 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2188 hardcode_libdir_flag_spec='-L$libdir'
2189 hardcode_shlibpath_var=no
2193 if test -d /usr/nec; then
2194 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2195 hardcode_shlibpath_var=no
2196 runpath_var=LD_RUN_PATH
2197 hardcode_runpath_var=yes
2203 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2206 hardcode_shlibpath_var=no
2207 hardcode_runpath_var=yes
2208 runpath_var=LD_RUN_PATH
2211 sysv5uw7* | unixware7*)
2212 no_undefined_flag='${wl}-z ${wl}text'
2213 if test "$GCC" = yes; then
2214 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2216 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2218 runpath_var='LD_RUN_PATH'
2219 hardcode_shlibpath_var=no
2227 AC_MSG_RESULT([$ld_shlibs])
2228 test "$ld_shlibs" = no && can_build_shared=no
2230 # Check hardcoding attributes.
2231 AC_MSG_CHECKING([how to hardcode library paths into programs])
2233 if test -n "$hardcode_libdir_flag_spec" || \
2234 test -n "$runpath_var"; then
2236 # We can hardcode non-existant directories.
2237 if test "$hardcode_direct" != no &&
2238 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2239 # have to relink, otherwise we might link with an installed library
2240 # when we should be linking with a yet-to-be-installed one
2241 ## test "$hardcode_shlibpath_var" != no &&
2242 test "$hardcode_minus_L" != no; then
2243 # Linking always hardcodes the temporary library directory.
2244 hardcode_action=relink
2246 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2247 hardcode_action=immediate
2250 # We cannot hardcode anything, or else we can only hardcode existing
2252 hardcode_action=unsupported
2254 AC_MSG_RESULT([$hardcode_action])
2258 AC_MSG_CHECKING([whether stripping libraries is possible])
2259 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2260 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2261 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2262 AC_MSG_RESULT([yes])
2267 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2268 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2270 # PORTME Fill in your ld.so characteristics
2271 AC_MSG_CHECKING([dynamic linker characteristics])
2273 libname_spec='lib$name'
2280 shlibpath_overrides_runpath=unknown
2282 dynamic_linker="$host_os ld.so"
2283 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2284 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2289 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2290 shlibpath_var=LIBPATH
2292 # AIX has no versioning support, so we append a major version to the name.
2293 soname_spec='${libname}${release}.so$major'
2298 if test "$host_cpu" = ia64; then
2299 # AIX 5 supports IA64
2300 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2301 shlibpath_var=LD_LIBRARY_PATH
2303 # With GCC up to 2.95.x, collect2 would create an import file
2304 # for dependence libraries. The import file would start with
2305 # the line `#! .'. This would cause the generated library to
2306 # depend on `.', always an invalid library. This was fixed in
2307 # development snapshots of GCC prior to 3.0.
2309 aix4 | aix4.[[01]] | aix4.[[01]].*)
2310 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2312 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2319 # AIX (on Power*) has no versioning support, so currently we can
2320 # not hardcode correct soname into executable. Probably we can
2321 # add versioning support to collect2, so additional links can
2322 # be useful in future.
2323 if test "$aix_use_runtimelinking" = yes; then
2324 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2325 # instead of lib<name>.a to let people know that these are not
2326 # typical AIX shared libraries.
2327 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2329 # We preserve .a as extension for shared libraries through AIX4.2
2330 # and later when we are not doing run time linking.
2331 library_names_spec='${libname}${release}.a $libname.a'
2332 soname_spec='${libname}${release}.so$major'
2334 shlibpath_var=LIBPATH
2339 library_names_spec='$libname.ixlibrary $libname.a'
2340 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2341 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'
2345 library_names_spec='${libname}.so'
2346 dynamic_linker="$host_os ld.so"
2347 shlibpath_var=LIBRARY_PATH
2353 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2354 soname_spec='${libname}${release}.so$major'
2355 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2356 shlibpath_var=LD_LIBRARY_PATH
2357 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2358 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2359 export_dynamic_flag_spec=-rdynamic
2360 # the default ld.so.conf also contains /usr/contrib/lib and
2361 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2362 # libtool to hard-code these into programs
2365 cygwin* | mingw* | pw32*)
2366 version_type=windows
2369 case $GCC,$host_os in
2371 library_names_spec='$libname.dll.a'
2372 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2373 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2374 dldir=$destdir/`dirname \$dlpath`~
2375 test -d \$dldir || mkdir -p \$dldir~
2376 $install_prog .libs/$dlname \$dldir/$dlname'
2377 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2378 dlpath=$dir/\$dldll~
2382 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2383 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2386 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2389 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2392 dynamic_linker='Win32 ld.exe'
2393 # FIXME: first we should search . and the directory the executable is in
2397 darwin* | rhapsody*)
2398 dynamic_linker="$host_os dyld"
2402 # FIXME: Relying on posixy $() will cause problems for
2403 # cross-compilation, but unfortunately the echo tests do not
2404 # yet detect zsh echo's removal of \ escapes.
2405 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)'
2406 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2407 shlibpath_overrides_runpath=yes
2408 shlibpath_var=DYLD_LIBRARY_PATH
2416 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2417 version_type=freebsd-$objformat
2418 case $version_type in
2420 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2425 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2429 shlibpath_var=LD_LIBRARY_PATH
2432 shlibpath_overrides_runpath=yes
2435 shlibpath_overrides_runpath=no
2436 hardcode_into_libs=yes
2445 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2446 soname_spec='${libname}${release}.so$major'
2447 shlibpath_var=LD_LIBRARY_PATH
2448 hardcode_into_libs=yes
2451 hpux9* | hpux10* | hpux11*)
2452 # Give a soname corresponding to the major version so that dld.sl refuses to
2453 # link against other versions.
2454 dynamic_linker="$host_os dld.sl"
2458 shlibpath_var=SHLIB_PATH
2459 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2460 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2461 soname_spec='${libname}${release}.sl$major'
2462 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2463 postinstall_cmds='chmod 555 $lib'
2466 irix5* | irix6* | nonstopux*)
2468 nonstopux*) version_type=nonstopux ;;
2469 *) version_type=irix ;;
2473 soname_spec='${libname}${release}.so$major'
2474 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2476 irix5* | nonstopux*)
2480 case $LD in # libtool.m4 will add one of these switches to LD
2481 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2482 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2483 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2484 *) libsuff= shlibsuff= libmagic=never-match;;
2488 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2489 shlibpath_overrides_runpath=no
2490 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2491 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2494 # No shared lib support for Linux oldld, aout, or coff.
2495 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2499 # This must be Linux ELF.
2504 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2505 soname_spec='${libname}${release}.so$major'
2506 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2507 shlibpath_var=LD_LIBRARY_PATH
2508 shlibpath_overrides_runpath=no
2509 # This implies no fast_install, which is unacceptable.
2510 # Some rework will be needed to allow for fast_install
2511 # before this can be enabled.
2512 hardcode_into_libs=yes
2514 # We used to test for /lib/ld.so.1 and disable shared libraries on
2515 # powerpc, because MkLinux only supported shared libraries with the
2516 # GNU dynamic linker. Since this was broken with cross compilers,
2517 # most powerpc-linux boxes support dynamic linking these days and
2518 # people can always --disable-shared, the test was removed, and we
2519 # assume the GNU/Linux dynamic linker is in use.
2520 dynamic_linker='GNU/Linux ld.so'
2527 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2528 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2529 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2530 dynamic_linker='NetBSD (a.out) ld.so'
2532 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2533 soname_spec='${libname}${release}.so$major'
2534 dynamic_linker='NetBSD ld.elf_so'
2536 shlibpath_var=LD_LIBRARY_PATH
2537 shlibpath_overrides_runpath=yes
2538 hardcode_into_libs=yes
2543 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2544 shlibpath_var=LD_LIBRARY_PATH
2545 shlibpath_overrides_runpath=yes
2552 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2554 openbsd2.[[89]] | openbsd2.[[89]].*)
2555 shlibpath_overrides_runpath=no
2558 shlibpath_overrides_runpath=yes
2562 shlibpath_overrides_runpath=yes
2564 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2565 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2566 shlibpath_var=LD_LIBRARY_PATH
2570 libname_spec='$name'
2572 library_names_spec='$libname.dll $libname.a'
2573 dynamic_linker='OS/2 ld.exe'
2574 shlibpath_var=LIBPATH
2577 osf3* | osf4* | osf5*)
2580 soname_spec='${libname}${release}.so'
2581 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2582 shlibpath_var=LD_LIBRARY_PATH
2583 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2584 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2589 soname_spec='${libname}${release}.so$major'
2590 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2591 shlibpath_var=LD_LIBRARY_PATH
2598 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2599 soname_spec='${libname}${release}.so$major'
2600 shlibpath_var=LD_LIBRARY_PATH
2601 shlibpath_overrides_runpath=yes
2602 hardcode_into_libs=yes
2603 # ldd complains unless libraries are executable
2604 postinstall_cmds='chmod +x $lib'
2609 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2610 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2611 shlibpath_var=LD_LIBRARY_PATH
2612 shlibpath_overrides_runpath=yes
2613 if test "$with_gnu_ld" = yes; then
2619 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2621 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2622 soname_spec='${libname}${release}.so$major'
2623 shlibpath_var=LD_LIBRARY_PATH
2624 case $host_vendor in
2626 shlibpath_overrides_runpath=no
2628 export_dynamic_flag_spec='${wl}-Blargedynsym'
2629 runpath_var=LD_RUN_PATH
2637 shlibpath_overrides_runpath=no
2638 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2645 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2646 soname_spec='${libname}${release}.so$major'
2647 shlibpath_var=LD_LIBRARY_PATH
2654 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2655 soname_spec='${libname}${release}.so$major'
2656 shlibpath_var=LD_LIBRARY_PATH
2660 if test -d /usr/nec ;then
2662 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2663 soname_spec='$libname.so.$major'
2664 shlibpath_var=LD_LIBRARY_PATH
2672 AC_MSG_RESULT([$dynamic_linker])
2673 test "$dynamic_linker" = no && can_build_shared=no
2675 # Report the final consequences.
2676 AC_MSG_CHECKING([if libtool supports shared libraries])
2677 AC_MSG_RESULT([$can_build_shared])
2679 AC_MSG_CHECKING([whether to build shared libraries])
2680 test "$can_build_shared" = "no" && enable_shared=no
2682 # On AIX, shared libraries and static libraries use the same namespace, and
2683 # are all built from PIC.
2686 test "$enable_shared" = yes && enable_static=no
2687 if test -n "$RANLIB"; then
2688 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2689 postinstall_cmds='$RANLIB $lib'
2694 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2695 test "$enable_shared" = yes && enable_static=no
2699 AC_MSG_RESULT([$enable_shared])
2701 AC_MSG_CHECKING([whether to build static libraries])
2702 # Make sure either enable_shared or enable_static is yes.
2703 test "$enable_shared" = yes || enable_static=yes
2704 AC_MSG_RESULT([$enable_static])
2706 if test "$hardcode_action" = relink; then
2707 # Fast installation is not supported
2708 enable_fast_install=no
2709 elif test "$shlibpath_overrides_runpath" = yes ||
2710 test "$enable_shared" = no; then
2711 # Fast installation is not necessary
2712 enable_fast_install=needless
2715 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2716 if test "$GCC" = yes; then
2717 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2720 AC_LIBTOOL_DLOPEN_SELF
2722 if test "$enable_shared" = yes && test "$GCC" = yes; then
2723 case $archive_cmds in
2725 # FIXME: we may have to deal with multi-command sequences.
2728 # Test whether the compiler implicitly links with -lc since on some
2729 # systems, -lgcc has to come before -lc. If gcc already passes -lc
2730 # to ld, don't add -lc before -lgcc.
2731 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2732 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2734 echo 'static int dummy;' > conftest.$ac_ext
2736 if AC_TRY_EVAL(ac_compile); then
2739 libobjs=conftest.$ac_objext
2741 wl=$lt_cv_prog_cc_wl
2747 save_allow_undefined_flag=$allow_undefined_flag
2748 allow_undefined_flag=
2749 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2751 lt_cv_archive_cmds_need_lc=no
2753 lt_cv_archive_cmds_need_lc=yes
2755 allow_undefined_flag=$save_allow_undefined_flag
2757 cat conftest.err 1>&5
2759 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2763 need_lc=${lt_cv_archive_cmds_need_lc-yes}
2765 # The second clause should only fire when bootstrapping the
2766 # libtool distribution, otherwise you forgot to ship ltmain.sh
2767 # with your package, and you will get complaints that there are
2768 # no rules to generate ltmain.sh.
2769 if test -f "$ltmain"; then
2772 # If there is no Makefile yet, we rely on a make rule to execute
2773 # `config.status --recheck' to rerun these tests and create the
2774 # libtool script then.
2775 test -f Makefile && make "$ltmain"
2778 if test -f "$ltmain"; then
2779 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2782 echo creating $ofile
2784 # Now quote all the things that may contain metacharacters while being
2785 # careful not to overquote the AC_SUBSTed values. We take copies of the
2786 # variables and quote the copies for generation of the libtool script.
2787 for var in echo old_CC old_CFLAGS SED \
2788 AR AR_FLAGS CC LD LN_S NM SHELL \
2789 reload_flag reload_cmds wl \
2790 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2791 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2792 library_names_spec soname_spec \
2793 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2794 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2795 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2796 old_striplib striplib file_magic_cmd export_symbols_cmds \
2797 deplibs_check_method allow_undefined_flag no_undefined_flag \
2798 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2799 global_symbol_to_c_name_address \
2800 hardcode_libdir_flag_spec hardcode_libdir_separator \
2801 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2802 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2805 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2806 old_postinstall_cmds | old_postuninstall_cmds | \
2807 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2808 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2809 postinstall_cmds | postuninstall_cmds | \
2810 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2811 # Double-quote double-evaled strings.
2812 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2815 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2820 cat <<__EOF__ > "${ofile}T"
2823 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2824 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2825 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2827 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
2828 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2830 # This program is free software; you can redistribute it and/or modify
2831 # it under the terms of the GNU General Public License as published by
2832 # the Free Software Foundation; either version 2 of the License, or
2833 # (at your option) any later version.
2835 # This program is distributed in the hope that it will be useful, but
2836 # WITHOUT ANY WARRANTY; without even the implied warranty of
2837 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2838 # General Public License for more details.
2840 # You should have received a copy of the GNU General Public License
2841 # along with this program; if not, write to the Free Software
2842 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2844 # As a special exception to the GNU General Public License, if you
2845 # distribute this file as part of a program that contains a
2846 # configuration script generated by Autoconf, you may include it under
2847 # the same distribution terms that you use for the rest of that program.
2849 # A sed that does not truncate output.
2852 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2853 Xsed="${SED} -e s/^X//"
2855 # The HP-UX ksh and POSIX shell print the target directory to stdout
2857 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2859 # ### BEGIN LIBTOOL CONFIG
2861 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2863 # Shell to use when invoking shell scripts.
2866 # Whether or not to build shared libraries.
2867 build_libtool_libs=$enable_shared
2869 # Whether or not to build static libraries.
2870 build_old_libs=$enable_static
2872 # Whether or not to add -lc for building shared libraries.
2873 build_libtool_need_lc=$need_lc
2875 # Whether or not to optimize for fast installation.
2876 fast_install=$enable_fast_install
2879 host_alias=$host_alias
2882 # An echo program that does not interpret backslashes.
2887 AR_FLAGS=$lt_AR_FLAGS
2889 # The default C compiler.
2892 # Is the compiler the GNU C compiler?
2895 # The linker used to build libraries.
2898 # Whether we need hard or soft links.
2901 # A BSD-compatible nm program.
2904 # A symbol stripping program
2907 # Used to examine libraries when file_magic_cmd begins "file"
2908 MAGIC_CMD=$MAGIC_CMD
2910 # Used on cygwin: DLL creation program.
2913 # Used on cygwin: object dumper.
2916 # Used on cygwin: assembler.
2919 # The name of the directory that contains temporary libtool files.
2922 # How to create reloadable object files.
2923 reload_flag=$lt_reload_flag
2924 reload_cmds=$lt_reload_cmds
2926 # How to pass a linker flag through the compiler.
2929 # Object file suffix (normally "o").
2932 # Old archive suffix (normally "a").
2935 # Executable file suffix (normally "").
2938 # Additional compiler flags for building library objects.
2939 pic_flag=$lt_pic_flag
2942 # Does compiler simultaneously support -c and -o options?
2943 compiler_c_o=$lt_compiler_c_o
2945 # Can we write directly to a .lo ?
2946 compiler_o_lo=$lt_compiler_o_lo
2948 # Must we lock files when doing compilation ?
2949 need_locks=$lt_need_locks
2951 # Do we need the lib prefix for modules?
2952 need_lib_prefix=$need_lib_prefix
2954 # Do we need a version for libraries?
2955 need_version=$need_version
2957 # Whether dlopen is supported.
2958 dlopen_support=$enable_dlopen
2960 # Whether dlopen of programs is supported.
2961 dlopen_self=$enable_dlopen_self
2963 # Whether dlopen of statically linked programs is supported.
2964 dlopen_self_static=$enable_dlopen_self_static
2966 # Compiler flag to prevent dynamic linking.
2967 link_static_flag=$lt_link_static_flag
2969 # Compiler flag to turn off builtin functions.
2970 no_builtin_flag=$lt_no_builtin_flag
2972 # Compiler flag to allow reflexive dlopens.
2973 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
2975 # Compiler flag to generate shared objects directly from archives.
2976 whole_archive_flag_spec=$lt_whole_archive_flag_spec
2978 # Compiler flag to generate thread-safe objects.
2979 thread_safe_flag_spec=$lt_thread_safe_flag_spec
2981 # Library versioning type.
2982 version_type=$version_type
2984 # Format of library name prefix.
2985 libname_spec=$lt_libname_spec
2987 # List of archive names. First name is the real one, the rest are links.
2988 # The last name is the one that the linker finds with -lNAME.
2989 library_names_spec=$lt_library_names_spec
2991 # The coded name of the library, if different from the real name.
2992 soname_spec=$lt_soname_spec
2994 # Commands used to build and install an old-style archive.
2996 old_archive_cmds=$lt_old_archive_cmds
2997 old_postinstall_cmds=$lt_old_postinstall_cmds
2998 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3000 # Create an old-style archive from a shared archive.
3001 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3003 # Create a temporary old-style archive to link instead of a shared archive.
3004 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3006 # Commands used to build and install a shared archive.
3007 archive_cmds=$lt_archive_cmds
3008 archive_expsym_cmds=$lt_archive_expsym_cmds
3009 postinstall_cmds=$lt_postinstall_cmds
3010 postuninstall_cmds=$lt_postuninstall_cmds
3012 # Commands to strip libraries.
3013 old_striplib=$lt_old_striplib
3014 striplib=$lt_striplib
3016 # Method to check whether dependent libraries are shared objects.
3017 deplibs_check_method=$lt_deplibs_check_method
3019 # Command to use when deplibs_check_method == file_magic.
3020 file_magic_cmd=$lt_file_magic_cmd
3022 # Flag that allows shared libraries with undefined symbols to be built.
3023 allow_undefined_flag=$lt_allow_undefined_flag
3025 # Flag that forces no undefined symbols.
3026 no_undefined_flag=$lt_no_undefined_flag
3028 # Commands used to finish a libtool library installation in a directory.
3029 finish_cmds=$lt_finish_cmds
3031 # Same as above, but a single script fragment to be evaled but not shown.
3032 finish_eval=$lt_finish_eval
3034 # Take the output of nm and produce a listing of raw symbols and C names.
3035 global_symbol_pipe=$lt_global_symbol_pipe
3037 # Transform the output of nm in a proper C declaration
3038 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3040 # Transform the output of nm in a C name address pair
3041 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3043 # This is the shared library runtime path variable.
3044 runpath_var=$runpath_var
3046 # This is the shared library path variable.
3047 shlibpath_var=$shlibpath_var
3049 # Is shlibpath searched before the hard-coded library search path?
3050 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3052 # How to hardcode a shared library path into an executable.
3053 hardcode_action=$hardcode_action
3055 # Whether we should hardcode library paths into libraries.
3056 hardcode_into_libs=$hardcode_into_libs
3058 # Flag to hardcode \$libdir into a binary during linking.
3059 # This must work even if \$libdir does not exist.
3060 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3062 # Whether we need a single -rpath flag with a separated argument.
3063 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3065 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3067 hardcode_direct=$hardcode_direct
3069 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3071 hardcode_minus_L=$hardcode_minus_L
3073 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3074 # the resulting binary.
3075 hardcode_shlibpath_var=$hardcode_shlibpath_var
3077 # Variables whose values should be saved in libtool wrapper scripts and
3078 # restored at relink time.
3079 variables_saved_for_relink="$variables_saved_for_relink"
3081 # Whether libtool must link a program against all its dependency libraries.
3082 link_all_deplibs=$link_all_deplibs
3084 # Compile-time system search path for libraries
3085 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3087 # Run-time system search path for libraries
3088 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3090 # Fix the shell variable \$srcfile for the compiler.
3091 fix_srcfile_path="$fix_srcfile_path"
3093 # Set to yes if exported symbols are required.
3094 always_export_symbols=$always_export_symbols
3096 # The commands to list exported symbols.
3097 export_symbols_cmds=$lt_export_symbols_cmds
3099 # The commands to extract the exported symbol list from a shared archive.
3100 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3102 # Symbols that should not be listed in the preloaded symbols.
3103 exclude_expsyms=$lt_exclude_expsyms
3105 # Symbols that must always be exported.
3106 include_expsyms=$lt_include_expsyms
3108 # ### END LIBTOOL CONFIG
3114 cat <<\EOF >> "${ofile}T"
3116 # AIX sometimes has problems with the GCC collect2 program. For some
3117 # reason, if we set the COLLECT_NAMES environment variable, the problems
3118 # vanish in a puff of smoke.
3119 if test "X${COLLECT_NAMES+set}" != Xset; then
3121 export COLLECT_NAMES
3128 cygwin* | mingw* | pw32* | os2*)
3129 cat <<'EOF' >> "${ofile}T"
3130 # This is a source program that is used to create dlls on Windows
3131 # Don't remove nor modify the starting and closing comments
3132 # /* ltdll.c starts here */
3133 # #define WIN32_LEAN_AND_MEAN
3134 # #include <windows.h>
3135 # #undef WIN32_LEAN_AND_MEAN
3136 # #include <stdio.h>
3138 # #ifndef __CYGWIN__
3139 # # ifdef __CYGWIN32__
3140 # # define __CYGWIN__ __CYGWIN32__
3144 # #ifdef __cplusplus
3147 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3148 # #ifdef __cplusplus
3153 # #include <cygwin/cygwin_dll.h>
3154 # DECLARE_CYGWIN_DLL( DllMain );
3156 # HINSTANCE __hDllInstance_base;
3159 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3161 # __hDllInstance_base = hInst;
3164 # /* ltdll.c ends here */
3165 # This is a source program that is used to create import libraries
3166 # on Windows for dlls which lack them. Don't remove nor modify the
3167 # starting and closing comments
3168 # /* impgen.c starts here */
3169 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3171 # This file is part of GNU libtool.
3173 # This program is free software; you can redistribute it and/or modify
3174 # it under the terms of the GNU General Public License as published by
3175 # the Free Software Foundation; either version 2 of the License, or
3176 # (at your option) any later version.
3178 # This program is distributed in the hope that it will be useful,
3179 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3180 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3181 # GNU General Public License for more details.
3183 # You should have received a copy of the GNU General Public License
3184 # along with this program; if not, write to the Free Software
3185 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3188 # #include <stdio.h> /* for printf() */
3189 # #include <unistd.h> /* for open(), lseek(), read() */
3190 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3191 # #include <string.h> /* for strdup() */
3193 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3195 # #define O_BINARY 0
3198 # static unsigned int
3199 # pe_get16 (fd, offset)
3203 # unsigned char b[2];
3204 # lseek (fd, offset, SEEK_SET);
3206 # return b[0] + (b[1]<<8);
3209 # static unsigned int
3210 # pe_get32 (fd, offset)
3214 # unsigned char b[4];
3215 # lseek (fd, offset, SEEK_SET);
3217 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3220 # static unsigned int
3224 # unsigned char *b = ptr;
3225 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3234 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3235 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3236 # unsigned long name_rvas, nexp;
3237 # unsigned char *expdata, *erva;
3238 # char *filename, *dll_name;
3240 # filename = argv[1];
3242 # dll = open(filename, O_RDONLY|O_BINARY);
3246 # dll_name = filename;
3248 # for (i=0; filename[i]; i++)
3249 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3250 # dll_name = filename + i +1;
3252 # pe_header_offset = pe_get32 (dll, 0x3c);
3253 # opthdr_ofs = pe_header_offset + 4 + 20;
3254 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3256 # if (num_entries < 1) /* no exports */
3259 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3260 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3261 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3262 # secptr = (pe_header_offset + 4 + 20 +
3263 # pe_get16 (dll, pe_header_offset + 4 + 16));
3266 # for (i = 0; i < nsections; i++)
3269 # unsigned long secptr1 = secptr + 40 * i;
3270 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3271 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3272 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3273 # lseek(dll, secptr1, SEEK_SET);
3274 # read(dll, sname, 8);
3275 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3277 # expptr = fptr + (export_rva - vaddr);
3278 # if (export_rva + export_size > vaddr + vsize)
3279 # export_size = vsize - (export_rva - vaddr);
3284 # expdata = (unsigned char*)malloc(export_size);
3285 # lseek (dll, expptr, SEEK_SET);
3286 # read (dll, expdata, export_size);
3287 # erva = expdata - export_rva;
3289 # nexp = pe_as32 (expdata+24);
3290 # name_rvas = pe_as32 (expdata+32);
3292 # printf ("EXPORTS\n");
3293 # for (i = 0; i<nexp; i++)
3295 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3296 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3301 # /* impgen.c ends here */
3307 # We use sed instead of cat because bash on DJGPP gets confused if
3308 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3309 # text mode, it properly converts lines to CR/LF. This bash problem
3310 # is reportedly fixed, but why not run on old versions too?
3311 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3313 mv -f "${ofile}T" "$ofile" || \
3314 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3318 ])# _LT_AC_LTCONFIG_HACK
3320 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3321 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3323 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3324 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3326 # AC_ENABLE_SHARED - implement the --enable-shared flag
3327 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3328 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3330 AC_DEFUN([AC_ENABLE_SHARED],
3331 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3332 AC_ARG_ENABLE(shared,
3333 changequote(<<, >>)dnl
3334 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3335 changequote([, ])dnl
3336 [p=${PACKAGE-default}
3338 yes) enable_shared=yes ;;
3339 no) enable_shared=no ;;
3342 # Look at the argument we got. We use all the common list separators.
3343 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3344 for pkg in $enableval; do
3345 if test "X$pkg" = "X$p"; then
3352 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3355 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3356 AC_DEFUN([AC_DISABLE_SHARED],
3357 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3358 AC_ENABLE_SHARED(no)])
3360 # AC_ENABLE_STATIC - implement the --enable-static flag
3361 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3362 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3364 AC_DEFUN([AC_ENABLE_STATIC],
3365 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3366 AC_ARG_ENABLE(static,
3367 changequote(<<, >>)dnl
3368 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3369 changequote([, ])dnl
3370 [p=${PACKAGE-default}
3372 yes) enable_static=yes ;;
3373 no) enable_static=no ;;
3376 # Look at the argument we got. We use all the common list separators.
3377 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3378 for pkg in $enableval; do
3379 if test "X$pkg" = "X$p"; then
3386 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3389 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3390 AC_DEFUN([AC_DISABLE_STATIC],
3391 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3392 AC_ENABLE_STATIC(no)])
3395 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3396 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3397 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3399 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3400 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3401 AC_ARG_ENABLE(fast-install,
3402 changequote(<<, >>)dnl
3403 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3404 changequote([, ])dnl
3405 [p=${PACKAGE-default}
3407 yes) enable_fast_install=yes ;;
3408 no) enable_fast_install=no ;;
3410 enable_fast_install=no
3411 # Look at the argument we got. We use all the common list separators.
3412 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3413 for pkg in $enableval; do
3414 if test "X$pkg" = "X$p"; then
3415 enable_fast_install=yes
3421 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3424 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3425 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3426 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3427 AC_ENABLE_FAST_INSTALL(no)])
3429 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3430 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3431 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3433 AC_DEFUN([AC_LIBTOOL_PICMODE],
3434 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3435 pic_mode=ifelse($#,1,$1,default)])
3438 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3439 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3440 [AC_MSG_CHECKING([for $1])
3441 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3444 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3447 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3450 ac_save_MAGIC_CMD="$MAGIC_CMD"
3451 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3452 dnl $ac_dummy forces splitting on constant user-supplied paths.
3453 dnl POSIX.2 word splitting is done only on the output of word expansions,
3454 dnl not every word. This closes a longstanding sh security hole.
3455 ac_dummy="ifelse([$2], , $PATH, [$2])"
3456 for ac_dir in $ac_dummy; do
3457 test -z "$ac_dir" && ac_dir=.
3458 if test -f $ac_dir/$1; then
3459 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3460 if test -n "$file_magic_test_file"; then
3461 case $deplibs_check_method in
3463 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3464 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3465 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3466 egrep "$file_magic_regex" > /dev/null; then
3471 *** Warning: the command libtool uses to detect shared libraries,
3472 *** $file_magic_cmd, produces output that libtool cannot recognize.
3473 *** The result is that libtool may fail to recognize shared libraries
3474 *** as such. This will affect the creation of libtool libraries that
3475 *** depend on shared libraries, but programs linked with such libtool
3476 *** libraries will work regardless of this problem. Nevertheless, you
3477 *** may want to report the problem to your system manager and/or to
3478 *** bug-libtool@gnu.org
3488 MAGIC_CMD="$ac_save_MAGIC_CMD"
3491 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3492 if test -n "$MAGIC_CMD"; then
3493 AC_MSG_RESULT($MAGIC_CMD)
3500 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3501 AC_DEFUN([AC_PATH_MAGIC],
3502 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3503 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3504 if test -z "$lt_cv_path_MAGIC_CMD"; then
3505 if test -n "$ac_tool_prefix"; then
3506 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3514 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3515 AC_DEFUN([AC_PROG_LD],
3516 [AC_ARG_WITH(gnu-ld,
3517 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3518 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3519 AC_REQUIRE([AC_PROG_CC])dnl
3520 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3521 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3522 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3524 if test "$GCC" = yes; then
3525 # Check if gcc -print-prog-name=ld gives a path.
3526 AC_MSG_CHECKING([for ld used by GCC])
3529 # gcc leaves a trailing carriage return which upsets mingw
3530 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3532 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3535 # Accept absolute paths.
3536 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3537 re_direlt='/[[^/]][[^/]]*/\.\./'
3538 # Canonicalize the path of ld
3539 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3540 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3541 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3543 test -z "$LD" && LD="$ac_prog"
3546 # If it fails, then pretend we aren't using GCC.
3550 # If it is relative, then search for the first ld in PATH.
3554 elif test "$with_gnu_ld" = yes; then
3555 AC_MSG_CHECKING([for GNU ld])
3557 AC_MSG_CHECKING([for non-GNU ld])
3559 AC_CACHE_VAL(lt_cv_path_LD,
3560 [if test -z "$LD"; then
3561 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3562 for ac_dir in $PATH; do
3563 test -z "$ac_dir" && ac_dir=.
3564 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3565 lt_cv_path_LD="$ac_dir/$ac_prog"
3566 # Check to see if the program is GNU ld. I'd rather use --version,
3567 # but apparently some GNU ld's only accept -v.
3568 # Break only if it was the GNU/non-GNU ld that we prefer.
3569 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3570 test "$with_gnu_ld" != no && break
3572 test "$with_gnu_ld" != yes && break
3578 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3581 if test -n "$LD"; then
3586 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3591 AC_DEFUN([AC_PROG_LD_GNU],
3592 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3593 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3594 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3595 lt_cv_prog_gnu_ld=yes
3597 lt_cv_prog_gnu_ld=no
3599 with_gnu_ld=$lt_cv_prog_gnu_ld
3602 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3603 # -- PORTME Some linkers may need a different reload flag.
3604 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3605 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3606 [lt_cv_ld_reload_flag='-r'])
3607 reload_flag=$lt_cv_ld_reload_flag
3608 test -n "$reload_flag" && reload_flag=" $reload_flag"
3611 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3612 # -- PORTME fill in with the dynamic library characteristics
3613 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3614 [AC_CACHE_CHECK([how to recognise dependant libraries],
3615 lt_cv_deplibs_check_method,
3616 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3617 lt_cv_file_magic_test_file=
3618 lt_cv_deplibs_check_method='unknown'
3619 # Need to set the preceding variable on all platforms that support
3620 # interlibrary dependencies.
3621 # 'none' -- dependencies not supported.
3622 # `unknown' -- same as none, but documents that we really don't know.
3623 # 'pass_all' -- all dependencies passed with no checks.
3624 # 'test_compile' -- check by making test program.
3625 # 'file_magic [[regex]]' -- check by looking for files in library path
3626 # which responds to the $file_magic_cmd with a given egrep regex.
3627 # If you have `file' or equivalent on your system and you're not sure
3628 # whether `pass_all' will *always* work, you probably want this one.
3632 lt_cv_deplibs_check_method=pass_all
3636 lt_cv_deplibs_check_method=pass_all
3640 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3641 lt_cv_file_magic_cmd='/usr/bin/file -L'
3642 lt_cv_file_magic_test_file=/shlib/libc.so
3645 cygwin* | mingw* | pw32*)
3646 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3647 lt_cv_file_magic_cmd='$OBJDUMP -f'
3650 darwin* | rhapsody*)
3651 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3652 lt_cv_file_magic_cmd='/usr/bin/file -L'
3654 rhapsody* | darwin1.[[012]])
3655 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3658 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3664 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3667 # Not sure whether the presence of OpenBSD here was a mistake.
3668 # Let's accept both of them until this is cleared up.
3669 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3670 lt_cv_file_magic_cmd=/usr/bin/file
3671 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3675 lt_cv_deplibs_check_method=pass_all
3680 lt_cv_deplibs_check_method=pass_all
3684 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3685 lt_cv_file_magic_cmd=/usr/bin/file
3686 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3689 irix5* | irix6* | nonstopux*)
3691 irix5* | nonstopux*)
3692 # this will be overridden with pass_all, but let us keep it just in case
3693 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3697 *-32|*"-32 ") libmagic=32-bit;;
3698 *-n32|*"-n32 ") libmagic=N32;;
3699 *-64|*"-64 ") libmagic=64-bit;;
3700 *) libmagic=never-match;;
3702 # this will be overridden with pass_all, but let us keep it just in case
3703 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3706 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3707 lt_cv_deplibs_check_method=pass_all
3710 # This must be Linux ELF.
3713 alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3714 lt_cv_deplibs_check_method=pass_all ;;
3716 # glibc up to 2.1.1 does not perform some relocations on ARM
3717 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3719 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3723 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3724 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3726 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3731 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3732 lt_cv_file_magic_cmd=/usr/bin/file
3733 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3737 lt_cv_file_magic_cmd=/usr/bin/file
3738 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3739 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3740 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3742 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3746 osf3* | osf4* | osf5*)
3747 # this will be overridden with pass_all, but let us keep it just in case
3748 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3749 lt_cv_file_magic_test_file=/shlib/libc.so
3750 lt_cv_deplibs_check_method=pass_all
3754 lt_cv_deplibs_check_method=pass_all
3758 lt_cv_deplibs_check_method=pass_all
3759 lt_cv_file_magic_test_file=/lib/libc.so
3762 sysv5uw[[78]]* | sysv4*uw2*)
3763 lt_cv_deplibs_check_method=pass_all
3766 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3767 case $host_vendor in
3769 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]]'
3770 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3773 lt_cv_deplibs_check_method=pass_all
3776 lt_cv_file_magic_cmd='/bin/file'
3777 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3780 lt_cv_file_magic_cmd='/bin/file'
3781 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3782 lt_cv_file_magic_test_file=/lib/libc.so
3785 lt_cv_deplibs_check_method=pass_all
3791 file_magic_cmd=$lt_cv_file_magic_cmd
3792 deplibs_check_method=$lt_cv_deplibs_check_method
3796 # AC_PROG_NM - find the path to a BSD-compatible name lister
3797 AC_DEFUN([AC_PROG_NM],
3798 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3799 AC_MSG_CHECKING([for BSD-compatible nm])
3800 AC_CACHE_VAL(lt_cv_path_NM,
3801 [if test -n "$NM"; then
3802 # Let the user override the test.
3805 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3806 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3807 test -z "$ac_dir" && ac_dir=.
3808 tmp_nm=$ac_dir/${ac_tool_prefix}nm
3809 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3810 # Check to see if the nm accepts a BSD-compat flag.
3811 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3812 # nm: unknown option "B" ignored
3813 # Tru64's nm complains that /dev/null is an invalid object file
3814 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3815 lt_cv_path_NM="$tmp_nm -B"
3817 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3818 lt_cv_path_NM="$tmp_nm -p"
3821 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3822 continue # so that we can try to find one that supports BSD flags
3827 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3830 AC_MSG_RESULT([$NM])
3833 # AC_CHECK_LIBM - check for math library
3834 AC_DEFUN([AC_CHECK_LIBM],
3835 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3838 *-*-beos* | *-*-cygwin* | *-*-pw32*)
3839 # These system don't have libm
3842 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3843 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3846 AC_CHECK_LIB(m, main, LIBM="-lm")
3851 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3852 # the libltdl convenience library and LTDLINCL to the include flags for
3853 # the libltdl header and adds --enable-ltdl-convenience to the
3854 # configure arguments. Note that LIBLTDL and LTDLINCL are not
3855 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
3856 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
3857 # with '${top_builddir}/' and LTDLINCL will be prefixed with
3858 # '${top_srcdir}/' (note the single quotes!). If your package is not
3859 # flat and you're not using automake, define top_builddir and
3860 # top_srcdir appropriately in the Makefiles.
3861 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3862 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3863 case $enable_ltdl_convenience in
3864 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3865 "") enable_ltdl_convenience=yes
3866 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3868 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3869 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3870 # For backwards non-gettext consistent compatibility...
3874 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3875 # the libltdl installable library and LTDLINCL to the include flags for
3876 # the libltdl header and adds --enable-ltdl-install to the configure
3877 # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
3878 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
3879 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
3880 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
3881 # with '${top_srcdir}/' (note the single quotes!). If your package is
3882 # not flat and you're not using automake, define top_builddir and
3883 # top_srcdir appropriately in the Makefiles.
3884 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3885 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3886 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3887 AC_CHECK_LIB(ltdl, main,
3888 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3889 [if test x"$enable_ltdl_install" = xno; then
3890 AC_MSG_WARN([libltdl not installed, but installation disabled])
3892 enable_ltdl_install=yes
3895 if test x"$enable_ltdl_install" = x"yes"; then
3896 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3897 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3898 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3900 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3904 # For backwards non-gettext consistent compatibility...
3909 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
3910 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
3911 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
3912 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
3913 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
3914 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
3915 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
3917 # This is just to silence aclocal about the macro not being used
3918 ifelse([AC_DISABLE_FAST_INSTALL])
3920 # NOTE: This macro has been submitted for inclusion into #
3921 # GNU Autoconf as AC_PROG_SED. When it is available in #
3922 # a released version of Autoconf we should remove this #
3923 # macro and use it instead. #
3926 # Check for a fully-functional sed program, that truncates
3927 # as few characters as possible. Prefer GNU sed if found.
3928 AC_DEFUN([LT_AC_PROG_SED],
3929 [AC_MSG_CHECKING([for a sed that does not truncate output])
3930 AC_CACHE_VAL(lt_cv_path_SED,
3931 [# Loop through the user's path and test for sed and gsed.
3932 # Then use that list of sed's as ones to test for truncation.
3933 as_executable_p="test -f"
3934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3938 test -z "$as_dir" && as_dir=.
3939 for ac_prog in sed gsed; do
3940 for ac_exec_ext in '' $ac_executable_extensions; do
3941 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3942 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3948 # Create a temporary directory, and hook for its removal unless debugging.
3951 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3952 trap '{ (exit 1); exit 1; }' 1 2 13 15
3955 # Create a (secure) tmp directory for tmp files.
3958 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3959 test -n "$tmp" && test -d "$tmp"
3962 tmp=$TMPDIR/sed$$-$RANDOM
3963 (umask 077 && mkdir $tmp)
3966 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3967 { (exit 1); exit 1; }
3971 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3972 # along with /bin/sed that truncates output.
3973 for _sed in $_sed_list /usr/xpg4/bin/sed; do
3974 test ! -f ${_sed} && break
3975 cat /dev/null > "$tmp/sed.in"
3977 echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3978 # Check for GNU sed and select it if it is found.
3979 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3980 lt_cv_path_SED=${_sed}
3984 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3985 mv "$tmp/sed.tmp" "$tmp/sed.in"
3986 cp "$tmp/sed.in" "$tmp/sed.nl"
3987 echo >>"$tmp/sed.nl"
3988 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3989 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3990 # 40000 chars as input seems more than enough
3991 test $_count -gt 10 && break
3992 _count=`expr $_count + 1`
3993 if test $_count -gt $_max; then
3995 lt_cv_path_SED=$_sed
4001 if test "X$SED" != "X"; then
4006 AC_MSG_RESULT([$SED])