Mercurial > SDL_sound_CoreAudio
comparison acinclude.m4 @ 440:6d94441c854e
Fixed (I hope!) some libtool problems.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 12 Jan 2003 22:06:38 +0000 |
parents | 72b51548aeca |
children | 75819e5c59d4 |
comparison
equal
deleted
inserted
replaced
439:48b56888964d | 440:6d94441c854e |
---|---|
665 fi | 665 fi |
666 AC_SUBST(SMPEG_CFLAGS) | 666 AC_SUBST(SMPEG_CFLAGS) |
667 AC_SUBST(SMPEG_LIBS) | 667 AC_SUBST(SMPEG_LIBS) |
668 rm -f conf.smpegtest | 668 rm -f conf.smpegtest |
669 ]) | 669 ]) |
670 ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- | 670 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- |
671 ## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc. | 671 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001 |
672 ## Free Software Foundation, Inc. | |
672 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | 673 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
673 ## | 674 ## |
674 ## This program is free software; you can redistribute it and/or modify | 675 ## This program is free software; you can redistribute it and/or modify |
675 ## it under the terms of the GNU General Public License as published by | 676 ## it under the terms of the GNU General Public License as published by |
676 ## the Free Software Foundation; either version 2 of the License, or | 677 ## the Free Software Foundation; either version 2 of the License, or |
688 ## As a special exception to the GNU General Public License, if you | 689 ## As a special exception to the GNU General Public License, if you |
689 ## distribute this file as part of a program that contains a | 690 ## distribute this file as part of a program that contains a |
690 ## configuration script generated by Autoconf, you may include it under | 691 ## configuration script generated by Autoconf, you may include it under |
691 ## the same distribution terms that you use for the rest of that program. | 692 ## the same distribution terms that you use for the rest of that program. |
692 | 693 |
693 # serial 40 AC_PROG_LIBTOOL | 694 # serial 46 AC_PROG_LIBTOOL |
694 AC_DEFUN(AC_PROG_LIBTOOL, | 695 |
696 AC_DEFUN([AC_PROG_LIBTOOL], | |
695 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl | 697 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
696 | 698 |
697 # Save cache, so that ltconfig can load it | |
698 AC_CACHE_SAVE | |
699 | |
700 # Actually configure libtool. ac_aux_dir is where install-sh is found. | |
701 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
702 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ | |
703 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ | |
704 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ | |
705 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ | |
706 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ | |
707 || AC_MSG_ERROR([libtool configure failed]) | |
708 | |
709 # Reload cache, that may have been modified by ltconfig | |
710 AC_CACHE_LOAD | |
711 | |
712 # This can be used to rebuild libtool when needed | 699 # This can be used to rebuild libtool when needed |
713 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" | 700 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" |
714 | 701 |
715 # Always use our own libtool. | 702 # Always use our own libtool. |
716 LIBTOOL='$(SHELL) $(top_builddir)/libtool' | 703 LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
717 AC_SUBST(LIBTOOL)dnl | 704 AC_SUBST(LIBTOOL)dnl |
718 | 705 |
719 # Redirect the config.log output again, so that the ltconfig log is not | 706 # Prevent multiple expansion |
720 # clobbered by the next message. | 707 define([AC_PROG_LIBTOOL], []) |
721 exec 5>>./config.log | |
722 ]) | 708 ]) |
723 | 709 |
724 AC_DEFUN(AC_LIBTOOL_SETUP, | 710 AC_DEFUN([AC_LIBTOOL_SETUP], |
725 [AC_PREREQ(2.13)dnl | 711 [AC_PREREQ(2.13)dnl |
726 AC_REQUIRE([AC_ENABLE_SHARED])dnl | 712 AC_REQUIRE([AC_ENABLE_SHARED])dnl |
727 AC_REQUIRE([AC_ENABLE_STATIC])dnl | 713 AC_REQUIRE([AC_ENABLE_STATIC])dnl |
728 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl | 714 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
729 AC_REQUIRE([AC_CANONICAL_HOST])dnl | 715 AC_REQUIRE([AC_CANONICAL_HOST])dnl |
730 AC_REQUIRE([AC_CANONICAL_BUILD])dnl | 716 AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
731 AC_REQUIRE([AC_PROG_RANLIB])dnl | |
732 AC_REQUIRE([AC_PROG_CC])dnl | 717 AC_REQUIRE([AC_PROG_CC])dnl |
733 AC_REQUIRE([AC_PROG_LD])dnl | 718 AC_REQUIRE([AC_PROG_LD])dnl |
719 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl | |
734 AC_REQUIRE([AC_PROG_NM])dnl | 720 AC_REQUIRE([AC_PROG_NM])dnl |
735 AC_REQUIRE([AC_PROG_LN_S])dnl | 721 AC_REQUIRE([AC_PROG_LN_S])dnl |
722 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl | |
723 AC_REQUIRE([AC_OBJEXT])dnl | |
724 AC_REQUIRE([AC_EXEEXT])dnl | |
736 dnl | 725 dnl |
737 | 726 |
738 case "$target" in | 727 _LT_AC_PROG_ECHO_BACKSLASH |
739 NONE) lt_target="$host" ;; | 728 # Only perform the check for file, if the check method requires it |
740 *) lt_target="$target" ;; | 729 case $deplibs_check_method in |
730 file_magic*) | |
731 if test "$file_magic_cmd" = '$MAGIC_CMD'; then | |
732 AC_PATH_MAGIC | |
733 fi | |
734 ;; | |
741 esac | 735 esac |
742 | 736 |
743 # Check for any special flags to pass to ltconfig. | 737 AC_CHECK_TOOL(RANLIB, ranlib, :) |
744 libtool_flags="--cache-file=$cache_file" | 738 AC_CHECK_TOOL(STRIP, strip, :) |
745 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" | 739 |
746 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" | 740 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) |
747 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" | |
748 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" | |
749 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
750 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], | |
751 [libtool_flags="$libtool_flags --enable-dlopen"]) | |
752 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], | 741 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
753 [libtool_flags="$libtool_flags --enable-win32-dll"]) | 742 enable_win32_dll=yes, enable_win32_dll=no) |
743 | |
754 AC_ARG_ENABLE(libtool-lock, | 744 AC_ARG_ENABLE(libtool-lock, |
755 [ --disable-libtool-lock avoid locking (might break parallel builds)]) | 745 [ --disable-libtool-lock avoid locking (might break parallel builds)]) |
756 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" | 746 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
757 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" | |
758 | 747 |
759 # Some flags need to be propagated to the compiler or linker for good | 748 # Some flags need to be propagated to the compiler or linker for good |
760 # libtool support. | 749 # libtool support. |
761 case "$lt_target" in | 750 case $host in |
762 *-*-irix6*) | 751 *-*-irix6*) |
763 # Find out which ABI we are using. | 752 # Find out which ABI we are using. |
764 echo '[#]line __oline__ "configure"' > conftest.$ac_ext | 753 echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
765 if AC_TRY_EVAL(ac_compile); then | 754 if AC_TRY_EVAL(ac_compile); then |
766 case "`/usr/bin/file conftest.o`" in | 755 case `/usr/bin/file conftest.$ac_objext` in |
767 *32-bit*) | 756 *32-bit*) |
768 LD="${LD-ld} -32" | 757 LD="${LD-ld} -32" |
769 ;; | 758 ;; |
770 *N32*) | 759 *N32*) |
771 LD="${LD-ld} -n32" | 760 LD="${LD-ld} -n32" |
781 *-*-sco3.2v5*) | 770 *-*-sco3.2v5*) |
782 # On SCO OpenServer 5, we need -belf to get full-featured binaries. | 771 # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
783 SAVE_CFLAGS="$CFLAGS" | 772 SAVE_CFLAGS="$CFLAGS" |
784 CFLAGS="$CFLAGS -belf" | 773 CFLAGS="$CFLAGS -belf" |
785 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, | 774 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
786 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) | 775 [AC_LANG_SAVE |
776 AC_LANG_C | |
777 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) | |
778 AC_LANG_RESTORE]) | |
787 if test x"$lt_cv_cc_needs_belf" != x"yes"; then | 779 if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
788 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | 780 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
789 CFLAGS="$SAVE_CFLAGS" | 781 CFLAGS="$SAVE_CFLAGS" |
790 fi | 782 fi |
791 ;; | 783 ;; |
792 | 784 |
793 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], | 785 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
794 [*-*-cygwin* | *-*-mingw*) | 786 [*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
795 AC_CHECK_TOOL(DLLTOOL, dlltool, false) | 787 AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
796 AC_CHECK_TOOL(AS, as, false) | 788 AC_CHECK_TOOL(AS, as, false) |
797 AC_CHECK_TOOL(OBJDUMP, objdump, false) | 789 AC_CHECK_TOOL(OBJDUMP, objdump, false) |
798 ;; | 790 |
791 # recent cygwin and mingw systems supply a stub DllMain which the user | |
792 # can override, but on older systems we have to supply one | |
793 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, | |
794 [AC_TRY_LINK([], | |
795 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); | |
796 DllMain (0, 0, 0);], | |
797 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) | |
798 | |
799 case $host/$CC in | |
800 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) | |
801 # old mingw systems require "-dll" to link a DLL, while more recent ones | |
802 # require "-mdll" | |
803 SAVE_CFLAGS="$CFLAGS" | |
804 CFLAGS="$CFLAGS -mdll" | |
805 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, | |
806 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) | |
807 CFLAGS="$SAVE_CFLAGS" ;; | |
808 *-*-cygwin* | *-*-pw32*) | |
809 # cygwin systems need to pass --dll to the linker, and not link | |
810 # crt.o which will require a WinMain@16 definition. | |
811 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; | |
812 esac | |
813 ;; | |
814 ]) | |
815 esac | |
816 | |
817 _LT_AC_LTCONFIG_HACK | |
818 | |
799 ]) | 819 ]) |
820 | |
821 # AC_LIBTOOL_HEADER_ASSERT | |
822 # ------------------------ | |
823 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], | |
824 [AC_CACHE_CHECK([whether $CC supports assert without backlinking], | |
825 [lt_cv_func_assert_works], | |
826 [case $host in | |
827 *-*-solaris*) | |
828 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then | |
829 case `$CC --version 2>/dev/null` in | |
830 [[12]].*) lt_cv_func_assert_works=no ;; | |
831 *) lt_cv_func_assert_works=yes ;; | |
832 esac | |
833 fi | |
834 ;; | |
835 esac]) | |
836 | |
837 if test "x$lt_cv_func_assert_works" = xyes; then | |
838 AC_CHECK_HEADERS(assert.h) | |
839 fi | |
840 ])# AC_LIBTOOL_HEADER_ASSERT | |
841 | |
842 # _LT_AC_CHECK_DLFCN | |
843 # -------------------- | |
844 AC_DEFUN([_LT_AC_CHECK_DLFCN], | |
845 [AC_CHECK_HEADERS(dlfcn.h) | |
846 ])# _LT_AC_CHECK_DLFCN | |
847 | |
848 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | |
849 # --------------------------------- | |
850 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], | |
851 [AC_REQUIRE([AC_CANONICAL_HOST]) | |
852 AC_REQUIRE([AC_PROG_NM]) | |
853 AC_REQUIRE([AC_OBJEXT]) | |
854 # Check for command to grab the raw symbol name followed by C symbol from nm. | |
855 AC_MSG_CHECKING([command to parse $NM output]) | |
856 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl | |
857 | |
858 # These are sane defaults that work on at least a few old systems. | |
859 # [They come from Ultrix. What could be older than Ultrix?!! ;)] | |
860 | |
861 # Character class describing NM global symbol codes. | |
862 symcode='[[BCDEGRST]]' | |
863 | |
864 # Regexp to match symbols that can be accessed directly from C. | |
865 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' | |
866 | |
867 # Transform the above into a raw symbol and a C symbol. | |
868 symxfrm='\1 \2\3 \3' | |
869 | |
870 # Transform an extracted symbol line into a proper C declaration | |
871 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" | |
872 | |
873 # Transform an extracted symbol line into symbol name and symbol address | |
874 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'" | |
875 | |
876 # Define system-specific variables. | |
877 case $host_os in | |
878 aix*) | |
879 symcode='[[BCDT]]' | |
880 ;; | |
881 cygwin* | mingw* | pw32*) | |
882 symcode='[[ABCDGISTW]]' | |
883 ;; | |
884 hpux*) # Its linker distinguishes data from code symbols | |
885 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | |
886 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'" | |
887 ;; | |
888 irix*) | |
889 symcode='[[BCDEGRST]]' | |
890 ;; | |
891 solaris* | sysv5*) | |
892 symcode='[[BDT]]' | |
893 ;; | |
894 sysv4) | |
895 symcode='[[DFNSTU]]' | |
896 ;; | |
800 esac | 897 esac |
898 | |
899 # Handle CRLF in mingw tool chain | |
900 opt_cr= | |
901 case $host_os in | |
902 mingw*) | |
903 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp | |
904 ;; | |
905 esac | |
906 | |
907 # If we're using GNU nm, then use its standard symbol codes. | |
908 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then | |
909 symcode='[[ABCDGISTW]]' | |
910 fi | |
911 | |
912 # Try without a prefix undercore, then with it. | |
913 for ac_symprfx in "" "_"; do | |
914 | |
915 # Write the raw and C identifiers. | |
916 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" | |
917 | |
918 # Check to see that the pipe works correctly. | |
919 pipe_works=no | |
920 rm -f conftest* | |
921 cat > conftest.$ac_ext <<EOF | |
922 #ifdef __cplusplus | |
923 extern "C" { | |
924 #endif | |
925 char nm_test_var; | |
926 void nm_test_func(){} | |
927 #ifdef __cplusplus | |
928 } | |
929 #endif | |
930 int main(){nm_test_var='a';nm_test_func();return(0);} | |
931 EOF | |
932 | |
933 if AC_TRY_EVAL(ac_compile); then | |
934 # Now try to grab the symbols. | |
935 nlist=conftest.nm | |
936 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then | |
937 # Try sorting and uniquifying the output. | |
938 if sort "$nlist" | uniq > "$nlist"T; then | |
939 mv -f "$nlist"T "$nlist" | |
940 else | |
941 rm -f "$nlist"T | |
942 fi | |
943 | |
944 # Make sure that we snagged all the symbols we need. | |
945 if egrep ' nm_test_var$' "$nlist" >/dev/null; then | |
946 if egrep ' nm_test_func$' "$nlist" >/dev/null; then | |
947 cat <<EOF > conftest.$ac_ext | |
948 #ifdef __cplusplus | |
949 extern "C" { | |
950 #endif | |
951 | |
952 EOF | |
953 # Now generate the symbol file. | |
954 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' | |
955 | |
956 cat <<EOF >> conftest.$ac_ext | |
957 #if defined (__STDC__) && __STDC__ | |
958 # define lt_ptr void * | |
959 #else | |
960 # define lt_ptr char * | |
961 # define const | |
962 #endif | |
963 | |
964 /* The mapping between symbol names and symbols. */ | |
965 const struct { | |
966 const char *name; | |
967 lt_ptr address; | |
968 } | |
969 lt_preloaded_symbols[[]] = | |
970 { | |
971 EOF | |
972 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext | |
973 cat <<\EOF >> conftest.$ac_ext | |
974 {0, (lt_ptr) 0} | |
975 }; | |
976 | |
977 #ifdef __cplusplus | |
978 } | |
979 #endif | |
980 EOF | |
981 # Now try linking the two files. | |
982 mv conftest.$ac_objext conftstm.$ac_objext | |
983 save_LIBS="$LIBS" | |
984 save_CFLAGS="$CFLAGS" | |
985 LIBS="conftstm.$ac_objext" | |
986 CFLAGS="$CFLAGS$no_builtin_flag" | |
987 if AC_TRY_EVAL(ac_link) && test -s conftest; then | |
988 pipe_works=yes | |
989 fi | |
990 LIBS="$save_LIBS" | |
991 CFLAGS="$save_CFLAGS" | |
992 else | |
993 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC | |
994 fi | |
995 else | |
996 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC | |
997 fi | |
998 else | |
999 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC | |
1000 fi | |
1001 else | |
1002 echo "$progname: failed program was:" >&AC_FD_CC | |
1003 cat conftest.$ac_ext >&5 | |
1004 fi | |
1005 rm -f conftest* conftst* | |
1006 | |
1007 # Do not use the global_symbol_pipe unless it works. | |
1008 if test "$pipe_works" = yes; then | |
1009 break | |
1010 else | |
1011 lt_cv_sys_global_symbol_pipe= | |
1012 fi | |
1013 done | |
801 ]) | 1014 ]) |
1015 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" | |
1016 if test -z "$lt_cv_sys_global_symbol_pipe"; then | |
1017 global_symbol_to_cdecl= | |
1018 global_symbol_to_c_name_address= | |
1019 else | |
1020 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" | |
1021 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" | |
1022 fi | |
1023 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; | |
1024 then | |
1025 AC_MSG_RESULT(failed) | |
1026 else | |
1027 AC_MSG_RESULT(ok) | |
1028 fi | |
1029 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | |
1030 | |
1031 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR | |
1032 # --------------------------------- | |
1033 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], | |
1034 [# Find the correct PATH separator. Usually this is `:', but | |
1035 # DJGPP uses `;' like DOS. | |
1036 if test "X${PATH_SEPARATOR+set}" != Xset; then | |
1037 UNAME=${UNAME-`uname 2>/dev/null`} | |
1038 case X$UNAME in | |
1039 *-DOS) lt_cv_sys_path_separator=';' ;; | |
1040 *) lt_cv_sys_path_separator=':' ;; | |
1041 esac | |
1042 PATH_SEPARATOR=$lt_cv_sys_path_separator | |
1043 fi | |
1044 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR | |
1045 | |
1046 # _LT_AC_PROG_ECHO_BACKSLASH | |
1047 # -------------------------- | |
1048 # Add some code to the start of the generated configure script which | |
1049 # will find an echo command which doesn't interpret backslashes. | |
1050 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], | |
1051 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], | |
1052 [AC_DIVERT_PUSH(NOTICE)]) | |
1053 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR | |
1054 | |
1055 # Check that we are running under the correct shell. | |
1056 SHELL=${CONFIG_SHELL-/bin/sh} | |
1057 | |
1058 case X$ECHO in | |
1059 X*--fallback-echo) | |
1060 # Remove one level of quotation (which was required for Make). | |
1061 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` | |
1062 ;; | |
1063 esac | |
1064 | |
1065 echo=${ECHO-echo} | |
1066 if test "X[$]1" = X--no-reexec; then | |
1067 # Discard the --no-reexec flag, and continue. | |
1068 shift | |
1069 elif test "X[$]1" = X--fallback-echo; then | |
1070 # Avoid inline document here, it may be left over | |
1071 : | |
1072 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then | |
1073 # Yippee, $echo works! | |
1074 : | |
1075 else | |
1076 # Restart under the correct shell. | |
1077 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} | |
1078 fi | |
1079 | |
1080 if test "X[$]1" = X--fallback-echo; then | |
1081 # used as fallback echo | |
1082 shift | |
1083 cat <<EOF | |
1084 $* | |
1085 EOF | |
1086 exit 0 | |
1087 fi | |
1088 | |
1089 # The HP-UX ksh and POSIX shell print the target directory to stdout | |
1090 # if CDPATH is set. | |
1091 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | |
1092 | |
1093 if test -z "$ECHO"; then | |
1094 if test "X${echo_test_string+set}" != Xset; then | |
1095 # find a string as large as possible, as long as the shell can cope with it | |
1096 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do | |
1097 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... | |
1098 if (echo_test_string="`eval $cmd`") 2>/dev/null && | |
1099 echo_test_string="`eval $cmd`" && | |
1100 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null | |
1101 then | |
1102 break | |
1103 fi | |
1104 done | |
1105 fi | |
1106 | |
1107 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | |
1108 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | |
1109 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1110 : | |
1111 else | |
1112 # The Solaris, AIX, and Digital Unix default echo programs unquote | |
1113 # backslashes. This makes it impossible to quote backslashes using | |
1114 # echo "$something" | sed 's/\\/\\\\/g' | |
1115 # | |
1116 # So, first we look for a working echo in the user's PATH. | |
1117 | |
1118 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
1119 for dir in $PATH /usr/ucb; do | |
1120 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && | |
1121 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && | |
1122 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && | |
1123 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1124 echo="$dir/echo" | |
1125 break | |
1126 fi | |
1127 done | |
1128 IFS="$save_ifs" | |
1129 | |
1130 if test "X$echo" = Xecho; then | |
1131 # We didn't find a better echo, so look for alternatives. | |
1132 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && | |
1133 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && | |
1134 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1135 # This shell has a builtin print -r that does the trick. | |
1136 echo='print -r' | |
1137 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && | |
1138 test "X$CONFIG_SHELL" != X/bin/ksh; then | |
1139 # If we have ksh, try running configure again with it. | |
1140 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
1141 export ORIGINAL_CONFIG_SHELL | |
1142 CONFIG_SHELL=/bin/ksh | |
1143 export CONFIG_SHELL | |
1144 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} | |
1145 else | |
1146 # Try using printf. | |
1147 echo='printf %s\n' | |
1148 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | |
1149 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | |
1150 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1151 # Cool, printf works | |
1152 : | |
1153 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | |
1154 test "X$echo_testing_string" = 'X\t' && | |
1155 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
1156 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1157 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL | |
1158 export CONFIG_SHELL | |
1159 SHELL="$CONFIG_SHELL" | |
1160 export SHELL | |
1161 echo="$CONFIG_SHELL [$]0 --fallback-echo" | |
1162 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | |
1163 test "X$echo_testing_string" = 'X\t' && | |
1164 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
1165 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1166 echo="$CONFIG_SHELL [$]0 --fallback-echo" | |
1167 else | |
1168 # maybe with a smaller string... | |
1169 prev=: | |
1170 | |
1171 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do | |
1172 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null | |
1173 then | |
1174 break | |
1175 fi | |
1176 prev="$cmd" | |
1177 done | |
1178 | |
1179 if test "$prev" != 'sed 50q "[$]0"'; then | |
1180 echo_test_string=`eval $prev` | |
1181 export echo_test_string | |
1182 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} | |
1183 else | |
1184 # Oops. We lost completely, so just stick with echo. | |
1185 echo=echo | |
1186 fi | |
1187 fi | |
1188 fi | |
1189 fi | |
1190 fi | |
1191 fi | |
1192 | |
1193 # Copy echo and quote the copy suitably for passing to libtool from | |
1194 # the Makefile, instead of quoting the original, which is used later. | |
1195 ECHO=$echo | |
1196 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then | |
1197 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" | |
1198 fi | |
1199 | |
1200 AC_SUBST(ECHO) | |
1201 AC_DIVERT_POP | |
1202 ])# _LT_AC_PROG_ECHO_BACKSLASH | |
1203 | |
1204 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, | |
1205 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) | |
1206 # ------------------------------------------------------------------ | |
1207 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], | |
1208 [if test "$cross_compiling" = yes; then : | |
1209 [$4] | |
1210 else | |
1211 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl | |
1212 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | |
1213 lt_status=$lt_dlunknown | |
1214 cat > conftest.$ac_ext <<EOF | |
1215 [#line __oline__ "configure" | |
1216 #include "confdefs.h" | |
1217 | |
1218 #if HAVE_DLFCN_H | |
1219 #include <dlfcn.h> | |
1220 #endif | |
1221 | |
1222 #include <stdio.h> | |
1223 | |
1224 #ifdef RTLD_GLOBAL | |
1225 # define LT_DLGLOBAL RTLD_GLOBAL | |
1226 #else | |
1227 # ifdef DL_GLOBAL | |
1228 # define LT_DLGLOBAL DL_GLOBAL | |
1229 # else | |
1230 # define LT_DLGLOBAL 0 | |
1231 # endif | |
1232 #endif | |
1233 | |
1234 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | |
1235 find out it does not work in some platform. */ | |
1236 #ifndef LT_DLLAZY_OR_NOW | |
1237 # ifdef RTLD_LAZY | |
1238 # define LT_DLLAZY_OR_NOW RTLD_LAZY | |
1239 # else | |
1240 # ifdef DL_LAZY | |
1241 # define LT_DLLAZY_OR_NOW DL_LAZY | |
1242 # else | |
1243 # ifdef RTLD_NOW | |
1244 # define LT_DLLAZY_OR_NOW RTLD_NOW | |
1245 # else | |
1246 # ifdef DL_NOW | |
1247 # define LT_DLLAZY_OR_NOW DL_NOW | |
1248 # else | |
1249 # define LT_DLLAZY_OR_NOW 0 | |
1250 # endif | |
1251 # endif | |
1252 # endif | |
1253 # endif | |
1254 #endif | |
1255 | |
1256 #ifdef __cplusplus | |
1257 extern "C" void exit (int); | |
1258 #endif | |
1259 | |
1260 void fnord() { int i=42;} | |
1261 int main () | |
1262 { | |
1263 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | |
1264 int status = $lt_dlunknown; | |
1265 | |
1266 if (self) | |
1267 { | |
1268 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | |
1269 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | |
1270 /* dlclose (self); */ | |
1271 } | |
1272 | |
1273 exit (status); | |
1274 }] | |
1275 EOF | |
1276 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then | |
1277 (./conftest; exit; ) 2>/dev/null | |
1278 lt_status=$? | |
1279 case x$lt_status in | |
1280 x$lt_dlno_uscore) $1 ;; | |
1281 x$lt_dlneed_uscore) $2 ;; | |
1282 x$lt_unknown|x*) $3 ;; | |
1283 esac | |
1284 else : | |
1285 # compilation failed | |
1286 $3 | |
1287 fi | |
1288 fi | |
1289 rm -fr conftest* | |
1290 ])# _LT_AC_TRY_DLOPEN_SELF | |
1291 | |
1292 # AC_LIBTOOL_DLOPEN_SELF | |
1293 # ------------------- | |
1294 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], | |
1295 [if test "x$enable_dlopen" != xyes; then | |
1296 enable_dlopen=unknown | |
1297 enable_dlopen_self=unknown | |
1298 enable_dlopen_self_static=unknown | |
1299 else | |
1300 lt_cv_dlopen=no | |
1301 lt_cv_dlopen_libs= | |
1302 | |
1303 case $host_os in | |
1304 beos*) | |
1305 lt_cv_dlopen="load_add_on" | |
1306 lt_cv_dlopen_libs= | |
1307 lt_cv_dlopen_self=yes | |
1308 ;; | |
1309 | |
1310 cygwin* | mingw* | pw32*) | |
1311 lt_cv_dlopen="LoadLibrary" | |
1312 lt_cv_dlopen_libs= | |
1313 ;; | |
1314 | |
1315 *) | |
1316 AC_CHECK_FUNC([shl_load], | |
1317 [lt_cv_dlopen="shl_load"], | |
1318 [AC_CHECK_LIB([dld], [shl_load], | |
1319 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], | |
1320 [AC_CHECK_FUNC([dlopen], | |
1321 [lt_cv_dlopen="dlopen"], | |
1322 [AC_CHECK_LIB([dl], [dlopen], | |
1323 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], | |
1324 [AC_CHECK_LIB([svld], [dlopen], | |
1325 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], | |
1326 [AC_CHECK_LIB([dld], [dld_link], | |
1327 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) | |
1328 ]) | |
1329 ]) | |
1330 ]) | |
1331 ]) | |
1332 ]) | |
1333 ;; | |
1334 esac | |
1335 | |
1336 if test "x$lt_cv_dlopen" != xno; then | |
1337 enable_dlopen=yes | |
1338 else | |
1339 enable_dlopen=no | |
1340 fi | |
1341 | |
1342 case $lt_cv_dlopen in | |
1343 dlopen) | |
1344 save_CPPFLAGS="$CPPFLAGS" | |
1345 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl | |
1346 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | |
1347 | |
1348 save_LDFLAGS="$LDFLAGS" | |
1349 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | |
1350 | |
1351 save_LIBS="$LIBS" | |
1352 LIBS="$lt_cv_dlopen_libs $LIBS" | |
1353 | |
1354 AC_CACHE_CHECK([whether a program can dlopen itself], | |
1355 lt_cv_dlopen_self, [dnl | |
1356 _LT_AC_TRY_DLOPEN_SELF( | |
1357 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, | |
1358 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) | |
1359 ]) | |
1360 | |
1361 if test "x$lt_cv_dlopen_self" = xyes; then | |
1362 LDFLAGS="$LDFLAGS $link_static_flag" | |
1363 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], | |
1364 lt_cv_dlopen_self_static, [dnl | |
1365 _LT_AC_TRY_DLOPEN_SELF( | |
1366 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, | |
1367 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) | |
1368 ]) | |
1369 fi | |
1370 | |
1371 CPPFLAGS="$save_CPPFLAGS" | |
1372 LDFLAGS="$save_LDFLAGS" | |
1373 LIBS="$save_LIBS" | |
1374 ;; | |
1375 esac | |
1376 | |
1377 case $lt_cv_dlopen_self in | |
1378 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | |
1379 *) enable_dlopen_self=unknown ;; | |
1380 esac | |
1381 | |
1382 case $lt_cv_dlopen_self_static in | |
1383 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | |
1384 *) enable_dlopen_self_static=unknown ;; | |
1385 esac | |
1386 fi | |
1387 ])# AC_LIBTOOL_DLOPEN_SELF | |
1388 | |
1389 AC_DEFUN([_LT_AC_LTCONFIG_HACK], | |
1390 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl | |
1391 # Sed substitution that helps us do robust quoting. It backslashifies | |
1392 # metacharacters that are still active within double-quoted strings. | |
1393 Xsed='sed -e s/^X//' | |
1394 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' | |
1395 | |
1396 # Same as above, but do not quote variable references. | |
1397 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' | |
1398 | |
1399 # Sed substitution to delay expansion of an escaped shell variable in a | |
1400 # double_quote_subst'ed string. | |
1401 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | |
1402 | |
1403 # Constants: | |
1404 rm="rm -f" | |
1405 | |
1406 # Global variables: | |
1407 default_ofile=libtool | |
1408 can_build_shared=yes | |
1409 | |
1410 # All known linkers require a `.a' archive for static linking (except M$VC, | |
1411 # which needs '.lib'). | |
1412 libext=a | |
1413 ltmain="$ac_aux_dir/ltmain.sh" | |
1414 ofile="$default_ofile" | |
1415 with_gnu_ld="$lt_cv_prog_gnu_ld" | |
1416 need_locks="$enable_libtool_lock" | |
1417 | |
1418 old_CC="$CC" | |
1419 old_CFLAGS="$CFLAGS" | |
1420 | |
1421 # Set sane defaults for various variables | |
1422 test -z "$AR" && AR=ar | |
1423 test -z "$AR_FLAGS" && AR_FLAGS=cru | |
1424 test -z "$AS" && AS=as | |
1425 test -z "$CC" && CC=cc | |
1426 test -z "$DLLTOOL" && DLLTOOL=dlltool | |
1427 test -z "$LD" && LD=ld | |
1428 test -z "$LN_S" && LN_S="ln -s" | |
1429 test -z "$MAGIC_CMD" && MAGIC_CMD=file | |
1430 test -z "$NM" && NM=nm | |
1431 test -z "$OBJDUMP" && OBJDUMP=objdump | |
1432 test -z "$RANLIB" && RANLIB=: | |
1433 test -z "$STRIP" && STRIP=: | |
1434 test -z "$ac_objext" && ac_objext=o | |
1435 | |
1436 if test x"$host" != x"$build"; then | |
1437 ac_tool_prefix=${host_alias}- | |
1438 else | |
1439 ac_tool_prefix= | |
1440 fi | |
1441 | |
1442 # Transform linux* to *-*-linux-gnu*, to support old configure scripts. | |
1443 case $host_os in | |
1444 linux-gnu*) ;; | |
1445 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` | |
1446 esac | |
1447 | |
1448 case $host_os in | |
1449 aix3*) | |
1450 # AIX sometimes has problems with the GCC collect2 program. For some | |
1451 # reason, if we set the COLLECT_NAMES environment variable, the problems | |
1452 # vanish in a puff of smoke. | |
1453 if test "X${COLLECT_NAMES+set}" != Xset; then | |
1454 COLLECT_NAMES= | |
1455 export COLLECT_NAMES | |
1456 fi | |
1457 ;; | |
1458 esac | |
1459 | |
1460 # Determine commands to create old-style static archives. | |
1461 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' | |
1462 old_postinstall_cmds='chmod 644 $oldlib' | |
1463 old_postuninstall_cmds= | |
1464 | |
1465 if test -n "$RANLIB"; then | |
1466 case $host_os in | |
1467 openbsd*) | |
1468 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" | |
1469 ;; | |
1470 *) | |
1471 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" | |
1472 ;; | |
1473 esac | |
1474 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" | |
1475 fi | |
1476 | |
1477 # Allow CC to be a program name with arguments. | |
1478 set dummy $CC | |
1479 compiler="[$]2" | |
1480 | |
1481 ## FIXME: this should be a separate macro | |
1482 ## | |
1483 AC_MSG_CHECKING([for objdir]) | |
1484 rm -f .libs 2>/dev/null | |
1485 mkdir .libs 2>/dev/null | |
1486 if test -d .libs; then | |
1487 objdir=.libs | |
1488 else | |
1489 # MS-DOS does not allow filenames that begin with a dot. | |
1490 objdir=_libs | |
1491 fi | |
1492 rmdir .libs 2>/dev/null | |
1493 AC_MSG_RESULT($objdir) | |
1494 ## | |
1495 ## END FIXME | |
1496 | |
1497 | |
1498 ## FIXME: this should be a separate macro | |
1499 ## | |
1500 AC_ARG_WITH(pic, | |
1501 [ --with-pic try to use only PIC/non-PIC objects [default=use both]], | |
1502 pic_mode="$withval", pic_mode=default) | |
1503 test -z "$pic_mode" && pic_mode=default | |
1504 | |
1505 # We assume here that the value for lt_cv_prog_cc_pic will not be cached | |
1506 # in isolation, and that seeing it set (from the cache) indicates that | |
1507 # the associated values are set (in the cache) correctly too. | |
1508 AC_MSG_CHECKING([for $compiler option to produce PIC]) | |
1509 AC_CACHE_VAL(lt_cv_prog_cc_pic, | |
1510 [ lt_cv_prog_cc_pic= | |
1511 lt_cv_prog_cc_shlib= | |
1512 lt_cv_prog_cc_wl= | |
1513 lt_cv_prog_cc_static= | |
1514 lt_cv_prog_cc_no_builtin= | |
1515 lt_cv_prog_cc_can_build_shared=$can_build_shared | |
1516 | |
1517 if test "$GCC" = yes; then | |
1518 lt_cv_prog_cc_wl='-Wl,' | |
1519 lt_cv_prog_cc_static='-static' | |
1520 | |
1521 case $host_os in | |
1522 aix*) | |
1523 # Below there is a dirty hack to force normal static linking with -ldl | |
1524 # The problem is because libdl dynamically linked with both libc and | |
1525 # libC (AIX C++ library), which obviously doesn't included in libraries | |
1526 # list by gcc. This cause undefined symbols with -static flags. | |
1527 # This hack allows C programs to be linked with "-static -ldl", but | |
1528 # not sure about C++ programs. | |
1529 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" | |
1530 ;; | |
1531 amigaos*) | |
1532 # FIXME: we need at least 68020 code to build shared libraries, but | |
1533 # adding the `-m68020' flag to GCC prevents building anything better, | |
1534 # like `-m68040'. | |
1535 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' | |
1536 ;; | |
1537 beos* | irix5* | irix6* | osf3* | osf4* | osf5*) | |
1538 # PIC is the default for these OSes. | |
1539 ;; | |
1540 darwin* | rhapsody*) | |
1541 # PIC is the default on this platform | |
1542 # Common symbols not allowed in MH_DYLIB files | |
1543 lt_cv_prog_cc_pic='-fno-common' | |
1544 ;; | |
1545 cygwin* | mingw* | pw32* | os2*) | |
1546 # This hack is so that the source file can tell whether it is being | |
1547 # built for inclusion in a dll (and should export symbols for example). | |
1548 lt_cv_prog_cc_pic='-DDLL_EXPORT' | |
1549 ;; | |
1550 sysv4*MP*) | |
1551 if test -d /usr/nec; then | |
1552 lt_cv_prog_cc_pic=-Kconform_pic | |
1553 fi | |
1554 ;; | |
1555 *) | |
1556 lt_cv_prog_cc_pic='-fPIC' | |
1557 ;; | |
1558 esac | |
1559 else | |
1560 # PORTME Check for PIC flags for the system compiler. | |
1561 case $host_os in | |
1562 aix3* | aix4* | aix5*) | |
1563 lt_cv_prog_cc_wl='-Wl,' | |
1564 # All AIX code is PIC. | |
1565 if test "$host_cpu" = ia64; then | |
1566 # AIX 5 now supports IA64 processor | |
1567 lt_cv_prog_cc_static='-Bstatic' | |
1568 else | |
1569 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' | |
1570 fi | |
1571 ;; | |
1572 | |
1573 hpux9* | hpux10* | hpux11*) | |
1574 # Is there a better lt_cv_prog_cc_static that works with the bundled CC? | |
1575 lt_cv_prog_cc_wl='-Wl,' | |
1576 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" | |
1577 lt_cv_prog_cc_pic='+Z' | |
1578 ;; | |
1579 | |
1580 irix5* | irix6*) | |
1581 lt_cv_prog_cc_wl='-Wl,' | |
1582 lt_cv_prog_cc_static='-non_shared' | |
1583 # PIC (with -KPIC) is the default. | |
1584 ;; | |
1585 | |
1586 cygwin* | mingw* | pw32* | os2*) | |
1587 # This hack is so that the source file can tell whether it is being | |
1588 # built for inclusion in a dll (and should export symbols for example). | |
1589 lt_cv_prog_cc_pic='-DDLL_EXPORT' | |
1590 ;; | |
1591 | |
1592 newsos6) | |
1593 lt_cv_prog_cc_pic='-KPIC' | |
1594 lt_cv_prog_cc_static='-Bstatic' | |
1595 ;; | |
1596 | |
1597 osf3* | osf4* | osf5*) | |
1598 # All OSF/1 code is PIC. | |
1599 lt_cv_prog_cc_wl='-Wl,' | |
1600 lt_cv_prog_cc_static='-non_shared' | |
1601 ;; | |
1602 | |
1603 sco3.2v5*) | |
1604 lt_cv_prog_cc_pic='-Kpic' | |
1605 lt_cv_prog_cc_static='-dn' | |
1606 lt_cv_prog_cc_shlib='-belf' | |
1607 ;; | |
1608 | |
1609 solaris*) | |
1610 lt_cv_prog_cc_pic='-KPIC' | |
1611 lt_cv_prog_cc_static='-Bstatic' | |
1612 lt_cv_prog_cc_wl='-Wl,' | |
1613 ;; | |
1614 | |
1615 sunos4*) | |
1616 lt_cv_prog_cc_pic='-PIC' | |
1617 lt_cv_prog_cc_static='-Bstatic' | |
1618 lt_cv_prog_cc_wl='-Qoption ld ' | |
1619 ;; | |
1620 | |
1621 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
1622 lt_cv_prog_cc_pic='-KPIC' | |
1623 lt_cv_prog_cc_static='-Bstatic' | |
1624 if test "x$host_vendor" = xsni; then | |
1625 lt_cv_prog_cc_wl='-LD' | |
1626 else | |
1627 lt_cv_prog_cc_wl='-Wl,' | |
1628 fi | |
1629 ;; | |
1630 | |
1631 uts4*) | |
1632 lt_cv_prog_cc_pic='-pic' | |
1633 lt_cv_prog_cc_static='-Bstatic' | |
1634 ;; | |
1635 | |
1636 sysv4*MP*) | |
1637 if test -d /usr/nec ;then | |
1638 lt_cv_prog_cc_pic='-Kconform_pic' | |
1639 lt_cv_prog_cc_static='-Bstatic' | |
1640 fi | |
1641 ;; | |
1642 | |
1643 *) | |
1644 lt_cv_prog_cc_can_build_shared=no | |
1645 ;; | |
1646 esac | |
1647 fi | |
1648 ]) | |
1649 if test -z "$lt_cv_prog_cc_pic"; then | |
1650 AC_MSG_RESULT([none]) | |
1651 else | |
1652 AC_MSG_RESULT([$lt_cv_prog_cc_pic]) | |
1653 | |
1654 # Check to make sure the pic_flag actually works. | |
1655 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) | |
1656 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl | |
1657 save_CFLAGS="$CFLAGS" | |
1658 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" | |
1659 AC_TRY_COMPILE([], [], [dnl | |
1660 case $host_os in | |
1661 hpux9* | hpux10* | hpux11*) | |
1662 # On HP-UX, both CC and GCC only warn that PIC is supported... then | |
1663 # they create non-PIC objects. So, if there were any warnings, we | |
1664 # assume that PIC is not supported. | |
1665 if test -s conftest.err; then | |
1666 lt_cv_prog_cc_pic_works=no | |
1667 else | |
1668 lt_cv_prog_cc_pic_works=yes | |
1669 fi | |
1670 ;; | |
1671 *) | |
1672 lt_cv_prog_cc_pic_works=yes | |
1673 ;; | |
1674 esac | |
1675 ], [dnl | |
1676 lt_cv_prog_cc_pic_works=no | |
1677 ]) | |
1678 CFLAGS="$save_CFLAGS" | |
1679 ]) | |
1680 | |
1681 if test "X$lt_cv_prog_cc_pic_works" = Xno; then | |
1682 lt_cv_prog_cc_pic= | |
1683 lt_cv_prog_cc_can_build_shared=no | |
1684 else | |
1685 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" | |
1686 fi | |
1687 | |
1688 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) | |
1689 fi | |
1690 ## | |
1691 ## END FIXME | |
1692 | |
1693 # Check for any special shared library compilation flags. | |
1694 if test -n "$lt_cv_prog_cc_shlib"; then | |
1695 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) | |
1696 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : | |
1697 else | |
1698 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) | |
1699 lt_cv_prog_cc_can_build_shared=no | |
1700 fi | |
1701 fi | |
1702 | |
1703 ## FIXME: this should be a separate macro | |
1704 ## | |
1705 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) | |
1706 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl | |
1707 lt_cv_prog_cc_static_works=no | |
1708 save_LDFLAGS="$LDFLAGS" | |
1709 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" | |
1710 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) | |
1711 LDFLAGS="$save_LDFLAGS" | |
1712 ]) | |
1713 | |
1714 # Belt *and* braces to stop my trousers falling down: | |
1715 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= | |
1716 AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) | |
1717 | |
1718 pic_flag="$lt_cv_prog_cc_pic" | |
1719 special_shlib_compile_flags="$lt_cv_prog_cc_shlib" | |
1720 wl="$lt_cv_prog_cc_wl" | |
1721 link_static_flag="$lt_cv_prog_cc_static" | |
1722 no_builtin_flag="$lt_cv_prog_cc_no_builtin" | |
1723 can_build_shared="$lt_cv_prog_cc_can_build_shared" | |
1724 ## | |
1725 ## END FIXME | |
1726 | |
1727 | |
1728 ## FIXME: this should be a separate macro | |
1729 ## | |
1730 # Check to see if options -o and -c are simultaneously supported by compiler | |
1731 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) | |
1732 AC_CACHE_VAL([lt_cv_compiler_c_o], [ | |
1733 $rm -r conftest 2>/dev/null | |
1734 mkdir conftest | |
1735 cd conftest | |
1736 echo "int some_variable = 0;" > conftest.$ac_ext | |
1737 mkdir out | |
1738 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers | |
1739 # that will create temporary files in the current directory regardless of | |
1740 # the output directory. Thus, making CWD read-only will cause this test | |
1741 # to fail, enabling locking or at least warning the user not to do parallel | |
1742 # builds. | |
1743 chmod -w . | |
1744 save_CFLAGS="$CFLAGS" | |
1745 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" | |
1746 compiler_c_o=no | |
1747 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then | |
1748 # The compiler can only warn and ignore the option if not recognized | |
1749 # So say no if there are warnings | |
1750 if test -s out/conftest.err; then | |
1751 lt_cv_compiler_c_o=no | |
1752 else | |
1753 lt_cv_compiler_c_o=yes | |
1754 fi | |
1755 else | |
1756 # Append any errors to the config.log. | |
1757 cat out/conftest.err 1>&AC_FD_CC | |
1758 lt_cv_compiler_c_o=no | |
1759 fi | |
1760 CFLAGS="$save_CFLAGS" | |
1761 chmod u+w . | |
1762 $rm conftest* out/* | |
1763 rmdir out | |
1764 cd .. | |
1765 rmdir conftest | |
1766 $rm -r conftest 2>/dev/null | |
1767 ]) | |
1768 compiler_c_o=$lt_cv_compiler_c_o | |
1769 AC_MSG_RESULT([$compiler_c_o]) | |
1770 | |
1771 if test x"$compiler_c_o" = x"yes"; then | |
1772 # Check to see if we can write to a .lo | |
1773 AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) | |
1774 AC_CACHE_VAL([lt_cv_compiler_o_lo], [ | |
1775 lt_cv_compiler_o_lo=no | |
1776 save_CFLAGS="$CFLAGS" | |
1777 CFLAGS="$CFLAGS -c -o conftest.lo" | |
1778 save_objext="$ac_objext" | |
1779 ac_objext=lo | |
1780 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl | |
1781 # The compiler can only warn and ignore the option if not recognized | |
1782 # So say no if there are warnings | |
1783 if test -s conftest.err; then | |
1784 lt_cv_compiler_o_lo=no | |
1785 else | |
1786 lt_cv_compiler_o_lo=yes | |
1787 fi | |
1788 ]) | |
1789 ac_objext="$save_objext" | |
1790 CFLAGS="$save_CFLAGS" | |
1791 ]) | |
1792 compiler_o_lo=$lt_cv_compiler_o_lo | |
1793 AC_MSG_RESULT([$compiler_o_lo]) | |
1794 else | |
1795 compiler_o_lo=no | |
1796 fi | |
1797 ## | |
1798 ## END FIXME | |
1799 | |
1800 ## FIXME: this should be a separate macro | |
1801 ## | |
1802 # Check to see if we can do hard links to lock some files if needed | |
1803 hard_links="nottested" | |
1804 if test "$compiler_c_o" = no && test "$need_locks" != no; then | |
1805 # do not overwrite the value of need_locks provided by the user | |
1806 AC_MSG_CHECKING([if we can lock with hard links]) | |
1807 hard_links=yes | |
1808 $rm conftest* | |
1809 ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
1810 touch conftest.a | |
1811 ln conftest.a conftest.b 2>&5 || hard_links=no | |
1812 ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
1813 AC_MSG_RESULT([$hard_links]) | |
1814 if test "$hard_links" = no; then | |
1815 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) | |
1816 need_locks=warn | |
1817 fi | |
1818 else | |
1819 need_locks=no | |
1820 fi | |
1821 ## | |
1822 ## END FIXME | |
1823 | |
1824 ## FIXME: this should be a separate macro | |
1825 ## | |
1826 if test "$GCC" = yes; then | |
1827 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler | |
1828 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) | |
1829 echo "int some_variable = 0;" > conftest.$ac_ext | |
1830 save_CFLAGS="$CFLAGS" | |
1831 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" | |
1832 compiler_rtti_exceptions=no | |
1833 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl | |
1834 # The compiler can only warn and ignore the option if not recognized | |
1835 # So say no if there are warnings | |
1836 if test -s conftest.err; then | |
1837 compiler_rtti_exceptions=no | |
1838 else | |
1839 compiler_rtti_exceptions=yes | |
1840 fi | |
1841 ]) | |
1842 CFLAGS="$save_CFLAGS" | |
1843 AC_MSG_RESULT([$compiler_rtti_exceptions]) | |
1844 | |
1845 if test "$compiler_rtti_exceptions" = "yes"; then | |
1846 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' | |
1847 else | |
1848 no_builtin_flag=' -fno-builtin' | |
1849 fi | |
1850 fi | |
1851 ## | |
1852 ## END FIXME | |
1853 | |
1854 ## FIXME: this should be a separate macro | |
1855 ## | |
1856 # See if the linker supports building shared libraries. | |
1857 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) | |
1858 | |
1859 allow_undefined_flag= | |
1860 no_undefined_flag= | |
1861 need_lib_prefix=unknown | |
1862 need_version=unknown | |
1863 # when you set need_version to no, make sure it does not cause -set_version | |
1864 # flags to be left without arguments | |
1865 archive_cmds= | |
1866 archive_expsym_cmds= | |
1867 old_archive_from_new_cmds= | |
1868 old_archive_from_expsyms_cmds= | |
1869 export_dynamic_flag_spec= | |
1870 whole_archive_flag_spec= | |
1871 thread_safe_flag_spec= | |
1872 hardcode_into_libs=no | |
1873 hardcode_libdir_flag_spec= | |
1874 hardcode_libdir_separator= | |
1875 hardcode_direct=no | |
1876 hardcode_minus_L=no | |
1877 hardcode_shlibpath_var=unsupported | |
1878 runpath_var= | |
1879 link_all_deplibs=unknown | |
1880 always_export_symbols=no | |
1881 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
1882 # include_expsyms should be a list of space-separated symbols to be *always* | |
1883 # included in the symbol list | |
1884 include_expsyms= | |
1885 # exclude_expsyms can be an egrep regular expression of symbols to exclude | |
1886 # it will be wrapped by ` (' and `)$', so one must not match beginning or | |
1887 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | |
1888 # as well as any symbol that contains `d'. | |
1889 exclude_expsyms="_GLOBAL_OFFSET_TABLE_" | |
1890 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | |
1891 # platforms (ab)use it in PIC code, but their linkers get confused if | |
1892 # the symbol is explicitly referenced. Since portable code cannot | |
1893 # rely on this symbol name, it's probably fine to never include it in | |
1894 # preloaded symbol tables. | |
1895 extract_expsyms_cmds= | |
1896 | |
1897 case $host_os in | |
1898 cygwin* | mingw* | pw32*) | |
1899 # FIXME: the MSVC++ port hasn't been tested in a loooong time | |
1900 # When not using gcc, we currently assume that we are using | |
1901 # Microsoft Visual C++. | |
1902 if test "$GCC" != yes; then | |
1903 with_gnu_ld=no | |
1904 fi | |
1905 ;; | |
1906 openbsd*) | |
1907 with_gnu_ld=no | |
1908 ;; | |
1909 esac | |
1910 | |
1911 ld_shlibs=yes | |
1912 if test "$with_gnu_ld" = yes; then | |
1913 # If archive_cmds runs LD, not CC, wlarc should be empty | |
1914 wlarc='${wl}' | |
1915 | |
1916 # See if GNU ld supports shared libraries. | |
1917 case $host_os in | |
1918 aix3* | aix4* | aix5*) | |
1919 # On AIX, the GNU linker is very broken | |
1920 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. | |
1921 ld_shlibs=no | |
1922 cat <<EOF 1>&2 | |
1923 | |
1924 *** Warning: the GNU linker, at least up to release 2.9.1, is reported | |
1925 *** to be unable to reliably create shared libraries on AIX. | |
1926 *** Therefore, libtool is disabling shared libraries support. If you | |
1927 *** really care for shared libraries, you may want to modify your PATH | |
1928 *** so that a non-GNU linker is found, and then restart. | |
1929 | |
1930 EOF | |
1931 ;; | |
1932 | |
1933 amigaos*) | |
1934 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)' | |
1935 hardcode_libdir_flag_spec='-L$libdir' | |
1936 hardcode_minus_L=yes | |
1937 | |
1938 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports | |
1939 # that the semantics of dynamic libraries on AmigaOS, at least up | |
1940 # to version 4, is to share data among multiple programs linked | |
1941 # with the same dynamic library. Since this doesn't match the | |
1942 # behavior of shared libraries on other platforms, we can use | |
1943 # them. | |
1944 ld_shlibs=no | |
1945 ;; | |
1946 | |
1947 beos*) | |
1948 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
1949 allow_undefined_flag=unsupported | |
1950 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
1951 # support --undefined. This deserves some investigation. FIXME | |
1952 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
1953 else | |
1954 ld_shlibs=no | |
1955 fi | |
1956 ;; | |
1957 | |
1958 cygwin* | mingw* | pw32*) | |
1959 # hardcode_libdir_flag_spec is actually meaningless, as there is | |
1960 # no search path for DLLs. | |
1961 hardcode_libdir_flag_spec='-L$libdir' | |
1962 allow_undefined_flag=unsupported | |
1963 always_export_symbols=yes | |
1964 | |
1965 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ | |
1966 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ | |
1967 test -f $output_objdir/impgen.exe || (cd $output_objdir && \ | |
1968 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ | |
1969 else $CC -o impgen impgen.c ; fi)~ | |
1970 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' | |
1971 | |
1972 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' | |
1973 | |
1974 # cygwin and mingw dlls have different entry points and sets of symbols | |
1975 # to exclude. | |
1976 # FIXME: what about values for MSVC? | |
1977 dll_entry=__cygwin_dll_entry@12 | |
1978 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ | |
1979 case $host_os in | |
1980 mingw*) | |
1981 # mingw values | |
1982 dll_entry=_DllMainCRTStartup@12 | |
1983 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ | |
1984 ;; | |
1985 esac | |
1986 | |
1987 # mingw and cygwin differ, and it's simplest to just exclude the union | |
1988 # of the two symbol sets. | |
1989 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 | |
1990 | |
1991 # recent cygwin and mingw systems supply a stub DllMain which the user | |
1992 # can override, but on older systems we have to supply one (in ltdll.c) | |
1993 if test "x$lt_cv_need_dllmain" = "xyes"; then | |
1994 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " | |
1995 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~ | |
1996 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' | |
1997 else | |
1998 ltdll_obj= | |
1999 ltdll_cmds= | |
2000 fi | |
2001 | |
2002 # Extract the symbol export list from an `--export-all' def file, | |
2003 # then regenerate the def file from the symbol export list, so that | |
2004 # the compiled dll only exports the symbol export list. | |
2005 # Be careful not to strip the DATA tag left be newer dlltools. | |
2006 export_symbols_cmds="$ltdll_cmds"' | |
2007 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ | |
2008 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' | |
2009 | |
2010 # If the export-symbols file already is a .def file (1st line | |
2011 # is EXPORTS), use it as is. | |
2012 # If DATA tags from a recent dlltool are present, honour them! | |
2013 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then | |
2014 cp $export_symbols $output_objdir/$soname-def; | |
2015 else | |
2016 echo EXPORTS > $output_objdir/$soname-def; | |
2017 _lt_hint=1; | |
2018 cat $export_symbols | while read symbol; do | |
2019 set dummy \$symbol; | |
2020 case \[$]# in | |
2021 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; | |
2022 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; | |
2023 esac; | |
2024 _lt_hint=`expr 1 + \$_lt_hint`; | |
2025 done; | |
2026 fi~ | |
2027 '"$ltdll_cmds"' | |
2028 $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~ | |
2029 $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~ | |
2030 $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~ | |
2031 $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~ | |
2032 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' | |
2033 ;; | |
2034 | |
2035 netbsd*) | |
2036 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
2037 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | |
2038 wlarc= | |
2039 else | |
2040 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
2041 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
2042 fi | |
2043 ;; | |
2044 | |
2045 solaris* | sysv5*) | |
2046 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then | |
2047 ld_shlibs=no | |
2048 cat <<EOF 1>&2 | |
2049 | |
2050 *** Warning: The releases 2.8.* of the GNU linker cannot reliably | |
2051 *** create shared libraries on Solaris systems. Therefore, libtool | |
2052 *** is disabling shared libraries support. We urge you to upgrade GNU | |
2053 *** binutils to release 2.9.1 or newer. Another option is to modify | |
2054 *** your PATH or compiler configuration so that the native linker is | |
2055 *** used, and then restart. | |
2056 | |
2057 EOF | |
2058 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
2059 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
2060 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
2061 else | |
2062 ld_shlibs=no | |
2063 fi | |
2064 ;; | |
2065 | |
2066 sunos4*) | |
2067 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
2068 wlarc= | |
2069 hardcode_direct=yes | |
2070 hardcode_shlibpath_var=no | |
2071 ;; | |
2072 | |
2073 *) | |
2074 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
2075 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
2076 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
2077 else | |
2078 ld_shlibs=no | |
2079 fi | |
2080 ;; | |
2081 esac | |
2082 | |
2083 if test "$ld_shlibs" = yes; then | |
2084 runpath_var=LD_RUN_PATH | |
2085 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' | |
2086 export_dynamic_flag_spec='${wl}--export-dynamic' | |
2087 case $host_os in | |
2088 cygwin* | mingw* | pw32*) | |
2089 # dlltool doesn't understand --whole-archive et. al. | |
2090 whole_archive_flag_spec= | |
2091 ;; | |
2092 *) | |
2093 # ancient GNU ld didn't support --whole-archive et. al. | |
2094 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then | |
2095 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
2096 else | |
2097 whole_archive_flag_spec= | |
2098 fi | |
2099 ;; | |
2100 esac | |
2101 fi | |
2102 else | |
2103 # PORTME fill in a description of your system's linker (not GNU ld) | |
2104 case $host_os in | |
2105 aix3*) | |
2106 allow_undefined_flag=unsupported | |
2107 always_export_symbols=yes | |
2108 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' | |
2109 # Note: this linker hardcodes the directories in LIBPATH if there | |
2110 # are no directories specified by -L. | |
2111 hardcode_minus_L=yes | |
2112 if test "$GCC" = yes && test -z "$link_static_flag"; then | |
2113 # Neither direct hardcoding nor static linking is supported with a | |
2114 # broken collect2. | |
2115 hardcode_direct=unsupported | |
2116 fi | |
2117 ;; | |
2118 | |
2119 aix4* | aix5*) | |
2120 if test "$host_cpu" = ia64; then | |
2121 # On IA64, the linker does run time linking by default, so we don't | |
2122 # have to do anything special. | |
2123 aix_use_runtimelinking=no | |
2124 exp_sym_flag='-Bexport' | |
2125 no_entry_flag="" | |
2126 else | |
2127 aix_use_runtimelinking=no | |
2128 | |
2129 # Test if we are trying to use run time linking or normal | |
2130 # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
2131 # need to do runtime linking. | |
2132 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) | |
2133 for ld_flag in $LDFLAGS; do | |
2134 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | |
2135 aix_use_runtimelinking=yes | |
2136 break | |
2137 fi | |
2138 done | |
2139 esac | |
2140 | |
2141 exp_sym_flag='-bexport' | |
2142 no_entry_flag='-bnoentry' | |
2143 fi | |
2144 | |
2145 # When large executables or shared objects are built, AIX ld can | |
2146 # have problems creating the table of contents. If linking a library | |
2147 # or program results in "error TOC overflow" add -mminimal-toc to | |
2148 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
2149 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
2150 | |
2151 hardcode_direct=yes | |
2152 archive_cmds='' | |
2153 hardcode_libdir_separator=':' | |
2154 if test "$GCC" = yes; then | |
2155 case $host_os in aix4.[[012]]|aix4.[[012]].*) | |
2156 collect2name=`${CC} -print-prog-name=collect2` | |
2157 if test -f "$collect2name" && \ | |
2158 strings "$collect2name" | grep resolve_lib_name >/dev/null | |
2159 then | |
2160 # We have reworked collect2 | |
2161 hardcode_direct=yes | |
2162 else | |
2163 # We have old collect2 | |
2164 hardcode_direct=unsupported | |
2165 # It fails to find uninstalled libraries when the uninstalled | |
2166 # path is not listed in the libpath. Setting hardcode_minus_L | |
2167 # to unsupported forces relinking | |
2168 hardcode_minus_L=yes | |
2169 hardcode_libdir_flag_spec='-L$libdir' | |
2170 hardcode_libdir_separator= | |
2171 fi | |
2172 esac | |
2173 | |
2174 shared_flag='-shared' | |
2175 else | |
2176 # not using gcc | |
2177 if test "$host_cpu" = ia64; then | |
2178 shared_flag='${wl}-G' | |
2179 else | |
2180 if test "$aix_use_runtimelinking" = yes; then | |
2181 shared_flag='${wl}-G' | |
2182 else | |
2183 shared_flag='${wl}-bM:SRE' | |
2184 fi | |
2185 fi | |
2186 fi | |
2187 | |
2188 # It seems that -bexpall can do strange things, so it is better to | |
2189 # generate a list of symbols to export. | |
2190 always_export_symbols=yes | |
2191 if test "$aix_use_runtimelinking" = yes; then | |
2192 # Warning - without using the other runtime loading flags (-brtl), | |
2193 # -berok will link without error, but may produce a broken library. | |
2194 allow_undefined_flag='-berok' | |
2195 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' | |
2196 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" | |
2197 else | |
2198 if test "$host_cpu" = ia64; then | |
2199 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' | |
2200 allow_undefined_flag="-z nodefs" | |
2201 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" | |
2202 else | |
2203 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' | |
2204 # Warning - without using the other run time loading flags, | |
2205 # -berok will link without error, but may produce a broken library. | |
2206 allow_undefined_flag='${wl}-berok' | |
2207 # This is a bit strange, but is similar to how AIX traditionally builds | |
2208 # it's shared libraries. | |
2209 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' | |
2210 fi | |
2211 fi | |
2212 ;; | |
2213 | |
2214 amigaos*) | |
2215 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)' | |
2216 hardcode_libdir_flag_spec='-L$libdir' | |
2217 hardcode_minus_L=yes | |
2218 # see comment about different semantics on the GNU ld section | |
2219 ld_shlibs=no | |
2220 ;; | |
2221 | |
2222 cygwin* | mingw* | pw32*) | |
2223 # When not using gcc, we currently assume that we are using | |
2224 # Microsoft Visual C++. | |
2225 # hardcode_libdir_flag_spec is actually meaningless, as there is | |
2226 # no search path for DLLs. | |
2227 hardcode_libdir_flag_spec=' ' | |
2228 allow_undefined_flag=unsupported | |
2229 # Tell ltmain to make .lib files, not .a files. | |
2230 libext=lib | |
2231 # FIXME: Setting linknames here is a bad hack. | |
2232 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' | |
2233 # The linker will automatically build a .lib file if we build a DLL. | |
2234 old_archive_from_new_cmds='true' | |
2235 # FIXME: Should let the user specify the lib program. | |
2236 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' | |
2237 fix_srcfile_path='`cygpath -w "$srcfile"`' | |
2238 ;; | |
2239 | |
2240 darwin* | rhapsody*) | |
2241 case "$host_os" in | |
2242 rhapsody* | darwin1.[[012]]) | |
2243 allow_undefined_flag='-undefined suppress' | |
2244 ;; | |
2245 *) # Darwin 1.3 on | |
2246 allow_undefined_flag='-flat_namespace -undefined suppress' | |
2247 ;; | |
2248 esac | |
2249 # FIXME: Relying on posixy $() will cause problems for | |
2250 # cross-compilation, but unfortunately the echo tests do not | |
2251 # yet detect zsh echo's removal of \ escapes. | |
2252 archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' | |
2253 # We need to add '_' to the symbols in $export_symbols first | |
2254 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' | |
2255 hardcode_direct=yes | |
2256 hardcode_shlibpath_var=no | |
2257 whole_archive_flag_spec='-all_load $convenience' | |
2258 ;; | |
2259 | |
2260 freebsd1*) | |
2261 ld_shlibs=no | |
2262 ;; | |
2263 | |
2264 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | |
2265 # support. Future versions do this automatically, but an explicit c++rt0.o | |
2266 # does not break anything, and helps significantly (at the cost of a little | |
2267 # extra space). | |
2268 freebsd2.2*) | |
2269 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | |
2270 hardcode_libdir_flag_spec='-R$libdir' | |
2271 hardcode_direct=yes | |
2272 hardcode_shlibpath_var=no | |
2273 ;; | |
2274 | |
2275 # Unfortunately, older versions of FreeBSD 2 do not have this feature. | |
2276 freebsd2*) | |
2277 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
2278 hardcode_direct=yes | |
2279 hardcode_minus_L=yes | |
2280 hardcode_shlibpath_var=no | |
2281 ;; | |
2282 | |
2283 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | |
2284 freebsd*) | |
2285 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | |
2286 hardcode_libdir_flag_spec='-R$libdir' | |
2287 hardcode_direct=yes | |
2288 hardcode_shlibpath_var=no | |
2289 ;; | |
2290 | |
2291 hpux9* | hpux10* | hpux11*) | |
2292 case $host_os in | |
2293 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' ;; | |
2294 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; | |
2295 esac | |
2296 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |
2297 hardcode_libdir_separator=: | |
2298 hardcode_direct=yes | |
2299 hardcode_minus_L=yes # Not in the search PATH, but as the default | |
2300 # location of the library. | |
2301 export_dynamic_flag_spec='${wl}-E' | |
2302 ;; | |
2303 | |
2304 irix5* | irix6*) | |
2305 if test "$GCC" = yes; then | |
2306 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' | |
2307 else | |
2308 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' | |
2309 fi | |
2310 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
2311 hardcode_libdir_separator=: | |
2312 link_all_deplibs=yes | |
2313 ;; | |
2314 | |
2315 netbsd*) | |
2316 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
2317 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | |
2318 else | |
2319 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | |
2320 fi | |
2321 hardcode_libdir_flag_spec='-R$libdir' | |
2322 hardcode_direct=yes | |
2323 hardcode_shlibpath_var=no | |
2324 ;; | |
2325 | |
2326 newsos6) | |
2327 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2328 hardcode_direct=yes | |
2329 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
2330 hardcode_libdir_separator=: | |
2331 hardcode_shlibpath_var=no | |
2332 ;; | |
2333 | |
2334 openbsd*) | |
2335 hardcode_direct=yes | |
2336 hardcode_shlibpath_var=no | |
2337 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
2338 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' | |
2339 hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |
2340 export_dynamic_flag_spec='${wl}-E' | |
2341 else | |
2342 case "$host_os" in | |
2343 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) | |
2344 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
2345 hardcode_libdir_flag_spec='-R$libdir' | |
2346 ;; | |
2347 *) | |
2348 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' | |
2349 hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |
2350 ;; | |
2351 esac | |
2352 fi | |
2353 ;; | |
2354 | |
2355 os2*) | |
2356 hardcode_libdir_flag_spec='-L$libdir' | |
2357 hardcode_minus_L=yes | |
2358 allow_undefined_flag=unsupported | |
2359 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' | |
2360 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | |
2361 ;; | |
2362 | |
2363 osf3*) | |
2364 if test "$GCC" = yes; then | |
2365 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | |
2366 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' | |
2367 else | |
2368 allow_undefined_flag=' -expect_unresolved \*' | |
2369 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' | |
2370 fi | |
2371 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
2372 hardcode_libdir_separator=: | |
2373 ;; | |
2374 | |
2375 osf4* | osf5*) # as osf3* with the addition of -msym flag | |
2376 if test "$GCC" = yes; then | |
2377 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | |
2378 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' | |
2379 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
2380 else | |
2381 allow_undefined_flag=' -expect_unresolved \*' | |
2382 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' | |
2383 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ | |
2384 $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' | |
2385 | |
2386 #Both c and cxx compiler support -rpath directly | |
2387 hardcode_libdir_flag_spec='-rpath $libdir' | |
2388 fi | |
2389 hardcode_libdir_separator=: | |
2390 ;; | |
2391 | |
2392 sco3.2v5*) | |
2393 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2394 hardcode_shlibpath_var=no | |
2395 runpath_var=LD_RUN_PATH | |
2396 hardcode_runpath_var=yes | |
2397 export_dynamic_flag_spec='${wl}-Bexport' | |
2398 ;; | |
2399 | |
2400 solaris*) | |
2401 # gcc --version < 3.0 without binutils cannot create self contained | |
2402 # shared libraries reliably, requiring libgcc.a to resolve some of | |
2403 # the object symbols generated in some cases. Libraries that use | |
2404 # assert need libgcc.a to resolve __eprintf, for example. Linking | |
2405 # a copy of libgcc.a into every shared library to guarantee resolving | |
2406 # such symbols causes other problems: According to Tim Van Holder | |
2407 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate | |
2408 # (to the application) exception stack for one thing. | |
2409 no_undefined_flag=' -z defs' | |
2410 if test "$GCC" = yes; then | |
2411 case `$CC --version 2>/dev/null` in | |
2412 [[12]].*) | |
2413 cat <<EOF 1>&2 | |
2414 | |
2415 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably | |
2416 *** create self contained shared libraries on Solaris systems, without | |
2417 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling | |
2418 *** -no-undefined support, which will at least allow you to build shared | |
2419 *** libraries. However, you may find that when you link such libraries | |
2420 *** into an application without using GCC, you have to manually add | |
2421 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to | |
2422 *** upgrade to a newer version of GCC. Another option is to rebuild your | |
2423 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. | |
2424 | |
2425 EOF | |
2426 no_undefined_flag= | |
2427 ;; | |
2428 esac | |
2429 fi | |
2430 # $CC -shared without GNU ld will not create a library from C++ | |
2431 # object files and a static libstdc++, better avoid it by now | |
2432 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2433 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
2434 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | |
2435 hardcode_libdir_flag_spec='-R$libdir' | |
2436 hardcode_shlibpath_var=no | |
2437 case $host_os in | |
2438 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
2439 *) # Supported since Solaris 2.6 (maybe 2.5.1?) | |
2440 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; | |
2441 esac | |
2442 link_all_deplibs=yes | |
2443 ;; | |
2444 | |
2445 sunos4*) | |
2446 if test "x$host_vendor" = xsequent; then | |
2447 # Use $CC to link under sequent, because it throws in some extra .o | |
2448 # files that make .init and .fini sections work. | |
2449 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
2450 else | |
2451 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | |
2452 fi | |
2453 hardcode_libdir_flag_spec='-L$libdir' | |
2454 hardcode_direct=yes | |
2455 hardcode_minus_L=yes | |
2456 hardcode_shlibpath_var=no | |
2457 ;; | |
2458 | |
2459 sysv4) | |
2460 if test "x$host_vendor" = xsno; then | |
2461 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2462 hardcode_direct=yes # is this really true??? | |
2463 else | |
2464 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2465 hardcode_direct=no #Motorola manual says yes, but my tests say they lie | |
2466 fi | |
2467 runpath_var='LD_RUN_PATH' | |
2468 hardcode_shlibpath_var=no | |
2469 ;; | |
2470 | |
2471 sysv4.3*) | |
2472 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2473 hardcode_shlibpath_var=no | |
2474 export_dynamic_flag_spec='-Bexport' | |
2475 ;; | |
2476 | |
2477 sysv5*) | |
2478 no_undefined_flag=' -z text' | |
2479 # $CC -shared without GNU ld will not create a library from C++ | |
2480 # object files and a static libstdc++, better avoid it by now | |
2481 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2482 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
2483 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | |
2484 hardcode_libdir_flag_spec= | |
2485 hardcode_shlibpath_var=no | |
2486 runpath_var='LD_RUN_PATH' | |
2487 ;; | |
2488 | |
2489 uts4*) | |
2490 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2491 hardcode_libdir_flag_spec='-L$libdir' | |
2492 hardcode_shlibpath_var=no | |
2493 ;; | |
2494 | |
2495 dgux*) | |
2496 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2497 hardcode_libdir_flag_spec='-L$libdir' | |
2498 hardcode_shlibpath_var=no | |
2499 ;; | |
2500 | |
2501 sysv4*MP*) | |
2502 if test -d /usr/nec; then | |
2503 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2504 hardcode_shlibpath_var=no | |
2505 runpath_var=LD_RUN_PATH | |
2506 hardcode_runpath_var=yes | |
2507 ld_shlibs=yes | |
2508 fi | |
2509 ;; | |
2510 | |
2511 sysv4.2uw2*) | |
2512 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' | |
2513 hardcode_direct=yes | |
2514 hardcode_minus_L=no | |
2515 hardcode_shlibpath_var=no | |
2516 hardcode_runpath_var=yes | |
2517 runpath_var=LD_RUN_PATH | |
2518 ;; | |
2519 | |
2520 sysv5uw7* | unixware7*) | |
2521 no_undefined_flag='${wl}-z ${wl}text' | |
2522 if test "$GCC" = yes; then | |
2523 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
2524 else | |
2525 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
2526 fi | |
2527 runpath_var='LD_RUN_PATH' | |
2528 hardcode_shlibpath_var=no | |
2529 ;; | |
2530 | |
2531 *) | |
2532 ld_shlibs=no | |
2533 ;; | |
2534 esac | |
2535 fi | |
2536 AC_MSG_RESULT([$ld_shlibs]) | |
2537 test "$ld_shlibs" = no && can_build_shared=no | |
2538 ## | |
2539 ## END FIXME | |
2540 | |
2541 ## FIXME: this should be a separate macro | |
2542 ## | |
2543 # Check hardcoding attributes. | |
2544 AC_MSG_CHECKING([how to hardcode library paths into programs]) | |
2545 hardcode_action= | |
2546 if test -n "$hardcode_libdir_flag_spec" || \ | |
2547 test -n "$runpath_var"; then | |
2548 | |
2549 # We can hardcode non-existant directories. | |
2550 if test "$hardcode_direct" != no && | |
2551 # If the only mechanism to avoid hardcoding is shlibpath_var, we | |
2552 # have to relink, otherwise we might link with an installed library | |
2553 # when we should be linking with a yet-to-be-installed one | |
2554 ## test "$hardcode_shlibpath_var" != no && | |
2555 test "$hardcode_minus_L" != no; then | |
2556 # Linking always hardcodes the temporary library directory. | |
2557 hardcode_action=relink | |
2558 else | |
2559 # We can link without hardcoding, and we can hardcode nonexisting dirs. | |
2560 hardcode_action=immediate | |
2561 fi | |
2562 else | |
2563 # We cannot hardcode anything, or else we can only hardcode existing | |
2564 # directories. | |
2565 hardcode_action=unsupported | |
2566 fi | |
2567 AC_MSG_RESULT([$hardcode_action]) | |
2568 ## | |
2569 ## END FIXME | |
2570 | |
2571 ## FIXME: this should be a separate macro | |
2572 ## | |
2573 striplib= | |
2574 old_striplib= | |
2575 AC_MSG_CHECKING([whether stripping libraries is possible]) | |
2576 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then | |
2577 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | |
2578 test -z "$striplib" && striplib="$STRIP --strip-unneeded" | |
2579 AC_MSG_RESULT([yes]) | |
2580 else | |
2581 AC_MSG_RESULT([no]) | |
2582 fi | |
2583 ## | |
2584 ## END FIXME | |
2585 | |
2586 reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
2587 test -z "$deplibs_check_method" && deplibs_check_method=unknown | |
2588 | |
2589 ## FIXME: this should be a separate macro | |
2590 ## | |
2591 # PORTME Fill in your ld.so characteristics | |
2592 AC_MSG_CHECKING([dynamic linker characteristics]) | |
2593 library_names_spec= | |
2594 libname_spec='lib$name' | |
2595 soname_spec= | |
2596 postinstall_cmds= | |
2597 postuninstall_cmds= | |
2598 finish_cmds= | |
2599 finish_eval= | |
2600 shlibpath_var= | |
2601 shlibpath_overrides_runpath=unknown | |
2602 version_type=none | |
2603 dynamic_linker="$host_os ld.so" | |
2604 sys_lib_dlsearch_path_spec="/lib /usr/lib" | |
2605 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | |
2606 | |
2607 case $host_os in | |
2608 aix3*) | |
2609 version_type=linux | |
2610 library_names_spec='${libname}${release}.so$versuffix $libname.a' | |
2611 shlibpath_var=LIBPATH | |
2612 | |
2613 # AIX has no versioning support, so we append a major version to the name. | |
2614 soname_spec='${libname}${release}.so$major' | |
2615 ;; | |
2616 | |
2617 aix4* | aix5*) | |
2618 version_type=linux | |
2619 if test "$host_cpu" = ia64; then | |
2620 # AIX 5 supports IA64 | |
2621 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' | |
2622 shlibpath_var=LD_LIBRARY_PATH | |
2623 else | |
2624 # With GCC up to 2.95.x, collect2 would create an import file | |
2625 # for dependence libraries. The import file would start with | |
2626 # the line `#! .'. This would cause the generated library to | |
2627 # depend on `.', always an invalid library. This was fixed in | |
2628 # development snapshots of GCC prior to 3.0. | |
2629 case $host_os in | |
2630 aix4 | aix4.[[01]] | aix4.[[01]].*) | |
2631 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | |
2632 echo ' yes ' | |
2633 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then | |
2634 : | |
2635 else | |
2636 can_build_shared=no | |
2637 fi | |
2638 ;; | |
2639 esac | |
2640 # AIX (on Power*) has no versioning support, so currently we can | |
2641 # not hardcode correct soname into executable. Probably we can | |
2642 # add versioning support to collect2, so additional links can | |
2643 # be useful in future. | |
2644 if test "$aix_use_runtimelinking" = yes; then | |
2645 # If using run time linking (on AIX 4.2 or later) use lib<name>.so | |
2646 # instead of lib<name>.a to let people know that these are not | |
2647 # typical AIX shared libraries. | |
2648 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2649 else | |
2650 # We preserve .a as extension for shared libraries through AIX4.2 | |
2651 # and later when we are not doing run time linking. | |
2652 library_names_spec='${libname}${release}.a $libname.a' | |
2653 soname_spec='${libname}${release}.so$major' | |
2654 fi | |
2655 shlibpath_var=LIBPATH | |
2656 fi | |
2657 ;; | |
2658 | |
2659 amigaos*) | |
2660 library_names_spec='$libname.ixlibrary $libname.a' | |
2661 # Create ${libname}_ixlibrary.a entries in /sys/libs. | |
2662 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' | |
2663 ;; | |
2664 | |
2665 beos*) | |
2666 library_names_spec='${libname}.so' | |
2667 dynamic_linker="$host_os ld.so" | |
2668 shlibpath_var=LIBRARY_PATH | |
2669 ;; | |
2670 | |
2671 bsdi4*) | |
2672 version_type=linux | |
2673 need_version=no | |
2674 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2675 soname_spec='${libname}${release}.so$major' | |
2676 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | |
2677 shlibpath_var=LD_LIBRARY_PATH | |
2678 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | |
2679 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | |
2680 export_dynamic_flag_spec=-rdynamic | |
2681 # the default ld.so.conf also contains /usr/contrib/lib and | |
2682 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | |
2683 # libtool to hard-code these into programs | |
2684 ;; | |
2685 | |
2686 cygwin* | mingw* | pw32*) | |
2687 version_type=windows | |
2688 need_version=no | |
2689 need_lib_prefix=no | |
2690 case $GCC,$host_os in | |
2691 yes,cygwin*) | |
2692 library_names_spec='$libname.dll.a' | |
2693 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' | |
2694 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ | |
2695 dldir=$destdir/`dirname \$dlpath`~ | |
2696 test -d \$dldir || mkdir -p \$dldir~ | |
2697 $install_prog .libs/$dlname \$dldir/$dlname' | |
2698 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ | |
2699 dlpath=$dir/\$dldll~ | |
2700 $rm \$dlpath' | |
2701 ;; | |
2702 yes,mingw*) | |
2703 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' | |
2704 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` | |
2705 ;; | |
2706 yes,pw32*) | |
2707 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' | |
2708 ;; | |
2709 *) | |
2710 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' | |
2711 ;; | |
2712 esac | |
2713 dynamic_linker='Win32 ld.exe' | |
2714 # FIXME: first we should search . and the directory the executable is in | |
2715 shlibpath_var=PATH | |
2716 ;; | |
2717 | |
2718 darwin* | rhapsody*) | |
2719 dynamic_linker="$host_os dyld" | |
2720 version_type=darwin | |
2721 need_lib_prefix=no | |
2722 need_version=no | |
2723 # FIXME: Relying on posixy $() will cause problems for | |
2724 # cross-compilation, but unfortunately the echo tests do not | |
2725 # yet detect zsh echo's removal of \ escapes. | |
2726 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' | |
2727 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' | |
2728 shlibpath_overrides_runpath=yes | |
2729 shlibpath_var=DYLD_LIBRARY_PATH | |
2730 ;; | |
2731 | |
2732 freebsd1*) | |
2733 dynamic_linker=no | |
2734 ;; | |
2735 | |
2736 freebsd*) | |
2737 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` | |
2738 version_type=freebsd-$objformat | |
2739 case $version_type in | |
2740 freebsd-elf*) | |
2741 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' | |
2742 need_version=no | |
2743 need_lib_prefix=no | |
2744 ;; | |
2745 freebsd-*) | |
2746 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' | |
2747 need_version=yes | |
2748 ;; | |
2749 esac | |
2750 shlibpath_var=LD_LIBRARY_PATH | |
2751 case $host_os in | |
2752 freebsd2*) | |
2753 shlibpath_overrides_runpath=yes | |
2754 ;; | |
2755 *) | |
2756 shlibpath_overrides_runpath=no | |
2757 hardcode_into_libs=yes | |
2758 ;; | |
2759 esac | |
2760 ;; | |
2761 | |
2762 gnu*) | |
2763 version_type=linux | |
2764 need_lib_prefix=no | |
2765 need_version=no | |
2766 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' | |
2767 soname_spec='${libname}${release}.so$major' | |
2768 shlibpath_var=LD_LIBRARY_PATH | |
2769 hardcode_into_libs=yes | |
2770 ;; | |
2771 | |
2772 hpux9* | hpux10* | hpux11*) | |
2773 # Give a soname corresponding to the major version so that dld.sl refuses to | |
2774 # link against other versions. | |
2775 dynamic_linker="$host_os dld.sl" | |
2776 version_type=sunos | |
2777 need_lib_prefix=no | |
2778 need_version=no | |
2779 shlibpath_var=SHLIB_PATH | |
2780 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | |
2781 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' | |
2782 soname_spec='${libname}${release}.sl$major' | |
2783 # HP-UX runs *really* slowly unless shared libraries are mode 555. | |
2784 postinstall_cmds='chmod 555 $lib' | |
2785 ;; | |
2786 | |
2787 irix5* | irix6*) | |
2788 version_type=irix | |
2789 need_lib_prefix=no | |
2790 need_version=no | |
2791 soname_spec='${libname}${release}.so$major' | |
2792 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' | |
2793 case $host_os in | |
2794 irix5*) | |
2795 libsuff= shlibsuff= | |
2796 ;; | |
2797 *) | |
2798 case $LD in # libtool.m4 will add one of these switches to LD | |
2799 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; | |
2800 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; | |
2801 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; | |
2802 *) libsuff= shlibsuff= libmagic=never-match;; | |
2803 esac | |
2804 ;; | |
2805 esac | |
2806 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | |
2807 shlibpath_overrides_runpath=no | |
2808 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | |
2809 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | |
2810 ;; | |
2811 | |
2812 # No shared lib support for Linux oldld, aout, or coff. | |
2813 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) | |
2814 dynamic_linker=no | |
2815 ;; | |
2816 | |
2817 # This must be Linux ELF. | |
2818 linux-gnu*) | |
2819 version_type=linux | |
2820 need_lib_prefix=no | |
2821 need_version=no | |
2822 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2823 soname_spec='${libname}${release}.so$major' | |
2824 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | |
2825 shlibpath_var=LD_LIBRARY_PATH | |
2826 shlibpath_overrides_runpath=no | |
2827 # This implies no fast_install, which is unacceptable. | |
2828 # Some rework will be needed to allow for fast_install | |
2829 # before this can be enabled. | |
2830 hardcode_into_libs=yes | |
2831 | |
2832 # We used to test for /lib/ld.so.1 and disable shared libraries on | |
2833 # powerpc, because MkLinux only supported shared libraries with the | |
2834 # GNU dynamic linker. Since this was broken with cross compilers, | |
2835 # most powerpc-linux boxes support dynamic linking these days and | |
2836 # people can always --disable-shared, the test was removed, and we | |
2837 # assume the GNU/Linux dynamic linker is in use. | |
2838 dynamic_linker='GNU/Linux ld.so' | |
2839 ;; | |
2840 | |
2841 netbsd*) | |
2842 version_type=sunos | |
2843 need_lib_prefix=no | |
2844 need_version=no | |
2845 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
2846 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
2847 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
2848 dynamic_linker='NetBSD (a.out) ld.so' | |
2849 else | |
2850 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' | |
2851 soname_spec='${libname}${release}.so$major' | |
2852 dynamic_linker='NetBSD ld.elf_so' | |
2853 fi | |
2854 shlibpath_var=LD_LIBRARY_PATH | |
2855 shlibpath_overrides_runpath=yes | |
2856 hardcode_into_libs=yes | |
2857 ;; | |
2858 | |
2859 newsos6) | |
2860 version_type=linux | |
2861 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2862 shlibpath_var=LD_LIBRARY_PATH | |
2863 shlibpath_overrides_runpath=yes | |
2864 ;; | |
2865 | |
2866 openbsd*) | |
2867 version_type=sunos | |
2868 need_lib_prefix=no | |
2869 need_version=no | |
2870 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
2871 case "$host_os" in | |
2872 openbsd2.[[89]] | openbsd2.[[89]].*) | |
2873 shlibpath_overrides_runpath=no | |
2874 ;; | |
2875 *) | |
2876 shlibpath_overrides_runpath=yes | |
2877 ;; | |
2878 esac | |
2879 else | |
2880 shlibpath_overrides_runpath=yes | |
2881 fi | |
2882 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
2883 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
2884 shlibpath_var=LD_LIBRARY_PATH | |
2885 ;; | |
2886 | |
2887 os2*) | |
2888 libname_spec='$name' | |
2889 need_lib_prefix=no | |
2890 library_names_spec='$libname.dll $libname.a' | |
2891 dynamic_linker='OS/2 ld.exe' | |
2892 shlibpath_var=LIBPATH | |
2893 ;; | |
2894 | |
2895 osf3* | osf4* | osf5*) | |
2896 version_type=osf | |
2897 need_version=no | |
2898 soname_spec='${libname}${release}.so' | |
2899 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' | |
2900 shlibpath_var=LD_LIBRARY_PATH | |
2901 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | |
2902 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | |
2903 ;; | |
2904 | |
2905 sco3.2v5*) | |
2906 version_type=osf | |
2907 soname_spec='${libname}${release}.so$major' | |
2908 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2909 shlibpath_var=LD_LIBRARY_PATH | |
2910 ;; | |
2911 | |
2912 solaris*) | |
2913 version_type=linux | |
2914 need_lib_prefix=no | |
2915 need_version=no | |
2916 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2917 soname_spec='${libname}${release}.so$major' | |
2918 shlibpath_var=LD_LIBRARY_PATH | |
2919 shlibpath_overrides_runpath=yes | |
2920 hardcode_into_libs=yes | |
2921 # ldd complains unless libraries are executable | |
2922 postinstall_cmds='chmod +x $lib' | |
2923 ;; | |
2924 | |
2925 sunos4*) | |
2926 version_type=sunos | |
2927 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
2928 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | |
2929 shlibpath_var=LD_LIBRARY_PATH | |
2930 shlibpath_overrides_runpath=yes | |
2931 if test "$with_gnu_ld" = yes; then | |
2932 need_lib_prefix=no | |
2933 fi | |
2934 need_version=yes | |
2935 ;; | |
2936 | |
2937 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
2938 version_type=linux | |
2939 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2940 soname_spec='${libname}${release}.so$major' | |
2941 shlibpath_var=LD_LIBRARY_PATH | |
2942 case $host_vendor in | |
2943 sni) | |
2944 shlibpath_overrides_runpath=no | |
2945 ;; | |
2946 motorola) | |
2947 need_lib_prefix=no | |
2948 need_version=no | |
2949 shlibpath_overrides_runpath=no | |
2950 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | |
2951 ;; | |
2952 esac | |
2953 ;; | |
2954 | |
2955 uts4*) | |
2956 version_type=linux | |
2957 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2958 soname_spec='${libname}${release}.so$major' | |
2959 shlibpath_var=LD_LIBRARY_PATH | |
2960 ;; | |
2961 | |
2962 dgux*) | |
2963 version_type=linux | |
2964 need_lib_prefix=no | |
2965 need_version=no | |
2966 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2967 soname_spec='${libname}${release}.so$major' | |
2968 shlibpath_var=LD_LIBRARY_PATH | |
2969 ;; | |
2970 | |
2971 sysv4*MP*) | |
2972 if test -d /usr/nec ;then | |
2973 version_type=linux | |
2974 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' | |
2975 soname_spec='$libname.so.$major' | |
2976 shlibpath_var=LD_LIBRARY_PATH | |
2977 fi | |
2978 ;; | |
2979 | |
2980 *) | |
2981 dynamic_linker=no | |
2982 ;; | |
2983 esac | |
2984 AC_MSG_RESULT([$dynamic_linker]) | |
2985 test "$dynamic_linker" = no && can_build_shared=no | |
2986 ## | |
2987 ## END FIXME | |
2988 | |
2989 ## FIXME: this should be a separate macro | |
2990 ## | |
2991 # Report the final consequences. | |
2992 AC_MSG_CHECKING([if libtool supports shared libraries]) | |
2993 AC_MSG_RESULT([$can_build_shared]) | |
2994 ## | |
2995 ## END FIXME | |
2996 | |
2997 ## FIXME: this should be a separate macro | |
2998 ## | |
2999 AC_MSG_CHECKING([whether to build shared libraries]) | |
3000 test "$can_build_shared" = "no" && enable_shared=no | |
3001 | |
3002 # On AIX, shared libraries and static libraries use the same namespace, and | |
3003 # are all built from PIC. | |
3004 case "$host_os" in | |
3005 aix3*) | |
3006 test "$enable_shared" = yes && enable_static=no | |
3007 if test -n "$RANLIB"; then | |
3008 archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
3009 postinstall_cmds='$RANLIB $lib' | |
3010 fi | |
3011 ;; | |
3012 | |
3013 aix4*) | |
3014 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
3015 test "$enable_shared" = yes && enable_static=no | |
3016 fi | |
3017 ;; | |
3018 esac | |
3019 AC_MSG_RESULT([$enable_shared]) | |
3020 ## | |
3021 ## END FIXME | |
3022 | |
3023 ## FIXME: this should be a separate macro | |
3024 ## | |
3025 AC_MSG_CHECKING([whether to build static libraries]) | |
3026 # Make sure either enable_shared or enable_static is yes. | |
3027 test "$enable_shared" = yes || enable_static=yes | |
3028 AC_MSG_RESULT([$enable_static]) | |
3029 ## | |
3030 ## END FIXME | |
3031 | |
3032 if test "$hardcode_action" = relink; then | |
3033 # Fast installation is not supported | |
3034 enable_fast_install=no | |
3035 elif test "$shlibpath_overrides_runpath" = yes || | |
3036 test "$enable_shared" = no; then | |
3037 # Fast installation is not necessary | |
3038 enable_fast_install=needless | |
3039 fi | |
3040 | |
3041 variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | |
3042 if test "$GCC" = yes; then | |
3043 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | |
3044 fi | |
3045 | |
3046 AC_LIBTOOL_DLOPEN_SELF | |
3047 | |
3048 ## FIXME: this should be a separate macro | |
3049 ## | |
3050 if test "$enable_shared" = yes && test "$GCC" = yes; then | |
3051 case $archive_cmds in | |
3052 *'~'*) | |
3053 # FIXME: we may have to deal with multi-command sequences. | |
3054 ;; | |
3055 '$CC '*) | |
3056 # Test whether the compiler implicitly links with -lc since on some | |
3057 # systems, -lgcc has to come before -lc. If gcc already passes -lc | |
3058 # to ld, don't add -lc before -lgcc. | |
3059 AC_MSG_CHECKING([whether -lc should be explicitly linked in]) | |
3060 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], | |
3061 [$rm conftest* | |
3062 echo 'static int dummy;' > conftest.$ac_ext | |
3063 | |
3064 if AC_TRY_EVAL(ac_compile); then | |
3065 soname=conftest | |
3066 lib=conftest | |
3067 libobjs=conftest.$ac_objext | |
3068 deplibs= | |
3069 wl=$lt_cv_prog_cc_wl | |
3070 compiler_flags=-v | |
3071 linker_flags=-v | |
3072 verstring= | |
3073 output_objdir=. | |
3074 libname=conftest | |
3075 save_allow_undefined_flag=$allow_undefined_flag | |
3076 allow_undefined_flag= | |
3077 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) | |
3078 then | |
3079 lt_cv_archive_cmds_need_lc=no | |
3080 else | |
3081 lt_cv_archive_cmds_need_lc=yes | |
3082 fi | |
3083 allow_undefined_flag=$save_allow_undefined_flag | |
3084 else | |
3085 cat conftest.err 1>&5 | |
3086 fi]) | |
3087 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) | |
3088 ;; | |
3089 esac | |
3090 fi | |
3091 need_lc=${lt_cv_archive_cmds_need_lc-yes} | |
3092 ## | |
3093 ## END FIXME | |
3094 | |
3095 ## FIXME: this should be a separate macro | |
3096 ## | |
3097 # The second clause should only fire when bootstrapping the | |
3098 # libtool distribution, otherwise you forgot to ship ltmain.sh | |
3099 # with your package, and you will get complaints that there are | |
3100 # no rules to generate ltmain.sh. | |
3101 if test -f "$ltmain"; then | |
3102 : | |
3103 else | |
3104 # If there is no Makefile yet, we rely on a make rule to execute | |
3105 # `config.status --recheck' to rerun these tests and create the | |
3106 # libtool script then. | |
3107 test -f Makefile && make "$ltmain" | |
3108 fi | |
3109 | |
3110 if test -f "$ltmain"; then | |
3111 trap "$rm \"${ofile}T\"; exit 1" 1 2 15 | |
3112 $rm -f "${ofile}T" | |
3113 | |
3114 echo creating $ofile | |
3115 | |
3116 # Now quote all the things that may contain metacharacters while being | |
3117 # careful not to overquote the AC_SUBSTed values. We take copies of the | |
3118 # variables and quote the copies for generation of the libtool script. | |
3119 for var in echo old_CC old_CFLAGS \ | |
3120 AR AR_FLAGS CC LD LN_S NM SHELL \ | |
3121 reload_flag reload_cmds wl \ | |
3122 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ | |
3123 thread_safe_flag_spec whole_archive_flag_spec libname_spec \ | |
3124 library_names_spec soname_spec \ | |
3125 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ | |
3126 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ | |
3127 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ | |
3128 old_striplib striplib file_magic_cmd export_symbols_cmds \ | |
3129 deplibs_check_method allow_undefined_flag no_undefined_flag \ | |
3130 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ | |
3131 global_symbol_to_c_name_address \ | |
3132 hardcode_libdir_flag_spec hardcode_libdir_separator \ | |
3133 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ | |
3134 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do | |
3135 | |
3136 case $var in | |
3137 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ | |
3138 old_postinstall_cmds | old_postuninstall_cmds | \ | |
3139 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ | |
3140 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ | |
3141 postinstall_cmds | postuninstall_cmds | \ | |
3142 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) | |
3143 # Double-quote double-evaled strings. | |
3144 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" | |
3145 ;; | |
3146 *) | |
3147 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" | |
3148 ;; | |
3149 esac | |
3150 done | |
3151 | |
3152 cat <<__EOF__ > "${ofile}T" | |
3153 #! $SHELL | |
3154 | |
3155 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. | |
3156 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) | |
3157 # NOTE: Changes made to this file will be lost: look at ltmain.sh. | |
3158 # | |
3159 # Copyright (C) 1996-2000 Free Software Foundation, Inc. | |
3160 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |
3161 # | |
3162 # This program is free software; you can redistribute it and/or modify | |
3163 # it under the terms of the GNU General Public License as published by | |
3164 # the Free Software Foundation; either version 2 of the License, or | |
3165 # (at your option) any later version. | |
3166 # | |
3167 # This program is distributed in the hope that it will be useful, but | |
3168 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
3169 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
3170 # General Public License for more details. | |
3171 # | |
3172 # You should have received a copy of the GNU General Public License | |
3173 # along with this program; if not, write to the Free Software | |
3174 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
3175 # | |
3176 # As a special exception to the GNU General Public License, if you | |
3177 # distribute this file as part of a program that contains a | |
3178 # configuration script generated by Autoconf, you may include it under | |
3179 # the same distribution terms that you use for the rest of that program. | |
3180 | |
3181 # Sed that helps us avoid accidentally triggering echo(1) options like -n. | |
3182 Xsed="sed -e s/^X//" | |
3183 | |
3184 # The HP-UX ksh and POSIX shell print the target directory to stdout | |
3185 # if CDPATH is set. | |
3186 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | |
3187 | |
3188 # ### BEGIN LIBTOOL CONFIG | |
3189 | |
3190 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
3191 | |
3192 # Shell to use when invoking shell scripts. | |
3193 SHELL=$lt_SHELL | |
3194 | |
3195 # Whether or not to build shared libraries. | |
3196 build_libtool_libs=$enable_shared | |
3197 | |
3198 # Whether or not to build static libraries. | |
3199 build_old_libs=$enable_static | |
3200 | |
3201 # Whether or not to add -lc for building shared libraries. | |
3202 build_libtool_need_lc=$need_lc | |
3203 | |
3204 # Whether or not to optimize for fast installation. | |
3205 fast_install=$enable_fast_install | |
3206 | |
3207 # The host system. | |
3208 host_alias=$host_alias | |
3209 host=$host | |
3210 | |
3211 # An echo program that does not interpret backslashes. | |
3212 echo=$lt_echo | |
3213 | |
3214 # The archiver. | |
3215 AR=$lt_AR | |
3216 AR_FLAGS=$lt_AR_FLAGS | |
3217 | |
3218 # The default C compiler. | |
3219 CC=$lt_CC | |
3220 | |
3221 # Is the compiler the GNU C compiler? | |
3222 with_gcc=$GCC | |
3223 | |
3224 # The linker used to build libraries. | |
3225 LD=$lt_LD | |
3226 | |
3227 # Whether we need hard or soft links. | |
3228 LN_S=$lt_LN_S | |
3229 | |
3230 # A BSD-compatible nm program. | |
3231 NM=$lt_NM | |
3232 | |
3233 # A symbol stripping program | |
3234 STRIP=$STRIP | |
3235 | |
3236 # Used to examine libraries when file_magic_cmd begins "file" | |
3237 MAGIC_CMD=$MAGIC_CMD | |
3238 | |
3239 # Used on cygwin: DLL creation program. | |
3240 DLLTOOL="$DLLTOOL" | |
3241 | |
3242 # Used on cygwin: object dumper. | |
3243 OBJDUMP="$OBJDUMP" | |
3244 | |
3245 # Used on cygwin: assembler. | |
3246 AS="$AS" | |
3247 | |
3248 # The name of the directory that contains temporary libtool files. | |
3249 objdir=$objdir | |
3250 | |
3251 # How to create reloadable object files. | |
3252 reload_flag=$lt_reload_flag | |
3253 reload_cmds=$lt_reload_cmds | |
3254 | |
3255 # How to pass a linker flag through the compiler. | |
3256 wl=$lt_wl | |
3257 | |
3258 # Object file suffix (normally "o"). | |
3259 objext="$ac_objext" | |
3260 | |
3261 # Old archive suffix (normally "a"). | |
3262 libext="$libext" | |
3263 | |
3264 # Executable file suffix (normally ""). | |
3265 exeext="$exeext" | |
3266 | |
3267 # Additional compiler flags for building library objects. | |
3268 pic_flag=$lt_pic_flag | |
3269 pic_mode=$pic_mode | |
3270 | |
3271 # Does compiler simultaneously support -c and -o options? | |
3272 compiler_c_o=$lt_compiler_c_o | |
3273 | |
3274 # Can we write directly to a .lo ? | |
3275 compiler_o_lo=$lt_compiler_o_lo | |
3276 | |
3277 # Must we lock files when doing compilation ? | |
3278 need_locks=$lt_need_locks | |
3279 | |
3280 # Do we need the lib prefix for modules? | |
3281 need_lib_prefix=$need_lib_prefix | |
3282 | |
3283 # Do we need a version for libraries? | |
3284 need_version=$need_version | |
3285 | |
3286 # Whether dlopen is supported. | |
3287 dlopen_support=$enable_dlopen | |
3288 | |
3289 # Whether dlopen of programs is supported. | |
3290 dlopen_self=$enable_dlopen_self | |
3291 | |
3292 # Whether dlopen of statically linked programs is supported. | |
3293 dlopen_self_static=$enable_dlopen_self_static | |
3294 | |
3295 # Compiler flag to prevent dynamic linking. | |
3296 link_static_flag=$lt_link_static_flag | |
3297 | |
3298 # Compiler flag to turn off builtin functions. | |
3299 no_builtin_flag=$lt_no_builtin_flag | |
3300 | |
3301 # Compiler flag to allow reflexive dlopens. | |
3302 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec | |
3303 | |
3304 # Compiler flag to generate shared objects directly from archives. | |
3305 whole_archive_flag_spec=$lt_whole_archive_flag_spec | |
3306 | |
3307 # Compiler flag to generate thread-safe objects. | |
3308 thread_safe_flag_spec=$lt_thread_safe_flag_spec | |
3309 | |
3310 # Library versioning type. | |
3311 version_type=$version_type | |
3312 | |
3313 # Format of library name prefix. | |
3314 libname_spec=$lt_libname_spec | |
3315 | |
3316 # List of archive names. First name is the real one, the rest are links. | |
3317 # The last name is the one that the linker finds with -lNAME. | |
3318 library_names_spec=$lt_library_names_spec | |
3319 | |
3320 # The coded name of the library, if different from the real name. | |
3321 soname_spec=$lt_soname_spec | |
3322 | |
3323 # Commands used to build and install an old-style archive. | |
3324 RANLIB=$lt_RANLIB | |
3325 old_archive_cmds=$lt_old_archive_cmds | |
3326 old_postinstall_cmds=$lt_old_postinstall_cmds | |
3327 old_postuninstall_cmds=$lt_old_postuninstall_cmds | |
3328 | |
3329 # Create an old-style archive from a shared archive. | |
3330 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds | |
3331 | |
3332 # Create a temporary old-style archive to link instead of a shared archive. | |
3333 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds | |
3334 | |
3335 # Commands used to build and install a shared archive. | |
3336 archive_cmds=$lt_archive_cmds | |
3337 archive_expsym_cmds=$lt_archive_expsym_cmds | |
3338 postinstall_cmds=$lt_postinstall_cmds | |
3339 postuninstall_cmds=$lt_postuninstall_cmds | |
3340 | |
3341 # Commands to strip libraries. | |
3342 old_striplib=$lt_old_striplib | |
3343 striplib=$lt_striplib | |
3344 | |
3345 # Method to check whether dependent libraries are shared objects. | |
3346 deplibs_check_method=$lt_deplibs_check_method | |
3347 | |
3348 # Command to use when deplibs_check_method == file_magic. | |
3349 file_magic_cmd=$lt_file_magic_cmd | |
3350 | |
3351 # Flag that allows shared libraries with undefined symbols to be built. | |
3352 allow_undefined_flag=$lt_allow_undefined_flag | |
3353 | |
3354 # Flag that forces no undefined symbols. | |
3355 no_undefined_flag=$lt_no_undefined_flag | |
3356 | |
3357 # Commands used to finish a libtool library installation in a directory. | |
3358 finish_cmds=$lt_finish_cmds | |
3359 | |
3360 # Same as above, but a single script fragment to be evaled but not shown. | |
3361 finish_eval=$lt_finish_eval | |
3362 | |
3363 # Take the output of nm and produce a listing of raw symbols and C names. | |
3364 global_symbol_pipe=$lt_global_symbol_pipe | |
3365 | |
3366 # Transform the output of nm in a proper C declaration | |
3367 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl | |
3368 | |
3369 # Transform the output of nm in a C name address pair | |
3370 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address | |
3371 | |
3372 # This is the shared library runtime path variable. | |
3373 runpath_var=$runpath_var | |
3374 | |
3375 # This is the shared library path variable. | |
3376 shlibpath_var=$shlibpath_var | |
3377 | |
3378 # Is shlibpath searched before the hard-coded library search path? | |
3379 shlibpath_overrides_runpath=$shlibpath_overrides_runpath | |
3380 | |
3381 # How to hardcode a shared library path into an executable. | |
3382 hardcode_action=$hardcode_action | |
3383 | |
3384 # Whether we should hardcode library paths into libraries. | |
3385 hardcode_into_libs=$hardcode_into_libs | |
3386 | |
3387 # Flag to hardcode \$libdir into a binary during linking. | |
3388 # This must work even if \$libdir does not exist. | |
3389 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec | |
3390 | |
3391 # Whether we need a single -rpath flag with a separated argument. | |
3392 hardcode_libdir_separator=$lt_hardcode_libdir_separator | |
3393 | |
3394 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the | |
3395 # resulting binary. | |
3396 hardcode_direct=$hardcode_direct | |
3397 | |
3398 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the | |
3399 # resulting binary. | |
3400 hardcode_minus_L=$hardcode_minus_L | |
3401 | |
3402 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | |
3403 # the resulting binary. | |
3404 hardcode_shlibpath_var=$hardcode_shlibpath_var | |
3405 | |
3406 # Variables whose values should be saved in libtool wrapper scripts and | |
3407 # restored at relink time. | |
3408 variables_saved_for_relink="$variables_saved_for_relink" | |
3409 | |
3410 # Whether libtool must link a program against all its dependency libraries. | |
3411 link_all_deplibs=$link_all_deplibs | |
3412 | |
3413 # Compile-time system search path for libraries | |
3414 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec | |
3415 | |
3416 # Run-time system search path for libraries | |
3417 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec | |
3418 | |
3419 # Fix the shell variable \$srcfile for the compiler. | |
3420 fix_srcfile_path="$fix_srcfile_path" | |
3421 | |
3422 # Set to yes if exported symbols are required. | |
3423 always_export_symbols=$always_export_symbols | |
3424 | |
3425 # The commands to list exported symbols. | |
3426 export_symbols_cmds=$lt_export_symbols_cmds | |
3427 | |
3428 # The commands to extract the exported symbol list from a shared archive. | |
3429 extract_expsyms_cmds=$lt_extract_expsyms_cmds | |
3430 | |
3431 # Symbols that should not be listed in the preloaded symbols. | |
3432 exclude_expsyms=$lt_exclude_expsyms | |
3433 | |
3434 # Symbols that must always be exported. | |
3435 include_expsyms=$lt_include_expsyms | |
3436 | |
3437 # ### END LIBTOOL CONFIG | |
3438 | |
3439 __EOF__ | |
3440 | |
3441 case $host_os in | |
3442 aix3*) | |
3443 cat <<\EOF >> "${ofile}T" | |
3444 | |
3445 # AIX sometimes has problems with the GCC collect2 program. For some | |
3446 # reason, if we set the COLLECT_NAMES environment variable, the problems | |
3447 # vanish in a puff of smoke. | |
3448 if test "X${COLLECT_NAMES+set}" != Xset; then | |
3449 COLLECT_NAMES= | |
3450 export COLLECT_NAMES | |
3451 fi | |
3452 EOF | |
3453 ;; | |
3454 esac | |
3455 | |
3456 case $host_os in | |
3457 cygwin* | mingw* | pw32* | os2*) | |
3458 cat <<'EOF' >> "${ofile}T" | |
3459 # This is a source program that is used to create dlls on Windows | |
3460 # Don't remove nor modify the starting and closing comments | |
3461 # /* ltdll.c starts here */ | |
3462 # #define WIN32_LEAN_AND_MEAN | |
3463 # #include <windows.h> | |
3464 # #undef WIN32_LEAN_AND_MEAN | |
3465 # #include <stdio.h> | |
3466 # | |
3467 # #ifndef __CYGWIN__ | |
3468 # # ifdef __CYGWIN32__ | |
3469 # # define __CYGWIN__ __CYGWIN32__ | |
3470 # # endif | |
3471 # #endif | |
3472 # | |
3473 # #ifdef __cplusplus | |
3474 # extern "C" { | |
3475 # #endif | |
3476 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); | |
3477 # #ifdef __cplusplus | |
3478 # } | |
3479 # #endif | |
3480 # | |
3481 # #ifdef __CYGWIN__ | |
3482 # #include <cygwin/cygwin_dll.h> | |
3483 # DECLARE_CYGWIN_DLL( DllMain ); | |
3484 # #endif | |
3485 # HINSTANCE __hDllInstance_base; | |
3486 # | |
3487 # BOOL APIENTRY | |
3488 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) | |
3489 # { | |
3490 # __hDllInstance_base = hInst; | |
3491 # return TRUE; | |
3492 # } | |
3493 # /* ltdll.c ends here */ | |
3494 # This is a source program that is used to create import libraries | |
3495 # on Windows for dlls which lack them. Don't remove nor modify the | |
3496 # starting and closing comments | |
3497 # /* impgen.c starts here */ | |
3498 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. | |
3499 # | |
3500 # This file is part of GNU libtool. | |
3501 # | |
3502 # This program is free software; you can redistribute it and/or modify | |
3503 # it under the terms of the GNU General Public License as published by | |
3504 # the Free Software Foundation; either version 2 of the License, or | |
3505 # (at your option) any later version. | |
3506 # | |
3507 # This program is distributed in the hope that it will be useful, | |
3508 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
3509 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
3510 # GNU General Public License for more details. | |
3511 # | |
3512 # You should have received a copy of the GNU General Public License | |
3513 # along with this program; if not, write to the Free Software | |
3514 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
3515 # */ | |
3516 # | |
3517 # #include <stdio.h> /* for printf() */ | |
3518 # #include <unistd.h> /* for open(), lseek(), read() */ | |
3519 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */ | |
3520 # #include <string.h> /* for strdup() */ | |
3521 # | |
3522 # /* O_BINARY isn't required (or even defined sometimes) under Unix */ | |
3523 # #ifndef O_BINARY | |
3524 # #define O_BINARY 0 | |
3525 # #endif | |
3526 # | |
3527 # static unsigned int | |
3528 # pe_get16 (fd, offset) | |
3529 # int fd; | |
3530 # int offset; | |
3531 # { | |
3532 # unsigned char b[2]; | |
3533 # lseek (fd, offset, SEEK_SET); | |
3534 # read (fd, b, 2); | |
3535 # return b[0] + (b[1]<<8); | |
3536 # } | |
3537 # | |
3538 # static unsigned int | |
3539 # pe_get32 (fd, offset) | |
3540 # int fd; | |
3541 # int offset; | |
3542 # { | |
3543 # unsigned char b[4]; | |
3544 # lseek (fd, offset, SEEK_SET); | |
3545 # read (fd, b, 4); | |
3546 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); | |
3547 # } | |
3548 # | |
3549 # static unsigned int | |
3550 # pe_as32 (ptr) | |
3551 # void *ptr; | |
3552 # { | |
3553 # unsigned char *b = ptr; | |
3554 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); | |
3555 # } | |
3556 # | |
3557 # int | |
3558 # main (argc, argv) | |
3559 # int argc; | |
3560 # char *argv[]; | |
3561 # { | |
3562 # int dll; | |
3563 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; | |
3564 # unsigned long export_rva, export_size, nsections, secptr, expptr; | |
3565 # unsigned long name_rvas, nexp; | |
3566 # unsigned char *expdata, *erva; | |
3567 # char *filename, *dll_name; | |
3568 # | |
3569 # filename = argv[1]; | |
3570 # | |
3571 # dll = open(filename, O_RDONLY|O_BINARY); | |
3572 # if (dll < 1) | |
3573 # return 1; | |
3574 # | |
3575 # dll_name = filename; | |
3576 # | |
3577 # for (i=0; filename[i]; i++) | |
3578 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') | |
3579 # dll_name = filename + i +1; | |
3580 # | |
3581 # pe_header_offset = pe_get32 (dll, 0x3c); | |
3582 # opthdr_ofs = pe_header_offset + 4 + 20; | |
3583 # num_entries = pe_get32 (dll, opthdr_ofs + 92); | |
3584 # | |
3585 # if (num_entries < 1) /* no exports */ | |
3586 # return 1; | |
3587 # | |
3588 # export_rva = pe_get32 (dll, opthdr_ofs + 96); | |
3589 # export_size = pe_get32 (dll, opthdr_ofs + 100); | |
3590 # nsections = pe_get16 (dll, pe_header_offset + 4 +2); | |
3591 # secptr = (pe_header_offset + 4 + 20 + | |
3592 # pe_get16 (dll, pe_header_offset + 4 + 16)); | |
3593 # | |
3594 # expptr = 0; | |
3595 # for (i = 0; i < nsections; i++) | |
3596 # { | |
3597 # char sname[8]; | |
3598 # unsigned long secptr1 = secptr + 40 * i; | |
3599 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); | |
3600 # unsigned long vsize = pe_get32 (dll, secptr1 + 16); | |
3601 # unsigned long fptr = pe_get32 (dll, secptr1 + 20); | |
3602 # lseek(dll, secptr1, SEEK_SET); | |
3603 # read(dll, sname, 8); | |
3604 # if (vaddr <= export_rva && vaddr+vsize > export_rva) | |
3605 # { | |
3606 # expptr = fptr + (export_rva - vaddr); | |
3607 # if (export_rva + export_size > vaddr + vsize) | |
3608 # export_size = vsize - (export_rva - vaddr); | |
3609 # break; | |
3610 # } | |
3611 # } | |
3612 # | |
3613 # expdata = (unsigned char*)malloc(export_size); | |
3614 # lseek (dll, expptr, SEEK_SET); | |
3615 # read (dll, expdata, export_size); | |
3616 # erva = expdata - export_rva; | |
3617 # | |
3618 # nexp = pe_as32 (expdata+24); | |
3619 # name_rvas = pe_as32 (expdata+32); | |
3620 # | |
3621 # printf ("EXPORTS\n"); | |
3622 # for (i = 0; i<nexp; i++) | |
3623 # { | |
3624 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); | |
3625 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); | |
3626 # } | |
3627 # | |
3628 # return 0; | |
3629 # } | |
3630 # /* impgen.c ends here */ | |
3631 | |
3632 EOF | |
3633 ;; | |
3634 esac | |
3635 | |
3636 # We use sed instead of cat because bash on DJGPP gets confused if | |
3637 # if finds mixed CR/LF and LF-only lines. Since sed operates in | |
3638 # text mode, it properly converts lines to CR/LF. This bash problem | |
3639 # is reportedly fixed, but why not run on old versions too? | |
3640 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) | |
3641 | |
3642 mv -f "${ofile}T" "$ofile" || \ | |
3643 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") | |
3644 chmod +x "$ofile" | |
3645 fi | |
3646 ## | |
3647 ## END FIXME | |
3648 | |
3649 ])# _LT_AC_LTCONFIG_HACK | |
802 | 3650 |
803 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support | 3651 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support |
804 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) | 3652 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) |
805 | 3653 |
806 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's | 3654 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's |
807 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) | 3655 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) |
808 | 3656 |
809 # AC_ENABLE_SHARED - implement the --enable-shared flag | 3657 # AC_ENABLE_SHARED - implement the --enable-shared flag |
810 # Usage: AC_ENABLE_SHARED[(DEFAULT)] | 3658 # Usage: AC_ENABLE_SHARED[(DEFAULT)] |
811 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | 3659 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
812 # `yes'. | 3660 # `yes'. |
813 AC_DEFUN(AC_ENABLE_SHARED, [dnl | 3661 AC_DEFUN([AC_ENABLE_SHARED], |
814 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl | 3662 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
815 AC_ARG_ENABLE(shared, | 3663 AC_ARG_ENABLE(shared, |
816 changequote(<<, >>)dnl | 3664 changequote(<<, >>)dnl |
817 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], | 3665 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], |
818 changequote([, ])dnl | 3666 changequote([, ])dnl |
819 [p=${PACKAGE-default} | 3667 [p=${PACKAGE-default} |
820 case "$enableval" in | 3668 case $enableval in |
821 yes) enable_shared=yes ;; | 3669 yes) enable_shared=yes ;; |
822 no) enable_shared=no ;; | 3670 no) enable_shared=no ;; |
823 *) | 3671 *) |
824 enable_shared=no | 3672 enable_shared=no |
825 # Look at the argument we got. We use all the common list separators. | 3673 # Look at the argument we got. We use all the common list separators. |
834 esac], | 3682 esac], |
835 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl | 3683 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
836 ]) | 3684 ]) |
837 | 3685 |
838 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared | 3686 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared |
839 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | 3687 AC_DEFUN([AC_DISABLE_SHARED], |
3688 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
840 AC_ENABLE_SHARED(no)]) | 3689 AC_ENABLE_SHARED(no)]) |
841 | 3690 |
842 # AC_ENABLE_STATIC - implement the --enable-static flag | 3691 # AC_ENABLE_STATIC - implement the --enable-static flag |
843 # Usage: AC_ENABLE_STATIC[(DEFAULT)] | 3692 # Usage: AC_ENABLE_STATIC[(DEFAULT)] |
844 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | 3693 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
845 # `yes'. | 3694 # `yes'. |
846 AC_DEFUN(AC_ENABLE_STATIC, [dnl | 3695 AC_DEFUN([AC_ENABLE_STATIC], |
847 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl | 3696 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
848 AC_ARG_ENABLE(static, | 3697 AC_ARG_ENABLE(static, |
849 changequote(<<, >>)dnl | 3698 changequote(<<, >>)dnl |
850 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], | 3699 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], |
851 changequote([, ])dnl | 3700 changequote([, ])dnl |
852 [p=${PACKAGE-default} | 3701 [p=${PACKAGE-default} |
853 case "$enableval" in | 3702 case $enableval in |
854 yes) enable_static=yes ;; | 3703 yes) enable_static=yes ;; |
855 no) enable_static=no ;; | 3704 no) enable_static=no ;; |
856 *) | 3705 *) |
857 enable_static=no | 3706 enable_static=no |
858 # Look at the argument we got. We use all the common list separators. | 3707 # Look at the argument we got. We use all the common list separators. |
867 esac], | 3716 esac], |
868 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl | 3717 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
869 ]) | 3718 ]) |
870 | 3719 |
871 # AC_DISABLE_STATIC - set the default static flag to --disable-static | 3720 # AC_DISABLE_STATIC - set the default static flag to --disable-static |
872 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | 3721 AC_DEFUN([AC_DISABLE_STATIC], |
3722 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
873 AC_ENABLE_STATIC(no)]) | 3723 AC_ENABLE_STATIC(no)]) |
874 | 3724 |
875 | 3725 |
876 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag | 3726 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag |
877 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] | 3727 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] |
878 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | 3728 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
879 # `yes'. | 3729 # `yes'. |
880 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl | 3730 AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
881 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl | 3731 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
882 AC_ARG_ENABLE(fast-install, | 3732 AC_ARG_ENABLE(fast-install, |
883 changequote(<<, >>)dnl | 3733 changequote(<<, >>)dnl |
884 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], | 3734 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], |
885 changequote([, ])dnl | 3735 changequote([, ])dnl |
886 [p=${PACKAGE-default} | 3736 [p=${PACKAGE-default} |
887 case "$enableval" in | 3737 case $enableval in |
888 yes) enable_fast_install=yes ;; | 3738 yes) enable_fast_install=yes ;; |
889 no) enable_fast_install=no ;; | 3739 no) enable_fast_install=no ;; |
890 *) | 3740 *) |
891 enable_fast_install=no | 3741 enable_fast_install=no |
892 # Look at the argument we got. We use all the common list separators. | 3742 # Look at the argument we got. We use all the common list separators. |
900 ;; | 3750 ;; |
901 esac], | 3751 esac], |
902 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl | 3752 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl |
903 ]) | 3753 ]) |
904 | 3754 |
905 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install | 3755 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install |
906 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | 3756 AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
3757 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
907 AC_ENABLE_FAST_INSTALL(no)]) | 3758 AC_ENABLE_FAST_INSTALL(no)]) |
908 | 3759 |
3760 # AC_LIBTOOL_PICMODE - implement the --with-pic flag | |
3761 # Usage: AC_LIBTOOL_PICMODE[(MODE)] | |
3762 # Where MODE is either `yes' or `no'. If omitted, it defaults to | |
3763 # `both'. | |
3764 AC_DEFUN([AC_LIBTOOL_PICMODE], | |
3765 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
3766 pic_mode=ifelse($#,1,$1,default)]) | |
3767 | |
3768 | |
3769 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library | |
3770 AC_DEFUN([AC_PATH_TOOL_PREFIX], | |
3771 [AC_MSG_CHECKING([for $1]) | |
3772 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, | |
3773 [case $MAGIC_CMD in | |
3774 /*) | |
3775 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | |
3776 ;; | |
3777 ?:/*) | |
3778 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. | |
3779 ;; | |
3780 *) | |
3781 ac_save_MAGIC_CMD="$MAGIC_CMD" | |
3782 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3783 dnl $ac_dummy forces splitting on constant user-supplied paths. | |
3784 dnl POSIX.2 word splitting is done only on the output of word expansions, | |
3785 dnl not every word. This closes a longstanding sh security hole. | |
3786 ac_dummy="ifelse([$2], , $PATH, [$2])" | |
3787 for ac_dir in $ac_dummy; do | |
3788 test -z "$ac_dir" && ac_dir=. | |
3789 if test -f $ac_dir/$1; then | |
3790 lt_cv_path_MAGIC_CMD="$ac_dir/$1" | |
3791 if test -n "$file_magic_test_file"; then | |
3792 case $deplibs_check_method in | |
3793 "file_magic "*) | |
3794 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" | |
3795 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
3796 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | |
3797 egrep "$file_magic_regex" > /dev/null; then | |
3798 : | |
3799 else | |
3800 cat <<EOF 1>&2 | |
3801 | |
3802 *** Warning: the command libtool uses to detect shared libraries, | |
3803 *** $file_magic_cmd, produces output that libtool cannot recognize. | |
3804 *** The result is that libtool may fail to recognize shared libraries | |
3805 *** as such. This will affect the creation of libtool libraries that | |
3806 *** depend on shared libraries, but programs linked with such libtool | |
3807 *** libraries will work regardless of this problem. Nevertheless, you | |
3808 *** may want to report the problem to your system manager and/or to | |
3809 *** bug-libtool@gnu.org | |
3810 | |
3811 EOF | |
3812 fi ;; | |
3813 esac | |
3814 fi | |
3815 break | |
3816 fi | |
3817 done | |
3818 IFS="$ac_save_ifs" | |
3819 MAGIC_CMD="$ac_save_MAGIC_CMD" | |
3820 ;; | |
3821 esac]) | |
3822 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
3823 if test -n "$MAGIC_CMD"; then | |
3824 AC_MSG_RESULT($MAGIC_CMD) | |
3825 else | |
3826 AC_MSG_RESULT(no) | |
3827 fi | |
3828 ]) | |
3829 | |
3830 | |
3831 # AC_PATH_MAGIC - find a file program which can recognise a shared library | |
3832 AC_DEFUN([AC_PATH_MAGIC], | |
3833 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl | |
3834 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) | |
3835 if test -z "$lt_cv_path_MAGIC_CMD"; then | |
3836 if test -n "$ac_tool_prefix"; then | |
3837 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) | |
3838 else | |
3839 MAGIC_CMD=: | |
3840 fi | |
3841 fi | |
3842 ]) | |
3843 | |
3844 | |
909 # AC_PROG_LD - find the path to the GNU or non-GNU linker | 3845 # AC_PROG_LD - find the path to the GNU or non-GNU linker |
910 AC_DEFUN(AC_PROG_LD, | 3846 AC_DEFUN([AC_PROG_LD], |
911 [AC_ARG_WITH(gnu-ld, | 3847 [AC_ARG_WITH(gnu-ld, |
912 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], | 3848 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
913 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) | 3849 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
914 AC_REQUIRE([AC_PROG_CC])dnl | 3850 AC_REQUIRE([AC_PROG_CC])dnl |
915 AC_REQUIRE([AC_CANONICAL_HOST])dnl | 3851 AC_REQUIRE([AC_CANONICAL_HOST])dnl |
916 AC_REQUIRE([AC_CANONICAL_BUILD])dnl | 3852 AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
3853 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl | |
917 ac_prog=ld | 3854 ac_prog=ld |
918 if test "$ac_cv_prog_gcc" = yes; then | 3855 if test "$GCC" = yes; then |
919 # Check if gcc -print-prog-name=ld gives a path. | 3856 # Check if gcc -print-prog-name=ld gives a path. |
920 AC_MSG_CHECKING([for ld used by GCC]) | 3857 AC_MSG_CHECKING([for ld used by GCC]) |
921 ac_prog=`($CC -print-prog-name=ld) 2>&5` | 3858 case $host in |
922 case "$ac_prog" in | 3859 *-*-mingw*) |
3860 # gcc leaves a trailing carriage return which upsets mingw | |
3861 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
3862 *) | |
3863 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
3864 esac | |
3865 case $ac_prog in | |
923 # Accept absolute paths. | 3866 # Accept absolute paths. |
924 changequote(,)dnl | 3867 [[\\/]]* | [[A-Za-z]]:[[\\/]]*) |
925 [\\/]* | [A-Za-z]:[\\/]*) | 3868 re_direlt='/[[^/]][[^/]]*/\.\./' |
926 re_direlt='/[^/][^/]*/\.\./' | |
927 changequote([,])dnl | |
928 # Canonicalize the path of ld | 3869 # Canonicalize the path of ld |
929 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | 3870 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
930 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | 3871 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
931 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | 3872 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
932 done | 3873 done |
944 elif test "$with_gnu_ld" = yes; then | 3885 elif test "$with_gnu_ld" = yes; then |
945 AC_MSG_CHECKING([for GNU ld]) | 3886 AC_MSG_CHECKING([for GNU ld]) |
946 else | 3887 else |
947 AC_MSG_CHECKING([for non-GNU ld]) | 3888 AC_MSG_CHECKING([for non-GNU ld]) |
948 fi | 3889 fi |
949 AC_CACHE_VAL(ac_cv_path_LD, | 3890 AC_CACHE_VAL(lt_cv_path_LD, |
950 [if test -z "$LD"; then | 3891 [if test -z "$LD"; then |
951 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | 3892 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
952 for ac_dir in $PATH; do | 3893 for ac_dir in $PATH; do |
953 test -z "$ac_dir" && ac_dir=. | 3894 test -z "$ac_dir" && ac_dir=. |
954 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | 3895 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
955 ac_cv_path_LD="$ac_dir/$ac_prog" | 3896 lt_cv_path_LD="$ac_dir/$ac_prog" |
956 # Check to see if the program is GNU ld. I'd rather use --version, | 3897 # Check to see if the program is GNU ld. I'd rather use --version, |
957 # but apparently some GNU ld's only accept -v. | 3898 # but apparently some GNU ld's only accept -v. |
958 # Break only if it was the GNU/non-GNU ld that we prefer. | 3899 # Break only if it was the GNU/non-GNU ld that we prefer. |
959 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | 3900 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
960 test "$with_gnu_ld" != no && break | 3901 test "$with_gnu_ld" != no && break |
961 else | 3902 else |
962 test "$with_gnu_ld" != yes && break | 3903 test "$with_gnu_ld" != yes && break |
963 fi | 3904 fi |
964 fi | 3905 fi |
965 done | 3906 done |
966 IFS="$ac_save_ifs" | 3907 IFS="$ac_save_ifs" |
967 else | 3908 else |
968 ac_cv_path_LD="$LD" # Let the user override the test with a path. | 3909 lt_cv_path_LD="$LD" # Let the user override the test with a path. |
969 fi]) | 3910 fi]) |
970 LD="$ac_cv_path_LD" | 3911 LD="$lt_cv_path_LD" |
971 if test -n "$LD"; then | 3912 if test -n "$LD"; then |
972 AC_MSG_RESULT($LD) | 3913 AC_MSG_RESULT($LD) |
973 else | 3914 else |
974 AC_MSG_RESULT(no) | 3915 AC_MSG_RESULT(no) |
975 fi | 3916 fi |
976 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | 3917 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
977 AC_PROG_LD_GNU | 3918 AC_PROG_LD_GNU |
978 ]) | 3919 ]) |
979 | 3920 |
980 AC_DEFUN(AC_PROG_LD_GNU, | 3921 # AC_PROG_LD_GNU - |
981 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, | 3922 AC_DEFUN([AC_PROG_LD_GNU], |
3923 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, | |
982 [# I'd rather use --version here, but apparently some GNU ld's only accept -v. | 3924 [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
983 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | 3925 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
984 ac_cv_prog_gnu_ld=yes | 3926 lt_cv_prog_gnu_ld=yes |
985 else | 3927 else |
986 ac_cv_prog_gnu_ld=no | 3928 lt_cv_prog_gnu_ld=no |
987 fi]) | 3929 fi]) |
3930 with_gnu_ld=$lt_cv_prog_gnu_ld | |
988 ]) | 3931 ]) |
989 | 3932 |
3933 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker | |
3934 # -- PORTME Some linkers may need a different reload flag. | |
3935 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], | |
3936 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, | |
3937 [lt_cv_ld_reload_flag='-r']) | |
3938 reload_flag=$lt_cv_ld_reload_flag | |
3939 test -n "$reload_flag" && reload_flag=" $reload_flag" | |
3940 ]) | |
3941 | |
3942 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies | |
3943 # -- PORTME fill in with the dynamic library characteristics | |
3944 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], | |
3945 [AC_CACHE_CHECK([how to recognise dependant libraries], | |
3946 lt_cv_deplibs_check_method, | |
3947 [lt_cv_file_magic_cmd='$MAGIC_CMD' | |
3948 lt_cv_file_magic_test_file= | |
3949 lt_cv_deplibs_check_method='unknown' | |
3950 # Need to set the preceding variable on all platforms that support | |
3951 # interlibrary dependencies. | |
3952 # 'none' -- dependencies not supported. | |
3953 # `unknown' -- same as none, but documents that we really don't know. | |
3954 # 'pass_all' -- all dependencies passed with no checks. | |
3955 # 'test_compile' -- check by making test program. | |
3956 # 'file_magic [[regex]]' -- check by looking for files in library path | |
3957 # which responds to the $file_magic_cmd with a given egrep regex. | |
3958 # If you have `file' or equivalent on your system and you're not sure | |
3959 # whether `pass_all' will *always* work, you probably want this one. | |
3960 | |
3961 case $host_os in | |
3962 aix4* | aix5*) | |
3963 lt_cv_deplibs_check_method=pass_all | |
3964 ;; | |
3965 | |
3966 beos*) | |
3967 lt_cv_deplibs_check_method=pass_all | |
3968 ;; | |
3969 | |
3970 bsdi4*) | |
3971 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' | |
3972 lt_cv_file_magic_cmd='/usr/bin/file -L' | |
3973 lt_cv_file_magic_test_file=/shlib/libc.so | |
3974 ;; | |
3975 | |
3976 cygwin* | mingw* | pw32*) | |
3977 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | |
3978 lt_cv_file_magic_cmd='$OBJDUMP -f' | |
3979 ;; | |
3980 | |
3981 darwin* | rhapsody*) | |
3982 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' | |
3983 lt_cv_file_magic_cmd='/usr/bin/file -L' | |
3984 case "$host_os" in | |
3985 rhapsody* | darwin1.[[012]]) | |
3986 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` | |
3987 ;; | |
3988 *) # Darwin 1.3 on | |
3989 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' | |
3990 ;; | |
3991 esac | |
3992 ;; | |
3993 | |
3994 freebsd*) | |
3995 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | |
3996 case $host_cpu in | |
3997 i*86 ) | |
3998 # Not sure whether the presence of OpenBSD here was a mistake. | |
3999 # Let's accept both of them until this is cleared up. | |
4000 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' | |
4001 lt_cv_file_magic_cmd=/usr/bin/file | |
4002 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | |
4003 ;; | |
4004 esac | |
4005 else | |
4006 lt_cv_deplibs_check_method=pass_all | |
4007 fi | |
4008 ;; | |
4009 | |
4010 gnu*) | |
4011 lt_cv_deplibs_check_method=pass_all | |
4012 ;; | |
4013 | |
4014 hpux10.20*|hpux11*) | |
4015 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' | |
4016 lt_cv_file_magic_cmd=/usr/bin/file | |
4017 lt_cv_file_magic_test_file=/usr/lib/libc.sl | |
4018 ;; | |
4019 | |
4020 irix5* | irix6*) | |
4021 case $host_os in | |
4022 irix5*) | |
4023 # this will be overridden with pass_all, but let us keep it just in case | |
4024 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" | |
4025 ;; | |
4026 *) | |
4027 case $LD in | |
4028 *-32|*"-32 ") libmagic=32-bit;; | |
4029 *-n32|*"-n32 ") libmagic=N32;; | |
4030 *-64|*"-64 ") libmagic=64-bit;; | |
4031 *) libmagic=never-match;; | |
4032 esac | |
4033 # this will be overridden with pass_all, but let us keep it just in case | |
4034 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" | |
4035 ;; | |
4036 esac | |
4037 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` | |
4038 lt_cv_deplibs_check_method=pass_all | |
4039 ;; | |
4040 | |
4041 # This must be Linux ELF. | |
4042 linux-gnu*) | |
4043 case $host_cpu in | |
4044 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) | |
4045 lt_cv_deplibs_check_method=pass_all ;; | |
4046 *) | |
4047 # glibc up to 2.1.1 does not perform some relocations on ARM | |
4048 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; | |
4049 esac | |
4050 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` | |
4051 ;; | |
4052 | |
4053 netbsd*) | |
4054 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | |
4055 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' | |
4056 else | |
4057 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' | |
4058 fi | |
4059 ;; | |
4060 | |
4061 newos6*) | |
4062 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' | |
4063 lt_cv_file_magic_cmd=/usr/bin/file | |
4064 lt_cv_file_magic_test_file=/usr/lib/libnls.so | |
4065 ;; | |
4066 | |
4067 openbsd*) | |
4068 lt_cv_file_magic_cmd=/usr/bin/file | |
4069 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | |
4070 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
4071 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' | |
4072 else | |
4073 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' | |
4074 fi | |
4075 ;; | |
4076 | |
4077 osf3* | osf4* | osf5*) | |
4078 # this will be overridden with pass_all, but let us keep it just in case | |
4079 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' | |
4080 lt_cv_file_magic_test_file=/shlib/libc.so | |
4081 lt_cv_deplibs_check_method=pass_all | |
4082 ;; | |
4083 | |
4084 sco3.2v5*) | |
4085 lt_cv_deplibs_check_method=pass_all | |
4086 ;; | |
4087 | |
4088 solaris*) | |
4089 lt_cv_deplibs_check_method=pass_all | |
4090 lt_cv_file_magic_test_file=/lib/libc.so | |
4091 ;; | |
4092 | |
4093 sysv5uw[[78]]* | sysv4*uw2*) | |
4094 lt_cv_deplibs_check_method=pass_all | |
4095 ;; | |
4096 | |
4097 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
4098 case $host_vendor in | |
4099 motorola) | |
4100 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]]' | |
4101 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | |
4102 ;; | |
4103 ncr) | |
4104 lt_cv_deplibs_check_method=pass_all | |
4105 ;; | |
4106 sequent) | |
4107 lt_cv_file_magic_cmd='/bin/file' | |
4108 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' | |
4109 ;; | |
4110 sni) | |
4111 lt_cv_file_magic_cmd='/bin/file' | |
4112 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" | |
4113 lt_cv_file_magic_test_file=/lib/libc.so | |
4114 ;; | |
4115 esac | |
4116 ;; | |
4117 esac | |
4118 ]) | |
4119 file_magic_cmd=$lt_cv_file_magic_cmd | |
4120 deplibs_check_method=$lt_cv_deplibs_check_method | |
4121 ]) | |
4122 | |
4123 | |
990 # AC_PROG_NM - find the path to a BSD-compatible name lister | 4124 # AC_PROG_NM - find the path to a BSD-compatible name lister |
991 AC_DEFUN(AC_PROG_NM, | 4125 AC_DEFUN([AC_PROG_NM], |
992 [AC_MSG_CHECKING([for BSD-compatible nm]) | 4126 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
993 AC_CACHE_VAL(ac_cv_path_NM, | 4127 AC_MSG_CHECKING([for BSD-compatible nm]) |
4128 AC_CACHE_VAL(lt_cv_path_NM, | |
994 [if test -n "$NM"; then | 4129 [if test -n "$NM"; then |
995 # Let the user override the test. | 4130 # Let the user override the test. |
996 ac_cv_path_NM="$NM" | 4131 lt_cv_path_NM="$NM" |
997 else | 4132 else |
998 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | 4133 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
999 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do | 4134 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
1000 test -z "$ac_dir" && ac_dir=. | 4135 test -z "$ac_dir" && ac_dir=. |
1001 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then | 4136 tmp_nm=$ac_dir/${ac_tool_prefix}nm |
4137 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then | |
1002 # Check to see if the nm accepts a BSD-compat flag. | 4138 # Check to see if the nm accepts a BSD-compat flag. |
1003 # Adding the `sed 1q' prevents false positives on HP-UX, which says: | 4139 # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
1004 # nm: unknown option "B" ignored | 4140 # nm: unknown option "B" ignored |
1005 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then | 4141 # Tru64's nm complains that /dev/null is an invalid object file |
1006 ac_cv_path_NM="$ac_dir/nm -B" | 4142 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then |
4143 lt_cv_path_NM="$tmp_nm -B" | |
1007 break | 4144 break |
1008 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then | 4145 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
1009 ac_cv_path_NM="$ac_dir/nm -p" | 4146 lt_cv_path_NM="$tmp_nm -p" |
1010 break | 4147 break |
1011 else | 4148 else |
1012 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but | 4149 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
1013 continue # so that we can try to find one that supports BSD flags | 4150 continue # so that we can try to find one that supports BSD flags |
1014 fi | 4151 fi |
1015 fi | 4152 fi |
1016 done | 4153 done |
1017 IFS="$ac_save_ifs" | 4154 IFS="$ac_save_ifs" |
1018 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm | 4155 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
1019 fi]) | 4156 fi]) |
1020 NM="$ac_cv_path_NM" | 4157 NM="$lt_cv_path_NM" |
1021 AC_MSG_RESULT([$NM]) | 4158 AC_MSG_RESULT([$NM]) |
1022 ]) | 4159 ]) |
1023 | 4160 |
1024 # AC_CHECK_LIBM - check for math library | 4161 # AC_CHECK_LIBM - check for math library |
1025 AC_DEFUN(AC_CHECK_LIBM, | 4162 AC_DEFUN([AC_CHECK_LIBM], |
1026 [AC_REQUIRE([AC_CANONICAL_HOST])dnl | 4163 [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
1027 LIBM= | 4164 LIBM= |
1028 case "$lt_target" in | 4165 case $host in |
1029 *-*-beos* | *-*-cygwin*) | 4166 *-*-beos* | *-*-cygwin* | *-*-pw32*) |
1030 # These system don't have libm | 4167 # These system don't have libm |
1031 ;; | 4168 ;; |
1032 *-ncr-sysv4.3*) | 4169 *-ncr-sysv4.3*) |
1033 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") | 4170 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
1034 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") | 4171 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") |
1047 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed | 4184 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed |
1048 # with '${top_builddir}/' and INCLTDL will be prefixed with | 4185 # with '${top_builddir}/' and INCLTDL will be prefixed with |
1049 # '${top_srcdir}/' (note the single quotes!). If your package is not | 4186 # '${top_srcdir}/' (note the single quotes!). If your package is not |
1050 # flat and you're not using automake, define top_builddir and | 4187 # flat and you're not using automake, define top_builddir and |
1051 # top_srcdir appropriately in the Makefiles. | 4188 # top_srcdir appropriately in the Makefiles. |
1052 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | 4189 AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
1053 case "$enable_ltdl_convenience" in | 4190 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
4191 case $enable_ltdl_convenience in | |
1054 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; | 4192 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
1055 "") enable_ltdl_convenience=yes | 4193 "") enable_ltdl_convenience=yes |
1056 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; | 4194 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
1057 esac | 4195 esac |
1058 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la | 4196 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
1068 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed | 4206 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed |
1069 # with '${top_srcdir}/' (note the single quotes!). If your package is | 4207 # with '${top_srcdir}/' (note the single quotes!). If your package is |
1070 # not flat and you're not using automake, define top_builddir and | 4208 # not flat and you're not using automake, define top_builddir and |
1071 # top_srcdir appropriately in the Makefiles. | 4209 # top_srcdir appropriately in the Makefiles. |
1072 # In the future, this macro may have to be called after AC_PROG_LIBTOOL. | 4210 # In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
1073 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | 4211 AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
4212 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
1074 AC_CHECK_LIB(ltdl, main, | 4213 AC_CHECK_LIB(ltdl, main, |
1075 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], | 4214 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
1076 [if test x"$enable_ltdl_install" = xno; then | 4215 [if test x"$enable_ltdl_install" = xno; then |
1077 AC_MSG_WARN([libltdl not installed, but installation disabled]) | 4216 AC_MSG_WARN([libltdl not installed, but installation disabled]) |
1078 else | 4217 else |
1088 LIBLTDL="-lltdl" | 4227 LIBLTDL="-lltdl" |
1089 INCLTDL= | 4228 INCLTDL= |
1090 fi | 4229 fi |
1091 ]) | 4230 ]) |
1092 | 4231 |
1093 dnl old names | 4232 # old names |
1094 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl | 4233 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
1095 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl | 4234 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
1096 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl | 4235 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
1097 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl | 4236 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
1098 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl | 4237 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
1099 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl | 4238 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) |
1100 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl | 4239 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) |
1101 | 4240 |
1102 dnl This is just to silence aclocal about the macro not being used | 4241 # This is just to silence aclocal about the macro not being used |
1103 ifelse([AC_DISABLE_FAST_INSTALL])dnl | 4242 ifelse([AC_DISABLE_FAST_INSTALL]) |