759 | | AC_ARG_WITH([pic], |
760 | | [AC_HELP_STRING([--with-pic], |
761 | | [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], |
762 | | [pic_mode="$withval"], |
763 | | [pic_mode=default]) |
764 | | test -z "$pic_mode" && pic_mode=default |
765 | | |
766 | | # Use C for the default configuration in the libtool script |
767 | | tagname= |
768 | | AC_LIBTOOL_LANG_C_CONFIG |
769 | | _LT_AC_TAGCONFIG |
770 | | _LT_AC_SHARED_EXT |
771 | | ])# AC_LIBTOOL_SETUP |
772 | | |
773 | | |
774 | | # _LT_AC_SYS_COMPILER |
775 | | # ------------------- |
776 | | AC_DEFUN([_LT_AC_SYS_COMPILER], |
777 | | [AC_REQUIRE([AC_PROG_CC])dnl |
778 | | |
779 | | # If no C compiler was specified, use CC. |
780 | | LTCC=${LTCC-"$CC"} |
781 | | |
782 | | # Allow CC to be a program name with arguments. |
783 | | compiler=$CC |
784 | | ])# _LT_AC_SYS_COMPILER |
785 | | |
786 | | |
787 | | # _LT_AC_SYS_LIBPATH_AIX |
788 | | # ---------------------- |
789 | | # Links a minimal program and checks the executable |
790 | | # for the system default hardcoded library path. In most cases, |
791 | | # this is /usr/lib:/lib, but when the MPI compilers are used |
792 | | # the location of the communication and MPI libs are included too. |
793 | | # If we don't find anything, use the default library path according |
794 | | # to the aix ld manual. |
795 | | AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], |
796 | | [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ |
797 | | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } |
798 | | }'` |
799 | | # Check for a 64-bit object if we didn't find anything. |
800 | | 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; } |
801 | | }'`; fi],[]) |
802 | | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
803 | | ])# _LT_AC_SYS_LIBPATH_AIX |
804 | | |
805 | | |
806 | | # _LT_AC_SHELL_INIT(ARG) |
807 | | # ---------------------- |
808 | | AC_DEFUN([_LT_AC_SHELL_INIT], |
809 | | [ifdef([AC_DIVERSION_NOTICE], |
810 | | [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
811 | | [AC_DIVERT_PUSH(NOTICE)]) |
812 | | $1 |
813 | | AC_DIVERT_POP |
814 | | ])# _LT_AC_SHELL_INIT |
815 | | |
| 617 | # Some flags need to be propagated to the compiler or linker for good |
| 618 | # libtool support. |
| 619 | case $host in |
| 620 | *-*-irix6*) |
| 621 | # Find out which ABI we are using. |
| 622 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
| 623 | if AC_TRY_EVAL(ac_compile); then |
| 624 | case `/usr/bin/file conftest.$ac_objext` in |
| 625 | *32-bit*) |
| 626 | LD="${LD-ld} -32" |
| 627 | ;; |
| 628 | *N32*) |
| 629 | LD="${LD-ld} -n32" |
| 630 | ;; |
| 631 | *64-bit*) |
| 632 | LD="${LD-ld} -64" |
| 633 | ;; |
| 634 | esac |
| 635 | fi |
| 636 | rm -rf conftest* |
| 637 | ;; |
| 638 | |
| 639 | *-*-sco3.2v5*) |
| 640 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
| 641 | SAVE_CFLAGS="$CFLAGS" |
| 642 | CFLAGS="$CFLAGS -belf" |
| 643 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
| 644 | [AC_LANG_SAVE |
| 645 | AC_LANG_C |
| 646 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
| 647 | AC_LANG_RESTORE]) |
| 648 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
| 649 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
| 650 | CFLAGS="$SAVE_CFLAGS" |
| 651 | fi |
| 652 | ;; |
| 653 | |
| 654 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
| 655 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
| 656 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
| 657 | AC_CHECK_TOOL(AS, as, false) |
| 658 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
| 659 | |
| 660 | # recent cygwin and mingw systems supply a stub DllMain which the user |
| 661 | # can override, but on older systems we have to supply one |
| 662 | AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, |
| 663 | [AC_TRY_LINK([], |
| 664 | [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); |
| 665 | DllMain (0, 0, 0);], |
| 666 | [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) |
| 667 | |
| 668 | case $host/$CC in |
| 669 | *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) |
| 670 | # old mingw systems require "-dll" to link a DLL, while more recent ones |
| 671 | # require "-mdll" |
| 672 | SAVE_CFLAGS="$CFLAGS" |
| 673 | CFLAGS="$CFLAGS -mdll" |
| 674 | AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, |
| 675 | [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) |
| 676 | CFLAGS="$SAVE_CFLAGS" ;; |
| 677 | *-*-cygwin* | *-*-pw32*) |
| 678 | # cygwin systems need to pass --dll to the linker, and not link |
| 679 | # crt.o which will require a WinMain@16 definition. |
| 680 | lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; |
| 681 | esac |
| 682 | ;; |
| 683 | ]) |
| 684 | esac |
| 685 | |
| 686 | _LT_AC_LTCONFIG_HACK |
| 687 | |
| 688 | ]) |
| 689 | |
| 690 | # AC_LIBTOOL_HEADER_ASSERT |
| 691 | # ------------------------ |
| 692 | AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], |
| 693 | [AC_CACHE_CHECK([whether $CC supports assert without backlinking], |
| 694 | [lt_cv_func_assert_works], |
| 695 | [case $host in |
| 696 | *-*-solaris*) |
| 697 | if test "$GCC" = yes && test "$with_gnu_ld" != yes; then |
| 698 | case `$CC --version 2>/dev/null` in |
| 699 | [[12]].*) lt_cv_func_assert_works=no ;; |
| 700 | *) lt_cv_func_assert_works=yes ;; |
| 701 | esac |
| 702 | fi |
| 703 | ;; |
| 704 | esac]) |
| 705 | |
| 706 | if test "x$lt_cv_func_assert_works" = xyes; then |
| 707 | AC_CHECK_HEADERS(assert.h) |
| 708 | fi |
| 709 | ])# AC_LIBTOOL_HEADER_ASSERT |
| 710 | |
| 711 | # _LT_AC_CHECK_DLFCN |
| 712 | # -------------------- |
| 713 | AC_DEFUN([_LT_AC_CHECK_DLFCN], |
| 714 | [AC_CHECK_HEADERS(dlfcn.h) |
| 715 | ])# _LT_AC_CHECK_DLFCN |
| 716 | |
| 717 | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 718 | # --------------------------------- |
| 719 | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
| 720 | [AC_REQUIRE([AC_CANONICAL_HOST]) |
| 721 | AC_REQUIRE([AC_PROG_NM]) |
| 722 | AC_REQUIRE([AC_OBJEXT]) |
| 723 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
| 724 | AC_MSG_CHECKING([command to parse $NM output]) |
| 725 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl |
| 726 | |
| 727 | # These are sane defaults that work on at least a few old systems. |
| 728 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
| 729 | |
| 730 | # Character class describing NM global symbol codes. |
| 731 | symcode='[[BCDEGRST]]' |
| 732 | |
| 733 | # Regexp to match symbols that can be accessed directly from C. |
| 734 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
| 735 | |
| 736 | # Transform the above into a raw symbol and a C symbol. |
| 737 | symxfrm='\1 \2\3 \3' |
| 738 | |
| 739 | # Transform an extracted symbol line into a proper C declaration |
| 740 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" |
| 741 | |
| 742 | # Transform an extracted symbol line into symbol name and symbol address |
| 743 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
| 744 | |
| 745 | # Define system-specific variables. |
| 746 | case $host_os in |
| 747 | aix*) |
| 748 | symcode='[[BCDT]]' |
| 749 | ;; |
| 750 | cygwin* | mingw* | pw32*) |
| 751 | symcode='[[ABCDGISTW]]' |
| 752 | ;; |
| 753 | hpux*) # Its linker distinguishes data from code symbols |
| 754 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
| 755 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
| 756 | ;; |
| 757 | irix* | nonstopux*) |
| 758 | symcode='[[BCDEGRST]]' |
| 759 | ;; |
| 760 | solaris* | sysv5*) |
| 761 | symcode='[[BDT]]' |
| 762 | ;; |
| 763 | sysv4) |
| 764 | symcode='[[DFNSTU]]' |
| 765 | ;; |
| 766 | esac |
| 767 | |
| 768 | # Handle CRLF in mingw tool chain |
| 769 | opt_cr= |
| 770 | case $host_os in |
| 771 | mingw*) |
| 772 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
| 773 | ;; |
| 774 | esac |
| 775 | |
| 776 | # If we're using GNU nm, then use its standard symbol codes. |
| 777 | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
| 778 | symcode='[[ABCDGISTW]]' |
| 779 | fi |
| 780 | |
| 781 | # Try without a prefix undercore, then with it. |
| 782 | for ac_symprfx in "" "_"; do |
| 783 | |
| 784 | # Write the raw and C identifiers. |
| 785 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" |
| 786 | |
| 787 | # Check to see that the pipe works correctly. |
| 788 | pipe_works=no |
| 789 | rm -f conftest* |
| 790 | cat > conftest.$ac_ext <<EOF |
| 791 | #ifdef __cplusplus |
| 792 | extern "C" { |
| 793 | #endif |
| 794 | char nm_test_var; |
| 795 | void nm_test_func(){} |
| 796 | #ifdef __cplusplus |
| 797 | } |
| 798 | #endif |
| 799 | int main(){nm_test_var='a';nm_test_func();return(0);} |
| 800 | EOF |
| 801 | |
| 802 | if AC_TRY_EVAL(ac_compile); then |
| 803 | # Now try to grab the symbols. |
| 804 | nlist=conftest.nm |
| 805 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
| 806 | # Try sorting and uniquifying the output. |
| 807 | if sort "$nlist" | uniq > "$nlist"T; then |
| 808 | mv -f "$nlist"T "$nlist" |
| 809 | else |
| 810 | rm -f "$nlist"T |
| 811 | fi |
| 812 | |
| 813 | # Make sure that we snagged all the symbols we need. |
| 814 | if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
| 815 | if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
| 816 | cat <<EOF > conftest.$ac_ext |
| 817 | #ifdef __cplusplus |
| 818 | extern "C" { |
| 819 | #endif |
| 820 | |
| 821 | EOF |
| 822 | # Now generate the symbol file. |
| 823 | eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' |
| 824 | |
| 825 | cat <<EOF >> conftest.$ac_ext |
| 826 | #if defined (__STDC__) && __STDC__ |
| 827 | # define lt_ptr void * |
| 828 | #else |
| 829 | # define lt_ptr char * |
| 830 | # define const |
| 831 | #endif |
| 832 | |
| 833 | /* The mapping between symbol names and symbols. */ |
| 834 | const struct { |
| 835 | const char *name; |
| 836 | lt_ptr address; |
| 837 | } |
| 838 | lt_preloaded_symbols[[]] = |
| 839 | { |
| 840 | EOF |
| 841 | sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext |
| 842 | cat <<\EOF >> conftest.$ac_ext |
| 843 | {0, (lt_ptr) 0} |
| 844 | }; |
| 845 | |
| 846 | #ifdef __cplusplus |
| 847 | } |
| 848 | #endif |
| 849 | EOF |
| 850 | # Now try linking the two files. |
| 851 | mv conftest.$ac_objext conftstm.$ac_objext |
| 852 | save_LIBS="$LIBS" |
| 853 | save_CFLAGS="$CFLAGS" |
| 854 | LIBS="conftstm.$ac_objext" |
| 855 | CFLAGS="$CFLAGS$no_builtin_flag" |
| 856 | if AC_TRY_EVAL(ac_link) && test -s conftest; then |
| 857 | pipe_works=yes |
| 858 | fi |
| 859 | LIBS="$save_LIBS" |
| 860 | CFLAGS="$save_CFLAGS" |
| 861 | else |
| 862 | echo "cannot find nm_test_func in $nlist" >&AC_FD_CC |
| 863 | fi |
| 864 | else |
| 865 | echo "cannot find nm_test_var in $nlist" >&AC_FD_CC |
| 866 | fi |
| 867 | else |
| 868 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC |
| 869 | fi |
| 870 | else |
| 871 | echo "$progname: failed program was:" >&AC_FD_CC |
| 872 | cat conftest.$ac_ext >&5 |
| 873 | fi |
| 874 | rm -f conftest* conftst* |
| 875 | |
| 876 | # Do not use the global_symbol_pipe unless it works. |
| 877 | if test "$pipe_works" = yes; then |
| 878 | break |
| 879 | else |
| 880 | lt_cv_sys_global_symbol_pipe= |
| 881 | fi |
| 882 | done |
| 883 | ]) |
| 884 | global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" |
| 885 | if test -z "$lt_cv_sys_global_symbol_pipe"; then |
| 886 | global_symbol_to_cdecl= |
| 887 | global_symbol_to_c_name_address= |
| 888 | else |
| 889 | global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" |
| 890 | global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" |
| 891 | fi |
| 892 | if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; |
| 893 | then |
| 894 | AC_MSG_RESULT(failed) |
| 895 | else |
| 896 | AC_MSG_RESULT(ok) |
| 897 | fi |
| 898 | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 899 | |
| 900 | # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
| 901 | # --------------------------------- |
| 902 | AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], |
| 903 | [# Find the correct PATH separator. Usually this is `:', but |
| 904 | # DJGPP uses `;' like DOS. |
| 905 | if test "X${PATH_SEPARATOR+set}" != Xset; then |
| 906 | UNAME=${UNAME-`uname 2>/dev/null`} |
| 907 | case X$UNAME in |
| 908 | *-DOS) lt_cv_sys_path_separator=';' ;; |
| 909 | *) lt_cv_sys_path_separator=':' ;; |
| 910 | esac |
| 911 | PATH_SEPARATOR=$lt_cv_sys_path_separator |
| 912 | fi |
| 913 | ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
970 | | ])])# _LT_AC_PROG_ECHO_BACKSLASH |
971 | | |
972 | | |
973 | | # _LT_AC_LOCK |
974 | | # ----------- |
975 | | AC_DEFUN([_LT_AC_LOCK], |
976 | | [AC_ARG_ENABLE([libtool-lock], |
977 | | [AC_HELP_STRING([--disable-libtool-lock], |
978 | | [avoid locking (might break parallel builds)])]) |
979 | | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
980 | | |
981 | | # Some flags need to be propagated to the compiler or linker for good |
982 | | # libtool support. |
983 | | case $host in |
984 | | ia64-*-hpux*) |
985 | | # Find out which ABI we are using. |
986 | | echo 'int i;' > conftest.$ac_ext |
987 | | if AC_TRY_EVAL(ac_compile); then |
988 | | case `/usr/bin/file conftest.$ac_objext` in |
989 | | *ELF-32*) |
990 | | HPUX_IA64_MODE="32" |
991 | | ;; |
992 | | *ELF-64*) |
993 | | HPUX_IA64_MODE="64" |
994 | | ;; |
995 | | esac |
996 | | fi |
997 | | rm -rf conftest* |
998 | | ;; |
999 | | *-*-irix6*) |
1000 | | # Find out which ABI we are using. |
1001 | | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
1002 | | if AC_TRY_EVAL(ac_compile); then |
1003 | | if test "$lt_cv_prog_gnu_ld" = yes; then |
1004 | | case `/usr/bin/file conftest.$ac_objext` in |
1005 | | *32-bit*) |
1006 | | LD="${LD-ld} -melf32bsmip" |
1007 | | ;; |
1008 | | *N32*) |
1009 | | LD="${LD-ld} -melf32bmipn32" |
1010 | | ;; |
1011 | | *64-bit*) |
1012 | | LD="${LD-ld} -melf64bmip" |
1013 | | ;; |
1014 | | esac |
1015 | | else |
1016 | | case `/usr/bin/file conftest.$ac_objext` in |
1017 | | *32-bit*) |
1018 | | LD="${LD-ld} -32" |
1019 | | ;; |
1020 | | *N32*) |
1021 | | LD="${LD-ld} -n32" |
1022 | | ;; |
1023 | | *64-bit*) |
1024 | | LD="${LD-ld} -64" |
1025 | | ;; |
1026 | | esac |
1027 | | fi |
1028 | | fi |
1029 | | rm -rf conftest* |
1030 | | ;; |
1031 | | |
1032 | | x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) |
1033 | | # Find out which ABI we are using. |
1034 | | echo 'int i;' > conftest.$ac_ext |
1035 | | if AC_TRY_EVAL(ac_compile); then |
1036 | | case "`/usr/bin/file conftest.o`" in |
1037 | | *32-bit*) |
1038 | | case $host in |
1039 | | x86_64-*linux*) |
1040 | | LD="${LD-ld} -m elf_i386" |
1041 | | ;; |
1042 | | ppc64-*linux*|powerpc64-*linux*) |
1043 | | LD="${LD-ld} -m elf32ppclinux" |
1044 | | ;; |
1045 | | s390x-*linux*) |
1046 | | LD="${LD-ld} -m elf_s390" |
1047 | | ;; |
1048 | | sparc64-*linux*) |
1049 | | LD="${LD-ld} -m elf32_sparc" |
1050 | | ;; |
1051 | | esac |
1052 | | ;; |
1053 | | *64-bit*) |
1054 | | case $host in |
1055 | | x86_64-*linux*) |
1056 | | LD="${LD-ld} -m elf_x86_64" |
1057 | | ;; |
1058 | | ppc*-*linux*|powerpc*-*linux*) |
1059 | | LD="${LD-ld} -m elf64ppc" |
1060 | | ;; |
1061 | | s390*-*linux*) |
1062 | | LD="${LD-ld} -m elf64_s390" |
1063 | | ;; |
1064 | | sparc*-*linux*) |
1065 | | LD="${LD-ld} -m elf64_sparc" |
1066 | | ;; |
1067 | | esac |
1068 | | ;; |
1069 | | esac |
1070 | | fi |
1071 | | rm -rf conftest* |
1072 | | ;; |
1073 | | |
1074 | | *-*-linux*) |
1075 | | # Test if the compiler is 64bit |
1076 | | echo 'int i;' > conftest.$ac_ext |
1077 | | lt_cv_cc_64bit_output=no |
1078 | | if AC_TRY_EVAL(ac_compile); then |
1079 | | case `/usr/bin/file conftest.$ac_objext` in |
1080 | | *"ELF 64"*) |
1081 | | lt_cv_cc_64bit_output=yes |
1082 | | ;; |
1083 | | esac |
1084 | | fi |
1085 | | rm -rf conftest* |
1086 | | ;; |
1087 | | |
1088 | | *-*-sco3.2v5*) |
1089 | | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
1090 | | SAVE_CFLAGS="$CFLAGS" |
1091 | | CFLAGS="$CFLAGS -belf" |
1092 | | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
1093 | | [AC_LANG_PUSH(C) |
1094 | | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
1095 | | AC_LANG_POP]) |
1096 | | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
1097 | | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
1098 | | CFLAGS="$SAVE_CFLAGS" |
1099 | | fi |
1100 | | ;; |
1101 | | AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], |
1102 | | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
1103 | | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
1104 | | AC_CHECK_TOOL(AS, as, false) |
1105 | | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
1106 | | ;; |
1107 | | ]) |
1108 | | esac |
1109 | | |
1110 | | need_locks="$enable_libtool_lock" |
1111 | | |
1112 | | ])# _LT_AC_LOCK |
1113 | | |
1114 | | |
1115 | | # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
1116 | | # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) |
1117 | | # ---------------------------------------------------------------- |
1118 | | # Check whether the given compiler option works |
1119 | | AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], |
1120 | | [AC_REQUIRE([LT_AC_PROG_SED]) |
1121 | | AC_CACHE_CHECK([$1], [$2], |
1122 | | [$2=no |
1123 | | ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) |
1124 | | printf "$lt_simple_compile_test_code" > conftest.$ac_ext |
1125 | | lt_compiler_flag="$3" |
1126 | | # Insert the option either (1) after the last *FLAGS variable, or |
1127 | | # (2) before a word containing "conftest.", or (3) at the end. |
1128 | | # Note that $ac_compile itself does not contain backslashes and begins |
1129 | | # with a dollar sign (not a hyphen), so the echo should work correctly. |
1130 | | # The option is referenced via a variable to avoid confusing sed. |
1131 | | lt_compile=`echo "$ac_compile" | $SED \ |
1132 | | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ |
1133 | | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ |
1134 | | -e 's:$: $lt_compiler_flag:'` |
1135 | | (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) |
1136 | | (eval "$lt_compile" 2>conftest.err) |
1137 | | ac_status=$? |
1138 | | cat conftest.err >&AS_MESSAGE_LOG_FD |
1139 | | echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
1140 | | if (exit $ac_status) && test -s "$ac_outfile"; then |
1141 | | # The compiler can only warn and ignore the option if not recognized |
1142 | | # So say no if there are warnings |
1143 | | if test ! -s conftest.err; then |
1144 | | $2=yes |
1145 | | fi |
1146 | | fi |
1147 | | $rm conftest* |
1148 | | ]) |
1149 | | |
1150 | | if test x"[$]$2" = xyes; then |
1151 | | ifelse([$5], , :, [$5]) |
1152 | | else |
1153 | | ifelse([$6], , :, [$6]) |
1154 | | fi |
1155 | | ])# AC_LIBTOOL_COMPILER_OPTION |
1156 | | |
1157 | | |
1158 | | # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
1159 | | # [ACTION-SUCCESS], [ACTION-FAILURE]) |
1160 | | # ------------------------------------------------------------ |
1161 | | # Check whether the given compiler option works |
1162 | | AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], |
1163 | | [AC_CACHE_CHECK([$1], [$2], |
1164 | | [$2=no |
1165 | | save_LDFLAGS="$LDFLAGS" |
1166 | | LDFLAGS="$LDFLAGS $3" |
1167 | | printf "$lt_simple_link_test_code" > conftest.$ac_ext |
1168 | | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then |
1169 | | # The compiler can only warn and ignore the option if not recognized |
1170 | | # So say no if there are warnings |
1171 | | if test -s conftest.err; then |
1172 | | # Append any errors to the config.log. |
1173 | | cat conftest.err 1>&AS_MESSAGE_LOG_FD |
1174 | | else |
1175 | | $2=yes |
1176 | | fi |
1177 | | fi |
1178 | | $rm conftest* |
1179 | | LDFLAGS="$save_LDFLAGS" |
1180 | | ]) |
1181 | | |
1182 | | if test x"[$]$2" = xyes; then |
1183 | | ifelse([$4], , :, [$4]) |
1184 | | else |
1185 | | ifelse([$5], , :, [$5]) |
1186 | | fi |
1187 | | ])# AC_LIBTOOL_LINKER_OPTION |
1188 | | |
1189 | | |
1190 | | # AC_LIBTOOL_SYS_MAX_CMD_LEN |
1191 | | # -------------------------- |
1192 | | AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], |
1193 | | [# find the maximum length of command line arguments |
1194 | | AC_MSG_CHECKING([the maximum length of command line arguments]) |
1195 | | AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl |
1196 | | i=0 |
1197 | | testring="ABCD" |
1198 | | |
1199 | | case $build_os in |
1200 | | msdosdjgpp*) |
1201 | | # On DJGPP, this test can blow up pretty badly due to problems in libc |
1202 | | # (any single argument exceeding 2000 bytes causes a buffer overrun |
1203 | | # during glob expansion). Even if it were fixed, the result of this |
1204 | | # check would be larger than it should be. |
1205 | | lt_cv_sys_max_cmd_len=12288; # 12K is about right |
1206 | | ;; |
1207 | | |
1208 | | gnu*) |
1209 | | # Under GNU Hurd, this test is not required because there is |
1210 | | # no limit to the length of command line arguments. |
1211 | | # Libtool will interpret -1 as no limit whatsoever |
1212 | | lt_cv_sys_max_cmd_len=-1; |
1213 | | ;; |
1214 | | |
1215 | | cygwin* | mingw*) |
1216 | | # On Win9x/ME, this test blows up -- it succeeds, but takes |
1217 | | # about 5 minutes as the teststring grows exponentially. |
1218 | | # Worse, since 9x/ME are not pre-emptively multitasking, |
1219 | | # you end up with a "frozen" computer, even though with patience |
1220 | | # the test eventually succeeds (with a max line length of 256k). |
1221 | | # Instead, let's just punt: use the minimum linelength reported by |
1222 | | # all of the supported platforms: 8192 (on NT/2K/XP). |
1223 | | lt_cv_sys_max_cmd_len=8192; |
1224 | | ;; |
1225 | | |
1226 | | amigaos*) |
1227 | | # On AmigaOS with pdksh, this test takes hours, literally. |
1228 | | # So we just punt and use a minimum line length of 8192. |
1229 | | lt_cv_sys_max_cmd_len=8192; |
1230 | | ;; |
1231 | | |
1232 | | *) |
1233 | | # If test is not a shell built-in, we'll probably end up computing a |
1234 | | # maximum length that is only half of the actual maximum length, but |
1235 | | # we can't tell. |
1236 | | while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ |
1237 | | = "XX$testring") >/dev/null 2>&1 && |
1238 | | new_result=`expr "X$testring" : ".*" 2>&1` && |
1239 | | lt_cv_sys_max_cmd_len=$new_result && |
1240 | | test $i != 17 # 1/2 MB should be enough |
1241 | | do |
1242 | | i=`expr $i + 1` |
1243 | | testring=$testring$testring |
1244 | | done |
1245 | | testring= |
1246 | | # Add a significant safety factor because C++ compilers can tack on massive |
1247 | | # amounts of additional arguments before passing them to the linker. |
1248 | | # It appears as though 1/2 is a usable value. |
1249 | | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` |
1250 | | ;; |
1251 | | esac |
1252 | | ]) |
1253 | | if test -n $lt_cv_sys_max_cmd_len ; then |
1254 | | AC_MSG_RESULT($lt_cv_sys_max_cmd_len) |
1255 | | else |
1256 | | AC_MSG_RESULT(none) |
1257 | | fi |
1258 | | ])# AC_LIBTOOL_SYS_MAX_CMD_LEN |
1259 | | |
1260 | | |
1261 | | # _LT_AC_CHECK_DLFCN |
1262 | | # -------------------- |
1263 | | AC_DEFUN([_LT_AC_CHECK_DLFCN], |
1264 | | [AC_CHECK_HEADERS(dlfcn.h)dnl |
1265 | | ])# _LT_AC_CHECK_DLFCN |
1266 | | |
| 1070 | AC_DIVERT_POP |
| 1071 | ])# _LT_AC_PROG_ECHO_BACKSLASH |
1543 | | ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS |
1544 | | |
1545 | | |
1546 | | # AC_LIBTOOL_OBJDIR |
1547 | | # ----------------- |
1548 | | AC_DEFUN([AC_LIBTOOL_OBJDIR], |
1549 | | [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], |
1550 | | [rm -f .libs 2>/dev/null |
1551 | | mkdir .libs 2>/dev/null |
1552 | | if test -d .libs; then |
1553 | | lt_cv_objdir=.libs |
| 1672 | |
| 1673 | if test "$GCC" = yes; then |
| 1674 | # Check to see if options -fno-rtti -fno-exceptions are supported by compiler |
| 1675 | AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) |
| 1676 | echo "int some_variable = 0;" > conftest.$ac_ext |
| 1677 | save_CFLAGS="$CFLAGS" |
| 1678 | CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" |
| 1679 | compiler_rtti_exceptions=no |
| 1680 | AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
| 1681 | # The compiler can only warn and ignore the option if not recognized |
| 1682 | # So say no if there are warnings |
| 1683 | if test -s conftest.err; then |
| 1684 | compiler_rtti_exceptions=no |
| 1685 | else |
| 1686 | compiler_rtti_exceptions=yes |
| 1687 | fi |
| 1688 | ]) |
| 1689 | CFLAGS="$save_CFLAGS" |
| 1690 | AC_MSG_RESULT([$compiler_rtti_exceptions]) |
| 1691 | |
| 1692 | if test "$compiler_rtti_exceptions" = "yes"; then |
| 1693 | no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' |
| 1694 | else |
| 1695 | no_builtin_flag=' -fno-builtin' |
| 1696 | fi |
| 1697 | fi |
| 1698 | |
| 1699 | # See if the linker supports building shared libraries. |
| 1700 | AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) |
| 1701 | |
| 1702 | allow_undefined_flag= |
| 1703 | no_undefined_flag= |
| 1704 | need_lib_prefix=unknown |
| 1705 | need_version=unknown |
| 1706 | # when you set need_version to no, make sure it does not cause -set_version |
| 1707 | # flags to be left without arguments |
| 1708 | archive_cmds= |
| 1709 | archive_expsym_cmds= |
| 1710 | old_archive_from_new_cmds= |
| 1711 | old_archive_from_expsyms_cmds= |
| 1712 | export_dynamic_flag_spec= |
| 1713 | whole_archive_flag_spec= |
| 1714 | thread_safe_flag_spec= |
| 1715 | hardcode_into_libs=no |
| 1716 | hardcode_libdir_flag_spec= |
| 1717 | hardcode_libdir_separator= |
| 1718 | hardcode_direct=no |
| 1719 | hardcode_minus_L=no |
| 1720 | hardcode_shlibpath_var=unsupported |
| 1721 | runpath_var= |
| 1722 | link_all_deplibs=unknown |
| 1723 | always_export_symbols=no |
| 1724 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 1725 | # include_expsyms should be a list of space-separated symbols to be *always* |
| 1726 | # included in the symbol list |
| 1727 | include_expsyms= |
| 1728 | # exclude_expsyms can be an egrep regular expression of symbols to exclude |
| 1729 | # it will be wrapped by ` (' and `)$', so one must not match beginning or |
| 1730 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
| 1731 | # as well as any symbol that contains `d'. |
| 1732 | exclude_expsyms="_GLOBAL_OFFSET_TABLE_" |
| 1733 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
| 1734 | # platforms (ab)use it in PIC code, but their linkers get confused if |
| 1735 | # the symbol is explicitly referenced. Since portable code cannot |
| 1736 | # rely on this symbol name, it's probably fine to never include it in |
| 1737 | # preloaded symbol tables. |
| 1738 | extract_expsyms_cmds= |
| 1739 | |
| 1740 | case $host_os in |
| 1741 | cygwin* | mingw* | pw32*) |
| 1742 | # FIXME: the MSVC++ port hasn't been tested in a loooong time |
| 1743 | # When not using gcc, we currently assume that we are using |
| 1744 | # Microsoft Visual C++. |
| 1745 | if test "$GCC" != yes; then |
| 1746 | with_gnu_ld=no |
| 1747 | fi |
| 1748 | ;; |
| 1749 | openbsd*) |
| 1750 | with_gnu_ld=no |
| 1751 | ;; |
| 1752 | esac |
| 1753 | |
| 1754 | ld_shlibs=yes |
| 1755 | if test "$with_gnu_ld" = yes; then |
| 1756 | # If archive_cmds runs LD, not CC, wlarc should be empty |
| 1757 | wlarc='${wl}' |
| 1758 | |
| 1759 | # See if GNU ld supports shared libraries. |
| 1760 | case $host_os in |
| 1761 | aix3* | aix4* | aix5*) |
| 1762 | # On AIX, the GNU linker is very broken |
| 1763 | # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. |
| 1764 | ld_shlibs=no |
| 1765 | cat <<EOF 1>&2 |
| 1766 | |
| 1767 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported |
| 1768 | *** to be unable to reliably create shared libraries on AIX. |
| 1769 | *** Therefore, libtool is disabling shared libraries support. If you |
| 1770 | *** really care for shared libraries, you may want to modify your PATH |
| 1771 | *** so that a non-GNU linker is found, and then restart. |
| 1772 | |
| 1773 | EOF |
| 1774 | ;; |
| 1775 | |
| 1776 | amigaos*) |
| 1777 | archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
| 1778 | hardcode_libdir_flag_spec='-L$libdir' |
| 1779 | hardcode_minus_L=yes |
| 1780 | |
| 1781 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
| 1782 | # that the semantics of dynamic libraries on AmigaOS, at least up |
| 1783 | # to version 4, is to share data among multiple programs linked |
| 1784 | # with the same dynamic library. Since this doesn't match the |
| 1785 | # behavior of shared libraries on other platforms, we can use |
| 1786 | # them. |
| 1787 | ld_shlibs=no |
| 1788 | ;; |
| 1789 | |
| 1790 | beos*) |
| 1791 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 1792 | allow_undefined_flag=unsupported |
| 1793 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
| 1794 | # support --undefined. This deserves some investigation. FIXME |
| 1795 | archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 1796 | else |
| 1797 | ld_shlibs=no |
| 1798 | fi |
| 1799 | ;; |
| 1800 | |
| 1801 | cygwin* | mingw* | pw32*) |
| 1802 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
| 1803 | # no search path for DLLs. |
| 1804 | hardcode_libdir_flag_spec='-L$libdir' |
| 1805 | allow_undefined_flag=unsupported |
| 1806 | always_export_symbols=yes |
| 1807 | |
| 1808 | extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ |
| 1809 | sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ |
| 1810 | test -f $output_objdir/impgen.exe || (cd $output_objdir && \ |
| 1811 | if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ |
| 1812 | else $CC -o impgen impgen.c ; fi)~ |
| 1813 | $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' |
| 1814 | |
| 1815 | old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' |
| 1816 | |
| 1817 | # cygwin and mingw dlls have different entry points and sets of symbols |
| 1818 | # to exclude. |
| 1819 | # FIXME: what about values for MSVC? |
| 1820 | dll_entry=__cygwin_dll_entry@12 |
| 1821 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ |
| 1822 | case $host_os in |
| 1823 | mingw*) |
| 1824 | # mingw values |
| 1825 | dll_entry=_DllMainCRTStartup@12 |
| 1826 | dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ |
| 1827 | ;; |
| 1828 | esac |
| 1829 | |
| 1830 | # mingw and cygwin differ, and it's simplest to just exclude the union |
| 1831 | # of the two symbol sets. |
| 1832 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 |
| 1833 | |
| 1834 | # recent cygwin and mingw systems supply a stub DllMain which the user |
| 1835 | # can override, but on older systems we have to supply one (in ltdll.c) |
| 1836 | if test "x$lt_cv_need_dllmain" = "xyes"; then |
| 1837 | ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " |
| 1838 | ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ |
| 1839 | test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' |
| 1840 | else |
| 1841 | ltdll_obj= |
| 1842 | ltdll_cmds= |
| 1843 | fi |
| 1844 | |
| 1845 | # Extract the symbol export list from an `--export-all' def file, |
| 1846 | # then regenerate the def file from the symbol export list, so that |
| 1847 | # the compiled dll only exports the symbol export list. |
| 1848 | # Be careful not to strip the DATA tag left be newer dlltools. |
| 1849 | export_symbols_cmds="$ltdll_cmds"' |
| 1850 | $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ |
| 1851 | sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' |
| 1852 | |
| 1853 | # If the export-symbols file already is a .def file (1st line |
| 1854 | # is EXPORTS), use it as is. |
| 1855 | # If DATA tags from a recent dlltool are present, honour them! |
| 1856 | archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then |
| 1857 | cp $export_symbols $output_objdir/$soname-def; |
| 1858 | else |
| 1859 | echo EXPORTS > $output_objdir/$soname-def; |
| 1860 | _lt_hint=1; |
| 1861 | cat $export_symbols | while read symbol; do |
| 1862 | set dummy \$symbol; |
| 1863 | case \[$]# in |
| 1864 | 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; |
| 1865 | *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; |
| 1866 | esac; |
| 1867 | _lt_hint=`expr 1 + \$_lt_hint`; |
| 1868 | done; |
| 1869 | fi~ |
| 1870 | '"$ltdll_cmds"' |
| 1871 | $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
| 1872 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ |
| 1873 | $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
| 1874 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ |
| 1875 | $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' |
| 1876 | ;; |
| 1877 | |
| 1878 | netbsd*) |
| 1879 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 1880 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
| 1881 | wlarc= |
| 1882 | else |
| 1883 | archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 1884 | archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
| 1885 | fi |
| 1886 | ;; |
| 1887 | |
| 1888 | solaris* | sysv5*) |
| 1889 | if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
| 1890 | ld_shlibs=no |
| 1891 | cat <<EOF 1>&2 |
| 1892 | |
| 1893 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
| 1894 | *** create shared libraries on Solaris systems. Therefore, libtool |
| 1895 | *** is disabling shared libraries support. We urge you to upgrade GNU |
| 1896 | *** binutils to release 2.9.1 or newer. Another option is to modify |
| 1897 | *** your PATH or compiler configuration so that the native linker is |
| 1898 | *** used, and then restart. |
| 1899 | |
| 1900 | EOF |
| 1901 | elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 1902 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 1903 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
| 1904 | else |
| 1905 | ld_shlibs=no |
| 1906 | fi |
| 1907 | ;; |
| 1908 | |
| 1909 | sunos4*) |
| 1910 | archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 1911 | wlarc= |
| 1912 | hardcode_direct=yes |
| 1913 | hardcode_shlibpath_var=no |
| 1914 | ;; |
| 1915 | |
| 1916 | *) |
| 1917 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 1918 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 1919 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
| 1920 | else |
| 1921 | ld_shlibs=no |
| 1922 | fi |
| 1923 | ;; |
| 1924 | esac |
| 1925 | |
| 1926 | if test "$ld_shlibs" = yes; then |
| 1927 | runpath_var=LD_RUN_PATH |
| 1928 | hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' |
| 1929 | export_dynamic_flag_spec='${wl}--export-dynamic' |
| 1930 | case $host_os in |
| 1931 | cygwin* | mingw* | pw32*) |
| 1932 | # dlltool doesn't understand --whole-archive et. al. |
| 1933 | whole_archive_flag_spec= |
| 1934 | ;; |
| 1935 | *) |
| 1936 | # ancient GNU ld didn't support --whole-archive et. al. |
| 1937 | if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
| 1938 | whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
| 1939 | else |
| 1940 | whole_archive_flag_spec= |
| 1941 | fi |
| 1942 | ;; |
| 1943 | esac |
| 1944 | fi |
1555 | | # MS-DOS does not allow filenames that begin with a dot. |
1556 | | lt_cv_objdir=_libs |
1557 | | fi |
1558 | | rmdir .libs 2>/dev/null]) |
1559 | | objdir=$lt_cv_objdir |
1560 | | ])# AC_LIBTOOL_OBJDIR |
1561 | | |
1562 | | |
1563 | | # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) |
1564 | | # ---------------------------------------------- |
| 1946 | # PORTME fill in a description of your system's linker (not GNU ld) |
| 1947 | case $host_os in |
| 1948 | aix3*) |
| 1949 | allow_undefined_flag=unsupported |
| 1950 | always_export_symbols=yes |
| 1951 | archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' |
| 1952 | # Note: this linker hardcodes the directories in LIBPATH if there |
| 1953 | # are no directories specified by -L. |
| 1954 | hardcode_minus_L=yes |
| 1955 | if test "$GCC" = yes && test -z "$link_static_flag"; then |
| 1956 | # Neither direct hardcoding nor static linking is supported with a |
| 1957 | # broken collect2. |
| 1958 | hardcode_direct=unsupported |
| 1959 | fi |
| 1960 | ;; |
| 1961 | |
| 1962 | aix4* | aix5*) |
| 1963 | if test "$host_cpu" = ia64; then |
| 1964 | # On IA64, the linker does run time linking by default, so we don't |
| 1965 | # have to do anything special. |
| 1966 | aix_use_runtimelinking=no |
| 1967 | exp_sym_flag='-Bexport' |
| 1968 | no_entry_flag="" |
| 1969 | else |
| 1970 | aix_use_runtimelinking=no |
| 1971 | |
| 1972 | # Test if we are trying to use run time linking or normal |
| 1973 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
| 1974 | # need to do runtime linking. |
| 1975 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
| 1976 | for ld_flag in $LDFLAGS; do |
| 1977 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
| 1978 | aix_use_runtimelinking=yes |
| 1979 | break |
| 1980 | fi |
| 1981 | done |
| 1982 | esac |
| 1983 | |
| 1984 | exp_sym_flag='-bexport' |
| 1985 | no_entry_flag='-bnoentry' |
| 1986 | fi |
| 1987 | |
| 1988 | # When large executables or shared objects are built, AIX ld can |
| 1989 | # have problems creating the table of contents. If linking a library |
| 1990 | # or program results in "error TOC overflow" add -mminimal-toc to |
| 1991 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
| 1992 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
| 1993 | |
| 1994 | hardcode_direct=yes |
| 1995 | archive_cmds='' |
| 1996 | hardcode_libdir_separator=':' |
| 1997 | if test "$GCC" = yes; then |
| 1998 | case $host_os in aix4.[[012]]|aix4.[[012]].*) |
| 1999 | collect2name=`${CC} -print-prog-name=collect2` |
| 2000 | if test -f "$collect2name" && \ |
| 2001 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
| 2002 | then |
| 2003 | # We have reworked collect2 |
| 2004 | hardcode_direct=yes |
| 2005 | else |
| 2006 | # We have old collect2 |
| 2007 | hardcode_direct=unsupported |
| 2008 | # It fails to find uninstalled libraries when the uninstalled |
| 2009 | # path is not listed in the libpath. Setting hardcode_minus_L |
| 2010 | # to unsupported forces relinking |
| 2011 | hardcode_minus_L=yes |
| 2012 | hardcode_libdir_flag_spec='-L$libdir' |
| 2013 | hardcode_libdir_separator= |
| 2014 | fi |
| 2015 | esac |
| 2016 | |
| 2017 | shared_flag='-shared' |
| 2018 | else |
| 2019 | # not using gcc |
| 2020 | if test "$host_cpu" = ia64; then |
| 2021 | shared_flag='${wl}-G' |
| 2022 | else |
| 2023 | if test "$aix_use_runtimelinking" = yes; then |
| 2024 | shared_flag='${wl}-G' |
| 2025 | else |
| 2026 | shared_flag='${wl}-bM:SRE' |
| 2027 | fi |
| 2028 | fi |
| 2029 | fi |
| 2030 | |
| 2031 | # It seems that -bexpall can do strange things, so it is better to |
| 2032 | # generate a list of symbols to export. |
| 2033 | always_export_symbols=yes |
| 2034 | if test "$aix_use_runtimelinking" = yes; then |
| 2035 | # Warning - without using the other runtime loading flags (-brtl), |
| 2036 | # -berok will link without error, but may produce a broken library. |
| 2037 | allow_undefined_flag='-berok' |
| 2038 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' |
| 2039 | archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
| 2040 | else |
| 2041 | if test "$host_cpu" = ia64; then |
| 2042 | hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
| 2043 | allow_undefined_flag="-z nodefs" |
| 2044 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
| 2045 | else |
| 2046 | hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' |
| 2047 | # Warning - without using the other run time loading flags, |
| 2048 | # -berok will link without error, but may produce a broken library. |
| 2049 | allow_undefined_flag='${wl}-berok' |
| 2050 | # This is a bit strange, but is similar to how AIX traditionally builds |
| 2051 | # it's shared libraries. |
| 2052 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' |
| 2053 | fi |
| 2054 | fi |
| 2055 | ;; |
| 2056 | |
| 2057 | amigaos*) |
| 2058 | archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
| 2059 | hardcode_libdir_flag_spec='-L$libdir' |
| 2060 | hardcode_minus_L=yes |
| 2061 | # see comment about different semantics on the GNU ld section |
| 2062 | ld_shlibs=no |
| 2063 | ;; |
| 2064 | |
| 2065 | cygwin* | mingw* | pw32*) |
| 2066 | # When not using gcc, we currently assume that we are using |
| 2067 | # Microsoft Visual C++. |
| 2068 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
| 2069 | # no search path for DLLs. |
| 2070 | hardcode_libdir_flag_spec=' ' |
| 2071 | allow_undefined_flag=unsupported |
| 2072 | # Tell ltmain to make .lib files, not .a files. |
| 2073 | libext=lib |
| 2074 | # FIXME: Setting linknames here is a bad hack. |
| 2075 | archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
| 2076 | # The linker will automatically build a .lib file if we build a DLL. |
| 2077 | old_archive_from_new_cmds='true' |
| 2078 | # FIXME: Should let the user specify the lib program. |
| 2079 | old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' |
| 2080 | fix_srcfile_path='`cygpath -w "$srcfile"`' |
| 2081 | ;; |
| 2082 | |
| 2083 | darwin* | rhapsody*) |
| 2084 | case "$host_os" in |
| 2085 | rhapsody* | darwin1.[[012]]) |
| 2086 | allow_undefined_flag='-undefined suppress' |
| 2087 | ;; |
| 2088 | *) # Darwin 1.3 on |
| 2089 | allow_undefined_flag='-flat_namespace -undefined suppress' |
| 2090 | ;; |
| 2091 | esac |
| 2092 | # FIXME: Relying on posixy $() will cause problems for |
| 2093 | # cross-compilation, but unfortunately the echo tests do not |
| 2094 | # yet detect zsh echo's removal of \ escapes. Also zsh mangles |
| 2095 | # `"' quotes if we put them in here... so don't! |
| 2096 | archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' |
| 2097 | # We need to add '_' to the symbols in $export_symbols first |
| 2098 | #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' |
| 2099 | hardcode_direct=yes |
| 2100 | hardcode_shlibpath_var=no |
| 2101 | whole_archive_flag_spec='-all_load $convenience' |
| 2102 | ;; |
| 2103 | |
| 2104 | freebsd1*) |
| 2105 | ld_shlibs=no |
| 2106 | ;; |
| 2107 | |
| 2108 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
| 2109 | # support. Future versions do this automatically, but an explicit c++rt0.o |
| 2110 | # does not break anything, and helps significantly (at the cost of a little |
| 2111 | # extra space). |
| 2112 | freebsd2.2*) |
| 2113 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
| 2114 | hardcode_libdir_flag_spec='-R$libdir' |
| 2115 | hardcode_direct=yes |
| 2116 | hardcode_shlibpath_var=no |
| 2117 | ;; |
| 2118 | |
| 2119 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
| 2120 | freebsd2*) |
| 2121 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 2122 | hardcode_direct=yes |
| 2123 | hardcode_minus_L=yes |
| 2124 | hardcode_shlibpath_var=no |
| 2125 | ;; |
| 2126 | |
| 2127 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
| 2128 | freebsd*) |
| 2129 | archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
| 2130 | hardcode_libdir_flag_spec='-R$libdir' |
| 2131 | hardcode_direct=yes |
| 2132 | hardcode_shlibpath_var=no |
| 2133 | ;; |
| 2134 | |
| 2135 | hpux9* | hpux10* | hpux11*) |
| 2136 | case $host_os in |
| 2137 | hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; |
| 2138 | *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; |
| 2139 | esac |
| 2140 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
| 2141 | hardcode_libdir_separator=: |
| 2142 | hardcode_direct=yes |
| 2143 | hardcode_minus_L=yes # Not in the search PATH, but as the default |
| 2144 | # location of the library. |
| 2145 | export_dynamic_flag_spec='${wl}-E' |
| 2146 | ;; |
| 2147 | |
| 2148 | irix5* | irix6* | nonstopux*) |
| 2149 | if test "$GCC" = yes; then |
| 2150 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
| 2151 | else |
| 2152 | archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
| 2153 | fi |
| 2154 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 2155 | hardcode_libdir_separator=: |
| 2156 | link_all_deplibs=yes |
| 2157 | ;; |
| 2158 | |
| 2159 | netbsd*) |
| 2160 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 2161 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
| 2162 | else |
| 2163 | archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
| 2164 | fi |
| 2165 | hardcode_libdir_flag_spec='-R$libdir' |
| 2166 | hardcode_direct=yes |
| 2167 | hardcode_shlibpath_var=no |
| 2168 | ;; |
| 2169 | |
| 2170 | newsos6) |
| 2171 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2172 | hardcode_direct=yes |
| 2173 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 2174 | hardcode_libdir_separator=: |
| 2175 | hardcode_shlibpath_var=no |
| 2176 | ;; |
| 2177 | |
| 2178 | openbsd*) |
| 2179 | hardcode_direct=yes |
| 2180 | hardcode_shlibpath_var=no |
| 2181 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 2182 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
| 2183 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
| 2184 | export_dynamic_flag_spec='${wl}-E' |
| 2185 | else |
| 2186 | case "$host_os" in |
| 2187 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) |
| 2188 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 2189 | hardcode_libdir_flag_spec='-R$libdir' |
| 2190 | ;; |
| 2191 | *) |
| 2192 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
| 2193 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
| 2194 | ;; |
| 2195 | esac |
| 2196 | fi |
| 2197 | ;; |
| 2198 | |
| 2199 | os2*) |
| 2200 | hardcode_libdir_flag_spec='-L$libdir' |
| 2201 | hardcode_minus_L=yes |
| 2202 | allow_undefined_flag=unsupported |
| 2203 | archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' |
| 2204 | old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
| 2205 | ;; |
| 2206 | |
| 2207 | osf3*) |
| 2208 | if test "$GCC" = yes; then |
| 2209 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
| 2210 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
| 2211 | else |
| 2212 | allow_undefined_flag=' -expect_unresolved \*' |
| 2213 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
| 2214 | fi |
| 2215 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 2216 | hardcode_libdir_separator=: |
| 2217 | ;; |
| 2218 | |
| 2219 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
| 2220 | if test "$GCC" = yes; then |
| 2221 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
| 2222 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
| 2223 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 2224 | else |
| 2225 | allow_undefined_flag=' -expect_unresolved \*' |
| 2226 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
| 2227 | archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
| 2228 | $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' |
| 2229 | |
| 2230 | #Both c and cxx compiler support -rpath directly |
| 2231 | hardcode_libdir_flag_spec='-rpath $libdir' |
| 2232 | fi |
| 2233 | hardcode_libdir_separator=: |
| 2234 | ;; |
| 2235 | |
| 2236 | sco3.2v5*) |
| 2237 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2238 | hardcode_shlibpath_var=no |
| 2239 | runpath_var=LD_RUN_PATH |
| 2240 | hardcode_runpath_var=yes |
| 2241 | export_dynamic_flag_spec='${wl}-Bexport' |
| 2242 | ;; |
| 2243 | |
| 2244 | solaris*) |
| 2245 | # gcc --version < 3.0 without binutils cannot create self contained |
| 2246 | # shared libraries reliably, requiring libgcc.a to resolve some of |
| 2247 | # the object symbols generated in some cases. Libraries that use |
| 2248 | # assert need libgcc.a to resolve __eprintf, for example. Linking |
| 2249 | # a copy of libgcc.a into every shared library to guarantee resolving |
| 2250 | # such symbols causes other problems: According to Tim Van Holder |
| 2251 | # <tim.van.holder@pandora.be>, C++ libraries end up with a separate |
| 2252 | # (to the application) exception stack for one thing. |
| 2253 | no_undefined_flag=' -z defs' |
| 2254 | if test "$GCC" = yes; then |
| 2255 | case `$CC --version 2>/dev/null` in |
| 2256 | [[12]].*) |
| 2257 | cat <<EOF 1>&2 |
| 2258 | |
| 2259 | *** Warning: Releases of GCC earlier than version 3.0 cannot reliably |
| 2260 | *** create self contained shared libraries on Solaris systems, without |
| 2261 | *** introducing a dependency on libgcc.a. Therefore, libtool is disabling |
| 2262 | *** -no-undefined support, which will at least allow you to build shared |
| 2263 | *** libraries. However, you may find that when you link such libraries |
| 2264 | *** into an application without using GCC, you have to manually add |
| 2265 | *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to |
| 2266 | *** upgrade to a newer version of GCC. Another option is to rebuild your |
| 2267 | *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. |
| 2268 | |
| 2269 | EOF |
| 2270 | no_undefined_flag= |
| 2271 | ;; |
| 2272 | esac |
| 2273 | fi |
| 2274 | # $CC -shared without GNU ld will not create a library from C++ |
| 2275 | # object files and a static libstdc++, better avoid it by now |
| 2276 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2277 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 2278 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
| 2279 | hardcode_libdir_flag_spec='-R$libdir' |
| 2280 | hardcode_shlibpath_var=no |
| 2281 | case $host_os in |
| 2282 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
| 2283 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) |
| 2284 | whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; |
| 2285 | esac |
| 2286 | link_all_deplibs=yes |
| 2287 | ;; |
| 2288 | |
| 2289 | sunos4*) |
| 2290 | if test "x$host_vendor" = xsequent; then |
| 2291 | # Use $CC to link under sequent, because it throws in some extra .o |
| 2292 | # files that make .init and .fini sections work. |
| 2293 | archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
| 2294 | else |
| 2295 | archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
| 2296 | fi |
| 2297 | hardcode_libdir_flag_spec='-L$libdir' |
| 2298 | hardcode_direct=yes |
| 2299 | hardcode_minus_L=yes |
| 2300 | hardcode_shlibpath_var=no |
| 2301 | ;; |
| 2302 | |
| 2303 | sysv4) |
| 2304 | if test "x$host_vendor" = xsno; then |
| 2305 | archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2306 | hardcode_direct=yes # is this really true??? |
| 2307 | else |
| 2308 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2309 | hardcode_direct=no #Motorola manual says yes, but my tests say they lie |
| 2310 | fi |
| 2311 | runpath_var='LD_RUN_PATH' |
| 2312 | hardcode_shlibpath_var=no |
| 2313 | ;; |
| 2314 | |
| 2315 | sysv4.3*) |
| 2316 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2317 | hardcode_shlibpath_var=no |
| 2318 | export_dynamic_flag_spec='-Bexport' |
| 2319 | ;; |
| 2320 | |
| 2321 | sysv5*) |
| 2322 | no_undefined_flag=' -z text' |
| 2323 | # $CC -shared without GNU ld will not create a library from C++ |
| 2324 | # object files and a static libstdc++, better avoid it by now |
| 2325 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2326 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 2327 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
| 2328 | hardcode_libdir_flag_spec= |
| 2329 | hardcode_shlibpath_var=no |
| 2330 | runpath_var='LD_RUN_PATH' |
| 2331 | ;; |
| 2332 | |
| 2333 | uts4*) |
| 2334 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2335 | hardcode_libdir_flag_spec='-L$libdir' |
| 2336 | hardcode_shlibpath_var=no |
| 2337 | ;; |
| 2338 | |
| 2339 | dgux*) |
| 2340 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2341 | hardcode_libdir_flag_spec='-L$libdir' |
| 2342 | hardcode_shlibpath_var=no |
| 2343 | ;; |
| 2344 | |
| 2345 | sysv4*MP*) |
| 2346 | if test -d /usr/nec; then |
| 2347 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2348 | hardcode_shlibpath_var=no |
| 2349 | runpath_var=LD_RUN_PATH |
| 2350 | hardcode_runpath_var=yes |
| 2351 | ld_shlibs=yes |
| 2352 | fi |
| 2353 | ;; |
| 2354 | |
| 2355 | sysv4.2uw2*) |
| 2356 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
| 2357 | hardcode_direct=yes |
| 2358 | hardcode_minus_L=no |
| 2359 | hardcode_shlibpath_var=no |
| 2360 | hardcode_runpath_var=yes |
| 2361 | runpath_var=LD_RUN_PATH |
| 2362 | ;; |
| 2363 | |
| 2364 | sysv5uw7* | unixware7*) |
| 2365 | no_undefined_flag='${wl}-z ${wl}text' |
| 2366 | if test "$GCC" = yes; then |
| 2367 | archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 2368 | else |
| 2369 | archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 2370 | fi |
| 2371 | runpath_var='LD_RUN_PATH' |
| 2372 | hardcode_shlibpath_var=no |
| 2373 | ;; |
| 2374 | |
| 2375 | *) |
| 2376 | ld_shlibs=no |
| 2377 | ;; |
| 2378 | esac |
| 2379 | fi |
| 2380 | AC_MSG_RESULT([$ld_shlibs]) |
| 2381 | test "$ld_shlibs" = no && can_build_shared=no |
| 2382 | |
2229 | | ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER |
2230 | | |
2231 | | |
2232 | | # _LT_AC_TAGCONFIG |
2233 | | # ---------------- |
2234 | | AC_DEFUN([_LT_AC_TAGCONFIG], |
2235 | | [AC_ARG_WITH([tags], |
2236 | | [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], |
2237 | | [include additional configurations @<:@automatic@:>@])], |
2238 | | [tagnames="$withval"]) |
2239 | | |
2240 | | if test -f "$ltmain" && test -n "$tagnames"; then |
2241 | | if test ! -f "${ofile}"; then |
2242 | | AC_MSG_WARN([output file `$ofile' does not exist]) |
2243 | | fi |
2244 | | |
2245 | | if test -z "$LTCC"; then |
2246 | | eval "`$SHELL ${ofile} --config | grep '^LTCC='`" |
2247 | | if test -z "$LTCC"; then |
2248 | | AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) |
2249 | | else |
2250 | | AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) |
2251 | | fi |
2252 | | fi |
2253 | | |
2254 | | # Extract list of available tagged configurations in $ofile. |
2255 | | # Note that this assumes the entire list is on one line. |
2256 | | available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` |
2257 | | |
2258 | | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
2259 | | for tagname in $tagnames; do |
2260 | | IFS="$lt_save_ifs" |
2261 | | # Check whether tagname contains only valid characters |
2262 | | case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in |
2263 | | "") ;; |
2264 | | *) AC_MSG_ERROR([invalid tag name: $tagname]) |
2265 | | ;; |
2266 | | esac |
2267 | | |
2268 | | if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null |
2269 | | then |
2270 | | AC_MSG_ERROR([tag name \"$tagname\" already exists]) |
2271 | | fi |
2272 | | |
2273 | | # Update the list of available tags. |
2274 | | if test -n "$tagname"; then |
2275 | | echo appending configuration tag \"$tagname\" to $ofile |
2276 | | |
2277 | | case $tagname in |
2278 | | CXX) |
2279 | | if test -n "$CXX" && test "X$CXX" != "Xno"; then |
2280 | | AC_LIBTOOL_LANG_CXX_CONFIG |
2281 | | else |
2282 | | tagname="" |
2283 | | fi |
2284 | | ;; |
2285 | | |
2286 | | F77) |
2287 | | if test -n "$F77" && test "X$F77" != "Xno"; then |
2288 | | AC_LIBTOOL_LANG_F77_CONFIG |
2289 | | else |
2290 | | tagname="" |
2291 | | fi |
2292 | | ;; |
2293 | | |
2294 | | GCJ) |
2295 | | if test -n "$GCJ" && test "X$GCJ" != "Xno"; then |
2296 | | AC_LIBTOOL_LANG_GCJ_CONFIG |
2297 | | else |
2298 | | tagname="" |
2299 | | fi |
2300 | | ;; |
2301 | | |
2302 | | RC) |
2303 | | AC_LIBTOOL_LANG_RC_CONFIG |
2304 | | ;; |
2305 | | |
2306 | | *) |
2307 | | AC_MSG_ERROR([Unsupported tag name: $tagname]) |
2308 | | ;; |
2309 | | esac |
2310 | | |
2311 | | # Append the new tag name to the list of available tags. |
2312 | | if test -n "$tagname" ; then |
2313 | | available_tags="$available_tags $tagname" |
2314 | | fi |
2315 | | fi |
2316 | | done |
2317 | | IFS="$lt_save_ifs" |
2318 | | |
2319 | | # Now substitute the updated list of available tags. |
2320 | | if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then |
2321 | | mv "${ofile}T" "$ofile" |
2322 | | chmod +x "$ofile" |
2323 | | else |
2324 | | rm -f "${ofile}T" |
2325 | | AC_MSG_ERROR([unable to update list of available tagged configurations.]) |
2326 | | fi |
2327 | | fi |
2328 | | ])# _LT_AC_TAGCONFIG |
2329 | | |
2330 | | # _LT_AC_SHARED_EXT |
2331 | | # ---------------- |
2332 | | AC_DEFUN([_LT_AC_SHARED_EXT],[ |
2333 | | if test ! -f "${ofile}"; then |
2334 | | AC_MSG_WARN([output file `$ofile' does not exist]) |
2335 | | fi |
2336 | | if test -z "`grep -e 'shared_ext.*shrext' $ofile`"; then |
2337 | | # Make sure $shared_ext gets set to $shrext |
2338 | | if sed -e 's/shared_ext/shrext/g' "$ofile" > "${ofile}T"; then |
2339 | | mv "${ofile}T" "$ofile" |
2340 | | chmod +x "$ofile" |
2341 | | else |
2342 | | rm -f "${ofile}T" |
2343 | | AC_MSG_ERROR([unable to update shared_ext.]) |
2344 | | fi |
2345 | | fi |
2346 | | ])# _LT_AC_SHARED_EXT |
2347 | | |
2348 | | |
2349 | | # AC_LIBTOOL_DLOPEN |
2350 | | # ----------------- |
2351 | | # enable checks for dlopen support |
2352 | | AC_DEFUN([AC_LIBTOOL_DLOPEN], |
2353 | | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) |
2354 | | ])# AC_LIBTOOL_DLOPEN |
2355 | | |
2356 | | |
2357 | | # AC_LIBTOOL_WIN32_DLL |
2358 | | # -------------------- |
2359 | | # declare package support for building win32 dll's |
2360 | | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], |
2361 | | [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) |
2362 | | ])# AC_LIBTOOL_WIN32_DLL |
2363 | | |
2364 | | |
2365 | | # AC_ENABLE_SHARED([DEFAULT]) |
2366 | | # --------------------------- |
2367 | | # implement the --enable-shared flag |
2368 | | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
2369 | | AC_DEFUN([AC_ENABLE_SHARED], |
2370 | | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
2371 | | AC_ARG_ENABLE([shared], |
2372 | | [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], |
2373 | | [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], |
2374 | | [p=${PACKAGE-default} |
2375 | | case $enableval in |
2376 | | yes) enable_shared=yes ;; |
2377 | | no) enable_shared=no ;; |
2378 | | *) |
2379 | | enable_shared=no |
2380 | | # Look at the argument we got. We use all the common list separators. |
2381 | | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
2382 | | for pkg in $enableval; do |
2383 | | IFS="$lt_save_ifs" |
2384 | | if test "X$pkg" = "X$p"; then |
2385 | | enable_shared=yes |
2386 | | fi |
2387 | | done |
2388 | | IFS="$lt_save_ifs" |
2389 | | ;; |
2390 | | esac], |
2391 | | [enable_shared=]AC_ENABLE_SHARED_DEFAULT) |
2392 | | ])# AC_ENABLE_SHARED |
2393 | | |
2394 | | |
2395 | | # AC_DISABLE_SHARED |
2396 | | # ----------------- |
2397 | | #- set the default shared flag to --disable-shared |
2398 | | AC_DEFUN([AC_DISABLE_SHARED], |
2399 | | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
2400 | | AC_ENABLE_SHARED(no) |
2401 | | ])# AC_DISABLE_SHARED |
2402 | | |
2403 | | |
2404 | | # AC_ENABLE_STATIC([DEFAULT]) |
2405 | | # --------------------------- |
2406 | | # implement the --enable-static flag |
2407 | | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
2408 | | AC_DEFUN([AC_ENABLE_STATIC], |
2409 | | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
2410 | | AC_ARG_ENABLE([static], |
2411 | | [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], |
2412 | | [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], |
2413 | | [p=${PACKAGE-default} |
2414 | | case $enableval in |
2415 | | yes) enable_static=yes ;; |
2416 | | no) enable_static=no ;; |
2417 | | *) |
2418 | | enable_static=no |
2419 | | # Look at the argument we got. We use all the common list separators. |
2420 | | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
2421 | | for pkg in $enableval; do |
2422 | | IFS="$lt_save_ifs" |
2423 | | if test "X$pkg" = "X$p"; then |
2424 | | enable_static=yes |
2425 | | fi |
2426 | | done |
2427 | | IFS="$lt_save_ifs" |
2428 | | ;; |
2429 | | esac], |
2430 | | [enable_static=]AC_ENABLE_STATIC_DEFAULT) |
2431 | | ])# AC_ENABLE_STATIC |
2432 | | |
2433 | | |
2434 | | # AC_DISABLE_STATIC |
2435 | | # ----------------- |
2436 | | # set the default static flag to --disable-static |
2437 | | AC_DEFUN([AC_DISABLE_STATIC], |
2438 | | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
2439 | | AC_ENABLE_STATIC(no) |
2440 | | ])# AC_DISABLE_STATIC |
2441 | | |
2442 | | |
2443 | | # AC_ENABLE_FAST_INSTALL([DEFAULT]) |
2444 | | # --------------------------------- |
2445 | | # implement the --enable-fast-install flag |
2446 | | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
2447 | | AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
2448 | | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
2449 | | AC_ARG_ENABLE([fast-install], |
2450 | | [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], |
2451 | | [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], |
2452 | | [p=${PACKAGE-default} |
2453 | | case $enableval in |
2454 | | yes) enable_fast_install=yes ;; |
2455 | | no) enable_fast_install=no ;; |
2456 | | *) |
2457 | | enable_fast_install=no |
2458 | | # Look at the argument we got. We use all the common list separators. |
2459 | | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
2460 | | for pkg in $enableval; do |
2461 | | IFS="$lt_save_ifs" |
2462 | | if test "X$pkg" = "X$p"; then |
2463 | | enable_fast_install=yes |
2464 | | fi |
2465 | | done |
2466 | | IFS="$lt_save_ifs" |
2467 | | ;; |
2468 | | esac], |
2469 | | [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) |
2470 | | ])# AC_ENABLE_FAST_INSTALL |
2471 | | |
2472 | | |
2473 | | # AC_DISABLE_FAST_INSTALL |
2474 | | # ----------------------- |
2475 | | # set the default to --disable-fast-install |
2476 | | AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
2477 | | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
2478 | | AC_ENABLE_FAST_INSTALL(no) |
2479 | | ])# AC_DISABLE_FAST_INSTALL |
2480 | | |
2481 | | |
2482 | | # AC_LIBTOOL_PICMODE([MODE]) |
2483 | | # -------------------------- |
2484 | | # implement the --with-pic flag |
2485 | | # MODE is either `yes' or `no'. If omitted, it defaults to `both'. |
2486 | | AC_DEFUN([AC_LIBTOOL_PICMODE], |
2487 | | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
2488 | | pic_mode=ifelse($#,1,$1,default) |
2489 | | ])# AC_LIBTOOL_PICMODE |
2490 | | |
2491 | | |
2492 | | # AC_PROG_EGREP |
2493 | | # ------------- |
2494 | | # This is predefined starting with Autoconf 2.54, so this conditional |
2495 | | # definition can be removed once we require Autoconf 2.54 or later. |
2496 | | m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], |
2497 | | [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], |
2498 | | [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 |
2499 | | then ac_cv_prog_egrep='grep -E' |
2500 | | else ac_cv_prog_egrep='egrep' |
2501 | | fi]) |
2502 | | EGREP=$ac_cv_prog_egrep |
2503 | | AC_SUBST([EGREP]) |
2504 | | ])]) |
2505 | | |
2506 | | |
2507 | | # AC_PATH_TOOL_PREFIX |
2508 | | # ------------------- |
2509 | | # find a file program which can recognise shared library |
2510 | | AC_DEFUN([AC_PATH_TOOL_PREFIX], |
2511 | | [AC_REQUIRE([AC_PROG_EGREP])dnl |
2512 | | AC_MSG_CHECKING([for $1]) |
2513 | | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
2514 | | [case $MAGIC_CMD in |
2515 | | [[\\/*] | ?:[\\/]*]) |
2516 | | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
2517 | | ;; |
2518 | | *) |
2519 | | lt_save_MAGIC_CMD="$MAGIC_CMD" |
2520 | | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
2521 | | dnl $ac_dummy forces splitting on constant user-supplied paths. |
2522 | | dnl POSIX.2 word splitting is done only on the output of word expansions, |
2523 | | dnl not every word. This closes a longstanding sh security hole. |
2524 | | ac_dummy="ifelse([$2], , $PATH, [$2])" |
2525 | | for ac_dir in $ac_dummy; do |
2526 | | IFS="$lt_save_ifs" |
2527 | | test -z "$ac_dir" && ac_dir=. |
2528 | | if test -f $ac_dir/$1; then |
2529 | | lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
2530 | | if test -n "$file_magic_test_file"; then |
2531 | | case $deplibs_check_method in |
2532 | | "file_magic "*) |
2533 | | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
2534 | | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
2535 | | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
2536 | | $EGREP "$file_magic_regex" > /dev/null; then |
2537 | | : |
2538 | | else |
2539 | | cat <<EOF 1>&2 |
2540 | | |
2541 | | *** Warning: the command libtool uses to detect shared libraries, |
2542 | | *** $file_magic_cmd, produces output that libtool cannot recognize. |
2543 | | *** The result is that libtool may fail to recognize shared libraries |
2544 | | *** as such. This will affect the creation of libtool libraries that |
2545 | | *** depend on shared libraries, but programs linked with such libtool |
2546 | | *** libraries will work regardless of this problem. Nevertheless, you |
2547 | | *** may want to report the problem to your system manager and/or to |
2548 | | *** bug-libtool@gnu.org |
2549 | | |
2550 | | EOF |
2551 | | fi ;; |
2552 | | esac |
2553 | | fi |
2554 | | break |
2555 | | fi |
2556 | | done |
2557 | | IFS="$lt_save_ifs" |
2558 | | MAGIC_CMD="$lt_save_MAGIC_CMD" |
2559 | | ;; |
2560 | | esac]) |
2561 | | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
2562 | | if test -n "$MAGIC_CMD"; then |
2563 | | AC_MSG_RESULT($MAGIC_CMD) |
2564 | | else |
2565 | | AC_MSG_RESULT(no) |
2566 | | fi |
2567 | | ])# AC_PATH_TOOL_PREFIX |
2568 | | |
2569 | | |
2570 | | # AC_PATH_MAGIC |
2571 | | # ------------- |
2572 | | # find a file program which can recognise a shared library |
2573 | | AC_DEFUN([AC_PATH_MAGIC], |
2574 | | [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) |
2575 | | if test -z "$lt_cv_path_MAGIC_CMD"; then |
2576 | | if test -n "$ac_tool_prefix"; then |
2577 | | AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) |
2578 | | else |
2579 | | MAGIC_CMD=: |
2580 | | fi |
2581 | | fi |
2582 | | ])# AC_PATH_MAGIC |
2583 | | |
2584 | | |
2585 | | # AC_PROG_LD |
2586 | | # ---------- |
2587 | | # find the pathname to the GNU or non-GNU linker |
2588 | | AC_DEFUN([AC_PROG_LD], |
2589 | | [AC_ARG_WITH([gnu-ld], |
2590 | | [AC_HELP_STRING([--with-gnu-ld], |
2591 | | [assume the C compiler uses GNU ld @<:@default=no@:>@])], |
2592 | | [test "$withval" = no || with_gnu_ld=yes], |
2593 | | [with_gnu_ld=no]) |
2594 | | AC_REQUIRE([LT_AC_PROG_SED])dnl |
2595 | | AC_REQUIRE([AC_PROG_CC])dnl |
2596 | | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
2597 | | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
2598 | | ac_prog=ld |
2599 | | if test "$GCC" = yes; then |
2600 | | # Check if gcc -print-prog-name=ld gives a path. |
2601 | | AC_MSG_CHECKING([for ld used by $CC]) |
2602 | | case $host in |
2603 | | *-*-mingw*) |
2604 | | # gcc leaves a trailing carriage return which upsets mingw |
2605 | | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
2606 | | *) |
2607 | | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
2608 | | esac |
2609 | | case $ac_prog in |
2610 | | # Accept absolute paths. |
2611 | | [[\\/]]* | ?:[[\\/]]*) |
2612 | | re_direlt='/[[^/]][[^/]]*/\.\./' |
2613 | | # Canonicalize the pathname of ld |
2614 | | ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` |
2615 | | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
2616 | | ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` |
2617 | | done |
2618 | | test -z "$LD" && LD="$ac_prog" |
2619 | | ;; |
2620 | | "") |
2621 | | # If it fails, then pretend we aren't using GCC. |
2622 | | ac_prog=ld |
2623 | | ;; |
2624 | | *) |
2625 | | # If it is relative, then search for the first ld in PATH. |
2626 | | with_gnu_ld=unknown |
2627 | | ;; |
2628 | | esac |
2629 | | elif test "$with_gnu_ld" = yes; then |
2630 | | AC_MSG_CHECKING([for GNU ld]) |
2631 | | else |
2632 | | AC_MSG_CHECKING([for non-GNU ld]) |
2633 | | fi |
2634 | | AC_CACHE_VAL(lt_cv_path_LD, |
2635 | | [if test -z "$LD"; then |
2636 | | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
2637 | | for ac_dir in $PATH; do |
2638 | | IFS="$lt_save_ifs" |
2639 | | test -z "$ac_dir" && ac_dir=. |
2640 | | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
2641 | | lt_cv_path_LD="$ac_dir/$ac_prog" |
2642 | | # Check to see if the program is GNU ld. I'd rather use --version, |
2643 | | # but apparently some GNU ld's only accept -v. |
2644 | | # Break only if it was the GNU/non-GNU ld that we prefer. |
2645 | | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in |
2646 | | *GNU* | *'with BFD'*) |
2647 | | test "$with_gnu_ld" != no && break |
2648 | | ;; |
2649 | | *) |
2650 | | test "$with_gnu_ld" != yes && break |
2651 | | ;; |
2652 | | esac |
2653 | | fi |
2654 | | done |
2655 | | IFS="$lt_save_ifs" |
2656 | | else |
2657 | | lt_cv_path_LD="$LD" # Let the user override the test with a path. |
2658 | | fi]) |
2659 | | LD="$lt_cv_path_LD" |
2660 | | if test -n "$LD"; then |
2661 | | AC_MSG_RESULT($LD) |
2662 | | else |
2663 | | AC_MSG_RESULT(no) |
2664 | | fi |
2665 | | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
2666 | | AC_PROG_LD_GNU |
2667 | | ])# AC_PROG_LD |
2668 | | |
2669 | | |
2670 | | # AC_PROG_LD_GNU |
2671 | | # -------------- |
2672 | | AC_DEFUN([AC_PROG_LD_GNU], |
2673 | | [AC_REQUIRE([AC_PROG_EGREP])dnl |
2674 | | AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
2675 | | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
2676 | | case `$LD -v 2>&1 </dev/null` in |
2677 | | *GNU* | *'with BFD'*) |
2678 | | lt_cv_prog_gnu_ld=yes |
2679 | | ;; |
2680 | | *) |
2681 | | lt_cv_prog_gnu_ld=no |
2682 | | ;; |
2683 | | esac]) |
2684 | | with_gnu_ld=$lt_cv_prog_gnu_ld |
2685 | | ])# AC_PROG_LD_GNU |
2686 | | |
2687 | | |
2688 | | # AC_PROG_LD_RELOAD_FLAG |
2689 | | # ---------------------- |
2690 | | # find reload flag for linker |
2691 | | # -- PORTME Some linkers may need a different reload flag. |
2692 | | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], |
2693 | | [AC_CACHE_CHECK([for $LD option to reload object files], |
2694 | | lt_cv_ld_reload_flag, |
2695 | | [lt_cv_ld_reload_flag='-r']) |
2696 | | reload_flag=$lt_cv_ld_reload_flag |
2697 | | case $reload_flag in |
2698 | | "" | " "*) ;; |
2699 | | *) reload_flag=" $reload_flag" ;; |
2700 | | esac |
2701 | | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
2702 | | ])# AC_PROG_LD_RELOAD_FLAG |
2703 | | |
2704 | | |
2705 | | # AC_DEPLIBS_CHECK_METHOD |
2706 | | # ----------------------- |
2707 | | # how to check for library dependencies |
2708 | | # -- PORTME fill in with the dynamic library characteristics |
2709 | | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], |
2710 | | [AC_CACHE_CHECK([how to recognise dependent libraries], |
2711 | | lt_cv_deplibs_check_method, |
2712 | | [lt_cv_file_magic_cmd='$MAGIC_CMD' |
2713 | | lt_cv_file_magic_test_file= |
2714 | | lt_cv_deplibs_check_method='unknown' |
2715 | | # Need to set the preceding variable on all platforms that support |
2716 | | # interlibrary dependencies. |
2717 | | # 'none' -- dependencies not supported. |
2718 | | # `unknown' -- same as none, but documents that we really don't know. |
2719 | | # 'pass_all' -- all dependencies passed with no checks. |
2720 | | # 'test_compile' -- check by making test program. |
2721 | | # 'file_magic [[regex]]' -- check by looking for files in library path |
2722 | | # which responds to the $file_magic_cmd with a given extended regex. |
2723 | | # If you have `file' or equivalent on your system and you're not sure |
2724 | | # whether `pass_all' will *always* work, you probably want this one. |
2725 | | |
2726 | | case $host_os in |
2727 | | aix4* | aix5*) |
2728 | | lt_cv_deplibs_check_method=pass_all |
2729 | | ;; |
2730 | | |
2731 | | beos*) |
2732 | | lt_cv_deplibs_check_method=pass_all |
2733 | | ;; |
2734 | | |
2735 | | bsdi4*) |
2736 | | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
2737 | | lt_cv_file_magic_cmd='/usr/bin/file -L' |
2738 | | lt_cv_file_magic_test_file=/shlib/libc.so |
2739 | | ;; |
2740 | | |
2741 | | cygwin*) |
2742 | | # win32_libid is a shell function defined in ltmain.sh |
2743 | | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' |
2744 | | lt_cv_file_magic_cmd='win32_libid' |
2745 | | ;; |
2746 | | |
2747 | | mingw* | pw32*) |
2748 | | # Base MSYS/MinGW do not provide the 'file' command needed by |
2749 | | # win32_libid shell function, so use a weaker test based on 'objdump'. |
2750 | | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
2751 | | lt_cv_file_magic_cmd='$OBJDUMP -f' |
2752 | | ;; |
2753 | | |
2754 | | darwin* | rhapsody*) |
2755 | | lt_cv_deplibs_check_method=pass_all |
2756 | | ;; |
2757 | | |
2758 | | freebsd* | kfreebsd*-gnu) |
2759 | | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
2760 | | case $host_cpu in |
2761 | | i*86 ) |
2762 | | # Not sure whether the presence of OpenBSD here was a mistake. |
2763 | | # Let's accept both of them until this is cleared up. |
2764 | | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' |
2765 | | lt_cv_file_magic_cmd=/usr/bin/file |
2766 | | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
2767 | | ;; |
2768 | | esac |
2769 | | else |
2770 | | lt_cv_deplibs_check_method=pass_all |
2771 | | fi |
2772 | | ;; |
2773 | | |
2774 | | gnu*) |
2775 | | lt_cv_deplibs_check_method=pass_all |
2776 | | ;; |
2777 | | |
2778 | | hpux10.20* | hpux11*) |
2779 | | lt_cv_file_magic_cmd=/usr/bin/file |
2780 | | case "$host_cpu" in |
2781 | | ia64*) |
2782 | | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' |
2783 | | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so |
2784 | | ;; |
2785 | | hppa*64*) |
2786 | | [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]'] |
2787 | | lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl |
2788 | | ;; |
2789 | | *) |
2790 | | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
2791 | | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
2792 | | ;; |
2793 | | esac |
2794 | | ;; |
2795 | | |
2796 | | irix5* | irix6* | nonstopux*) |
2797 | | case $LD in |
2798 | | *-32|*"-32 ") libmagic=32-bit;; |
2799 | | *-n32|*"-n32 ") libmagic=N32;; |
2800 | | *-64|*"-64 ") libmagic=64-bit;; |
2801 | | *) libmagic=never-match;; |
2802 | | esac |
2803 | | lt_cv_deplibs_check_method=pass_all |
2804 | | ;; |
2805 | | |
2806 | | # This must be Linux ELF. |
2807 | | linux*) |
2808 | | case $host_cpu in |
2809 | | alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*) |
2810 | | lt_cv_deplibs_check_method=pass_all ;; |
2811 | | *) |
2812 | | # glibc up to 2.1.1 does not perform some relocations on ARM |
2813 | | # this will be overridden with pass_all, but let us keep it just in case |
2814 | | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; |
2815 | | esac |
2816 | | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
2817 | | lt_cv_deplibs_check_method=pass_all |
2818 | | ;; |
2819 | | |
2820 | | netbsd*) |
2821 | | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
2822 | | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' |
2823 | | else |
2824 | | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' |
2825 | | fi |
2826 | | ;; |
2827 | | |
2828 | | newos6*) |
2829 | | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
2830 | | lt_cv_file_magic_cmd=/usr/bin/file |
2831 | | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
2832 | | ;; |
2833 | | |
2834 | | nto-qnx*) |
2835 | | lt_cv_deplibs_check_method=unknown |
2836 | | ;; |
2837 | | |
2838 | | openbsd*) |
2839 | | lt_cv_file_magic_cmd=/usr/bin/file |
2840 | | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
2841 | | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
2842 | | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' |
2843 | | else |
2844 | | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' |
2845 | | fi |
2846 | | ;; |
2847 | | |
2848 | | osf3* | osf4* | osf5*) |
2849 | | lt_cv_deplibs_check_method=pass_all |
2850 | | ;; |
2851 | | |
2852 | | sco3.2v5*) |
2853 | | lt_cv_deplibs_check_method=pass_all |
2854 | | ;; |
2855 | | |
2856 | | solaris*) |
2857 | | lt_cv_deplibs_check_method=pass_all |
2858 | | ;; |
2859 | | |
2860 | | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
2861 | | case $host_vendor in |
2862 | | motorola) |
2863 | | 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]]' |
2864 | | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
2865 | | ;; |
2866 | | ncr) |
2867 | | lt_cv_deplibs_check_method=pass_all |
2868 | | ;; |
2869 | | sequent) |
2870 | | lt_cv_file_magic_cmd='/bin/file' |
2871 | | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
2872 | | ;; |
2873 | | sni) |
2874 | | lt_cv_file_magic_cmd='/bin/file' |
2875 | | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
2876 | | lt_cv_file_magic_test_file=/lib/libc.so |
2877 | | ;; |
2878 | | siemens) |
2879 | | lt_cv_deplibs_check_method=pass_all |
2880 | | ;; |
2881 | | esac |
2882 | | ;; |
2883 | | |
2884 | | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) |
2885 | | lt_cv_deplibs_check_method=pass_all |
2886 | | ;; |
2887 | | esac |
2888 | | ]) |
2889 | | file_magic_cmd=$lt_cv_file_magic_cmd |
2890 | | deplibs_check_method=$lt_cv_deplibs_check_method |
2891 | | test -z "$deplibs_check_method" && deplibs_check_method=unknown |
2892 | | ])# AC_DEPLIBS_CHECK_METHOD |
2893 | | |
2894 | | |
2895 | | # AC_PROG_NM |
2896 | | # ---------- |
2897 | | # find the pathname to a BSD-compatible name lister |
2898 | | AC_DEFUN([AC_PROG_NM], |
2899 | | [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, |
2900 | | [if test -n "$NM"; then |
2901 | | # Let the user override the test. |
2902 | | lt_cv_path_NM="$NM" |
2903 | | else |
2904 | | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
2905 | | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
2906 | | IFS="$lt_save_ifs" |
2907 | | test -z "$ac_dir" && ac_dir=. |
2908 | | tmp_nm="$ac_dir/${ac_tool_prefix}nm" |
2909 | | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then |
2910 | | # Check to see if the nm accepts a BSD-compat flag. |
2911 | | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
2912 | | # nm: unknown option "B" ignored |
2913 | | # Tru64's nm complains that /dev/null is an invalid object file |
2914 | | case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in |
2915 | | */dev/null* | *'Invalid file or object type'*) |
2916 | | lt_cv_path_NM="$tmp_nm -B" |
2917 | | break |
2918 | | ;; |
2919 | | *) |
2920 | | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in |
2921 | | */dev/null*) |
2922 | | lt_cv_path_NM="$tmp_nm -p" |
2923 | | break |
2924 | | ;; |
2925 | | *) |
2926 | | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
2927 | | continue # so that we can try to find one that supports BSD flags |
2928 | | ;; |
2929 | | esac |
2930 | | esac |
2931 | | fi |
2932 | | done |
2933 | | IFS="$lt_save_ifs" |
2934 | | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
2935 | | fi]) |
2936 | | NM="$lt_cv_path_NM" |
2937 | | ])# AC_PROG_NM |
2938 | | |
2939 | | |
2940 | | # AC_CHECK_LIBM |
2941 | | # ------------- |
2942 | | # check for math library |
2943 | | AC_DEFUN([AC_CHECK_LIBM], |
2944 | | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
2945 | | LIBM= |
2946 | | case $host in |
2947 | | *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) |
2948 | | # These system don't have libm, or don't need it |
2949 | | ;; |
2950 | | *-ncr-sysv4.3*) |
2951 | | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
2952 | | AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") |
2953 | | ;; |
2954 | | *) |
2955 | | AC_CHECK_LIB(m, cos, LIBM="-lm") |
2956 | | ;; |
2957 | | esac |
2958 | | ])# AC_CHECK_LIBM |
2959 | | |
2960 | | |
2961 | | # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) |
2962 | | # ----------------------------------- |
2963 | | # sets LIBLTDL to the link flags for the libltdl convenience library and |
2964 | | # LTDLINCL to the include flags for the libltdl header and adds |
2965 | | # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL |
2966 | | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If |
2967 | | # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will |
2968 | | # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with |
2969 | | # '${top_srcdir}/' (note the single quotes!). If your package is not |
2970 | | # flat and you're not using automake, define top_builddir and |
2971 | | # top_srcdir appropriately in the Makefiles. |
2972 | | AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
2973 | | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
2974 | | case $enable_ltdl_convenience in |
2975 | | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
2976 | | "") enable_ltdl_convenience=yes |
2977 | | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
2978 | | esac |
2979 | | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
2980 | | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
2981 | | # For backwards non-gettext consistent compatibility... |
2982 | | INCLTDL="$LTDLINCL" |
2983 | | ])# AC_LIBLTDL_CONVENIENCE |
2984 | | |
2985 | | |
2986 | | # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) |
2987 | | # ----------------------------------- |
2988 | | # sets LIBLTDL to the link flags for the libltdl installable library and |
2989 | | # LTDLINCL to the include flags for the libltdl header and adds |
2990 | | # --enable-ltdl-install to the configure arguments. Note that LIBLTDL |
2991 | | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If |
2992 | | # DIRECTORY is not provided and an installed libltdl is not found, it is |
2993 | | # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' |
2994 | | # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single |
2995 | | # quotes!). If your package is not flat and you're not using automake, |
2996 | | # define top_builddir and top_srcdir appropriately in the Makefiles. |
2997 | | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
2998 | | AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
2999 | | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
3000 | | AC_CHECK_LIB(ltdl, lt_dlinit, |
3001 | | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
3002 | | [if test x"$enable_ltdl_install" = xno; then |
3003 | | AC_MSG_WARN([libltdl not installed, but installation disabled]) |
3004 | | else |
3005 | | enable_ltdl_install=yes |
3006 | | fi |
3007 | | ]) |
3008 | | if test x"$enable_ltdl_install" = x"yes"; then |
3009 | | ac_configure_args="$ac_configure_args --enable-ltdl-install" |
3010 | | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
3011 | | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
3012 | | else |
3013 | | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
3014 | | LIBLTDL="-lltdl" |
3015 | | LTDLINCL= |
3016 | | fi |
3017 | | # For backwards non-gettext consistent compatibility... |
3018 | | INCLTDL="$LTDLINCL" |
3019 | | ])# AC_LIBLTDL_INSTALLABLE |
3020 | | |
3021 | | |
3022 | | # AC_LIBTOOL_CXX |
3023 | | # -------------- |
3024 | | # enable support for C++ libraries |
3025 | | AC_DEFUN([AC_LIBTOOL_CXX], |
3026 | | [AC_REQUIRE([_LT_AC_LANG_CXX]) |
3027 | | ])# AC_LIBTOOL_CXX |
3028 | | |
3029 | | |
3030 | | # _LT_AC_LANG_CXX |
3031 | | # --------------- |
3032 | | AC_DEFUN([_LT_AC_LANG_CXX], |
3033 | | [AC_REQUIRE([AC_PROG_CXX]) |
3034 | | AC_REQUIRE([AC_PROG_CXXCPP]) |
3035 | | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) |
3036 | | ])# _LT_AC_LANG_CXX |
3037 | | |
3038 | | |
3039 | | # AC_LIBTOOL_F77 |
3040 | | # -------------- |
3041 | | # enable support for Fortran 77 libraries |
3042 | | AC_DEFUN([AC_LIBTOOL_F77], |
3043 | | [AC_REQUIRE([_LT_AC_LANG_F77]) |
3044 | | ])# AC_LIBTOOL_F77 |
3045 | | |
3046 | | |
3047 | | # _LT_AC_LANG_F77 |
3048 | | # --------------- |
3049 | | AC_DEFUN([_LT_AC_LANG_F77], |
3050 | | [AC_REQUIRE([AC_PROG_F77]) |
3051 | | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) |
3052 | | ])# _LT_AC_LANG_F77 |
3053 | | |
3054 | | |
3055 | | # AC_LIBTOOL_GCJ |
3056 | | # -------------- |
3057 | | # enable support for GCJ libraries |
3058 | | AC_DEFUN([AC_LIBTOOL_GCJ], |
3059 | | [AC_REQUIRE([_LT_AC_LANG_GCJ]) |
3060 | | ])# AC_LIBTOOL_GCJ |
3061 | | |
3062 | | |
3063 | | # _LT_AC_LANG_GCJ |
3064 | | # --------------- |
3065 | | AC_DEFUN([_LT_AC_LANG_GCJ], |
3066 | | [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], |
3067 | | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], |
3068 | | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], |
3069 | | [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], |
3070 | | [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], |
3071 | | [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) |
3072 | | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) |
3073 | | ])# _LT_AC_LANG_GCJ |
3074 | | |
3075 | | |
3076 | | # AC_LIBTOOL_RC |
3077 | | # -------------- |
3078 | | # enable support for Windows resource files |
3079 | | AC_DEFUN([AC_LIBTOOL_RC], |
3080 | | [AC_REQUIRE([LT_AC_PROG_RC]) |
3081 | | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) |
3082 | | ])# AC_LIBTOOL_RC |
3083 | | |
3084 | | |
3085 | | # AC_LIBTOOL_LANG_C_CONFIG |
3086 | | # ------------------------ |
3087 | | # Ensure that the configuration vars for the C compiler are |
3088 | | # suitably defined. Those variables are subsequently used by |
3089 | | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
3090 | | AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) |
3091 | | AC_DEFUN([_LT_AC_LANG_C_CONFIG], |
3092 | | [lt_save_CC="$CC" |
3093 | | AC_LANG_PUSH(C) |
3094 | | |
3095 | | # Source file extension for C test sources. |
3096 | | ac_ext=c |
3097 | | |
3098 | | # Object file extension for compiled C test sources. |
3099 | | objext=o |
3100 | | _LT_AC_TAGVAR(objext, $1)=$objext |
3101 | | |
3102 | | # Code to be used in simple compile tests |
3103 | | lt_simple_compile_test_code="int some_variable = 0;\n" |
3104 | | |
3105 | | # Code to be used in simple link tests |
3106 | | lt_simple_link_test_code='int main(){return(0);}\n' |
3107 | | |
3108 | | _LT_AC_SYS_COMPILER |
3109 | | |
3110 | | # |
3111 | | # Check for any special shared library compilation flags. |
3112 | | # |
3113 | | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= |
3114 | | if test "$GCC" = no; then |
3115 | | case $host_os in |
3116 | | sco3.2v5*) |
3117 | | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' |
3118 | | ;; |
3119 | | esac |
3120 | | fi |
3121 | | if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then |
3122 | | AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) |
3123 | | if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : |
3124 | | else |
3125 | | AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) |
3126 | | _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no |
3127 | | fi |
3128 | | fi |
3129 | | |
3130 | | |
3131 | | # |
3132 | | # Check to make sure the static flag actually works. |
3133 | | # |
3134 | | AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], |
3135 | | _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), |
3136 | | $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), |
3137 | | [], |
3138 | | [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) |
3139 | | |
3140 | | |
3141 | | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
3142 | | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
3143 | | AC_LIBTOOL_PROG_CC_C_O($1) |
3144 | | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
3145 | | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
3146 | | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
3147 | | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
3148 | | AC_LIBTOOL_SYS_LIB_STRIP |
3149 | | AC_LIBTOOL_DLOPEN_SELF($1) |
3150 | | |
3151 | | # Report which librarie types wil actually be built |
| 2822 | |
| 2823 | # Report the final consequences. |
3334 | | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
3335 | | fi |
3336 | | else |
3337 | | with_gnu_ld=no |
3338 | | wlarc= |
3339 | | |
3340 | | # A generic and very simple default shared library creation |
3341 | | # command for GNU C++ for the case where it uses the native |
3342 | | # linker, instead of GNU ld. If possible, this setting should |
3343 | | # overridden to take advantage of the native linker features on |
3344 | | # the platform it is being used on. |
3345 | | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' |
3346 | | fi |
3347 | | |
3348 | | # Commands to make compiler produce verbose output that lists |
3349 | | # what "hidden" libraries, object files and flags are used when |
3350 | | # linking a shared library. |
3351 | | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
3352 | | |
3353 | | else |
3354 | | GXX=no |
3355 | | with_gnu_ld=no |
3356 | | wlarc= |
3357 | | fi |
3358 | | |
3359 | | # PORTME: fill in a description of your system's C++ link characteristics |
3360 | | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
3361 | | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
3362 | | case $host_os in |
3363 | | aix3*) |
3364 | | # FIXME: insert proper C++ library support |
3365 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3366 | | ;; |
3367 | | aix4* | aix5*) |
3368 | | if test "$host_cpu" = ia64; then |
3369 | | # On IA64, the linker does run time linking by default, so we don't |
3370 | | # have to do anything special. |
3371 | | aix_use_runtimelinking=no |
3372 | | exp_sym_flag='-Bexport' |
3373 | | no_entry_flag="" |
3374 | | else |
3375 | | aix_use_runtimelinking=no |
3376 | | |
3377 | | # Test if we are trying to use run time linking or normal |
3378 | | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
3379 | | # need to do runtime linking. |
3380 | | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
3381 | | for ld_flag in $LDFLAGS; do |
3382 | | case $ld_flag in |
3383 | | *-brtl*) |
3384 | | aix_use_runtimelinking=yes |
3385 | | break |
3386 | | ;; |
3387 | | esac |
3388 | | done |
3389 | | esac |
3390 | | |
3391 | | exp_sym_flag='-bexport' |
3392 | | no_entry_flag='-bnoentry' |
3393 | | fi |
3394 | | |
3395 | | # When large executables or shared objects are built, AIX ld can |
3396 | | # have problems creating the table of contents. If linking a library |
3397 | | # or program results in "error TOC overflow" add -mminimal-toc to |
3398 | | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
3399 | | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
3400 | | |
3401 | | _LT_AC_TAGVAR(archive_cmds, $1)='' |
3402 | | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
3403 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
3404 | | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
3405 | | |
3406 | | if test "$GXX" = yes; then |
3407 | | case $host_os in aix4.[012]|aix4.[012].*) |
3408 | | # We only want to do this on AIX 4.2 and lower, the check |
3409 | | # below for broken collect2 doesn't work under 4.3+ |
3410 | | collect2name=`${CC} -print-prog-name=collect2` |
3411 | | if test -f "$collect2name" && \ |
3412 | | strings "$collect2name" | grep resolve_lib_name >/dev/null |
3413 | | then |
3414 | | # We have reworked collect2 |
3415 | | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
3416 | | else |
3417 | | # We have old collect2 |
3418 | | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
3419 | | # It fails to find uninstalled libraries when the uninstalled |
3420 | | # path is not listed in the libpath. Setting hardcode_minus_L |
3421 | | # to unsupported forces relinking |
3422 | | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
3423 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
3424 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
3425 | | fi |
3426 | | esac |
3427 | | shared_flag='-shared' |
3428 | | else |
3429 | | # not using gcc |
3430 | | if test "$host_cpu" = ia64; then |
3431 | | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
3432 | | # chokes on -Wl,-G. The following line is correct: |
3433 | | shared_flag='-G' |
3434 | | else |
3435 | | if test "$aix_use_runtimelinking" = yes; then |
3436 | | shared_flag='${wl}-G' |
3437 | | else |
3438 | | shared_flag='${wl}-bM:SRE' |
3439 | | fi |
3440 | | fi |
3441 | | fi |
3442 | | |
3443 | | # It seems that -bexpall does not export symbols beginning with |
3444 | | # underscore (_), so it is better to generate a list of symbols to export. |
3445 | | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
3446 | | if test "$aix_use_runtimelinking" = yes; then |
3447 | | # Warning - without using the other runtime loading flags (-brtl), |
3448 | | # -berok will link without error, but may produce a broken library. |
3449 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' |
3450 | | # Determine the default libpath from the value encoded in an empty executable. |
3451 | | _LT_AC_SYS_LIBPATH_AIX |
3452 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
3453 | | |
3454 | | _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" |
3455 | | else |
3456 | | if test "$host_cpu" = ia64; then |
3457 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
3458 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
3459 | | _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" |
3460 | | else |
3461 | | # Determine the default libpath from the value encoded in an empty executable. |
3462 | | _LT_AC_SYS_LIBPATH_AIX |
3463 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
3464 | | # Warning - without using the other run time loading flags, |
3465 | | # -berok will link without error, but may produce a broken library. |
3466 | | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' |
3467 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' |
3468 | | # -bexpall does not export symbols beginning with underscore (_) |
3469 | | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
3470 | | # Exported symbols can be pulled into shared objects from archives |
3471 | | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' |
3472 | | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
3473 | | # This is similar to how AIX traditionally builds it's shared libraries. |
3474 | | _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' |
3475 | | fi |
3476 | | fi |
3477 | | ;; |
3478 | | chorus*) |
3479 | | case $cc_basename in |
3480 | | *) |
3481 | | # FIXME: insert proper C++ library support |
3482 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3483 | | ;; |
3484 | | esac |
3485 | | ;; |
3486 | | |
3487 | | cygwin* | mingw* | pw32*) |
3488 | | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
3489 | | # as there is no search path for DLLs. |
3490 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
3491 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
3492 | | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
3493 | | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
3494 | | |
3495 | | if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then |
3496 | | _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' |
3497 | | # If the export-symbols file already is a .def file (1st line |
3498 | | # is EXPORTS), use it as is; otherwise, prepend... |
3499 | | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then |
3500 | | cp $export_symbols $output_objdir/$soname.def; |
3501 | | else |
3502 | | echo EXPORTS > $output_objdir/$soname.def; |
3503 | | cat $export_symbols >> $output_objdir/$soname.def; |
3504 | | fi~ |
3505 | | $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' |
3506 | | else |
3507 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3508 | | fi |
3509 | | ;; |
3510 | | |
3511 | | darwin* | rhapsody*) |
3512 | | if test "$GXX" = yes; then |
3513 | | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
3514 | | case "$host_os" in |
3515 | | rhapsody* | darwin1.[[012]]) |
3516 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' |
3517 | | ;; |
3518 | | *) # Darwin 1.3 on |
3519 | | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then |
3520 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
3521 | | else |
3522 | | case ${MACOSX_DEPLOYMENT_TARGET} in |
3523 | | 10.[[012]]) |
3524 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
3525 | | ;; |
3526 | | 10.*) |
3527 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' |
3528 | | ;; |
3529 | | esac |
3530 | | fi |
3531 | | ;; |
3532 | | esac |
3533 | | lt_int_apple_cc_single_mod=no |
3534 | | output_verbose_link_cmd='echo' |
3535 | | if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then |
3536 | | lt_int_apple_cc_single_mod=yes |
3537 | | fi |
3538 | | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
3539 | | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
3540 | | else |
3541 | | _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' |
3542 | | fi |
3543 | | _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' |
3544 | | |
3545 | | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's |
3546 | | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
3547 | | _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}' |
3548 | | else |
3549 | | _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}' |
3550 | | fi |
3551 | | _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}' |
3552 | | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
3553 | | _LT_AC_TAGVAR(hardcode_automatic, $1)=yes |
3554 | | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
3555 | | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' |
3556 | | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
3557 | | else |
3558 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3559 | | fi |
3560 | | ;; |
3561 | | |
3562 | | dgux*) |
3563 | | case $cc_basename in |
3564 | | ec++) |
3565 | | # FIXME: insert proper C++ library support |
3566 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3567 | | ;; |
3568 | | ghcx) |
3569 | | # Green Hills C++ Compiler |
3570 | | # FIXME: insert proper C++ library support |
3571 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3572 | | ;; |
3573 | | *) |
3574 | | # FIXME: insert proper C++ library support |
3575 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3576 | | ;; |
3577 | | esac |
3578 | | ;; |
3579 | | freebsd[12]*) |
3580 | | # C++ shared libraries reported to be fairly broken before switch to ELF |
3581 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3582 | | ;; |
3583 | | freebsd-elf*) |
3584 | | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
3585 | | ;; |
3586 | | freebsd* | kfreebsd*-gnu) |
3587 | | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF |
3588 | | # conventions |
3589 | | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
3590 | | ;; |
3591 | | gnu*) |
3592 | | ;; |
3593 | | hpux9*) |
3594 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
3595 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
3596 | | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
3597 | | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
3598 | | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
3599 | | # but as the default |
3600 | | # location of the library. |
3601 | | |
3602 | | case $cc_basename in |
3603 | | CC) |
3604 | | # FIXME: insert proper C++ library support |
3605 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3606 | | ;; |
3607 | | aCC) |
3608 | | _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' |
3609 | | # Commands to make compiler produce verbose output that lists |
3610 | | # what "hidden" libraries, object files and flags are used when |
3611 | | # linking a shared library. |
3612 | | # |
3613 | | # There doesn't appear to be a way to prevent this compiler from |
3614 | | # explicitly linking system object files so we need to strip them |
3615 | | # from the output so that they don't get included in the library |
3616 | | # dependencies. |
3617 | | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
3618 | | ;; |
3619 | | *) |
3620 | | if test "$GXX" = yes; then |
3621 | | _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' |
3622 | | else |
3623 | | # FIXME: insert proper C++ library support |
3624 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3625 | | fi |
3626 | | ;; |
3627 | | esac |
3628 | | ;; |
3629 | | hpux10*|hpux11*) |
3630 | | if test $with_gnu_ld = no; then |
3631 | | case "$host_cpu" in |
3632 | | hppa*64*) |
3633 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
3634 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' |
3635 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
3636 | | ;; |
3637 | | ia64*) |
3638 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
3639 | | ;; |
3640 | | *) |
3641 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
3642 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
3643 | | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
3644 | | ;; |
3645 | | esac |
3646 | | fi |
3647 | | case "$host_cpu" in |
3648 | | hppa*64*) |
3649 | | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
3650 | | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
3651 | | ;; |
3652 | | ia64*) |
3653 | | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
3654 | | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
3655 | | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
3656 | | # but as the default |
3657 | | # location of the library. |
3658 | | ;; |
3659 | | *) |
3660 | | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
3661 | | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
3662 | | # but as the default |
3663 | | # location of the library. |
3664 | | ;; |
3665 | | esac |
3666 | | |
3667 | | case $cc_basename in |
3668 | | CC) |
3669 | | # FIXME: insert proper C++ library support |
3670 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3671 | | ;; |
3672 | | aCC) |
3673 | | case "$host_cpu" in |
3674 | | hppa*64*|ia64*) |
3675 | | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' |
3676 | | ;; |
3677 | | *) |
3678 | | _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' |
3679 | | ;; |
3680 | | esac |
3681 | | # Commands to make compiler produce verbose output that lists |
3682 | | # what "hidden" libraries, object files and flags are used when |
3683 | | # linking a shared library. |
3684 | | # |
3685 | | # There doesn't appear to be a way to prevent this compiler from |
3686 | | # explicitly linking system object files so we need to strip them |
3687 | | # from the output so that they don't get included in the library |
3688 | | # dependencies. |
3689 | | 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' |
3690 | | ;; |
3691 | | *) |
3692 | | if test "$GXX" = yes; then |
3693 | | if test $with_gnu_ld = no; then |
3694 | | case "$host_cpu" in |
3695 | | ia64*|hppa*64*) |
3696 | | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' |
3697 | | ;; |
3698 | | *) |
3699 | | _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' |
3700 | | ;; |
3701 | | esac |
3702 | | fi |
3703 | | else |
3704 | | # FIXME: insert proper C++ library support |
3705 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3706 | | fi |
3707 | | ;; |
3708 | | esac |
3709 | | ;; |
3710 | | irix5* | irix6*) |
3711 | | case $cc_basename in |
3712 | | CC) |
3713 | | # SGI C++ |
3714 | | _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' |
3715 | | |
3716 | | # Archives containing C++ object files must be created using |
3717 | | # "CC -ar", where "CC" is the IRIX C++ compiler. This is |
3718 | | # necessary to make sure instantiated templates are included |
3719 | | # in the archive. |
3720 | | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' |
3721 | | ;; |
3722 | | *) |
3723 | | if test "$GXX" = yes; then |
3724 | | if test "$with_gnu_ld" = no; then |
3725 | | _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' |
3726 | | else |
3727 | | _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' |
3728 | | fi |
3729 | | fi |
3730 | | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
3731 | | ;; |
3732 | | esac |
3733 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
3734 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
3735 | | ;; |
3736 | | linux*) |
3737 | | case $cc_basename in |
3738 | | KCC) |
3739 | | # Kuck and Associates, Inc. (KAI) C++ Compiler |
3740 | | |
3741 | | # KCC will only create a shared library if the output file |
3742 | | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
3743 | | # to its proper name (with version) after linking. |
3744 | | _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' |
3745 | | _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' |
3746 | | # Commands to make compiler produce verbose output that lists |
3747 | | # what "hidden" libraries, object files and flags are used when |
3748 | | # linking a shared library. |
3749 | | # |
3750 | | # There doesn't appear to be a way to prevent this compiler from |
3751 | | # explicitly linking system object files so we need to strip them |
3752 | | # from the output so that they don't get included in the library |
3753 | | # dependencies. |
3754 | | 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' |
3755 | | |
3756 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' |
3757 | | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
3758 | | |
3759 | | # Archives containing C++ object files must be created using |
3760 | | # "CC -Bstatic", where "CC" is the KAI C++ compiler. |
3761 | | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
3762 | | ;; |
3763 | | icpc) |
3764 | | # Intel C++ |
3765 | | with_gnu_ld=yes |
3766 | | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
3767 | | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
3768 | | _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' |
3769 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
3770 | | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
3771 | | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' |
3772 | | ;; |
3773 | | cxx) |
3774 | | # Compaq C++ |
3775 | | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
3776 | | _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' |
3777 | | |
3778 | | runpath_var=LD_RUN_PATH |
3779 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
3780 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
3781 | | |
3782 | | # Commands to make compiler produce verbose output that lists |
3783 | | # what "hidden" libraries, object files and flags are used when |
3784 | | # linking a shared library. |
3785 | | # |
3786 | | # There doesn't appear to be a way to prevent this compiler from |
3787 | | # explicitly linking system object files so we need to strip them |
3788 | | # from the output so that they don't get included in the library |
3789 | | # dependencies. |
3790 | | 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' |
3791 | | ;; |
3792 | | esac |
3793 | | ;; |
3794 | | lynxos*) |
3795 | | # FIXME: insert proper C++ library support |
3796 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3797 | | ;; |
3798 | | m88k*) |
3799 | | # FIXME: insert proper C++ library support |
3800 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3801 | | ;; |
3802 | | mvs*) |
3803 | | case $cc_basename in |
3804 | | cxx) |
3805 | | # FIXME: insert proper C++ library support |
3806 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3807 | | ;; |
3808 | | *) |
3809 | | # FIXME: insert proper C++ library support |
3810 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3811 | | ;; |
3812 | | esac |
3813 | | ;; |
3814 | | netbsd*) |
3815 | | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
3816 | | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' |
3817 | | wlarc= |
3818 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
3819 | | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
3820 | | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
3821 | | fi |
3822 | | # Workaround some broken pre-1.5 toolchains |
3823 | | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' |
3824 | | ;; |
3825 | | osf3*) |
3826 | | case $cc_basename in |
3827 | | KCC) |
3828 | | # Kuck and Associates, Inc. (KAI) C++ Compiler |
3829 | | |
3830 | | # KCC will only create a shared library if the output file |
3831 | | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
3832 | | # to its proper name (with version) after linking. |
3833 | | _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' |
3834 | | |
3835 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
3836 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
3837 | | |
3838 | | # Archives containing C++ object files must be created using |
3839 | | # "CC -Bstatic", where "CC" is the KAI C++ compiler. |
3840 | | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
3841 | | |
3842 | | ;; |
3843 | | RCC) |
3844 | | # Rational C++ 2.4.1 |
3845 | | # FIXME: insert proper C++ library support |
3846 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3847 | | ;; |
3848 | | cxx) |
3849 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
3850 | | _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' |
3851 | | |
3852 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
3853 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
3854 | | |
3855 | | # Commands to make compiler produce verbose output that lists |
3856 | | # what "hidden" libraries, object files and flags are used when |
3857 | | # linking a shared library. |
3858 | | # |
3859 | | # There doesn't appear to be a way to prevent this compiler from |
3860 | | # explicitly linking system object files so we need to strip them |
3861 | | # from the output so that they don't get included in the library |
3862 | | # dependencies. |
3863 | | 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' |
3864 | | ;; |
3865 | | *) |
3866 | | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
3867 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
3868 | | _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' |
3869 | | |
3870 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
3871 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
3872 | | |
3873 | | # Commands to make compiler produce verbose output that lists |
3874 | | # what "hidden" libraries, object files and flags are used when |
3875 | | # linking a shared library. |
3876 | | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
3877 | | |
3878 | | else |
3879 | | # FIXME: insert proper C++ library support |
3880 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3881 | | fi |
3882 | | ;; |
3883 | | esac |
3884 | | ;; |
3885 | | osf4* | osf5*) |
3886 | | case $cc_basename in |
3887 | | KCC) |
3888 | | # Kuck and Associates, Inc. (KAI) C++ Compiler |
3889 | | |
3890 | | # KCC will only create a shared library if the output file |
3891 | | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
3892 | | # to its proper name (with version) after linking. |
3893 | | _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' |
3894 | | |
3895 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
3896 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
3897 | | |
3898 | | # Archives containing C++ object files must be created using |
3899 | | # the KAI C++ compiler. |
3900 | | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' |
3901 | | ;; |
3902 | | RCC) |
3903 | | # Rational C++ 2.4.1 |
3904 | | # FIXME: insert proper C++ library support |
3905 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3906 | | ;; |
3907 | | cxx) |
3908 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
3909 | | _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' |
3910 | | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ |
3911 | | echo "-hidden">> $lib.exp~ |
3912 | | $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~ |
3913 | | $rm $lib.exp' |
3914 | | |
3915 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
3916 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
3917 | | |
3918 | | # Commands to make compiler produce verbose output that lists |
3919 | | # what "hidden" libraries, object files and flags are used when |
3920 | | # linking a shared library. |
3921 | | # |
3922 | | # There doesn't appear to be a way to prevent this compiler from |
3923 | | # explicitly linking system object files so we need to strip them |
3924 | | # from the output so that they don't get included in the library |
3925 | | # dependencies. |
3926 | | 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' |
3927 | | ;; |
3928 | | *) |
3929 | | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
3930 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
3931 | | _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' |
3932 | | |
3933 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
3934 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
3935 | | |
3936 | | # Commands to make compiler produce verbose output that lists |
3937 | | # what "hidden" libraries, object files and flags are used when |
3938 | | # linking a shared library. |
3939 | | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
3940 | | |
3941 | | else |
3942 | | # FIXME: insert proper C++ library support |
3943 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3944 | | fi |
3945 | | ;; |
3946 | | esac |
3947 | | ;; |
3948 | | psos*) |
3949 | | # FIXME: insert proper C++ library support |
3950 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3951 | | ;; |
3952 | | sco*) |
3953 | | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
3954 | | case $cc_basename in |
3955 | | CC) |
3956 | | # FIXME: insert proper C++ library support |
3957 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3958 | | ;; |
3959 | | *) |
3960 | | # FIXME: insert proper C++ library support |
3961 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3962 | | ;; |
3963 | | esac |
3964 | | ;; |
3965 | | sunos4*) |
3966 | | case $cc_basename in |
3967 | | CC) |
3968 | | # Sun C++ 4.x |
3969 | | # FIXME: insert proper C++ library support |
3970 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3971 | | ;; |
3972 | | lcc) |
3973 | | # Lucid |
3974 | | # FIXME: insert proper C++ library support |
3975 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3976 | | ;; |
3977 | | *) |
3978 | | # FIXME: insert proper C++ library support |
3979 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
3980 | | ;; |
3981 | | esac |
3982 | | ;; |
3983 | | solaris*) |
3984 | | case $cc_basename in |
3985 | | CC) |
3986 | | # Sun C++ 4.2, 5.x and Centerline C++ |
3987 | | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' |
3988 | | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
3989 | | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
3990 | | $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' |
3991 | | |
3992 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
3993 | | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
3994 | | case $host_os in |
3995 | | solaris2.[0-5] | solaris2.[0-5].*) ;; |
3996 | | *) |
3997 | | # The C++ compiler is used as linker so we must use $wl |
3998 | | # flag to pass the commands to the underlying system |
3999 | | # linker. |
4000 | | # Supported since Solaris 2.6 (maybe 2.5.1?) |
4001 | | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' |
4002 | | ;; |
4003 | | esac |
4004 | | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
4005 | | |
4006 | | # Commands to make compiler produce verbose output that lists |
4007 | | # what "hidden" libraries, object files and flags are used when |
4008 | | # linking a shared library. |
4009 | | # |
4010 | | # There doesn't appear to be a way to prevent this compiler from |
4011 | | # explicitly linking system object files so we need to strip them |
4012 | | # from the output so that they don't get included in the library |
4013 | | # dependencies. |
4014 | | 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' |
4015 | | |
4016 | | # Archives containing C++ object files must be created using |
4017 | | # "CC -xar", where "CC" is the Sun C++ compiler. This is |
4018 | | # necessary to make sure instantiated templates are included |
4019 | | # in the archive. |
4020 | | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' |
4021 | | ;; |
4022 | | gcx) |
4023 | | # Green Hills C++ Compiler |
4024 | | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
4025 | | |
4026 | | # The C++ compiler must be used to create the archive. |
4027 | | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' |
4028 | | ;; |
4029 | | *) |
4030 | | # GNU C++ compiler with Solaris linker |
4031 | | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
4032 | | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' |
4033 | | if $CC --version | grep -v '^2\.7' > /dev/null; then |
4034 | | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
4035 | | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
4036 | | $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' |
4037 | | |
4038 | | # Commands to make compiler produce verbose output that lists |
4039 | | # what "hidden" libraries, object files and flags are used when |
4040 | | # linking a shared library. |
4041 | | output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" |
4042 | | else |
4043 | | # g++ 2.7 appears to require `-G' NOT `-shared' on this |
4044 | | # platform. |
4045 | | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
4046 | | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
4047 | | $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' |
4048 | | |
4049 | | # Commands to make compiler produce verbose output that lists |
4050 | | # what "hidden" libraries, object files and flags are used when |
4051 | | # linking a shared library. |
4052 | | output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" |
4053 | | fi |
4054 | | |
4055 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' |
4056 | | fi |
4057 | | ;; |
4058 | | esac |
4059 | | ;; |
4060 | | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) |
4061 | | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
4062 | | ;; |
4063 | | tandem*) |
4064 | | case $cc_basename in |
4065 | | NCC) |
4066 | | # NonStop-UX NCC 3.20 |
4067 | | # FIXME: insert proper C++ library support |
4068 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
4069 | | ;; |
4070 | | *) |
4071 | | # FIXME: insert proper C++ library support |
4072 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
4073 | | ;; |
4074 | | esac |
4075 | | ;; |
4076 | | vxworks*) |
4077 | | # FIXME: insert proper C++ library support |
4078 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
4079 | | ;; |
4080 | | *) |
4081 | | # FIXME: insert proper C++ library support |
4082 | | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
4083 | | ;; |
4084 | | esac |
4085 | | AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) |
4086 | | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
4087 | | |
4088 | | _LT_AC_TAGVAR(GCC, $1)="$GXX" |
4089 | | _LT_AC_TAGVAR(LD, $1)="$LD" |
4090 | | |
4091 | | AC_LIBTOOL_POSTDEP_PREDEP($1) |
4092 | | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
4093 | | AC_LIBTOOL_PROG_CC_C_O($1) |
4094 | | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
4095 | | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
4096 | | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
4097 | | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
4098 | | AC_LIBTOOL_SYS_LIB_STRIP |
4099 | | AC_LIBTOOL_DLOPEN_SELF($1) |
4100 | | |
4101 | | AC_LIBTOOL_CONFIG($1) |
4102 | | |
4103 | | AC_LANG_POP |
4104 | | CC=$lt_save_CC |
4105 | | LDCXX=$LD |
4106 | | LD=$lt_save_LD |
4107 | | GCC=$lt_save_GCC |
4108 | | with_gnu_ldcxx=$with_gnu_ld |
4109 | | with_gnu_ld=$lt_save_with_gnu_ld |
4110 | | lt_cv_path_LDCXX=$lt_cv_path_LD |
4111 | | lt_cv_path_LD=$lt_save_path_LD |
4112 | | lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld |
4113 | | lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld |
4114 | | ])# AC_LIBTOOL_LANG_CXX_CONFIG |
4115 | | |
4116 | | # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) |
4117 | | # ------------------------ |
4118 | | # Figure out "hidden" library dependencies from verbose |
4119 | | # compiler output when linking a shared library. |
4120 | | # Parse the compiler output and extract the necessary |
4121 | | # objects, libraries and library flags. |
4122 | | AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ |
4123 | | dnl we can't use the lt_simple_compile_test_code here, |
4124 | | dnl because it contains code intended for an executable, |
4125 | | dnl not a library. It's possible we should let each |
4126 | | dnl tag define a new lt_????_link_test_code variable, |
4127 | | dnl but it's only used here... |
4128 | | ifelse([$1],[],[cat > conftest.$ac_ext <<EOF |
4129 | | int a; |
4130 | | void foo (void) { a = 0; } |
4131 | | EOF |
4132 | | ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF |
4133 | | class Foo |
4134 | | { |
4135 | | public: |
4136 | | Foo (void) { a = 0; } |
4137 | | private: |
4138 | | int a; |
4139 | | }; |
4140 | | EOF |
4141 | | ],[$1],[F77],[cat > conftest.$ac_ext <<EOF |
4142 | | subroutine foo |
4143 | | implicit none |
4144 | | integer*4 a |
4145 | | a=0 |
4146 | | return |
4147 | | end |
4148 | | EOF |
4149 | | ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF |
4150 | | public class foo { |
4151 | | private int a; |
4152 | | public void bar (void) { |
4153 | | a = 0; |
4154 | | } |
4155 | | }; |
4156 | | EOF |
4157 | | ]) |
4158 | | dnl Parse the compiler output and extract the necessary |
4159 | | dnl objects, libraries and library flags. |
4160 | | if AC_TRY_EVAL(ac_compile); then |
4161 | | # Parse the compiler output and extract the necessary |
4162 | | # objects, libraries and library flags. |
4163 | | |
4164 | | # Sentinel used to keep track of whether or not we are before |
4165 | | # the conftest object file. |
4166 | | pre_test_object_deps_done=no |
4167 | | |
4168 | | # The `*' in the case matches for architectures that use `case' in |
4169 | | # $output_verbose_cmd can trigger glob expansion during the loop |
4170 | | # eval without this substitution. |
4171 | | output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" |
4172 | | |
4173 | | for p in `eval $output_verbose_link_cmd`; do |
4174 | | case $p in |
4175 | | |
4176 | | -L* | -R* | -l*) |
4177 | | # Some compilers place space between "-{L,R}" and the path. |
4178 | | # Remove the space. |
4179 | | if test $p = "-L" \ |
4180 | | || test $p = "-R"; then |
4181 | | prev=$p |
4182 | | continue |
4183 | | else |
4184 | | prev= |
4185 | | fi |
4186 | | |
4187 | | if test "$pre_test_object_deps_done" = no; then |
4188 | | case $p in |
4189 | | -L* | -R*) |
4190 | | # Internal compiler library paths should come after those |
4191 | | # provided the user. The postdeps already come after the |
4192 | | # user supplied libs so there is no need to process them. |
4193 | | if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then |
4194 | | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" |
4195 | | else |
4196 | | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" |
4197 | | fi |
4198 | | ;; |
4199 | | # The "-l" case would never come before the object being |
4200 | | # linked, so don't bother handling this case. |
4201 | | esac |
4202 | | else |
4203 | | if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then |
4204 | | _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" |
4205 | | else |
4206 | | _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" |
4207 | | fi |
4208 | | fi |
4209 | | ;; |
4210 | | |
4211 | | *.$objext) |
4212 | | # This assumes that the test object file only shows up |
4213 | | # once in the compiler output. |
4214 | | if test "$p" = "conftest.$objext"; then |
4215 | | pre_test_object_deps_done=yes |
4216 | | continue |
4217 | | fi |
4218 | | |
4219 | | if test "$pre_test_object_deps_done" = no; then |
4220 | | if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then |
4221 | | _LT_AC_TAGVAR(predep_objects, $1)="$p" |
4222 | | else |
4223 | | _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" |
4224 | | fi |
4225 | | else |
4226 | | if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then |
4227 | | _LT_AC_TAGVAR(postdep_objects, $1)="$p" |
4228 | | else |
4229 | | _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" |
4230 | | fi |
4231 | | fi |
4232 | | ;; |
4233 | | |
4234 | | *) ;; # Ignore the rest. |
4235 | | |
4236 | | esac |
4237 | | done |
4238 | | |
4239 | | # Clean up. |
4240 | | rm -f a.out a.exe |
4241 | | else |
4242 | | echo "libtool.m4: error: problem compiling $1 test program" |
4243 | | fi |
4244 | | |
4245 | | $rm -f confest.$objext |
4246 | | |
4247 | | case " $_LT_AC_TAGVAR(postdeps, $1) " in |
4248 | | *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; |
4249 | | esac |
4250 | | ])# AC_LIBTOOL_POSTDEP_PREDEP |
4251 | | |
4252 | | # AC_LIBTOOL_LANG_F77_CONFIG |
4253 | | # ------------------------ |
4254 | | # Ensure that the configuration vars for the C compiler are |
4255 | | # suitably defined. Those variables are subsequently used by |
4256 | | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
4257 | | AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) |
4258 | | AC_DEFUN([_LT_AC_LANG_F77_CONFIG], |
4259 | | [AC_REQUIRE([AC_PROG_F77]) |
4260 | | AC_LANG_PUSH(Fortran 77) |
4261 | | |
4262 | | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
4263 | | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
4264 | | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
4265 | | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
4266 | | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
4267 | | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
4268 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
4269 | | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= |
4270 | | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
4271 | | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
4272 | | _LT_AC_TAGVAR(hardcode_automatic, $1)=no |
4273 | | _LT_AC_TAGVAR(module_cmds, $1)= |
4274 | | _LT_AC_TAGVAR(module_expsym_cmds, $1)= |
4275 | | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
4276 | | _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
4277 | | _LT_AC_TAGVAR(no_undefined_flag, $1)= |
4278 | | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
4279 | | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
4280 | | |
4281 | | # Source file extension for f77 test sources. |
4282 | | ac_ext=f |
4283 | | |
4284 | | # Object file extension for compiled f77 test sources. |
4285 | | objext=o |
4286 | | _LT_AC_TAGVAR(objext, $1)=$objext |
4287 | | |
4288 | | # Code to be used in simple compile tests |
4289 | | lt_simple_compile_test_code=" subroutine t\n return\n end\n" |
4290 | | |
4291 | | # Code to be used in simple link tests |
4292 | | lt_simple_link_test_code=" program t\n end\n" |
4293 | | |
4294 | | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
4295 | | _LT_AC_SYS_COMPILER |
4296 | | |
4297 | | # Allow CC to be a program name with arguments. |
4298 | | lt_save_CC="$CC" |
4299 | | CC=${F77-"f77"} |
4300 | | compiler=$CC |
4301 | | _LT_AC_TAGVAR(compiler, $1)=$CC |
4302 | | cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` |
4303 | | |
4304 | | AC_MSG_CHECKING([if libtool supports shared libraries]) |
4305 | | AC_MSG_RESULT([$can_build_shared]) |
4306 | | |
4307 | | AC_MSG_CHECKING([whether to build shared libraries]) |
4308 | | test "$can_build_shared" = "no" && enable_shared=no |
4309 | | |
4310 | | # On AIX, shared libraries and static libraries use the same namespace, and |
4311 | | # are all built from PIC. |
4312 | | case "$host_os" in |
4313 | | aix3*) |
4314 | | test "$enable_shared" = yes && enable_static=no |
4315 | | if test -n "$RANLIB"; then |
4316 | | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
4317 | | postinstall_cmds='$RANLIB $lib' |
4318 | | fi |
4319 | | ;; |
4320 | | aix4*) |
4321 | | test "$enable_shared" = yes && enable_static=no |
4322 | | ;; |
4323 | | esac |
4324 | | AC_MSG_RESULT([$enable_shared]) |
4325 | | |
4326 | | AC_MSG_CHECKING([whether to build static libraries]) |
4327 | | # Make sure either enable_shared or enable_static is yes. |
4328 | | test "$enable_shared" = yes || enable_static=yes |
4329 | | AC_MSG_RESULT([$enable_static]) |
4330 | | |
4331 | | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
4332 | | |
4333 | | _LT_AC_TAGVAR(GCC, $1)="$G77" |
4334 | | _LT_AC_TAGVAR(LD, $1)="$LD" |
4335 | | |
4336 | | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
4337 | | AC_LIBTOOL_PROG_CC_C_O($1) |
4338 | | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
4339 | | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
4340 | | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
4341 | | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
4342 | | AC_LIBTOOL_SYS_LIB_STRIP |
4343 | | |
4344 | | |
4345 | | AC_LIBTOOL_CONFIG($1) |
4346 | | |
4347 | | AC_LANG_POP |
4348 | | CC="$lt_save_CC" |
4349 | | ])# AC_LIBTOOL_LANG_F77_CONFIG |
4350 | | |
4351 | | |
4352 | | # AC_LIBTOOL_LANG_GCJ_CONFIG |
4353 | | # -------------------------- |
4354 | | # Ensure that the configuration vars for the C compiler are |
4355 | | # suitably defined. Those variables are subsequently used by |
4356 | | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
4357 | | AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) |
4358 | | AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], |
4359 | | [AC_LANG_SAVE |
4360 | | |
4361 | | # Source file extension for Java test sources. |
4362 | | ac_ext=java |
4363 | | |
4364 | | # Object file extension for compiled Java test sources. |
4365 | | objext=o |
4366 | | _LT_AC_TAGVAR(objext, $1)=$objext |
4367 | | |
4368 | | # Code to be used in simple compile tests |
4369 | | lt_simple_compile_test_code="class foo {}\n" |
4370 | | |
4371 | | # Code to be used in simple link tests |
4372 | | lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' |
4373 | | |
4374 | | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
4375 | | _LT_AC_SYS_COMPILER |
4376 | | |
4377 | | # Allow CC to be a program name with arguments. |
4378 | | lt_save_CC="$CC" |
4379 | | CC=${GCJ-"gcj"} |
4380 | | compiler=$CC |
4381 | | _LT_AC_TAGVAR(compiler, $1)=$CC |
4382 | | |
4383 | | # GCJ did not exist at the time GCC didn't implicitly link libc in. |
4384 | | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
4385 | | |
4386 | | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
4387 | | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
4388 | | AC_LIBTOOL_PROG_CC_C_O($1) |
4389 | | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
4390 | | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
4391 | | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
4392 | | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
4393 | | AC_LIBTOOL_SYS_LIB_STRIP |
4394 | | AC_LIBTOOL_DLOPEN_SELF($1) |
4395 | | |
4396 | | AC_LIBTOOL_CONFIG($1) |
4397 | | |
4398 | | AC_LANG_RESTORE |
4399 | | CC="$lt_save_CC" |
4400 | | ])# AC_LIBTOOL_LANG_GCJ_CONFIG |
4401 | | |
4402 | | |
4403 | | # AC_LIBTOOL_LANG_RC_CONFIG |
4404 | | # -------------------------- |
4405 | | # Ensure that the configuration vars for the Windows resource compiler are |
4406 | | # suitably defined. Those variables are subsequently used by |
4407 | | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
4408 | | AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) |
4409 | | AC_DEFUN([_LT_AC_LANG_RC_CONFIG], |
4410 | | [AC_LANG_SAVE |
4411 | | |
4412 | | # Source file extension for RC test sources. |
4413 | | ac_ext=rc |
4414 | | |
4415 | | # Object file extension for compiled RC test sources. |
4416 | | objext=o |
4417 | | _LT_AC_TAGVAR(objext, $1)=$objext |
4418 | | |
4419 | | # Code to be used in simple compile tests |
4420 | | lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' |
4421 | | |
4422 | | # Code to be used in simple link tests |
4423 | | lt_simple_link_test_code="$lt_simple_compile_test_code" |
4424 | | |
4425 | | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
4426 | | _LT_AC_SYS_COMPILER |
4427 | | |
4428 | | # Allow CC to be a program name with arguments. |
4429 | | lt_save_CC="$CC" |
4430 | | CC=${RC-"windres"} |
4431 | | compiler=$CC |
4432 | | _LT_AC_TAGVAR(compiler, $1)=$CC |
4433 | | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
4434 | | |
4435 | | AC_LIBTOOL_CONFIG($1) |
4436 | | |
4437 | | AC_LANG_RESTORE |
4438 | | CC="$lt_save_CC" |
4439 | | ])# AC_LIBTOOL_LANG_RC_CONFIG |
4440 | | |
4441 | | |
4442 | | # AC_LIBTOOL_CONFIG([TAGNAME]) |
4443 | | # ---------------------------- |
4444 | | # If TAGNAME is not passed, then create an initial libtool script |
4445 | | # with a default configuration from the untagged config vars. Otherwise |
4446 | | # add code to config.status for appending the configuration named by |
4447 | | # TAGNAME from the matching tagged config vars. |
4448 | | AC_DEFUN([AC_LIBTOOL_CONFIG], |
4449 | | [# The else clause should only fire when bootstrapping the |
| 2905 | cat conftest.err 1>&5 |
| 2906 | fi]) |
| 2907 | AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) |
| 2908 | ;; |
| 2909 | esac |
| 2910 | fi |
| 2911 | need_lc=${lt_cv_archive_cmds_need_lc-yes} |
| 2912 | |
| 2913 | # The second clause should only fire when bootstrapping the |
4905 | | # We use sed instead of cat because bash on DJGPP gets confused if |
4906 | | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
4907 | | # text mode, it properly converts lines to CR/LF. This bash problem |
4908 | | # is reportedly fixed, but why not run on old versions too? |
4909 | | sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) |
4910 | | |
4911 | | mv -f "$cfgfile" "$ofile" || \ |
4912 | | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") |
4913 | | chmod +x "$ofile" |
4914 | | ]) |
4915 | | else |
4916 | | # If there is no Makefile yet, we rely on a make rule to execute |
4917 | | # `config.status --recheck' to rerun these tests and create the |
4918 | | # libtool script then. |
4919 | | ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` |
4920 | | if test -f "$ltmain_in"; then |
4921 | | test -f Makefile && make "$ltmain" |
4922 | | fi |
4923 | | fi |
4924 | | ])# AC_LIBTOOL_CONFIG |
4925 | | |
4926 | | |
4927 | | # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) |
4928 | | # ------------------------------------------- |
4929 | | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], |
4930 | | [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
4931 | | |
4932 | | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
4933 | | |
4934 | | if test "$GCC" = yes; then |
4935 | | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
4936 | | |
4937 | | AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], |
4938 | | lt_cv_prog_compiler_rtti_exceptions, |
4939 | | [-fno-rtti -fno-exceptions], [], |
4940 | | [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) |
4941 | | fi |
4942 | | ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI |
4943 | | |
4944 | | |
4945 | | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
4946 | | # --------------------------------- |
4947 | | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
4948 | | [AC_REQUIRE([AC_CANONICAL_HOST]) |
4949 | | AC_REQUIRE([AC_PROG_NM]) |
4950 | | AC_REQUIRE([AC_OBJEXT]) |
4951 | | # Check for command to grab the raw symbol name followed by C symbol from nm. |
4952 | | AC_MSG_CHECKING([command to parse $NM output from $compiler object]) |
4953 | | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], |
4954 | | [ |
4955 | | # These are sane defaults that work on at least a few old systems. |
4956 | | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
4957 | | |
4958 | | # Character class describing NM global symbol codes. |
4959 | | symcode='[[BCDEGRST]]' |
4960 | | |
4961 | | # Regexp to match symbols that can be accessed directly from C. |
4962 | | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
4963 | | |
4964 | | # Transform the above into a raw symbol and a C symbol. |
4965 | | symxfrm='\1 \2\3 \3' |
4966 | | |
4967 | | # Transform an extracted symbol line into a proper C declaration |
4968 | | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" |
4969 | | |
4970 | | # Transform an extracted symbol line into symbol name and symbol address |
4971 | | 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'" |
4972 | | |
4973 | | # Define system-specific variables. |
4974 | | case $host_os in |
4975 | | aix*) |
4976 | | symcode='[[BCDT]]' |
4977 | | ;; |
4978 | | cygwin* | mingw* | pw32*) |
4979 | | symcode='[[ABCDGISTW]]' |
4980 | | ;; |
4981 | | hpux*) # Its linker distinguishes data from code symbols |
4982 | | if test "$host_cpu" = ia64; then |
4983 | | symcode='[[ABCDEGRST]]' |
4984 | | fi |
4985 | | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
4986 | | 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'" |
4987 | | ;; |
4988 | | irix* | nonstopux*) |
4989 | | symcode='[[BCDEGRST]]' |
4990 | | ;; |
4991 | | osf*) |
4992 | | symcode='[[BCDEGQRST]]' |
4993 | | ;; |
4994 | | solaris* | sysv5*) |
4995 | | symcode='[[BDRT]]' |
4996 | | ;; |
4997 | | sysv4) |
4998 | | symcode='[[DFNSTU]]' |
4999 | | ;; |
5000 | | esac |
5001 | | |
5002 | | # Handle CRLF in mingw tool chain |
5003 | | opt_cr= |
5004 | | case $build_os in |
5005 | | mingw*) |
5006 | | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
5007 | | ;; |
5008 | | esac |
5009 | | |
5010 | | # If we're using GNU nm, then use its standard symbol codes. |
5011 | | case `$NM -V 2>&1` in |
5012 | | *GNU* | *'with BFD'*) |
5013 | | symcode='[[ABCDGIRSTW]]' ;; |
5014 | | esac |
5015 | | |
5016 | | # Try without a prefix undercore, then with it. |
5017 | | for ac_symprfx in "" "_"; do |
5018 | | |
5019 | | # Write the raw and C identifiers. |
5020 | | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" |
5021 | | |
5022 | | # Check to see that the pipe works correctly. |
5023 | | pipe_works=no |
5024 | | |
5025 | | rm -f conftest* |
5026 | | cat > conftest.$ac_ext <<EOF |
5027 | | #ifdef __cplusplus |
5028 | | extern "C" { |
5029 | | #endif |
5030 | | char nm_test_var; |
5031 | | void nm_test_func(){} |
5032 | | #ifdef __cplusplus |
5033 | | } |
5034 | | #endif |
5035 | | int main(){nm_test_var='a';nm_test_func();return(0);} |
5036 | | EOF |
5037 | | |
5038 | | if AC_TRY_EVAL(ac_compile); then |
5039 | | # Now try to grab the symbols. |
5040 | | nlist=conftest.nm |
5041 | | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
5042 | | # Try sorting and uniquifying the output. |
5043 | | if sort "$nlist" | uniq > "$nlist"T; then |
5044 | | mv -f "$nlist"T "$nlist" |
5045 | | else |
5046 | | rm -f "$nlist"T |
5047 | | fi |
5048 | | |
5049 | | # Make sure that we snagged all the symbols we need. |
5050 | | if grep ' nm_test_var$' "$nlist" >/dev/null; then |
5051 | | if grep ' nm_test_func$' "$nlist" >/dev/null; then |
5052 | | cat <<EOF > conftest.$ac_ext |
5053 | | #ifdef __cplusplus |
5054 | | extern "C" { |
5055 | | #endif |
5056 | | |
5057 | | EOF |
5058 | | # Now generate the symbol file. |
5059 | | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' |
5060 | | |
5061 | | cat <<EOF >> conftest.$ac_ext |
5062 | | #if defined (__STDC__) && __STDC__ |
5063 | | # define lt_ptr_t void * |
5064 | | #else |
5065 | | # define lt_ptr_t char * |
5066 | | # define const |
5067 | | #endif |
5068 | | |
5069 | | /* The mapping between symbol names and symbols. */ |
5070 | | const struct { |
5071 | | const char *name; |
5072 | | lt_ptr_t address; |
5073 | | } |
5074 | | lt_preloaded_symbols[[]] = |
5075 | | { |
5076 | | EOF |
5077 | | $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext |
5078 | | cat <<\EOF >> conftest.$ac_ext |
5079 | | {0, (lt_ptr_t) 0} |
5080 | | }; |
5081 | | |
5082 | | #ifdef __cplusplus |
5083 | | } |
5084 | | #endif |
5085 | | EOF |
5086 | | # Now try linking the two files. |
5087 | | mv conftest.$ac_objext conftstm.$ac_objext |
5088 | | lt_save_LIBS="$LIBS" |
5089 | | lt_save_CFLAGS="$CFLAGS" |
5090 | | LIBS="conftstm.$ac_objext" |
5091 | | CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" |
5092 | | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then |
5093 | | pipe_works=yes |
5094 | | fi |
5095 | | LIBS="$lt_save_LIBS" |
5096 | | CFLAGS="$lt_save_CFLAGS" |
5097 | | else |
5098 | | echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD |
5099 | | fi |
5100 | | else |
5101 | | echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD |
5102 | | fi |
5103 | | else |
5104 | | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD |
5105 | | fi |
5106 | | else |
5107 | | echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD |
5108 | | cat conftest.$ac_ext >&5 |
5109 | | fi |
5110 | | rm -f conftest* conftst* |
5111 | | |
5112 | | # Do not use the global_symbol_pipe unless it works. |
5113 | | if test "$pipe_works" = yes; then |
5114 | | break |
5115 | | else |
5116 | | lt_cv_sys_global_symbol_pipe= |
5117 | | fi |
5118 | | done |
5119 | | ]) |
5120 | | if test -z "$lt_cv_sys_global_symbol_pipe"; then |
5121 | | lt_cv_sys_global_symbol_to_cdecl= |
5122 | | fi |
5123 | | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then |
5124 | | AC_MSG_RESULT(failed) |
5125 | | else |
5126 | | AC_MSG_RESULT(ok) |
5127 | | fi |
5128 | | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
5129 | | |
5130 | | |
5131 | | # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) |
5132 | | # --------------------------------------- |
5133 | | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], |
5134 | | [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= |
5135 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
5136 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= |
5137 | | |
5138 | | AC_MSG_CHECKING([for $compiler option to produce PIC]) |
5139 | | ifelse([$1],[CXX],[ |
5140 | | # C++ specific cases for pic, static, wl, etc. |
5141 | | if test "$GXX" = yes; then |
5142 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5143 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
5144 | | |
5145 | | case $host_os in |
5146 | | aix*) |
5147 | | # All AIX code is PIC. |
5148 | | if test "$host_cpu" = ia64; then |
5149 | | # AIX 5 now supports IA64 processor |
5150 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5151 | | fi |
5152 | | ;; |
5153 | | amigaos*) |
5154 | | # FIXME: we need at least 68020 code to build shared libraries, but |
5155 | | # adding the `-m68020' flag to GCC prevents building anything better, |
5156 | | # like `-m68040'. |
5157 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
5158 | | ;; |
5159 | | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
5160 | | # PIC is the default for these OSes. |
5161 | | ;; |
5162 | | mingw* | os2* | pw32*) |
5163 | | # This hack is so that the source file can tell whether it is being |
5164 | | # built for inclusion in a dll (and should export symbols for example). |
5165 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
5166 | | ;; |
5167 | | darwin* | rhapsody*) |
5168 | | # PIC is the default on this platform |
5169 | | # Common symbols not allowed in MH_DYLIB files |
5170 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
5171 | | ;; |
5172 | | *djgpp*) |
5173 | | # DJGPP does not support shared libraries at all |
5174 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
5175 | | ;; |
5176 | | sysv4*MP*) |
5177 | | if test -d /usr/nec; then |
5178 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
5179 | | fi |
5180 | | ;; |
5181 | | hpux*) |
5182 | | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
5183 | | # not for PA HP-UX. |
5184 | | case "$host_cpu" in |
5185 | | hppa*64*|ia64*) |
5186 | | ;; |
5187 | | *) |
5188 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
5189 | | ;; |
5190 | | esac |
5191 | | ;; |
5192 | | *) |
5193 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
5194 | | ;; |
5195 | | esac |
5196 | | else |
5197 | | case $host_os in |
5198 | | aix4* | aix5*) |
5199 | | # All AIX code is PIC. |
5200 | | if test "$host_cpu" = ia64; then |
5201 | | # AIX 5 now supports IA64 processor |
5202 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5203 | | else |
5204 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
5205 | | fi |
5206 | | ;; |
5207 | | chorus*) |
5208 | | case $cc_basename in |
5209 | | cxch68) |
5210 | | # Green Hills C++ Compiler |
5211 | | # _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" |
5212 | | ;; |
5213 | | esac |
5214 | | ;; |
5215 | | dgux*) |
5216 | | case $cc_basename in |
5217 | | ec++) |
5218 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
5219 | | ;; |
5220 | | ghcx) |
5221 | | # Green Hills C++ Compiler |
5222 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
5223 | | ;; |
5224 | | *) |
5225 | | ;; |
5226 | | esac |
5227 | | ;; |
5228 | | freebsd* | kfreebsd*-gnu) |
5229 | | # FreeBSD uses GNU C++ |
5230 | | ;; |
5231 | | hpux9* | hpux10* | hpux11*) |
5232 | | case $cc_basename in |
5233 | | CC) |
5234 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5235 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" |
5236 | | if test "$host_cpu" != ia64; then |
5237 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
5238 | | fi |
5239 | | ;; |
5240 | | aCC) |
5241 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5242 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" |
5243 | | case "$host_cpu" in |
5244 | | hppa*64*|ia64*) |
5245 | | # +Z the default |
5246 | | ;; |
5247 | | *) |
5248 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
5249 | | ;; |
5250 | | esac |
5251 | | ;; |
5252 | | *) |
5253 | | ;; |
5254 | | esac |
5255 | | ;; |
5256 | | irix5* | irix6* | nonstopux*) |
5257 | | case $cc_basename in |
5258 | | CC) |
5259 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5260 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
5261 | | # CC pic flag -KPIC is the default. |
5262 | | ;; |
5263 | | *) |
5264 | | ;; |
5265 | | esac |
5266 | | ;; |
5267 | | linux*) |
5268 | | case $cc_basename in |
5269 | | KCC) |
5270 | | # KAI C++ Compiler |
5271 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
5272 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
5273 | | ;; |
5274 | | icpc) |
5275 | | # Intel C++ |
5276 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5277 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
5278 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
5279 | | ;; |
5280 | | cxx) |
5281 | | # Compaq C++ |
5282 | | # Make sure the PIC flag is empty. It appears that all Alpha |
5283 | | # Linux and Compaq Tru64 Unix objects are PIC. |
5284 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
5285 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
5286 | | ;; |
5287 | | *) |
5288 | | ;; |
5289 | | esac |
5290 | | ;; |
5291 | | lynxos*) |
5292 | | ;; |
5293 | | m88k*) |
5294 | | ;; |
5295 | | mvs*) |
5296 | | case $cc_basename in |
5297 | | cxx) |
5298 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' |
5299 | | ;; |
5300 | | *) |
5301 | | ;; |
5302 | | esac |
5303 | | ;; |
5304 | | netbsd*) |
5305 | | ;; |
5306 | | osf3* | osf4* | osf5*) |
5307 | | case $cc_basename in |
5308 | | KCC) |
5309 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
5310 | | ;; |
5311 | | RCC) |
5312 | | # Rational C++ 2.4.1 |
5313 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
5314 | | ;; |
5315 | | cxx) |
5316 | | # Digital/Compaq C++ |
5317 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5318 | | # Make sure the PIC flag is empty. It appears that all Alpha |
5319 | | # Linux and Compaq Tru64 Unix objects are PIC. |
5320 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
5321 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
5322 | | ;; |
5323 | | *) |
5324 | | ;; |
5325 | | esac |
5326 | | ;; |
5327 | | psos*) |
5328 | | ;; |
5329 | | sco*) |
5330 | | case $cc_basename in |
5331 | | CC) |
5332 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
5333 | | ;; |
5334 | | *) |
5335 | | ;; |
5336 | | esac |
5337 | | ;; |
5338 | | solaris*) |
5339 | | case $cc_basename in |
5340 | | CC) |
5341 | | # Sun C++ 4.2, 5.x and Centerline C++ |
5342 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
5343 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5344 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
5345 | | ;; |
5346 | | gcx) |
5347 | | # Green Hills C++ Compiler |
5348 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
5349 | | ;; |
5350 | | *) |
5351 | | ;; |
5352 | | esac |
5353 | | ;; |
5354 | | sunos4*) |
5355 | | case $cc_basename in |
5356 | | CC) |
5357 | | # Sun C++ 4.x |
5358 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
5359 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5360 | | ;; |
5361 | | lcc) |
5362 | | # Lucid |
5363 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
5364 | | ;; |
5365 | | *) |
5366 | | ;; |
5367 | | esac |
5368 | | ;; |
5369 | | tandem*) |
5370 | | case $cc_basename in |
5371 | | NCC) |
5372 | | # NonStop-UX NCC 3.20 |
5373 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
5374 | | ;; |
5375 | | *) |
5376 | | ;; |
5377 | | esac |
5378 | | ;; |
5379 | | unixware*) |
5380 | | ;; |
5381 | | vxworks*) |
5382 | | ;; |
5383 | | *) |
5384 | | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
5385 | | ;; |
5386 | | esac |
5387 | | fi |
5388 | | ], |
5389 | | [ |
5390 | | if test "$GCC" = yes; then |
5391 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5392 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
5393 | | |
5394 | | case $host_os in |
5395 | | aix*) |
5396 | | # All AIX code is PIC. |
5397 | | if test "$host_cpu" = ia64; then |
5398 | | # AIX 5 now supports IA64 processor |
5399 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5400 | | fi |
5401 | | ;; |
5402 | | |
5403 | | amigaos*) |
5404 | | # FIXME: we need at least 68020 code to build shared libraries, but |
5405 | | # adding the `-m68020' flag to GCC prevents building anything better, |
5406 | | # like `-m68040'. |
5407 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
5408 | | ;; |
5409 | | |
5410 | | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
5411 | | # PIC is the default for these OSes. |
5412 | | ;; |
5413 | | |
5414 | | mingw* | pw32* | os2*) |
5415 | | # This hack is so that the source file can tell whether it is being |
5416 | | # built for inclusion in a dll (and should export symbols for example). |
5417 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
5418 | | ;; |
5419 | | |
5420 | | darwin* | rhapsody*) |
5421 | | # PIC is the default on this platform |
5422 | | # Common symbols not allowed in MH_DYLIB files |
5423 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
5424 | | ;; |
5425 | | |
5426 | | msdosdjgpp*) |
5427 | | # Just because we use GCC doesn't mean we suddenly get shared libraries |
5428 | | # on systems that don't support them. |
5429 | | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
5430 | | enable_shared=no |
5431 | | ;; |
5432 | | |
5433 | | sysv4*MP*) |
5434 | | if test -d /usr/nec; then |
5435 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
5436 | | fi |
5437 | | ;; |
5438 | | |
5439 | | hpux*) |
5440 | | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
5441 | | # not for PA HP-UX. |
5442 | | case "$host_cpu" in |
5443 | | hppa*64*|ia64*) |
5444 | | # +Z the default |
5445 | | ;; |
5446 | | *) |
5447 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
5448 | | ;; |
5449 | | esac |
5450 | | ;; |
5451 | | |
5452 | | *) |
5453 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
5454 | | ;; |
5455 | | esac |
5456 | | else |
5457 | | # PORTME Check for flag to pass linker flags through the system compiler. |
5458 | | case $host_os in |
5459 | | aix*) |
5460 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5461 | | if test "$host_cpu" = ia64; then |
5462 | | # AIX 5 now supports IA64 processor |
5463 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5464 | | else |
5465 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
5466 | | fi |
5467 | | ;; |
5468 | | |
5469 | | mingw* | pw32* | os2*) |
5470 | | # This hack is so that the source file can tell whether it is being |
5471 | | # built for inclusion in a dll (and should export symbols for example). |
5472 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
5473 | | ;; |
5474 | | |
5475 | | hpux9* | hpux10* | hpux11*) |
5476 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5477 | | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
5478 | | # not for PA HP-UX. |
5479 | | case "$host_cpu" in |
5480 | | hppa*64*|ia64*) |
5481 | | # +Z the default |
5482 | | ;; |
5483 | | *) |
5484 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
5485 | | ;; |
5486 | | esac |
5487 | | # Is there a better lt_prog_compiler_static that works with the bundled CC? |
5488 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' |
5489 | | ;; |
5490 | | |
5491 | | irix5* | irix6* | nonstopux*) |
5492 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5493 | | # PIC (with -KPIC) is the default. |
5494 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
5495 | | ;; |
5496 | | |
5497 | | newsos6) |
5498 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
5499 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5500 | | ;; |
5501 | | |
5502 | | linux*) |
5503 | | case $CC in |
5504 | | icc* | ecc*) |
5505 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5506 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
5507 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
5508 | | ;; |
5509 | | ccc*) |
5510 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5511 | | # All Alpha code is PIC. |
5512 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
5513 | | ;; |
5514 | | esac |
5515 | | ;; |
5516 | | |
5517 | | osf3* | osf4* | osf5*) |
5518 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5519 | | # All OSF/1 code is PIC. |
5520 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
5521 | | ;; |
5522 | | |
5523 | | sco3.2v5*) |
5524 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' |
5525 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' |
5526 | | ;; |
5527 | | |
5528 | | solaris*) |
5529 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5530 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
5531 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5532 | | ;; |
5533 | | |
5534 | | sunos4*) |
5535 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
5536 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
5537 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5538 | | ;; |
5539 | | |
5540 | | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
5541 | | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
5542 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
5543 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5544 | | ;; |
5545 | | |
5546 | | sysv4*MP*) |
5547 | | if test -d /usr/nec ;then |
5548 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' |
5549 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5550 | | fi |
5551 | | ;; |
5552 | | |
5553 | | uts4*) |
5554 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
5555 | | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
5556 | | ;; |
5557 | | |
5558 | | *) |
5559 | | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
5560 | | ;; |
5561 | | esac |
5562 | | fi |
5563 | | ]) |
5564 | | AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) |
5565 | | |
5566 | | # |
5567 | | # Check to make sure the PIC flag actually works. |
5568 | | # |
5569 | | if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then |
5570 | | AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], |
5571 | | _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), |
5572 | | [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], |
5573 | | [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in |
5574 | | "" | " "*) ;; |
5575 | | *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; |
5576 | | esac], |
5577 | | [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
5578 | | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) |
5579 | | fi |
5580 | | case "$host_os" in |
5581 | | # For platforms which do not support PIC, -DPIC is meaningless: |
5582 | | *djgpp*) |
5583 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
5584 | | ;; |
5585 | | *) |
5586 | | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" |
5587 | | ;; |
5588 | | esac |
5589 | | ]) |
5590 | | |
5591 | | |
5592 | | # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) |
5593 | | # ------------------------------------ |
5594 | | # See if the linker supports building shared libraries. |
5595 | | AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], |
5596 | | [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
5597 | | ifelse([$1],[CXX],[ |
5598 | |