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/asn1.h>
156 #include <ucd-snmp/snmp.h>
157 #include <ucd-snmp/snmp_impl.h>],
159 SNMP_INCLUDE="";ucdsnmp=yes,
163 dnl # If not, look for it in a number of directories and in ucd-snmp.
165 if test "x$ucdsnmp" = "x"; then
167 for try in /usr/include /usr/local/include $snmp_include_dir; do
168 CFLAGS="$old_CFLAGS -I$try"
170 #ifdef HAVE_SYS_TYPES_H
171 #include <sys/types.h>
185 #include <ucd-snmp/asn1.h>
186 #include <ucd-snmp/snmp.h>
187 #include <ucd-snmp/snmp_impl.h>],
189 SNMP_INCLUDE="-I$try";ucdsnmp=yes,
191 if test "x$ucdsnmp" != "x"; then
198 if test "x$ucdsnmp" = "x"; then
200 for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $snmp_include_dir; do
201 CFLAGS="$old_CFLAGS -I$try"
203 dnl # First, see if we can build it WITHOUT using any special includes and without ucd-snmp
206 #ifdef HAVE_SYS_TYPES_H
207 #include <sys/types.h>
223 #include <snmp_impl.h>],
225 SNMP_INCLUDE="";ucdsnmp=no,
227 if test "x$ucdsnmp" != "x"; then
235 dnl # If not, look for it in a number of directories and without ucd-snmp
237 if test "x$ucdsnmp" = "x"; then
239 for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $snmp_include_dir; do
240 CFLAGS="$old_CFLAGS -I$try"
242 #ifdef HAVE_SYS_TYPES_H
243 #include <sys/types.h>
259 #include <snmp_impl.h>],
261 SNMP_INCLUDE="-I$try";ucdsnmp=no,
263 if test "x$ucdsnmp" != "x"; then
270 if test "x$ucdsnmp" = "x"; then
273 if test "x$ucdsnmp" = "xyes"; then
274 AC_MSG_RESULT((ucd-snmp)yes)
275 AC_DEFINE(HAVE_UCD_SNMP_ASN1_SNMP_SNMPIMPL_H)
278 AC_DEFINE(HAVE_ASN1_SNMP_SNMPIMPL_H)
281 dnl # Now do the same thing, looking for the SNMP library directory
283 AC_MSG_CHECKING([for snmp_build_var_op in -lsnmp])
286 dnl # First, see if we can build it WITHOUT using any special includes
289 LIBS="$old_LIBS -lsnmp"
290 AC_TRY_LINK([extern char snmp_build_var_op();],
291 [ snmp_build_var_op()],
295 if test "x$SNMP_LIBS" = "x"; then
296 for try in /usr/lib /usr/local/lib /usr/local/snmp/lib $snmp_lib_dir; do
297 LIBS="$old_LIBS -L$try -lsnmp"
298 AC_TRY_LINK([extern char snmp_build_var_op();],
299 [ snmp_build_var_op()],
300 SNMP_LIBS="-L$try -lsnmp",
302 if test "x$SNMP_LIBS" != "x"; then
306 dnl # That didn't work. Try adding the '-lcrypto' line.
307 dnl # Some SNMP libraries are linked against SSL...
309 LIBS="$old_LIBS -L$try -lsnmp -lcrypto"
310 AC_TRY_LINK([extern char snmp_build_var_op();],
311 [ snmp_build_var_op()],
312 SNMP_LIBS="-L$try -lsnmp -lcrypto",
314 if test "x$SNMP_LIBS" != "x"; then
322 dnl # If one or the other isn't found, disable them both..
323 dnl # If both are found, enable them both.
326 if test "x$SNMP_LIBS" = "x"; then
332 AC_DEFINE(HAVE_LIBSNMP)
339 dnl # Locate the directory in which a particular file is found.
341 dnl # Usage: FR_LOCATE_DIR(MYSQLLIB_DIR, libmysqlclient.a)
343 dnl # Defines the variable MYSQLLIB_DIR to be the directory(s) in
344 dnl # which the file libmysqlclient.a is to be found.
347 AC_DEFUN(FR_LOCATE_DIR,
349 dnl # If we have the program 'locate', then the problem of finding a
350 dnl # particular file becomes MUCH easier.
354 dnl # No 'locate' defined, do NOT do anything.
356 if test "x$LOCATE" != "x"; then
358 dnl # Root through a series of directories, looking for the given file.
363 for x in `${LOCATE} $file 2>/dev/null`; do
365 dnl # When asked for 'foo', locate will also find 'foo_bar', which we
366 dnl # don't want. We want that EXACT filename.
368 dnl # We ALSO want to be able to look for files like 'mysql/mysql.h',
369 dnl # and properly match them, too. So we try to strip off the last
370 dnl # part of the filename, using the name of the file we're looking
371 dnl # for. If we CANNOT strip it off, then the name will be unchanged.
373 base=`echo $x | sed "s%/${file}%%"`
374 if test "x$x" = "x$base"; then
378 dir=`${DIRNAME} $x 2>/dev/null`
380 dnl # Exclude a number of directories.
382 exclude=`echo ${dir} | ${GREP} /home`
383 if test "x$exclude" != "x"; then
388 dnl # OK, we have an exact match. Let's be sure that we only find ONE
389 dnl # matching directory.
391 already=`echo \$$1 ${DIRS} | ${GREP} ${dir}`
392 if test "x$already" = "x"; then
399 dnl # And remember the directory in which we found the file.
401 eval "$1=\"\$$1 $DIRS\""
405 dnl #######################################################################
407 dnl # Look for a library in a number of places.
409 AC_DEFUN(FR_SMART_CHECK_LIB, [
411 sm_lib_safe=`echo "$1" | sed 'y%./+-%__p_%'`
412 sm_func_safe=`echo "$2" | sed 'y%./+-%__p_%'`
413 AC_MSG_CHECKING([for $2 in -l$1])
419 dnl # Try to link it first, using the default libs && library paths
423 AC_TRY_LINK([extern char $2();],
427 if test "x$smart_lib" = "x"; then
428 FR_LOCATE_DIR(smart_lib_dir,[lib$1${libltdl_cv_shlibext}])
429 FR_LOCATE_DIR(smart_lib_dir,[lib$1.a])
431 for try in $smart_try_dir $smart_lib_dir /usr/local/lib/ /opt/lib; do
432 LIBS="$old_LIBS -L$try -l$1"
434 AC_TRY_LINK([extern char $2();],
436 smart_lib="-L$try -l$1")
437 if test "x$smart_lib" != "x"; then
445 dnl # Found it, set the appropriate variable.
447 if test "x$smart_lib" != "x"; then
449 eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
450 LIBS="$old_LIBS $smart_lib"
451 SMART_LIBS="$SMART_LIBS $smart_lib"
457 dnl #######################################################################
459 dnl # Look for a header file in a number of places.
461 dnl # FR_SMART_CHECK_INCLUDE(foo.h, [ #include <other.h> ])
463 AC_DEFUN(FR_SMART_CHECK_INCLUDE, [
465 ac_safe=`echo "$1" | sed 'y%./+-%__pm%'`
466 AC_MSG_CHECKING([for $1])
472 dnl # Try to link it first, using the default includes
481 if test "x$smart_include" = "x"; then
482 FR_LOCATE_DIR(smart_include_dir,$1)
484 for try in $smart_try_dir $smart_include_dir /usr/local/include/ /opt/include; do
485 CFLAGS="$old_CFLAGS -I$try"
490 smart_include="-I$try",
493 if test "x$smart_include" != "x"; then
501 dnl # Found it, set the appropriate variable.
503 if test "x$smart_include" != "x"; then
505 eval "ac_cv_header_$ac_safe=yes"
506 CFLAGS="$old_CFLAGS $smart_include"
507 SMART_CFLAGS="$SMART_CFLAGS $smart_include"
513 dnl #######################################################################
515 dnl # Look for a header file in a number of places.
517 dnl # Usage: FR_CHECK_STRUCT_HAS_MEMBER([#include <foo.h>], [struct foo], member)
518 dnl # If the member is defined, then the variable
519 dnl # ac_cv_type_struct_foo_has_member is set to 'yes'
521 AC_DEFUN(FR_CHECK_STRUCT_HAS_MEMBER, [
522 AC_MSG_CHECKING([for $3 in $2])
524 dnl BASED on 'offsetof':
525 dnl #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
531 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
534 [ int foo = offsetof($2, $3) ],
538 ac_safe_type=`echo "$2" | sed 'y% %_%'`
539 if test "x$has_element" != "x"; then
541 eval "ac_cv_type_${ac_safe_type}_has_$3=yes"
544 eval "ac_cv_type_${ac_safe_type}_has_$3="
548 AC_DEFUN(FR_LIBLTDL_PATH,
551 if test x"$enable_ltdl_install" = x"yes"; then
552 AC_CONFIG_SUBDIRS(libltdl)
555 AC_SUBST(LIBLTDLPATH)
558 # lib-prefix.m4 serial 3 (gettext-0.13)
559 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
560 dnl This file is free software, distributed under the terms of the GNU
561 dnl General Public License. As a special exception to the GNU General
562 dnl Public License, this file may be distributed as part of a program
563 dnl that contains a configuration script generated by Autoconf, under
564 dnl the same distribution terms as the rest of that program.
566 dnl From Bruno Haible.
568 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
569 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
570 dnl require excessive bracketing.
571 ifdef([AC_HELP_STRING],
572 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
573 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
575 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
576 dnl to access previously installed libraries. The basic assumption is that
577 dnl a user will want packages to use other packages he previously installed
578 dnl with the same --prefix option.
579 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
580 dnl libraries, but is otherwise very convenient.
581 AC_DEFUN([AC_LIB_PREFIX],
583 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
584 AC_REQUIRE([AC_PROG_CC])
585 AC_REQUIRE([AC_CANONICAL_HOST])
586 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
587 dnl By default, look in $includedir and $libdir.
589 AC_LIB_WITH_FINAL_PREFIX([
590 eval additional_includedir=\"$includedir\"
591 eval additional_libdir=\"$libdir\"
593 AC_LIB_ARG_WITH([lib-prefix],
594 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
595 --without-lib-prefix don't search for libraries in includedir and libdir],
597 if test "X$withval" = "Xno"; then
600 if test "X$withval" = "X"; then
601 AC_LIB_WITH_FINAL_PREFIX([
602 eval additional_includedir=\"$includedir\"
603 eval additional_libdir=\"$libdir\"
606 additional_includedir="$withval/include"
607 additional_libdir="$withval/lib"
611 if test $use_additional = yes; then
612 dnl Potentially add $additional_includedir to $CPPFLAGS.
614 dnl 1. if it's the standard /usr/include,
615 dnl 2. if it's already present in $CPPFLAGS,
616 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
617 dnl 4. if it doesn't exist as a directory.
618 if test "X$additional_includedir" != "X/usr/include"; then
620 for x in $CPPFLAGS; do
621 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
622 if test "X$x" = "X-I$additional_includedir"; then
627 if test -z "$haveit"; then
628 if test "X$additional_includedir" = "X/usr/local/include"; then
629 if test -n "$GCC"; then
635 if test -z "$haveit"; then
636 if test -d "$additional_includedir"; then
637 dnl Really add $additional_includedir to $CPPFLAGS.
638 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
643 dnl Potentially add $additional_libdir to $LDFLAGS.
645 dnl 1. if it's the standard /usr/lib,
646 dnl 2. if it's already present in $LDFLAGS,
647 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
648 dnl 4. if it doesn't exist as a directory.
649 if test "X$additional_libdir" != "X/usr/lib"; then
651 for x in $LDFLAGS; do
652 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
653 if test "X$x" = "X-L$additional_libdir"; then
658 if test -z "$haveit"; then
659 if test "X$additional_libdir" = "X/usr/local/lib"; then
660 if test -n "$GCC"; then
666 if test -z "$haveit"; then
667 if test -d "$additional_libdir"; then
668 dnl Really add $additional_libdir to $LDFLAGS.
669 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
677 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
678 dnl acl_final_exec_prefix, containing the values to which $prefix and
679 dnl $exec_prefix will expand at the end of the configure script.
680 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
682 dnl Unfortunately, prefix and exec_prefix get only finally determined
683 dnl at the end of configure.
684 if test "X$prefix" = "XNONE"; then
685 acl_final_prefix="$ac_default_prefix"
687 acl_final_prefix="$prefix"
689 if test "X$exec_prefix" = "XNONE"; then
690 acl_final_exec_prefix='${prefix}'
692 acl_final_exec_prefix="$exec_prefix"
694 acl_save_prefix="$prefix"
695 prefix="$acl_final_prefix"
696 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
697 prefix="$acl_save_prefix"
700 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
701 dnl variables prefix and exec_prefix bound to the values they will have
702 dnl at the end of the configure script.
703 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
705 acl_save_prefix="$prefix"
706 prefix="$acl_final_prefix"
707 acl_save_exec_prefix="$exec_prefix"
708 exec_prefix="$acl_final_exec_prefix"
710 exec_prefix="$acl_save_exec_prefix"
711 prefix="$acl_save_prefix"
714 # lib-link.m4 serial 4 (gettext-0.12)
715 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
716 dnl This file is free software, distributed under the terms of the GNU
717 dnl General Public License. As a special exception to the GNU General
718 dnl Public License, this file may be distributed as part of a program
719 dnl that contains a configuration script generated by Autoconf, under
720 dnl the same distribution terms as the rest of that program.
722 dnl From Bruno Haible.
724 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
725 dnl the libraries corresponding to explicit and implicit dependencies.
726 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
727 dnl augments the CPPFLAGS variable.
728 AC_DEFUN([AC_LIB_LINKFLAGS],
730 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
731 AC_REQUIRE([AC_LIB_RPATH])
732 define([Name],[translit([$1],[./-], [___])])
733 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
734 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
735 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
736 AC_LIB_LINKFLAGS_BODY([$1], [$2])
737 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
738 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
739 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
741 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
742 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
743 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
744 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
746 AC_SUBST([LTLIB]NAME)
747 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
748 dnl results of this search when this library appears as a dependency.
754 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
755 dnl searches for libname and the libraries corresponding to explicit and
756 dnl implicit dependencies, together with the specified include files and
757 dnl the ability to compile and link the specified testcode. If found, it
758 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
759 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
760 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
761 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
762 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
764 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
765 AC_REQUIRE([AC_LIB_RPATH])
766 define([Name],[translit([$1],[./-], [___])])
767 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
768 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
770 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
772 AC_LIB_LINKFLAGS_BODY([$1], [$2])
774 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
775 dnl because if the user has installed lib[]Name and not disabled its use
776 dnl via --without-lib[]Name-prefix, he wants to use it.
777 ac_save_CPPFLAGS="$CPPFLAGS"
778 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
780 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
782 LIBS="$LIBS $LIB[]NAME"
783 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
786 if test "$ac_cv_lib[]Name" = yes; then
788 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
789 AC_MSG_CHECKING([how to link with lib[]$1])
790 AC_MSG_RESULT([$LIB[]NAME])
793 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
794 dnl $INC[]NAME either.
795 CPPFLAGS="$ac_save_CPPFLAGS"
799 AC_SUBST([HAVE_LIB]NAME)
801 AC_SUBST([LTLIB]NAME)
806 dnl Determine the platform dependent parameters needed to use rpath:
807 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
808 dnl hardcode_direct, hardcode_minus_L.
809 AC_DEFUN([AC_LIB_RPATH],
811 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
812 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
813 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
814 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
815 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
816 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
817 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
823 libext="$acl_cv_libext"
824 shlibext="$acl_cv_shlibext"
825 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
826 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
827 hardcode_direct="$acl_cv_hardcode_direct"
828 hardcode_minus_L="$acl_cv_hardcode_minus_L"
829 dnl Determine whether the user wants rpath handling at all.
831 [ --disable-rpath do not hardcode runtime library paths],
835 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
836 dnl the libraries corresponding to explicit and implicit dependencies.
837 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
838 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
840 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
841 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
842 dnl By default, look in $includedir and $libdir.
844 AC_LIB_WITH_FINAL_PREFIX([
845 eval additional_includedir=\"$includedir\"
846 eval additional_libdir=\"$libdir\"
848 AC_LIB_ARG_WITH([lib$1-prefix],
849 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
850 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
852 if test "X$withval" = "Xno"; then
855 if test "X$withval" = "X"; then
856 AC_LIB_WITH_FINAL_PREFIX([
857 eval additional_includedir=\"$includedir\"
858 eval additional_libdir=\"$libdir\"
861 additional_includedir="$withval/include"
862 additional_libdir="$withval/lib"
866 dnl Search the library and its dependencies in $additional_libdir and
867 dnl $LDFLAGS. Using breadth-first-seach.
873 names_already_handled=
874 names_next_round='$1 $2'
875 while test -n "$names_next_round"; do
876 names_this_round="$names_next_round"
878 for name in $names_this_round; do
880 for n in $names_already_handled; do
881 if test "$n" = "$name"; then
886 if test -z "$already_handled"; then
887 names_already_handled="$names_already_handled $name"
888 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
889 dnl or AC_LIB_HAVE_LINKFLAGS call.
890 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
891 eval value=\"\$HAVE_LIB$uppername\"
892 if test -n "$value"; then
893 if test "$value" = yes; then
894 eval value=\"\$LIB$uppername\"
895 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
896 eval value=\"\$LTLIB$uppername\"
897 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
899 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
900 dnl that this library doesn't exist. So just drop it.
904 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
905 dnl and the already constructed $LIBNAME/$LTLIBNAME.
910 if test $use_additional = yes; then
911 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
912 found_dir="$additional_libdir"
913 found_so="$additional_libdir/lib$name.$shlibext"
914 if test -f "$additional_libdir/lib$name.la"; then
915 found_la="$additional_libdir/lib$name.la"
918 if test -f "$additional_libdir/lib$name.$libext"; then
919 found_dir="$additional_libdir"
920 found_a="$additional_libdir/lib$name.$libext"
921 if test -f "$additional_libdir/lib$name.la"; then
922 found_la="$additional_libdir/lib$name.la"
927 if test "X$found_dir" = "X"; then
928 for x in $LDFLAGS $LTLIB[]NAME; do
929 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
932 dir=`echo "X$x" | sed -e 's/^X-L//'`
933 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
935 found_so="$dir/lib$name.$shlibext"
936 if test -f "$dir/lib$name.la"; then
937 found_la="$dir/lib$name.la"
940 if test -f "$dir/lib$name.$libext"; then
942 found_a="$dir/lib$name.$libext"
943 if test -f "$dir/lib$name.la"; then
944 found_la="$dir/lib$name.la"
950 if test "X$found_dir" != "X"; then
955 if test "X$found_dir" != "X"; then
956 dnl Found the library.
957 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
958 if test "X$found_so" != "X"; then
959 dnl Linking with a shared library. We attempt to hardcode its
960 dnl directory into the executable's runpath, unless it's the
961 dnl standard /usr/lib.
962 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
963 dnl No hardcoding is needed.
964 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
966 dnl Use an explicit option to hardcode DIR into the resulting
968 dnl Potentially add DIR to ltrpathdirs.
969 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
971 for x in $ltrpathdirs; do
972 if test "X$x" = "X$found_dir"; then
977 if test -z "$haveit"; then
978 ltrpathdirs="$ltrpathdirs $found_dir"
980 dnl The hardcoding into $LIBNAME is system dependent.
981 if test "$hardcode_direct" = yes; then
982 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
983 dnl resulting binary.
984 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
986 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
987 dnl Use an explicit option to hardcode DIR into the resulting
989 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
990 dnl Potentially add DIR to rpathdirs.
991 dnl The rpathdirs will be appended to $LIBNAME at the end.
993 for x in $rpathdirs; do
994 if test "X$x" = "X$found_dir"; then
999 if test -z "$haveit"; then
1000 rpathdirs="$rpathdirs $found_dir"
1003 dnl Rely on "-L$found_dir".
1004 dnl But don't add it if it's already contained in the LDFLAGS
1005 dnl or the already constructed $LIBNAME
1007 for x in $LDFLAGS $LIB[]NAME; do
1008 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1009 if test "X$x" = "X-L$found_dir"; then
1014 if test -z "$haveit"; then
1015 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1017 if test "$hardcode_minus_L" != no; then
1018 dnl FIXME: Not sure whether we should use
1019 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1021 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1023 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1024 dnl here, because this doesn't fit in flags passed to the
1025 dnl compiler. So give up. No hardcoding. This affects only
1026 dnl very old systems.
1027 dnl FIXME: Not sure whether we should use
1028 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1030 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1036 if test "X$found_a" != "X"; then
1037 dnl Linking with a static library.
1038 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1040 dnl We shouldn't come here, but anyway it's good to have a
1042 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1045 dnl Assume the include files are nearby.
1046 additional_includedir=
1047 case "$found_dir" in
1049 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1050 additional_includedir="$basedir/include"
1053 if test "X$additional_includedir" != "X"; then
1054 dnl Potentially add $additional_includedir to $INCNAME.
1055 dnl But don't add it
1056 dnl 1. if it's the standard /usr/include,
1057 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1058 dnl 3. if it's already present in $CPPFLAGS or the already
1059 dnl constructed $INCNAME,
1060 dnl 4. if it doesn't exist as a directory.
1061 if test "X$additional_includedir" != "X/usr/include"; then
1063 if test "X$additional_includedir" = "X/usr/local/include"; then
1064 if test -n "$GCC"; then
1066 linux*) haveit=yes;;
1070 if test -z "$haveit"; then
1071 for x in $CPPFLAGS $INC[]NAME; do
1072 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1073 if test "X$x" = "X-I$additional_includedir"; then
1078 if test -z "$haveit"; then
1079 if test -d "$additional_includedir"; then
1080 dnl Really add $additional_includedir to $INCNAME.
1081 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1087 dnl Look for dependencies.
1088 if test -n "$found_la"; then
1089 dnl Read the .la file. It defines the variables
1090 dnl dlname, library_names, old_library, dependency_libs, current,
1091 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1092 save_libdir="$libdir"
1094 */* | *\\*) . "$found_la" ;;
1095 *) . "./$found_la" ;;
1097 libdir="$save_libdir"
1098 dnl We use only dependency_libs.
1099 for dep in $dependency_libs; do
1102 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1103 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1104 dnl But don't add it
1105 dnl 1. if it's the standard /usr/lib,
1106 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1107 dnl 3. if it's already present in $LDFLAGS or the already
1108 dnl constructed $LIBNAME,
1109 dnl 4. if it doesn't exist as a directory.
1110 if test "X$additional_libdir" != "X/usr/lib"; then
1112 if test "X$additional_libdir" = "X/usr/local/lib"; then
1113 if test -n "$GCC"; then
1115 linux*) haveit=yes;;
1119 if test -z "$haveit"; then
1121 for x in $LDFLAGS $LIB[]NAME; do
1122 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1123 if test "X$x" = "X-L$additional_libdir"; then
1128 if test -z "$haveit"; then
1129 if test -d "$additional_libdir"; then
1130 dnl Really add $additional_libdir to $LIBNAME.
1131 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1135 for x in $LDFLAGS $LTLIB[]NAME; do
1136 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1137 if test "X$x" = "X-L$additional_libdir"; then
1142 if test -z "$haveit"; then
1143 if test -d "$additional_libdir"; then
1144 dnl Really add $additional_libdir to $LTLIBNAME.
1145 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1152 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1153 if test "$enable_rpath" != no; then
1154 dnl Potentially add DIR to rpathdirs.
1155 dnl The rpathdirs will be appended to $LIBNAME at the end.
1157 for x in $rpathdirs; do
1158 if test "X$x" = "X$dir"; then
1163 if test -z "$haveit"; then
1164 rpathdirs="$rpathdirs $dir"
1166 dnl Potentially add DIR to ltrpathdirs.
1167 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1169 for x in $ltrpathdirs; do
1170 if test "X$x" = "X$dir"; then
1175 if test -z "$haveit"; then
1176 ltrpathdirs="$ltrpathdirs $dir"
1181 dnl Handle this in the next round.
1182 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1185 dnl Handle this in the next round. Throw away the .la's
1186 dnl directory; it is already contained in a preceding -L
1188 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1191 dnl Most likely an immediate library name.
1192 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1193 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1199 dnl Didn't find the library; assume it is in the system directories
1200 dnl known to the linker and runtime loader. (All the system
1201 dnl directories known to the linker should also be known to the
1202 dnl runtime loader, otherwise the system is severely misconfigured.)
1203 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1204 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1210 if test "X$rpathdirs" != "X"; then
1211 if test -n "$hardcode_libdir_separator"; then
1212 dnl Weird platform: only the last -rpath option counts, the user must
1213 dnl pass all path elements in one option. We can arrange that for a
1214 dnl single library, but not when more than one $LIBNAMEs are used.
1216 for found_dir in $rpathdirs; do
1217 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1219 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1220 acl_save_libdir="$libdir"
1222 eval flag=\"$hardcode_libdir_flag_spec\"
1223 libdir="$acl_save_libdir"
1224 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1226 dnl The -rpath options are cumulative.
1227 for found_dir in $rpathdirs; do
1228 acl_save_libdir="$libdir"
1230 eval flag=\"$hardcode_libdir_flag_spec\"
1231 libdir="$acl_save_libdir"
1232 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1236 if test "X$ltrpathdirs" != "X"; then
1237 dnl When using libtool, the option that works for both libraries and
1238 dnl executables is -R. The -R options are cumulative.
1239 for found_dir in $ltrpathdirs; do
1240 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1245 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1246 dnl unless already present in VAR.
1247 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1248 dnl contains two or three consecutive elements that belong together.
1249 AC_DEFUN([AC_LIB_APPENDTOVAR],
1251 for element in [$2]; do
1254 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1255 if test "X$x" = "X$element"; then
1260 if test -z "$haveit"; then
1261 [$1]="${[$1]}${[$1]:+ }$element"
1266 # lib-ld.m4 serial 3 (gettext-0.13)
1267 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1268 dnl This file is free software, distributed under the terms of the GNU
1269 dnl General Public License. As a special exception to the GNU General
1270 dnl Public License, this file may be distributed as part of a program
1271 dnl that contains a configuration script generated by Autoconf, under
1272 dnl the same distribution terms as the rest of that program.
1274 dnl Subroutines of libtool.m4,
1275 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1276 dnl with libtool.m4.
1278 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1279 AC_DEFUN([AC_LIB_PROG_LD_GNU],
1280 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
1281 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1282 case `$LD -v 2>&1 </dev/null` in
1283 *GNU* | *'with BFD'*)
1284 acl_cv_prog_gnu_ld=yes ;;
1286 acl_cv_prog_gnu_ld=no ;;
1288 with_gnu_ld=$acl_cv_prog_gnu_ld
1291 dnl From libtool-1.4. Sets the variable LD.
1292 AC_DEFUN([AC_LIB_PROG_LD],
1293 [AC_ARG_WITH(gnu-ld,
1294 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1295 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1296 AC_REQUIRE([AC_PROG_CC])dnl
1297 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1298 # Prepare PATH_SEPARATOR.
1299 # The user is always right.
1300 if test "${PATH_SEPARATOR+set}" != set; then
1301 echo "#! /bin/sh" >conf$$.sh
1302 echo "exit 0" >>conf$$.sh
1304 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1312 if test "$GCC" = yes; then
1313 # Check if gcc -print-prog-name=ld gives a path.
1314 AC_MSG_CHECKING([for ld used by GCC])
1317 # gcc leaves a trailing carriage return which upsets mingw
1318 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1320 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1323 # Accept absolute paths.
1324 [[\\/]* | [A-Za-z]:[\\/]*)]
1325 [re_direlt='/[^/][^/]*/\.\./']
1326 # Canonicalize the path of ld
1327 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1328 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1329 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1331 test -z "$LD" && LD="$ac_prog"
1334 # If it fails, then pretend we aren't using GCC.
1338 # If it is relative, then search for the first ld in PATH.
1342 elif test "$with_gnu_ld" = yes; then
1343 AC_MSG_CHECKING([for GNU ld])
1345 AC_MSG_CHECKING([for non-GNU ld])
1347 AC_CACHE_VAL(acl_cv_path_LD,
1348 [if test -z "$LD"; then
1349 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1350 for ac_dir in $PATH; do
1351 test -z "$ac_dir" && ac_dir=.
1352 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1353 acl_cv_path_LD="$ac_dir/$ac_prog"
1354 # Check to see if the program is GNU ld. I'd rather use --version,
1355 # but apparently some GNU ld's only accept -v.
1356 # Break only if it was the GNU/non-GNU ld that we prefer.
1357 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
1358 *GNU* | *'with BFD'*)
1359 test "$with_gnu_ld" != no && break ;;
1361 test "$with_gnu_ld" != yes && break ;;
1367 acl_cv_path_LD="$LD" # Let the user override the test with a path.
1369 LD="$acl_cv_path_LD"
1370 if test -n "$LD"; then
1375 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1379 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1381 # serial 47 AC_PROG_LIBTOOL
1382 # Debian $Rev: 203 $
1385 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1386 # -----------------------------------------------------------
1387 # If this macro is not defined by Autoconf, define it here.
1388 m4_ifdef([AC_PROVIDE_IFELSE],
1390 [m4_define([AC_PROVIDE_IFELSE],
1391 [m4_ifdef([AC_PROVIDE_$1],
1397 AC_DEFUN([AC_PROG_LIBTOOL],
1398 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1399 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1400 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1401 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1403 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1405 dnl And a similar setup for Fortran 77 support
1406 AC_PROVIDE_IFELSE([AC_PROG_F77],
1408 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1411 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1412 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1413 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1414 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1416 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1418 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1420 [ifdef([AC_PROG_GCJ],
1421 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1422 ifdef([A][M_PROG_GCJ],
1423 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1424 ifdef([LT_AC_PROG_GCJ],
1425 [define([LT_AC_PROG_GCJ],
1426 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1427 ])])# AC_PROG_LIBTOOL
1432 AC_DEFUN([_AC_PROG_LIBTOOL],
1433 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1434 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1435 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1436 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1438 # This can be used to rebuild libtool when needed
1439 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1441 # Always use our own libtool.
1442 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1443 AC_SUBST(LIBTOOL)dnl
1445 # Prevent multiple expansion
1446 define([AC_PROG_LIBTOOL], [])
1447 ])# _AC_PROG_LIBTOOL
1452 AC_DEFUN([AC_LIBTOOL_SETUP],
1454 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1455 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1456 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1457 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1458 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1459 AC_REQUIRE([AC_PROG_CC])dnl
1460 AC_REQUIRE([AC_PROG_LD])dnl
1461 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1462 AC_REQUIRE([AC_PROG_NM])dnl
1464 AC_REQUIRE([AC_PROG_LN_S])dnl
1465 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1466 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1467 AC_REQUIRE([AC_OBJEXT])dnl
1468 AC_REQUIRE([AC_EXEEXT])dnl
1471 AC_LIBTOOL_SYS_MAX_CMD_LEN
1472 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1475 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1476 _LT_AC_PROG_ECHO_BACKSLASH
1480 # AIX sometimes has problems with the GCC collect2 program. For some
1481 # reason, if we set the COLLECT_NAMES environment variable, the problems
1482 # vanish in a puff of smoke.
1483 if test "X${COLLECT_NAMES+set}" != Xset; then
1485 export COLLECT_NAMES
1490 # Sed substitution that helps us do robust quoting. It backslashifies
1491 # metacharacters that are still active within double-quoted strings.
1492 Xsed='sed -e s/^X//'
1493 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1495 # Same as above, but do not quote variable references.
1496 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1498 # Sed substitution to delay expansion of an escaped shell variable in a
1499 # double_quote_subst'ed string.
1500 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1502 # Sed substitution to avoid accidental globbing in evaled expressions
1503 no_glob_subst='s/\*/\\\*/g'
1509 default_ofile=libtool
1510 can_build_shared=yes
1512 # All known linkers require a `.a' archive for static linking (except M$VC,
1513 # which needs '.lib').
1515 ltmain="$ac_aux_dir/ltmain.sh"
1516 ofile="$default_ofile"
1517 with_gnu_ld="$lt_cv_prog_gnu_ld"
1519 AC_CHECK_TOOL(AR, ar, false)
1520 AC_CHECK_TOOL(RANLIB, ranlib, :)
1521 AC_CHECK_TOOL(STRIP, strip, :)
1524 old_CFLAGS="$CFLAGS"
1526 # Set sane defaults for various variables
1527 test -z "$AR" && AR=ar
1528 test -z "$AR_FLAGS" && AR_FLAGS=cru
1529 test -z "$AS" && AS=as
1530 test -z "$CC" && CC=cc
1531 test -z "$LTCC" && LTCC=$CC
1532 test -z "$DLLTOOL" && DLLTOOL=dlltool
1533 test -z "$LD" && LD=ld
1534 test -z "$LN_S" && LN_S="ln -s"
1535 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1536 test -z "$NM" && NM=nm
1537 test -z "$SED" && SED=sed
1538 test -z "$OBJDUMP" && OBJDUMP=objdump
1539 test -z "$RANLIB" && RANLIB=:
1540 test -z "$STRIP" && STRIP=:
1541 test -z "$ac_objext" && ac_objext=o
1543 # Determine commands to create old-style static archives.
1544 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1545 old_postinstall_cmds='chmod 644 $oldlib'
1546 old_postuninstall_cmds=
1548 if test -n "$RANLIB"; then
1551 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1554 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1557 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1560 # Only perform the check for file, if the check method requires it
1561 case $deplibs_check_method in
1563 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1569 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1570 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1571 enable_win32_dll=yes, enable_win32_dll=no)
1573 AC_ARG_ENABLE([libtool-lock],
1574 [AC_HELP_STRING([--disable-libtool-lock],
1575 [avoid locking (might break parallel builds)])])
1576 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1579 [AC_HELP_STRING([--with-pic],
1580 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1581 [pic_mode="$withval"],
1583 test -z "$pic_mode" && pic_mode=default
1585 # Use C for the default configuration in the libtool script
1587 AC_LIBTOOL_LANG_C_CONFIG
1589 ])# AC_LIBTOOL_SETUP
1592 # _LT_AC_SYS_COMPILER
1593 # -------------------
1594 AC_DEFUN([_LT_AC_SYS_COMPILER],
1595 [AC_REQUIRE([AC_PROG_CC])dnl
1597 # If no C compiler was specified, use CC.
1600 # Allow CC to be a program name with arguments.
1602 ])# _LT_AC_SYS_COMPILER
1605 # _LT_AC_SYS_LIBPATH_AIX
1606 # ----------------------
1607 # Links a minimal program and checks the executable
1608 # for the system default hardcoded library path. In most cases,
1609 # this is /usr/lib:/lib, but when the MPI compilers are used
1610 # the location of the communication and MPI libs are included too.
1611 # If we don't find anything, use the default library path according
1612 # to the aix ld manual.
1613 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1614 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1615 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1617 # Check for a 64-bit object if we didn't find anything.
1618 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; }
1620 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1621 ])# _LT_AC_SYS_LIBPATH_AIX
1624 # _LT_AC_SHELL_INIT(ARG)
1625 # ----------------------
1626 AC_DEFUN([_LT_AC_SHELL_INIT],
1627 [ifdef([AC_DIVERSION_NOTICE],
1628 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1629 [AC_DIVERT_PUSH(NOTICE)])
1632 ])# _LT_AC_SHELL_INIT
1635 # _LT_AC_PROG_ECHO_BACKSLASH
1636 # --------------------------
1637 # Add some code to the start of the generated configure script which
1638 # will find an echo command which doesn't interpret backslashes.
1639 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1640 [_LT_AC_SHELL_INIT([
1641 # Check that we are running under the correct shell.
1642 SHELL=${CONFIG_SHELL-/bin/sh}
1646 # Remove one level of quotation (which was required for Make).
1647 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1652 if test "X[$]1" = X--no-reexec; then
1653 # Discard the --no-reexec flag, and continue.
1655 elif test "X[$]1" = X--fallback-echo; then
1656 # Avoid inline document here, it may be left over
1658 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1659 # Yippee, $echo works!
1662 # Restart under the correct shell.
1663 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1666 if test "X[$]1" = X--fallback-echo; then
1667 # used as fallback echo
1675 # The HP-UX ksh and POSIX shell print the target directory to stdout
1677 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1679 if test -z "$ECHO"; then
1680 if test "X${echo_test_string+set}" != Xset; then
1681 # find a string as large as possible, as long as the shell can cope with it
1682 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1683 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1684 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1685 echo_test_string="`eval $cmd`" &&
1686 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1693 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1694 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1695 test "X$echo_testing_string" = "X$echo_test_string"; then
1698 # The Solaris, AIX, and Digital Unix default echo programs unquote
1699 # backslashes. This makes it impossible to quote backslashes using
1700 # echo "$something" | sed 's/\\/\\\\/g'
1702 # So, first we look for a working echo in the user's PATH.
1704 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1705 for dir in $PATH /usr/ucb; do
1707 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1708 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1709 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1710 test "X$echo_testing_string" = "X$echo_test_string"; then
1717 if test "X$echo" = Xecho; then
1718 # We didn't find a better echo, so look for alternatives.
1719 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1720 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1721 test "X$echo_testing_string" = "X$echo_test_string"; then
1722 # This shell has a builtin print -r that does the trick.
1724 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1725 test "X$CONFIG_SHELL" != X/bin/ksh; then
1726 # If we have ksh, try running configure again with it.
1727 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1728 export ORIGINAL_CONFIG_SHELL
1729 CONFIG_SHELL=/bin/ksh
1731 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1735 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1736 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1737 test "X$echo_testing_string" = "X$echo_test_string"; then
1738 # Cool, printf works
1740 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1741 test "X$echo_testing_string" = 'X\t' &&
1742 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1743 test "X$echo_testing_string" = "X$echo_test_string"; then
1744 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1746 SHELL="$CONFIG_SHELL"
1748 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1749 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1750 test "X$echo_testing_string" = 'X\t' &&
1751 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1752 test "X$echo_testing_string" = "X$echo_test_string"; then
1753 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1755 # maybe with a smaller string...
1758 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1759 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1766 if test "$prev" != 'sed 50q "[$]0"'; then
1767 echo_test_string=`eval $prev`
1768 export echo_test_string
1769 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1771 # Oops. We lost completely, so just stick with echo.
1780 # Copy echo and quote the copy suitably for passing to libtool from
1781 # the Makefile, instead of quoting the original, which is used later.
1783 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1784 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1788 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1793 AC_DEFUN([_LT_AC_LOCK],
1794 [AC_ARG_ENABLE([libtool-lock],
1795 [AC_HELP_STRING([--disable-libtool-lock],
1796 [avoid locking (might break parallel builds)])])
1797 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1799 # Some flags need to be propagated to the compiler or linker for good
1803 # Find out which ABI we are using.
1804 echo 'int i;' > conftest.$ac_ext
1805 if AC_TRY_EVAL(ac_compile); then
1806 case `/usr/bin/file conftest.$ac_objext` in
1818 # Find out which ABI we are using.
1819 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1820 if AC_TRY_EVAL(ac_compile); then
1821 if test "$lt_cv_prog_gnu_ld" = yes; then
1822 case `/usr/bin/file conftest.$ac_objext` in
1824 LD="${LD-ld} -melf32bsmip"
1827 LD="${LD-ld} -melf32bmipn32"
1830 LD="${LD-ld} -melf64bmip"
1834 case `/usr/bin/file conftest.$ac_objext` in
1850 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1851 # Find out which ABI we are using.
1852 echo 'int i;' > conftest.$ac_ext
1853 if AC_TRY_EVAL(ac_compile); then
1854 case "`/usr/bin/file conftest.o`" in
1858 LD="${LD-ld} -m elf_i386"
1860 ppc64-*linux*|powerpc64-*linux*)
1861 LD="${LD-ld} -m elf32ppclinux"
1864 LD="${LD-ld} -m elf_s390"
1867 LD="${LD-ld} -m elf32_sparc"
1874 LD="${LD-ld} -m elf_x86_64"
1876 ppc*-*linux*|powerpc*-*linux*)
1877 LD="${LD-ld} -m elf64ppc"
1880 LD="${LD-ld} -m elf64_s390"
1883 LD="${LD-ld} -m elf64_sparc"
1893 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1894 SAVE_CFLAGS="$CFLAGS"
1895 CFLAGS="$CFLAGS -belf"
1896 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1898 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1900 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1901 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1902 CFLAGS="$SAVE_CFLAGS"
1905 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1906 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1907 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1908 AC_CHECK_TOOL(AS, as, false)
1909 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1914 need_locks="$enable_libtool_lock"
1919 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1920 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1921 # ----------------------------------------------------------------
1922 # Check whether the given compiler option works
1923 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1924 [AC_REQUIRE([LT_AC_PROG_SED])
1925 AC_CACHE_CHECK([$1], [$2],
1927 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1928 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1929 lt_compiler_flag="$3"
1930 # Insert the option either (1) after the last *FLAGS variable, or
1931 # (2) before a word containing "conftest.", or (3) at the end.
1932 # Note that $ac_compile itself does not contain backslashes and begins
1933 # with a dollar sign (not a hyphen), so the echo should work correctly.
1934 # The option is referenced via a variable to avoid confusing sed.
1935 lt_compile=`echo "$ac_compile" | $SED \
1936 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1937 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1938 -e 's:$: $lt_compiler_flag:'`
1939 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1940 (eval "$lt_compile" 2>conftest.err)
1942 cat conftest.err >&AS_MESSAGE_LOG_FD
1943 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1944 if (exit $ac_status) && test -s "$ac_outfile"; then
1945 # The compiler can only warn and ignore the option if not recognized
1946 # So say no if there are warnings
1947 if test ! -s conftest.err; then
1954 if test x"[$]$2" = xyes; then
1955 ifelse([$5], , :, [$5])
1957 ifelse([$6], , :, [$6])
1959 ])# AC_LIBTOOL_COMPILER_OPTION
1962 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1963 # [ACTION-SUCCESS], [ACTION-FAILURE])
1964 # ------------------------------------------------------------
1965 # Check whether the given compiler option works
1966 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1967 [AC_CACHE_CHECK([$1], [$2],
1969 save_LDFLAGS="$LDFLAGS"
1970 LDFLAGS="$LDFLAGS $3"
1971 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1972 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1973 # The compiler can only warn and ignore the option if not recognized
1974 # So say no if there are warnings
1975 if test -s conftest.err; then
1976 # Append any errors to the config.log.
1977 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1983 LDFLAGS="$save_LDFLAGS"
1986 if test x"[$]$2" = xyes; then
1987 ifelse([$4], , :, [$4])
1989 ifelse([$5], , :, [$5])
1991 ])# AC_LIBTOOL_LINKER_OPTION
1994 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1995 # --------------------------
1996 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1997 [# find the maximum length of command line arguments
1998 AC_MSG_CHECKING([the maximum length of command line arguments])
1999 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2005 # On DJGPP, this test can blow up pretty badly due to problems in libc
2006 # (any single argument exceeding 2000 bytes causes a buffer overrun
2007 # during glob expansion). Even if it were fixed, the result of this
2008 # check would be larger than it should be.
2009 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2013 # Under GNU Hurd, this test is not required because there is
2014 # no limit to the length of command line arguments.
2015 # Libtool will interpret -1 as no limit whatsoever
2016 lt_cv_sys_max_cmd_len=-1;
2020 # On Win9x/ME, this test blows up -- it succeeds, but takes
2021 # about 5 minutes as the teststring grows exponentially.
2022 # Worse, since 9x/ME are not pre-emptively multitasking,
2023 # you end up with a "frozen" computer, even though with patience
2024 # the test eventually succeeds (with a max line length of 256k).
2025 # Instead, let's just punt: use the minimum linelength reported by
2026 # all of the supported platforms: 8192 (on NT/2K/XP).
2027 lt_cv_sys_max_cmd_len=8192;
2031 # On AmigaOS with pdksh, this test takes hours, literally.
2032 # So we just punt and use a minimum line length of 8192.
2033 lt_cv_sys_max_cmd_len=8192;
2037 # If test is not a shell built-in, we'll probably end up computing a
2038 # maximum length that is only half of the actual maximum length, but
2040 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
2041 = "XX$teststring") >/dev/null 2>&1 &&
2042 new_result=`expr "X$teststring" : ".*" 2>&1` &&
2043 lt_cv_sys_max_cmd_len=$new_result &&
2044 test $i != 17 # 1/2 MB should be enough
2047 teststring=$teststring$teststring
2050 # Add a significant safety factor because C++ compilers can tack on massive
2051 # amounts of additional arguments before passing them to the linker.
2052 # It appears as though 1/2 is a usable value.
2053 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2057 if test -n $lt_cv_sys_max_cmd_len ; then
2058 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2062 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
2065 # _LT_AC_CHECK_DLFCN
2066 # --------------------
2067 AC_DEFUN([_LT_AC_CHECK_DLFCN],
2068 [AC_CHECK_HEADERS(dlfcn.h)dnl
2069 ])# _LT_AC_CHECK_DLFCN
2072 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2073 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2074 # ------------------------------------------------------------------
2075 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
2076 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2077 if test "$cross_compiling" = yes; then :
2080 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2081 lt_status=$lt_dlunknown
2082 cat > conftest.$ac_ext <<EOF
2083 [#line __oline__ "configure"
2084 #include "confdefs.h"
2093 # define LT_DLGLOBAL RTLD_GLOBAL
2096 # define LT_DLGLOBAL DL_GLOBAL
2098 # define LT_DLGLOBAL 0
2102 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2103 find out it does not work in some platform. */
2104 #ifndef LT_DLLAZY_OR_NOW
2106 # define LT_DLLAZY_OR_NOW RTLD_LAZY
2109 # define LT_DLLAZY_OR_NOW DL_LAZY
2112 # define LT_DLLAZY_OR_NOW RTLD_NOW
2115 # define LT_DLLAZY_OR_NOW DL_NOW
2117 # define LT_DLLAZY_OR_NOW 0
2125 extern "C" void exit (int);
2128 void fnord() { int i=42;}
2131 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2132 int status = $lt_dlunknown;
2136 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2137 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2138 /* dlclose (self); */
2144 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2145 (./conftest; exit; ) 2>/dev/null
2148 x$lt_dlno_uscore) $1 ;;
2149 x$lt_dlneed_uscore) $2 ;;
2150 x$lt_unknown|x*) $3 ;;
2153 # compilation failed
2158 ])# _LT_AC_TRY_DLOPEN_SELF
2161 # AC_LIBTOOL_DLOPEN_SELF
2162 # -------------------
2163 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2164 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2165 if test "x$enable_dlopen" != xyes; then
2166 enable_dlopen=unknown
2167 enable_dlopen_self=unknown
2168 enable_dlopen_self_static=unknown
2175 lt_cv_dlopen="load_add_on"
2177 lt_cv_dlopen_self=yes
2181 lt_cv_dlopen="LoadLibrary"
2186 lt_cv_dlopen="dlopen"
2191 # if libdl is installed we need to link against it
2192 AC_CHECK_LIB([dl], [dlopen],
2193 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2196 lt_cv_dlopen_self=yes
2201 AC_CHECK_FUNC([shl_load],
2202 [lt_cv_dlopen="shl_load"],
2203 [AC_CHECK_LIB([dld], [shl_load],
2204 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2205 [AC_CHECK_FUNC([dlopen],
2206 [lt_cv_dlopen="dlopen"],
2207 [AC_CHECK_LIB([dl], [dlopen],
2208 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2209 [AC_CHECK_LIB([svld], [dlopen],
2210 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2211 [AC_CHECK_LIB([dld], [dld_link],
2212 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2221 if test "x$lt_cv_dlopen" != xno; then
2227 case $lt_cv_dlopen in
2229 save_CPPFLAGS="$CPPFLAGS"
2230 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2232 save_LDFLAGS="$LDFLAGS"
2233 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2236 LIBS="$lt_cv_dlopen_libs $LIBS"
2238 AC_CACHE_CHECK([whether a program can dlopen itself],
2239 lt_cv_dlopen_self, [dnl
2240 _LT_AC_TRY_DLOPEN_SELF(
2241 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2242 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2245 if test "x$lt_cv_dlopen_self" = xyes; then
2246 LDFLAGS="$LDFLAGS $link_static_flag"
2247 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2248 lt_cv_dlopen_self_static, [dnl
2249 _LT_AC_TRY_DLOPEN_SELF(
2250 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2251 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2255 CPPFLAGS="$save_CPPFLAGS"
2256 LDFLAGS="$save_LDFLAGS"
2261 case $lt_cv_dlopen_self in
2262 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2263 *) enable_dlopen_self=unknown ;;
2266 case $lt_cv_dlopen_self_static in
2267 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2268 *) enable_dlopen_self_static=unknown ;;
2271 ])# AC_LIBTOOL_DLOPEN_SELF
2274 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2275 # ---------------------------------
2276 # Check to see if options -c and -o are simultaneously supported by compiler
2277 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2278 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2279 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2280 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2281 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2282 $rm -r conftest 2>/dev/null
2286 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2288 lt_compiler_flag="-o out/conftest2.$ac_objext"
2289 # Insert the option either (1) after the last *FLAGS variable, or
2290 # (2) before a word containing "conftest.", or (3) at the end.
2291 # Note that $ac_compile itself does not contain backslashes and begins
2292 # with a dollar sign (not a hyphen), so the echo should work correctly.
2293 lt_compile=`echo "$ac_compile" | $SED \
2294 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2295 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2296 -e 's:$: $lt_compiler_flag:'`
2297 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2298 (eval "$lt_compile" 2>out/conftest.err)
2300 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2301 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2302 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2304 # The compiler can only warn and ignore the option if not recognized
2305 # So say no if there are warnings
2306 if test ! -s out/conftest.err; then
2307 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2312 # SGI C++ compiler will create directory out/ii_files/ for
2313 # template instantiation
2314 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2315 $rm out/* && rmdir out
2320 ])# AC_LIBTOOL_PROG_CC_C_O
2323 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2324 # -----------------------------------------
2325 # Check to see if we can do hard links to lock some files if needed
2326 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2327 [AC_REQUIRE([_LT_AC_LOCK])dnl
2329 hard_links="nottested"
2330 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2331 # do not overwrite the value of need_locks provided by the user
2332 AC_MSG_CHECKING([if we can lock with hard links])
2335 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2337 ln conftest.a conftest.b 2>&5 || hard_links=no
2338 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2339 AC_MSG_RESULT([$hard_links])
2340 if test "$hard_links" = no; then
2341 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2347 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2352 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2353 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2354 [rm -f .libs 2>/dev/null
2355 mkdir .libs 2>/dev/null
2356 if test -d .libs; then
2359 # MS-DOS does not allow filenames that begin with a dot.
2362 rmdir .libs 2>/dev/null])
2363 objdir=$lt_cv_objdir
2364 ])# AC_LIBTOOL_OBJDIR
2367 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2368 # ----------------------------------------------
2369 # Check hardcoding attributes.
2370 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2371 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2372 _LT_AC_TAGVAR(hardcode_action, $1)=
2373 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2374 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
2375 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
2377 # We can hardcode non-existant directories.
2378 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2379 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2380 # have to relink, otherwise we might link with an installed library
2381 # when we should be linking with a yet-to-be-installed one
2382 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2383 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2384 # Linking always hardcodes the temporary library directory.
2385 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2387 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2388 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2391 # We cannot hardcode anything, or else we can only hardcode existing
2393 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2395 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2397 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2398 # Fast installation is not supported
2399 enable_fast_install=no
2400 elif test "$shlibpath_overrides_runpath" = yes ||
2401 test "$enable_shared" = no; then
2402 # Fast installation is not necessary
2403 enable_fast_install=needless
2405 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2408 # AC_LIBTOOL_SYS_LIB_STRIP
2409 # ------------------------
2410 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2413 AC_MSG_CHECKING([whether stripping libraries is possible])
2414 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2415 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2416 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2417 AC_MSG_RESULT([yes])
2419 # FIXME - insert some real tests, host_os isn't really good enough
2422 if test -n "$STRIP" ; then
2423 striplib="$STRIP -x"
2424 AC_MSG_RESULT([yes])
2434 ])# AC_LIBTOOL_SYS_LIB_STRIP
2437 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2438 # -----------------------------
2439 # PORTME Fill in your ld.so characteristics
2440 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2441 [AC_MSG_CHECKING([dynamic linker characteristics])
2443 libname_spec='lib$name'
2451 shlibpath_overrides_runpath=unknown
2453 dynamic_linker="$host_os ld.so"
2454 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2455 if test "$GCC" = yes; then
2456 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2457 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2458 # if the path contains ";" then we assume it to be the separator
2459 # otherwise default to the standard path separator (i.e. ":") - it is
2460 # assumed that no part of a normal pathname contains ";" but that should
2461 # okay in the real world where ";" in dirpaths is itself problematic.
2462 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2464 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2467 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2469 need_lib_prefix=unknown
2470 hardcode_into_libs=no
2472 # when you set need_version to no, make sure it does not cause -set_version
2473 # flags to be left without arguments
2474 need_version=unknown
2479 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2480 shlibpath_var=LIBPATH
2482 # AIX 3 has no versioning support, so we append a major version to the name.
2483 soname_spec='${libname}${release}${shared_ext}$major'
2490 hardcode_into_libs=yes
2491 if test "$host_cpu" = ia64; then
2492 # AIX 5 supports IA64
2493 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2494 shlibpath_var=LD_LIBRARY_PATH
2496 # With GCC up to 2.95.x, collect2 would create an import file
2497 # for dependence libraries. The import file would start with
2498 # the line `#! .'. This would cause the generated library to
2499 # depend on `.', always an invalid library. This was fixed in
2500 # development snapshots of GCC prior to 3.0.
2502 aix4 | aix4.[[01]] | aix4.[[01]].*)
2503 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2505 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2512 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2513 # soname into executable. Probably we can add versioning support to
2514 # collect2, so additional links can be useful in future.
2515 if test "$aix_use_runtimelinking" = yes; then
2516 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2517 # instead of lib<name>.a to let people know that these are not
2518 # typical AIX shared libraries.
2519 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2521 # We preserve .a as extension for shared libraries through AIX4.2
2522 # and later when we are not doing run time linking.
2523 library_names_spec='${libname}${release}.a $libname.a'
2524 soname_spec='${libname}${release}${shared_ext}$major'
2526 shlibpath_var=LIBPATH
2531 library_names_spec='$libname.ixlibrary $libname.a'
2532 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2533 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'
2537 library_names_spec='${libname}${shared_ext}'
2538 dynamic_linker="$host_os ld.so"
2539 shlibpath_var=LIBRARY_PATH
2545 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2546 soname_spec='${libname}${release}${shared_ext}$major'
2547 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2548 shlibpath_var=LD_LIBRARY_PATH
2549 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2550 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2551 # the default ld.so.conf also contains /usr/contrib/lib and
2552 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2553 # libtool to hard-code these into programs
2556 cygwin* | mingw* | pw32*)
2557 version_type=windows
2562 case $GCC,$host_os in
2563 yes,cygwin* | yes,mingw* | yes,pw32*)
2564 library_names_spec='$libname.dll.a'
2565 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2566 postinstall_cmds='base_file=`basename \${file}`~
2567 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2568 dldir=$destdir/`dirname \$dlpath`~
2569 test -d \$dldir || mkdir -p \$dldir~
2570 $install_prog $dir/$dlname \$dldir/$dlname'
2571 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2572 dlpath=$dir/\$dldll~
2574 shlibpath_overrides_runpath=yes
2578 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2579 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2580 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2583 # MinGW DLLs use traditional 'lib' prefix
2584 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2585 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2586 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2587 # It is most probably a Windows format PATH printed by
2588 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2589 # path with ; separators, and with drive letters. We can handle the
2590 # drive letters (cygwin fileutils understands them), so leave them,
2591 # especially as we might pass files found there to a mingw objdump,
2592 # which wouldn't understand a cygwinified path. Ahh.
2593 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2595 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2599 # pw32 DLLs use 'pw' prefix rather than 'lib'
2600 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2606 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2609 dynamic_linker='Win32 ld.exe'
2610 # FIXME: first we should search . and the directory the executable is in
2614 darwin* | rhapsody*)
2615 dynamic_linker="$host_os dyld"
2619 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2620 soname_spec='${libname}${release}${major}$shared_ext'
2621 shlibpath_overrides_runpath=yes
2622 shlibpath_var=DYLD_LIBRARY_PATH
2623 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
2624 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2625 if test "$GCC" = yes; then
2626 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"`
2628 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2630 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2637 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2638 soname_spec='${libname}${release}${shared_ext}$major'
2639 shlibpath_var=LD_LIBRARY_PATH
2650 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2651 soname_spec='${libname}${release}${shared_ext}$major'
2652 shlibpath_var=LD_LIBRARY_PATH
2653 shlibpath_overrides_runpath=no
2654 hardcode_into_libs=yes
2655 dynamic_linker='GNU ld.so'
2659 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2660 version_type=freebsd-$objformat
2661 case $version_type in
2663 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2668 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2672 shlibpath_var=LD_LIBRARY_PATH
2675 shlibpath_overrides_runpath=yes
2677 freebsd3.[01]* | freebsdelf3.[01]*)
2678 shlibpath_overrides_runpath=yes
2679 hardcode_into_libs=yes
2682 shlibpath_overrides_runpath=no
2683 hardcode_into_libs=yes
2692 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2693 soname_spec='${libname}${release}${shared_ext}$major'
2694 shlibpath_var=LD_LIBRARY_PATH
2695 hardcode_into_libs=yes
2698 hpux9* | hpux10* | hpux11*)
2699 # Give a soname corresponding to the major version so that dld.sl refuses to
2700 # link against other versions.
2707 hardcode_into_libs=yes
2708 dynamic_linker="$host_os dld.so"
2709 shlibpath_var=LD_LIBRARY_PATH
2710 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2711 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2712 soname_spec='${libname}${release}${shared_ext}$major'
2713 if test "X$HPUX_IA64_MODE" = X32; then
2714 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2716 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2718 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2722 hardcode_into_libs=yes
2723 dynamic_linker="$host_os dld.sl"
2724 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2725 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2726 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2727 soname_spec='${libname}${release}${shared_ext}$major'
2728 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2729 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2733 dynamic_linker="$host_os dld.sl"
2734 shlibpath_var=SHLIB_PATH
2735 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2736 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2737 soname_spec='${libname}${release}${shared_ext}$major'
2740 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2741 postinstall_cmds='chmod 555 $lib'
2744 irix5* | irix6* | nonstopux*)
2746 nonstopux*) version_type=nonstopux ;;
2748 if test "$lt_cv_prog_gnu_ld" = yes; then
2756 soname_spec='${libname}${release}${shared_ext}$major'
2757 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2759 irix5* | nonstopux*)
2763 case $LD in # libtool.m4 will add one of these switches to LD
2764 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2765 libsuff= shlibsuff= libmagic=32-bit;;
2766 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2767 libsuff=32 shlibsuff=N32 libmagic=N32;;
2768 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2769 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2770 *) libsuff= shlibsuff= libmagic=never-match;;
2774 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2775 shlibpath_overrides_runpath=no
2776 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2777 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2778 hardcode_into_libs=yes
2781 # No shared lib support for Linux oldld, aout, or coff.
2782 linux*oldld* | linux*aout* | linux*coff*)
2786 # This must be Linux ELF.
2791 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2792 soname_spec='${libname}${release}${shared_ext}$major'
2793 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2794 shlibpath_var=LD_LIBRARY_PATH
2795 shlibpath_overrides_runpath=no
2796 # This implies no fast_install, which is unacceptable.
2797 # Some rework will be needed to allow for fast_install
2798 # before this can be enabled.
2799 hardcode_into_libs=yes
2801 # Append ld.so.conf contents to the search path
2802 if test -f /etc/ld.so.conf; then
2803 lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
2804 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2807 # We used to test for /lib/ld.so.1 and disable shared libraries on
2808 # powerpc, because MkLinux only supported shared libraries with the
2809 # GNU dynamic linker. Since this was broken with cross compilers,
2810 # most powerpc-linux boxes support dynamic linking these days and
2811 # people can always --disable-shared, the test was removed, and we
2812 # assume the GNU/Linux dynamic linker is in use.
2813 dynamic_linker='GNU/Linux ld.so'
2820 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2821 soname_spec='${libname}${release}${shared_ext}$major'
2822 shlibpath_var=LD_LIBRARY_PATH
2823 shlibpath_overrides_runpath=no
2824 hardcode_into_libs=yes
2825 dynamic_linker='GNU ld.so'
2832 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2833 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2834 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2835 dynamic_linker='NetBSD (a.out) ld.so'
2837 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2838 soname_spec='${libname}${release}${shared_ext}$major'
2839 dynamic_linker='NetBSD ld.elf_so'
2841 shlibpath_var=LD_LIBRARY_PATH
2842 shlibpath_overrides_runpath=yes
2843 hardcode_into_libs=yes
2848 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2849 shlibpath_var=LD_LIBRARY_PATH
2850 shlibpath_overrides_runpath=yes
2857 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2858 soname_spec='${libname}${release}${shared_ext}$major'
2859 shlibpath_var=LD_LIBRARY_PATH
2860 shlibpath_overrides_runpath=yes
2867 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2868 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2869 shlibpath_var=LD_LIBRARY_PATH
2870 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2872 openbsd2.[[89]] | openbsd2.[[89]].*)
2873 shlibpath_overrides_runpath=no
2876 shlibpath_overrides_runpath=yes
2880 shlibpath_overrides_runpath=yes
2885 libname_spec='$name'
2888 library_names_spec='$libname${shared_ext} $libname.a'
2889 dynamic_linker='OS/2 ld.exe'
2890 shlibpath_var=LIBPATH
2893 osf3* | osf4* | osf5*)
2897 soname_spec='${libname}${release}${shared_ext}$major'
2898 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2899 shlibpath_var=LD_LIBRARY_PATH
2900 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2901 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2906 soname_spec='${libname}${release}${shared_ext}$major'
2907 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2908 shlibpath_var=LD_LIBRARY_PATH
2915 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2916 soname_spec='${libname}${release}${shared_ext}$major'
2917 shlibpath_var=LD_LIBRARY_PATH
2918 shlibpath_overrides_runpath=yes
2919 hardcode_into_libs=yes
2920 # ldd complains unless libraries are executable
2921 postinstall_cmds='chmod +x $lib'
2926 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2927 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2928 shlibpath_var=LD_LIBRARY_PATH
2929 shlibpath_overrides_runpath=yes
2930 if test "$with_gnu_ld" = yes; then
2936 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2938 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2939 soname_spec='${libname}${release}${shared_ext}$major'
2940 shlibpath_var=LD_LIBRARY_PATH
2941 case $host_vendor in
2943 shlibpath_overrides_runpath=no
2945 export_dynamic_flag_spec='${wl}-Blargedynsym'
2946 runpath_var=LD_RUN_PATH
2954 shlibpath_overrides_runpath=no
2955 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2961 if test -d /usr/nec ;then
2963 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2964 soname_spec='$libname${shared_ext}.$major'
2965 shlibpath_var=LD_LIBRARY_PATH
2971 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2972 soname_spec='${libname}${release}${shared_ext}$major'
2973 shlibpath_var=LD_LIBRARY_PATH
2980 AC_MSG_RESULT([$dynamic_linker])
2981 test "$dynamic_linker" = no && can_build_shared=no
2982 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2987 AC_DEFUN([_LT_AC_TAGCONFIG],
2988 [AC_ARG_WITH([tags],
2989 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2990 [include additional configurations @<:@automatic@:>@])],
2991 [tagnames="$withval"])
2993 if test -f "$ltmain" && test -n "$tagnames"; then
2994 if test ! -f "${ofile}"; then
2995 AC_MSG_WARN([output file `$ofile' does not exist])
2998 if test -z "$LTCC"; then
2999 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3000 if test -z "$LTCC"; then
3001 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3003 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3007 # Extract list of available tagged configurations in $ofile.
3008 # Note that this assumes the entire list is on one line.
3009 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3011 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3012 for tagname in $tagnames; do
3014 # Check whether tagname contains only valid characters
3015 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3017 *) AC_MSG_ERROR([invalid tag name: $tagname])
3021 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3023 AC_MSG_ERROR([tag name \"$tagname\" already exists])
3026 # Update the list of available tags.
3027 if test -n "$tagname"; then
3028 echo appending configuration tag \"$tagname\" to $ofile
3032 if test -n "$CXX" && test "X$CXX" != "Xno"; then
3033 AC_LIBTOOL_LANG_CXX_CONFIG
3040 if test -n "$F77" && test "X$F77" != "Xno"; then
3041 AC_LIBTOOL_LANG_F77_CONFIG
3048 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3049 AC_LIBTOOL_LANG_GCJ_CONFIG
3056 AC_LIBTOOL_LANG_RC_CONFIG
3060 AC_MSG_ERROR([Unsupported tag name: $tagname])
3064 # Append the new tag name to the list of available tags.
3065 if test -n "$tagname" ; then
3066 available_tags="$available_tags $tagname"
3072 # Now substitute the updated list of available tags.
3073 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3074 mv "${ofile}T" "$ofile"
3078 AC_MSG_ERROR([unable to update list of available tagged configurations.])
3081 ])# _LT_AC_TAGCONFIG
3086 # enable checks for dlopen support
3087 AC_DEFUN([AC_LIBTOOL_DLOPEN],
3088 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3089 ])# AC_LIBTOOL_DLOPEN
3092 # AC_LIBTOOL_WIN32_DLL
3093 # --------------------
3094 # declare package support for building win32 dll's
3095 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3096 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3097 ])# AC_LIBTOOL_WIN32_DLL
3100 # AC_ENABLE_SHARED([DEFAULT])
3101 # ---------------------------
3102 # implement the --enable-shared flag
3103 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3104 AC_DEFUN([AC_ENABLE_SHARED],
3105 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3106 AC_ARG_ENABLE([shared],
3107 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3108 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3109 [p=${PACKAGE-default}
3111 yes) enable_shared=yes ;;
3112 no) enable_shared=no ;;
3115 # Look at the argument we got. We use all the common list separators.
3116 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3117 for pkg in $enableval; do
3119 if test "X$pkg" = "X$p"; then
3126 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3127 ])# AC_ENABLE_SHARED
3132 #- set the default shared flag to --disable-shared
3133 AC_DEFUN([AC_DISABLE_SHARED],
3134 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3135 AC_ENABLE_SHARED(no)
3136 ])# AC_DISABLE_SHARED
3139 # AC_ENABLE_STATIC([DEFAULT])
3140 # ---------------------------
3141 # implement the --enable-static flag
3142 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3143 AC_DEFUN([AC_ENABLE_STATIC],
3144 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3145 AC_ARG_ENABLE([static],
3146 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3147 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3148 [p=${PACKAGE-default}
3150 yes) enable_static=yes ;;
3151 no) enable_static=no ;;
3154 # Look at the argument we got. We use all the common list separators.
3155 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3156 for pkg in $enableval; do
3158 if test "X$pkg" = "X$p"; then
3165 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3166 ])# AC_ENABLE_STATIC
3171 # set the default static flag to --disable-static
3172 AC_DEFUN([AC_DISABLE_STATIC],
3173 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3174 AC_ENABLE_STATIC(no)
3175 ])# AC_DISABLE_STATIC
3178 # AC_ENABLE_FAST_INSTALL([DEFAULT])
3179 # ---------------------------------
3180 # implement the --enable-fast-install flag
3181 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3182 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3183 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3184 AC_ARG_ENABLE([fast-install],
3185 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3186 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3187 [p=${PACKAGE-default}
3189 yes) enable_fast_install=yes ;;
3190 no) enable_fast_install=no ;;
3192 enable_fast_install=no
3193 # Look at the argument we got. We use all the common list separators.
3194 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3195 for pkg in $enableval; do
3197 if test "X$pkg" = "X$p"; then
3198 enable_fast_install=yes
3204 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3205 ])# AC_ENABLE_FAST_INSTALL
3208 # AC_DISABLE_FAST_INSTALL
3209 # -----------------------
3210 # set the default to --disable-fast-install
3211 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3212 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3213 AC_ENABLE_FAST_INSTALL(no)
3214 ])# AC_DISABLE_FAST_INSTALL
3217 # AC_LIBTOOL_PICMODE([MODE])
3218 # --------------------------
3219 # implement the --with-pic flag
3220 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
3221 AC_DEFUN([AC_LIBTOOL_PICMODE],
3222 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3223 pic_mode=ifelse($#,1,$1,default)
3224 ])# AC_LIBTOOL_PICMODE
3229 # This is predefined starting with Autoconf 2.54, so this conditional
3230 # definition can be removed once we require Autoconf 2.54 or later.
3231 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3232 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3233 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3234 then ac_cv_prog_egrep='grep -E'
3235 else ac_cv_prog_egrep='egrep'
3237 EGREP=$ac_cv_prog_egrep
3242 # AC_PATH_TOOL_PREFIX
3243 # -------------------
3244 # find a file program which can recognise shared library
3245 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3246 [AC_REQUIRE([AC_PROG_EGREP])dnl
3247 AC_MSG_CHECKING([for $1])
3248 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3250 [[\\/*] | ?:[\\/]*])
3251 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3254 lt_save_MAGIC_CMD="$MAGIC_CMD"
3255 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3256 dnl $ac_dummy forces splitting on constant user-supplied paths.
3257 dnl POSIX.2 word splitting is done only on the output of word expansions,
3258 dnl not every word. This closes a longstanding sh security hole.
3259 ac_dummy="ifelse([$2], , $PATH, [$2])"
3260 for ac_dir in $ac_dummy; do
3262 test -z "$ac_dir" && ac_dir=.
3263 if test -f $ac_dir/$1; then
3264 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3265 if test -n "$file_magic_test_file"; then
3266 case $deplibs_check_method in
3268 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3269 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3270 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3271 $EGREP "$file_magic_regex" > /dev/null; then
3276 *** Warning: the command libtool uses to detect shared libraries,
3277 *** $file_magic_cmd, produces output that libtool cannot recognize.
3278 *** The result is that libtool may fail to recognize shared libraries
3279 *** as such. This will affect the creation of libtool libraries that
3280 *** depend on shared libraries, but programs linked with such libtool
3281 *** libraries will work regardless of this problem. Nevertheless, you
3282 *** may want to report the problem to your system manager and/or to
3283 *** bug-libtool@gnu.org
3293 MAGIC_CMD="$lt_save_MAGIC_CMD"
3296 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3297 if test -n "$MAGIC_CMD"; then
3298 AC_MSG_RESULT($MAGIC_CMD)
3302 ])# AC_PATH_TOOL_PREFIX
3307 # find a file program which can recognise a shared library
3308 AC_DEFUN([AC_PATH_MAGIC],
3309 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3310 if test -z "$lt_cv_path_MAGIC_CMD"; then
3311 if test -n "$ac_tool_prefix"; then
3312 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3322 # find the pathname to the GNU or non-GNU linker
3323 AC_DEFUN([AC_PROG_LD],
3324 [AC_ARG_WITH([gnu-ld],
3325 [AC_HELP_STRING([--with-gnu-ld],
3326 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3327 [test "$withval" = no || with_gnu_ld=yes],
3329 AC_REQUIRE([LT_AC_PROG_SED])dnl
3330 AC_REQUIRE([AC_PROG_CC])dnl
3331 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3332 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3334 if test "$GCC" = yes; then
3335 # Check if gcc -print-prog-name=ld gives a path.
3336 AC_MSG_CHECKING([for ld used by $CC])
3339 # gcc leaves a trailing carriage return which upsets mingw
3340 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3342 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3345 # Accept absolute paths.
3346 [[\\/]]* | ?:[[\\/]]*)
3347 re_direlt='/[[^/]][[^/]]*/\.\./'
3348 # Canonicalize the pathname of ld
3349 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3350 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3351 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3353 test -z "$LD" && LD="$ac_prog"
3356 # If it fails, then pretend we aren't using GCC.
3360 # If it is relative, then search for the first ld in PATH.
3364 elif test "$with_gnu_ld" = yes; then
3365 AC_MSG_CHECKING([for GNU ld])
3367 AC_MSG_CHECKING([for non-GNU ld])
3369 AC_CACHE_VAL(lt_cv_path_LD,
3370 [if test -z "$LD"; then
3371 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3372 for ac_dir in $PATH; do
3374 test -z "$ac_dir" && ac_dir=.
3375 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3376 lt_cv_path_LD="$ac_dir/$ac_prog"
3377 # Check to see if the program is GNU ld. I'd rather use --version,
3378 # but apparently some GNU ld's only accept -v.
3379 # Break only if it was the GNU/non-GNU ld that we prefer.
3380 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3381 *GNU* | *'with BFD'*)
3382 test "$with_gnu_ld" != no && break
3385 test "$with_gnu_ld" != yes && break
3392 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3395 if test -n "$LD"; then
3400 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3407 AC_DEFUN([AC_PROG_LD_GNU],
3408 [AC_REQUIRE([AC_PROG_EGREP])dnl
3409 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3410 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3411 case `$LD -v 2>&1 </dev/null` in
3412 *GNU* | *'with BFD'*)
3413 lt_cv_prog_gnu_ld=yes
3416 lt_cv_prog_gnu_ld=no
3419 with_gnu_ld=$lt_cv_prog_gnu_ld
3423 # AC_PROG_LD_RELOAD_FLAG
3424 # ----------------------
3425 # find reload flag for linker
3426 # -- PORTME Some linkers may need a different reload flag.
3427 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3428 [AC_CACHE_CHECK([for $LD option to reload object files],
3429 lt_cv_ld_reload_flag,
3430 [lt_cv_ld_reload_flag='-r'])
3431 reload_flag=$lt_cv_ld_reload_flag
3432 case $reload_flag in
3434 *) reload_flag=" $reload_flag" ;;
3436 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3437 ])# AC_PROG_LD_RELOAD_FLAG
3440 # AC_DEPLIBS_CHECK_METHOD
3441 # -----------------------
3442 # how to check for library dependencies
3443 # -- PORTME fill in with the dynamic library characteristics
3444 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3445 [AC_CACHE_CHECK([how to recognise dependent libraries],
3446 lt_cv_deplibs_check_method,
3447 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3448 lt_cv_file_magic_test_file=
3449 lt_cv_deplibs_check_method='unknown'
3450 # Need to set the preceding variable on all platforms that support
3451 # interlibrary dependencies.
3452 # 'none' -- dependencies not supported.
3453 # `unknown' -- same as none, but documents that we really don't know.
3454 # 'pass_all' -- all dependencies passed with no checks.
3455 # 'test_compile' -- check by making test program.
3456 # 'file_magic [[regex]]' -- check by looking for files in library path
3457 # which responds to the $file_magic_cmd with a given extended regex.
3458 # If you have `file' or equivalent on your system and you're not sure
3459 # whether `pass_all' will *always* work, you probably want this one.
3463 lt_cv_deplibs_check_method=pass_all
3467 lt_cv_deplibs_check_method=pass_all
3471 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3472 lt_cv_file_magic_cmd='/usr/bin/file -L'
3473 lt_cv_file_magic_test_file=/shlib/libc.so
3477 # func_win32_libid is a shell function defined in ltmain.sh
3478 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3479 lt_cv_file_magic_cmd='func_win32_libid'
3483 # Base MSYS/MinGW do not provide the 'file' command needed by
3484 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3485 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3486 lt_cv_file_magic_cmd='$OBJDUMP -f'
3489 darwin* | rhapsody*)
3490 lt_cv_deplibs_check_method=pass_all
3493 freebsd* | kfreebsd*-gnu)
3494 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3497 # Not sure whether the presence of OpenBSD here was a mistake.
3498 # Let's accept both of them until this is cleared up.
3499 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3500 lt_cv_file_magic_cmd=/usr/bin/file
3501 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3505 lt_cv_deplibs_check_method=pass_all
3510 lt_cv_deplibs_check_method=pass_all
3513 hpux10.20* | hpux11*)
3514 lt_cv_file_magic_cmd=/usr/bin/file
3517 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3518 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3521 [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]']
3522 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3525 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3526 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3531 irix5* | irix6* | nonstopux*)
3533 *-32|*"-32 ") libmagic=32-bit;;
3534 *-n32|*"-n32 ") libmagic=N32;;
3535 *-64|*"-64 ") libmagic=64-bit;;
3536 *) libmagic=never-match;;
3538 lt_cv_deplibs_check_method=pass_all
3541 # This must be Linux ELF.
3543 lt_cv_deplibs_check_method=pass_all
3546 netbsd* | knetbsd*-gnu)
3547 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3548 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3550 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3555 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3556 lt_cv_file_magic_cmd=/usr/bin/file
3557 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3561 lt_cv_deplibs_check_method=unknown
3565 lt_cv_file_magic_cmd=/usr/bin/file
3566 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3567 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3568 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3570 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3574 osf3* | osf4* | osf5*)
3575 lt_cv_deplibs_check_method=pass_all
3579 lt_cv_deplibs_check_method=pass_all
3583 lt_cv_deplibs_check_method=pass_all
3586 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3587 case $host_vendor in
3589 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]]'
3590 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3593 lt_cv_deplibs_check_method=pass_all
3596 lt_cv_file_magic_cmd='/bin/file'
3597 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3600 lt_cv_file_magic_cmd='/bin/file'
3601 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3602 lt_cv_file_magic_test_file=/lib/libc.so
3605 lt_cv_deplibs_check_method=pass_all
3610 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3611 lt_cv_deplibs_check_method=pass_all
3615 file_magic_cmd=$lt_cv_file_magic_cmd
3616 deplibs_check_method=$lt_cv_deplibs_check_method
3617 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3618 ])# AC_DEPLIBS_CHECK_METHOD
3623 # find the pathname to a BSD-compatible name lister
3624 AC_DEFUN([AC_PROG_NM],
3625 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3626 [if test -n "$NM"; then
3627 # Let the user override the test.
3630 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3631 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3633 test -z "$ac_dir" && ac_dir=.
3634 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3635 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3636 # Check to see if the nm accepts a BSD-compat flag.
3637 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3638 # nm: unknown option "B" ignored
3639 # Tru64's nm complains that /dev/null is an invalid object file
3640 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3641 */dev/null* | *'Invalid file or object type'*)
3642 lt_cv_path_NM="$tmp_nm -B"
3646 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3648 lt_cv_path_NM="$tmp_nm -p"
3652 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3653 continue # so that we can try to find one that supports BSD flags
3660 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3668 # check for math library
3669 AC_DEFUN([AC_CHECK_LIBM],
3670 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3673 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3674 # These system don't have libm, or don't need it
3677 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3678 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3681 AC_CHECK_LIB(m, cos, LIBM="-lm")
3687 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3688 # -----------------------------------
3689 # sets LIBLTDL to the link flags for the libltdl convenience library and
3690 # LTDLINCL to the include flags for the libltdl header and adds
3691 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3692 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3693 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3694 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3695 # '${top_srcdir}/' (note the single quotes!). If your package is not
3696 # flat and you're not using automake, define top_builddir and
3697 # top_srcdir appropriately in the Makefiles.
3698 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3699 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3700 case $enable_ltdl_convenience in
3701 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3702 "") enable_ltdl_convenience=yes
3703 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3705 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3706 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3707 # For backwards non-gettext consistent compatibility...
3709 ])# AC_LIBLTDL_CONVENIENCE
3712 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3713 # -----------------------------------
3714 # sets LIBLTDL to the link flags for the libltdl installable library and
3715 # LTDLINCL to the include flags for the libltdl header and adds
3716 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3717 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3718 # DIRECTORY is not provided and an installed libltdl is not found, it is
3719 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3720 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3721 # quotes!). If your package is not flat and you're not using automake,
3722 # define top_builddir and top_srcdir appropriately in the Makefiles.
3723 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3724 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3725 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3726 AC_CHECK_LIB(ltdl, lt_dlinit,
3727 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3728 [if test x"$enable_ltdl_install" = xno; then
3729 AC_MSG_WARN([libltdl not installed, but installation disabled])
3731 enable_ltdl_install=yes
3734 if test x"$enable_ltdl_install" = x"yes"; then
3735 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3736 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3737 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3739 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3743 # For backwards non-gettext consistent compatibility...
3745 ])# AC_LIBLTDL_INSTALLABLE
3750 # enable support for C++ libraries
3751 AC_DEFUN([AC_LIBTOOL_CXX],
3752 [AC_REQUIRE([_LT_AC_LANG_CXX])
3758 AC_DEFUN([_LT_AC_LANG_CXX],
3759 [AC_REQUIRE([AC_PROG_CXX])
3760 AC_REQUIRE([AC_PROG_CXXCPP])
3761 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3767 # enable support for Fortran 77 libraries
3768 AC_DEFUN([AC_LIBTOOL_F77],
3769 [AC_REQUIRE([_LT_AC_LANG_F77])
3775 AC_DEFUN([_LT_AC_LANG_F77],
3776 [AC_REQUIRE([AC_PROG_F77])
3777 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3783 # enable support for GCJ libraries
3784 AC_DEFUN([AC_LIBTOOL_GCJ],
3785 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3791 AC_DEFUN([_LT_AC_LANG_GCJ],
3792 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3793 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3794 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3795 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3796 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3797 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3798 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3804 # enable support for Windows resource files
3805 AC_DEFUN([AC_LIBTOOL_RC],
3806 [AC_REQUIRE([LT_AC_PROG_RC])
3807 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3811 # AC_LIBTOOL_LANG_C_CONFIG
3812 # ------------------------
3813 # Ensure that the configuration vars for the C compiler are
3814 # suitably defined. Those variables are subsequently used by
3815 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3816 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3817 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3821 # Source file extension for C test sources.
3824 # Object file extension for compiled C test sources.
3826 _LT_AC_TAGVAR(objext, $1)=$objext
3828 # Code to be used in simple compile tests
3829 lt_simple_compile_test_code="int some_variable = 0;\n"
3831 # Code to be used in simple link tests
3832 lt_simple_link_test_code='int main(){return(0);}\n'
3837 # Check for any special shared library compilation flags.
3839 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3840 if test "$GCC" = no; then
3843 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3847 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3848 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3849 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3851 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3852 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3858 # Check to make sure the static flag actually works.
3860 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3861 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3862 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3864 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3867 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3868 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3869 AC_LIBTOOL_PROG_CC_C_O($1)
3870 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3871 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3872 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3873 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3874 AC_LIBTOOL_SYS_LIB_STRIP
3875 AC_LIBTOOL_DLOPEN_SELF($1)
3877 # Report which librarie types wil actually be built
3878 AC_MSG_CHECKING([if libtool supports shared libraries])
3879 AC_MSG_RESULT([$can_build_shared])
3881 AC_MSG_CHECKING([whether to build shared libraries])
3882 test "$can_build_shared" = "no" && enable_shared=no
3884 # On AIX, shared libraries and static libraries use the same namespace, and
3885 # are all built from PIC.
3888 test "$enable_shared" = yes && enable_static=no
3889 if test -n "$RANLIB"; then
3890 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3891 postinstall_cmds='$RANLIB $lib'
3896 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3897 test "$enable_shared" = yes && enable_static=no
3900 darwin* | rhapsody*)
3901 if test "$GCC" = yes; then
3902 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3904 rhapsody* | darwin1.[[012]])
3905 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3908 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3909 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3911 case ${MACOSX_DEPLOYMENT_TARGET} in
3913 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3916 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3922 output_verbose_link_cmd='echo'
3923 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3924 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3925 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3926 _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}'
3927 _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}'
3928 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3929 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3930 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3931 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3932 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3934 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3938 AC_MSG_RESULT([$enable_shared])
3940 AC_MSG_CHECKING([whether to build static libraries])
3941 # Make sure either enable_shared or enable_static is yes.
3942 test "$enable_shared" = yes || enable_static=yes
3943 AC_MSG_RESULT([$enable_static])
3945 AC_LIBTOOL_CONFIG($1)
3949 ])# AC_LIBTOOL_LANG_C_CONFIG
3952 # AC_LIBTOOL_LANG_CXX_CONFIG
3953 # --------------------------
3954 # Ensure that the configuration vars for the C compiler are
3955 # suitably defined. Those variables are subsequently used by
3956 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3957 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3958 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3960 AC_REQUIRE([AC_PROG_CXX])
3961 AC_REQUIRE([AC_PROG_CXXCPP])
3963 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3964 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3965 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3966 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3967 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3968 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3969 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3970 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3971 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3972 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3973 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3974 _LT_AC_TAGVAR(module_cmds, $1)=
3975 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3976 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3977 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3978 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3979 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3980 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3982 # Dependencies to place before and after the object being linked:
3983 _LT_AC_TAGVAR(predep_objects, $1)=
3984 _LT_AC_TAGVAR(postdep_objects, $1)=
3985 _LT_AC_TAGVAR(predeps, $1)=
3986 _LT_AC_TAGVAR(postdeps, $1)=
3987 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3989 # Source file extension for C++ test sources.
3992 # Object file extension for compiled C++ test sources.
3994 _LT_AC_TAGVAR(objext, $1)=$objext
3996 # Code to be used in simple compile tests
3997 lt_simple_compile_test_code="int some_variable = 0;\n"
3999 # Code to be used in simple link tests
4000 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
4002 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4005 # Allow CC to be a program name with arguments.
4010 lt_save_with_gnu_ld=$with_gnu_ld
4011 lt_save_path_LD=$lt_cv_path_LD
4012 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4013 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4015 unset lt_cv_prog_gnu_ld
4017 if test -n "${lt_cv_path_LDCXX+set}"; then
4018 lt_cv_path_LD=$lt_cv_path_LDCXX
4022 test -z "${LDCXX+set}" || LD=$LDCXX
4025 _LT_AC_TAGVAR(compiler, $1)=$CC
4026 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4028 # We don't want -fno-exception wen compiling C++ code, so set the
4029 # no_builtin_flag separately
4030 if test "$GXX" = yes; then
4031 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4033 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4036 if test "$GXX" = yes; then
4037 # Set up default GNU C++ configuration
4041 # Check if GNU C++ uses GNU ld as the underlying linker, since the
4042 # archiving commands below assume that GNU ld is being used.
4043 if test "$with_gnu_ld" = yes; then
4044 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4045 _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'
4047 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4048 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4050 # If archive_cmds runs LD, not CC, wlarc should be empty
4051 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4052 # investigate it a little bit more. (MM)
4055 # ancient GNU ld didn't support --whole-archive et. al.
4056 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4057 grep 'no-whole-archive' > /dev/null; then
4058 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4060 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4066 # A generic and very simple default shared library creation
4067 # command for GNU C++ for the case where it uses the native
4068 # linker, instead of GNU ld. If possible, this setting should
4069 # overridden to take advantage of the native linker features on
4070 # the platform it is being used on.
4071 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4074 # Commands to make compiler produce verbose output that lists
4075 # what "hidden" libraries, object files and flags are used when
4076 # linking a shared library.
4077 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4085 # PORTME: fill in a description of your system's C++ link characteristics
4086 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4087 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4090 # FIXME: insert proper C++ library support
4091 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4094 if test "$host_cpu" = ia64; then
4095 # On IA64, the linker does run time linking by default, so we don't
4096 # have to do anything special.
4097 aix_use_runtimelinking=no
4098 exp_sym_flag='-Bexport'
4101 aix_use_runtimelinking=no
4103 # Test if we are trying to use run time linking or normal
4104 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4105 # need to do runtime linking.
4106 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4107 for ld_flag in $LDFLAGS; do
4110 aix_use_runtimelinking=yes
4117 exp_sym_flag='-bexport'
4118 no_entry_flag='-bnoentry'
4121 # When large executables or shared objects are built, AIX ld can
4122 # have problems creating the table of contents. If linking a library
4123 # or program results in "error TOC overflow" add -mminimal-toc to
4124 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4125 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4127 _LT_AC_TAGVAR(archive_cmds, $1)=''
4128 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4129 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4130 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4132 if test "$GXX" = yes; then
4133 case $host_os in aix4.[012]|aix4.[012].*)
4134 # We only want to do this on AIX 4.2 and lower, the check
4135 # below for broken collect2 doesn't work under 4.3+
4136 collect2name=`${CC} -print-prog-name=collect2`
4137 if test -f "$collect2name" && \
4138 strings "$collect2name" | grep resolve_lib_name >/dev/null
4140 # We have reworked collect2
4141 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4143 # We have old collect2
4144 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4145 # It fails to find uninstalled libraries when the uninstalled
4146 # path is not listed in the libpath. Setting hardcode_minus_L
4147 # to unsupported forces relinking
4148 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4149 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4150 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4153 shared_flag='-shared'
4156 if test "$host_cpu" = ia64; then
4157 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4158 # chokes on -Wl,-G. The following line is correct:
4161 if test "$aix_use_runtimelinking" = yes; then
4162 shared_flag='${wl}-G'
4164 shared_flag='${wl}-bM:SRE'
4169 # It seems that -bexpall does not export symbols beginning with
4170 # underscore (_), so it is better to generate a list of symbols to export.
4171 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4172 if test "$aix_use_runtimelinking" = yes; then
4173 # Warning - without using the other runtime loading flags (-brtl),
4174 # -berok will link without error, but may produce a broken library.
4175 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4176 # Determine the default libpath from the value encoded in an empty executable.
4177 _LT_AC_SYS_LIBPATH_AIX
4178 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4180 _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"
4182 if test "$host_cpu" = ia64; then
4183 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4184 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4185 _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"
4187 # Determine the default libpath from the value encoded in an empty executable.
4188 _LT_AC_SYS_LIBPATH_AIX
4189 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4190 # Warning - without using the other run time loading flags,
4191 # -berok will link without error, but may produce a broken library.
4192 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4193 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4194 # -bexpall does not export symbols beginning with underscore (_)
4195 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4196 # Exported symbols can be pulled into shared objects from archives
4197 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4198 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4199 # This is similar to how AIX traditionally builds it's shared libraries.
4200 _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'
4205 case $cc_basename in
4207 # FIXME: insert proper C++ library support
4208 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4213 cygwin* | mingw* | pw32*)
4214 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4215 # as there is no search path for DLLs.
4216 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4217 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4218 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4219 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4221 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4222 _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'
4223 # If the export-symbols file already is a .def file (1st line
4224 # is EXPORTS), use it as is; otherwise, prepend...
4225 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4226 cp $export_symbols $output_objdir/$soname.def;
4228 echo EXPORTS > $output_objdir/$soname.def;
4229 cat $export_symbols >> $output_objdir/$soname.def;
4231 $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'
4233 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4237 darwin* | rhapsody*)
4238 if test "$GXX" = yes; then
4239 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4241 rhapsody* | darwin1.[[012]])
4242 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
4245 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4246 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
4248 case ${MACOSX_DEPLOYMENT_TARGET} in
4250 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
4253 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
4259 lt_int_apple_cc_single_mod=no
4260 output_verbose_link_cmd='echo'
4261 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
4262 lt_int_apple_cc_single_mod=yes
4264 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4265 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4267 _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'
4269 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4271 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
4272 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4273 _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}'
4275 _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}'
4277 _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}'
4278 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4279 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4280 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4281 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
4282 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4284 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4289 case $cc_basename in
4291 # FIXME: insert proper C++ library support
4292 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4295 # Green Hills C++ Compiler
4296 # FIXME: insert proper C++ library support
4297 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4300 # FIXME: insert proper C++ library support
4301 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4306 # C++ shared libraries reported to be fairly broken before switch to ELF
4307 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4310 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4312 freebsd* | kfreebsd*-gnu)
4313 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4315 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4320 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4321 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4322 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4323 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4324 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4325 # but as the default
4326 # location of the library.
4328 case $cc_basename in
4330 # FIXME: insert proper C++ library support
4331 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4334 _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'
4335 # Commands to make compiler produce verbose output that lists
4336 # what "hidden" libraries, object files and flags are used when
4337 # linking a shared library.
4339 # There doesn't appear to be a way to prevent this compiler from
4340 # explicitly linking system object files so we need to strip them
4341 # from the output so that they don't get included in the library
4343 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'
4346 if test "$GXX" = yes; then
4347 _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'
4349 # FIXME: insert proper C++ library support
4350 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4356 if test $with_gnu_ld = no; then
4359 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4360 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4361 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4364 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4367 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4368 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4369 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4375 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4376 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4379 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4380 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4381 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4382 # but as the default
4383 # location of the library.
4386 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4387 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4388 # but as the default
4389 # location of the library.
4393 case $cc_basename in
4395 # FIXME: insert proper C++ library support
4396 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4401 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4404 _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'
4407 # Commands to make compiler produce verbose output that lists
4408 # what "hidden" libraries, object files and flags are used when
4409 # linking a shared library.
4411 # There doesn't appear to be a way to prevent this compiler from
4412 # explicitly linking system object files so we need to strip them
4413 # from the output so that they don't get included in the library
4415 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'
4418 if test "$GXX" = yes; then
4419 if test $with_gnu_ld = no; then
4422 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4425 _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'
4430 # FIXME: insert proper C++ library support
4431 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4437 case $cc_basename in
4440 _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'
4442 # Archives containing C++ object files must be created using
4443 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4444 # necessary to make sure instantiated templates are included
4446 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4449 if test "$GXX" = yes; then
4450 if test "$with_gnu_ld" = no; then
4451 _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'
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` -o $lib'
4456 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4459 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4460 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4463 case $cc_basename in
4465 # Kuck and Associates, Inc. (KAI) C++ Compiler
4467 # KCC will only create a shared library if the output file
4468 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4469 # to its proper name (with version) after linking.
4470 _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'
4471 _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'
4472 # Commands to make compiler produce verbose output that lists
4473 # what "hidden" libraries, object files and flags are used when
4474 # linking a shared library.
4476 # There doesn't appear to be a way to prevent this compiler from
4477 # explicitly linking system object files so we need to strip them
4478 # from the output so that they don't get included in the library
4480 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'
4482 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4483 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4485 # Archives containing C++ object files must be created using
4486 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4487 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4492 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4493 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4494 _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'
4495 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4496 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4497 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4501 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4502 _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'
4504 runpath_var=LD_RUN_PATH
4505 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4506 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4508 # Commands to make compiler produce verbose output that lists
4509 # what "hidden" libraries, object files and flags are used when
4510 # linking a shared library.
4512 # There doesn't appear to be a way to prevent this compiler from
4513 # explicitly linking system object files so we need to strip them
4514 # from the output so that they don't get included in the library
4516 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'
4521 # FIXME: insert proper C++ library support
4522 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4525 # FIXME: insert proper C++ library support
4526 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4529 case $cc_basename in
4531 # FIXME: insert proper C++ library support
4532 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4535 # FIXME: insert proper C++ library support
4536 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4540 netbsd* | knetbsd*-gnu)
4541 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4542 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4544 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4545 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4546 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4548 # Workaround some broken pre-1.5 toolchains
4549 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4552 case $cc_basename in
4554 # Kuck and Associates, Inc. (KAI) C++ Compiler
4556 # KCC will only create a shared library if the output file
4557 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4558 # to its proper name (with version) after linking.
4559 _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'
4561 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4562 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4564 # Archives containing C++ object files must be created using
4565 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4566 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4570 # Rational C++ 2.4.1
4571 # FIXME: insert proper C++ library support
4572 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4575 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4576 _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'
4578 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4579 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4581 # Commands to make compiler produce verbose output that lists
4582 # what "hidden" libraries, object files and flags are used when
4583 # linking a shared library.
4585 # There doesn't appear to be a way to prevent this compiler from
4586 # explicitly linking system object files so we need to strip them
4587 # from the output so that they don't get included in the library
4589 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'
4592 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4593 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4594 _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'
4596 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4597 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4599 # Commands to make compiler produce verbose output that lists
4600 # what "hidden" libraries, object files and flags are used when
4601 # linking a shared library.
4602 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4605 # FIXME: insert proper C++ library support
4606 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4612 case $cc_basename in
4614 # Kuck and Associates, Inc. (KAI) C++ Compiler
4616 # KCC will only create a shared library if the output file
4617 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4618 # to its proper name (with version) after linking.
4619 _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'
4621 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4622 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4624 # Archives containing C++ object files must be created using
4625 # the KAI C++ compiler.
4626 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4629 # Rational C++ 2.4.1
4630 # FIXME: insert proper C++ library support
4631 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4634 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4635 _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'
4636 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4637 echo "-hidden">> $lib.exp~
4638 $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~
4641 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4642 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4644 # Commands to make compiler produce verbose output that lists
4645 # what "hidden" libraries, object files and flags are used when
4646 # linking a shared library.
4648 # There doesn't appear to be a way to prevent this compiler from
4649 # explicitly linking system object files so we need to strip them
4650 # from the output so that they don't get included in the library
4652 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'
4655 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4656 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4657 _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'
4659 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4660 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4662 # Commands to make compiler produce verbose output that lists
4663 # what "hidden" libraries, object files and flags are used when
4664 # linking a shared library.
4665 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4668 # FIXME: insert proper C++ library support
4669 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4675 # FIXME: insert proper C++ library support
4676 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4679 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4680 case $cc_basename in
4682 # FIXME: insert proper C++ library support
4683 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4686 # FIXME: insert proper C++ library support
4687 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4692 case $cc_basename in
4695 # FIXME: insert proper C++ library support
4696 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4700 # FIXME: insert proper C++ library support
4701 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4704 # FIXME: insert proper C++ library support
4705 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4710 case $cc_basename in
4712 # Sun C++ 4.2, 5.x and Centerline C++
4713 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4714 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4715 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4716 $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'
4718 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4719 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4721 solaris2.[0-5] | solaris2.[0-5].*) ;;
4723 # The C++ compiler is used as linker so we must use $wl
4724 # flag to pass the commands to the underlying system
4726 # Supported since Solaris 2.6 (maybe 2.5.1?)
4727 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4730 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4732 # Commands to make compiler produce verbose output that lists
4733 # what "hidden" libraries, object files and flags are used when
4734 # linking a shared library.
4736 # There doesn't appear to be a way to prevent this compiler from
4737 # explicitly linking system object files so we need to strip them
4738 # from the output so that they don't get included in the library
4740 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'
4742 # Archives containing C++ object files must be created using
4743 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4744 # necessary to make sure instantiated templates are included
4746 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4749 # Green Hills C++ Compiler
4750 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4752 # The C++ compiler must be used to create the archive.
4753 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4756 # GNU C++ compiler with Solaris linker
4757 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4758 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4759 if $CC --version | grep -v '^2\.7' > /dev/null; then
4760 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4761 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4762 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4764 # Commands to make compiler produce verbose output that lists
4765 # what "hidden" libraries, object files and flags are used when
4766 # linking a shared library.
4767 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4769 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4771 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4772 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4773 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4775 # Commands to make compiler produce verbose output that lists
4776 # what "hidden" libraries, object files and flags are used when
4777 # linking a shared library.
4778 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4781 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4786 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4787 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4790 case $cc_basename in
4792 # NonStop-UX NCC 3.20
4793 # FIXME: insert proper C++ library support
4794 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4797 # FIXME: insert proper C++ library support
4798 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4803 # FIXME: insert proper C++ library support
4804 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4807 # FIXME: insert proper C++ library support
4808 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4811 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4812 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4814 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4815 _LT_AC_TAGVAR(LD, $1)="$LD"
4817 AC_LIBTOOL_POSTDEP_PREDEP($1)
4818 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4819 AC_LIBTOOL_PROG_CC_C_O($1)
4820 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4821 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4822 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4823 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4824 AC_LIBTOOL_SYS_LIB_STRIP
4825 AC_LIBTOOL_DLOPEN_SELF($1)
4827 AC_LIBTOOL_CONFIG($1)
4834 with_gnu_ldcxx=$with_gnu_ld
4835 with_gnu_ld=$lt_save_with_gnu_ld
4836 lt_cv_path_LDCXX=$lt_cv_path_LD
4837 lt_cv_path_LD=$lt_save_path_LD
4838 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4839 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4840 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4842 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4843 # ------------------------
4844 # Figure out "hidden" library dependencies from verbose
4845 # compiler output when linking a shared library.
4846 # Parse the compiler output and extract the necessary
4847 # objects, libraries and library flags.
4848 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4849 dnl we can't use the lt_simple_compile_test_code here,
4850 dnl because it contains code intended for an executable,
4851 dnl not a library. It's possible we should let each
4852 dnl tag define a new lt_????_link_test_code variable,
4853 dnl but it's only used here...
4854 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4856 void foo (void) { a = 0; }
4858 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4862 Foo (void) { a = 0; }
4867 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4875 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4878 public void bar (void) {
4884 dnl Parse the compiler output and extract the necessary
4885 dnl objects, libraries and library flags.
4886 if AC_TRY_EVAL(ac_compile); then
4887 # Parse the compiler output and extract the necessary
4888 # objects, libraries and library flags.
4890 # Sentinel used to keep track of whether or not we are before
4891 # the conftest object file.
4892 pre_test_object_deps_done=no
4894 # The `*' in the case matches for architectures that use `case' in
4895 # $output_verbose_cmd can trigger glob expansion during the loop
4896 # eval without this substitution.
4897 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4899 for p in `eval $output_verbose_link_cmd`; do
4903 # Some compilers place space between "-{L,R}" and the path.
4906 || test $p = "-R"; then
4913 if test "$pre_test_object_deps_done" = no; then
4916 # Internal compiler library paths should come after those
4917 # provided the user. The postdeps already come after the
4918 # user supplied libs so there is no need to process them.
4919 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4920 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4922 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4925 # The "-l" case would never come before the object being
4926 # linked, so don't bother handling this case.
4929 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4930 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4932 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4938 # This assumes that the test object file only shows up
4939 # once in the compiler output.
4940 if test "$p" = "conftest.$objext"; then
4941 pre_test_object_deps_done=yes
4945 if test "$pre_test_object_deps_done" = no; then
4946 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4947 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4949 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4952 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4953 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4955 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4960 *) ;; # Ignore the rest.
4968 echo "libtool.m4: error: problem compiling $1 test program"
4971 $rm -f confest.$objext
4973 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4974 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4976 ])# AC_LIBTOOL_POSTDEP_PREDEP
4978 # AC_LIBTOOL_LANG_F77_CONFIG
4979 # ------------------------
4980 # Ensure that the configuration vars for the C compiler are
4981 # suitably defined. Those variables are subsequently used by
4982 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4983 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4984 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4985 [AC_REQUIRE([AC_PROG_F77])
4986 AC_LANG_PUSH(Fortran 77)
4988 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4989 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4990 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4991 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4992 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4993 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4994 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4995 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4996 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4997 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4998 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4999 _LT_AC_TAGVAR(module_cmds, $1)=
5000 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5001 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5002 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5003 _LT_AC_TAGVAR(no_undefined_flag, $1)=
5004 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5005 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5007 # Source file extension for f77 test sources.
5010 # Object file extension for compiled f77 test sources.
5012 _LT_AC_TAGVAR(objext, $1)=$objext
5014 # Code to be used in simple compile tests
5015 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
5017 # Code to be used in simple link tests
5018 lt_simple_link_test_code=" program t\n end\n"
5020 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5023 # Allow CC to be a program name with arguments.
5027 _LT_AC_TAGVAR(compiler, $1)=$CC
5028 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
5030 AC_MSG_CHECKING([if libtool supports shared libraries])
5031 AC_MSG_RESULT([$can_build_shared])
5033 AC_MSG_CHECKING([whether to build shared libraries])
5034 test "$can_build_shared" = "no" && enable_shared=no
5036 # On AIX, shared libraries and static libraries use the same namespace, and
5037 # are all built from PIC.
5040 test "$enable_shared" = yes && enable_static=no
5041 if test -n "$RANLIB"; then
5042 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5043 postinstall_cmds='$RANLIB $lib'
5047 test "$enable_shared" = yes && enable_static=no
5050 AC_MSG_RESULT([$enable_shared])
5052 AC_MSG_CHECKING([whether to build static libraries])
5053 # Make sure either enable_shared or enable_static is yes.
5054 test "$enable_shared" = yes || enable_static=yes
5055 AC_MSG_RESULT([$enable_static])
5057 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5059 _LT_AC_TAGVAR(GCC, $1)="$G77"
5060 _LT_AC_TAGVAR(LD, $1)="$LD"
5062 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5063 AC_LIBTOOL_PROG_CC_C_O($1)
5064 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5065 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5066 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5067 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5068 AC_LIBTOOL_SYS_LIB_STRIP
5071 AC_LIBTOOL_CONFIG($1)
5075 ])# AC_LIBTOOL_LANG_F77_CONFIG
5078 # AC_LIBTOOL_LANG_GCJ_CONFIG
5079 # --------------------------
5080 # Ensure that the configuration vars for the C compiler are
5081 # suitably defined. Those variables are subsequently used by
5082 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5083 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5084 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5087 # Source file extension for Java test sources.
5090 # Object file extension for compiled Java test sources.
5092 _LT_AC_TAGVAR(objext, $1)=$objext
5094 # Code to be used in simple compile tests
5095 lt_simple_compile_test_code="class foo {}\n"
5097 # Code to be used in simple link tests
5098 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
5100 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5103 # Allow CC to be a program name with arguments.
5107 _LT_AC_TAGVAR(compiler, $1)=$CC
5109 # GCJ did not exist at the time GCC didn't implicitly link libc in.
5110 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5112 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5113 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5114 AC_LIBTOOL_PROG_CC_C_O($1)
5115 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5116 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5117 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5118 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5119 AC_LIBTOOL_SYS_LIB_STRIP
5120 AC_LIBTOOL_DLOPEN_SELF($1)
5122 AC_LIBTOOL_CONFIG($1)
5126 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
5129 # AC_LIBTOOL_LANG_RC_CONFIG
5130 # --------------------------
5131 # Ensure that the configuration vars for the Windows resource compiler are
5132 # suitably defined. Those variables are subsequently used by
5133 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5134 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5135 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5138 # Source file extension for RC test sources.
5141 # Object file extension for compiled RC test sources.
5143 _LT_AC_TAGVAR(objext, $1)=$objext
5145 # Code to be used in simple compile tests
5146 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5148 # Code to be used in simple link tests
5149 lt_simple_link_test_code="$lt_simple_compile_test_code"
5151 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5154 # Allow CC to be a program name with arguments.
5158 _LT_AC_TAGVAR(compiler, $1)=$CC
5159 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5161 AC_LIBTOOL_CONFIG($1)
5165 ])# AC_LIBTOOL_LANG_RC_CONFIG
5168 # AC_LIBTOOL_CONFIG([TAGNAME])
5169 # ----------------------------
5170 # If TAGNAME is not passed, then create an initial libtool script
5171 # with a default configuration from the untagged config vars. Otherwise
5172 # add code to config.status for appending the configuration named by
5173 # TAGNAME from the matching tagged config vars.
5174 AC_DEFUN([AC_LIBTOOL_CONFIG],
5175 [# The else clause should only fire when bootstrapping the
5176 # libtool distribution, otherwise you forgot to ship ltmain.sh
5177 # with your package, and you will get complaints that there are
5178 # no rules to generate ltmain.sh.
5179 if test -f "$ltmain"; then
5180 # See if we are running on zsh, and set the options which allow our commands through
5181 # without removal of \ escapes.
5182 if test -n "${ZSH_VERSION+set}" ; then
5183 setopt NO_GLOB_SUBST
5185 # Now quote all the things that may contain metacharacters while being
5186 # careful not to overquote the AC_SUBSTed values. We take copies of the
5187 # variables and quote the copies for generation of the libtool script.
5188 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
5190 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5191 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5192 deplibs_check_method reload_flag reload_cmds need_locks \
5193 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5194 lt_cv_sys_global_symbol_to_c_name_address \
5195 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5196 old_postinstall_cmds old_postuninstall_cmds \
5197 _LT_AC_TAGVAR(compiler, $1) \
5198 _LT_AC_TAGVAR(CC, $1) \
5199 _LT_AC_TAGVAR(LD, $1) \
5200 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5201 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5202 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5203 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5204 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5205 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5206 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5207 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5208 _LT_AC_TAGVAR(old_archive_cmds, $1) \
5209 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5210 _LT_AC_TAGVAR(predep_objects, $1) \
5211 _LT_AC_TAGVAR(postdep_objects, $1) \
5212 _LT_AC_TAGVAR(predeps, $1) \
5213 _LT_AC_TAGVAR(postdeps, $1) \
5214 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5215 _LT_AC_TAGVAR(archive_cmds, $1) \
5216 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5217 _LT_AC_TAGVAR(postinstall_cmds, $1) \
5218 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5219 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5220 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5221 _LT_AC_TAGVAR(no_undefined_flag, $1) \
5222 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5223 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5224 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5225 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5226 _LT_AC_TAGVAR(hardcode_automatic, $1) \
5227 _LT_AC_TAGVAR(module_cmds, $1) \
5228 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5229 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5230 _LT_AC_TAGVAR(exclude_expsyms, $1) \
5231 _LT_AC_TAGVAR(include_expsyms, $1); do
5234 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5235 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5236 _LT_AC_TAGVAR(archive_cmds, $1) | \
5237 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5238 _LT_AC_TAGVAR(module_cmds, $1) | \
5239 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5240 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5241 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5242 extract_expsyms_cmds | reload_cmds | finish_cmds | \
5243 postinstall_cmds | postuninstall_cmds | \
5244 old_postinstall_cmds | old_postuninstall_cmds | \
5245 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5246 # Double-quote double-evaled strings.
5247 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5250 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5256 *'\[$]0 --fallback-echo"')
5257 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5262 [cfgfile="${ofile}T"
5263 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5265 AC_MSG_NOTICE([creating $ofile])],
5268 cat <<__EOF__ >> "$cfgfile"
5272 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5273 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5274 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
5276 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5277 # Free Software Foundation, Inc.
5279 # This file is part of GNU Libtool:
5280 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5282 # This program is free software; you can redistribute it and/or modify
5283 # it under the terms of the GNU General Public License as published by
5284 # the Free Software Foundation; either version 2 of the License, or
5285 # (at your option) any later version.
5287 # This program is distributed in the hope that it will be useful, but
5288 # WITHOUT ANY WARRANTY; without even the implied warranty of
5289 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5290 # General Public License for more details.
5292 # You should have received a copy of the GNU General Public License
5293 # along with this program; if not, write to the Free Software
5294 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5296 # As a special exception to the GNU General Public License, if you
5297 # distribute this file as part of a program that contains a
5298 # configuration script generated by Autoconf, you may include it under
5299 # the same distribution terms that you use for the rest of that program.
5301 # A sed program that does not truncate output.
5304 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
5305 Xsed="$SED -e s/^X//"
5307 # The HP-UX ksh and POSIX shell print the target directory to stdout
5309 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5311 # The names of the tagged configurations supported by this script.
5314 # ### BEGIN LIBTOOL CONFIG],
5315 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5317 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5319 # Shell to use when invoking shell scripts.
5322 # Whether or not to build shared libraries.
5323 build_libtool_libs=$enable_shared
5325 # Whether or not to build static libraries.
5326 build_old_libs=$enable_static
5328 # Whether or not to add -lc for building shared libraries.
5329 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5331 # Whether or not to disallow shared libs when runtime libs are static
5332 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5334 # Whether or not to optimize for fast installation.
5335 fast_install=$enable_fast_install
5338 host_alias=$host_alias
5341 # An echo program that does not interpret backslashes.
5346 AR_FLAGS=$lt_AR_FLAGS
5351 # A language-specific compiler.
5352 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5354 # Is the compiler the GNU C compiler?
5355 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5360 # The linker used to build libraries.
5361 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5363 # Whether we need hard or soft links.
5366 # A BSD-compatible nm program.
5369 # A symbol stripping program
5372 # Used to examine libraries when file_magic_cmd begins "file"
5373 MAGIC_CMD=$MAGIC_CMD
5375 # Used on cygwin: DLL creation program.
5378 # Used on cygwin: object dumper.
5381 # Used on cygwin: assembler.
5384 # The name of the directory that contains temporary libtool files.
5387 # How to create reloadable object files.
5388 reload_flag=$lt_reload_flag
5389 reload_cmds=$lt_reload_cmds
5391 # How to pass a linker flag through the compiler.
5392 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5394 # Object file suffix (normally "o").
5397 # Old archive suffix (normally "a").
5400 # Shared library suffix (normally ".so").
5401 shrext_cmds='$shrext_cmds'
5403 # Executable file suffix (normally "").
5406 # Additional compiler flags for building library objects.
5407 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5410 # What is the maximum length of a command?
5411 max_cmd_len=$lt_cv_sys_max_cmd_len
5413 # Does compiler simultaneously support -c and -o options?
5414 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5416 # Must we lock files when doing compilation ?
5417 need_locks=$lt_need_locks
5419 # Do we need the lib prefix for modules?
5420 need_lib_prefix=$need_lib_prefix
5422 # Do we need a version for libraries?
5423 need_version=$need_version
5425 # Whether dlopen is supported.
5426 dlopen_support=$enable_dlopen
5428 # Whether dlopen of programs is supported.
5429 dlopen_self=$enable_dlopen_self
5431 # Whether dlopen of statically linked programs is supported.
5432 dlopen_self_static=$enable_dlopen_self_static
5434 # Compiler flag to prevent dynamic linking.
5435 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5437 # Compiler flag to turn off builtin functions.
5438 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5440 # Compiler flag to allow reflexive dlopens.
5441 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5443 # Compiler flag to generate shared objects directly from archives.
5444 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5446 # Compiler flag to generate thread-safe objects.
5447 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5449 # Library versioning type.
5450 version_type=$version_type
5452 # Format of library name prefix.
5453 libname_spec=$lt_libname_spec
5455 # List of archive names. First name is the real one, the rest are links.
5456 # The last name is the one that the linker finds with -lNAME.
5457 library_names_spec=$lt_library_names_spec
5459 # The coded name of the library, if different from the real name.
5460 soname_spec=$lt_soname_spec
5462 # Commands used to build and install an old-style archive.
5464 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5465 old_postinstall_cmds=$lt_old_postinstall_cmds
5466 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5468 # Create an old-style archive from a shared archive.
5469 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5471 # Create a temporary old-style archive to link instead of a shared archive.
5472 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5474 # Commands used to build and install a shared archive.
5475 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5476 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5477 postinstall_cmds=$lt_postinstall_cmds
5478 postuninstall_cmds=$lt_postuninstall_cmds
5480 # Commands used to build a loadable module (assumed same as above if empty)
5481 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5482 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5484 # Commands to strip libraries.
5485 old_striplib=$lt_old_striplib
5486 striplib=$lt_striplib
5488 # Dependencies to place before the objects being linked to create a
5490 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5492 # Dependencies to place after the objects being linked to create a
5494 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5496 # Dependencies to place before the objects being linked to create a
5498 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5500 # Dependencies to place after the objects being linked to create a
5502 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5504 # The library search path used internally by the compiler when linking
5506 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5508 # Method to check whether dependent libraries are shared objects.
5509 deplibs_check_method=$lt_deplibs_check_method
5511 # Command to use when deplibs_check_method == file_magic.
5512 file_magic_cmd=$lt_file_magic_cmd
5514 # Flag that allows shared libraries with undefined symbols to be built.
5515 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5517 # Flag that forces no undefined symbols.
5518 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5520 # Commands used to finish a libtool library installation in a directory.
5521 finish_cmds=$lt_finish_cmds
5523 # Same as above, but a single script fragment to be evaled but not shown.
5524 finish_eval=$lt_finish_eval
5526 # Take the output of nm and produce a listing of raw symbols and C names.
5527 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5529 # Transform the output of nm in a proper C declaration
5530 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5532 # Transform the output of nm in a C name address pair
5533 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5535 # This is the shared library runtime path variable.
5536 runpath_var=$runpath_var
5538 # This is the shared library path variable.
5539 shlibpath_var=$shlibpath_var
5541 # Is shlibpath searched before the hard-coded library search path?
5542 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5544 # How to hardcode a shared library path into an executable.
5545 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5547 # Whether we should hardcode library paths into libraries.
5548 hardcode_into_libs=$hardcode_into_libs
5550 # Flag to hardcode \$libdir into a binary during linking.
5551 # This must work even if \$libdir does not exist.
5552 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5554 # If ld is used when linking, flag to hardcode \$libdir into
5555 # a binary during linking. This must work even if \$libdir does
5557 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5559 # Whether we need a single -rpath flag with a separated argument.
5560 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5562 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5564 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5566 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5568 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5570 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5571 # the resulting binary.
5572 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5574 # Set to yes if building a shared library automatically hardcodes DIR into the library
5575 # and all subsequent libraries and executables linked against it.
5576 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5578 # Variables whose values should be saved in libtool wrapper scripts and
5579 # restored at relink time.
5580 variables_saved_for_relink="$variables_saved_for_relink"
5582 # Whether libtool must link a program against all its dependency libraries.
5583 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5585 # Compile-time system search path for libraries
5586 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5588 # Run-time system search path for libraries
5589 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5591 # Fix the shell variable \$srcfile for the compiler.
5592 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5594 # Set to yes if exported symbols are required.
5595 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5597 # The commands to list exported symbols.
5598 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5600 # The commands to extract the exported symbol list from a shared archive.
5601 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5603 # Symbols that should not be listed in the preloaded symbols.
5604 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5606 # Symbols that must always be exported.
5607 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5610 [# ### END LIBTOOL CONFIG],
5611 [# ### END LIBTOOL TAG CONFIG: $tagname])
5618 cat <<\EOF >> "$cfgfile"
5620 # AIX sometimes has problems with the GCC collect2 program. For some
5621 # reason, if we set the COLLECT_NAMES environment variable, the problems
5622 # vanish in a puff of smoke.
5623 if test "X${COLLECT_NAMES+set}" != Xset; then
5625 export COLLECT_NAMES
5631 # We use sed instead of cat because bash on DJGPP gets confused if
5632 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5633 # text mode, it properly converts lines to CR/LF. This bash problem
5634 # is reportedly fixed, but why not run on old versions too?
5635 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5637 mv -f "$cfgfile" "$ofile" || \
5638 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5642 # If there is no Makefile yet, we rely on a make rule to execute
5643 # `config.status --recheck' to rerun these tests and create the
5644 # libtool script then.
5645 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5646 if test -f "$ltmain_in"; then
5647 test -f Makefile && make "$ltmain"
5650 ])# AC_LIBTOOL_CONFIG
5653 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5654 # -------------------------------------------
5655 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5656 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5658 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5660 if test "$GCC" = yes; then
5661 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5663 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5664 lt_cv_prog_compiler_rtti_exceptions,
5665 [-fno-rtti -fno-exceptions], [],
5666 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5668 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5671 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5672 # ---------------------------------
5673 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5674 [AC_REQUIRE([AC_CANONICAL_HOST])
5675 AC_REQUIRE([AC_PROG_NM])
5676 AC_REQUIRE([AC_OBJEXT])
5677 # Check for command to grab the raw symbol name followed by C symbol from nm.
5678 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5679 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5681 # These are sane defaults that work on at least a few old systems.
5682 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5684 # Character class describing NM global symbol codes.
5685 symcode='[[BCDEGRST]]'
5687 # Regexp to match symbols that can be accessed directly from C.
5688 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5690 # Transform the above into a raw symbol and a C symbol.
5691 symxfrm='\1 \2\3 \3'
5693 # Transform an extracted symbol line into a proper C declaration
5694 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5696 # Transform an extracted symbol line into symbol name and symbol address
5697 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'"
5699 # Define system-specific variables.
5704 cygwin* | mingw* | pw32*)
5705 symcode='[[ABCDGISTW]]'
5707 hpux*) # Its linker distinguishes data from code symbols
5708 if test "$host_cpu" = ia64; then
5709 symcode='[[ABCDEGRST]]'
5711 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5712 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'"
5715 symcode='[[BCDEGRST]]'
5718 symcode='[[BCDEGQRST]]'
5724 symcode='[[DFNSTU]]'
5728 # Handle CRLF in mingw tool chain
5732 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5736 # If we're using GNU nm, then use its standard symbol codes.
5737 case `$NM -V 2>&1` in
5738 *GNU* | *'with BFD'*)
5739 symcode='[[ABCDGIRSTW]]' ;;
5742 # Try without a prefix undercore, then with it.
5743 for ac_symprfx in "" "_"; do
5745 # Write the raw and C identifiers.
5746 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5748 # Check to see that the pipe works correctly.
5752 cat > conftest.$ac_ext <<EOF
5757 void nm_test_func(){}
5761 int main(){nm_test_var='a';nm_test_func();return(0);}
5764 if AC_TRY_EVAL(ac_compile); then
5765 # Now try to grab the symbols.
5767 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5768 # Try sorting and uniquifying the output.
5769 if sort "$nlist" | uniq > "$nlist"T; then
5770 mv -f "$nlist"T "$nlist"
5775 # Make sure that we snagged all the symbols we need.
5776 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5777 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5778 cat <<EOF > conftest.$ac_ext
5784 # Now generate the symbol file.
5785 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5787 cat <<EOF >> conftest.$ac_ext
5788 #if defined (__STDC__) && __STDC__
5789 # define lt_ptr_t void *
5791 # define lt_ptr_t char *
5795 /* The mapping between symbol names and symbols. */
5800 lt_preloaded_symbols[[]] =
5803 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5804 cat <<\EOF >> conftest.$ac_ext
5812 # Now try linking the two files.
5813 mv conftest.$ac_objext conftstm.$ac_objext
5814 lt_save_LIBS="$LIBS"
5815 lt_save_CFLAGS="$CFLAGS"
5816 LIBS="conftstm.$ac_objext"
5817 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5818 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5821 LIBS="$lt_save_LIBS"
5822 CFLAGS="$lt_save_CFLAGS"
5824 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5827 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5830 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5833 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5834 cat conftest.$ac_ext >&5
5836 rm -f conftest* conftst*
5838 # Do not use the global_symbol_pipe unless it works.
5839 if test "$pipe_works" = yes; then
5842 lt_cv_sys_global_symbol_pipe=
5846 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5847 lt_cv_sys_global_symbol_to_cdecl=
5849 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5850 AC_MSG_RESULT(failed)
5854 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5857 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5858 # ---------------------------------------
5859 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5860 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5861 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5862 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5864 AC_MSG_CHECKING([for $compiler option to produce PIC])
5866 # C++ specific cases for pic, static, wl, etc.
5867 if test "$GXX" = yes; then
5868 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5869 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5873 # All AIX code is PIC.
5874 if test "$host_cpu" = ia64; then
5875 # AIX 5 now supports IA64 processor
5876 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5880 # FIXME: we need at least 68020 code to build shared libraries, but
5881 # adding the `-m68020' flag to GCC prevents building anything better,
5883 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5885 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5886 # PIC is the default for these OSes.
5888 mingw* | os2* | pw32*)
5889 # This hack is so that the source file can tell whether it is being
5890 # built for inclusion in a dll (and should export symbols for example).
5891 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5893 darwin* | rhapsody*)
5894 # PIC is the default on this platform
5895 # Common symbols not allowed in MH_DYLIB files
5896 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5899 # DJGPP does not support shared libraries at all
5900 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5903 if test -d /usr/nec; then
5904 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5908 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5914 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5919 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5925 # All AIX code is PIC.
5926 if test "$host_cpu" = ia64; then
5927 # AIX 5 now supports IA64 processor
5928 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5930 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5934 case $cc_basename in
5936 # Green Hills C++ Compiler
5937 # _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"
5942 case $cc_basename in
5944 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5947 # Green Hills C++ Compiler
5948 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5954 freebsd* | kfreebsd*-gnu)
5955 # FreeBSD uses GNU C++
5957 hpux9* | hpux10* | hpux11*)
5958 case $cc_basename in
5960 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5961 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5962 if test "$host_cpu" != ia64; then
5963 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5967 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5968 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5974 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5982 irix5* | irix6* | nonstopux*)
5983 case $cc_basename in
5985 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5986 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5987 # CC pic flag -KPIC is the default.
5994 case $cc_basename in
5997 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5998 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6002 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6003 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6004 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6008 # Make sure the PIC flag is empty. It appears that all Alpha
6009 # Linux and Compaq Tru64 Unix objects are PIC.
6010 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6011 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6022 case $cc_basename in
6024 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6030 netbsd* | knetbsd*-gnu)
6032 osf3* | osf4* | osf5*)
6033 case $cc_basename in
6035 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6038 # Rational C++ 2.4.1
6039 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6042 # Digital/Compaq C++
6043 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6044 # Make sure the PIC flag is empty. It appears that all Alpha
6045 # Linux and Compaq Tru64 Unix objects are PIC.
6046 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6047 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6056 case $cc_basename in
6058 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6065 case $cc_basename in
6067 # Sun C++ 4.2, 5.x and Centerline C++
6068 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6069 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6070 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6073 # Green Hills C++ Compiler
6074 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6081 case $cc_basename in
6084 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6085 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6089 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6096 case $cc_basename in
6098 # NonStop-UX NCC 3.20
6099 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6110 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6116 if test "$GCC" = yes; then
6117 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6118 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6122 # All AIX code is PIC.
6123 if test "$host_cpu" = ia64; then
6124 # AIX 5 now supports IA64 processor
6125 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6130 # FIXME: we need at least 68020 code to build shared libraries, but
6131 # adding the `-m68020' flag to GCC prevents building anything better,
6133 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6136 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6137 # PIC is the default for these OSes.
6140 mingw* | pw32* | os2*)
6141 # This hack is so that the source file can tell whether it is being
6142 # built for inclusion in a dll (and should export symbols for example).
6143 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6146 darwin* | rhapsody*)
6147 # PIC is the default on this platform
6148 # Common symbols not allowed in MH_DYLIB files
6149 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6153 # Just because we use GCC doesn't mean we suddenly get shared libraries
6154 # on systems that don't support them.
6155 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6160 if test -d /usr/nec; then
6161 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6166 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6173 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6179 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6183 # PORTME Check for flag to pass linker flags through the system compiler.
6186 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6187 if test "$host_cpu" = ia64; then
6188 # AIX 5 now supports IA64 processor
6189 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6191 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6195 mingw* | pw32* | os2*)
6196 # This hack is so that the source file can tell whether it is being
6197 # built for inclusion in a dll (and should export symbols for example).
6198 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6201 hpux9* | hpux10* | hpux11*)
6202 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6203 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6210 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6213 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6214 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6217 irix5* | irix6* | nonstopux*)
6218 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6219 # PIC (with -KPIC) is the default.
6220 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6224 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6225 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6231 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6232 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6233 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6236 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6237 # All Alpha code is PIC.
6238 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6243 osf3* | osf4* | osf5*)
6244 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6245 # All OSF/1 code is PIC.
6246 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6250 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
6251 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
6255 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6256 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6257 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6261 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6262 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6263 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6266 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6267 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6268 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6269 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6273 if test -d /usr/nec ;then
6274 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6275 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6280 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6281 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6285 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6290 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6293 # Check to make sure the PIC flag actually works.
6295 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6296 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6297 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6298 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6299 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6301 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6303 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6304 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6307 # For platforms which do not support PIC, -DPIC is meaningless:
6309 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6312 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6318 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6319 # ------------------------------------
6320 # See if the linker supports building shared libraries.
6321 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6322 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6324 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6327 # If we're using GNU nm, then we don't want the "-C" option.
6328 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6329 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6330 _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'
6332 _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'
6336 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6339 _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'
6342 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6345 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6350 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6351 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6352 _LT_AC_TAGVAR(archive_cmds, $1)=
6353 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6354 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6355 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6356 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6357 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6358 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6359 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6360 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6361 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6362 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6363 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6364 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6365 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6366 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6367 _LT_AC_TAGVAR(module_cmds, $1)=
6368 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6369 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6370 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6371 # include_expsyms should be a list of space-separated symbols to be *always*
6372 # included in the symbol list
6373 _LT_AC_TAGVAR(include_expsyms, $1)=
6374 # exclude_expsyms can be an extended regexp of symbols to exclude
6375 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6376 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6377 # as well as any symbol that contains `d'.
6378 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6379 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6380 # platforms (ab)use it in PIC code, but their linkers get confused if
6381 # the symbol is explicitly referenced. Since portable code cannot
6382 # rely on this symbol name, it's probably fine to never include it in
6383 # preloaded symbol tables.
6384 extract_expsyms_cmds=
6387 cygwin* | mingw* | pw32*)
6388 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6389 # When not using gcc, we currently assume that we are using
6390 # Microsoft Visual C++.
6391 if test "$GCC" != yes; then
6400 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6401 if test "$with_gnu_ld" = yes; then
6402 # If archive_cmds runs LD, not CC, wlarc should be empty
6405 # See if GNU ld supports shared libraries.
6407 aix3* | aix4* | aix5*)
6408 # On AIX/PPC, the GNU linker is very broken
6409 if test "$host_cpu" != ia64; then
6410 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6413 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6414 *** to be unable to reliably create shared libraries on AIX.
6415 *** Therefore, libtool is disabling shared libraries support. If you
6416 *** really care for shared libraries, you may want to modify your PATH
6417 *** so that a non-GNU linker is found, and then restart.
6424 _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)'
6425 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6426 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6428 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6429 # that the semantics of dynamic libraries on AmigaOS, at least up
6430 # to version 4, is to share data among multiple programs linked
6431 # with the same dynamic library. Since this doesn't match the
6432 # behavior of shared libraries on other platforms, we can't use
6434 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6438 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6439 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6440 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6441 # support --undefined. This deserves some investigation. FIXME
6442 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6444 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6448 cygwin* | mingw* | pw32*)
6449 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6450 # as there is no search path for DLLs.
6451 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6452 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6453 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6454 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6455 _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'
6457 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6458 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6459 # If the export-symbols file already is a .def file (1st line
6460 # is EXPORTS), use it as is; otherwise, prepend...
6461 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6462 cp $export_symbols $output_objdir/$soname.def;
6464 echo EXPORTS > $output_objdir/$soname.def;
6465 cat $export_symbols >> $output_objdir/$soname.def;
6467 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6473 netbsd* | knetbsd*-gnu)
6474 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6475 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6478 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6479 _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'
6484 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6485 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6488 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6489 *** create shared libraries on Solaris systems. Therefore, libtool
6490 *** is disabling shared libraries support. We urge you to upgrade GNU
6491 *** binutils to release 2.9.1 or newer. Another option is to modify
6492 *** your PATH or compiler configuration so that the native linker is
6493 *** used, and then restart.
6496 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6497 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6498 _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'
6500 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6505 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6507 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6508 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6512 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6513 tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6514 _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
6515 supports_anon_versioning=no
6516 case `$LD -v 2>/dev/null` in
6517 *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6518 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6519 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6520 *\ 2.11.*) ;; # other 2.11 versions
6521 *) supports_anon_versioning=yes ;;
6523 if test $supports_anon_versioning = yes; then
6524 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6525 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6526 $echo "local: *; };" >> $output_objdir/$libname.ver~
6527 $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6529 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
6531 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6533 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6538 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6539 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6540 _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'
6542 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6547 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
6548 runpath_var=LD_RUN_PATH
6549 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6550 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6551 # ancient GNU ld didn't support --whole-archive et. al.
6552 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6553 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6555 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6559 # PORTME fill in a description of your system's linker (not GNU ld)
6562 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6563 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6564 _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'
6565 # Note: this linker hardcodes the directories in LIBPATH if there
6566 # are no directories specified by -L.
6567 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6568 if test "$GCC" = yes && test -z "$link_static_flag"; then
6569 # Neither direct hardcoding nor static linking is supported with a
6571 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6576 if test "$host_cpu" = ia64; then
6577 # On IA64, the linker does run time linking by default, so we don't
6578 # have to do anything special.
6579 aix_use_runtimelinking=no
6580 exp_sym_flag='-Bexport'
6583 # If we're using GNU nm, then we don't want the "-C" option.
6584 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6585 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6586 _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'
6588 _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'
6590 aix_use_runtimelinking=no
6592 # Test if we are trying to use run time linking or normal
6593 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6594 # need to do runtime linking.
6595 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6596 for ld_flag in $LDFLAGS; do
6597 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6598 aix_use_runtimelinking=yes
6604 exp_sym_flag='-bexport'
6605 no_entry_flag='-bnoentry'
6608 # When large executables or shared objects are built, AIX ld can
6609 # have problems creating the table of contents. If linking a library
6610 # or program results in "error TOC overflow" add -mminimal-toc to
6611 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6612 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6614 _LT_AC_TAGVAR(archive_cmds, $1)=''
6615 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6616 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6617 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6619 if test "$GCC" = yes; then
6620 case $host_os in aix4.[012]|aix4.[012].*)
6621 # We only want to do this on AIX 4.2 and lower, the check
6622 # below for broken collect2 doesn't work under 4.3+
6623 collect2name=`${CC} -print-prog-name=collect2`
6624 if test -f "$collect2name" && \
6625 strings "$collect2name" | grep resolve_lib_name >/dev/null
6627 # We have reworked collect2
6628 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6630 # We have old collect2
6631 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6632 # It fails to find uninstalled libraries when the uninstalled
6633 # path is not listed in the libpath. Setting hardcode_minus_L
6634 # to unsupported forces relinking
6635 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6636 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6637 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6640 shared_flag='-shared'
6643 if test "$host_cpu" = ia64; then
6644 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6645 # chokes on -Wl,-G. The following line is correct:
6648 if test "$aix_use_runtimelinking" = yes; then
6649 shared_flag='${wl}-G'
6651 shared_flag='${wl}-bM:SRE'
6656 # It seems that -bexpall does not export symbols beginning with
6657 # underscore (_), so it is better to generate a list of symbols to export.
6658 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6659 if test "$aix_use_runtimelinking" = yes; then
6660 # Warning - without using the other runtime loading flags (-brtl),
6661 # -berok will link without error, but may produce a broken library.
6662 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6663 # Determine the default libpath from the value encoded in an empty executable.
6664 _LT_AC_SYS_LIBPATH_AIX
6665 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6666 _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"
6668 if test "$host_cpu" = ia64; then
6669 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6670 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6671 _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"
6673 # Determine the default libpath from the value encoded in an empty executable.
6674 _LT_AC_SYS_LIBPATH_AIX
6675 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6676 # Warning - without using the other run time loading flags,
6677 # -berok will link without error, but may produce a broken library.
6678 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6679 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6680 # -bexpall does not export symbols beginning with underscore (_)
6681 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6682 # Exported symbols can be pulled into shared objects from archives
6683 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6684 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6685 # This is similar to how AIX traditionally builds it's shared libraries.
6686 _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'
6692 _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)'
6693 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6694 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6695 # see comment about different semantics on the GNU ld section
6696 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6700 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6703 cygwin* | mingw* | pw32*)
6704 # When not using gcc, we currently assume that we are using
6705 # Microsoft Visual C++.
6706 # hardcode_libdir_flag_spec is actually meaningless, as there is
6707 # no search path for DLLs.
6708 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6709 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6710 # Tell ltmain to make .lib files, not .a files.
6712 # Tell ltmain to make .dll files, not .so files.
6714 # FIXME: Setting linknames here is a bad hack.
6715 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6716 # The linker will automatically build a .lib file if we build a DLL.
6717 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6718 # FIXME: Should let the user specify the lib program.
6719 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6720 fix_srcfile_path='`cygpath -w "$srcfile"`'
6721 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6724 darwin* | rhapsody*)
6725 if test "$GXX" = yes ; then
6726 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6728 rhapsody* | darwin1.[[012]])
6729 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6732 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6733 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6735 case ${MACOSX_DEPLOYMENT_TARGET} in
6737 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6740 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6746 lt_int_apple_cc_single_mod=no
6747 output_verbose_link_cmd='echo'
6748 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6749 lt_int_apple_cc_single_mod=yes
6751 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6752 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6754 _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'
6756 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6757 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6758 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6759 _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}'
6761 _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}'
6763 _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}'
6764 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6765 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6766 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6767 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6768 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6770 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6775 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6776 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6777 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6781 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6784 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6785 # support. Future versions do this automatically, but an explicit c++rt0.o
6786 # does not break anything, and helps significantly (at the cost of a little
6789 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6790 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6791 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6792 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6795 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6797 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6798 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6799 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6800 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6803 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6804 freebsd* | kfreebsd*-gnu)
6805 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6806 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6807 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6808 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6812 if test "$GCC" = yes; then
6813 _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'
6815 _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'
6817 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6818 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6819 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6821 # hardcode_minus_L: Not really in the search PATH,
6822 # but as the default location of the library.
6823 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6824 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6828 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6831 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6834 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6840 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6843 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6847 if test "$with_gnu_ld" = no; then
6850 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6851 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6852 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6853 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6854 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6857 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6858 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6859 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6861 # hardcode_minus_L: Not really in the search PATH,
6862 # but as the default location of the library.
6863 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6866 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6867 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6868 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6869 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6871 # hardcode_minus_L: Not really in the search PATH,
6872 # but as the default location of the library.
6873 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6879 irix5* | irix6* | nonstopux*)
6880 if test "$GCC" = yes; then
6881 _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'
6883 _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'
6884 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6886 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6887 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6888 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6891 netbsd* | knetbsd*-gnu)
6892 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6893 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6895 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6897 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6898 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6899 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6903 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6904 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6905 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6906 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6907 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6911 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6912 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6913 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6914 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6915 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6916 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6919 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6920 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6921 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6924 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6925 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6932 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6933 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6934 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6935 _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'
6936 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6940 if test "$GCC" = yes; then
6941 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6942 _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'
6944 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6945 _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'
6947 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6948 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6951 osf4* | osf5*) # as osf3* with the addition of -msym flag
6952 if test "$GCC" = yes; then
6953 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6954 _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'
6955 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6957 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6958 _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'
6959 _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~
6960 $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'
6962 # Both c and cxx compiler support -rpath directly
6963 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6965 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6969 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6970 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6971 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6972 runpath_var=LD_RUN_PATH
6973 hardcode_runpath_var=yes
6977 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6978 if test "$GCC" = yes; then
6979 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6980 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6981 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6983 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6984 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6985 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6987 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6988 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6990 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6991 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6992 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6994 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6998 if test "x$host_vendor" = xsequent; then
6999 # Use $CC to link under sequent, because it throws in some extra .o
7000 # files that make .init and .fini sections work.
7001 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7003 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7005 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7006 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7007 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7008 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7012 case $host_vendor in
7014 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7015 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7018 ## LD is ld it makes a PLAMLIB
7019 ## CC just makes a GrossModule.
7020 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7021 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7022 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7025 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7026 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7029 runpath_var='LD_RUN_PATH'
7030 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7034 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7035 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7036 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7040 if test -d /usr/nec; then
7041 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7042 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7043 runpath_var=LD_RUN_PATH
7044 hardcode_runpath_var=yes
7045 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7050 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7051 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7052 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7053 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7054 hardcode_runpath_var=yes
7055 runpath_var=LD_RUN_PATH
7058 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
7059 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
7060 if test "$GCC" = yes; then
7061 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7063 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7065 runpath_var='LD_RUN_PATH'
7066 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7070 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7071 # $CC -shared without GNU ld will not create a library from C++
7072 # object files and a static libstdc++, better avoid it by now
7073 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7074 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7075 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7076 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7077 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7078 runpath_var='LD_RUN_PATH'
7082 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7083 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7084 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7088 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7093 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7094 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7096 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7097 if test "$GCC" = yes; then
7098 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7102 # Do we need to explicitly link libc?
7104 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7106 # Assume -lc should be added
7107 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7109 if test "$enable_shared" = yes && test "$GCC" = yes; then
7110 case $_LT_AC_TAGVAR(archive_cmds, $1) in
7112 # FIXME: we may have to deal with multi-command sequences.
7115 # Test whether the compiler implicitly links with -lc since on some
7116 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7117 # to ld, don't add -lc before -lgcc.
7118 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7120 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7122 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7125 libobjs=conftest.$ac_objext
7127 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7133 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7134 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7135 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7137 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7139 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7141 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7143 cat conftest.err 1>&5
7146 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7152 ])# AC_LIBTOOL_PROG_LD_SHLIBS
7155 # _LT_AC_FILE_LTDLL_C
7156 # -------------------
7157 # Be careful that the start marker always follows a newline.
7158 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7159 # /* ltdll.c starts here */
7160 # #define WIN32_LEAN_AND_MEAN
7161 # #include <windows.h>
7162 # #undef WIN32_LEAN_AND_MEAN
7163 # #include <stdio.h>
7165 # #ifndef __CYGWIN__
7166 # # ifdef __CYGWIN32__
7167 # # define __CYGWIN__ __CYGWIN32__
7171 # #ifdef __cplusplus
7174 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7175 # #ifdef __cplusplus
7180 # #include <cygwin/cygwin_dll.h>
7181 # DECLARE_CYGWIN_DLL( DllMain );
7183 # HINSTANCE __hDllInstance_base;
7186 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7188 # __hDllInstance_base = hInst;
7191 # /* ltdll.c ends here */
7192 ])# _LT_AC_FILE_LTDLL_C
7195 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7196 # ---------------------------------
7197 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7201 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
7202 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7203 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7204 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7205 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7206 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
7207 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
7209 # This is just to silence aclocal about the macro not being used
7210 ifelse([AC_DISABLE_FAST_INSTALL])
7212 AC_DEFUN([LT_AC_PROG_GCJ],
7213 [AC_CHECK_TOOL(GCJ, gcj, no)
7214 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7218 AC_DEFUN([LT_AC_PROG_RC],
7219 [AC_CHECK_TOOL(RC, windres, no)
7222 # NOTE: This macro has been submitted for inclusion into #
7223 # GNU Autoconf as AC_PROG_SED. When it is available in #
7224 # a released version of Autoconf we should remove this #
7225 # macro and use it instead. #
7228 # Check for a fully-functional sed program, that truncates
7229 # as few characters as possible. Prefer GNU sed if found.
7230 AC_DEFUN([LT_AC_PROG_SED],
7231 [AC_MSG_CHECKING([for a sed that does not truncate output])
7232 AC_CACHE_VAL(lt_cv_path_SED,
7233 [# Loop through the user's path and test for sed and gsed.
7234 # Then use that list of sed's as ones to test for truncation.
7235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7239 test -z "$as_dir" && as_dir=.
7240 for lt_ac_prog in sed gsed; do
7241 for ac_exec_ext in '' $ac_executable_extensions; do
7242 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7243 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7250 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7251 # along with /bin/sed that truncates output.
7252 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7253 test ! -f $lt_ac_sed && break
7254 cat /dev/null > conftest.in
7256 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7257 # Check for GNU sed and select it if it is found.
7258 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7259 lt_cv_path_SED=$lt_ac_sed
7263 cat conftest.in conftest.in >conftest.tmp
7264 mv conftest.tmp conftest.in
7265 cp conftest.in conftest.nl
7267 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7268 cmp -s conftest.out conftest.nl || break
7269 # 10000 chars as input seems more than enough
7270 test $lt_ac_count -gt 10 && break
7271 lt_ac_count=`expr $lt_ac_count + 1`
7272 if test $lt_ac_count -gt $lt_ac_max; then
7273 lt_ac_max=$lt_ac_count
7274 lt_cv_path_SED=$lt_ac_sed
7280 AC_MSG_RESULT([$SED])
7283 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
7284 dnl The program must properly implement --version.
7285 AC_DEFUN([AM_MISSING_PROG],
7286 [AC_MSG_CHECKING(for working $2)
7287 # Run test in a subshell; some versions of sh will print an error if
7288 # an executable is not found, even if stderr is redirected.
7289 # Redirect stdin to placate older versions of autoconf. Sigh.
7290 if ($2 --version) < /dev/null > /dev/null 2>&1; then
7292 AC_MSG_RESULT(found)
7295 AC_MSG_RESULT(missing)