1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 dnl See whether we need a declaration for a function.
14 dnl RADIUSD_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
15 AC_DEFUN(RADIUSD_NEED_DECLARATION,
16 [AC_MSG_CHECKING([whether $1 must be declared])
17 AC_CACHE_VAL(radius_cv_decl_needed_$1,
30 #ifdef HAVE_RESOURCE_H
45 #ifdef HAVE_SYS_SELECT_H
46 #include <sys/select.h>
57 #ifdef HAVE_INTTYPES_H
63 #ifdef HAVE_ARPA_INET_H
64 #include <arpa/inet.h>
67 [char *(*pfn) = (char *(*)) $1],
68 eval "radius_cv_decl_needed_$1=no", eval "radius_cv_decl_needed_$1=yes")])
69 if eval "test \"`echo '$radius_cv_decl_needed_'$1`\" = yes"; then
71 radius_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
72 AC_DEFINE_UNQUOTED($radius_tr_decl)
78 dnl Check multiple functions to see whether each needs a declaration.
79 dnl RADIUSD_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
80 AC_DEFUN(RADIUSD_NEED_DECLARATIONS,
83 RADIUSD_NEED_DECLARATION($ac_func, $2)
87 dnl Checks to see if this is SUNPro we're building with
90 AC_DEFUN(AC_PROG_CC_SUNPRO,
91 [AC_CACHE_CHECK(whether we are using SUNPro C, ac_cv_prog_suncc,
92 [dnl The semicolon is to pacify NeXT's syntax-checking cpp.
93 cat > conftest.c <<EOF
98 if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
105 dnl # FR_CHECK_TYPE_INCLUDE([#includes ...], type, default-C-types)
107 dnl # This function is like AC_CHECK_TYPE, but you can give this one
108 dnl # a list of include files to check.
110 AC_DEFUN(FR_CHECK_TYPE_INCLUDE,
112 AC_CACHE_CHECK(for $2, ac_cv_type_$2,
121 if test "$ac_cv_type_$2" != "yes"; then
126 dnl #######################################################################
128 dnl # Look for SNMP in a variety of places.
130 AC_DEFUN(SNMP_CHECKS, [
132 AC_SUBST(SNMP_INCLUDE)
134 AC_MSG_CHECKING([for asn1.h,snmp.h,snmp_impl.h])
137 dnl # First, see if we can build it WITHOUT using any special includes and in ucd-snmp
140 #ifdef HAVE_SYS_TYPES_H
141 #include <sys/types.h>
155 #include <ucd-snmp/ucd-snmp-config.h>
156 #include <ucd-snmp/asn1.h>
157 #include <ucd-snmp/snmp.h>
158 #include <ucd-snmp/snmp_impl.h>],
160 SNMP_INCLUDE="";ucdsnmp=yes,
164 dnl # If not, look for it in a number of directories and in ucd-snmp.
166 if test "x$ucdsnmp" = "x"; then
168 for try in /usr/include /usr/local/include $snmp_include_dir; do
169 CFLAGS="$old_CFLAGS -I$try"
171 #ifdef HAVE_SYS_TYPES_H
172 #include <sys/types.h>
186 #include <ucd-snmp/ucd-snmp-config.h>
187 #include <ucd-snmp/asn1.h>
188 #include <ucd-snmp/snmp.h>
189 #include <ucd-snmp/snmp_impl.h>],
191 SNMP_INCLUDE="-I$try";ucdsnmp=yes,
193 if test "x$ucdsnmp" != "x"; then
200 if test "x$ucdsnmp" = "x"; then
202 for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $snmp_include_dir; do
203 CFLAGS="$old_CFLAGS -I$try"
205 dnl # First, see if we can build it WITHOUT using any special includes and without ucd-snmp
208 #ifdef HAVE_SYS_TYPES_H
209 #include <sys/types.h>
225 #include <snmp_impl.h>],
227 SNMP_INCLUDE="";ucdsnmp=no,
229 if test "x$ucdsnmp" != "x"; then
237 dnl # If not, look for it in a number of directories and without ucd-snmp
239 if test "x$ucdsnmp" = "x"; then
241 for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $snmp_include_dir; do
242 CFLAGS="$old_CFLAGS -I$try"
244 #ifdef HAVE_SYS_TYPES_H
245 #include <sys/types.h>
261 #include <snmp_impl.h>],
263 SNMP_INCLUDE="-I$try";ucdsnmp=no,
265 if test "x$ucdsnmp" != "x"; then
272 if test "x$ucdsnmp" = "x"; then
275 if test "x$ucdsnmp" = "xyes"; then
276 AC_MSG_RESULT((ucd-snmp)yes)
277 AC_DEFINE(HAVE_UCD_SNMP_ASN1_SNMP_SNMPIMPL_H)
280 AC_DEFINE(HAVE_ASN1_SNMP_SNMPIMPL_H)
283 dnl # Now do the same thing, looking for the SNMP library directory
285 AC_MSG_CHECKING([for snmp_build_var_op in -lsnmp])
288 dnl # First, see if we can build it WITHOUT using any special includes
291 LIBS="$old_LIBS -lsnmp"
292 AC_TRY_LINK([extern char snmp_build_var_op();],
293 [ snmp_build_var_op()],
297 if test "x$SNMP_LIBS" = "x"; then
298 for try in /usr/lib /usr/local/lib /usr/local/snmp/lib $snmp_lib_dir; do
299 LIBS="$old_LIBS -L$try -lsnmp"
300 AC_TRY_LINK([extern char snmp_build_var_op();],
301 [ snmp_build_var_op()],
302 SNMP_LIBS="-L$try -lsnmp",
304 if test "x$SNMP_LIBS" != "x"; then
308 dnl # That didn't work. Try adding the '-lcrypto' line.
309 dnl # Some SNMP libraries are linked against SSL...
311 LIBS="$old_LIBS -L$try -lsnmp -lcrypto"
312 AC_TRY_LINK([extern char snmp_build_var_op();],
313 [ snmp_build_var_op()],
314 SNMP_LIBS="-L$try -lsnmp -lcrypto",
316 if test "x$SNMP_LIBS" != "x"; then
324 dnl # If one or the other isn't found, disable them both..
325 dnl # If both are found, enable them both.
328 if test "x$SNMP_LIBS" = "x"; then
334 AC_DEFINE(HAVE_LIBSNMP)
341 dnl # Locate the directory in which a particular file is found.
343 dnl # Usage: FR_LOCATE_DIR(MYSQLLIB_DIR, libmysqlclient.a)
345 dnl # Defines the variable MYSQLLIB_DIR to be the directory(s) in
346 dnl # which the file libmysqlclient.a is to be found.
349 AC_DEFUN(FR_LOCATE_DIR,
351 dnl # If we have the program 'locate', then the problem of finding a
352 dnl # particular file becomes MUCH easier.
356 dnl # No 'locate' defined, do NOT do anything.
358 if test "x$LOCATE" != "x"; then
360 dnl # Root through a series of directories, looking for the given file.
365 for x in `${LOCATE} $file 2>/dev/null`; do
367 dnl # When asked for 'foo', locate will also find 'foo_bar', which we
368 dnl # don't want. We want that EXACT filename.
370 dnl # We ALSO want to be able to look for files like 'mysql/mysql.h',
371 dnl # and properly match them, too. So we try to strip off the last
372 dnl # part of the filename, using the name of the file we're looking
373 dnl # for. If we CANNOT strip it off, then the name will be unchanged.
375 base=`echo $x | sed "s%/${file}%%"`
376 if test "x$x" = "x$base"; then
380 dir=`${DIRNAME} $x 2>/dev/null`
382 dnl # Exclude a number of directories.
384 exclude=`echo ${dir} | ${GREP} /home`
385 if test "x$exclude" != "x"; then
390 dnl # OK, we have an exact match. Let's be sure that we only find ONE
391 dnl # matching directory.
393 already=`echo \$$1 ${DIRS} | ${GREP} ${dir}`
394 if test "x$already" = "x"; then
401 dnl # And remember the directory in which we found the file.
403 eval "$1=\"\$$1 $DIRS\""
407 dnl #######################################################################
409 dnl # Look for a library in a number of places.
411 AC_DEFUN(FR_SMART_CHECK_LIB, [
413 sm_lib_safe=`echo "$1" | sed 'y%./+-%__p_%'`
414 sm_func_safe=`echo "$2" | sed 'y%./+-%__p_%'`
415 AC_MSG_CHECKING([for $2 in -l$1])
421 dnl # Try to link it first, using the default libs && library paths
425 AC_TRY_LINK([extern char $2();],
429 if test "x$smart_lib" = "x"; then
430 FR_LOCATE_DIR(smart_lib_dir,[lib$1${libltdl_cv_shlibext}])
431 FR_LOCATE_DIR(smart_lib_dir,[lib$1.a])
433 for try in $smart_try_dir $smart_lib_dir /usr/local/lib/ /opt/lib; do
434 LIBS="$old_LIBS -L$try -l$1"
436 AC_TRY_LINK([extern char $2();],
438 smart_lib="-L$try -l$1")
439 if test "x$smart_lib" != "x"; then
447 dnl # Found it, set the appropriate variable.
449 if test "x$smart_lib" != "x"; then
451 eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
452 LIBS="$old_LIBS $smart_lib"
453 SMART_LIBS="$SMART_LIBS $smart_lib"
459 dnl #######################################################################
461 dnl # Look for a header file in a number of places.
463 dnl # FR_SMART_CHECK_INCLUDE(foo.h, [ #include <other.h> ])
465 AC_DEFUN(FR_SMART_CHECK_INCLUDE, [
467 ac_safe=`echo "$1" | sed 'y%./+-%__pm%'`
468 AC_MSG_CHECKING([for $1])
474 dnl # Try to link it first, using the default includes
483 if test "x$smart_include" = "x"; then
484 FR_LOCATE_DIR(smart_include_dir,$1)
486 for try in $smart_try_dir $smart_include_dir /usr/local/include/ /opt/include; do
487 CFLAGS="$old_CFLAGS -I$try"
492 smart_include="-I$try",
495 if test "x$smart_include" != "x"; then
503 dnl # Found it, set the appropriate variable.
505 if test "x$smart_include" != "x"; then
507 eval "ac_cv_header_$ac_safe=yes"
508 CFLAGS="$old_CFLAGS $smart_include"
509 SMART_CFLAGS="$SMART_CFLAGS $smart_include"
515 dnl #######################################################################
517 dnl # Look for a header file in a number of places.
519 dnl # Usage: FR_CHECK_STRUCT_HAS_MEMBER([#include <foo.h>], [struct foo], member)
520 dnl # If the member is defined, then the variable
521 dnl # ac_cv_type_struct_foo_has_member is set to 'yes'
523 AC_DEFUN(FR_CHECK_STRUCT_HAS_MEMBER, [
524 AC_MSG_CHECKING([for $3 in $2])
526 dnl BASED on 'offsetof':
527 dnl #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
533 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
536 [ int foo = offsetof($2, $3) ],
540 ac_safe_type=`echo "$2" | sed 'y% %_%'`
541 if test "x$has_element" != "x"; then
543 eval "ac_cv_type_${ac_safe_type}_has_$3=yes"
546 eval "ac_cv_type_${ac_safe_type}_has_$3="
550 AC_DEFUN(FR_LIBLTDL_PATH,
553 if test x"$enable_ltdl_install" = x"yes"; then
554 AC_CONFIG_SUBDIRS('libltdl')
557 AC_SUBST(LIBLTDLPATH)
560 # lib-prefix.m4 serial 3 (gettext-0.13)
561 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
562 dnl This file is free software, distributed under the terms of the GNU
563 dnl General Public License. As a special exception to the GNU General
564 dnl Public License, this file may be distributed as part of a program
565 dnl that contains a configuration script generated by Autoconf, under
566 dnl the same distribution terms as the rest of that program.
568 dnl From Bruno Haible.
570 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
571 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
572 dnl require excessive bracketing.
573 ifdef([AC_HELP_STRING],
574 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
575 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
577 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
578 dnl to access previously installed libraries. The basic assumption is that
579 dnl a user will want packages to use other packages he previously installed
580 dnl with the same --prefix option.
581 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
582 dnl libraries, but is otherwise very convenient.
583 AC_DEFUN([AC_LIB_PREFIX],
585 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
586 AC_REQUIRE([AC_PROG_CC])
587 AC_REQUIRE([AC_CANONICAL_HOST])
588 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
589 dnl By default, look in $includedir and $libdir.
591 AC_LIB_WITH_FINAL_PREFIX([
592 eval additional_includedir=\"$includedir\"
593 eval additional_libdir=\"$libdir\"
595 AC_LIB_ARG_WITH([lib-prefix],
596 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
597 --without-lib-prefix don't search for libraries in includedir and libdir],
599 if test "X$withval" = "Xno"; then
602 if test "X$withval" = "X"; then
603 AC_LIB_WITH_FINAL_PREFIX([
604 eval additional_includedir=\"$includedir\"
605 eval additional_libdir=\"$libdir\"
608 additional_includedir="$withval/include"
609 additional_libdir="$withval/lib"
613 if test $use_additional = yes; then
614 dnl Potentially add $additional_includedir to $CPPFLAGS.
616 dnl 1. if it's the standard /usr/include,
617 dnl 2. if it's already present in $CPPFLAGS,
618 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
619 dnl 4. if it doesn't exist as a directory.
620 if test "X$additional_includedir" != "X/usr/include"; then
622 for x in $CPPFLAGS; do
623 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
624 if test "X$x" = "X-I$additional_includedir"; then
629 if test -z "$haveit"; then
630 if test "X$additional_includedir" = "X/usr/local/include"; then
631 if test -n "$GCC"; then
637 if test -z "$haveit"; then
638 if test -d "$additional_includedir"; then
639 dnl Really add $additional_includedir to $CPPFLAGS.
640 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
645 dnl Potentially add $additional_libdir to $LDFLAGS.
647 dnl 1. if it's the standard /usr/lib,
648 dnl 2. if it's already present in $LDFLAGS,
649 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
650 dnl 4. if it doesn't exist as a directory.
651 if test "X$additional_libdir" != "X/usr/lib"; then
653 for x in $LDFLAGS; do
654 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
655 if test "X$x" = "X-L$additional_libdir"; then
660 if test -z "$haveit"; then
661 if test "X$additional_libdir" = "X/usr/local/lib"; then
662 if test -n "$GCC"; then
668 if test -z "$haveit"; then
669 if test -d "$additional_libdir"; then
670 dnl Really add $additional_libdir to $LDFLAGS.
671 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
679 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
680 dnl acl_final_exec_prefix, containing the values to which $prefix and
681 dnl $exec_prefix will expand at the end of the configure script.
682 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
684 dnl Unfortunately, prefix and exec_prefix get only finally determined
685 dnl at the end of configure.
686 if test "X$prefix" = "XNONE"; then
687 acl_final_prefix="$ac_default_prefix"
689 acl_final_prefix="$prefix"
691 if test "X$exec_prefix" = "XNONE"; then
692 acl_final_exec_prefix='${prefix}'
694 acl_final_exec_prefix="$exec_prefix"
696 acl_save_prefix="$prefix"
697 prefix="$acl_final_prefix"
698 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
699 prefix="$acl_save_prefix"
702 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
703 dnl variables prefix and exec_prefix bound to the values they will have
704 dnl at the end of the configure script.
705 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
707 acl_save_prefix="$prefix"
708 prefix="$acl_final_prefix"
709 acl_save_exec_prefix="$exec_prefix"
710 exec_prefix="$acl_final_exec_prefix"
712 exec_prefix="$acl_save_exec_prefix"
713 prefix="$acl_save_prefix"
716 # lib-link.m4 serial 4 (gettext-0.12)
717 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
718 dnl This file is free software, distributed under the terms of the GNU
719 dnl General Public License. As a special exception to the GNU General
720 dnl Public License, this file may be distributed as part of a program
721 dnl that contains a configuration script generated by Autoconf, under
722 dnl the same distribution terms as the rest of that program.
724 dnl From Bruno Haible.
726 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
727 dnl the libraries corresponding to explicit and implicit dependencies.
728 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
729 dnl augments the CPPFLAGS variable.
730 AC_DEFUN([AC_LIB_LINKFLAGS],
732 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
733 AC_REQUIRE([AC_LIB_RPATH])
734 define([Name],[translit([$1],[./-], [___])])
735 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
736 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
737 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
738 AC_LIB_LINKFLAGS_BODY([$1], [$2])
739 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
740 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
741 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
743 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
744 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
745 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
746 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
748 AC_SUBST([LTLIB]NAME)
749 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
750 dnl results of this search when this library appears as a dependency.
756 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
757 dnl searches for libname and the libraries corresponding to explicit and
758 dnl implicit dependencies, together with the specified include files and
759 dnl the ability to compile and link the specified testcode. If found, it
760 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
761 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
762 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
763 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
764 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
766 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
767 AC_REQUIRE([AC_LIB_RPATH])
768 define([Name],[translit([$1],[./-], [___])])
769 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
770 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
772 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
774 AC_LIB_LINKFLAGS_BODY([$1], [$2])
776 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
777 dnl because if the user has installed lib[]Name and not disabled its use
778 dnl via --without-lib[]Name-prefix, he wants to use it.
779 ac_save_CPPFLAGS="$CPPFLAGS"
780 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
782 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
784 LIBS="$LIBS $LIB[]NAME"
785 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
788 if test "$ac_cv_lib[]Name" = yes; then
790 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
791 AC_MSG_CHECKING([how to link with lib[]$1])
792 AC_MSG_RESULT([$LIB[]NAME])
795 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
796 dnl $INC[]NAME either.
797 CPPFLAGS="$ac_save_CPPFLAGS"
801 AC_SUBST([HAVE_LIB]NAME)
803 AC_SUBST([LTLIB]NAME)
808 dnl Determine the platform dependent parameters needed to use rpath:
809 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
810 dnl hardcode_direct, hardcode_minus_L.
811 AC_DEFUN([AC_LIB_RPATH],
813 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
814 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
815 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
816 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
817 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
818 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
819 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
825 libext="$acl_cv_libext"
826 shlibext="$acl_cv_shlibext"
827 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
828 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
829 hardcode_direct="$acl_cv_hardcode_direct"
830 hardcode_minus_L="$acl_cv_hardcode_minus_L"
831 dnl Determine whether the user wants rpath handling at all.
833 [ --disable-rpath do not hardcode runtime library paths],
837 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
838 dnl the libraries corresponding to explicit and implicit dependencies.
839 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
840 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
842 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
843 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
844 dnl By default, look in $includedir and $libdir.
846 AC_LIB_WITH_FINAL_PREFIX([
847 eval additional_includedir=\"$includedir\"
848 eval additional_libdir=\"$libdir\"
850 AC_LIB_ARG_WITH([lib$1-prefix],
851 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
852 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
854 if test "X$withval" = "Xno"; then
857 if test "X$withval" = "X"; then
858 AC_LIB_WITH_FINAL_PREFIX([
859 eval additional_includedir=\"$includedir\"
860 eval additional_libdir=\"$libdir\"
863 additional_includedir="$withval/include"
864 additional_libdir="$withval/lib"
868 dnl Search the library and its dependencies in $additional_libdir and
869 dnl $LDFLAGS. Using breadth-first-seach.
875 names_already_handled=
876 names_next_round='$1 $2'
877 while test -n "$names_next_round"; do
878 names_this_round="$names_next_round"
880 for name in $names_this_round; do
882 for n in $names_already_handled; do
883 if test "$n" = "$name"; then
888 if test -z "$already_handled"; then
889 names_already_handled="$names_already_handled $name"
890 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
891 dnl or AC_LIB_HAVE_LINKFLAGS call.
892 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
893 eval value=\"\$HAVE_LIB$uppername\"
894 if test -n "$value"; then
895 if test "$value" = yes; then
896 eval value=\"\$LIB$uppername\"
897 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
898 eval value=\"\$LTLIB$uppername\"
899 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
901 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
902 dnl that this library doesn't exist. So just drop it.
906 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
907 dnl and the already constructed $LIBNAME/$LTLIBNAME.
912 if test $use_additional = yes; then
913 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
914 found_dir="$additional_libdir"
915 found_so="$additional_libdir/lib$name.$shlibext"
916 if test -f "$additional_libdir/lib$name.la"; then
917 found_la="$additional_libdir/lib$name.la"
920 if test -f "$additional_libdir/lib$name.$libext"; then
921 found_dir="$additional_libdir"
922 found_a="$additional_libdir/lib$name.$libext"
923 if test -f "$additional_libdir/lib$name.la"; then
924 found_la="$additional_libdir/lib$name.la"
929 if test "X$found_dir" = "X"; then
930 for x in $LDFLAGS $LTLIB[]NAME; do
931 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
934 dir=`echo "X$x" | sed -e 's/^X-L//'`
935 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
937 found_so="$dir/lib$name.$shlibext"
938 if test -f "$dir/lib$name.la"; then
939 found_la="$dir/lib$name.la"
942 if test -f "$dir/lib$name.$libext"; then
944 found_a="$dir/lib$name.$libext"
945 if test -f "$dir/lib$name.la"; then
946 found_la="$dir/lib$name.la"
952 if test "X$found_dir" != "X"; then
957 if test "X$found_dir" != "X"; then
958 dnl Found the library.
959 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
960 if test "X$found_so" != "X"; then
961 dnl Linking with a shared library. We attempt to hardcode its
962 dnl directory into the executable's runpath, unless it's the
963 dnl standard /usr/lib.
964 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
965 dnl No hardcoding is needed.
966 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
968 dnl Use an explicit option to hardcode DIR into the resulting
970 dnl Potentially add DIR to ltrpathdirs.
971 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
973 for x in $ltrpathdirs; do
974 if test "X$x" = "X$found_dir"; then
979 if test -z "$haveit"; then
980 ltrpathdirs="$ltrpathdirs $found_dir"
982 dnl The hardcoding into $LIBNAME is system dependent.
983 if test "$hardcode_direct" = yes; then
984 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
985 dnl resulting binary.
986 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
988 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
989 dnl Use an explicit option to hardcode DIR into the resulting
991 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
992 dnl Potentially add DIR to rpathdirs.
993 dnl The rpathdirs will be appended to $LIBNAME at the end.
995 for x in $rpathdirs; do
996 if test "X$x" = "X$found_dir"; then
1001 if test -z "$haveit"; then
1002 rpathdirs="$rpathdirs $found_dir"
1005 dnl Rely on "-L$found_dir".
1006 dnl But don't add it if it's already contained in the LDFLAGS
1007 dnl or the already constructed $LIBNAME
1009 for x in $LDFLAGS $LIB[]NAME; do
1010 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1011 if test "X$x" = "X-L$found_dir"; then
1016 if test -z "$haveit"; then
1017 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1019 if test "$hardcode_minus_L" != no; then
1020 dnl FIXME: Not sure whether we should use
1021 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1023 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1025 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1026 dnl here, because this doesn't fit in flags passed to the
1027 dnl compiler. So give up. No hardcoding. This affects only
1028 dnl very old systems.
1029 dnl FIXME: Not sure whether we should use
1030 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1032 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1038 if test "X$found_a" != "X"; then
1039 dnl Linking with a static library.
1040 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1042 dnl We shouldn't come here, but anyway it's good to have a
1044 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1047 dnl Assume the include files are nearby.
1048 additional_includedir=
1049 case "$found_dir" in
1051 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1052 additional_includedir="$basedir/include"
1055 if test "X$additional_includedir" != "X"; then
1056 dnl Potentially add $additional_includedir to $INCNAME.
1057 dnl But don't add it
1058 dnl 1. if it's the standard /usr/include,
1059 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1060 dnl 3. if it's already present in $CPPFLAGS or the already
1061 dnl constructed $INCNAME,
1062 dnl 4. if it doesn't exist as a directory.
1063 if test "X$additional_includedir" != "X/usr/include"; then
1065 if test "X$additional_includedir" = "X/usr/local/include"; then
1066 if test -n "$GCC"; then
1068 linux*) haveit=yes;;
1072 if test -z "$haveit"; then
1073 for x in $CPPFLAGS $INC[]NAME; do
1074 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1075 if test "X$x" = "X-I$additional_includedir"; then
1080 if test -z "$haveit"; then
1081 if test -d "$additional_includedir"; then
1082 dnl Really add $additional_includedir to $INCNAME.
1083 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1089 dnl Look for dependencies.
1090 if test -n "$found_la"; then
1091 dnl Read the .la file. It defines the variables
1092 dnl dlname, library_names, old_library, dependency_libs, current,
1093 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1094 save_libdir="$libdir"
1096 */* | *\\*) . "$found_la" ;;
1097 *) . "./$found_la" ;;
1099 libdir="$save_libdir"
1100 dnl We use only dependency_libs.
1101 for dep in $dependency_libs; do
1104 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1105 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1106 dnl But don't add it
1107 dnl 1. if it's the standard /usr/lib,
1108 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1109 dnl 3. if it's already present in $LDFLAGS or the already
1110 dnl constructed $LIBNAME,
1111 dnl 4. if it doesn't exist as a directory.
1112 if test "X$additional_libdir" != "X/usr/lib"; then
1114 if test "X$additional_libdir" = "X/usr/local/lib"; then
1115 if test -n "$GCC"; then
1117 linux*) haveit=yes;;
1121 if test -z "$haveit"; then
1123 for x in $LDFLAGS $LIB[]NAME; do
1124 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1125 if test "X$x" = "X-L$additional_libdir"; then
1130 if test -z "$haveit"; then
1131 if test -d "$additional_libdir"; then
1132 dnl Really add $additional_libdir to $LIBNAME.
1133 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1137 for x in $LDFLAGS $LTLIB[]NAME; do
1138 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1139 if test "X$x" = "X-L$additional_libdir"; then
1144 if test -z "$haveit"; then
1145 if test -d "$additional_libdir"; then
1146 dnl Really add $additional_libdir to $LTLIBNAME.
1147 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1154 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1155 if test "$enable_rpath" != no; then
1156 dnl Potentially add DIR to rpathdirs.
1157 dnl The rpathdirs will be appended to $LIBNAME at the end.
1159 for x in $rpathdirs; do
1160 if test "X$x" = "X$dir"; then
1165 if test -z "$haveit"; then
1166 rpathdirs="$rpathdirs $dir"
1168 dnl Potentially add DIR to ltrpathdirs.
1169 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1171 for x in $ltrpathdirs; do
1172 if test "X$x" = "X$dir"; then
1177 if test -z "$haveit"; then
1178 ltrpathdirs="$ltrpathdirs $dir"
1183 dnl Handle this in the next round.
1184 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1187 dnl Handle this in the next round. Throw away the .la's
1188 dnl directory; it is already contained in a preceding -L
1190 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1193 dnl Most likely an immediate library name.
1194 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1195 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1201 dnl Didn't find the library; assume it is in the system directories
1202 dnl known to the linker and runtime loader. (All the system
1203 dnl directories known to the linker should also be known to the
1204 dnl runtime loader, otherwise the system is severely misconfigured.)
1205 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1206 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1212 if test "X$rpathdirs" != "X"; then
1213 if test -n "$hardcode_libdir_separator"; then
1214 dnl Weird platform: only the last -rpath option counts, the user must
1215 dnl pass all path elements in one option. We can arrange that for a
1216 dnl single library, but not when more than one $LIBNAMEs are used.
1218 for found_dir in $rpathdirs; do
1219 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1221 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1222 acl_save_libdir="$libdir"
1224 eval flag=\"$hardcode_libdir_flag_spec\"
1225 libdir="$acl_save_libdir"
1226 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1228 dnl The -rpath options are cumulative.
1229 for found_dir in $rpathdirs; do
1230 acl_save_libdir="$libdir"
1232 eval flag=\"$hardcode_libdir_flag_spec\"
1233 libdir="$acl_save_libdir"
1234 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1238 if test "X$ltrpathdirs" != "X"; then
1239 dnl When using libtool, the option that works for both libraries and
1240 dnl executables is -R. The -R options are cumulative.
1241 for found_dir in $ltrpathdirs; do
1242 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1247 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1248 dnl unless already present in VAR.
1249 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1250 dnl contains two or three consecutive elements that belong together.
1251 AC_DEFUN([AC_LIB_APPENDTOVAR],
1253 for element in [$2]; do
1256 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1257 if test "X$x" = "X$element"; then
1262 if test -z "$haveit"; then
1263 [$1]="${[$1]}${[$1]:+ }$element"
1268 # lib-ld.m4 serial 3 (gettext-0.13)
1269 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1270 dnl This file is free software, distributed under the terms of the GNU
1271 dnl General Public License. As a special exception to the GNU General
1272 dnl Public License, this file may be distributed as part of a program
1273 dnl that contains a configuration script generated by Autoconf, under
1274 dnl the same distribution terms as the rest of that program.
1276 dnl Subroutines of libtool.m4,
1277 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1278 dnl with libtool.m4.
1280 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1281 AC_DEFUN([AC_LIB_PROG_LD_GNU],
1282 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
1283 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1284 case `$LD -v 2>&1 </dev/null` in
1285 *GNU* | *'with BFD'*)
1286 acl_cv_prog_gnu_ld=yes ;;
1288 acl_cv_prog_gnu_ld=no ;;
1290 with_gnu_ld=$acl_cv_prog_gnu_ld
1293 dnl From libtool-1.4. Sets the variable LD.
1294 AC_DEFUN([AC_LIB_PROG_LD],
1295 [AC_ARG_WITH(gnu-ld,
1296 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1297 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1298 AC_REQUIRE([AC_PROG_CC])dnl
1299 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1300 # Prepare PATH_SEPARATOR.
1301 # The user is always right.
1302 if test "${PATH_SEPARATOR+set}" != set; then
1303 echo "#! /bin/sh" >conf$$.sh
1304 echo "exit 0" >>conf$$.sh
1306 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1314 if test "$GCC" = yes; then
1315 # Check if gcc -print-prog-name=ld gives a path.
1316 AC_MSG_CHECKING([for ld used by GCC])
1319 # gcc leaves a trailing carriage return which upsets mingw
1320 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1322 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1325 # Accept absolute paths.
1326 [[\\/]* | [A-Za-z]:[\\/]*)]
1327 [re_direlt='/[^/][^/]*/\.\./']
1328 # Canonicalize the path of ld
1329 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1330 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1331 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1333 test -z "$LD" && LD="$ac_prog"
1336 # If it fails, then pretend we aren't using GCC.
1340 # If it is relative, then search for the first ld in PATH.
1344 elif test "$with_gnu_ld" = yes; then
1345 AC_MSG_CHECKING([for GNU ld])
1347 AC_MSG_CHECKING([for non-GNU ld])
1349 AC_CACHE_VAL(acl_cv_path_LD,
1350 [if test -z "$LD"; then
1351 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1352 for ac_dir in $PATH; do
1353 test -z "$ac_dir" && ac_dir=.
1354 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1355 acl_cv_path_LD="$ac_dir/$ac_prog"
1356 # Check to see if the program is GNU ld. I'd rather use --version,
1357 # but apparently some GNU ld's only accept -v.
1358 # Break only if it was the GNU/non-GNU ld that we prefer.
1359 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
1360 *GNU* | *'with BFD'*)
1361 test "$with_gnu_ld" != no && break ;;
1363 test "$with_gnu_ld" != yes && break ;;
1369 acl_cv_path_LD="$LD" # Let the user override the test with a path.
1371 LD="$acl_cv_path_LD"
1372 if test -n "$LD"; then
1377 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1381 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1383 # serial 47 AC_PROG_LIBTOOL
1384 # Debian $Rev: 203 $
1387 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1388 # -----------------------------------------------------------
1389 # If this macro is not defined by Autoconf, define it here.
1390 m4_ifdef([AC_PROVIDE_IFELSE],
1392 [m4_define([AC_PROVIDE_IFELSE],
1393 [m4_ifdef([AC_PROVIDE_$1],
1399 AC_DEFUN([AC_PROG_LIBTOOL],
1400 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1401 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1402 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1403 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1405 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1407 dnl And a similar setup for Fortran 77 support
1408 AC_PROVIDE_IFELSE([AC_PROG_F77],
1410 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1413 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1414 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1415 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1416 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1418 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1420 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1422 [ifdef([AC_PROG_GCJ],
1423 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1424 ifdef([A][M_PROG_GCJ],
1425 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1426 ifdef([LT_AC_PROG_GCJ],
1427 [define([LT_AC_PROG_GCJ],
1428 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1429 ])])# AC_PROG_LIBTOOL
1434 AC_DEFUN([_AC_PROG_LIBTOOL],
1435 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1436 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1437 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1438 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1440 # This can be used to rebuild libtool when needed
1441 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1443 # Always use our own libtool.
1444 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1445 AC_SUBST(LIBTOOL)dnl
1447 # Prevent multiple expansion
1448 define([AC_PROG_LIBTOOL], [])
1449 ])# _AC_PROG_LIBTOOL
1454 AC_DEFUN([AC_LIBTOOL_SETUP],
1456 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1457 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1458 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1459 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1460 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1461 AC_REQUIRE([AC_PROG_CC])dnl
1462 AC_REQUIRE([AC_PROG_LD])dnl
1463 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1464 AC_REQUIRE([AC_PROG_NM])dnl
1466 AC_REQUIRE([AC_PROG_LN_S])dnl
1467 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1468 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1469 AC_REQUIRE([AC_OBJEXT])dnl
1470 AC_REQUIRE([AC_EXEEXT])dnl
1473 AC_LIBTOOL_SYS_MAX_CMD_LEN
1474 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1477 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1478 _LT_AC_PROG_ECHO_BACKSLASH
1482 # AIX sometimes has problems with the GCC collect2 program. For some
1483 # reason, if we set the COLLECT_NAMES environment variable, the problems
1484 # vanish in a puff of smoke.
1485 if test "X${COLLECT_NAMES+set}" != Xset; then
1487 export COLLECT_NAMES
1492 # Sed substitution that helps us do robust quoting. It backslashifies
1493 # metacharacters that are still active within double-quoted strings.
1494 Xsed='sed -e s/^X//'
1495 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1497 # Same as above, but do not quote variable references.
1498 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1500 # Sed substitution to delay expansion of an escaped shell variable in a
1501 # double_quote_subst'ed string.
1502 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1504 # Sed substitution to avoid accidental globbing in evaled expressions
1505 no_glob_subst='s/\*/\\\*/g'
1511 default_ofile=libtool
1512 can_build_shared=yes
1514 # All known linkers require a `.a' archive for static linking (except M$VC,
1515 # which needs '.lib').
1517 ltmain="$ac_aux_dir/ltmain.sh"
1518 ofile="$default_ofile"
1519 with_gnu_ld="$lt_cv_prog_gnu_ld"
1521 AC_CHECK_TOOL(AR, ar, false)
1522 AC_CHECK_TOOL(RANLIB, ranlib, :)
1523 AC_CHECK_TOOL(STRIP, strip, :)
1526 old_CFLAGS="$CFLAGS"
1528 # Set sane defaults for various variables
1529 test -z "$AR" && AR=ar
1530 test -z "$AR_FLAGS" && AR_FLAGS=cru
1531 test -z "$AS" && AS=as
1532 test -z "$CC" && CC=cc
1533 test -z "$LTCC" && LTCC=$CC
1534 test -z "$DLLTOOL" && DLLTOOL=dlltool
1535 test -z "$LD" && LD=ld
1536 test -z "$LN_S" && LN_S="ln -s"
1537 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1538 test -z "$NM" && NM=nm
1539 test -z "$SED" && SED=sed
1540 test -z "$OBJDUMP" && OBJDUMP=objdump
1541 test -z "$RANLIB" && RANLIB=:
1542 test -z "$STRIP" && STRIP=:
1543 test -z "$ac_objext" && ac_objext=o
1545 # Determine commands to create old-style static archives.
1546 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1547 old_postinstall_cmds='chmod 644 $oldlib'
1548 old_postuninstall_cmds=
1550 if test -n "$RANLIB"; then
1553 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1556 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1559 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1562 # Only perform the check for file, if the check method requires it
1563 case $deplibs_check_method in
1565 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1571 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1572 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1573 enable_win32_dll=yes, enable_win32_dll=no)
1575 AC_ARG_ENABLE([libtool-lock],
1576 [AC_HELP_STRING([--disable-libtool-lock],
1577 [avoid locking (might break parallel builds)])])
1578 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1581 [AC_HELP_STRING([--with-pic],
1582 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1583 [pic_mode="$withval"],
1585 test -z "$pic_mode" && pic_mode=default
1587 # Use C for the default configuration in the libtool script
1589 AC_LIBTOOL_LANG_C_CONFIG
1591 ])# AC_LIBTOOL_SETUP
1594 # _LT_AC_SYS_COMPILER
1595 # -------------------
1596 AC_DEFUN([_LT_AC_SYS_COMPILER],
1597 [AC_REQUIRE([AC_PROG_CC])dnl
1599 # If no C compiler was specified, use CC.
1602 # Allow CC to be a program name with arguments.
1604 ])# _LT_AC_SYS_COMPILER
1607 # _LT_AC_SYS_LIBPATH_AIX
1608 # ----------------------
1609 # Links a minimal program and checks the executable
1610 # for the system default hardcoded library path. In most cases,
1611 # this is /usr/lib:/lib, but when the MPI compilers are used
1612 # the location of the communication and MPI libs are included too.
1613 # If we don't find anything, use the default library path according
1614 # to the aix ld manual.
1615 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1616 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1617 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1619 # Check for a 64-bit object if we didn't find anything.
1620 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1622 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1623 ])# _LT_AC_SYS_LIBPATH_AIX
1626 # _LT_AC_SHELL_INIT(ARG)
1627 # ----------------------
1628 AC_DEFUN([_LT_AC_SHELL_INIT],
1629 [ifdef([AC_DIVERSION_NOTICE],
1630 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1631 [AC_DIVERT_PUSH(NOTICE)])
1634 ])# _LT_AC_SHELL_INIT
1637 # _LT_AC_PROG_ECHO_BACKSLASH
1638 # --------------------------
1639 # Add some code to the start of the generated configure script which
1640 # will find an echo command which doesn't interpret backslashes.
1641 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1642 [_LT_AC_SHELL_INIT([
1643 # Check that we are running under the correct shell.
1644 SHELL=${CONFIG_SHELL-/bin/sh}
1648 # Remove one level of quotation (which was required for Make).
1649 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1654 if test "X[$]1" = X--no-reexec; then
1655 # Discard the --no-reexec flag, and continue.
1657 elif test "X[$]1" = X--fallback-echo; then
1658 # Avoid inline document here, it may be left over
1660 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1661 # Yippee, $echo works!
1664 # Restart under the correct shell.
1665 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1668 if test "X[$]1" = X--fallback-echo; then
1669 # used as fallback echo
1677 # The HP-UX ksh and POSIX shell print the target directory to stdout
1679 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1681 if test -z "$ECHO"; then
1682 if test "X${echo_test_string+set}" != Xset; then
1683 # find a string as large as possible, as long as the shell can cope with it
1684 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1685 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1686 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1687 echo_test_string="`eval $cmd`" &&
1688 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1695 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1696 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1697 test "X$echo_testing_string" = "X$echo_test_string"; then
1700 # The Solaris, AIX, and Digital Unix default echo programs unquote
1701 # backslashes. This makes it impossible to quote backslashes using
1702 # echo "$something" | sed 's/\\/\\\\/g'
1704 # So, first we look for a working echo in the user's PATH.
1706 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1707 for dir in $PATH /usr/ucb; do
1709 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1710 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1711 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1712 test "X$echo_testing_string" = "X$echo_test_string"; then
1719 if test "X$echo" = Xecho; then
1720 # We didn't find a better echo, so look for alternatives.
1721 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1722 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1723 test "X$echo_testing_string" = "X$echo_test_string"; then
1724 # This shell has a builtin print -r that does the trick.
1726 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1727 test "X$CONFIG_SHELL" != X/bin/ksh; then
1728 # If we have ksh, try running configure again with it.
1729 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1730 export ORIGINAL_CONFIG_SHELL
1731 CONFIG_SHELL=/bin/ksh
1733 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1737 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1738 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1739 test "X$echo_testing_string" = "X$echo_test_string"; then
1740 # Cool, printf works
1742 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1743 test "X$echo_testing_string" = 'X\t' &&
1744 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1745 test "X$echo_testing_string" = "X$echo_test_string"; then
1746 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1748 SHELL="$CONFIG_SHELL"
1750 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1751 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1752 test "X$echo_testing_string" = 'X\t' &&
1753 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1754 test "X$echo_testing_string" = "X$echo_test_string"; then
1755 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1757 # maybe with a smaller string...
1760 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1761 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1768 if test "$prev" != 'sed 50q "[$]0"'; then
1769 echo_test_string=`eval $prev`
1770 export echo_test_string
1771 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1773 # Oops. We lost completely, so just stick with echo.
1782 # Copy echo and quote the copy suitably for passing to libtool from
1783 # the Makefile, instead of quoting the original, which is used later.
1785 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1786 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1790 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1795 AC_DEFUN([_LT_AC_LOCK],
1796 [AC_ARG_ENABLE([libtool-lock],
1797 [AC_HELP_STRING([--disable-libtool-lock],
1798 [avoid locking (might break parallel builds)])])
1799 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1801 # Some flags need to be propagated to the compiler or linker for good
1805 # Find out which ABI we are using.
1806 echo 'int i;' > conftest.$ac_ext
1807 if AC_TRY_EVAL(ac_compile); then
1808 case `/usr/bin/file conftest.$ac_objext` in
1820 # Find out which ABI we are using.
1821 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1822 if AC_TRY_EVAL(ac_compile); then
1823 if test "$lt_cv_prog_gnu_ld" = yes; then
1824 case `/usr/bin/file conftest.$ac_objext` in
1826 LD="${LD-ld} -melf32bsmip"
1829 LD="${LD-ld} -melf32bmipn32"
1832 LD="${LD-ld} -melf64bmip"
1836 case `/usr/bin/file conftest.$ac_objext` in
1852 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1853 # Find out which ABI we are using.
1854 echo 'int i;' > conftest.$ac_ext
1855 if AC_TRY_EVAL(ac_compile); then
1856 case "`/usr/bin/file conftest.o`" in
1860 LD="${LD-ld} -m elf_i386"
1862 ppc64-*linux*|powerpc64-*linux*)
1863 LD="${LD-ld} -m elf32ppclinux"
1866 LD="${LD-ld} -m elf_s390"
1869 LD="${LD-ld} -m elf32_sparc"
1876 LD="${LD-ld} -m elf_x86_64"
1878 ppc*-*linux*|powerpc*-*linux*)
1879 LD="${LD-ld} -m elf64ppc"
1882 LD="${LD-ld} -m elf64_s390"
1885 LD="${LD-ld} -m elf64_sparc"
1895 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1896 SAVE_CFLAGS="$CFLAGS"
1897 CFLAGS="$CFLAGS -belf"
1898 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1900 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1902 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1903 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1904 CFLAGS="$SAVE_CFLAGS"
1907 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1908 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1909 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1910 AC_CHECK_TOOL(AS, as, false)
1911 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1916 need_locks="$enable_libtool_lock"
1921 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1922 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1923 # ----------------------------------------------------------------
1924 # Check whether the given compiler option works
1925 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1926 [AC_REQUIRE([LT_AC_PROG_SED])
1927 AC_CACHE_CHECK([$1], [$2],
1929 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1930 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1931 lt_compiler_flag="$3"
1932 # Insert the option either (1) after the last *FLAGS variable, or
1933 # (2) before a word containing "conftest.", or (3) at the end.
1934 # Note that $ac_compile itself does not contain backslashes and begins
1935 # with a dollar sign (not a hyphen), so the echo should work correctly.
1936 # The option is referenced via a variable to avoid confusing sed.
1937 lt_compile=`echo "$ac_compile" | $SED \
1938 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1939 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1940 -e 's:$: $lt_compiler_flag:'`
1941 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1942 (eval "$lt_compile" 2>conftest.err)
1944 cat conftest.err >&AS_MESSAGE_LOG_FD
1945 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1946 if (exit $ac_status) && test -s "$ac_outfile"; then
1947 # The compiler can only warn and ignore the option if not recognized
1948 # So say no if there are warnings
1949 if test ! -s conftest.err; then
1956 if test x"[$]$2" = xyes; then
1957 ifelse([$5], , :, [$5])
1959 ifelse([$6], , :, [$6])
1961 ])# AC_LIBTOOL_COMPILER_OPTION
1964 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1965 # [ACTION-SUCCESS], [ACTION-FAILURE])
1966 # ------------------------------------------------------------
1967 # Check whether the given compiler option works
1968 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1969 [AC_CACHE_CHECK([$1], [$2],
1971 save_LDFLAGS="$LDFLAGS"
1972 LDFLAGS="$LDFLAGS $3"
1973 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1974 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1975 # The compiler can only warn and ignore the option if not recognized
1976 # So say no if there are warnings
1977 if test -s conftest.err; then
1978 # Append any errors to the config.log.
1979 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1985 LDFLAGS="$save_LDFLAGS"
1988 if test x"[$]$2" = xyes; then
1989 ifelse([$4], , :, [$4])
1991 ifelse([$5], , :, [$5])
1993 ])# AC_LIBTOOL_LINKER_OPTION
1996 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1997 # --------------------------
1998 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1999 [# find the maximum length of command line arguments
2000 AC_MSG_CHECKING([the maximum length of command line arguments])
2001 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2007 # On DJGPP, this test can blow up pretty badly due to problems in libc
2008 # (any single argument exceeding 2000 bytes causes a buffer overrun
2009 # during glob expansion). Even if it were fixed, the result of this
2010 # check would be larger than it should be.
2011 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2015 # Under GNU Hurd, this test is not required because there is
2016 # no limit to the length of command line arguments.
2017 # Libtool will interpret -1 as no limit whatsoever
2018 lt_cv_sys_max_cmd_len=-1;
2022 # On Win9x/ME, this test blows up -- it succeeds, but takes
2023 # about 5 minutes as the teststring grows exponentially.
2024 # Worse, since 9x/ME are not pre-emptively multitasking,
2025 # you end up with a "frozen" computer, even though with patience
2026 # the test eventually succeeds (with a max line length of 256k).
2027 # Instead, let's just punt: use the minimum linelength reported by
2028 # all of the supported platforms: 8192 (on NT/2K/XP).
2029 lt_cv_sys_max_cmd_len=8192;
2033 # On AmigaOS with pdksh, this test takes hours, literally.
2034 # So we just punt and use a minimum line length of 8192.
2035 lt_cv_sys_max_cmd_len=8192;
2039 # If test is not a shell built-in, we'll probably end up computing a
2040 # maximum length that is only half of the actual maximum length, but
2042 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
2043 = "XX$teststring") >/dev/null 2>&1 &&
2044 new_result=`expr "X$teststring" : ".*" 2>&1` &&
2045 lt_cv_sys_max_cmd_len=$new_result &&
2046 test $i != 17 # 1/2 MB should be enough
2049 teststring=$teststring$teststring
2052 # Add a significant safety factor because C++ compilers can tack on massive
2053 # amounts of additional arguments before passing them to the linker.
2054 # It appears as though 1/2 is a usable value.
2055 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2059 if test -n $lt_cv_sys_max_cmd_len ; then
2060 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2064 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
2067 # _LT_AC_CHECK_DLFCN
2068 # --------------------
2069 AC_DEFUN([_LT_AC_CHECK_DLFCN],
2070 [AC_CHECK_HEADERS(dlfcn.h)dnl
2071 ])# _LT_AC_CHECK_DLFCN
2074 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2075 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2076 # ------------------------------------------------------------------
2077 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
2078 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2079 if test "$cross_compiling" = yes; then :
2082 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2083 lt_status=$lt_dlunknown
2084 cat > conftest.$ac_ext <<EOF
2085 [#line __oline__ "configure"
2086 #include "confdefs.h"
2095 # define LT_DLGLOBAL RTLD_GLOBAL
2098 # define LT_DLGLOBAL DL_GLOBAL
2100 # define LT_DLGLOBAL 0
2104 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2105 find out it does not work in some platform. */
2106 #ifndef LT_DLLAZY_OR_NOW
2108 # define LT_DLLAZY_OR_NOW RTLD_LAZY
2111 # define LT_DLLAZY_OR_NOW DL_LAZY
2114 # define LT_DLLAZY_OR_NOW RTLD_NOW
2117 # define LT_DLLAZY_OR_NOW DL_NOW
2119 # define LT_DLLAZY_OR_NOW 0
2127 extern "C" void exit (int);
2130 void fnord() { int i=42;}
2133 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2134 int status = $lt_dlunknown;
2138 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2139 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2140 /* dlclose (self); */
2146 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2147 (./conftest; exit; ) 2>/dev/null
2150 x$lt_dlno_uscore) $1 ;;
2151 x$lt_dlneed_uscore) $2 ;;
2152 x$lt_unknown|x*) $3 ;;
2155 # compilation failed
2160 ])# _LT_AC_TRY_DLOPEN_SELF
2163 # AC_LIBTOOL_DLOPEN_SELF
2164 # -------------------
2165 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2166 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2167 if test "x$enable_dlopen" != xyes; then
2168 enable_dlopen=unknown
2169 enable_dlopen_self=unknown
2170 enable_dlopen_self_static=unknown
2177 lt_cv_dlopen="load_add_on"
2179 lt_cv_dlopen_self=yes
2183 lt_cv_dlopen="LoadLibrary"
2188 lt_cv_dlopen="dlopen"
2193 # if libdl is installed we need to link against it
2194 AC_CHECK_LIB([dl], [dlopen],
2195 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2198 lt_cv_dlopen_self=yes
2203 AC_CHECK_FUNC([shl_load],
2204 [lt_cv_dlopen="shl_load"],
2205 [AC_CHECK_LIB([dld], [shl_load],
2206 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2207 [AC_CHECK_FUNC([dlopen],
2208 [lt_cv_dlopen="dlopen"],
2209 [AC_CHECK_LIB([dl], [dlopen],
2210 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2211 [AC_CHECK_LIB([svld], [dlopen],
2212 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2213 [AC_CHECK_LIB([dld], [dld_link],
2214 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2223 if test "x$lt_cv_dlopen" != xno; then
2229 case $lt_cv_dlopen in
2231 save_CPPFLAGS="$CPPFLAGS"
2232 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2234 save_LDFLAGS="$LDFLAGS"
2235 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2238 LIBS="$lt_cv_dlopen_libs $LIBS"
2240 AC_CACHE_CHECK([whether a program can dlopen itself],
2241 lt_cv_dlopen_self, [dnl
2242 _LT_AC_TRY_DLOPEN_SELF(
2243 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2244 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2247 if test "x$lt_cv_dlopen_self" = xyes; then
2248 LDFLAGS="$LDFLAGS $link_static_flag"
2249 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2250 lt_cv_dlopen_self_static, [dnl
2251 _LT_AC_TRY_DLOPEN_SELF(
2252 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2253 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2257 CPPFLAGS="$save_CPPFLAGS"
2258 LDFLAGS="$save_LDFLAGS"
2263 case $lt_cv_dlopen_self in
2264 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2265 *) enable_dlopen_self=unknown ;;
2268 case $lt_cv_dlopen_self_static in
2269 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2270 *) enable_dlopen_self_static=unknown ;;
2273 ])# AC_LIBTOOL_DLOPEN_SELF
2276 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2277 # ---------------------------------
2278 # Check to see if options -c and -o are simultaneously supported by compiler
2279 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2280 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2281 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2282 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2283 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2284 $rm -r conftest 2>/dev/null
2288 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2290 lt_compiler_flag="-o out/conftest2.$ac_objext"
2291 # Insert the option either (1) after the last *FLAGS variable, or
2292 # (2) before a word containing "conftest.", or (3) at the end.
2293 # Note that $ac_compile itself does not contain backslashes and begins
2294 # with a dollar sign (not a hyphen), so the echo should work correctly.
2295 lt_compile=`echo "$ac_compile" | $SED \
2296 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2297 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2298 -e 's:$: $lt_compiler_flag:'`
2299 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2300 (eval "$lt_compile" 2>out/conftest.err)
2302 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2303 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2304 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2306 # The compiler can only warn and ignore the option if not recognized
2307 # So say no if there are warnings
2308 if test ! -s out/conftest.err; then
2309 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2314 # SGI C++ compiler will create directory out/ii_files/ for
2315 # template instantiation
2316 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2317 $rm out/* && rmdir out
2322 ])# AC_LIBTOOL_PROG_CC_C_O
2325 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2326 # -----------------------------------------
2327 # Check to see if we can do hard links to lock some files if needed
2328 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2329 [AC_REQUIRE([_LT_AC_LOCK])dnl
2331 hard_links="nottested"
2332 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2333 # do not overwrite the value of need_locks provided by the user
2334 AC_MSG_CHECKING([if we can lock with hard links])
2337 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2339 ln conftest.a conftest.b 2>&5 || hard_links=no
2340 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2341 AC_MSG_RESULT([$hard_links])
2342 if test "$hard_links" = no; then
2343 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2349 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2354 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2355 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2356 [rm -f .libs 2>/dev/null
2357 mkdir .libs 2>/dev/null
2358 if test -d .libs; then
2361 # MS-DOS does not allow filenames that begin with a dot.
2364 rmdir .libs 2>/dev/null])
2365 objdir=$lt_cv_objdir
2366 ])# AC_LIBTOOL_OBJDIR
2369 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2370 # ----------------------------------------------
2371 # Check hardcoding attributes.
2372 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2373 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2374 _LT_AC_TAGVAR(hardcode_action, $1)=
2375 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2376 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
2377 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
2379 # We can hardcode non-existant directories.
2380 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2381 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2382 # have to relink, otherwise we might link with an installed library
2383 # when we should be linking with a yet-to-be-installed one
2384 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2385 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2386 # Linking always hardcodes the temporary library directory.
2387 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2389 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2390 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2393 # We cannot hardcode anything, or else we can only hardcode existing
2395 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2397 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2399 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2400 # Fast installation is not supported
2401 enable_fast_install=no
2402 elif test "$shlibpath_overrides_runpath" = yes ||
2403 test "$enable_shared" = no; then
2404 # Fast installation is not necessary
2405 enable_fast_install=needless
2407 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2410 # AC_LIBTOOL_SYS_LIB_STRIP
2411 # ------------------------
2412 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2415 AC_MSG_CHECKING([whether stripping libraries is possible])
2416 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2417 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2418 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2419 AC_MSG_RESULT([yes])
2421 # FIXME - insert some real tests, host_os isn't really good enough
2424 if test -n "$STRIP" ; then
2425 striplib="$STRIP -x"
2426 AC_MSG_RESULT([yes])
2436 ])# AC_LIBTOOL_SYS_LIB_STRIP
2439 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2440 # -----------------------------
2441 # PORTME Fill in your ld.so characteristics
2442 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2443 [AC_MSG_CHECKING([dynamic linker characteristics])
2445 libname_spec='lib$name'
2453 shlibpath_overrides_runpath=unknown
2455 dynamic_linker="$host_os ld.so"
2456 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2457 if test "$GCC" = yes; then
2458 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2459 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2460 # if the path contains ";" then we assume it to be the separator
2461 # otherwise default to the standard path separator (i.e. ":") - it is
2462 # assumed that no part of a normal pathname contains ";" but that should
2463 # okay in the real world where ";" in dirpaths is itself problematic.
2464 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2466 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2469 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2471 need_lib_prefix=unknown
2472 hardcode_into_libs=no
2474 # when you set need_version to no, make sure it does not cause -set_version
2475 # flags to be left without arguments
2476 need_version=unknown
2481 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2482 shlibpath_var=LIBPATH
2484 # AIX 3 has no versioning support, so we append a major version to the name.
2485 soname_spec='${libname}${release}${shared_ext}$major'
2492 hardcode_into_libs=yes
2493 if test "$host_cpu" = ia64; then
2494 # AIX 5 supports IA64
2495 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2496 shlibpath_var=LD_LIBRARY_PATH
2498 # With GCC up to 2.95.x, collect2 would create an import file
2499 # for dependence libraries. The import file would start with
2500 # the line `#! .'. This would cause the generated library to
2501 # depend on `.', always an invalid library. This was fixed in
2502 # development snapshots of GCC prior to 3.0.
2504 aix4 | aix4.[[01]] | aix4.[[01]].*)
2505 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2507 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2514 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2515 # soname into executable. Probably we can add versioning support to
2516 # collect2, so additional links can be useful in future.
2517 if test "$aix_use_runtimelinking" = yes; then
2518 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2519 # instead of lib<name>.a to let people know that these are not
2520 # typical AIX shared libraries.
2521 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2523 # We preserve .a as extension for shared libraries through AIX4.2
2524 # and later when we are not doing run time linking.
2525 library_names_spec='${libname}${release}.a $libname.a'
2526 soname_spec='${libname}${release}${shared_ext}$major'
2528 shlibpath_var=LIBPATH
2533 library_names_spec='$libname.ixlibrary $libname.a'
2534 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2535 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'
2539 library_names_spec='${libname}${shared_ext}'
2540 dynamic_linker="$host_os ld.so"
2541 shlibpath_var=LIBRARY_PATH
2547 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2548 soname_spec='${libname}${release}${shared_ext}$major'
2549 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2550 shlibpath_var=LD_LIBRARY_PATH
2551 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2552 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2553 # the default ld.so.conf also contains /usr/contrib/lib and
2554 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2555 # libtool to hard-code these into programs
2558 cygwin* | mingw* | pw32*)
2559 version_type=windows
2564 case $GCC,$host_os in
2565 yes,cygwin* | yes,mingw* | yes,pw32*)
2566 library_names_spec='$libname.dll.a'
2567 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2568 postinstall_cmds='base_file=`basename \${file}`~
2569 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2570 dldir=$destdir/`dirname \$dlpath`~
2571 test -d \$dldir || mkdir -p \$dldir~
2572 $install_prog $dir/$dlname \$dldir/$dlname'
2573 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2574 dlpath=$dir/\$dldll~
2576 shlibpath_overrides_runpath=yes
2580 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2581 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2582 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2585 # MinGW DLLs use traditional 'lib' prefix
2586 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2587 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2588 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2589 # It is most probably a Windows format PATH printed by
2590 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2591 # path with ; separators, and with drive letters. We can handle the
2592 # drive letters (cygwin fileutils understands them), so leave them,
2593 # especially as we might pass files found there to a mingw objdump,
2594 # which wouldn't understand a cygwinified path. Ahh.
2595 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2597 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2601 # pw32 DLLs use 'pw' prefix rather than 'lib'
2602 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2608 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2611 dynamic_linker='Win32 ld.exe'
2612 # FIXME: first we should search . and the directory the executable is in
2616 darwin* | rhapsody*)
2617 dynamic_linker="$host_os dyld"
2621 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2622 soname_spec='${libname}${release}${major}$shared_ext'
2623 shlibpath_overrides_runpath=yes
2624 shlibpath_var=DYLD_LIBRARY_PATH
2625 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
2626 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2627 if test "$GCC" = yes; then
2628 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2630 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2632 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2639 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2640 soname_spec='${libname}${release}${shared_ext}$major'
2641 shlibpath_var=LD_LIBRARY_PATH
2652 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2653 soname_spec='${libname}${release}${shared_ext}$major'
2654 shlibpath_var=LD_LIBRARY_PATH
2655 shlibpath_overrides_runpath=no
2656 hardcode_into_libs=yes
2657 dynamic_linker='GNU ld.so'
2661 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2662 version_type=freebsd-$objformat
2663 case $version_type in
2665 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2670 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2674 shlibpath_var=LD_LIBRARY_PATH
2677 shlibpath_overrides_runpath=yes
2679 freebsd3.[01]* | freebsdelf3.[01]*)
2680 shlibpath_overrides_runpath=yes
2681 hardcode_into_libs=yes
2684 shlibpath_overrides_runpath=no
2685 hardcode_into_libs=yes
2694 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2695 soname_spec='${libname}${release}${shared_ext}$major'
2696 shlibpath_var=LD_LIBRARY_PATH
2697 hardcode_into_libs=yes
2700 hpux9* | hpux10* | hpux11*)
2701 # Give a soname corresponding to the major version so that dld.sl refuses to
2702 # link against other versions.
2709 hardcode_into_libs=yes
2710 dynamic_linker="$host_os dld.so"
2711 shlibpath_var=LD_LIBRARY_PATH
2712 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2713 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2714 soname_spec='${libname}${release}${shared_ext}$major'
2715 if test "X$HPUX_IA64_MODE" = X32; then
2716 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2718 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2720 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2724 hardcode_into_libs=yes
2725 dynamic_linker="$host_os dld.sl"
2726 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2727 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2728 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2729 soname_spec='${libname}${release}${shared_ext}$major'
2730 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2731 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2735 dynamic_linker="$host_os dld.sl"
2736 shlibpath_var=SHLIB_PATH
2737 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2738 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2739 soname_spec='${libname}${release}${shared_ext}$major'
2742 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2743 postinstall_cmds='chmod 555 $lib'
2746 irix5* | irix6* | nonstopux*)
2748 nonstopux*) version_type=nonstopux ;;
2750 if test "$lt_cv_prog_gnu_ld" = yes; then
2758 soname_spec='${libname}${release}${shared_ext}$major'
2759 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2761 irix5* | nonstopux*)
2765 case $LD in # libtool.m4 will add one of these switches to LD
2766 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2767 libsuff= shlibsuff= libmagic=32-bit;;
2768 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2769 libsuff=32 shlibsuff=N32 libmagic=N32;;
2770 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2771 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2772 *) libsuff= shlibsuff= libmagic=never-match;;
2776 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2777 shlibpath_overrides_runpath=no
2778 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2779 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2780 hardcode_into_libs=yes
2783 # No shared lib support for Linux oldld, aout, or coff.
2784 linux*oldld* | linux*aout* | linux*coff*)
2788 # This must be Linux ELF.
2793 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2794 soname_spec='${libname}${release}${shared_ext}$major'
2795 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2796 shlibpath_var=LD_LIBRARY_PATH
2797 shlibpath_overrides_runpath=no
2798 # This implies no fast_install, which is unacceptable.
2799 # Some rework will be needed to allow for fast_install
2800 # before this can be enabled.
2801 hardcode_into_libs=yes
2803 # Append ld.so.conf contents to the search path
2804 if test -f /etc/ld.so.conf; then
2805 lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
2806 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2809 # We used to test for /lib/ld.so.1 and disable shared libraries on
2810 # powerpc, because MkLinux only supported shared libraries with the
2811 # GNU dynamic linker. Since this was broken with cross compilers,
2812 # most powerpc-linux boxes support dynamic linking these days and
2813 # people can always --disable-shared, the test was removed, and we
2814 # assume the GNU/Linux dynamic linker is in use.
2815 dynamic_linker='GNU/Linux ld.so'
2822 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2823 soname_spec='${libname}${release}${shared_ext}$major'
2824 shlibpath_var=LD_LIBRARY_PATH
2825 shlibpath_overrides_runpath=no
2826 hardcode_into_libs=yes
2827 dynamic_linker='GNU ld.so'
2834 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2835 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2836 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2837 dynamic_linker='NetBSD (a.out) ld.so'
2839 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2840 soname_spec='${libname}${release}${shared_ext}$major'
2841 dynamic_linker='NetBSD ld.elf_so'
2843 shlibpath_var=LD_LIBRARY_PATH
2844 shlibpath_overrides_runpath=yes
2845 hardcode_into_libs=yes
2850 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2851 shlibpath_var=LD_LIBRARY_PATH
2852 shlibpath_overrides_runpath=yes
2859 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2860 soname_spec='${libname}${release}${shared_ext}$major'
2861 shlibpath_var=LD_LIBRARY_PATH
2862 shlibpath_overrides_runpath=yes
2869 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2870 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2871 shlibpath_var=LD_LIBRARY_PATH
2872 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2874 openbsd2.[[89]] | openbsd2.[[89]].*)
2875 shlibpath_overrides_runpath=no
2878 shlibpath_overrides_runpath=yes
2882 shlibpath_overrides_runpath=yes
2887 libname_spec='$name'
2890 library_names_spec='$libname${shared_ext} $libname.a'
2891 dynamic_linker='OS/2 ld.exe'
2892 shlibpath_var=LIBPATH
2895 osf3* | osf4* | osf5*)
2899 soname_spec='${libname}${release}${shared_ext}$major'
2900 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2901 shlibpath_var=LD_LIBRARY_PATH
2902 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2903 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2908 soname_spec='${libname}${release}${shared_ext}$major'
2909 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2910 shlibpath_var=LD_LIBRARY_PATH
2917 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2918 soname_spec='${libname}${release}${shared_ext}$major'
2919 shlibpath_var=LD_LIBRARY_PATH
2920 shlibpath_overrides_runpath=yes
2921 hardcode_into_libs=yes
2922 # ldd complains unless libraries are executable
2923 postinstall_cmds='chmod +x $lib'
2928 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2929 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2930 shlibpath_var=LD_LIBRARY_PATH
2931 shlibpath_overrides_runpath=yes
2932 if test "$with_gnu_ld" = yes; then
2938 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2940 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2941 soname_spec='${libname}${release}${shared_ext}$major'
2942 shlibpath_var=LD_LIBRARY_PATH
2943 case $host_vendor in
2945 shlibpath_overrides_runpath=no
2947 export_dynamic_flag_spec='${wl}-Blargedynsym'
2948 runpath_var=LD_RUN_PATH
2956 shlibpath_overrides_runpath=no
2957 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2963 if test -d /usr/nec ;then
2965 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2966 soname_spec='$libname${shared_ext}.$major'
2967 shlibpath_var=LD_LIBRARY_PATH
2973 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2974 soname_spec='${libname}${release}${shared_ext}$major'
2975 shlibpath_var=LD_LIBRARY_PATH
2982 AC_MSG_RESULT([$dynamic_linker])
2983 test "$dynamic_linker" = no && can_build_shared=no
2984 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2989 AC_DEFUN([_LT_AC_TAGCONFIG],
2990 [AC_ARG_WITH([tags],
2991 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2992 [include additional configurations @<:@automatic@:>@])],
2993 [tagnames="$withval"])
2995 if test -f "$ltmain" && test -n "$tagnames"; then
2996 if test ! -f "${ofile}"; then
2997 AC_MSG_WARN([output file `$ofile' does not exist])
3000 if test -z "$LTCC"; then
3001 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3002 if test -z "$LTCC"; then
3003 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3005 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3009 # Extract list of available tagged configurations in $ofile.
3010 # Note that this assumes the entire list is on one line.
3011 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3013 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3014 for tagname in $tagnames; do
3016 # Check whether tagname contains only valid characters
3017 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3019 *) AC_MSG_ERROR([invalid tag name: $tagname])
3023 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3025 AC_MSG_ERROR([tag name \"$tagname\" already exists])
3028 # Update the list of available tags.
3029 if test -n "$tagname"; then
3030 echo appending configuration tag \"$tagname\" to $ofile
3034 if test -n "$CXX" && test "X$CXX" != "Xno"; then
3035 AC_LIBTOOL_LANG_CXX_CONFIG
3042 if test -n "$F77" && test "X$F77" != "Xno"; then
3043 AC_LIBTOOL_LANG_F77_CONFIG
3050 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3051 AC_LIBTOOL_LANG_GCJ_CONFIG
3058 AC_LIBTOOL_LANG_RC_CONFIG
3062 AC_MSG_ERROR([Unsupported tag name: $tagname])
3066 # Append the new tag name to the list of available tags.
3067 if test -n "$tagname" ; then
3068 available_tags="$available_tags $tagname"
3074 # Now substitute the updated list of available tags.
3075 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3076 mv "${ofile}T" "$ofile"
3080 AC_MSG_ERROR([unable to update list of available tagged configurations.])
3083 ])# _LT_AC_TAGCONFIG
3088 # enable checks for dlopen support
3089 AC_DEFUN([AC_LIBTOOL_DLOPEN],
3090 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3091 ])# AC_LIBTOOL_DLOPEN
3094 # AC_LIBTOOL_WIN32_DLL
3095 # --------------------
3096 # declare package support for building win32 dll's
3097 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3098 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3099 ])# AC_LIBTOOL_WIN32_DLL
3102 # AC_ENABLE_SHARED([DEFAULT])
3103 # ---------------------------
3104 # implement the --enable-shared flag
3105 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3106 AC_DEFUN([AC_ENABLE_SHARED],
3107 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3108 AC_ARG_ENABLE([shared],
3109 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3110 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3111 [p=${PACKAGE-default}
3113 yes) enable_shared=yes ;;
3114 no) enable_shared=no ;;
3117 # Look at the argument we got. We use all the common list separators.
3118 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3119 for pkg in $enableval; do
3121 if test "X$pkg" = "X$p"; then
3128 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3129 ])# AC_ENABLE_SHARED
3134 #- set the default shared flag to --disable-shared
3135 AC_DEFUN([AC_DISABLE_SHARED],
3136 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3137 AC_ENABLE_SHARED(no)
3138 ])# AC_DISABLE_SHARED
3141 # AC_ENABLE_STATIC([DEFAULT])
3142 # ---------------------------
3143 # implement the --enable-static flag
3144 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3145 AC_DEFUN([AC_ENABLE_STATIC],
3146 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3147 AC_ARG_ENABLE([static],
3148 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3149 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3150 [p=${PACKAGE-default}
3152 yes) enable_static=yes ;;
3153 no) enable_static=no ;;
3156 # Look at the argument we got. We use all the common list separators.
3157 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3158 for pkg in $enableval; do
3160 if test "X$pkg" = "X$p"; then
3167 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3168 ])# AC_ENABLE_STATIC
3173 # set the default static flag to --disable-static
3174 AC_DEFUN([AC_DISABLE_STATIC],
3175 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3176 AC_ENABLE_STATIC(no)
3177 ])# AC_DISABLE_STATIC
3180 # AC_ENABLE_FAST_INSTALL([DEFAULT])
3181 # ---------------------------------
3182 # implement the --enable-fast-install flag
3183 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3184 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3185 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3186 AC_ARG_ENABLE([fast-install],
3187 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3188 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3189 [p=${PACKAGE-default}
3191 yes) enable_fast_install=yes ;;
3192 no) enable_fast_install=no ;;
3194 enable_fast_install=no
3195 # Look at the argument we got. We use all the common list separators.
3196 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3197 for pkg in $enableval; do
3199 if test "X$pkg" = "X$p"; then
3200 enable_fast_install=yes
3206 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3207 ])# AC_ENABLE_FAST_INSTALL
3210 # AC_DISABLE_FAST_INSTALL
3211 # -----------------------
3212 # set the default to --disable-fast-install
3213 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3214 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3215 AC_ENABLE_FAST_INSTALL(no)
3216 ])# AC_DISABLE_FAST_INSTALL
3219 # AC_LIBTOOL_PICMODE([MODE])
3220 # --------------------------
3221 # implement the --with-pic flag
3222 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
3223 AC_DEFUN([AC_LIBTOOL_PICMODE],
3224 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3225 pic_mode=ifelse($#,1,$1,default)
3226 ])# AC_LIBTOOL_PICMODE
3231 # This is predefined starting with Autoconf 2.54, so this conditional
3232 # definition can be removed once we require Autoconf 2.54 or later.
3233 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3234 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3235 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3236 then ac_cv_prog_egrep='grep -E'
3237 else ac_cv_prog_egrep='egrep'
3239 EGREP=$ac_cv_prog_egrep
3244 # AC_PATH_TOOL_PREFIX
3245 # -------------------
3246 # find a file program which can recognise shared library
3247 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3248 [AC_REQUIRE([AC_PROG_EGREP])dnl
3249 AC_MSG_CHECKING([for $1])
3250 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3252 [[\\/*] | ?:[\\/]*])
3253 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3256 lt_save_MAGIC_CMD="$MAGIC_CMD"
3257 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3258 dnl $ac_dummy forces splitting on constant user-supplied paths.
3259 dnl POSIX.2 word splitting is done only on the output of word expansions,
3260 dnl not every word. This closes a longstanding sh security hole.
3261 ac_dummy="ifelse([$2], , $PATH, [$2])"
3262 for ac_dir in $ac_dummy; do
3264 test -z "$ac_dir" && ac_dir=.
3265 if test -f $ac_dir/$1; then
3266 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3267 if test -n "$file_magic_test_file"; then
3268 case $deplibs_check_method in
3270 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3271 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3272 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3273 $EGREP "$file_magic_regex" > /dev/null; then
3278 *** Warning: the command libtool uses to detect shared libraries,
3279 *** $file_magic_cmd, produces output that libtool cannot recognize.
3280 *** The result is that libtool may fail to recognize shared libraries
3281 *** as such. This will affect the creation of libtool libraries that
3282 *** depend on shared libraries, but programs linked with such libtool
3283 *** libraries will work regardless of this problem. Nevertheless, you
3284 *** may want to report the problem to your system manager and/or to
3285 *** bug-libtool@gnu.org
3295 MAGIC_CMD="$lt_save_MAGIC_CMD"
3298 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3299 if test -n "$MAGIC_CMD"; then
3300 AC_MSG_RESULT($MAGIC_CMD)
3304 ])# AC_PATH_TOOL_PREFIX
3309 # find a file program which can recognise a shared library
3310 AC_DEFUN([AC_PATH_MAGIC],
3311 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3312 if test -z "$lt_cv_path_MAGIC_CMD"; then
3313 if test -n "$ac_tool_prefix"; then
3314 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3324 # find the pathname to the GNU or non-GNU linker
3325 AC_DEFUN([AC_PROG_LD],
3326 [AC_ARG_WITH([gnu-ld],
3327 [AC_HELP_STRING([--with-gnu-ld],
3328 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3329 [test "$withval" = no || with_gnu_ld=yes],
3331 AC_REQUIRE([LT_AC_PROG_SED])dnl
3332 AC_REQUIRE([AC_PROG_CC])dnl
3333 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3334 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3336 if test "$GCC" = yes; then
3337 # Check if gcc -print-prog-name=ld gives a path.
3338 AC_MSG_CHECKING([for ld used by $CC])
3341 # gcc leaves a trailing carriage return which upsets mingw
3342 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3344 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3347 # Accept absolute paths.
3348 [[\\/]]* | ?:[[\\/]]*)
3349 re_direlt='/[[^/]][[^/]]*/\.\./'
3350 # Canonicalize the pathname of ld
3351 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3352 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3353 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3355 test -z "$LD" && LD="$ac_prog"
3358 # If it fails, then pretend we aren't using GCC.
3362 # If it is relative, then search for the first ld in PATH.
3366 elif test "$with_gnu_ld" = yes; then
3367 AC_MSG_CHECKING([for GNU ld])
3369 AC_MSG_CHECKING([for non-GNU ld])
3371 AC_CACHE_VAL(lt_cv_path_LD,
3372 [if test -z "$LD"; then
3373 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3374 for ac_dir in $PATH; do
3376 test -z "$ac_dir" && ac_dir=.
3377 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3378 lt_cv_path_LD="$ac_dir/$ac_prog"
3379 # Check to see if the program is GNU ld. I'd rather use --version,
3380 # but apparently some GNU ld's only accept -v.
3381 # Break only if it was the GNU/non-GNU ld that we prefer.
3382 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3383 *GNU* | *'with BFD'*)
3384 test "$with_gnu_ld" != no && break
3387 test "$with_gnu_ld" != yes && break
3394 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3397 if test -n "$LD"; then
3402 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3409 AC_DEFUN([AC_PROG_LD_GNU],
3410 [AC_REQUIRE([AC_PROG_EGREP])dnl
3411 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3412 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3413 case `$LD -v 2>&1 </dev/null` in
3414 *GNU* | *'with BFD'*)
3415 lt_cv_prog_gnu_ld=yes
3418 lt_cv_prog_gnu_ld=no
3421 with_gnu_ld=$lt_cv_prog_gnu_ld
3425 # AC_PROG_LD_RELOAD_FLAG
3426 # ----------------------
3427 # find reload flag for linker
3428 # -- PORTME Some linkers may need a different reload flag.
3429 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3430 [AC_CACHE_CHECK([for $LD option to reload object files],
3431 lt_cv_ld_reload_flag,
3432 [lt_cv_ld_reload_flag='-r'])
3433 reload_flag=$lt_cv_ld_reload_flag
3434 case $reload_flag in
3436 *) reload_flag=" $reload_flag" ;;
3438 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3439 ])# AC_PROG_LD_RELOAD_FLAG
3442 # AC_DEPLIBS_CHECK_METHOD
3443 # -----------------------
3444 # how to check for library dependencies
3445 # -- PORTME fill in with the dynamic library characteristics
3446 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3447 [AC_CACHE_CHECK([how to recognise dependent libraries],
3448 lt_cv_deplibs_check_method,
3449 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3450 lt_cv_file_magic_test_file=
3451 lt_cv_deplibs_check_method='unknown'
3452 # Need to set the preceding variable on all platforms that support
3453 # interlibrary dependencies.
3454 # 'none' -- dependencies not supported.
3455 # `unknown' -- same as none, but documents that we really don't know.
3456 # 'pass_all' -- all dependencies passed with no checks.
3457 # 'test_compile' -- check by making test program.
3458 # 'file_magic [[regex]]' -- check by looking for files in library path
3459 # which responds to the $file_magic_cmd with a given extended regex.
3460 # If you have `file' or equivalent on your system and you're not sure
3461 # whether `pass_all' will *always* work, you probably want this one.
3465 lt_cv_deplibs_check_method=pass_all
3469 lt_cv_deplibs_check_method=pass_all
3473 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3474 lt_cv_file_magic_cmd='/usr/bin/file -L'
3475 lt_cv_file_magic_test_file=/shlib/libc.so
3479 # func_win32_libid is a shell function defined in ltmain.sh
3480 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3481 lt_cv_file_magic_cmd='func_win32_libid'
3485 # Base MSYS/MinGW do not provide the 'file' command needed by
3486 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3487 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3488 lt_cv_file_magic_cmd='$OBJDUMP -f'
3491 darwin* | rhapsody*)
3492 lt_cv_deplibs_check_method=pass_all
3495 freebsd* | kfreebsd*-gnu)
3496 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3499 # Not sure whether the presence of OpenBSD here was a mistake.
3500 # Let's accept both of them until this is cleared up.
3501 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3502 lt_cv_file_magic_cmd=/usr/bin/file
3503 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3507 lt_cv_deplibs_check_method=pass_all
3512 lt_cv_deplibs_check_method=pass_all
3515 hpux10.20* | hpux11*)
3516 lt_cv_file_magic_cmd=/usr/bin/file
3519 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3520 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3523 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3524 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3527 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3528 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3533 irix5* | irix6* | nonstopux*)
3535 *-32|*"-32 ") libmagic=32-bit;;
3536 *-n32|*"-n32 ") libmagic=N32;;
3537 *-64|*"-64 ") libmagic=64-bit;;
3538 *) libmagic=never-match;;
3540 lt_cv_deplibs_check_method=pass_all
3543 # This must be Linux ELF.
3545 lt_cv_deplibs_check_method=pass_all
3548 netbsd* | knetbsd*-gnu)
3549 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3550 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3552 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3557 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3558 lt_cv_file_magic_cmd=/usr/bin/file
3559 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3563 lt_cv_deplibs_check_method=unknown
3567 lt_cv_file_magic_cmd=/usr/bin/file
3568 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3569 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3570 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3572 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3576 osf3* | osf4* | osf5*)
3577 lt_cv_deplibs_check_method=pass_all
3581 lt_cv_deplibs_check_method=pass_all
3585 lt_cv_deplibs_check_method=pass_all
3588 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3589 case $host_vendor in
3591 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]]'
3592 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3595 lt_cv_deplibs_check_method=pass_all
3598 lt_cv_file_magic_cmd='/bin/file'
3599 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3602 lt_cv_file_magic_cmd='/bin/file'
3603 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3604 lt_cv_file_magic_test_file=/lib/libc.so
3607 lt_cv_deplibs_check_method=pass_all
3612 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3613 lt_cv_deplibs_check_method=pass_all
3617 file_magic_cmd=$lt_cv_file_magic_cmd
3618 deplibs_check_method=$lt_cv_deplibs_check_method
3619 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3620 ])# AC_DEPLIBS_CHECK_METHOD
3625 # find the pathname to a BSD-compatible name lister
3626 AC_DEFUN([AC_PROG_NM],
3627 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3628 [if test -n "$NM"; then
3629 # Let the user override the test.
3632 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3633 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3635 test -z "$ac_dir" && ac_dir=.
3636 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3637 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3638 # Check to see if the nm accepts a BSD-compat flag.
3639 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3640 # nm: unknown option "B" ignored
3641 # Tru64's nm complains that /dev/null is an invalid object file
3642 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3643 */dev/null* | *'Invalid file or object type'*)
3644 lt_cv_path_NM="$tmp_nm -B"
3648 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3650 lt_cv_path_NM="$tmp_nm -p"
3654 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3655 continue # so that we can try to find one that supports BSD flags
3662 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3670 # check for math library
3671 AC_DEFUN([AC_CHECK_LIBM],
3672 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3675 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3676 # These system don't have libm, or don't need it
3679 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3680 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3683 AC_CHECK_LIB(m, cos, LIBM="-lm")
3689 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3690 # -----------------------------------
3691 # sets LIBLTDL to the link flags for the libltdl convenience library and
3692 # LTDLINCL to the include flags for the libltdl header and adds
3693 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3694 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3695 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3696 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3697 # '${top_srcdir}/' (note the single quotes!). If your package is not
3698 # flat and you're not using automake, define top_builddir and
3699 # top_srcdir appropriately in the Makefiles.
3700 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3701 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3702 case $enable_ltdl_convenience in
3703 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3704 "") enable_ltdl_convenience=yes
3705 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3707 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3708 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3709 # For backwards non-gettext consistent compatibility...
3711 ])# AC_LIBLTDL_CONVENIENCE
3714 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3715 # -----------------------------------
3716 # sets LIBLTDL to the link flags for the libltdl installable library and
3717 # LTDLINCL to the include flags for the libltdl header and adds
3718 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3719 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3720 # DIRECTORY is not provided and an installed libltdl is not found, it is
3721 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3722 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3723 # quotes!). If your package is not flat and you're not using automake,
3724 # define top_builddir and top_srcdir appropriately in the Makefiles.
3725 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3726 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3727 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3728 AC_CHECK_LIB(ltdl, lt_dlinit,
3729 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3730 [if test x"$enable_ltdl_install" = xno; then
3731 AC_MSG_WARN([libltdl not installed, but installation disabled])
3733 enable_ltdl_install=yes
3736 if test x"$enable_ltdl_install" = x"yes"; then
3737 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3738 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3739 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3741 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3745 # For backwards non-gettext consistent compatibility...
3747 ])# AC_LIBLTDL_INSTALLABLE
3752 # enable support for C++ libraries
3753 AC_DEFUN([AC_LIBTOOL_CXX],
3754 [AC_REQUIRE([_LT_AC_LANG_CXX])
3760 AC_DEFUN([_LT_AC_LANG_CXX],
3761 [AC_REQUIRE([AC_PROG_CXX])
3762 AC_REQUIRE([AC_PROG_CXXCPP])
3763 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3769 # enable support for Fortran 77 libraries
3770 AC_DEFUN([AC_LIBTOOL_F77],
3771 [AC_REQUIRE([_LT_AC_LANG_F77])
3777 AC_DEFUN([_LT_AC_LANG_F77],
3778 [AC_REQUIRE([AC_PROG_F77])
3779 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3785 # enable support for GCJ libraries
3786 AC_DEFUN([AC_LIBTOOL_GCJ],
3787 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3793 AC_DEFUN([_LT_AC_LANG_GCJ],
3794 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3795 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3796 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3797 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3798 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3799 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3800 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3806 # enable support for Windows resource files
3807 AC_DEFUN([AC_LIBTOOL_RC],
3808 [AC_REQUIRE([LT_AC_PROG_RC])
3809 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3813 # AC_LIBTOOL_LANG_C_CONFIG
3814 # ------------------------
3815 # Ensure that the configuration vars for the C compiler are
3816 # suitably defined. Those variables are subsequently used by
3817 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3818 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3819 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3823 # Source file extension for C test sources.
3826 # Object file extension for compiled C test sources.
3828 _LT_AC_TAGVAR(objext, $1)=$objext
3830 # Code to be used in simple compile tests
3831 lt_simple_compile_test_code="int some_variable = 0;\n"
3833 # Code to be used in simple link tests
3834 lt_simple_link_test_code='int main(){return(0);}\n'
3839 # Check for any special shared library compilation flags.
3841 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3842 if test "$GCC" = no; then
3845 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3849 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3850 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3851 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3853 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3854 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3860 # Check to make sure the static flag actually works.
3862 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3863 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3864 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3866 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3869 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3870 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3871 AC_LIBTOOL_PROG_CC_C_O($1)
3872 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3873 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3874 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3875 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3876 AC_LIBTOOL_SYS_LIB_STRIP
3877 AC_LIBTOOL_DLOPEN_SELF($1)
3879 # Report which librarie types wil actually be built
3880 AC_MSG_CHECKING([if libtool supports shared libraries])
3881 AC_MSG_RESULT([$can_build_shared])
3883 AC_MSG_CHECKING([whether to build shared libraries])
3884 test "$can_build_shared" = "no" && enable_shared=no
3886 # On AIX, shared libraries and static libraries use the same namespace, and
3887 # are all built from PIC.
3890 test "$enable_shared" = yes && enable_static=no
3891 if test -n "$RANLIB"; then
3892 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3893 postinstall_cmds='$RANLIB $lib'
3898 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3899 test "$enable_shared" = yes && enable_static=no
3902 darwin* | rhapsody*)
3903 if test "$GCC" = yes; then
3904 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3906 rhapsody* | darwin1.[[012]])
3907 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3910 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3911 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3913 case ${MACOSX_DEPLOYMENT_TARGET} in
3915 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3918 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3924 output_verbose_link_cmd='echo'
3925 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3926 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3927 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3928 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3929 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3930 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3931 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3932 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3933 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3934 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3936 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3940 AC_MSG_RESULT([$enable_shared])
3942 AC_MSG_CHECKING([whether to build static libraries])
3943 # Make sure either enable_shared or enable_static is yes.
3944 test "$enable_shared" = yes || enable_static=yes
3945 AC_MSG_RESULT([$enable_static])
3947 AC_LIBTOOL_CONFIG($1)
3951 ])# AC_LIBTOOL_LANG_C_CONFIG
3954 # AC_LIBTOOL_LANG_CXX_CONFIG
3955 # --------------------------
3956 # Ensure that the configuration vars for the C compiler are
3957 # suitably defined. Those variables are subsequently used by
3958 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3959 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3960 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3962 AC_REQUIRE([AC_PROG_CXX])
3963 AC_REQUIRE([AC_PROG_CXXCPP])
3965 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3966 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3967 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3968 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3969 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3970 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3971 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3972 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3973 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3974 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3975 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3976 _LT_AC_TAGVAR(module_cmds, $1)=
3977 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3978 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3979 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3980 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3981 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3982 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3984 # Dependencies to place before and after the object being linked:
3985 _LT_AC_TAGVAR(predep_objects, $1)=
3986 _LT_AC_TAGVAR(postdep_objects, $1)=
3987 _LT_AC_TAGVAR(predeps, $1)=
3988 _LT_AC_TAGVAR(postdeps, $1)=
3989 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3991 # Source file extension for C++ test sources.
3994 # Object file extension for compiled C++ test sources.
3996 _LT_AC_TAGVAR(objext, $1)=$objext
3998 # Code to be used in simple compile tests
3999 lt_simple_compile_test_code="int some_variable = 0;\n"
4001 # Code to be used in simple link tests
4002 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
4004 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4007 # Allow CC to be a program name with arguments.
4012 lt_save_with_gnu_ld=$with_gnu_ld
4013 lt_save_path_LD=$lt_cv_path_LD
4014 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4015 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4017 unset lt_cv_prog_gnu_ld
4019 if test -n "${lt_cv_path_LDCXX+set}"; then
4020 lt_cv_path_LD=$lt_cv_path_LDCXX
4024 test -z "${LDCXX+set}" || LD=$LDCXX
4027 _LT_AC_TAGVAR(compiler, $1)=$CC
4028 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4030 # We don't want -fno-exception wen compiling C++ code, so set the
4031 # no_builtin_flag separately
4032 if test "$GXX" = yes; then
4033 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4035 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4038 if test "$GXX" = yes; then
4039 # Set up default GNU C++ configuration
4043 # Check if GNU C++ uses GNU ld as the underlying linker, since the
4044 # archiving commands below assume that GNU ld is being used.
4045 if test "$with_gnu_ld" = yes; then
4046 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4047 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4049 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4050 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4052 # If archive_cmds runs LD, not CC, wlarc should be empty
4053 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4054 # investigate it a little bit more. (MM)
4057 # ancient GNU ld didn't support --whole-archive et. al.
4058 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4059 grep 'no-whole-archive' > /dev/null; then
4060 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4062 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4068 # A generic and very simple default shared library creation
4069 # command for GNU C++ for the case where it uses the native
4070 # linker, instead of GNU ld. If possible, this setting should
4071 # overridden to take advantage of the native linker features on
4072 # the platform it is being used on.
4073 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4076 # Commands to make compiler produce verbose output that lists
4077 # what "hidden" libraries, object files and flags are used when
4078 # linking a shared library.
4079 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4087 # PORTME: fill in a description of your system's C++ link characteristics
4088 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4089 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4092 # FIXME: insert proper C++ library support
4093 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4096 if test "$host_cpu" = ia64; then
4097 # On IA64, the linker does run time linking by default, so we don't
4098 # have to do anything special.
4099 aix_use_runtimelinking=no
4100 exp_sym_flag='-Bexport'
4103 aix_use_runtimelinking=no
4105 # Test if we are trying to use run time linking or normal
4106 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4107 # need to do runtime linking.
4108 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4109 for ld_flag in $LDFLAGS; do
4112 aix_use_runtimelinking=yes
4119 exp_sym_flag='-bexport'
4120 no_entry_flag='-bnoentry'
4123 # When large executables or shared objects are built, AIX ld can
4124 # have problems creating the table of contents. If linking a library
4125 # or program results in "error TOC overflow" add -mminimal-toc to
4126 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4127 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4129 _LT_AC_TAGVAR(archive_cmds, $1)=''
4130 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4131 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4132 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4134 if test "$GXX" = yes; then
4135 case $host_os in aix4.[012]|aix4.[012].*)
4136 # We only want to do this on AIX 4.2 and lower, the check
4137 # below for broken collect2 doesn't work under 4.3+
4138 collect2name=`${CC} -print-prog-name=collect2`
4139 if test -f "$collect2name" && \
4140 strings "$collect2name" | grep resolve_lib_name >/dev/null
4142 # We have reworked collect2
4143 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4145 # We have old collect2
4146 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4147 # It fails to find uninstalled libraries when the uninstalled
4148 # path is not listed in the libpath. Setting hardcode_minus_L
4149 # to unsupported forces relinking
4150 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4151 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4152 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4155 shared_flag='-shared'
4158 if test "$host_cpu" = ia64; then
4159 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4160 # chokes on -Wl,-G. The following line is correct:
4163 if test "$aix_use_runtimelinking" = yes; then
4164 shared_flag='${wl}-G'
4166 shared_flag='${wl}-bM:SRE'
4171 # It seems that -bexpall does not export symbols beginning with
4172 # underscore (_), so it is better to generate a list of symbols to export.
4173 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4174 if test "$aix_use_runtimelinking" = yes; then
4175 # Warning - without using the other runtime loading flags (-brtl),
4176 # -berok will link without error, but may produce a broken library.
4177 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4178 # Determine the default libpath from the value encoded in an empty executable.
4179 _LT_AC_SYS_LIBPATH_AIX
4180 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4182 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4184 if test "$host_cpu" = ia64; then
4185 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4186 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4187 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
4189 # Determine the default libpath from the value encoded in an empty executable.
4190 _LT_AC_SYS_LIBPATH_AIX
4191 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4192 # Warning - without using the other run time loading flags,
4193 # -berok will link without error, but may produce a broken library.
4194 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4195 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4196 # -bexpall does not export symbols beginning with underscore (_)
4197 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4198 # Exported symbols can be pulled into shared objects from archives
4199 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4200 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4201 # This is similar to how AIX traditionally builds it's shared libraries.
4202 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4207 case $cc_basename in
4209 # FIXME: insert proper C++ library support
4210 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4215 cygwin* | mingw* | pw32*)
4216 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4217 # as there is no search path for DLLs.
4218 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4219 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4220 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4221 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4223 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4224 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4225 # If the export-symbols file already is a .def file (1st line
4226 # is EXPORTS), use it as is; otherwise, prepend...
4227 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4228 cp $export_symbols $output_objdir/$soname.def;
4230 echo EXPORTS > $output_objdir/$soname.def;
4231 cat $export_symbols >> $output_objdir/$soname.def;
4233 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4235 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4239 darwin* | rhapsody*)
4240 if test "$GXX" = yes; then
4241 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4243 rhapsody* | darwin1.[[012]])
4244 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
4247 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4248 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
4250 case ${MACOSX_DEPLOYMENT_TARGET} in
4252 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
4255 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
4261 lt_int_apple_cc_single_mod=no
4262 output_verbose_link_cmd='echo'
4263 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
4264 lt_int_apple_cc_single_mod=yes
4266 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4267 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4269 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4271 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4273 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
4274 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4275 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4277 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4279 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4280 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4281 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4282 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4283 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
4284 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4286 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4291 case $cc_basename in
4293 # FIXME: insert proper C++ library support
4294 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4297 # Green Hills C++ Compiler
4298 # FIXME: insert proper C++ library support
4299 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4302 # FIXME: insert proper C++ library support
4303 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4308 # C++ shared libraries reported to be fairly broken before switch to ELF
4309 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4312 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4314 freebsd* | kfreebsd*-gnu)
4315 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4317 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4322 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4323 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4324 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4325 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4326 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4327 # but as the default
4328 # location of the library.
4330 case $cc_basename in
4332 # FIXME: insert proper C++ library support
4333 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4336 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4337 # Commands to make compiler produce verbose output that lists
4338 # what "hidden" libraries, object files and flags are used when
4339 # linking a shared library.
4341 # There doesn't appear to be a way to prevent this compiler from
4342 # explicitly linking system object files so we need to strip them
4343 # from the output so that they don't get included in the library
4345 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4348 if test "$GXX" = yes; then
4349 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4351 # FIXME: insert proper C++ library support
4352 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4358 if test $with_gnu_ld = no; then
4361 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4362 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4363 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4366 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4369 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4370 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4371 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4377 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4378 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4381 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4382 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4383 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4384 # but as the default
4385 # location of the library.
4388 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4389 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4390 # but as the default
4391 # location of the library.
4395 case $cc_basename in
4397 # FIXME: insert proper C++ library support
4398 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4403 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4406 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4409 # Commands to make compiler produce verbose output that lists
4410 # what "hidden" libraries, object files and flags are used when
4411 # linking a shared library.
4413 # There doesn't appear to be a way to prevent this compiler from
4414 # explicitly linking system object files so we need to strip them
4415 # from the output so that they don't get included in the library
4417 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4420 if test "$GXX" = yes; then
4421 if test $with_gnu_ld = no; then
4424 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4427 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4432 # FIXME: insert proper C++ library support
4433 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4439 case $cc_basename in
4442 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
4444 # Archives containing C++ object files must be created using
4445 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4446 # necessary to make sure instantiated templates are included
4448 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4451 if test "$GXX" = yes; then
4452 if test "$with_gnu_ld" = no; then
4453 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
4455 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4458 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4461 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4462 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4465 case $cc_basename in
4467 # Kuck and Associates, Inc. (KAI) C++ Compiler
4469 # KCC will only create a shared library if the output file
4470 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4471 # to its proper name (with version) after linking.
4472 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4473 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4474 # Commands to make compiler produce verbose output that lists
4475 # what "hidden" libraries, object files and flags are used when
4476 # linking a shared library.
4478 # There doesn't appear to be a way to prevent this compiler from
4479 # explicitly linking system object files so we need to strip them
4480 # from the output so that they don't get included in the library
4482 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4484 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4485 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4487 # Archives containing C++ object files must be created using
4488 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4489 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4494 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4495 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4496 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4497 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4498 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4499 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4503 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4504 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4506 runpath_var=LD_RUN_PATH
4507 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4508 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4510 # Commands to make compiler produce verbose output that lists
4511 # what "hidden" libraries, object files and flags are used when
4512 # linking a shared library.
4514 # There doesn't appear to be a way to prevent this compiler from
4515 # explicitly linking system object files so we need to strip them
4516 # from the output so that they don't get included in the library
4518 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4523 # FIXME: insert proper C++ library support
4524 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4527 # FIXME: insert proper C++ library support
4528 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4531 case $cc_basename in
4533 # FIXME: insert proper C++ library support
4534 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4537 # FIXME: insert proper C++ library support
4538 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4542 netbsd* | knetbsd*-gnu)
4543 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4544 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4546 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4547 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4548 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4550 # Workaround some broken pre-1.5 toolchains
4551 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4554 case $cc_basename in
4556 # Kuck and Associates, Inc. (KAI) C++ Compiler
4558 # KCC will only create a shared library if the output file
4559 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4560 # to its proper name (with version) after linking.
4561 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4563 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4564 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4566 # Archives containing C++ object files must be created using
4567 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4568 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4572 # Rational C++ 2.4.1
4573 # FIXME: insert proper C++ library support
4574 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4577 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4578 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
4580 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4581 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4583 # Commands to make compiler produce verbose output that lists
4584 # what "hidden" libraries, object files and flags are used when
4585 # linking a shared library.
4587 # There doesn't appear to be a way to prevent this compiler from
4588 # explicitly linking system object files so we need to strip them
4589 # from the output so that they don't get included in the library
4591 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4594 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4595 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4596 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
4598 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4599 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4601 # Commands to make compiler produce verbose output that lists
4602 # what "hidden" libraries, object files and flags are used when
4603 # linking a shared library.
4604 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4607 # FIXME: insert proper C++ library support
4608 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4614 case $cc_basename in
4616 # Kuck and Associates, Inc. (KAI) C++ Compiler
4618 # KCC will only create a shared library if the output file
4619 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4620 # to its proper name (with version) after linking.
4621 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4623 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4624 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4626 # Archives containing C++ object files must be created using
4627 # the KAI C++ compiler.
4628 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4631 # Rational C++ 2.4.1
4632 # FIXME: insert proper C++ library support
4633 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4636 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4637 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
4638 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4639 echo "-hidden">> $lib.exp~
4640 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
4643 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4644 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4646 # Commands to make compiler produce verbose output that lists
4647 # what "hidden" libraries, object files and flags are used when
4648 # linking a shared library.
4650 # There doesn't appear to be a way to prevent this compiler from
4651 # explicitly linking system object files so we need to strip them
4652 # from the output so that they don't get included in the library
4654 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4657 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4658 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4659 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
4661 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4662 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4664 # Commands to make compiler produce verbose output that lists
4665 # what "hidden" libraries, object files and flags are used when
4666 # linking a shared library.
4667 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4670 # FIXME: insert proper C++ library support
4671 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4677 # FIXME: insert proper C++ library support
4678 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4681 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4682 case $cc_basename in
4684 # FIXME: insert proper C++ library support
4685 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4688 # FIXME: insert proper C++ library support
4689 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4694 case $cc_basename in
4697 # FIXME: insert proper C++ library support
4698 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4702 # FIXME: insert proper C++ library support
4703 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4706 # FIXME: insert proper C++ library support
4707 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4712 case $cc_basename in
4714 # Sun C++ 4.2, 5.x and Centerline C++
4715 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4716 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4717 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4718 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4720 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4721 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4723 solaris2.[0-5] | solaris2.[0-5].*) ;;
4725 # The C++ compiler is used as linker so we must use $wl
4726 # flag to pass the commands to the underlying system
4728 # Supported since Solaris 2.6 (maybe 2.5.1?)
4729 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4732 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4734 # Commands to make compiler produce verbose output that lists
4735 # what "hidden" libraries, object files and flags are used when
4736 # linking a shared library.
4738 # There doesn't appear to be a way to prevent this compiler from
4739 # explicitly linking system object files so we need to strip them
4740 # from the output so that they don't get included in the library
4742 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4744 # Archives containing C++ object files must be created using
4745 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4746 # necessary to make sure instantiated templates are included
4748 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4751 # Green Hills C++ Compiler
4752 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4754 # The C++ compiler must be used to create the archive.
4755 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4758 # GNU C++ compiler with Solaris linker
4759 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4760 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4761 if $CC --version | grep -v '^2\.7' > /dev/null; then
4762 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4763 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4764 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4766 # Commands to make compiler produce verbose output that lists
4767 # what "hidden" libraries, object files and flags are used when
4768 # linking a shared library.
4769 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4771 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4773 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4774 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4775 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4777 # Commands to make compiler produce verbose output that lists
4778 # what "hidden" libraries, object files and flags are used when
4779 # linking a shared library.
4780 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4783 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4788 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4789 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4792 case $cc_basename in
4794 # NonStop-UX NCC 3.20
4795 # FIXME: insert proper C++ library support
4796 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4799 # FIXME: insert proper C++ library support
4800 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4805 # FIXME: insert proper C++ library support
4806 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4809 # FIXME: insert proper C++ library support
4810 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4813 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4814 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4816 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4817 _LT_AC_TAGVAR(LD, $1)="$LD"
4819 AC_LIBTOOL_POSTDEP_PREDEP($1)
4820 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4821 AC_LIBTOOL_PROG_CC_C_O($1)
4822 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4823 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4824 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4825 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4826 AC_LIBTOOL_SYS_LIB_STRIP
4827 AC_LIBTOOL_DLOPEN_SELF($1)
4829 AC_LIBTOOL_CONFIG($1)
4836 with_gnu_ldcxx=$with_gnu_ld
4837 with_gnu_ld=$lt_save_with_gnu_ld
4838 lt_cv_path_LDCXX=$lt_cv_path_LD
4839 lt_cv_path_LD=$lt_save_path_LD
4840 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4841 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4842 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4844 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4845 # ------------------------
4846 # Figure out "hidden" library dependencies from verbose
4847 # compiler output when linking a shared library.
4848 # Parse the compiler output and extract the necessary
4849 # objects, libraries and library flags.
4850 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4851 dnl we can't use the lt_simple_compile_test_code here,
4852 dnl because it contains code intended for an executable,
4853 dnl not a library. It's possible we should let each
4854 dnl tag define a new lt_????_link_test_code variable,
4855 dnl but it's only used here...
4856 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4858 void foo (void) { a = 0; }
4860 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4864 Foo (void) { a = 0; }
4869 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4877 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4880 public void bar (void) {
4886 dnl Parse the compiler output and extract the necessary
4887 dnl objects, libraries and library flags.
4888 if AC_TRY_EVAL(ac_compile); then
4889 # Parse the compiler output and extract the necessary
4890 # objects, libraries and library flags.
4892 # Sentinel used to keep track of whether or not we are before
4893 # the conftest object file.
4894 pre_test_object_deps_done=no
4896 # The `*' in the case matches for architectures that use `case' in
4897 # $output_verbose_cmd can trigger glob expansion during the loop
4898 # eval without this substitution.
4899 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4901 for p in `eval $output_verbose_link_cmd`; do
4905 # Some compilers place space between "-{L,R}" and the path.
4908 || test $p = "-R"; then
4915 if test "$pre_test_object_deps_done" = no; then
4918 # Internal compiler library paths should come after those
4919 # provided the user. The postdeps already come after the
4920 # user supplied libs so there is no need to process them.
4921 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4922 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4924 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4927 # The "-l" case would never come before the object being
4928 # linked, so don't bother handling this case.
4931 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4932 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4934 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4940 # This assumes that the test object file only shows up
4941 # once in the compiler output.
4942 if test "$p" = "conftest.$objext"; then
4943 pre_test_object_deps_done=yes
4947 if test "$pre_test_object_deps_done" = no; then
4948 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4949 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4951 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4954 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4955 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4957 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4962 *) ;; # Ignore the rest.
4970 echo "libtool.m4: error: problem compiling $1 test program"
4973 $rm -f confest.$objext
4975 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4976 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4978 ])# AC_LIBTOOL_POSTDEP_PREDEP
4980 # AC_LIBTOOL_LANG_F77_CONFIG
4981 # ------------------------
4982 # Ensure that the configuration vars for the C compiler are
4983 # suitably defined. Those variables are subsequently used by
4984 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4985 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4986 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4987 [AC_REQUIRE([AC_PROG_F77])
4988 AC_LANG_PUSH(Fortran 77)
4990 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4991 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4992 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4993 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4994 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4995 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4996 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4997 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4998 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4999 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5000 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5001 _LT_AC_TAGVAR(module_cmds, $1)=
5002 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5003 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5004 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5005 _LT_AC_TAGVAR(no_undefined_flag, $1)=
5006 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5007 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5009 # Source file extension for f77 test sources.
5012 # Object file extension for compiled f77 test sources.
5014 _LT_AC_TAGVAR(objext, $1)=$objext
5016 # Code to be used in simple compile tests
5017 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
5019 # Code to be used in simple link tests
5020 lt_simple_link_test_code=" program t\n end\n"
5022 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5025 # Allow CC to be a program name with arguments.
5029 _LT_AC_TAGVAR(compiler, $1)=$CC
5030 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
5032 AC_MSG_CHECKING([if libtool supports shared libraries])
5033 AC_MSG_RESULT([$can_build_shared])
5035 AC_MSG_CHECKING([whether to build shared libraries])
5036 test "$can_build_shared" = "no" && enable_shared=no
5038 # On AIX, shared libraries and static libraries use the same namespace, and
5039 # are all built from PIC.
5042 test "$enable_shared" = yes && enable_static=no
5043 if test -n "$RANLIB"; then
5044 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5045 postinstall_cmds='$RANLIB $lib'
5049 test "$enable_shared" = yes && enable_static=no
5052 AC_MSG_RESULT([$enable_shared])
5054 AC_MSG_CHECKING([whether to build static libraries])
5055 # Make sure either enable_shared or enable_static is yes.
5056 test "$enable_shared" = yes || enable_static=yes
5057 AC_MSG_RESULT([$enable_static])
5059 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5061 _LT_AC_TAGVAR(GCC, $1)="$G77"
5062 _LT_AC_TAGVAR(LD, $1)="$LD"
5064 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5065 AC_LIBTOOL_PROG_CC_C_O($1)
5066 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5067 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5068 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5069 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5070 AC_LIBTOOL_SYS_LIB_STRIP
5073 AC_LIBTOOL_CONFIG($1)
5077 ])# AC_LIBTOOL_LANG_F77_CONFIG
5080 # AC_LIBTOOL_LANG_GCJ_CONFIG
5081 # --------------------------
5082 # Ensure that the configuration vars for the C compiler are
5083 # suitably defined. Those variables are subsequently used by
5084 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5085 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5086 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5089 # Source file extension for Java test sources.
5092 # Object file extension for compiled Java test sources.
5094 _LT_AC_TAGVAR(objext, $1)=$objext
5096 # Code to be used in simple compile tests
5097 lt_simple_compile_test_code="class foo {}\n"
5099 # Code to be used in simple link tests
5100 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
5102 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5105 # Allow CC to be a program name with arguments.
5109 _LT_AC_TAGVAR(compiler, $1)=$CC
5111 # GCJ did not exist at the time GCC didn't implicitly link libc in.
5112 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5114 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5115 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5116 AC_LIBTOOL_PROG_CC_C_O($1)
5117 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5118 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5119 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5120 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5121 AC_LIBTOOL_SYS_LIB_STRIP
5122 AC_LIBTOOL_DLOPEN_SELF($1)
5124 AC_LIBTOOL_CONFIG($1)
5128 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
5131 # AC_LIBTOOL_LANG_RC_CONFIG
5132 # --------------------------
5133 # Ensure that the configuration vars for the Windows resource compiler are
5134 # suitably defined. Those variables are subsequently used by
5135 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5136 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5137 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5140 # Source file extension for RC test sources.
5143 # Object file extension for compiled RC test sources.
5145 _LT_AC_TAGVAR(objext, $1)=$objext
5147 # Code to be used in simple compile tests
5148 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5150 # Code to be used in simple link tests
5151 lt_simple_link_test_code="$lt_simple_compile_test_code"
5153 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5156 # Allow CC to be a program name with arguments.
5160 _LT_AC_TAGVAR(compiler, $1)=$CC
5161 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5163 AC_LIBTOOL_CONFIG($1)
5167 ])# AC_LIBTOOL_LANG_RC_CONFIG
5170 # AC_LIBTOOL_CONFIG([TAGNAME])
5171 # ----------------------------
5172 # If TAGNAME is not passed, then create an initial libtool script
5173 # with a default configuration from the untagged config vars. Otherwise
5174 # add code to config.status for appending the configuration named by
5175 # TAGNAME from the matching tagged config vars.
5176 AC_DEFUN([AC_LIBTOOL_CONFIG],
5177 [# The else clause should only fire when bootstrapping the
5178 # libtool distribution, otherwise you forgot to ship ltmain.sh
5179 # with your package, and you will get complaints that there are
5180 # no rules to generate ltmain.sh.
5181 if test -f "$ltmain"; then
5182 # See if we are running on zsh, and set the options which allow our commands through
5183 # without removal of \ escapes.
5184 if test -n "${ZSH_VERSION+set}" ; then
5185 setopt NO_GLOB_SUBST
5187 # Now quote all the things that may contain metacharacters while being
5188 # careful not to overquote the AC_SUBSTed values. We take copies of the
5189 # variables and quote the copies for generation of the libtool script.
5190 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
5192 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5193 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5194 deplibs_check_method reload_flag reload_cmds need_locks \
5195 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5196 lt_cv_sys_global_symbol_to_c_name_address \
5197 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5198 old_postinstall_cmds old_postuninstall_cmds \
5199 _LT_AC_TAGVAR(compiler, $1) \
5200 _LT_AC_TAGVAR(CC, $1) \
5201 _LT_AC_TAGVAR(LD, $1) \
5202 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5203 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5204 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5205 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5206 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5207 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5208 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5209 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5210 _LT_AC_TAGVAR(old_archive_cmds, $1) \
5211 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5212 _LT_AC_TAGVAR(predep_objects, $1) \
5213 _LT_AC_TAGVAR(postdep_objects, $1) \
5214 _LT_AC_TAGVAR(predeps, $1) \
5215 _LT_AC_TAGVAR(postdeps, $1) \
5216 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5217 _LT_AC_TAGVAR(archive_cmds, $1) \
5218 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5219 _LT_AC_TAGVAR(postinstall_cmds, $1) \
5220 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5221 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5222 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5223 _LT_AC_TAGVAR(no_undefined_flag, $1) \
5224 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5225 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5226 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5227 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5228 _LT_AC_TAGVAR(hardcode_automatic, $1) \
5229 _LT_AC_TAGVAR(module_cmds, $1) \
5230 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5231 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5232 _LT_AC_TAGVAR(exclude_expsyms, $1) \
5233 _LT_AC_TAGVAR(include_expsyms, $1); do
5236 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5237 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5238 _LT_AC_TAGVAR(archive_cmds, $1) | \
5239 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5240 _LT_AC_TAGVAR(module_cmds, $1) | \
5241 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5242 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5243 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5244 extract_expsyms_cmds | reload_cmds | finish_cmds | \
5245 postinstall_cmds | postuninstall_cmds | \
5246 old_postinstall_cmds | old_postuninstall_cmds | \
5247 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5248 # Double-quote double-evaled strings.
5249 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5252 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5258 *'\[$]0 --fallback-echo"')
5259 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5264 [cfgfile="${ofile}T"
5265 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5267 AC_MSG_NOTICE([creating $ofile])],
5270 cat <<__EOF__ >> "$cfgfile"
5274 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5275 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5276 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
5278 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5279 # Free Software Foundation, Inc.
5281 # This file is part of GNU Libtool:
5282 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5284 # This program is free software; you can redistribute it and/or modify
5285 # it under the terms of the GNU General Public License as published by
5286 # the Free Software Foundation; either version 2 of the License, or
5287 # (at your option) any later version.
5289 # This program is distributed in the hope that it will be useful, but
5290 # WITHOUT ANY WARRANTY; without even the implied warranty of
5291 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5292 # General Public License for more details.
5294 # You should have received a copy of the GNU General Public License
5295 # along with this program; if not, write to the Free Software
5296 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5298 # As a special exception to the GNU General Public License, if you
5299 # distribute this file as part of a program that contains a
5300 # configuration script generated by Autoconf, you may include it under
5301 # the same distribution terms that you use for the rest of that program.
5303 # A sed program that does not truncate output.
5306 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
5307 Xsed="$SED -e s/^X//"
5309 # The HP-UX ksh and POSIX shell print the target directory to stdout
5311 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5313 # The names of the tagged configurations supported by this script.
5316 # ### BEGIN LIBTOOL CONFIG],
5317 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5319 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5321 # Shell to use when invoking shell scripts.
5324 # Whether or not to build shared libraries.
5325 build_libtool_libs=$enable_shared
5327 # Whether or not to build static libraries.
5328 build_old_libs=$enable_static
5330 # Whether or not to add -lc for building shared libraries.
5331 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5333 # Whether or not to disallow shared libs when runtime libs are static
5334 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5336 # Whether or not to optimize for fast installation.
5337 fast_install=$enable_fast_install
5340 host_alias=$host_alias
5343 # An echo program that does not interpret backslashes.
5348 AR_FLAGS=$lt_AR_FLAGS
5353 # A language-specific compiler.
5354 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5356 # Is the compiler the GNU C compiler?
5357 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5362 # The linker used to build libraries.
5363 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5365 # Whether we need hard or soft links.
5368 # A BSD-compatible nm program.
5371 # A symbol stripping program
5374 # Used to examine libraries when file_magic_cmd begins "file"
5375 MAGIC_CMD=$MAGIC_CMD
5377 # Used on cygwin: DLL creation program.
5380 # Used on cygwin: object dumper.
5383 # Used on cygwin: assembler.
5386 # The name of the directory that contains temporary libtool files.
5389 # How to create reloadable object files.
5390 reload_flag=$lt_reload_flag
5391 reload_cmds=$lt_reload_cmds
5393 # How to pass a linker flag through the compiler.
5394 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5396 # Object file suffix (normally "o").
5399 # Old archive suffix (normally "a").
5402 # Shared library suffix (normally ".so").
5403 shrext_cmds='$shrext_cmds'
5405 # Executable file suffix (normally "").
5408 # Additional compiler flags for building library objects.
5409 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5412 # What is the maximum length of a command?
5413 max_cmd_len=$lt_cv_sys_max_cmd_len
5415 # Does compiler simultaneously support -c and -o options?
5416 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5418 # Must we lock files when doing compilation ?
5419 need_locks=$lt_need_locks
5421 # Do we need the lib prefix for modules?
5422 need_lib_prefix=$need_lib_prefix
5424 # Do we need a version for libraries?
5425 need_version=$need_version
5427 # Whether dlopen is supported.
5428 dlopen_support=$enable_dlopen
5430 # Whether dlopen of programs is supported.
5431 dlopen_self=$enable_dlopen_self
5433 # Whether dlopen of statically linked programs is supported.
5434 dlopen_self_static=$enable_dlopen_self_static
5436 # Compiler flag to prevent dynamic linking.
5437 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5439 # Compiler flag to turn off builtin functions.
5440 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5442 # Compiler flag to allow reflexive dlopens.
5443 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5445 # Compiler flag to generate shared objects directly from archives.
5446 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5448 # Compiler flag to generate thread-safe objects.
5449 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5451 # Library versioning type.
5452 version_type=$version_type
5454 # Format of library name prefix.
5455 libname_spec=$lt_libname_spec
5457 # List of archive names. First name is the real one, the rest are links.
5458 # The last name is the one that the linker finds with -lNAME.
5459 library_names_spec=$lt_library_names_spec
5461 # The coded name of the library, if different from the real name.
5462 soname_spec=$lt_soname_spec
5464 # Commands used to build and install an old-style archive.
5466 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5467 old_postinstall_cmds=$lt_old_postinstall_cmds
5468 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5470 # Create an old-style archive from a shared archive.
5471 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5473 # Create a temporary old-style archive to link instead of a shared archive.
5474 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5476 # Commands used to build and install a shared archive.
5477 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5478 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5479 postinstall_cmds=$lt_postinstall_cmds
5480 postuninstall_cmds=$lt_postuninstall_cmds
5482 # Commands used to build a loadable module (assumed same as above if empty)
5483 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5484 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5486 # Commands to strip libraries.
5487 old_striplib=$lt_old_striplib
5488 striplib=$lt_striplib
5490 # Dependencies to place before the objects being linked to create a
5492 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5494 # Dependencies to place after the objects being linked to create a
5496 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5498 # Dependencies to place before the objects being linked to create a
5500 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5502 # Dependencies to place after the objects being linked to create a
5504 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5506 # The library search path used internally by the compiler when linking
5508 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5510 # Method to check whether dependent libraries are shared objects.
5511 deplibs_check_method=$lt_deplibs_check_method
5513 # Command to use when deplibs_check_method == file_magic.
5514 file_magic_cmd=$lt_file_magic_cmd
5516 # Flag that allows shared libraries with undefined symbols to be built.
5517 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5519 # Flag that forces no undefined symbols.
5520 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5522 # Commands used to finish a libtool library installation in a directory.
5523 finish_cmds=$lt_finish_cmds
5525 # Same as above, but a single script fragment to be evaled but not shown.
5526 finish_eval=$lt_finish_eval
5528 # Take the output of nm and produce a listing of raw symbols and C names.
5529 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5531 # Transform the output of nm in a proper C declaration
5532 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5534 # Transform the output of nm in a C name address pair
5535 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5537 # This is the shared library runtime path variable.
5538 runpath_var=$runpath_var
5540 # This is the shared library path variable.
5541 shlibpath_var=$shlibpath_var
5543 # Is shlibpath searched before the hard-coded library search path?
5544 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5546 # How to hardcode a shared library path into an executable.
5547 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5549 # Whether we should hardcode library paths into libraries.
5550 hardcode_into_libs=$hardcode_into_libs
5552 # Flag to hardcode \$libdir into a binary during linking.
5553 # This must work even if \$libdir does not exist.
5554 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5556 # If ld is used when linking, flag to hardcode \$libdir into
5557 # a binary during linking. This must work even if \$libdir does
5559 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5561 # Whether we need a single -rpath flag with a separated argument.
5562 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5564 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5566 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5568 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5570 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5572 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5573 # the resulting binary.
5574 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5576 # Set to yes if building a shared library automatically hardcodes DIR into the library
5577 # and all subsequent libraries and executables linked against it.
5578 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5580 # Variables whose values should be saved in libtool wrapper scripts and
5581 # restored at relink time.
5582 variables_saved_for_relink="$variables_saved_for_relink"
5584 # Whether libtool must link a program against all its dependency libraries.
5585 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5587 # Compile-time system search path for libraries
5588 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5590 # Run-time system search path for libraries
5591 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5593 # Fix the shell variable \$srcfile for the compiler.
5594 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5596 # Set to yes if exported symbols are required.
5597 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5599 # The commands to list exported symbols.
5600 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5602 # The commands to extract the exported symbol list from a shared archive.
5603 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5605 # Symbols that should not be listed in the preloaded symbols.
5606 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5608 # Symbols that must always be exported.
5609 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5612 [# ### END LIBTOOL CONFIG],
5613 [# ### END LIBTOOL TAG CONFIG: $tagname])
5620 cat <<\EOF >> "$cfgfile"
5622 # AIX sometimes has problems with the GCC collect2 program. For some
5623 # reason, if we set the COLLECT_NAMES environment variable, the problems
5624 # vanish in a puff of smoke.
5625 if test "X${COLLECT_NAMES+set}" != Xset; then
5627 export COLLECT_NAMES
5633 # We use sed instead of cat because bash on DJGPP gets confused if
5634 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5635 # text mode, it properly converts lines to CR/LF. This bash problem
5636 # is reportedly fixed, but why not run on old versions too?
5637 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5639 mv -f "$cfgfile" "$ofile" || \
5640 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5644 # If there is no Makefile yet, we rely on a make rule to execute
5645 # `config.status --recheck' to rerun these tests and create the
5646 # libtool script then.
5647 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5648 if test -f "$ltmain_in"; then
5649 test -f Makefile && make "$ltmain"
5652 ])# AC_LIBTOOL_CONFIG
5655 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5656 # -------------------------------------------
5657 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5658 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5660 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5662 if test "$GCC" = yes; then
5663 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5665 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5666 lt_cv_prog_compiler_rtti_exceptions,
5667 [-fno-rtti -fno-exceptions], [],
5668 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5670 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5673 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5674 # ---------------------------------
5675 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5676 [AC_REQUIRE([AC_CANONICAL_HOST])
5677 AC_REQUIRE([AC_PROG_NM])
5678 AC_REQUIRE([AC_OBJEXT])
5679 # Check for command to grab the raw symbol name followed by C symbol from nm.
5680 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5681 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5683 # These are sane defaults that work on at least a few old systems.
5684 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5686 # Character class describing NM global symbol codes.
5687 symcode='[[BCDEGRST]]'
5689 # Regexp to match symbols that can be accessed directly from C.
5690 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5692 # Transform the above into a raw symbol and a C symbol.
5693 symxfrm='\1 \2\3 \3'
5695 # Transform an extracted symbol line into a proper C declaration
5696 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5698 # Transform an extracted symbol line into symbol name and symbol address
5699 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5701 # Define system-specific variables.
5706 cygwin* | mingw* | pw32*)
5707 symcode='[[ABCDGISTW]]'
5709 hpux*) # Its linker distinguishes data from code symbols
5710 if test "$host_cpu" = ia64; then
5711 symcode='[[ABCDEGRST]]'
5713 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5714 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5717 symcode='[[BCDEGRST]]'
5720 symcode='[[BCDEGQRST]]'
5726 symcode='[[DFNSTU]]'
5730 # Handle CRLF in mingw tool chain
5734 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5738 # If we're using GNU nm, then use its standard symbol codes.
5739 case `$NM -V 2>&1` in
5740 *GNU* | *'with BFD'*)
5741 symcode='[[ABCDGIRSTW]]' ;;
5744 # Try without a prefix undercore, then with it.
5745 for ac_symprfx in "" "_"; do
5747 # Write the raw and C identifiers.
5748 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5750 # Check to see that the pipe works correctly.
5754 cat > conftest.$ac_ext <<EOF
5759 void nm_test_func(){}
5763 int main(){nm_test_var='a';nm_test_func();return(0);}
5766 if AC_TRY_EVAL(ac_compile); then
5767 # Now try to grab the symbols.
5769 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5770 # Try sorting and uniquifying the output.
5771 if sort "$nlist" | uniq > "$nlist"T; then
5772 mv -f "$nlist"T "$nlist"
5777 # Make sure that we snagged all the symbols we need.
5778 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5779 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5780 cat <<EOF > conftest.$ac_ext
5786 # Now generate the symbol file.
5787 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5789 cat <<EOF >> conftest.$ac_ext
5790 #if defined (__STDC__) && __STDC__
5791 # define lt_ptr_t void *
5793 # define lt_ptr_t char *
5797 /* The mapping between symbol names and symbols. */
5802 lt_preloaded_symbols[[]] =
5805 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5806 cat <<\EOF >> conftest.$ac_ext
5814 # Now try linking the two files.
5815 mv conftest.$ac_objext conftstm.$ac_objext
5816 lt_save_LIBS="$LIBS"
5817 lt_save_CFLAGS="$CFLAGS"
5818 LIBS="conftstm.$ac_objext"
5819 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5820 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5823 LIBS="$lt_save_LIBS"
5824 CFLAGS="$lt_save_CFLAGS"
5826 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5829 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5832 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5835 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5836 cat conftest.$ac_ext >&5
5838 rm -f conftest* conftst*
5840 # Do not use the global_symbol_pipe unless it works.
5841 if test "$pipe_works" = yes; then
5844 lt_cv_sys_global_symbol_pipe=
5848 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5849 lt_cv_sys_global_symbol_to_cdecl=
5851 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5852 AC_MSG_RESULT(failed)
5856 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5859 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5860 # ---------------------------------------
5861 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5862 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5863 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5864 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5866 AC_MSG_CHECKING([for $compiler option to produce PIC])
5868 # C++ specific cases for pic, static, wl, etc.
5869 if test "$GXX" = yes; then
5870 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5871 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5875 # All AIX code is PIC.
5876 if test "$host_cpu" = ia64; then
5877 # AIX 5 now supports IA64 processor
5878 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5882 # FIXME: we need at least 68020 code to build shared libraries, but
5883 # adding the `-m68020' flag to GCC prevents building anything better,
5885 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5887 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5888 # PIC is the default for these OSes.
5890 mingw* | os2* | pw32*)
5891 # This hack is so that the source file can tell whether it is being
5892 # built for inclusion in a dll (and should export symbols for example).
5893 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5895 darwin* | rhapsody*)
5896 # PIC is the default on this platform
5897 # Common symbols not allowed in MH_DYLIB files
5898 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5901 # DJGPP does not support shared libraries at all
5902 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5905 if test -d /usr/nec; then
5906 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5910 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5916 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5921 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5927 # All AIX code is PIC.
5928 if test "$host_cpu" = ia64; then
5929 # AIX 5 now supports IA64 processor
5930 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5932 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5936 case $cc_basename in
5938 # Green Hills C++ Compiler
5939 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5944 case $cc_basename in
5946 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5949 # Green Hills C++ Compiler
5950 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5956 freebsd* | kfreebsd*-gnu)
5957 # FreeBSD uses GNU C++
5959 hpux9* | hpux10* | hpux11*)
5960 case $cc_basename in
5962 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5963 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5964 if test "$host_cpu" != ia64; then
5965 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5969 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5970 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5976 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5984 irix5* | irix6* | nonstopux*)
5985 case $cc_basename in
5987 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5988 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5989 # CC pic flag -KPIC is the default.
5996 case $cc_basename in
5999 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6000 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6004 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6005 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6006 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6010 # Make sure the PIC flag is empty. It appears that all Alpha
6011 # Linux and Compaq Tru64 Unix objects are PIC.
6012 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6013 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6024 case $cc_basename in
6026 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6032 netbsd* | knetbsd*-gnu)
6034 osf3* | osf4* | osf5*)
6035 case $cc_basename in
6037 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6040 # Rational C++ 2.4.1
6041 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6044 # Digital/Compaq C++
6045 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6046 # Make sure the PIC flag is empty. It appears that all Alpha
6047 # Linux and Compaq Tru64 Unix objects are PIC.
6048 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6049 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6058 case $cc_basename in
6060 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6067 case $cc_basename in
6069 # Sun C++ 4.2, 5.x and Centerline C++
6070 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6071 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6072 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6075 # Green Hills C++ Compiler
6076 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6083 case $cc_basename in
6086 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6087 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6091 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6098 case $cc_basename in
6100 # NonStop-UX NCC 3.20
6101 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6112 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6118 if test "$GCC" = yes; then
6119 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6120 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6124 # All AIX code is PIC.
6125 if test "$host_cpu" = ia64; then
6126 # AIX 5 now supports IA64 processor
6127 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6132 # FIXME: we need at least 68020 code to build shared libraries, but
6133 # adding the `-m68020' flag to GCC prevents building anything better,
6135 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6138 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6139 # PIC is the default for these OSes.
6142 mingw* | pw32* | os2*)
6143 # This hack is so that the source file can tell whether it is being
6144 # built for inclusion in a dll (and should export symbols for example).
6145 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6148 darwin* | rhapsody*)
6149 # PIC is the default on this platform
6150 # Common symbols not allowed in MH_DYLIB files
6151 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6155 # Just because we use GCC doesn't mean we suddenly get shared libraries
6156 # on systems that don't support them.
6157 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6162 if test -d /usr/nec; then
6163 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6168 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6175 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6181 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6185 # PORTME Check for flag to pass linker flags through the system compiler.
6188 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6189 if test "$host_cpu" = ia64; then
6190 # AIX 5 now supports IA64 processor
6191 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6193 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6197 mingw* | pw32* | os2*)
6198 # This hack is so that the source file can tell whether it is being
6199 # built for inclusion in a dll (and should export symbols for example).
6200 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6203 hpux9* | hpux10* | hpux11*)
6204 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6205 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6212 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6215 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6216 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6219 irix5* | irix6* | nonstopux*)
6220 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6221 # PIC (with -KPIC) is the default.
6222 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6226 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6227 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6233 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6234 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6235 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6238 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6239 # All Alpha code is PIC.
6240 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6245 osf3* | osf4* | osf5*)
6246 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6247 # All OSF/1 code is PIC.
6248 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6252 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
6253 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
6257 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6258 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6259 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6263 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6264 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6265 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6268 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6269 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6270 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6271 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6275 if test -d /usr/nec ;then
6276 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6277 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6282 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6283 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6287 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6292 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6295 # Check to make sure the PIC flag actually works.
6297 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6298 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6299 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6300 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6301 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6303 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6305 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6306 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6309 # For platforms which do not support PIC, -DPIC is meaningless:
6311 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6314 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6320 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6321 # ------------------------------------
6322 # See if the linker supports building shared libraries.
6323 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6324 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6326 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6329 # If we're using GNU nm, then we don't want the "-C" option.
6330 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6331 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6332 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6334 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6338 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6341 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6344 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6347 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6352 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6353 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6354 _LT_AC_TAGVAR(archive_cmds, $1)=
6355 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6356 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6357 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6358 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6359 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6360 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6361 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6362 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6363 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6364 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6365 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6366 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6367 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6368 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6369 _LT_AC_TAGVAR(module_cmds, $1)=
6370 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6371 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6372 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6373 # include_expsyms should be a list of space-separated symbols to be *always*
6374 # included in the symbol list
6375 _LT_AC_TAGVAR(include_expsyms, $1)=
6376 # exclude_expsyms can be an extended regexp of symbols to exclude
6377 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6378 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6379 # as well as any symbol that contains `d'.
6380 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6381 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6382 # platforms (ab)use it in PIC code, but their linkers get confused if
6383 # the symbol is explicitly referenced. Since portable code cannot
6384 # rely on this symbol name, it's probably fine to never include it in
6385 # preloaded symbol tables.
6386 extract_expsyms_cmds=
6389 cygwin* | mingw* | pw32*)
6390 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6391 # When not using gcc, we currently assume that we are using
6392 # Microsoft Visual C++.
6393 if test "$GCC" != yes; then
6402 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6403 if test "$with_gnu_ld" = yes; then
6404 # If archive_cmds runs LD, not CC, wlarc should be empty
6407 # See if GNU ld supports shared libraries.
6409 aix3* | aix4* | aix5*)
6410 # On AIX/PPC, the GNU linker is very broken
6411 if test "$host_cpu" != ia64; then
6412 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6415 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6416 *** to be unable to reliably create shared libraries on AIX.
6417 *** Therefore, libtool is disabling shared libraries support. If you
6418 *** really care for shared libraries, you may want to modify your PATH
6419 *** so that a non-GNU linker is found, and then restart.
6426 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6427 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6428 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6430 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6431 # that the semantics of dynamic libraries on AmigaOS, at least up
6432 # to version 4, is to share data among multiple programs linked
6433 # with the same dynamic library. Since this doesn't match the
6434 # behavior of shared libraries on other platforms, we can't use
6436 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6440 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6441 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6442 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6443 # support --undefined. This deserves some investigation. FIXME
6444 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6446 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6450 cygwin* | mingw* | pw32*)
6451 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6452 # as there is no search path for DLLs.
6453 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6454 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6455 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6456 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6457 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6459 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6460 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6461 # If the export-symbols file already is a .def file (1st line
6462 # is EXPORTS), use it as is; otherwise, prepend...
6463 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6464 cp $export_symbols $output_objdir/$soname.def;
6466 echo EXPORTS > $output_objdir/$soname.def;
6467 cat $export_symbols >> $output_objdir/$soname.def;
6469 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6475 netbsd* | knetbsd*-gnu)
6476 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6477 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6480 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6481 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6486 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6487 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6490 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6491 *** create shared libraries on Solaris systems. Therefore, libtool
6492 *** is disabling shared libraries support. We urge you to upgrade GNU
6493 *** binutils to release 2.9.1 or newer. Another option is to modify
6494 *** your PATH or compiler configuration so that the native linker is
6495 *** used, and then restart.
6498 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6499 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6500 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6502 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6507 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6509 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6510 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6514 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6515 tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6516 _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
6517 supports_anon_versioning=no
6518 case `$LD -v 2>/dev/null` in
6519 *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6520 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6521 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6522 *\ 2.11.*) ;; # other 2.11 versions
6523 *) supports_anon_versioning=yes ;;
6525 if test $supports_anon_versioning = yes; then
6526 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6527 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6528 $echo "local: *; };" >> $output_objdir/$libname.ver~
6529 $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6531 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
6533 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6535 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6540 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6541 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6542 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6544 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6549 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
6550 runpath_var=LD_RUN_PATH
6551 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6552 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6553 # ancient GNU ld didn't support --whole-archive et. al.
6554 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6555 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6557 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6561 # PORTME fill in a description of your system's linker (not GNU ld)
6564 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6565 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6566 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6567 # Note: this linker hardcodes the directories in LIBPATH if there
6568 # are no directories specified by -L.
6569 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6570 if test "$GCC" = yes && test -z "$link_static_flag"; then
6571 # Neither direct hardcoding nor static linking is supported with a
6573 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6578 if test "$host_cpu" = ia64; then
6579 # On IA64, the linker does run time linking by default, so we don't
6580 # have to do anything special.
6581 aix_use_runtimelinking=no
6582 exp_sym_flag='-Bexport'
6585 # If we're using GNU nm, then we don't want the "-C" option.
6586 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6587 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6588 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6590 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6592 aix_use_runtimelinking=no
6594 # Test if we are trying to use run time linking or normal
6595 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6596 # need to do runtime linking.
6597 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6598 for ld_flag in $LDFLAGS; do
6599 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6600 aix_use_runtimelinking=yes
6606 exp_sym_flag='-bexport'
6607 no_entry_flag='-bnoentry'
6610 # When large executables or shared objects are built, AIX ld can
6611 # have problems creating the table of contents. If linking a library
6612 # or program results in "error TOC overflow" add -mminimal-toc to
6613 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6614 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6616 _LT_AC_TAGVAR(archive_cmds, $1)=''
6617 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6618 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6619 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6621 if test "$GCC" = yes; then
6622 case $host_os in aix4.[012]|aix4.[012].*)
6623 # We only want to do this on AIX 4.2 and lower, the check
6624 # below for broken collect2 doesn't work under 4.3+
6625 collect2name=`${CC} -print-prog-name=collect2`
6626 if test -f "$collect2name" && \
6627 strings "$collect2name" | grep resolve_lib_name >/dev/null
6629 # We have reworked collect2
6630 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6632 # We have old collect2
6633 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6634 # It fails to find uninstalled libraries when the uninstalled
6635 # path is not listed in the libpath. Setting hardcode_minus_L
6636 # to unsupported forces relinking
6637 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6638 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6639 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6642 shared_flag='-shared'
6645 if test "$host_cpu" = ia64; then
6646 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6647 # chokes on -Wl,-G. The following line is correct:
6650 if test "$aix_use_runtimelinking" = yes; then
6651 shared_flag='${wl}-G'
6653 shared_flag='${wl}-bM:SRE'
6658 # It seems that -bexpall does not export symbols beginning with
6659 # underscore (_), so it is better to generate a list of symbols to export.
6660 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6661 if test "$aix_use_runtimelinking" = yes; then
6662 # Warning - without using the other runtime loading flags (-brtl),
6663 # -berok will link without error, but may produce a broken library.
6664 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6665 # Determine the default libpath from the value encoded in an empty executable.
6666 _LT_AC_SYS_LIBPATH_AIX
6667 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6668 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6670 if test "$host_cpu" = ia64; then
6671 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6672 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6673 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
6675 # Determine the default libpath from the value encoded in an empty executable.
6676 _LT_AC_SYS_LIBPATH_AIX
6677 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6678 # Warning - without using the other run time loading flags,
6679 # -berok will link without error, but may produce a broken library.
6680 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6681 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6682 # -bexpall does not export symbols beginning with underscore (_)
6683 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6684 # Exported symbols can be pulled into shared objects from archives
6685 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6686 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6687 # This is similar to how AIX traditionally builds it's shared libraries.
6688 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6694 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6695 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6696 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6697 # see comment about different semantics on the GNU ld section
6698 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6702 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6705 cygwin* | mingw* | pw32*)
6706 # When not using gcc, we currently assume that we are using
6707 # Microsoft Visual C++.
6708 # hardcode_libdir_flag_spec is actually meaningless, as there is
6709 # no search path for DLLs.
6710 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6711 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6712 # Tell ltmain to make .lib files, not .a files.
6714 # Tell ltmain to make .dll files, not .so files.
6716 # FIXME: Setting linknames here is a bad hack.
6717 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6718 # The linker will automatically build a .lib file if we build a DLL.
6719 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6720 # FIXME: Should let the user specify the lib program.
6721 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6722 fix_srcfile_path='`cygpath -w "$srcfile"`'
6723 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6726 darwin* | rhapsody*)
6727 if test "$GXX" = yes ; then
6728 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6730 rhapsody* | darwin1.[[012]])
6731 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6734 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6735 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6737 case ${MACOSX_DEPLOYMENT_TARGET} in
6739 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6742 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6748 lt_int_apple_cc_single_mod=no
6749 output_verbose_link_cmd='echo'
6750 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6751 lt_int_apple_cc_single_mod=yes
6753 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6754 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6756 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6758 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6759 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6760 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6761 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6763 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6765 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6766 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6767 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6768 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6769 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6770 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6772 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6777 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6778 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6779 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6783 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6786 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6787 # support. Future versions do this automatically, but an explicit c++rt0.o
6788 # does not break anything, and helps significantly (at the cost of a little
6791 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6792 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6793 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6794 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6797 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6799 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6800 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6801 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6802 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6805 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6806 freebsd* | kfreebsd*-gnu)
6807 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6808 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6809 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6810 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6814 if test "$GCC" = yes; then
6815 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6817 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6819 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6820 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6821 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6823 # hardcode_minus_L: Not really in the search PATH,
6824 # but as the default location of the library.
6825 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6826 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6830 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6833 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6836 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6842 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6845 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6849 if test "$with_gnu_ld" = no; then
6852 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6853 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6854 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6855 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6856 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6859 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6860 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6861 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6863 # hardcode_minus_L: Not really in the search PATH,
6864 # but as the default location of the library.
6865 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6868 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6869 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6870 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6871 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6873 # hardcode_minus_L: Not really in the search PATH,
6874 # but as the default location of the library.
6875 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6881 irix5* | irix6* | nonstopux*)
6882 if test "$GCC" = yes; then
6883 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6885 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6886 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6888 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6889 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6890 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6893 netbsd* | knetbsd*-gnu)
6894 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6895 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6897 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6899 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6900 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6901 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6905 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6906 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6907 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6908 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6909 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6913 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6914 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6915 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6916 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6917 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6918 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6921 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6922 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6923 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6926 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6927 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6934 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6935 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6936 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6937 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6938 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6942 if test "$GCC" = yes; then
6943 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6944 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6946 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6947 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6949 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6950 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6953 osf4* | osf5*) # as osf3* with the addition of -msym flag
6954 if test "$GCC" = yes; then
6955 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6956 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6957 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6959 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6960 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6961 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6962 $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'
6964 # Both c and cxx compiler support -rpath directly
6965 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6967 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6971 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6972 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6973 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6974 runpath_var=LD_RUN_PATH
6975 hardcode_runpath_var=yes
6979 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6980 if test "$GCC" = yes; then
6981 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6982 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6983 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6985 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6986 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6987 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6989 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6990 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6992 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6993 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6994 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6996 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7000 if test "x$host_vendor" = xsequent; then
7001 # Use $CC to link under sequent, because it throws in some extra .o
7002 # files that make .init and .fini sections work.
7003 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7005 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7007 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7008 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7009 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7010 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7014 case $host_vendor in
7016 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7017 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7020 ## LD is ld it makes a PLAMLIB
7021 ## CC just makes a GrossModule.
7022 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7023 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7024 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7027 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7028 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7031 runpath_var='LD_RUN_PATH'
7032 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7036 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7037 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7038 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7042 if test -d /usr/nec; then
7043 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7044 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7045 runpath_var=LD_RUN_PATH
7046 hardcode_runpath_var=yes
7047 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7052 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7053 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7054 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7055 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7056 hardcode_runpath_var=yes
7057 runpath_var=LD_RUN_PATH
7060 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
7061 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
7062 if test "$GCC" = yes; then
7063 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7065 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7067 runpath_var='LD_RUN_PATH'
7068 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7072 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7073 # $CC -shared without GNU ld will not create a library from C++
7074 # object files and a static libstdc++, better avoid it by now
7075 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7076 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7077 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7078 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7079 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7080 runpath_var='LD_RUN_PATH'
7084 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7085 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7086 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7090 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7095 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7096 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7098 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7099 if test "$GCC" = yes; then
7100 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7104 # Do we need to explicitly link libc?
7106 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7108 # Assume -lc should be added
7109 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7111 if test "$enable_shared" = yes && test "$GCC" = yes; then
7112 case $_LT_AC_TAGVAR(archive_cmds, $1) in
7114 # FIXME: we may have to deal with multi-command sequences.
7117 # Test whether the compiler implicitly links with -lc since on some
7118 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7119 # to ld, don't add -lc before -lgcc.
7120 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7122 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7124 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7127 libobjs=conftest.$ac_objext
7129 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7135 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7136 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7137 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7139 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7141 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7143 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7145 cat conftest.err 1>&5
7148 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7154 ])# AC_LIBTOOL_PROG_LD_SHLIBS
7157 # _LT_AC_FILE_LTDLL_C
7158 # -------------------
7159 # Be careful that the start marker always follows a newline.
7160 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7161 # /* ltdll.c starts here */
7162 # #define WIN32_LEAN_AND_MEAN
7163 # #include <windows.h>
7164 # #undef WIN32_LEAN_AND_MEAN
7165 # #include <stdio.h>
7167 # #ifndef __CYGWIN__
7168 # # ifdef __CYGWIN32__
7169 # # define __CYGWIN__ __CYGWIN32__
7173 # #ifdef __cplusplus
7176 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7177 # #ifdef __cplusplus
7182 # #include <cygwin/cygwin_dll.h>
7183 # DECLARE_CYGWIN_DLL( DllMain );
7185 # HINSTANCE __hDllInstance_base;
7188 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7190 # __hDllInstance_base = hInst;
7193 # /* ltdll.c ends here */
7194 ])# _LT_AC_FILE_LTDLL_C
7197 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7198 # ---------------------------------
7199 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7203 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
7204 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7205 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7206 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7207 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7208 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
7209 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
7211 # This is just to silence aclocal about the macro not being used
7212 ifelse([AC_DISABLE_FAST_INSTALL])
7214 AC_DEFUN([LT_AC_PROG_GCJ],
7215 [AC_CHECK_TOOL(GCJ, gcj, no)
7216 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7220 AC_DEFUN([LT_AC_PROG_RC],
7221 [AC_CHECK_TOOL(RC, windres, no)
7224 # NOTE: This macro has been submitted for inclusion into #
7225 # GNU Autoconf as AC_PROG_SED. When it is available in #
7226 # a released version of Autoconf we should remove this #
7227 # macro and use it instead. #
7230 # Check for a fully-functional sed program, that truncates
7231 # as few characters as possible. Prefer GNU sed if found.
7232 AC_DEFUN([LT_AC_PROG_SED],
7233 [AC_MSG_CHECKING([for a sed that does not truncate output])
7234 AC_CACHE_VAL(lt_cv_path_SED,
7235 [# Loop through the user's path and test for sed and gsed.
7236 # Then use that list of sed's as ones to test for truncation.
7237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7241 test -z "$as_dir" && as_dir=.
7242 for lt_ac_prog in sed gsed; do
7243 for ac_exec_ext in '' $ac_executable_extensions; do
7244 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7245 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7252 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7253 # along with /bin/sed that truncates output.
7254 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7255 test ! -f $lt_ac_sed && break
7256 cat /dev/null > conftest.in
7258 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7259 # Check for GNU sed and select it if it is found.
7260 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7261 lt_cv_path_SED=$lt_ac_sed
7265 cat conftest.in conftest.in >conftest.tmp
7266 mv conftest.tmp conftest.in
7267 cp conftest.in conftest.nl
7269 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7270 cmp -s conftest.out conftest.nl || break
7271 # 10000 chars as input seems more than enough
7272 test $lt_ac_count -gt 10 && break
7273 lt_ac_count=`expr $lt_ac_count + 1`
7274 if test $lt_ac_count -gt $lt_ac_max; then
7275 lt_ac_max=$lt_ac_count
7276 lt_cv_path_SED=$lt_ac_sed
7282 AC_MSG_RESULT([$SED])
7285 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
7286 dnl The program must properly implement --version.
7287 AC_DEFUN([AM_MISSING_PROG],
7288 [AC_MSG_CHECKING(for working $2)
7289 # Run test in a subshell; some versions of sh will print an error if
7290 # an executable is not found, even if stderr is redirected.
7291 # Redirect stdin to placate older versions of autoconf. Sigh.
7292 if ($2 --version) < /dev/null > /dev/null 2>&1; then
7294 AC_MSG_RESULT(found)
7297 AC_MSG_RESULT(missing)