~siretart/gxine/bug.542506

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Siggi Langauf
  • Date: 2005-01-05 01:49:18 UTC
  • mto: (2.1.1 etch) (1.1.9 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20050105014918-wgldiqcd79ck2b0v
Tags: upstream-0.4.1
ImportĀ upstreamĀ versionĀ 0.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
898
898
  ]
899
899
)
900
900
 
901
 
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
902
 
 
903
 
# serial 46 AC_PROG_LIBTOOL
904
 
 
 
901
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
902
 
 
903
# serial 47 AC_PROG_LIBTOOL
 
904
# Debian $Rev: 214 $
 
905
 
 
906
 
 
907
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
 
908
# -----------------------------------------------------------
 
909
# If this macro is not defined by Autoconf, define it here.
 
910
m4_ifdef([AC_PROVIDE_IFELSE],
 
911
         [],
 
912
         [m4_define([AC_PROVIDE_IFELSE],
 
913
                 [m4_ifdef([AC_PROVIDE_$1],
 
914
                           [$2], [$3])])])
 
915
 
 
916
 
 
917
# AC_PROG_LIBTOOL
 
918
# ---------------
905
919
AC_DEFUN([AC_PROG_LIBTOOL],
 
920
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
 
921
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
 
922
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
 
923
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
924
    [AC_LIBTOOL_CXX],
 
925
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
 
926
  ])])
 
927
dnl And a similar setup for Fortran 77 support
 
928
  AC_PROVIDE_IFELSE([AC_PROG_F77],
 
929
    [AC_LIBTOOL_F77],
 
930
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
 
931
])])
 
932
 
 
933
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
 
934
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
 
935
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
 
936
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
937
    [AC_LIBTOOL_GCJ],
 
938
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
939
      [AC_LIBTOOL_GCJ],
 
940
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
 
941
        [AC_LIBTOOL_GCJ],
 
942
      [ifdef([AC_PROG_GCJ],
 
943
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
944
       ifdef([A][M_PROG_GCJ],
 
945
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
946
       ifdef([LT_AC_PROG_GCJ],
 
947
             [define([LT_AC_PROG_GCJ],
 
948
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
 
949
])])# AC_PROG_LIBTOOL
 
950
 
 
951
 
 
952
# _AC_PROG_LIBTOOL
 
953
# ----------------
 
954
AC_DEFUN([_AC_PROG_LIBTOOL],
906
955
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
 
956
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
 
957
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
 
958
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
907
959
 
908
960
# This can be used to rebuild libtool when needed
909
961
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
914
966
 
915
967
# Prevent multiple expansion
916
968
define([AC_PROG_LIBTOOL], [])
917
 
])
918
 
 
 
969
])# _AC_PROG_LIBTOOL
 
970
 
 
971
 
 
972
# AC_LIBTOOL_SETUP
 
973
# ----------------
919
974
AC_DEFUN([AC_LIBTOOL_SETUP],
920
 
[AC_PREREQ(2.13)dnl
 
975
[AC_PREREQ(2.50)dnl
921
976
AC_REQUIRE([AC_ENABLE_SHARED])dnl
922
977
AC_REQUIRE([AC_ENABLE_STATIC])dnl
923
978
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
927
982
AC_REQUIRE([AC_PROG_LD])dnl
928
983
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
929
984
AC_REQUIRE([AC_PROG_NM])dnl
930
 
AC_REQUIRE([LT_AC_PROG_SED])dnl
931
985
 
932
986
AC_REQUIRE([AC_PROG_LN_S])dnl
933
987
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 
988
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
934
989
AC_REQUIRE([AC_OBJEXT])dnl
935
990
AC_REQUIRE([AC_EXEEXT])dnl
936
991
dnl
937
992
 
 
993
AC_LIBTOOL_SYS_MAX_CMD_LEN
 
994
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
995
AC_LIBTOOL_OBJDIR
 
996
 
 
997
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
938
998
_LT_AC_PROG_ECHO_BACKSLASH
 
999
 
 
1000
case $host_os in
 
1001
aix3*)
 
1002
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
1003
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
1004
  # vanish in a puff of smoke.
 
1005
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
1006
    COLLECT_NAMES=
 
1007
    export COLLECT_NAMES
 
1008
  fi
 
1009
  ;;
 
1010
esac
 
1011
 
 
1012
# Sed substitution that helps us do robust quoting.  It backslashifies
 
1013
# metacharacters that are still active within double-quoted strings.
 
1014
Xsed='sed -e s/^X//'
 
1015
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
1016
 
 
1017
# Same as above, but do not quote variable references.
 
1018
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
1019
 
 
1020
# Sed substitution to delay expansion of an escaped shell variable in a
 
1021
# double_quote_subst'ed string.
 
1022
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
1023
 
 
1024
# Sed substitution to avoid accidental globbing in evaled expressions
 
1025
no_glob_subst='s/\*/\\\*/g'
 
1026
 
 
1027
# Constants:
 
1028
rm="rm -f"
 
1029
 
 
1030
# Global variables:
 
1031
default_ofile=libtool
 
1032
can_build_shared=yes
 
1033
 
 
1034
# All known linkers require a `.a' archive for static linking (except M$VC,
 
1035
# which needs '.lib').
 
1036
libext=a
 
1037
ltmain="$ac_aux_dir/ltmain.sh"
 
1038
ofile="$default_ofile"
 
1039
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
1040
 
 
1041
AC_CHECK_TOOL(AR, ar, false)
 
1042
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
1043
AC_CHECK_TOOL(STRIP, strip, :)
 
1044
 
 
1045
old_CC="$CC"
 
1046
old_CFLAGS="$CFLAGS"
 
1047
 
 
1048
# Set sane defaults for various variables
 
1049
test -z "$AR" && AR=ar
 
1050
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
1051
test -z "$AS" && AS=as
 
1052
test -z "$CC" && CC=cc
 
1053
test -z "$LTCC" && LTCC=$CC
 
1054
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
1055
test -z "$LD" && LD=ld
 
1056
test -z "$LN_S" && LN_S="ln -s"
 
1057
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
1058
test -z "$NM" && NM=nm
 
1059
test -z "$SED" && SED=sed
 
1060
test -z "$OBJDUMP" && OBJDUMP=objdump
 
1061
test -z "$RANLIB" && RANLIB=:
 
1062
test -z "$STRIP" && STRIP=:
 
1063
test -z "$ac_objext" && ac_objext=o
 
1064
 
 
1065
# Determine commands to create old-style static archives.
 
1066
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
1067
old_postinstall_cmds='chmod 644 $oldlib'
 
1068
old_postuninstall_cmds=
 
1069
 
 
1070
if test -n "$RANLIB"; then
 
1071
  case $host_os in
 
1072
  openbsd*)
 
1073
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
1074
    ;;
 
1075
  *)
 
1076
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
1077
    ;;
 
1078
  esac
 
1079
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
1080
fi
 
1081
 
939
1082
# Only perform the check for file, if the check method requires it
940
1083
case $deplibs_check_method in
941
1084
file_magic*)
945
1088
  ;;
946
1089
esac
947
1090
 
948
 
AC_CHECK_TOOL(RANLIB, ranlib, :)
949
 
AC_CHECK_TOOL(STRIP, strip, :)
950
 
 
951
 
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
952
 
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
 
1091
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 
1092
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
953
1093
enable_win32_dll=yes, enable_win32_dll=no)
954
1094
 
955
 
AC_ARG_ENABLE(libtool-lock,
956
 
  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
 
1095
AC_ARG_ENABLE([libtool-lock],
 
1096
    [AC_HELP_STRING([--disable-libtool-lock],
 
1097
        [avoid locking (might break parallel builds)])])
957
1098
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
958
1099
 
959
 
# Some flags need to be propagated to the compiler or linker for good
960
 
# libtool support.
961
 
case $host in
962
 
*-*-irix6*)
963
 
  # Find out which ABI we are using.
964
 
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
965
 
  if AC_TRY_EVAL(ac_compile); then
966
 
    case `/usr/bin/file conftest.$ac_objext` in
967
 
    *32-bit*)
968
 
      LD="${LD-ld} -32"
969
 
      ;;
970
 
    *N32*)
971
 
      LD="${LD-ld} -n32"
972
 
      ;;
973
 
    *64-bit*)
974
 
      LD="${LD-ld} -64"
975
 
      ;;
976
 
    esac
977
 
  fi
978
 
  rm -rf conftest*
979
 
  ;;
980
 
 
981
 
*-*-sco3.2v5*)
982
 
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
983
 
  SAVE_CFLAGS="$CFLAGS"
984
 
  CFLAGS="$CFLAGS -belf"
985
 
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
986
 
    [AC_LANG_SAVE
987
 
     AC_LANG_C
988
 
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
989
 
     AC_LANG_RESTORE])
990
 
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
991
 
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
992
 
    CFLAGS="$SAVE_CFLAGS"
993
 
  fi
994
 
  ;;
995
 
 
996
 
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
997
 
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
998
 
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
999
 
  AC_CHECK_TOOL(AS, as, false)
1000
 
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1001
 
 
1002
 
  # recent cygwin and mingw systems supply a stub DllMain which the user
1003
 
  # can override, but on older systems we have to supply one
1004
 
  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1005
 
    [AC_TRY_LINK([],
1006
 
      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1007
 
      DllMain (0, 0, 0);],
1008
 
      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1009
 
 
1010
 
  case $host/$CC in
1011
 
  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1012
 
    # old mingw systems require "-dll" to link a DLL, while more recent ones
1013
 
    # require "-mdll"
1014
 
    SAVE_CFLAGS="$CFLAGS"
1015
 
    CFLAGS="$CFLAGS -mdll"
1016
 
    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1017
 
      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1018
 
    CFLAGS="$SAVE_CFLAGS" ;;
1019
 
  *-*-cygwin* | *-*-pw32*)
1020
 
    # cygwin systems need to pass --dll to the linker, and not link
1021
 
    # crt.o which will require a WinMain@16 definition.
1022
 
    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1023
 
  esac
1024
 
  ;;
1025
 
  ])
1026
 
esac
1027
 
 
1028
 
_LT_AC_LTCONFIG_HACK
1029
 
 
1030
 
])
1031
 
 
1032
 
# AC_LIBTOOL_HEADER_ASSERT
1033
 
# ------------------------
1034
 
AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
1035
 
[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
1036
 
    [lt_cv_func_assert_works],
1037
 
    [case $host in
1038
 
    *-*-solaris*)
1039
 
      if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1040
 
        case `$CC --version 2>/dev/null` in
1041
 
        [[12]].*) lt_cv_func_assert_works=no ;;
1042
 
        *)        lt_cv_func_assert_works=yes ;;
1043
 
        esac
1044
 
      fi
1045
 
      ;;
1046
 
    esac])
1047
 
 
1048
 
if test "x$lt_cv_func_assert_works" = xyes; then
1049
 
  AC_CHECK_HEADERS(assert.h)
1050
 
fi
1051
 
])# AC_LIBTOOL_HEADER_ASSERT
1052
 
 
1053
 
# _LT_AC_CHECK_DLFCN
1054
 
# --------------------
1055
 
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1056
 
[AC_CHECK_HEADERS(dlfcn.h)
1057
 
])# _LT_AC_CHECK_DLFCN
1058
 
 
1059
 
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1060
 
# ---------------------------------
1061
 
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1062
 
[AC_REQUIRE([AC_CANONICAL_HOST])
1063
 
AC_REQUIRE([AC_PROG_NM])
1064
 
AC_REQUIRE([AC_OBJEXT])
1065
 
# Check for command to grab the raw symbol name followed by C symbol from nm.
1066
 
AC_MSG_CHECKING([command to parse $NM output])
1067
 
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1068
 
 
1069
 
# These are sane defaults that work on at least a few old systems.
1070
 
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
1071
 
 
1072
 
# Character class describing NM global symbol codes.
1073
 
symcode='[[BCDEGRST]]'
1074
 
 
1075
 
# Regexp to match symbols that can be accessed directly from C.
1076
 
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1077
 
 
1078
 
# Transform the above into a raw symbol and a C symbol.
1079
 
symxfrm='\1 \2\3 \3'
1080
 
 
1081
 
# Transform an extracted symbol line into a proper C declaration
1082
 
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1083
 
 
1084
 
# Transform an extracted symbol line into symbol name and symbol address
1085
 
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'"
1086
 
 
1087
 
# Define system-specific variables.
1088
 
case $host_os in
1089
 
aix*)
1090
 
  symcode='[[BCDT]]'
1091
 
  ;;
1092
 
cygwin* | mingw* | pw32*)
1093
 
  symcode='[[ABCDGISTW]]'
1094
 
  ;;
1095
 
hpux*) # Its linker distinguishes data from code symbols
1096
 
  lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1097
 
  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'"
1098
 
  ;;
1099
 
irix* | nonstopux*)
1100
 
  symcode='[[BCDEGRST]]'
1101
 
  ;;
1102
 
osf*)
1103
 
  symcode='[[BCDEGQRST]]'
1104
 
  ;;
1105
 
solaris* | sysv5*)
1106
 
  symcode='[[BDT]]'
1107
 
  ;;
1108
 
sysv4)
1109
 
  symcode='[[DFNSTU]]'
1110
 
  ;;
1111
 
esac
1112
 
 
1113
 
# Handle CRLF in mingw tool chain
1114
 
opt_cr=
1115
 
case $host_os in
1116
 
mingw*)
1117
 
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1118
 
  ;;
1119
 
esac
1120
 
 
1121
 
# If we're using GNU nm, then use its standard symbol codes.
1122
 
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1123
 
  symcode='[[ABCDGISTW]]'
1124
 
fi
1125
 
 
1126
 
# Try without a prefix undercore, then with it.
1127
 
for ac_symprfx in "" "_"; do
1128
 
 
1129
 
  # Write the raw and C identifiers.
1130
 
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[        ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1131
 
 
1132
 
  # Check to see that the pipe works correctly.
1133
 
  pipe_works=no
1134
 
  rm -f conftest*
1135
 
  cat > conftest.$ac_ext <<EOF
1136
 
#ifdef __cplusplus
1137
 
extern "C" {
1138
 
#endif
1139
 
char nm_test_var;
1140
 
void nm_test_func(){}
1141
 
#ifdef __cplusplus
1142
 
}
1143
 
#endif
1144
 
int main(){nm_test_var='a';nm_test_func();return(0);}
1145
 
EOF
1146
 
 
1147
 
  if AC_TRY_EVAL(ac_compile); then
1148
 
    # Now try to grab the symbols.
1149
 
    nlist=conftest.nm
1150
 
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1151
 
      # Try sorting and uniquifying the output.
1152
 
      if sort "$nlist" | uniq > "$nlist"T; then
1153
 
        mv -f "$nlist"T "$nlist"
1154
 
      else
1155
 
        rm -f "$nlist"T
1156
 
      fi
1157
 
 
1158
 
      # Make sure that we snagged all the symbols we need.
1159
 
      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1160
 
        if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1161
 
          cat <<EOF > conftest.$ac_ext
1162
 
#ifdef __cplusplus
1163
 
extern "C" {
1164
 
#endif
1165
 
 
1166
 
EOF
1167
 
          # Now generate the symbol file.
1168
 
          eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1169
 
 
1170
 
          cat <<EOF >> conftest.$ac_ext
1171
 
#if defined (__STDC__) && __STDC__
1172
 
# define lt_ptr void *
1173
 
#else
1174
 
# define lt_ptr char *
1175
 
# define const
1176
 
#endif
1177
 
 
1178
 
/* The mapping between symbol names and symbols. */
1179
 
const struct {
1180
 
  const char *name;
1181
 
  lt_ptr address;
1182
 
}
1183
 
lt_preloaded_symbols[[]] =
1184
 
{
1185
 
EOF
1186
 
          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1187
 
          cat <<\EOF >> conftest.$ac_ext
1188
 
  {0, (lt_ptr) 0}
1189
 
};
1190
 
 
1191
 
#ifdef __cplusplus
1192
 
}
1193
 
#endif
1194
 
EOF
1195
 
          # Now try linking the two files.
1196
 
          mv conftest.$ac_objext conftstm.$ac_objext
1197
 
          save_LIBS="$LIBS"
1198
 
          save_CFLAGS="$CFLAGS"
1199
 
          LIBS="conftstm.$ac_objext"
1200
 
          CFLAGS="$CFLAGS$no_builtin_flag"
1201
 
          if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
1202
 
            pipe_works=yes
1203
 
          fi
1204
 
          LIBS="$save_LIBS"
1205
 
          CFLAGS="$save_CFLAGS"
1206
 
        else
1207
 
          echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1208
 
        fi
1209
 
      else
1210
 
        echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1211
 
      fi
1212
 
    else
1213
 
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1214
 
    fi
1215
 
  else
1216
 
    echo "$progname: failed program was:" >&AC_FD_CC
1217
 
    cat conftest.$ac_ext >&5
1218
 
  fi
1219
 
  rm -f conftest* conftst*
1220
 
 
1221
 
  # Do not use the global_symbol_pipe unless it works.
1222
 
  if test "$pipe_works" = yes; then
1223
 
    break
1224
 
  else
1225
 
    lt_cv_sys_global_symbol_pipe=
1226
 
  fi
1227
 
done
1228
 
])
1229
 
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1230
 
if test -z "$lt_cv_sys_global_symbol_pipe"; then
1231
 
  global_symbol_to_cdecl=
1232
 
  global_symbol_to_c_name_address=
1233
 
else
1234
 
  global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1235
 
  global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1236
 
fi
1237
 
if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1238
 
then
1239
 
  AC_MSG_RESULT(failed)
1240
 
else
1241
 
  AC_MSG_RESULT(ok)
1242
 
fi
1243
 
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1244
 
 
1245
 
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1246
 
# ---------------------------------
1247
 
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1248
 
[# Find the correct PATH separator.  Usually this is `:', but
1249
 
# DJGPP uses `;' like DOS.
1250
 
if test "X${PATH_SEPARATOR+set}" != Xset; then
1251
 
  UNAME=${UNAME-`uname 2>/dev/null`}
1252
 
  case X$UNAME in
1253
 
    *-DOS) lt_cv_sys_path_separator=';' ;;
1254
 
    *)     lt_cv_sys_path_separator=':' ;;
1255
 
  esac
1256
 
  PATH_SEPARATOR=$lt_cv_sys_path_separator
1257
 
fi
1258
 
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
 
1100
AC_ARG_WITH([pic],
 
1101
    [AC_HELP_STRING([--with-pic],
 
1102
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
1103
    [pic_mode="$withval"],
 
1104
    [pic_mode=default])
 
1105
test -z "$pic_mode" && pic_mode=default
 
1106
 
 
1107
# Use C for the default configuration in the libtool script
 
1108
tagname=
 
1109
AC_LIBTOOL_LANG_C_CONFIG
 
1110
_LT_AC_TAGCONFIG
 
1111
])# AC_LIBTOOL_SETUP
 
1112
 
 
1113
 
 
1114
# _LT_AC_SYS_COMPILER
 
1115
# -------------------
 
1116
AC_DEFUN([_LT_AC_SYS_COMPILER],
 
1117
[AC_REQUIRE([AC_PROG_CC])dnl
 
1118
 
 
1119
# If no C compiler was specified, use CC.
 
1120
LTCC=${LTCC-"$CC"}
 
1121
 
 
1122
# Allow CC to be a program name with arguments.
 
1123
compiler=$CC
 
1124
])# _LT_AC_SYS_COMPILER
 
1125
 
 
1126
 
 
1127
# _LT_AC_SYS_LIBPATH_AIX
 
1128
# ----------------------
 
1129
# Links a minimal program and checks the executable
 
1130
# for the system default hardcoded library path. In most cases,
 
1131
# this is /usr/lib:/lib, but when the MPI compilers are used
 
1132
# the location of the communication and MPI libs are included too.
 
1133
# If we don't find anything, use the default library path according
 
1134
# to the aix ld manual.
 
1135
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
 
1136
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
1137
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
1138
}'`
 
1139
# Check for a 64-bit object if we didn't find anything.
 
1140
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
1141
}'`; fi],[])
 
1142
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
1143
])# _LT_AC_SYS_LIBPATH_AIX
 
1144
 
 
1145
 
 
1146
# _LT_AC_SHELL_INIT(ARG)
 
1147
# ----------------------
 
1148
AC_DEFUN([_LT_AC_SHELL_INIT],
 
1149
[ifdef([AC_DIVERSION_NOTICE],
 
1150
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
1151
         [AC_DIVERT_PUSH(NOTICE)])
 
1152
$1
 
1153
AC_DIVERT_POP
 
1154
])# _LT_AC_SHELL_INIT
 
1155
 
1259
1156
 
1260
1157
# _LT_AC_PROG_ECHO_BACKSLASH
1261
1158
# --------------------------
1262
1159
# Add some code to the start of the generated configure script which
1263
1160
# will find an echo command which doesn't interpret backslashes.
1264
1161
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1265
 
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1266
 
                              [AC_DIVERT_PUSH(NOTICE)])
1267
 
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1268
 
 
 
1162
[_LT_AC_SHELL_INIT([
1269
1163
# Check that we are running under the correct shell.
1270
1164
SHELL=${CONFIG_SHELL-/bin/sh}
1271
1165
 
1283
1177
elif test "X[$]1" = X--fallback-echo; then
1284
1178
  # Avoid inline document here, it may be left over
1285
1179
  :
1286
 
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
 
1180
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1287
1181
  # Yippee, $echo works!
1288
1182
  :
1289
1183
else
1295
1189
  # used as fallback echo
1296
1190
  shift
1297
1191
  cat <<EOF
1298
 
$*
 
1192
[$]*
1299
1193
EOF
1300
1194
  exit 0
1301
1195
fi
1329
1223
  #
1330
1224
  # So, first we look for a working echo in the user's PATH.
1331
1225
 
1332
 
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
1226
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1333
1227
  for dir in $PATH /usr/ucb; do
 
1228
    IFS="$lt_save_ifs"
1334
1229
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1335
1230
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1336
1231
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1339
1234
      break
1340
1235
    fi
1341
1236
  done
1342
 
  IFS="$save_ifs"
 
1237
  IFS="$lt_save_ifs"
1343
1238
 
1344
1239
  if test "X$echo" = Xecho; then
1345
1240
    # We didn't find a better echo, so look for alternatives.
1412
1307
fi
1413
1308
 
1414
1309
AC_SUBST(ECHO)
1415
 
AC_DIVERT_POP
1416
 
])# _LT_AC_PROG_ECHO_BACKSLASH
 
1310
])])# _LT_AC_PROG_ECHO_BACKSLASH
 
1311
 
 
1312
 
 
1313
# _LT_AC_LOCK
 
1314
# -----------
 
1315
AC_DEFUN([_LT_AC_LOCK],
 
1316
[AC_ARG_ENABLE([libtool-lock],
 
1317
    [AC_HELP_STRING([--disable-libtool-lock],
 
1318
        [avoid locking (might break parallel builds)])])
 
1319
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
1320
 
 
1321
# Some flags need to be propagated to the compiler or linker for good
 
1322
# libtool support.
 
1323
case $host in
 
1324
ia64-*-hpux*)
 
1325
  # Find out which ABI we are using.
 
1326
  echo 'int i;' > conftest.$ac_ext
 
1327
  if AC_TRY_EVAL(ac_compile); then
 
1328
    case `/usr/bin/file conftest.$ac_objext` in
 
1329
    *ELF-32*)
 
1330
      HPUX_IA64_MODE="32"
 
1331
      ;;
 
1332
    *ELF-64*)
 
1333
      HPUX_IA64_MODE="64"
 
1334
      ;;
 
1335
    esac
 
1336
  fi
 
1337
  rm -rf conftest*
 
1338
  ;;
 
1339
*-*-irix6*)
 
1340
  # Find out which ABI we are using.
 
1341
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
1342
  if AC_TRY_EVAL(ac_compile); then
 
1343
   if test "$lt_cv_prog_gnu_ld" = yes; then
 
1344
    case `/usr/bin/file conftest.$ac_objext` in
 
1345
    *32-bit*)
 
1346
      LD="${LD-ld} -melf32bsmip"
 
1347
      ;;
 
1348
    *N32*)
 
1349
      LD="${LD-ld} -melf32bmipn32"
 
1350
      ;;
 
1351
    *64-bit*)
 
1352
      LD="${LD-ld} -melf64bmip"
 
1353
      ;;
 
1354
    esac
 
1355
   else
 
1356
    case `/usr/bin/file conftest.$ac_objext` in
 
1357
    *32-bit*)
 
1358
      LD="${LD-ld} -32"
 
1359
      ;;
 
1360
    *N32*)
 
1361
      LD="${LD-ld} -n32"
 
1362
      ;;
 
1363
    *64-bit*)
 
1364
      LD="${LD-ld} -64"
 
1365
      ;;
 
1366
    esac
 
1367
   fi
 
1368
  fi
 
1369
  rm -rf conftest*
 
1370
  ;;
 
1371
 
 
1372
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
 
1373
  # Find out which ABI we are using.
 
1374
  echo 'int i;' > conftest.$ac_ext
 
1375
  if AC_TRY_EVAL(ac_compile); then
 
1376
    case "`/usr/bin/file conftest.o`" in
 
1377
    *32-bit*)
 
1378
      case $host in
 
1379
        x86_64-*linux*)
 
1380
          LD="${LD-ld} -m elf_i386"
 
1381
          ;;
 
1382
        ppc64-*linux*|powerpc64-*linux*)
 
1383
          LD="${LD-ld} -m elf32ppclinux"
 
1384
          ;;
 
1385
        s390x-*linux*)
 
1386
          LD="${LD-ld} -m elf_s390"
 
1387
          ;;
 
1388
        sparc64-*linux*)
 
1389
          LD="${LD-ld} -m elf32_sparc"
 
1390
          ;;
 
1391
      esac
 
1392
      ;;
 
1393
    *64-bit*)
 
1394
      case $host in
 
1395
        x86_64-*linux*)
 
1396
          LD="${LD-ld} -m elf_x86_64"
 
1397
          ;;
 
1398
        ppc*-*linux*|powerpc*-*linux*)
 
1399
          LD="${LD-ld} -m elf64ppc"
 
1400
          ;;
 
1401
        s390*-*linux*)
 
1402
          LD="${LD-ld} -m elf64_s390"
 
1403
          ;;
 
1404
        sparc*-*linux*)
 
1405
          LD="${LD-ld} -m elf64_sparc"
 
1406
          ;;
 
1407
      esac
 
1408
      ;;
 
1409
    esac
 
1410
  fi
 
1411
  rm -rf conftest*
 
1412
  ;;
 
1413
 
 
1414
*-*-sco3.2v5*)
 
1415
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
1416
  SAVE_CFLAGS="$CFLAGS"
 
1417
  CFLAGS="$CFLAGS -belf"
 
1418
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
1419
    [AC_LANG_PUSH(C)
 
1420
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
1421
     AC_LANG_POP])
 
1422
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
1423
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
1424
    CFLAGS="$SAVE_CFLAGS"
 
1425
  fi
 
1426
  ;;
 
1427
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
1428
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
 
1429
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
1430
  AC_CHECK_TOOL(AS, as, false)
 
1431
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
1432
  ;;
 
1433
  ])
 
1434
esac
 
1435
 
 
1436
need_locks="$enable_libtool_lock"
 
1437
 
 
1438
])# _LT_AC_LOCK
 
1439
 
 
1440
 
 
1441
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
1442
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
1443
# ----------------------------------------------------------------
 
1444
# Check whether the given compiler option works
 
1445
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
 
1446
[AC_REQUIRE([LT_AC_PROG_SED])
 
1447
AC_CACHE_CHECK([$1], [$2],
 
1448
  [$2=no
 
1449
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
1450
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
1451
   lt_compiler_flag="$3"
 
1452
   # Insert the option either (1) after the last *FLAGS variable, or
 
1453
   # (2) before a word containing "conftest.", or (3) at the end.
 
1454
   # Note that $ac_compile itself does not contain backslashes and begins
 
1455
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
1456
   # The option is referenced via a variable to avoid confusing sed.
 
1457
   lt_compile=`echo "$ac_compile" | $SED \
 
1458
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
1459
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
1460
   -e 's:$: $lt_compiler_flag:'`
 
1461
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
1462
   (eval "$lt_compile" 2>conftest.err)
 
1463
   ac_status=$?
 
1464
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
1465
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1466
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
1467
     # The compiler can only warn and ignore the option if not recognized
 
1468
     # So say no if there are warnings
 
1469
     if test ! -s conftest.err; then
 
1470
       $2=yes
 
1471
     fi
 
1472
   fi
 
1473
   $rm conftest*
 
1474
])
 
1475
 
 
1476
if test x"[$]$2" = xyes; then
 
1477
    ifelse([$5], , :, [$5])
 
1478
else
 
1479
    ifelse([$6], , :, [$6])
 
1480
fi
 
1481
])# AC_LIBTOOL_COMPILER_OPTION
 
1482
 
 
1483
 
 
1484
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
1485
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
 
1486
# ------------------------------------------------------------
 
1487
# Check whether the given compiler option works
 
1488
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
 
1489
[AC_CACHE_CHECK([$1], [$2],
 
1490
  [$2=no
 
1491
   save_LDFLAGS="$LDFLAGS"
 
1492
   LDFLAGS="$LDFLAGS $3"
 
1493
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
 
1494
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
1495
     # The compiler can only warn and ignore the option if not recognized
 
1496
     # So say no if there are warnings
 
1497
     if test -s conftest.err; then
 
1498
       # Append any errors to the config.log.
 
1499
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
1500
     else
 
1501
       $2=yes
 
1502
     fi
 
1503
   fi
 
1504
   $rm conftest*
 
1505
   LDFLAGS="$save_LDFLAGS"
 
1506
])
 
1507
 
 
1508
if test x"[$]$2" = xyes; then
 
1509
    ifelse([$4], , :, [$4])
 
1510
else
 
1511
    ifelse([$5], , :, [$5])
 
1512
fi
 
1513
])# AC_LIBTOOL_LINKER_OPTION
 
1514
 
 
1515
 
 
1516
# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
1517
# --------------------------
 
1518
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
 
1519
[# find the maximum length of command line arguments
 
1520
AC_MSG_CHECKING([the maximum length of command line arguments])
 
1521
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
1522
  i=0
 
1523
  teststring="ABCD"
 
1524
 
 
1525
  case $build_os in
 
1526
  msdosdjgpp*)
 
1527
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
1528
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
1529
    # during glob expansion).  Even if it were fixed, the result of this
 
1530
    # check would be larger than it should be.
 
1531
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
1532
    ;;
 
1533
 
 
1534
  gnu*)
 
1535
    # Under GNU Hurd, this test is not required because there is
 
1536
    # no limit to the length of command line arguments.
 
1537
    # Libtool will interpret -1 as no limit whatsoever
 
1538
    lt_cv_sys_max_cmd_len=-1;
 
1539
    ;;
 
1540
 
 
1541
  cygwin* | mingw*)
 
1542
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
1543
    # about 5 minutes as the teststring grows exponentially.
 
1544
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
1545
    # you end up with a "frozen" computer, even though with patience
 
1546
    # the test eventually succeeds (with a max line length of 256k).
 
1547
    # Instead, let's just punt: use the minimum linelength reported by
 
1548
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
1549
    lt_cv_sys_max_cmd_len=8192;
 
1550
    ;;
 
1551
 
 
1552
  amigaos*)
 
1553
    # On AmigaOS with pdksh, this test takes hours, literally.
 
1554
    # So we just punt and use a minimum line length of 8192.
 
1555
    lt_cv_sys_max_cmd_len=8192;
 
1556
    ;;
 
1557
 
 
1558
 *)
 
1559
    # If test is not a shell built-in, we'll probably end up computing a
 
1560
    # maximum length that is only half of the actual maximum length, but
 
1561
    # we can't tell.
 
1562
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
 
1563
               = "XX$teststring") >/dev/null 2>&1 &&
 
1564
            new_result=`expr "X$teststring" : ".*" 2>&1` &&
 
1565
            lt_cv_sys_max_cmd_len=$new_result &&
 
1566
            test $i != 17 # 1/2 MB should be enough
 
1567
    do
 
1568
      i=`expr $i + 1`
 
1569
      teststring=$teststring$teststring
 
1570
    done
 
1571
    teststring=
 
1572
    # Add a significant safety factor because C++ compilers can tack on massive
 
1573
    # amounts of additional arguments before passing them to the linker.
 
1574
    # It appears as though 1/2 is a usable value.
 
1575
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
1576
    ;;
 
1577
  esac
 
1578
])
 
1579
if test -n $lt_cv_sys_max_cmd_len ; then
 
1580
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
1581
else
 
1582
  AC_MSG_RESULT(none)
 
1583
fi
 
1584
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
1585
 
 
1586
 
 
1587
# _LT_AC_CHECK_DLFCN
 
1588
# --------------------
 
1589
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
1590
[AC_CHECK_HEADERS(dlfcn.h)dnl
 
1591
])# _LT_AC_CHECK_DLFCN
 
1592
 
1417
1593
 
1418
1594
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1419
1595
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1420
1596
# ------------------------------------------------------------------
1421
1597
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1422
 
[if test "$cross_compiling" = yes; then :
 
1598
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
1599
if test "$cross_compiling" = yes; then :
1423
1600
  [$4]
1424
1601
else
1425
 
  AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1426
1602
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1427
1603
  lt_status=$lt_dlunknown
1428
1604
  cat > conftest.$ac_ext <<EOF
1503
1679
rm -fr conftest*
1504
1680
])# _LT_AC_TRY_DLOPEN_SELF
1505
1681
 
 
1682
 
1506
1683
# AC_LIBTOOL_DLOPEN_SELF
1507
1684
# -------------------
1508
1685
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1509
 
[if test "x$enable_dlopen" != xyes; then
 
1686
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
1687
if test "x$enable_dlopen" != xyes; then
1510
1688
  enable_dlopen=unknown
1511
1689
  enable_dlopen_self=unknown
1512
1690
  enable_dlopen_self_static=unknown
1521
1699
    lt_cv_dlopen_self=yes
1522
1700
    ;;
1523
1701
 
1524
 
  cygwin* | mingw* | pw32*)
 
1702
  mingw* | pw32*)
1525
1703
    lt_cv_dlopen="LoadLibrary"
1526
1704
    lt_cv_dlopen_libs=
1527
1705
   ;;
1528
1706
 
 
1707
  cygwin*)
 
1708
    lt_cv_dlopen="dlopen"
 
1709
    lt_cv_dlopen_libs=
 
1710
   ;;
 
1711
 
 
1712
  darwin*)
 
1713
  # if libdl is installed we need to link against it
 
1714
    AC_CHECK_LIB([dl], [dlopen],
 
1715
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
1716
    lt_cv_dlopen="dyld"
 
1717
    lt_cv_dlopen_libs=
 
1718
    lt_cv_dlopen_self=yes
 
1719
    ])
 
1720
   ;;
 
1721
 
1529
1722
  *)
1530
1723
    AC_CHECK_FUNC([shl_load],
1531
 
          [lt_cv_dlopen="shl_load"],
 
1724
          [lt_cv_dlopen="shl_load"],
1532
1725
      [AC_CHECK_LIB([dld], [shl_load],
1533
 
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
1726
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1534
1727
        [AC_CHECK_FUNC([dlopen],
1535
1728
              [lt_cv_dlopen="dlopen"],
1536
1729
          [AC_CHECK_LIB([dl], [dlopen],
1537
 
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
1730
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1538
1731
            [AC_CHECK_LIB([svld], [dlopen],
1539
 
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
1732
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1540
1733
              [AC_CHECK_LIB([dld], [dld_link],
1541
 
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
1734
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1542
1735
              ])
1543
1736
            ])
1544
1737
          ])
1556
1749
  case $lt_cv_dlopen in
1557
1750
  dlopen)
1558
1751
    save_CPPFLAGS="$CPPFLAGS"
1559
 
    AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1560
1752
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1561
1753
 
1562
1754
    save_LDFLAGS="$LDFLAGS"
1600
1792
fi
1601
1793
])# AC_LIBTOOL_DLOPEN_SELF
1602
1794
 
1603
 
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1604
 
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1605
 
# Sed substitution that helps us do robust quoting.  It backslashifies
1606
 
# metacharacters that are still active within double-quoted strings.
1607
 
Xsed='sed -e s/^X//'
1608
 
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1609
 
 
1610
 
# Same as above, but do not quote variable references.
1611
 
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1612
 
 
1613
 
# Sed substitution to delay expansion of an escaped shell variable in a
1614
 
# double_quote_subst'ed string.
1615
 
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1616
 
 
1617
 
# Constants:
1618
 
rm="rm -f"
1619
 
 
1620
 
# Global variables:
1621
 
default_ofile=libtool
1622
 
can_build_shared=yes
1623
 
 
1624
 
# All known linkers require a `.a' archive for static linking (except M$VC,
1625
 
# which needs '.lib').
1626
 
libext=a
1627
 
ltmain="$ac_aux_dir/ltmain.sh"
1628
 
ofile="$default_ofile"
1629
 
with_gnu_ld="$lt_cv_prog_gnu_ld"
1630
 
need_locks="$enable_libtool_lock"
1631
 
 
1632
 
old_CC="$CC"
1633
 
old_CFLAGS="$CFLAGS"
1634
 
 
1635
 
# Set sane defaults for various variables
1636
 
test -z "$AR" && AR=ar
1637
 
test -z "$AR_FLAGS" && AR_FLAGS=cru
1638
 
test -z "$AS" && AS=as
1639
 
test -z "$CC" && CC=cc
1640
 
test -z "$DLLTOOL" && DLLTOOL=dlltool
1641
 
test -z "$LD" && LD=ld
1642
 
test -z "$LN_S" && LN_S="ln -s"
1643
 
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1644
 
test -z "$NM" && NM=nm
1645
 
test -z "$OBJDUMP" && OBJDUMP=objdump
1646
 
test -z "$RANLIB" && RANLIB=:
1647
 
test -z "$STRIP" && STRIP=:
1648
 
test -z "$ac_objext" && ac_objext=o
1649
 
 
1650
 
if test x"$host" != x"$build"; then
1651
 
  ac_tool_prefix=${host_alias}-
1652
 
else
1653
 
  ac_tool_prefix=
1654
 
fi
1655
 
 
1656
 
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1657
 
case $host_os in
1658
 
linux-gnu*) ;;
1659
 
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1660
 
esac
1661
 
 
1662
 
case $host_os in
1663
 
aix3*)
1664
 
  # AIX sometimes has problems with the GCC collect2 program.  For some
1665
 
  # reason, if we set the COLLECT_NAMES environment variable, the problems
1666
 
  # vanish in a puff of smoke.
1667
 
  if test "X${COLLECT_NAMES+set}" != Xset; then
1668
 
    COLLECT_NAMES=
1669
 
    export COLLECT_NAMES
1670
 
  fi
1671
 
  ;;
1672
 
esac
1673
 
 
1674
 
# Determine commands to create old-style static archives.
1675
 
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1676
 
old_postinstall_cmds='chmod 644 $oldlib'
1677
 
old_postuninstall_cmds=
1678
 
 
1679
 
if test -n "$RANLIB"; then
1680
 
  case $host_os in
1681
 
  openbsd*)
1682
 
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1683
 
    ;;
1684
 
  *)
1685
 
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1686
 
    ;;
1687
 
  esac
1688
 
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1689
 
fi
1690
 
 
1691
 
# Allow CC to be a program name with arguments.
1692
 
set dummy $CC
1693
 
compiler="[$]2"
1694
 
 
1695
 
AC_MSG_CHECKING([for objdir])
1696
 
rm -f .libs 2>/dev/null
1697
 
mkdir .libs 2>/dev/null
1698
 
if test -d .libs; then
1699
 
  objdir=.libs
1700
 
else
1701
 
  # MS-DOS does not allow filenames that begin with a dot.
1702
 
  objdir=_libs
1703
 
fi
1704
 
rmdir .libs 2>/dev/null
1705
 
AC_MSG_RESULT($objdir)
1706
 
 
1707
 
 
1708
 
AC_ARG_WITH(pic,
1709
 
[  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
1710
 
pic_mode="$withval", pic_mode=default)
1711
 
test -z "$pic_mode" && pic_mode=default
1712
 
 
1713
 
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1714
 
# in isolation, and that seeing it set (from the cache) indicates that
1715
 
# the associated values are set (in the cache) correctly too.
1716
 
AC_MSG_CHECKING([for $compiler option to produce PIC])
1717
 
AC_CACHE_VAL(lt_cv_prog_cc_pic,
1718
 
[ lt_cv_prog_cc_pic=
1719
 
  lt_cv_prog_cc_shlib=
1720
 
  lt_cv_prog_cc_wl=
1721
 
  lt_cv_prog_cc_static=
1722
 
  lt_cv_prog_cc_no_builtin=
1723
 
  lt_cv_prog_cc_can_build_shared=$can_build_shared
1724
 
 
1725
 
  if test "$GCC" = yes; then
1726
 
    lt_cv_prog_cc_wl='-Wl,'
1727
 
    lt_cv_prog_cc_static='-static'
1728
 
 
1729
 
    case $host_os in
1730
 
    aix*)
1731
 
      # Below there is a dirty hack to force normal static linking with -ldl
1732
 
      # The problem is because libdl dynamically linked with both libc and
1733
 
      # libC (AIX C++ library), which obviously doesn't included in libraries
1734
 
      # list by gcc. This cause undefined symbols with -static flags.
1735
 
      # This hack allows C programs to be linked with "-static -ldl", but
1736
 
      # not sure about C++ programs.
1737
 
      lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1738
 
      ;;
1739
 
    amigaos*)
1740
 
      # FIXME: we need at least 68020 code to build shared libraries, but
1741
 
      # adding the `-m68020' flag to GCC prevents building anything better,
1742
 
      # like `-m68040'.
1743
 
      lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1744
 
      ;;
1745
 
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1746
 
      # PIC is the default for these OSes.
1747
 
      ;;
1748
 
    darwin* | rhapsody*)
1749
 
      # PIC is the default on this platform
1750
 
      # Common symbols not allowed in MH_DYLIB files
1751
 
      lt_cv_prog_cc_pic='-fno-common'
1752
 
      ;;
1753
 
    cygwin* | mingw* | pw32* | os2*)
1754
 
      # This hack is so that the source file can tell whether it is being
1755
 
      # built for inclusion in a dll (and should export symbols for example).
1756
 
      lt_cv_prog_cc_pic='-DDLL_EXPORT'
1757
 
      ;;
1758
 
    sysv4*MP*)
1759
 
      if test -d /usr/nec; then
1760
 
         lt_cv_prog_cc_pic=-Kconform_pic
1761
 
      fi
1762
 
      ;;
1763
 
    *)
1764
 
      lt_cv_prog_cc_pic='-fPIC'
1765
 
      ;;
1766
 
    esac
1767
 
  else
1768
 
    # PORTME Check for PIC flags for the system compiler.
1769
 
    case $host_os in
1770
 
    aix3* | aix4* | aix5*)
1771
 
      lt_cv_prog_cc_wl='-Wl,'
1772
 
      # All AIX code is PIC.
1773
 
      if test "$host_cpu" = ia64; then
1774
 
        # AIX 5 now supports IA64 processor
1775
 
        lt_cv_prog_cc_static='-Bstatic'
1776
 
      else
1777
 
        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1778
 
      fi
1779
 
      ;;
1780
 
 
1781
 
    hpux9* | hpux10* | hpux11*)
1782
 
      # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1783
 
      lt_cv_prog_cc_wl='-Wl,'
1784
 
      lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1785
 
      lt_cv_prog_cc_pic='+Z'
1786
 
      ;;
1787
 
 
1788
 
    irix5* | irix6* | nonstopux*)
1789
 
      lt_cv_prog_cc_wl='-Wl,'
1790
 
      lt_cv_prog_cc_static='-non_shared'
1791
 
      # PIC (with -KPIC) is the default.
1792
 
      ;;
1793
 
 
1794
 
    cygwin* | mingw* | pw32* | os2*)
1795
 
      # This hack is so that the source file can tell whether it is being
1796
 
      # built for inclusion in a dll (and should export symbols for example).
1797
 
      lt_cv_prog_cc_pic='-DDLL_EXPORT'
1798
 
      ;;
1799
 
 
1800
 
    newsos6)
1801
 
      lt_cv_prog_cc_pic='-KPIC'
1802
 
      lt_cv_prog_cc_static='-Bstatic'
1803
 
      ;;
1804
 
 
1805
 
    osf3* | osf4* | osf5*)
1806
 
      # All OSF/1 code is PIC.
1807
 
      lt_cv_prog_cc_wl='-Wl,'
1808
 
      lt_cv_prog_cc_static='-non_shared'
1809
 
      ;;
1810
 
 
1811
 
    sco3.2v5*)
1812
 
      lt_cv_prog_cc_pic='-Kpic'
1813
 
      lt_cv_prog_cc_static='-dn'
1814
 
      lt_cv_prog_cc_shlib='-belf'
1815
 
      ;;
1816
 
 
1817
 
    solaris*)
1818
 
      lt_cv_prog_cc_pic='-KPIC'
1819
 
      lt_cv_prog_cc_static='-Bstatic'
1820
 
      lt_cv_prog_cc_wl='-Wl,'
1821
 
      ;;
1822
 
 
1823
 
    sunos4*)
1824
 
      lt_cv_prog_cc_pic='-PIC'
1825
 
      lt_cv_prog_cc_static='-Bstatic'
1826
 
      lt_cv_prog_cc_wl='-Qoption ld '
1827
 
      ;;
1828
 
 
1829
 
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1830
 
      lt_cv_prog_cc_pic='-KPIC'
1831
 
      lt_cv_prog_cc_static='-Bstatic'
1832
 
      lt_cv_prog_cc_wl='-Wl,'
1833
 
      ;;
1834
 
 
1835
 
    uts4*)
1836
 
      lt_cv_prog_cc_pic='-pic'
1837
 
      lt_cv_prog_cc_static='-Bstatic'
1838
 
      ;;
1839
 
 
1840
 
    sysv4*MP*)
1841
 
      if test -d /usr/nec ;then
1842
 
        lt_cv_prog_cc_pic='-Kconform_pic'
1843
 
        lt_cv_prog_cc_static='-Bstatic'
1844
 
      fi
1845
 
      ;;
1846
 
 
1847
 
    *)
1848
 
      lt_cv_prog_cc_can_build_shared=no
1849
 
      ;;
1850
 
    esac
1851
 
  fi
1852
 
])
1853
 
if test -z "$lt_cv_prog_cc_pic"; then
1854
 
  AC_MSG_RESULT([none])
1855
 
else
1856
 
  AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1857
 
 
1858
 
  # Check to make sure the pic_flag actually works.
1859
 
  AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1860
 
  AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1861
 
    save_CFLAGS="$CFLAGS"
1862
 
    CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1863
 
    AC_TRY_COMPILE([], [], [dnl
1864
 
      case $host_os in
1865
 
      hpux9* | hpux10* | hpux11*)
1866
 
        # On HP-UX, both CC and GCC only warn that PIC is supported... then
1867
 
        # they create non-PIC objects.  So, if there were any warnings, we
1868
 
        # assume that PIC is not supported.
1869
 
        if test -s conftest.err; then
1870
 
          lt_cv_prog_cc_pic_works=no
1871
 
        else
1872
 
          lt_cv_prog_cc_pic_works=yes
1873
 
        fi
1874
 
        ;;
1875
 
      *)
1876
 
        lt_cv_prog_cc_pic_works=yes
1877
 
        ;;
1878
 
      esac
1879
 
    ], [dnl
1880
 
      lt_cv_prog_cc_pic_works=no
1881
 
    ])
1882
 
    CFLAGS="$save_CFLAGS"
1883
 
  ])
1884
 
 
1885
 
  if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1886
 
    lt_cv_prog_cc_pic=
1887
 
    lt_cv_prog_cc_can_build_shared=no
1888
 
  else
1889
 
    lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1890
 
  fi
1891
 
 
1892
 
  AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1893
 
fi
1894
 
 
1895
 
# Check for any special shared library compilation flags.
1896
 
if test -n "$lt_cv_prog_cc_shlib"; then
1897
 
  AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1898
 
  if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$lt_cv_prog_cc_shlib[[        ]]" >/dev/null; then :
1899
 
  else
1900
 
   AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1901
 
    lt_cv_prog_cc_can_build_shared=no
1902
 
  fi
1903
 
fi
1904
 
 
1905
 
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1906
 
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1907
 
  lt_cv_prog_cc_static_works=no
1908
 
  save_LDFLAGS="$LDFLAGS"
1909
 
  LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1910
 
  AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1911
 
  LDFLAGS="$save_LDFLAGS"
1912
 
])
1913
 
 
1914
 
# Belt *and* braces to stop my trousers falling down:
1915
 
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1916
 
AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1917
 
 
1918
 
pic_flag="$lt_cv_prog_cc_pic"
1919
 
special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1920
 
wl="$lt_cv_prog_cc_wl"
1921
 
link_static_flag="$lt_cv_prog_cc_static"
1922
 
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1923
 
can_build_shared="$lt_cv_prog_cc_can_build_shared"
1924
 
 
1925
 
 
1926
 
# Check to see if options -o and -c are simultaneously supported by compiler
1927
 
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1928
 
AC_CACHE_VAL([lt_cv_compiler_c_o], [
1929
 
$rm -r conftest 2>/dev/null
1930
 
mkdir conftest
1931
 
cd conftest
1932
 
echo "int some_variable = 0;" > conftest.$ac_ext
1933
 
mkdir out
1934
 
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1935
 
# that will create temporary files in the current directory regardless of
1936
 
# the output directory.  Thus, making CWD read-only will cause this test
1937
 
# to fail, enabling locking or at least warning the user not to do parallel
1938
 
# builds.
1939
 
chmod -w .
1940
 
save_CFLAGS="$CFLAGS"
1941
 
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1942
 
compiler_c_o=no
1943
 
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1944
 
  # The compiler can only warn and ignore the option if not recognized
1945
 
  # So say no if there are warnings
1946
 
  if test -s out/conftest.err; then
1947
 
    lt_cv_compiler_c_o=no
1948
 
  else
1949
 
    lt_cv_compiler_c_o=yes
1950
 
  fi
1951
 
else
1952
 
  # Append any errors to the config.log.
1953
 
  cat out/conftest.err 1>&AC_FD_CC
1954
 
  lt_cv_compiler_c_o=no
1955
 
fi
1956
 
CFLAGS="$save_CFLAGS"
1957
 
chmod u+w .
1958
 
$rm conftest* out/*
1959
 
rmdir out
1960
 
cd ..
1961
 
rmdir conftest
1962
 
$rm -r conftest 2>/dev/null
1963
 
])
1964
 
compiler_c_o=$lt_cv_compiler_c_o
1965
 
AC_MSG_RESULT([$compiler_c_o])
1966
 
 
1967
 
if test x"$compiler_c_o" = x"yes"; then
1968
 
  # Check to see if we can write to a .lo
1969
 
  AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1970
 
  AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1971
 
  lt_cv_compiler_o_lo=no
1972
 
  save_CFLAGS="$CFLAGS"
1973
 
  CFLAGS="$CFLAGS -c -o conftest.lo"
1974
 
  save_objext="$ac_objext"
1975
 
  ac_objext=lo
1976
 
  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1977
 
    # The compiler can only warn and ignore the option if not recognized
1978
 
    # So say no if there are warnings
1979
 
    if test -s conftest.err; then
1980
 
      lt_cv_compiler_o_lo=no
1981
 
    else
1982
 
      lt_cv_compiler_o_lo=yes
1983
 
    fi
1984
 
  ])
1985
 
  ac_objext="$save_objext"
1986
 
  CFLAGS="$save_CFLAGS"
1987
 
  ])
1988
 
  compiler_o_lo=$lt_cv_compiler_o_lo
1989
 
  AC_MSG_RESULT([$compiler_o_lo])
1990
 
else
1991
 
  compiler_o_lo=no
1992
 
fi
1993
 
 
 
1795
 
 
1796
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
 
1797
# ---------------------------------
 
1798
# Check to see if options -c and -o are simultaneously supported by compiler
 
1799
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
 
1800
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
1801
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
1802
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
1803
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
1804
   $rm -r conftest 2>/dev/null
 
1805
   mkdir conftest
 
1806
   cd conftest
 
1807
   mkdir out
 
1808
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
1809
 
 
1810
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
1811
   # Insert the option either (1) after the last *FLAGS variable, or
 
1812
   # (2) before a word containing "conftest.", or (3) at the end.
 
1813
   # Note that $ac_compile itself does not contain backslashes and begins
 
1814
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
1815
   lt_compile=`echo "$ac_compile" | $SED \
 
1816
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
1817
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
1818
   -e 's:$: $lt_compiler_flag:'`
 
1819
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
1820
   (eval "$lt_compile" 2>out/conftest.err)
 
1821
   ac_status=$?
 
1822
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
1823
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1824
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
1825
   then
 
1826
     # The compiler can only warn and ignore the option if not recognized
 
1827
     # So say no if there are warnings
 
1828
     if test ! -s out/conftest.err; then
 
1829
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
1830
     fi
 
1831
   fi
 
1832
   chmod u+w .
 
1833
   $rm conftest*
 
1834
   # SGI C++ compiler will create directory out/ii_files/ for
 
1835
   # template instantiation
 
1836
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
 
1837
   $rm out/* && rmdir out
 
1838
   cd ..
 
1839
   rmdir conftest
 
1840
   $rm conftest*
 
1841
])
 
1842
])# AC_LIBTOOL_PROG_CC_C_O
 
1843
 
 
1844
 
 
1845
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
 
1846
# -----------------------------------------
1994
1847
# Check to see if we can do hard links to lock some files if needed
 
1848
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
 
1849
[AC_REQUIRE([_LT_AC_LOCK])dnl
 
1850
 
1995
1851
hard_links="nottested"
1996
 
if test "$compiler_c_o" = no && test "$need_locks" != no; then
 
1852
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1997
1853
  # do not overwrite the value of need_locks provided by the user
1998
1854
  AC_MSG_CHECKING([if we can lock with hard links])
1999
1855
  hard_links=yes
2004
1860
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2005
1861
  AC_MSG_RESULT([$hard_links])
2006
1862
  if test "$hard_links" = no; then
2007
 
    AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
 
1863
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2008
1864
    need_locks=warn
2009
1865
  fi
2010
1866
else
2011
1867
  need_locks=no
2012
1868
fi
2013
 
 
2014
 
if test "$GCC" = yes; then
2015
 
  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2016
 
  AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2017
 
  echo "int some_variable = 0;" > conftest.$ac_ext
2018
 
  save_CFLAGS="$CFLAGS"
2019
 
  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2020
 
  compiler_rtti_exceptions=no
2021
 
  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2022
 
    # The compiler can only warn and ignore the option if not recognized
2023
 
    # So say no if there are warnings
2024
 
    if test -s conftest.err; then
2025
 
      compiler_rtti_exceptions=no
2026
 
    else
2027
 
      compiler_rtti_exceptions=yes
2028
 
    fi
2029
 
  ])
2030
 
  CFLAGS="$save_CFLAGS"
2031
 
  AC_MSG_RESULT([$compiler_rtti_exceptions])
2032
 
 
2033
 
  if test "$compiler_rtti_exceptions" = "yes"; then
2034
 
    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2035
 
  else
2036
 
    no_builtin_flag=' -fno-builtin'
2037
 
  fi
2038
 
fi
2039
 
 
2040
 
# See if the linker supports building shared libraries.
2041
 
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2042
 
 
2043
 
allow_undefined_flag=
2044
 
no_undefined_flag=
2045
 
need_lib_prefix=unknown
2046
 
need_version=unknown
2047
 
# when you set need_version to no, make sure it does not cause -set_version
2048
 
# flags to be left without arguments
2049
 
archive_cmds=
2050
 
archive_expsym_cmds=
2051
 
old_archive_from_new_cmds=
2052
 
old_archive_from_expsyms_cmds=
2053
 
export_dynamic_flag_spec=
2054
 
whole_archive_flag_spec=
2055
 
thread_safe_flag_spec=
2056
 
hardcode_into_libs=no
2057
 
hardcode_libdir_flag_spec=
2058
 
hardcode_libdir_separator=
2059
 
hardcode_direct=no
2060
 
hardcode_minus_L=no
2061
 
hardcode_shlibpath_var=unsupported
2062
 
runpath_var=
2063
 
link_all_deplibs=unknown
2064
 
always_export_symbols=no
2065
 
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2066
 
# include_expsyms should be a list of space-separated symbols to be *always*
2067
 
# included in the symbol list
2068
 
include_expsyms=
2069
 
# exclude_expsyms can be an egrep regular expression of symbols to exclude
2070
 
# it will be wrapped by ` (' and `)$', so one must not match beginning or
2071
 
# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2072
 
# as well as any symbol that contains `d'.
2073
 
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2074
 
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2075
 
# platforms (ab)use it in PIC code, but their linkers get confused if
2076
 
# the symbol is explicitly referenced.  Since portable code cannot
2077
 
# rely on this symbol name, it's probably fine to never include it in
2078
 
# preloaded symbol tables.
2079
 
extract_expsyms_cmds=
2080
 
 
2081
 
case $host_os in
2082
 
cygwin* | mingw* | pw32*)
2083
 
  # FIXME: the MSVC++ port hasn't been tested in a loooong time
2084
 
  # When not using gcc, we currently assume that we are using
2085
 
  # Microsoft Visual C++.
2086
 
  if test "$GCC" != yes; then
2087
 
    with_gnu_ld=no
2088
 
  fi
2089
 
  ;;
2090
 
openbsd*)
2091
 
  with_gnu_ld=no
2092
 
  ;;
2093
 
esac
2094
 
 
2095
 
ld_shlibs=yes
2096
 
if test "$with_gnu_ld" = yes; then
2097
 
  # If archive_cmds runs LD, not CC, wlarc should be empty
2098
 
  wlarc='${wl}'
2099
 
 
2100
 
  # See if GNU ld supports shared libraries.
2101
 
  case $host_os in
2102
 
  aix3* | aix4* | aix5*)
2103
 
    # On AIX, the GNU linker is very broken
2104
 
    # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2105
 
    ld_shlibs=no
2106
 
    cat <<EOF 1>&2
2107
 
 
2108
 
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2109
 
*** to be unable to reliably create shared libraries on AIX.
2110
 
*** Therefore, libtool is disabling shared libraries support.  If you
2111
 
*** really care for shared libraries, you may want to modify your PATH
2112
 
*** so that a non-GNU linker is found, and then restart.
2113
 
 
2114
 
EOF
2115
 
    ;;
2116
 
 
2117
 
  amigaos*)
2118
 
    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)'
2119
 
    hardcode_libdir_flag_spec='-L$libdir'
2120
 
    hardcode_minus_L=yes
2121
 
 
2122
 
    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2123
 
    # that the semantics of dynamic libraries on AmigaOS, at least up
2124
 
    # to version 4, is to share data among multiple programs linked
2125
 
    # with the same dynamic library.  Since this doesn't match the
2126
 
    # behavior of shared libraries on other platforms, we can use
2127
 
    # them.
2128
 
    ld_shlibs=no
2129
 
    ;;
2130
 
 
2131
 
  beos*)
2132
 
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2133
 
      allow_undefined_flag=unsupported
2134
 
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2135
 
      # support --undefined.  This deserves some investigation.  FIXME
2136
 
      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2137
 
    else
2138
 
      ld_shlibs=no
2139
 
    fi
2140
 
    ;;
2141
 
 
2142
 
  cygwin* | mingw* | pw32*)
2143
 
    # hardcode_libdir_flag_spec is actually meaningless, as there is
2144
 
    # no search path for DLLs.
2145
 
    hardcode_libdir_flag_spec='-L$libdir'
2146
 
    allow_undefined_flag=unsupported
2147
 
    always_export_symbols=yes
2148
 
 
2149
 
    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2150
 
      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2151
 
      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2152
 
      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2153
 
      else $CC -o impgen impgen.c ; fi)~
2154
 
      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2155
 
 
2156
 
    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2157
 
 
2158
 
    # cygwin and mingw dlls have different entry points and sets of symbols
2159
 
    # to exclude.
2160
 
    # FIXME: what about values for MSVC?
2161
 
    dll_entry=__cygwin_dll_entry@12
2162
 
    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2163
 
    case $host_os in
2164
 
    mingw*)
2165
 
      # mingw values
2166
 
      dll_entry=_DllMainCRTStartup@12
2167
 
      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2168
 
      ;;
2169
 
    esac
2170
 
 
2171
 
    # mingw and cygwin differ, and it's simplest to just exclude the union
2172
 
    # of the two symbol sets.
2173
 
    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2174
 
 
2175
 
    # recent cygwin and mingw systems supply a stub DllMain which the user
2176
 
    # can override, but on older systems we have to supply one (in ltdll.c)
2177
 
    if test "x$lt_cv_need_dllmain" = "xyes"; then
2178
 
      ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2179
 
      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~
2180
 
        test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2181
 
    else
2182
 
      ltdll_obj=
2183
 
      ltdll_cmds=
2184
 
    fi
2185
 
 
2186
 
    # Extract the symbol export list from an `--export-all' def file,
2187
 
    # then regenerate the def file from the symbol export list, so that
2188
 
    # the compiled dll only exports the symbol export list.
2189
 
    # Be careful not to strip the DATA tag left be newer dlltools.
2190
 
    export_symbols_cmds="$ltdll_cmds"'
2191
 
      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2192
 
      sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2193
 
 
2194
 
    # If the export-symbols file already is a .def file (1st line
2195
 
    # is EXPORTS), use it as is.
2196
 
    # If DATA tags from a recent dlltool are present, honour them!
2197
 
    archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
2198
 
        cp $export_symbols $output_objdir/$soname-def;
2199
 
      else
2200
 
        echo EXPORTS > $output_objdir/$soname-def;
2201
 
        _lt_hint=1;
2202
 
        cat $export_symbols | while read symbol; do
2203
 
         set dummy \$symbol;
2204
 
         case \[$]# in
2205
 
           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2206
 
           4) echo "   \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
2207
 
           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2208
 
         esac;
2209
 
         _lt_hint=`expr 1 + \$_lt_hint`;
2210
 
        done;
2211
 
      fi~
2212
 
      '"$ltdll_cmds"'
2213
 
      $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~
2214
 
      $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~
2215
 
      $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~
2216
 
      $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~
2217
 
      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2218
 
    ;;
2219
 
 
2220
 
  netbsd*)
2221
 
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2222
 
      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2223
 
      wlarc=
2224
 
    else
2225
 
      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2226
 
      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2227
 
    fi
2228
 
    ;;
2229
 
 
2230
 
  solaris* | sysv5*)
2231
 
    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2232
 
      ld_shlibs=no
2233
 
      cat <<EOF 1>&2
2234
 
 
2235
 
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2236
 
*** create shared libraries on Solaris systems.  Therefore, libtool
2237
 
*** is disabling shared libraries support.  We urge you to upgrade GNU
2238
 
*** binutils to release 2.9.1 or newer.  Another option is to modify
2239
 
*** your PATH or compiler configuration so that the native linker is
2240
 
*** used, and then restart.
2241
 
 
2242
 
EOF
2243
 
    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2244
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2245
 
      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2246
 
    else
2247
 
      ld_shlibs=no
2248
 
    fi
2249
 
    ;;
2250
 
 
2251
 
  sunos4*)
2252
 
    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2253
 
    wlarc=
2254
 
    hardcode_direct=yes
2255
 
    hardcode_shlibpath_var=no
2256
 
    ;;
2257
 
 
2258
 
  *)
2259
 
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2260
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2261
 
      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2262
 
    else
2263
 
      ld_shlibs=no
2264
 
    fi
2265
 
    ;;
2266
 
  esac
2267
 
 
2268
 
  if test "$ld_shlibs" = yes; then
2269
 
    runpath_var=LD_RUN_PATH
2270
 
    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2271
 
    export_dynamic_flag_spec='${wl}--export-dynamic'
2272
 
    case $host_os in
2273
 
    cygwin* | mingw* | pw32*)
2274
 
      # dlltool doesn't understand --whole-archive et. al.
2275
 
      whole_archive_flag_spec=
2276
 
      ;;
2277
 
    *)
2278
 
      # ancient GNU ld didn't support --whole-archive et. al.
2279
 
      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2280
 
        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2281
 
      else
2282
 
        whole_archive_flag_spec=
2283
 
      fi
2284
 
      ;;
2285
 
    esac
2286
 
  fi
 
1869
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
1870
 
 
1871
 
 
1872
# AC_LIBTOOL_OBJDIR
 
1873
# -----------------
 
1874
AC_DEFUN([AC_LIBTOOL_OBJDIR],
 
1875
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
1876
[rm -f .libs 2>/dev/null
 
1877
mkdir .libs 2>/dev/null
 
1878
if test -d .libs; then
 
1879
  lt_cv_objdir=.libs
2287
1880
else
2288
 
  # PORTME fill in a description of your system's linker (not GNU ld)
2289
 
  case $host_os in
2290
 
  aix3*)
2291
 
    allow_undefined_flag=unsupported
2292
 
    always_export_symbols=yes
2293
 
    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'
2294
 
    # Note: this linker hardcodes the directories in LIBPATH if there
2295
 
    # are no directories specified by -L.
2296
 
    hardcode_minus_L=yes
2297
 
    if test "$GCC" = yes && test -z "$link_static_flag"; then
2298
 
      # Neither direct hardcoding nor static linking is supported with a
2299
 
      # broken collect2.
2300
 
      hardcode_direct=unsupported
2301
 
    fi
2302
 
    ;;
2303
 
 
2304
 
  aix4* | aix5*)
2305
 
    if test "$host_cpu" = ia64; then
2306
 
      # On IA64, the linker does run time linking by default, so we don't
2307
 
      # have to do anything special.
2308
 
      aix_use_runtimelinking=no
2309
 
      exp_sym_flag='-Bexport'
2310
 
      no_entry_flag=""
2311
 
    else
2312
 
      aix_use_runtimelinking=no
2313
 
 
2314
 
      # Test if we are trying to use run time linking or normal
2315
 
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2316
 
      # need to do runtime linking.
2317
 
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2318
 
        for ld_flag in $LDFLAGS; do
2319
 
          case $ld_flag in
2320
 
          *-brtl*)
2321
 
            aix_use_runtimelinking=yes
2322
 
            break
2323
 
          ;;
2324
 
          esac
2325
 
        done
2326
 
      esac
2327
 
 
2328
 
      exp_sym_flag='-bexport'
2329
 
      no_entry_flag='-bnoentry'
2330
 
    fi
2331
 
 
2332
 
    # When large executables or shared objects are built, AIX ld can
2333
 
    # have problems creating the table of contents.  If linking a library
2334
 
    # or program results in "error TOC overflow" add -mminimal-toc to
2335
 
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2336
 
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2337
 
 
2338
 
    hardcode_direct=yes
2339
 
    archive_cmds=''
2340
 
    hardcode_libdir_separator=':'
2341
 
    if test "$GCC" = yes; then
2342
 
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2343
 
        collect2name=`${CC} -print-prog-name=collect2`
2344
 
        if test -f "$collect2name" && \
2345
 
          strings "$collect2name" | grep resolve_lib_name >/dev/null
2346
 
        then
2347
 
          # We have reworked collect2
2348
 
          hardcode_direct=yes
2349
 
        else
2350
 
          # We have old collect2
2351
 
          hardcode_direct=unsupported
2352
 
          # It fails to find uninstalled libraries when the uninstalled
2353
 
          # path is not listed in the libpath.  Setting hardcode_minus_L
2354
 
          # to unsupported forces relinking
2355
 
          hardcode_minus_L=yes
2356
 
          hardcode_libdir_flag_spec='-L$libdir'
2357
 
          hardcode_libdir_separator=
2358
 
        fi
2359
 
      esac
2360
 
 
2361
 
      shared_flag='-shared'
2362
 
    else
2363
 
      # not using gcc
2364
 
      if test "$host_cpu" = ia64; then
2365
 
        shared_flag='${wl}-G'
2366
 
      else
2367
 
        if test "$aix_use_runtimelinking" = yes; then
2368
 
          shared_flag='${wl}-G'
2369
 
        else
2370
 
          shared_flag='${wl}-bM:SRE'
2371
 
        fi
2372
 
      fi
2373
 
    fi
2374
 
 
2375
 
    # It seems that -bexpall can do strange things, so it is better to
2376
 
    # generate a list of symbols to export.
2377
 
    always_export_symbols=yes
2378
 
    if test "$aix_use_runtimelinking" = yes; then
2379
 
      # Warning - without using the other runtime loading flags (-brtl),
2380
 
      # -berok will link without error, but may produce a broken library.
2381
 
      allow_undefined_flag='-berok'
2382
 
      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2383
 
      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"
2384
 
    else
2385
 
      if test "$host_cpu" = ia64; then
2386
 
        hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2387
 
        allow_undefined_flag="-z nodefs"
2388
 
        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"
2389
 
      else
2390
 
        hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2391
 
        # Warning - without using the other run time loading flags,
2392
 
        # -berok will link without error, but may produce a broken library.
2393
 
        allow_undefined_flag='${wl}-berok'
2394
 
        # This is a bit strange, but is similar to how AIX traditionally builds
2395
 
        # it's shared libraries.
2396
 
        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 $output_objdir/$libname$release.a $output_objdir/$soname'
2397
 
      fi
2398
 
    fi
2399
 
    ;;
2400
 
 
2401
 
  amigaos*)
2402
 
    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)'
2403
 
    hardcode_libdir_flag_spec='-L$libdir'
2404
 
    hardcode_minus_L=yes
2405
 
    # see comment about different semantics on the GNU ld section
2406
 
    ld_shlibs=no
2407
 
    ;;
2408
 
 
2409
 
  cygwin* | mingw* | pw32*)
2410
 
    # When not using gcc, we currently assume that we are using
2411
 
    # Microsoft Visual C++.
2412
 
    # hardcode_libdir_flag_spec is actually meaningless, as there is
2413
 
    # no search path for DLLs.
2414
 
    hardcode_libdir_flag_spec=' '
2415
 
    allow_undefined_flag=unsupported
2416
 
    # Tell ltmain to make .lib files, not .a files.
2417
 
    libext=lib
2418
 
    # FIXME: Setting linknames here is a bad hack.
2419
 
    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2420
 
    # The linker will automatically build a .lib file if we build a DLL.
2421
 
    old_archive_from_new_cmds='true'
2422
 
    # FIXME: Should let the user specify the lib program.
2423
 
    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2424
 
    fix_srcfile_path='`cygpath -w "$srcfile"`'
2425
 
    ;;
2426
 
 
2427
 
  darwin* | rhapsody*)
2428
 
    case "$host_os" in
2429
 
    rhapsody* | darwin1.[[012]])
2430
 
      allow_undefined_flag='-undefined suppress'
2431
 
      ;;
2432
 
    *) # Darwin 1.3 on
2433
 
      allow_undefined_flag='-flat_namespace -undefined suppress'
2434
 
      ;;
2435
 
    esac
2436
 
    # FIXME: Relying on posixy $() will cause problems for
2437
 
    #        cross-compilation, but unfortunately the echo tests do not
2438
 
    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
2439
 
    #        `"' quotes if we put them in here... so don't!
2440
 
    archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
2441
 
    # We need to add '_' to the symbols in $export_symbols first
2442
 
    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2443
 
    hardcode_direct=yes
2444
 
    hardcode_shlibpath_var=no
2445
 
    whole_archive_flag_spec='-all_load $convenience'
2446
 
    ;;
2447
 
 
2448
 
  freebsd1*)
2449
 
    ld_shlibs=no
2450
 
    ;;
2451
 
 
2452
 
  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2453
 
  # support.  Future versions do this automatically, but an explicit c++rt0.o
2454
 
  # does not break anything, and helps significantly (at the cost of a little
2455
 
  # extra space).
2456
 
  freebsd2.2*)
2457
 
    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2458
 
    hardcode_libdir_flag_spec='-R$libdir'
2459
 
    hardcode_direct=yes
2460
 
    hardcode_shlibpath_var=no
2461
 
    ;;
2462
 
 
2463
 
  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2464
 
  freebsd2*)
2465
 
    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2466
 
    hardcode_direct=yes
2467
 
    hardcode_minus_L=yes
2468
 
    hardcode_shlibpath_var=no
2469
 
    ;;
2470
 
 
2471
 
  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2472
 
  freebsd*)
2473
 
    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2474
 
    hardcode_libdir_flag_spec='-R$libdir'
2475
 
    hardcode_direct=yes
2476
 
    hardcode_shlibpath_var=no
2477
 
    ;;
2478
 
 
2479
 
  hpux9* | hpux10* | hpux11*)
2480
 
    case $host_os in
2481
 
    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' ;;
2482
 
    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2483
 
    esac
2484
 
    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2485
 
    hardcode_libdir_separator=:
2486
 
    hardcode_direct=yes
2487
 
    hardcode_minus_L=yes # Not in the search PATH, but as the default
2488
 
                         # location of the library.
2489
 
    export_dynamic_flag_spec='${wl}-E'
2490
 
    ;;
2491
 
 
2492
 
  irix5* | irix6* | nonstopux*)
2493
 
    if test "$GCC" = yes; then
2494
 
      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'
2495
 
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2496
 
    else
2497
 
      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'
2498
 
      hardcode_libdir_flag_spec='-rpath $libdir'
2499
 
    fi
2500
 
    hardcode_libdir_separator=:
2501
 
    link_all_deplibs=yes
2502
 
    ;;
2503
 
 
2504
 
  netbsd*)
2505
 
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2506
 
      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
2507
 
    else
2508
 
      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
2509
 
    fi
2510
 
    hardcode_libdir_flag_spec='-R$libdir'
2511
 
    hardcode_direct=yes
2512
 
    hardcode_shlibpath_var=no
2513
 
    ;;
2514
 
 
2515
 
  newsos6)
2516
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2517
 
    hardcode_direct=yes
2518
 
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2519
 
    hardcode_libdir_separator=:
2520
 
    hardcode_shlibpath_var=no
2521
 
    ;;
2522
 
 
2523
 
  openbsd*)
2524
 
    hardcode_direct=yes
2525
 
    hardcode_shlibpath_var=no
2526
 
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2527
 
      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2528
 
      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2529
 
      export_dynamic_flag_spec='${wl}-E'
2530
 
    else
2531
 
      case "$host_os" in
2532
 
      openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2533
 
        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2534
 
        hardcode_libdir_flag_spec='-R$libdir'
2535
 
        ;;
2536
 
      *)
2537
 
        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2538
 
        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2539
 
        ;;
2540
 
      esac
2541
 
    fi
2542
 
    ;;
2543
 
 
2544
 
  os2*)
2545
 
    hardcode_libdir_flag_spec='-L$libdir'
2546
 
    hardcode_minus_L=yes
2547
 
    allow_undefined_flag=unsupported
2548
 
    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'
2549
 
    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2550
 
    ;;
2551
 
 
2552
 
  osf3*)
2553
 
    if test "$GCC" = yes; then
2554
 
      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2555
 
      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'
2556
 
    else
2557
 
      allow_undefined_flag=' -expect_unresolved \*'
2558
 
      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'
2559
 
    fi
2560
 
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2561
 
    hardcode_libdir_separator=:
2562
 
    ;;
2563
 
 
2564
 
  osf4* | osf5*)        # as osf3* with the addition of -msym flag
2565
 
    if test "$GCC" = yes; then
2566
 
      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2567
 
      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'
2568
 
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2569
 
    else
2570
 
      allow_undefined_flag=' -expect_unresolved \*'
2571
 
      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'
2572
 
      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2573
 
      $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'
2574
 
 
2575
 
      #Both c and cxx compiler support -rpath directly
2576
 
      hardcode_libdir_flag_spec='-rpath $libdir'
2577
 
    fi
2578
 
    hardcode_libdir_separator=:
2579
 
    ;;
2580
 
 
2581
 
  sco3.2v5*)
2582
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2583
 
    hardcode_shlibpath_var=no
2584
 
    runpath_var=LD_RUN_PATH
2585
 
    hardcode_runpath_var=yes
2586
 
    export_dynamic_flag_spec='${wl}-Bexport'
2587
 
    ;;
2588
 
 
2589
 
  solaris*)
2590
 
    # gcc --version < 3.0 without binutils cannot create self contained
2591
 
    # shared libraries reliably, requiring libgcc.a to resolve some of
2592
 
    # the object symbols generated in some cases.  Libraries that use
2593
 
    # assert need libgcc.a to resolve __eprintf, for example.  Linking
2594
 
    # a copy of libgcc.a into every shared library to guarantee resolving
2595
 
    # such symbols causes other problems:  According to Tim Van Holder
2596
 
    # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2597
 
    # (to the application) exception stack for one thing.
2598
 
    no_undefined_flag=' -z defs'
2599
 
    if test "$GCC" = yes; then
2600
 
      case `$CC --version 2>/dev/null` in
2601
 
      [[12]].*)
2602
 
        cat <<EOF 1>&2
2603
 
 
2604
 
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2605
 
*** create self contained shared libraries on Solaris systems, without
2606
 
*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
2607
 
*** -no-undefined support, which will at least allow you to build shared
2608
 
*** libraries.  However, you may find that when you link such libraries
2609
 
*** into an application without using GCC, you have to manually add
2610
 
*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
2611
 
*** upgrade to a newer version of GCC.  Another option is to rebuild your
2612
 
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2613
 
 
2614
 
EOF
2615
 
        no_undefined_flag=
2616
 
        ;;
2617
 
      esac
2618
 
    fi
2619
 
    # $CC -shared without GNU ld will not create a library from C++
2620
 
    # object files and a static libstdc++, better avoid it by now
2621
 
    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2622
 
    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2623
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2624
 
    hardcode_libdir_flag_spec='-R$libdir'
2625
 
    hardcode_shlibpath_var=no
2626
 
    case $host_os in
2627
 
    solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2628
 
    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2629
 
      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2630
 
    esac
2631
 
    link_all_deplibs=yes
2632
 
    ;;
2633
 
 
2634
 
  sunos4*)
2635
 
    if test "x$host_vendor" = xsequent; then
2636
 
      # Use $CC to link under sequent, because it throws in some extra .o
2637
 
      # files that make .init and .fini sections work.
2638
 
      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2639
 
    else
2640
 
      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2641
 
    fi
2642
 
    hardcode_libdir_flag_spec='-L$libdir'
2643
 
    hardcode_direct=yes
2644
 
    hardcode_minus_L=yes
2645
 
    hardcode_shlibpath_var=no
2646
 
    ;;
2647
 
 
2648
 
  sysv4)
2649
 
    case $host_vendor in
2650
 
      sni)
2651
 
        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2652
 
        hardcode_direct=yes # is this really true???
2653
 
        ;;
2654
 
      siemens)
2655
 
        ## LD is ld it makes a PLAMLIB
2656
 
        ## CC just makes a GrossModule.
2657
 
        archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2658
 
        reload_cmds='$CC -r -o $output$reload_objs'
2659
 
        hardcode_direct=no
2660
 
        ;;
2661
 
      motorola)
2662
 
        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2663
 
        hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2664
 
        ;;
2665
 
    esac
2666
 
    runpath_var='LD_RUN_PATH'
2667
 
    hardcode_shlibpath_var=no
2668
 
    ;;
2669
 
 
2670
 
  sysv4.3*)
2671
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2672
 
    hardcode_shlibpath_var=no
2673
 
    export_dynamic_flag_spec='-Bexport'
2674
 
    ;;
2675
 
 
2676
 
  sysv5*)
2677
 
    no_undefined_flag=' -z text'
2678
 
    # $CC -shared without GNU ld will not create a library from C++
2679
 
    # object files and a static libstdc++, better avoid it by now
2680
 
    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2681
 
    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2682
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2683
 
    hardcode_libdir_flag_spec=
2684
 
    hardcode_shlibpath_var=no
2685
 
    runpath_var='LD_RUN_PATH'
2686
 
    ;;
2687
 
 
2688
 
  uts4*)
2689
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2690
 
    hardcode_libdir_flag_spec='-L$libdir'
2691
 
    hardcode_shlibpath_var=no
2692
 
    ;;
2693
 
 
2694
 
  dgux*)
2695
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2696
 
    hardcode_libdir_flag_spec='-L$libdir'
2697
 
    hardcode_shlibpath_var=no
2698
 
    ;;
2699
 
 
2700
 
  sysv4*MP*)
2701
 
    if test -d /usr/nec; then
2702
 
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2703
 
      hardcode_shlibpath_var=no
2704
 
      runpath_var=LD_RUN_PATH
2705
 
      hardcode_runpath_var=yes
2706
 
      ld_shlibs=yes
2707
 
    fi
2708
 
    ;;
2709
 
 
2710
 
  sysv4.2uw2*)
2711
 
    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2712
 
    hardcode_direct=yes
2713
 
    hardcode_minus_L=no
2714
 
    hardcode_shlibpath_var=no
2715
 
    hardcode_runpath_var=yes
2716
 
    runpath_var=LD_RUN_PATH
2717
 
    ;;
2718
 
 
2719
 
  sysv5uw7* | unixware7*)
2720
 
    no_undefined_flag='${wl}-z ${wl}text'
2721
 
    if test "$GCC" = yes; then
2722
 
      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2723
 
    else
2724
 
      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2725
 
    fi
2726
 
    runpath_var='LD_RUN_PATH'
2727
 
    hardcode_shlibpath_var=no
2728
 
    ;;
2729
 
 
2730
 
  *)
2731
 
    ld_shlibs=no
2732
 
    ;;
2733
 
  esac
 
1881
  # MS-DOS does not allow filenames that begin with a dot.
 
1882
  lt_cv_objdir=_libs
2734
1883
fi
2735
 
AC_MSG_RESULT([$ld_shlibs])
2736
 
test "$ld_shlibs" = no && can_build_shared=no
2737
 
 
 
1884
rmdir .libs 2>/dev/null])
 
1885
objdir=$lt_cv_objdir
 
1886
])# AC_LIBTOOL_OBJDIR
 
1887
 
 
1888
 
 
1889
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
 
1890
# ----------------------------------------------
2738
1891
# Check hardcoding attributes.
2739
 
AC_MSG_CHECKING([how to hardcode library paths into programs])
2740
 
hardcode_action=
2741
 
if test -n "$hardcode_libdir_flag_spec" || \
2742
 
   test -n "$runpath_var"; then
 
1892
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
 
1893
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
1894
_LT_AC_TAGVAR(hardcode_action, $1)=
 
1895
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
 
1896
   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
 
1897
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
2743
1898
 
2744
1899
  # We can hardcode non-existant directories.
2745
 
  if test "$hardcode_direct" != no &&
 
1900
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2746
1901
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2747
1902
     # have to relink, otherwise we might link with an installed library
2748
1903
     # when we should be linking with a yet-to-be-installed one
2749
 
     ## test "$hardcode_shlibpath_var" != no &&
2750
 
     test "$hardcode_minus_L" != no; then
 
1904
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
1905
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2751
1906
    # Linking always hardcodes the temporary library directory.
2752
 
    hardcode_action=relink
 
1907
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2753
1908
  else
2754
1909
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2755
 
    hardcode_action=immediate
 
1910
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2756
1911
  fi
2757
1912
else
2758
1913
  # We cannot hardcode anything, or else we can only hardcode existing
2759
1914
  # directories.
2760
 
  hardcode_action=unsupported
2761
 
fi
2762
 
AC_MSG_RESULT([$hardcode_action])
2763
 
 
2764
 
striplib=
 
1915
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 
1916
fi
 
1917
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
1918
 
 
1919
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
 
1920
  # Fast installation is not supported
 
1921
  enable_fast_install=no
 
1922
elif test "$shlibpath_overrides_runpath" = yes ||
 
1923
     test "$enable_shared" = no; then
 
1924
  # Fast installation is not necessary
 
1925
  enable_fast_install=needless
 
1926
fi
 
1927
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
1928
 
 
1929
 
 
1930
# AC_LIBTOOL_SYS_LIB_STRIP
 
1931
# ------------------------
 
1932
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
 
1933
[striplib=
2765
1934
old_striplib=
2766
1935
AC_MSG_CHECKING([whether stripping libraries is possible])
2767
1936
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2769
1938
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2770
1939
  AC_MSG_RESULT([yes])
2771
1940
else
2772
 
  AC_MSG_RESULT([no])
2773
 
fi
2774
 
 
2775
 
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2776
 
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2777
 
 
 
1941
# FIXME - insert some real tests, host_os isn't really good enough
 
1942
  case $host_os in
 
1943
   darwin*)
 
1944
       if test -n "$STRIP" ; then
 
1945
         striplib="$STRIP -x"
 
1946
         AC_MSG_RESULT([yes])
 
1947
       else
 
1948
  AC_MSG_RESULT([no])
 
1949
fi
 
1950
       ;;
 
1951
   *)
 
1952
  AC_MSG_RESULT([no])
 
1953
    ;;
 
1954
  esac
 
1955
fi
 
1956
])# AC_LIBTOOL_SYS_LIB_STRIP
 
1957
 
 
1958
 
 
1959
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
1960
# -----------------------------
2778
1961
# PORTME Fill in your ld.so characteristics
2779
 
AC_MSG_CHECKING([dynamic linker characteristics])
 
1962
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 
1963
[AC_MSG_CHECKING([dynamic linker characteristics])
2780
1964
library_names_spec=
2781
1965
libname_spec='lib$name'
2782
1966
soname_spec=
 
1967
shrext_cmds=".so"
2783
1968
postinstall_cmds=
2784
1969
postuninstall_cmds=
2785
1970
finish_cmds=
2789
1974
version_type=none
2790
1975
dynamic_linker="$host_os ld.so"
2791
1976
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2792
 
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
1977
if test "$GCC" = yes; then
 
1978
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
1979
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
 
1980
    # if the path contains ";" then we assume it to be the separator
 
1981
    # otherwise default to the standard path separator (i.e. ":") - it is
 
1982
    # assumed that no part of a normal pathname contains ";" but that should
 
1983
    # okay in the real world where ";" in dirpaths is itself problematic.
 
1984
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
1985
  else
 
1986
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
1987
  fi
 
1988
else
 
1989
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
1990
fi
 
1991
need_lib_prefix=unknown
 
1992
hardcode_into_libs=no
 
1993
 
 
1994
# when you set need_version to no, make sure it does not cause -set_version
 
1995
# flags to be left without arguments
 
1996
need_version=unknown
2793
1997
 
2794
1998
case $host_os in
2795
1999
aix3*)
2796
2000
  version_type=linux
2797
 
  library_names_spec='${libname}${release}.so$versuffix $libname.a'
 
2001
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2798
2002
  shlibpath_var=LIBPATH
2799
2003
 
2800
 
  # AIX has no versioning support, so we append a major version to the name.
2801
 
  soname_spec='${libname}${release}.so$major'
 
2004
  # AIX 3 has no versioning support, so we append a major version to the name.
 
2005
  soname_spec='${libname}${release}${shared_ext}$major'
2802
2006
  ;;
2803
2007
 
2804
2008
aix4* | aix5*)
2808
2012
  hardcode_into_libs=yes
2809
2013
  if test "$host_cpu" = ia64; then
2810
2014
    # AIX 5 supports IA64
2811
 
    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
 
2015
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2812
2016
    shlibpath_var=LD_LIBRARY_PATH
2813
2017
  else
2814
2018
    # With GCC up to 2.95.x, collect2 would create an import file
2818
2022
    # development snapshots of GCC prior to 3.0.
2819
2023
    case $host_os in
2820
2024
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2821
 
        if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2822
 
             echo ' yes '
2823
 
             echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2824
 
          :
2825
 
        else
2826
 
          can_build_shared=no
2827
 
        fi
2828
 
        ;;
 
2025
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
2026
           echo ' yes '
 
2027
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 
2028
        :
 
2029
      else
 
2030
        can_build_shared=no
 
2031
      fi
 
2032
      ;;
2829
2033
    esac
2830
 
    # AIX (on Power*) has no versioning support, so currently we can
2831
 
    # not hardcode correct soname into executable. Probably we can
2832
 
    # add versioning support to collect2, so additional links can
2833
 
    # be useful in future.
 
2034
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
2035
    # soname into executable. Probably we can add versioning support to
 
2036
    # collect2, so additional links can be useful in future.
2834
2037
    if test "$aix_use_runtimelinking" = yes; then
2835
2038
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2836
2039
      # instead of lib<name>.a to let people know that these are not
2837
2040
      # typical AIX shared libraries.
2838
 
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2041
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2839
2042
    else
2840
2043
      # We preserve .a as extension for shared libraries through AIX4.2
2841
2044
      # and later when we are not doing run time linking.
2842
2045
      library_names_spec='${libname}${release}.a $libname.a'
2843
 
      soname_spec='${libname}${release}.so$major'
 
2046
      soname_spec='${libname}${release}${shared_ext}$major'
2844
2047
    fi
2845
2048
    shlibpath_var=LIBPATH
2846
2049
  fi
2847
 
  hardcode_into_libs=yes
2848
2050
  ;;
2849
2051
 
2850
2052
amigaos*)
2851
2053
  library_names_spec='$libname.ixlibrary $libname.a'
2852
2054
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2853
 
  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'
 
2055
  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'
2854
2056
  ;;
2855
2057
 
2856
2058
beos*)
2857
 
  library_names_spec='${libname}.so'
 
2059
  library_names_spec='${libname}${shared_ext}'
2858
2060
  dynamic_linker="$host_os ld.so"
2859
2061
  shlibpath_var=LIBRARY_PATH
2860
2062
  ;;
2862
2064
bsdi4*)
2863
2065
  version_type=linux
2864
2066
  need_version=no
2865
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2866
 
  soname_spec='${libname}${release}.so$major'
 
2067
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2068
  soname_spec='${libname}${release}${shared_ext}$major'
2867
2069
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2868
2070
  shlibpath_var=LD_LIBRARY_PATH
2869
2071
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2870
2072
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2871
 
  export_dynamic_flag_spec=-rdynamic
2872
2073
  # the default ld.so.conf also contains /usr/contrib/lib and
2873
2074
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2874
2075
  # libtool to hard-code these into programs
2876
2077
 
2877
2078
cygwin* | mingw* | pw32*)
2878
2079
  version_type=windows
 
2080
  shrext_cmds=".dll"
2879
2081
  need_version=no
2880
2082
  need_lib_prefix=no
 
2083
 
2881
2084
  case $GCC,$host_os in
2882
 
  yes,cygwin*)
 
2085
  yes,cygwin* | yes,mingw* | yes,pw32*)
2883
2086
    library_names_spec='$libname.dll.a'
2884
 
    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2885
 
    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
 
2087
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
2088
    postinstall_cmds='base_file=`basename \${file}`~
 
2089
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2886
2090
      dldir=$destdir/`dirname \$dlpath`~
2887
2091
      test -d \$dldir || mkdir -p \$dldir~
2888
 
      $install_prog .libs/$dlname \$dldir/$dlname'
2889
 
    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
2092
      $install_prog $dir/$dlname \$dldir/$dlname'
 
2093
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2890
2094
      dlpath=$dir/\$dldll~
2891
2095
       $rm \$dlpath'
2892
 
    ;;
2893
 
  yes,mingw*)
2894
 
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2895
 
    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2896
 
    ;;
2897
 
  yes,pw32*)
2898
 
    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2899
 
    ;;
 
2096
    shlibpath_overrides_runpath=yes
 
2097
 
 
2098
    case $host_os in
 
2099
    cygwin*)
 
2100
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
2101
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
2102
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
2103
      ;;
 
2104
    mingw*)
 
2105
      # MinGW DLLs use traditional 'lib' prefix
 
2106
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
2107
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
2108
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
 
2109
        # It is most probably a Windows format PATH printed by
 
2110
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
2111
        # path with ; separators, and with drive letters. We can handle the
 
2112
        # drive letters (cygwin fileutils understands them), so leave them,
 
2113
        # especially as we might pass files found there to a mingw objdump,
 
2114
        # which wouldn't understand a cygwinified path. Ahh.
 
2115
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
2116
      else
 
2117
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
2118
      fi
 
2119
      ;;
 
2120
    pw32*)
 
2121
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
2122
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
2123
      ;;
 
2124
    esac
 
2125
    ;;
 
2126
 
2900
2127
  *)
2901
 
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
 
2128
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2902
2129
    ;;
2903
2130
  esac
2904
2131
  dynamic_linker='Win32 ld.exe'
2911
2138
  version_type=darwin
2912
2139
  need_lib_prefix=no
2913
2140
  need_version=no
2914
 
  # FIXME: Relying on posixy $() will cause problems for
2915
 
  #        cross-compilation, but unfortunately the echo tests do not
2916
 
  #        yet detect zsh echo's removal of \ escapes.
2917
 
  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)'
2918
 
  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
 
2141
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
2142
  soname_spec='${libname}${release}${major}$shared_ext'
2919
2143
  shlibpath_overrides_runpath=yes
2920
2144
  shlibpath_var=DYLD_LIBRARY_PATH
 
2145
  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
 
2146
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
 
2147
  if test "$GCC" = yes; then
 
2148
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
 
2149
  else
 
2150
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
 
2151
  fi
 
2152
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
2153
  ;;
 
2154
 
 
2155
dgux*)
 
2156
  version_type=linux
 
2157
  need_lib_prefix=no
 
2158
  need_version=no
 
2159
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
2160
  soname_spec='${libname}${release}${shared_ext}$major'
 
2161
  shlibpath_var=LD_LIBRARY_PATH
2921
2162
  ;;
2922
2163
 
2923
2164
freebsd1*)
2924
2165
  dynamic_linker=no
2925
2166
  ;;
2926
2167
 
2927
 
freebsd*-gnu*)
 
2168
kfreebsd*-gnu)
2928
2169
  version_type=linux
2929
2170
  need_lib_prefix=no
2930
2171
  need_version=no
2931
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2932
 
  soname_spec='${libname}${release}.so$major'
 
2172
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
2173
  soname_spec='${libname}${release}${shared_ext}$major'
2933
2174
  shlibpath_var=LD_LIBRARY_PATH
2934
2175
  shlibpath_overrides_runpath=no
2935
2176
  hardcode_into_libs=yes
2936
 
  dynamic_linker='GNU/FreeBSD ld.so'
 
2177
  dynamic_linker='GNU ld.so'
2937
2178
  ;;
2938
2179
 
2939
2180
freebsd*)
2941
2182
  version_type=freebsd-$objformat
2942
2183
  case $version_type in
2943
2184
    freebsd-elf*)
2944
 
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
2185
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2945
2186
      need_version=no
2946
2187
      need_lib_prefix=no
2947
2188
      ;;
2948
2189
    freebsd-*)
2949
 
      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
 
2190
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2950
2191
      need_version=yes
2951
2192
      ;;
2952
2193
  esac
2955
2196
  freebsd2*)
2956
2197
    shlibpath_overrides_runpath=yes
2957
2198
    ;;
2958
 
  *)
 
2199
  freebsd3.[01]* | freebsdelf3.[01]*)
 
2200
    shlibpath_overrides_runpath=yes
 
2201
    hardcode_into_libs=yes
 
2202
    ;;
 
2203
  *) # from 3.2 on
2959
2204
    shlibpath_overrides_runpath=no
2960
2205
    hardcode_into_libs=yes
2961
2206
    ;;
2966
2211
  version_type=linux
2967
2212
  need_lib_prefix=no
2968
2213
  need_version=no
2969
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2970
 
  soname_spec='${libname}${release}.so$major'
 
2214
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
2215
  soname_spec='${libname}${release}${shared_ext}$major'
2971
2216
  shlibpath_var=LD_LIBRARY_PATH
2972
2217
  hardcode_into_libs=yes
2973
2218
  ;;
2975
2220
hpux9* | hpux10* | hpux11*)
2976
2221
  # Give a soname corresponding to the major version so that dld.sl refuses to
2977
2222
  # link against other versions.
2978
 
  dynamic_linker="$host_os dld.sl"
2979
2223
  version_type=sunos
2980
2224
  need_lib_prefix=no
2981
2225
  need_version=no
2982
 
  shlibpath_var=SHLIB_PATH
2983
 
  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2984
 
  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2985
 
  soname_spec='${libname}${release}.sl$major'
 
2226
  case "$host_cpu" in
 
2227
  ia64*)
 
2228
    shrext_cmds='.so'
 
2229
    hardcode_into_libs=yes
 
2230
    dynamic_linker="$host_os dld.so"
 
2231
    shlibpath_var=LD_LIBRARY_PATH
 
2232
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
2233
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2234
    soname_spec='${libname}${release}${shared_ext}$major'
 
2235
    if test "X$HPUX_IA64_MODE" = X32; then
 
2236
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
2237
    else
 
2238
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
2239
    fi
 
2240
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
2241
    ;;
 
2242
   hppa*64*)
 
2243
     shrext_cmds='.sl'
 
2244
     hardcode_into_libs=yes
 
2245
     dynamic_linker="$host_os dld.sl"
 
2246
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
2247
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
2248
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2249
     soname_spec='${libname}${release}${shared_ext}$major'
 
2250
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
2251
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
2252
     ;;
 
2253
   *)
 
2254
    shrext_cmds='.sl'
 
2255
    dynamic_linker="$host_os dld.sl"
 
2256
    shlibpath_var=SHLIB_PATH
 
2257
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
2258
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2259
    soname_spec='${libname}${release}${shared_ext}$major'
 
2260
    ;;
 
2261
  esac
2986
2262
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2987
2263
  postinstall_cmds='chmod 555 $lib'
2988
2264
  ;;
2990
2266
irix5* | irix6* | nonstopux*)
2991
2267
  case $host_os in
2992
2268
    nonstopux*) version_type=nonstopux ;;
2993
 
    *)          version_type=irix ;;
 
2269
    *)
 
2270
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
2271
                version_type=linux
 
2272
        else
 
2273
                version_type=irix
 
2274
        fi ;;
2994
2275
  esac
2995
2276
  need_lib_prefix=no
2996
2277
  need_version=no
2997
 
  soname_spec='${libname}${release}.so$major'
2998
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
 
2278
  soname_spec='${libname}${release}${shared_ext}$major'
 
2279
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2999
2280
  case $host_os in
3000
2281
  irix5* | nonstopux*)
3001
2282
    libsuff= shlibsuff=
3002
2283
    ;;
3003
2284
  *)
3004
2285
    case $LD in # libtool.m4 will add one of these switches to LD
3005
 
    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
3006
 
    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
3007
 
    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
2286
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
2287
      libsuff= shlibsuff= libmagic=32-bit;;
 
2288
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
2289
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
2290
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
2291
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3008
2292
    *) libsuff= shlibsuff= libmagic=never-match;;
3009
2293
    esac
3010
2294
    ;;
3013
2297
  shlibpath_overrides_runpath=no
3014
2298
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3015
2299
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
2300
  hardcode_into_libs=yes
3016
2301
  ;;
3017
2302
 
3018
2303
# No shared lib support for Linux oldld, aout, or coff.
3019
 
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
 
2304
linux*oldld* | linux*aout* | linux*coff*)
3020
2305
  dynamic_linker=no
3021
2306
  ;;
3022
2307
 
3023
2308
# This must be Linux ELF.
3024
 
linux-gnu*)
 
2309
linux*)
3025
2310
  version_type=linux
3026
2311
  need_lib_prefix=no
3027
2312
  need_version=no
3028
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3029
 
  soname_spec='${libname}${release}.so$major'
 
2313
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2314
  soname_spec='${libname}${release}${shared_ext}$major'
3030
2315
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3031
2316
  shlibpath_var=LD_LIBRARY_PATH
3032
2317
  shlibpath_overrides_runpath=no
3035
2320
  # before this can be enabled.
3036
2321
  hardcode_into_libs=yes
3037
2322
 
 
2323
  # Append ld.so.conf contents to the search path
 
2324
  if test -f /etc/ld.so.conf; then
 
2325
    lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
 
2326
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
2327
  fi
 
2328
 
3038
2329
  # We used to test for /lib/ld.so.1 and disable shared libraries on
3039
2330
  # powerpc, because MkLinux only supported shared libraries with the
3040
2331
  # GNU dynamic linker.  Since this was broken with cross compilers,
3044
2335
  dynamic_linker='GNU/Linux ld.so'
3045
2336
  ;;
3046
2337
 
 
2338
netbsdelf*-gnu)
 
2339
  version_type=linux
 
2340
  need_lib_prefix=no
 
2341
  need_version=no
 
2342
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
2343
  soname_spec='${libname}${release}${shared_ext}$major'
 
2344
  shlibpath_var=LD_LIBRARY_PATH
 
2345
  shlibpath_overrides_runpath=no
 
2346
  hardcode_into_libs=yes
 
2347
  dynamic_linker='NetBSD ld.elf_so'
 
2348
  ;;
 
2349
 
 
2350
knetbsd*-gnu)
 
2351
  version_type=linux
 
2352
  need_lib_prefix=no
 
2353
  need_version=no
 
2354
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
2355
  soname_spec='${libname}${release}${shared_ext}$major'
 
2356
  shlibpath_var=LD_LIBRARY_PATH
 
2357
  shlibpath_overrides_runpath=no
 
2358
  hardcode_into_libs=yes
 
2359
  dynamic_linker='GNU ld.so'
 
2360
  ;;
 
2361
 
3047
2362
netbsd*)
3048
2363
  version_type=sunos
3049
2364
  need_lib_prefix=no
3050
2365
  need_version=no
3051
2366
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3052
 
    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
2367
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3053
2368
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3054
2369
    dynamic_linker='NetBSD (a.out) ld.so'
3055
2370
  else
3056
 
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3057
 
    soname_spec='${libname}${release}.so$major'
 
2371
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
2372
    soname_spec='${libname}${release}${shared_ext}$major'
3058
2373
    dynamic_linker='NetBSD ld.elf_so'
3059
2374
  fi
3060
2375
  shlibpath_var=LD_LIBRARY_PATH
3064
2379
 
3065
2380
newsos6)
3066
2381
  version_type=linux
3067
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2382
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2383
  shlibpath_var=LD_LIBRARY_PATH
 
2384
  shlibpath_overrides_runpath=yes
 
2385
  ;;
 
2386
 
 
2387
nto-qnx*)
 
2388
  version_type=linux
 
2389
  need_lib_prefix=no
 
2390
  need_version=no
 
2391
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2392
  soname_spec='${libname}${release}${shared_ext}$major'
3068
2393
  shlibpath_var=LD_LIBRARY_PATH
3069
2394
  shlibpath_overrides_runpath=yes
3070
2395
  ;;
3072
2397
openbsd*)
3073
2398
  version_type=sunos
3074
2399
  need_lib_prefix=no
3075
 
  need_version=no
3076
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3077
 
    case "$host_os" in
3078
 
    openbsd2.[[89]] | openbsd2.[[89]].*)
3079
 
      shlibpath_overrides_runpath=no
3080
 
      ;;
3081
 
    *)
3082
 
      shlibpath_overrides_runpath=yes
3083
 
      ;;
3084
 
    esac
3085
 
  else
3086
 
    shlibpath_overrides_runpath=yes
3087
 
  fi
3088
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
2400
  need_version=yes
 
2401
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3089
2402
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3090
2403
  shlibpath_var=LD_LIBRARY_PATH
 
2404
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
2405
    case $host_os in
 
2406
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
2407
        shlibpath_overrides_runpath=no
 
2408
        ;;
 
2409
      *)
 
2410
        shlibpath_overrides_runpath=yes
 
2411
        ;;
 
2412
      esac
 
2413
  else
 
2414
    shlibpath_overrides_runpath=yes
 
2415
  fi
3091
2416
  ;;
3092
2417
 
3093
2418
os2*)
3094
2419
  libname_spec='$name'
 
2420
  shrext_cmds=".dll"
3095
2421
  need_lib_prefix=no
3096
 
  library_names_spec='$libname.dll $libname.a'
 
2422
  library_names_spec='$libname${shared_ext} $libname.a'
3097
2423
  dynamic_linker='OS/2 ld.exe'
3098
2424
  shlibpath_var=LIBPATH
3099
2425
  ;;
3100
2426
 
3101
2427
osf3* | osf4* | osf5*)
3102
2428
  version_type=osf
 
2429
  need_lib_prefix=no
3103
2430
  need_version=no
3104
 
  need_lib_prefix=no
3105
 
  soname_spec='${libname}${release}.so$major'
3106
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2431
  soname_spec='${libname}${release}${shared_ext}$major'
 
2432
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3107
2433
  shlibpath_var=LD_LIBRARY_PATH
3108
2434
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3109
2435
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3110
 
  hardcode_into_libs=yes
3111
2436
  ;;
3112
2437
 
3113
2438
sco3.2v5*)
3114
2439
  version_type=osf
3115
 
  soname_spec='${libname}${release}.so$major'
3116
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2440
  soname_spec='${libname}${release}${shared_ext}$major'
 
2441
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3117
2442
  shlibpath_var=LD_LIBRARY_PATH
3118
2443
  ;;
3119
2444
 
3121
2446
  version_type=linux
3122
2447
  need_lib_prefix=no
3123
2448
  need_version=no
3124
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3125
 
  soname_spec='${libname}${release}.so$major'
 
2449
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2450
  soname_spec='${libname}${release}${shared_ext}$major'
3126
2451
  shlibpath_var=LD_LIBRARY_PATH
3127
2452
  shlibpath_overrides_runpath=yes
3128
2453
  hardcode_into_libs=yes
3132
2457
 
3133
2458
sunos4*)
3134
2459
  version_type=sunos
3135
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
2460
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3136
2461
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3137
2462
  shlibpath_var=LD_LIBRARY_PATH
3138
2463
  shlibpath_overrides_runpath=yes
3144
2469
 
3145
2470
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3146
2471
  version_type=linux
3147
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3148
 
  soname_spec='${libname}${release}.so$major'
 
2472
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2473
  soname_spec='${libname}${release}${shared_ext}$major'
3149
2474
  shlibpath_var=LD_LIBRARY_PATH
3150
2475
  case $host_vendor in
3151
2476
    sni)
3166
2491
  esac
3167
2492
  ;;
3168
2493
 
3169
 
uts4*)
3170
 
  version_type=linux
3171
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3172
 
  soname_spec='${libname}${release}.so$major'
3173
 
  shlibpath_var=LD_LIBRARY_PATH
3174
 
  ;;
3175
 
 
3176
 
dgux*)
3177
 
  version_type=linux
3178
 
  need_lib_prefix=no
3179
 
  need_version=no
3180
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3181
 
  soname_spec='${libname}${release}.so$major'
3182
 
  shlibpath_var=LD_LIBRARY_PATH
3183
 
  ;;
3184
 
 
3185
2494
sysv4*MP*)
3186
2495
  if test -d /usr/nec ;then
3187
2496
    version_type=linux
3188
 
    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3189
 
    soname_spec='$libname.so.$major'
 
2497
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
2498
    soname_spec='$libname${shared_ext}.$major'
3190
2499
    shlibpath_var=LD_LIBRARY_PATH
3191
2500
  fi
3192
2501
  ;;
3193
2502
 
 
2503
uts4*)
 
2504
  version_type=linux
 
2505
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2506
  soname_spec='${libname}${release}${shared_ext}$major'
 
2507
  shlibpath_var=LD_LIBRARY_PATH
 
2508
  ;;
 
2509
 
3194
2510
*)
3195
2511
  dynamic_linker=no
3196
2512
  ;;
3197
2513
esac
3198
2514
AC_MSG_RESULT([$dynamic_linker])
3199
2515
test "$dynamic_linker" = no && can_build_shared=no
3200
 
 
3201
 
# Report the final consequences.
 
2516
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
2517
 
 
2518
 
 
2519
# _LT_AC_TAGCONFIG
 
2520
# ----------------
 
2521
AC_DEFUN([_LT_AC_TAGCONFIG],
 
2522
[AC_ARG_WITH([tags],
 
2523
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
 
2524
        [include additional configurations @<:@automatic@:>@])],
 
2525
    [tagnames="$withval"])
 
2526
 
 
2527
if test -f "$ltmain" && test -n "$tagnames"; then
 
2528
  if test ! -f "${ofile}"; then
 
2529
    AC_MSG_WARN([output file `$ofile' does not exist])
 
2530
  fi
 
2531
 
 
2532
  if test -z "$LTCC"; then
 
2533
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
 
2534
    if test -z "$LTCC"; then
 
2535
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
 
2536
    else
 
2537
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
 
2538
    fi
 
2539
  fi
 
2540
 
 
2541
  # Extract list of available tagged configurations in $ofile.
 
2542
  # Note that this assumes the entire list is on one line.
 
2543
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
2544
 
 
2545
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
2546
  for tagname in $tagnames; do
 
2547
    IFS="$lt_save_ifs"
 
2548
    # Check whether tagname contains only valid characters
 
2549
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
 
2550
    "") ;;
 
2551
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
 
2552
        ;;
 
2553
    esac
 
2554
 
 
2555
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
 
2556
    then
 
2557
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
 
2558
    fi
 
2559
 
 
2560
    # Update the list of available tags.
 
2561
    if test -n "$tagname"; then
 
2562
      echo appending configuration tag \"$tagname\" to $ofile
 
2563
 
 
2564
      case $tagname in
 
2565
      CXX)
 
2566
        if test -n "$CXX" && test "X$CXX" != "Xno"; then
 
2567
          AC_LIBTOOL_LANG_CXX_CONFIG
 
2568
        else
 
2569
          tagname=""
 
2570
        fi
 
2571
        ;;
 
2572
 
 
2573
      F77)
 
2574
        if test -n "$F77" && test "X$F77" != "Xno"; then
 
2575
          AC_LIBTOOL_LANG_F77_CONFIG
 
2576
        else
 
2577
          tagname=""
 
2578
        fi
 
2579
        ;;
 
2580
 
 
2581
      GCJ)
 
2582
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
2583
          AC_LIBTOOL_LANG_GCJ_CONFIG
 
2584
        else
 
2585
          tagname=""
 
2586
        fi
 
2587
        ;;
 
2588
 
 
2589
      RC)
 
2590
        AC_LIBTOOL_LANG_RC_CONFIG
 
2591
        ;;
 
2592
 
 
2593
      *)
 
2594
        AC_MSG_ERROR([Unsupported tag name: $tagname])
 
2595
        ;;
 
2596
      esac
 
2597
 
 
2598
      # Append the new tag name to the list of available tags.
 
2599
      if test -n "$tagname" ; then
 
2600
      available_tags="$available_tags $tagname"
 
2601
    fi
 
2602
    fi
 
2603
  done
 
2604
  IFS="$lt_save_ifs"
 
2605
 
 
2606
  # Now substitute the updated list of available tags.
 
2607
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
 
2608
    mv "${ofile}T" "$ofile"
 
2609
    chmod +x "$ofile"
 
2610
  else
 
2611
    rm -f "${ofile}T"
 
2612
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
 
2613
  fi
 
2614
fi
 
2615
])# _LT_AC_TAGCONFIG
 
2616
 
 
2617
 
 
2618
# AC_LIBTOOL_DLOPEN
 
2619
# -----------------
 
2620
# enable checks for dlopen support
 
2621
AC_DEFUN([AC_LIBTOOL_DLOPEN],
 
2622
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
 
2623
])# AC_LIBTOOL_DLOPEN
 
2624
 
 
2625
 
 
2626
# AC_LIBTOOL_WIN32_DLL
 
2627
# --------------------
 
2628
# declare package support for building win32 dll's
 
2629
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
2630
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
 
2631
])# AC_LIBTOOL_WIN32_DLL
 
2632
 
 
2633
 
 
2634
# AC_ENABLE_SHARED([DEFAULT])
 
2635
# ---------------------------
 
2636
# implement the --enable-shared flag
 
2637
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
2638
AC_DEFUN([AC_ENABLE_SHARED],
 
2639
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
 
2640
AC_ARG_ENABLE([shared],
 
2641
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
2642
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
 
2643
    [p=${PACKAGE-default}
 
2644
    case $enableval in
 
2645
    yes) enable_shared=yes ;;
 
2646
    no) enable_shared=no ;;
 
2647
    *)
 
2648
      enable_shared=no
 
2649
      # Look at the argument we got.  We use all the common list separators.
 
2650
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
2651
      for pkg in $enableval; do
 
2652
        IFS="$lt_save_ifs"
 
2653
        if test "X$pkg" = "X$p"; then
 
2654
          enable_shared=yes
 
2655
        fi
 
2656
      done
 
2657
      IFS="$lt_save_ifs"
 
2658
      ;;
 
2659
    esac],
 
2660
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
 
2661
])# AC_ENABLE_SHARED
 
2662
 
 
2663
 
 
2664
# AC_DISABLE_SHARED
 
2665
# -----------------
 
2666
#- set the default shared flag to --disable-shared
 
2667
AC_DEFUN([AC_DISABLE_SHARED],
 
2668
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2669
AC_ENABLE_SHARED(no)
 
2670
])# AC_DISABLE_SHARED
 
2671
 
 
2672
 
 
2673
# AC_ENABLE_STATIC([DEFAULT])
 
2674
# ---------------------------
 
2675
# implement the --enable-static flag
 
2676
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
2677
AC_DEFUN([AC_ENABLE_STATIC],
 
2678
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
 
2679
AC_ARG_ENABLE([static],
 
2680
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
2681
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
 
2682
    [p=${PACKAGE-default}
 
2683
    case $enableval in
 
2684
    yes) enable_static=yes ;;
 
2685
    no) enable_static=no ;;
 
2686
    *)
 
2687
     enable_static=no
 
2688
      # Look at the argument we got.  We use all the common list separators.
 
2689
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
2690
      for pkg in $enableval; do
 
2691
        IFS="$lt_save_ifs"
 
2692
        if test "X$pkg" = "X$p"; then
 
2693
          enable_static=yes
 
2694
        fi
 
2695
      done
 
2696
      IFS="$lt_save_ifs"
 
2697
      ;;
 
2698
    esac],
 
2699
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
 
2700
])# AC_ENABLE_STATIC
 
2701
 
 
2702
 
 
2703
# AC_DISABLE_STATIC
 
2704
# -----------------
 
2705
# set the default static flag to --disable-static
 
2706
AC_DEFUN([AC_DISABLE_STATIC],
 
2707
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2708
AC_ENABLE_STATIC(no)
 
2709
])# AC_DISABLE_STATIC
 
2710
 
 
2711
 
 
2712
# AC_ENABLE_FAST_INSTALL([DEFAULT])
 
2713
# ---------------------------------
 
2714
# implement the --enable-fast-install flag
 
2715
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
2716
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
 
2717
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
 
2718
AC_ARG_ENABLE([fast-install],
 
2719
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
2720
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
2721
    [p=${PACKAGE-default}
 
2722
    case $enableval in
 
2723
    yes) enable_fast_install=yes ;;
 
2724
    no) enable_fast_install=no ;;
 
2725
    *)
 
2726
      enable_fast_install=no
 
2727
      # Look at the argument we got.  We use all the common list separators.
 
2728
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
2729
      for pkg in $enableval; do
 
2730
        IFS="$lt_save_ifs"
 
2731
        if test "X$pkg" = "X$p"; then
 
2732
          enable_fast_install=yes
 
2733
        fi
 
2734
      done
 
2735
      IFS="$lt_save_ifs"
 
2736
      ;;
 
2737
    esac],
 
2738
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
 
2739
])# AC_ENABLE_FAST_INSTALL
 
2740
 
 
2741
 
 
2742
# AC_DISABLE_FAST_INSTALL
 
2743
# -----------------------
 
2744
# set the default to --disable-fast-install
 
2745
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
 
2746
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2747
AC_ENABLE_FAST_INSTALL(no)
 
2748
])# AC_DISABLE_FAST_INSTALL
 
2749
 
 
2750
 
 
2751
# AC_LIBTOOL_PICMODE([MODE])
 
2752
# --------------------------
 
2753
# implement the --with-pic flag
 
2754
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
2755
AC_DEFUN([AC_LIBTOOL_PICMODE],
 
2756
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2757
pic_mode=ifelse($#,1,$1,default)
 
2758
])# AC_LIBTOOL_PICMODE
 
2759
 
 
2760
 
 
2761
# AC_PROG_EGREP
 
2762
# -------------
 
2763
# This is predefined starting with Autoconf 2.54, so this conditional
 
2764
# definition can be removed once we require Autoconf 2.54 or later.
 
2765
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
 
2766
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
 
2767
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
 
2768
    then ac_cv_prog_egrep='grep -E'
 
2769
    else ac_cv_prog_egrep='egrep'
 
2770
    fi])
 
2771
 EGREP=$ac_cv_prog_egrep
 
2772
 AC_SUBST([EGREP])
 
2773
])])
 
2774
 
 
2775
 
 
2776
# AC_PATH_TOOL_PREFIX
 
2777
# -------------------
 
2778
# find a file program which can recognise shared library
 
2779
AC_DEFUN([AC_PATH_TOOL_PREFIX],
 
2780
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
2781
AC_MSG_CHECKING([for $1])
 
2782
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
2783
[case $MAGIC_CMD in
 
2784
[[\\/*] |  ?:[\\/]*])
 
2785
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
2786
  ;;
 
2787
*)
 
2788
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
2789
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2790
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
2791
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
2792
dnl not every word.  This closes a longstanding sh security hole.
 
2793
  ac_dummy="ifelse([$2], , $PATH, [$2])"
 
2794
  for ac_dir in $ac_dummy; do
 
2795
    IFS="$lt_save_ifs"
 
2796
    test -z "$ac_dir" && ac_dir=.
 
2797
    if test -f $ac_dir/$1; then
 
2798
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
2799
      if test -n "$file_magic_test_file"; then
 
2800
        case $deplibs_check_method in
 
2801
        "file_magic "*)
 
2802
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
 
2803
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
2804
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
2805
            $EGREP "$file_magic_regex" > /dev/null; then
 
2806
            :
 
2807
          else
 
2808
            cat <<EOF 1>&2
 
2809
 
 
2810
*** Warning: the command libtool uses to detect shared libraries,
 
2811
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
2812
*** The result is that libtool may fail to recognize shared libraries
 
2813
*** as such.  This will affect the creation of libtool libraries that
 
2814
*** depend on shared libraries, but programs linked with such libtool
 
2815
*** libraries will work regardless of this problem.  Nevertheless, you
 
2816
*** may want to report the problem to your system manager and/or to
 
2817
*** bug-libtool@gnu.org
 
2818
 
 
2819
EOF
 
2820
          fi ;;
 
2821
        esac
 
2822
      fi
 
2823
      break
 
2824
    fi
 
2825
  done
 
2826
  IFS="$lt_save_ifs"
 
2827
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
2828
  ;;
 
2829
esac])
 
2830
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
2831
if test -n "$MAGIC_CMD"; then
 
2832
  AC_MSG_RESULT($MAGIC_CMD)
 
2833
else
 
2834
  AC_MSG_RESULT(no)
 
2835
fi
 
2836
])# AC_PATH_TOOL_PREFIX
 
2837
 
 
2838
 
 
2839
# AC_PATH_MAGIC
 
2840
# -------------
 
2841
# find a file program which can recognise a shared library
 
2842
AC_DEFUN([AC_PATH_MAGIC],
 
2843
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
2844
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
2845
  if test -n "$ac_tool_prefix"; then
 
2846
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
2847
  else
 
2848
    MAGIC_CMD=:
 
2849
  fi
 
2850
fi
 
2851
])# AC_PATH_MAGIC
 
2852
 
 
2853
 
 
2854
# AC_PROG_LD
 
2855
# ----------
 
2856
# find the pathname to the GNU or non-GNU linker
 
2857
AC_DEFUN([AC_PROG_LD],
 
2858
[AC_ARG_WITH([gnu-ld],
 
2859
    [AC_HELP_STRING([--with-gnu-ld],
 
2860
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
2861
    [test "$withval" = no || with_gnu_ld=yes],
 
2862
    [with_gnu_ld=no])
 
2863
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
2864
AC_REQUIRE([AC_PROG_CC])dnl
 
2865
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2866
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
2867
ac_prog=ld
 
2868
if test "$GCC" = yes; then
 
2869
  # Check if gcc -print-prog-name=ld gives a path.
 
2870
  AC_MSG_CHECKING([for ld used by $CC])
 
2871
  case $host in
 
2872
  *-*-mingw*)
 
2873
    # gcc leaves a trailing carriage return which upsets mingw
 
2874
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
2875
  *)
 
2876
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
2877
  esac
 
2878
  case $ac_prog in
 
2879
    # Accept absolute paths.
 
2880
    [[\\/]]* | ?:[[\\/]]*)
 
2881
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
2882
      # Canonicalize the pathname of ld
 
2883
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
 
2884
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
2885
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
 
2886
      done
 
2887
      test -z "$LD" && LD="$ac_prog"
 
2888
      ;;
 
2889
  "")
 
2890
    # If it fails, then pretend we aren't using GCC.
 
2891
    ac_prog=ld
 
2892
    ;;
 
2893
  *)
 
2894
    # If it is relative, then search for the first ld in PATH.
 
2895
    with_gnu_ld=unknown
 
2896
    ;;
 
2897
  esac
 
2898
elif test "$with_gnu_ld" = yes; then
 
2899
  AC_MSG_CHECKING([for GNU ld])
 
2900
else
 
2901
  AC_MSG_CHECKING([for non-GNU ld])
 
2902
fi
 
2903
AC_CACHE_VAL(lt_cv_path_LD,
 
2904
[if test -z "$LD"; then
 
2905
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2906
  for ac_dir in $PATH; do
 
2907
    IFS="$lt_save_ifs"
 
2908
    test -z "$ac_dir" && ac_dir=.
 
2909
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
2910
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
2911
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
2912
      # but apparently some GNU ld's only accept -v.
 
2913
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
2914
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
2915
      *GNU* | *'with BFD'*)
 
2916
        test "$with_gnu_ld" != no && break
 
2917
        ;;
 
2918
      *)
 
2919
        test "$with_gnu_ld" != yes && break
 
2920
        ;;
 
2921
      esac
 
2922
    fi
 
2923
  done
 
2924
  IFS="$lt_save_ifs"
 
2925
else
 
2926
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
2927
fi])
 
2928
LD="$lt_cv_path_LD"
 
2929
if test -n "$LD"; then
 
2930
  AC_MSG_RESULT($LD)
 
2931
else
 
2932
  AC_MSG_RESULT(no)
 
2933
fi
 
2934
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
2935
AC_PROG_LD_GNU
 
2936
])# AC_PROG_LD
 
2937
 
 
2938
 
 
2939
# AC_PROG_LD_GNU
 
2940
# --------------
 
2941
AC_DEFUN([AC_PROG_LD_GNU],
 
2942
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
2943
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
2944
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
2945
case `$LD -v 2>&1 </dev/null` in
 
2946
*GNU* | *'with BFD'*)
 
2947
  lt_cv_prog_gnu_ld=yes
 
2948
  ;;
 
2949
*)
 
2950
  lt_cv_prog_gnu_ld=no
 
2951
  ;;
 
2952
esac])
 
2953
with_gnu_ld=$lt_cv_prog_gnu_ld
 
2954
])# AC_PROG_LD_GNU
 
2955
 
 
2956
 
 
2957
# AC_PROG_LD_RELOAD_FLAG
 
2958
# ----------------------
 
2959
# find reload flag for linker
 
2960
#   -- PORTME Some linkers may need a different reload flag.
 
2961
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
 
2962
[AC_CACHE_CHECK([for $LD option to reload object files],
 
2963
  lt_cv_ld_reload_flag,
 
2964
  [lt_cv_ld_reload_flag='-r'])
 
2965
reload_flag=$lt_cv_ld_reload_flag
 
2966
case $reload_flag in
 
2967
"" | " "*) ;;
 
2968
*) reload_flag=" $reload_flag" ;;
 
2969
esac
 
2970
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
2971
])# AC_PROG_LD_RELOAD_FLAG
 
2972
 
 
2973
 
 
2974
# AC_DEPLIBS_CHECK_METHOD
 
2975
# -----------------------
 
2976
# how to check for library dependencies
 
2977
#  -- PORTME fill in with the dynamic library characteristics
 
2978
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
 
2979
[AC_CACHE_CHECK([how to recognise dependent libraries],
 
2980
lt_cv_deplibs_check_method,
 
2981
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
2982
lt_cv_file_magic_test_file=
 
2983
lt_cv_deplibs_check_method='unknown'
 
2984
# Need to set the preceding variable on all platforms that support
 
2985
# interlibrary dependencies.
 
2986
# 'none' -- dependencies not supported.
 
2987
# `unknown' -- same as none, but documents that we really don't know.
 
2988
# 'pass_all' -- all dependencies passed with no checks.
 
2989
# 'test_compile' -- check by making test program.
 
2990
# 'file_magic [[regex]]' -- check by looking for files in library path
 
2991
# which responds to the $file_magic_cmd with a given extended regex.
 
2992
# If you have `file' or equivalent on your system and you're not sure
 
2993
# whether `pass_all' will *always* work, you probably want this one.
 
2994
 
 
2995
case $host_os in
 
2996
aix4* | aix5*)
 
2997
  lt_cv_deplibs_check_method=pass_all
 
2998
  ;;
 
2999
 
 
3000
beos*)
 
3001
  lt_cv_deplibs_check_method=pass_all
 
3002
  ;;
 
3003
 
 
3004
bsdi4*)
 
3005
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
3006
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
3007
  lt_cv_file_magic_test_file=/shlib/libc.so
 
3008
  ;;
 
3009
 
 
3010
cygwin*)
 
3011
  # func_win32_libid is a shell function defined in ltmain.sh
 
3012
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
3013
  lt_cv_file_magic_cmd='func_win32_libid'
 
3014
  ;;
 
3015
 
 
3016
mingw* | pw32*)
 
3017
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
3018
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
 
3019
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
3020
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
3021
  ;;
 
3022
 
 
3023
darwin* | rhapsody*)
 
3024
  lt_cv_deplibs_check_method=pass_all
 
3025
  ;;
 
3026
 
 
3027
freebsd* | kfreebsd*-gnu)
 
3028
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
3029
    case $host_cpu in
 
3030
    i*86 )
 
3031
      # Not sure whether the presence of OpenBSD here was a mistake.
 
3032
      # Let's accept both of them until this is cleared up.
 
3033
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
 
3034
      lt_cv_file_magic_cmd=/usr/bin/file
 
3035
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
3036
      ;;
 
3037
    esac
 
3038
  else
 
3039
    lt_cv_deplibs_check_method=pass_all
 
3040
  fi
 
3041
  ;;
 
3042
 
 
3043
gnu*)
 
3044
  lt_cv_deplibs_check_method=pass_all
 
3045
  ;;
 
3046
 
 
3047
hpux10.20* | hpux11*)
 
3048
  lt_cv_file_magic_cmd=/usr/bin/file
 
3049
  case "$host_cpu" in
 
3050
  ia64*)
 
3051
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
3052
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
3053
    ;;
 
3054
  hppa*64*)
 
3055
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
 
3056
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
3057
    ;;
 
3058
  *)
 
3059
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
3060
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
3061
    ;;
 
3062
  esac
 
3063
  ;;
 
3064
 
 
3065
irix5* | irix6* | nonstopux*)
 
3066
  case $LD in
 
3067
  *-32|*"-32 ") libmagic=32-bit;;
 
3068
  *-n32|*"-n32 ") libmagic=N32;;
 
3069
  *-64|*"-64 ") libmagic=64-bit;;
 
3070
  *) libmagic=never-match;;
 
3071
  esac
 
3072
  lt_cv_deplibs_check_method=pass_all
 
3073
  ;;
 
3074
 
 
3075
# This must be Linux ELF.
 
3076
linux*)
 
3077
  lt_cv_deplibs_check_method=pass_all
 
3078
  ;;
 
3079
 
 
3080
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
3081
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
3082
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
3083
  else
 
3084
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
3085
  fi
 
3086
  ;;
 
3087
 
 
3088
newos6*)
 
3089
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
3090
  lt_cv_file_magic_cmd=/usr/bin/file
 
3091
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
3092
  ;;
 
3093
 
 
3094
nto-qnx*)
 
3095
  lt_cv_deplibs_check_method=unknown
 
3096
  ;;
 
3097
 
 
3098
openbsd*)
 
3099
  lt_cv_file_magic_cmd=/usr/bin/file
 
3100
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
3101
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3102
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
 
3103
  else
 
3104
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
 
3105
  fi
 
3106
  ;;
 
3107
 
 
3108
osf3* | osf4* | osf5*)
 
3109
  lt_cv_deplibs_check_method=pass_all
 
3110
  ;;
 
3111
 
 
3112
sco3.2v5*)
 
3113
  lt_cv_deplibs_check_method=pass_all
 
3114
  ;;
 
3115
 
 
3116
solaris*)
 
3117
  lt_cv_deplibs_check_method=pass_all
 
3118
  ;;
 
3119
 
 
3120
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
3121
  case $host_vendor in
 
3122
  motorola)
 
3123
    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]]'
 
3124
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
3125
    ;;
 
3126
  ncr)
 
3127
    lt_cv_deplibs_check_method=pass_all
 
3128
    ;;
 
3129
  sequent)
 
3130
    lt_cv_file_magic_cmd='/bin/file'
 
3131
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
3132
    ;;
 
3133
  sni)
 
3134
    lt_cv_file_magic_cmd='/bin/file'
 
3135
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
3136
    lt_cv_file_magic_test_file=/lib/libc.so
 
3137
    ;;
 
3138
  siemens)
 
3139
    lt_cv_deplibs_check_method=pass_all
 
3140
    ;;
 
3141
  esac
 
3142
  ;;
 
3143
 
 
3144
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
 
3145
  lt_cv_deplibs_check_method=pass_all
 
3146
  ;;
 
3147
esac
 
3148
])
 
3149
file_magic_cmd=$lt_cv_file_magic_cmd
 
3150
deplibs_check_method=$lt_cv_deplibs_check_method
 
3151
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
3152
])# AC_DEPLIBS_CHECK_METHOD
 
3153
 
 
3154
 
 
3155
# AC_PROG_NM
 
3156
# ----------
 
3157
# find the pathname to a BSD-compatible name lister
 
3158
AC_DEFUN([AC_PROG_NM],
 
3159
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
 
3160
[if test -n "$NM"; then
 
3161
  # Let the user override the test.
 
3162
  lt_cv_path_NM="$NM"
 
3163
else
 
3164
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3165
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
 
3166
    IFS="$lt_save_ifs"
 
3167
    test -z "$ac_dir" && ac_dir=.
 
3168
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
 
3169
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
3170
      # Check to see if the nm accepts a BSD-compat flag.
 
3171
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
3172
      #   nm: unknown option "B" ignored
 
3173
      # Tru64's nm complains that /dev/null is an invalid object file
 
3174
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
3175
      */dev/null* | *'Invalid file or object type'*)
 
3176
        lt_cv_path_NM="$tmp_nm -B"
 
3177
        break
 
3178
        ;;
 
3179
      *)
 
3180
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
3181
        */dev/null*)
 
3182
          lt_cv_path_NM="$tmp_nm -p"
 
3183
          break
 
3184
          ;;
 
3185
        *)
 
3186
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
3187
          continue # so that we can try to find one that supports BSD flags
 
3188
          ;;
 
3189
        esac
 
3190
      esac
 
3191
    fi
 
3192
  done
 
3193
  IFS="$lt_save_ifs"
 
3194
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 
3195
fi])
 
3196
NM="$lt_cv_path_NM"
 
3197
])# AC_PROG_NM
 
3198
 
 
3199
 
 
3200
# AC_CHECK_LIBM
 
3201
# -------------
 
3202
# check for math library
 
3203
AC_DEFUN([AC_CHECK_LIBM],
 
3204
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3205
LIBM=
 
3206
case $host in
 
3207
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
3208
  # These system don't have libm, or don't need it
 
3209
  ;;
 
3210
*-ncr-sysv4.3*)
 
3211
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
3212
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
3213
  ;;
 
3214
*)
 
3215
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
3216
  ;;
 
3217
esac
 
3218
])# AC_CHECK_LIBM
 
3219
 
 
3220
 
 
3221
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
 
3222
# -----------------------------------
 
3223
# sets LIBLTDL to the link flags for the libltdl convenience library and
 
3224
# LTDLINCL to the include flags for the libltdl header and adds
 
3225
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
 
3226
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
3227
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
 
3228
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
 
3229
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
3230
# flat and you're not using automake, define top_builddir and
 
3231
# top_srcdir appropriately in the Makefiles.
 
3232
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 
3233
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3234
  case $enable_ltdl_convenience in
 
3235
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
 
3236
  "") enable_ltdl_convenience=yes
 
3237
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
 
3238
  esac
 
3239
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
 
3240
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
3241
  # For backwards non-gettext consistent compatibility...
 
3242
  INCLTDL="$LTDLINCL"
 
3243
])# AC_LIBLTDL_CONVENIENCE
 
3244
 
 
3245
 
 
3246
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
 
3247
# -----------------------------------
 
3248
# sets LIBLTDL to the link flags for the libltdl installable library and
 
3249
# LTDLINCL to the include flags for the libltdl header and adds
 
3250
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
 
3251
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
 
3252
# DIRECTORY is not provided and an installed libltdl is not found, it is
 
3253
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
 
3254
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
 
3255
# quotes!).  If your package is not flat and you're not using automake,
 
3256
# define top_builddir and top_srcdir appropriately in the Makefiles.
 
3257
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
 
3258
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 
3259
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3260
  AC_CHECK_LIB(ltdl, lt_dlinit,
 
3261
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
 
3262
  [if test x"$enable_ltdl_install" = xno; then
 
3263
     AC_MSG_WARN([libltdl not installed, but installation disabled])
 
3264
   else
 
3265
     enable_ltdl_install=yes
 
3266
   fi
 
3267
  ])
 
3268
  if test x"$enable_ltdl_install" = x"yes"; then
 
3269
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
 
3270
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
 
3271
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
3272
  else
 
3273
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
 
3274
    LIBLTDL="-lltdl"
 
3275
    LTDLINCL=
 
3276
  fi
 
3277
  # For backwards non-gettext consistent compatibility...
 
3278
  INCLTDL="$LTDLINCL"
 
3279
])# AC_LIBLTDL_INSTALLABLE
 
3280
 
 
3281
 
 
3282
# AC_LIBTOOL_CXX
 
3283
# --------------
 
3284
# enable support for C++ libraries
 
3285
AC_DEFUN([AC_LIBTOOL_CXX],
 
3286
[AC_REQUIRE([_LT_AC_LANG_CXX])
 
3287
])# AC_LIBTOOL_CXX
 
3288
 
 
3289
 
 
3290
# _LT_AC_LANG_CXX
 
3291
# ---------------
 
3292
AC_DEFUN([_LT_AC_LANG_CXX],
 
3293
[AC_REQUIRE([AC_PROG_CXX])
 
3294
AC_REQUIRE([AC_PROG_CXXCPP])
 
3295
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
 
3296
])# _LT_AC_LANG_CXX
 
3297
 
 
3298
 
 
3299
# AC_LIBTOOL_F77
 
3300
# --------------
 
3301
# enable support for Fortran 77 libraries
 
3302
AC_DEFUN([AC_LIBTOOL_F77],
 
3303
[AC_REQUIRE([_LT_AC_LANG_F77])
 
3304
])# AC_LIBTOOL_F77
 
3305
 
 
3306
 
 
3307
# _LT_AC_LANG_F77
 
3308
# ---------------
 
3309
AC_DEFUN([_LT_AC_LANG_F77],
 
3310
[AC_REQUIRE([AC_PROG_F77])
 
3311
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
 
3312
])# _LT_AC_LANG_F77
 
3313
 
 
3314
 
 
3315
# AC_LIBTOOL_GCJ
 
3316
# --------------
 
3317
# enable support for GCJ libraries
 
3318
AC_DEFUN([AC_LIBTOOL_GCJ],
 
3319
[AC_REQUIRE([_LT_AC_LANG_GCJ])
 
3320
])# AC_LIBTOOL_GCJ
 
3321
 
 
3322
 
 
3323
# _LT_AC_LANG_GCJ
 
3324
# ---------------
 
3325
AC_DEFUN([_LT_AC_LANG_GCJ],
 
3326
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
 
3327
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
 
3328
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
 
3329
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
 
3330
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
 
3331
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
 
3332
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
 
3333
])# _LT_AC_LANG_GCJ
 
3334
 
 
3335
 
 
3336
# AC_LIBTOOL_RC
 
3337
# --------------
 
3338
# enable support for Windows resource files
 
3339
AC_DEFUN([AC_LIBTOOL_RC],
 
3340
[AC_REQUIRE([LT_AC_PROG_RC])
 
3341
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
 
3342
])# AC_LIBTOOL_RC
 
3343
 
 
3344
 
 
3345
# AC_LIBTOOL_LANG_C_CONFIG
 
3346
# ------------------------
 
3347
# Ensure that the configuration vars for the C compiler are
 
3348
# suitably defined.  Those variables are subsequently used by
 
3349
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
3350
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
 
3351
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
 
3352
[lt_save_CC="$CC"
 
3353
AC_LANG_PUSH(C)
 
3354
 
 
3355
# Source file extension for C test sources.
 
3356
ac_ext=c
 
3357
 
 
3358
# Object file extension for compiled C test sources.
 
3359
objext=o
 
3360
_LT_AC_TAGVAR(objext, $1)=$objext
 
3361
 
 
3362
# Code to be used in simple compile tests
 
3363
lt_simple_compile_test_code="int some_variable = 0;\n"
 
3364
 
 
3365
# Code to be used in simple link tests
 
3366
lt_simple_link_test_code='int main(){return(0);}\n'
 
3367
 
 
3368
_LT_AC_SYS_COMPILER
 
3369
 
 
3370
#
 
3371
# Check for any special shared library compilation flags.
 
3372
#
 
3373
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
 
3374
if test "$GCC" = no; then
 
3375
  case $host_os in
 
3376
  sco3.2v5*)
 
3377
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
 
3378
    ;;
 
3379
  esac
 
3380
fi
 
3381
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
 
3382
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
 
3383
  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
 
3384
  else
 
3385
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
 
3386
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
 
3387
  fi
 
3388
fi
 
3389
 
 
3390
 
 
3391
#
 
3392
# Check to make sure the static flag actually works.
 
3393
#
 
3394
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
 
3395
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
3396
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
 
3397
  [],
 
3398
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
3399
 
 
3400
 
 
3401
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
3402
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
3403
AC_LIBTOOL_PROG_CC_C_O($1)
 
3404
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
3405
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
3406
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
3407
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
3408
AC_LIBTOOL_SYS_LIB_STRIP
 
3409
AC_LIBTOOL_DLOPEN_SELF($1)
 
3410
 
 
3411
# Report which librarie types wil actually be built
3202
3412
AC_MSG_CHECKING([if libtool supports shared libraries])
3203
3413
AC_MSG_RESULT([$can_build_shared])
3204
3414
 
3216
3426
  fi
3217
3427
  ;;
3218
3428
 
3219
 
aix4*)
 
3429
aix4* | aix5*)
3220
3430
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3221
3431
    test "$enable_shared" = yes && enable_static=no
3222
3432
  fi
3223
3433
  ;;
3224
 
esac
3225
 
AC_MSG_RESULT([$enable_shared])
3226
 
 
3227
 
AC_MSG_CHECKING([whether to build static libraries])
3228
 
# Make sure either enable_shared or enable_static is yes.
3229
 
test "$enable_shared" = yes || enable_static=yes
3230
 
AC_MSG_RESULT([$enable_static])
3231
 
 
3232
 
if test "$hardcode_action" = relink; then
3233
 
  # Fast installation is not supported
3234
 
  enable_fast_install=no
3235
 
elif test "$shlibpath_overrides_runpath" = yes ||
3236
 
     test "$enable_shared" = no; then
3237
 
  # Fast installation is not necessary
3238
 
  enable_fast_install=needless
3239
 
fi
3240
 
 
3241
 
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3242
 
if test "$GCC" = yes; then
3243
 
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3244
 
fi
3245
 
 
3246
 
AC_LIBTOOL_DLOPEN_SELF
3247
 
 
3248
 
if test "$enable_shared" = yes && test "$GCC" = yes; then
3249
 
  case $archive_cmds in
3250
 
  *'~'*)
3251
 
    # FIXME: we may have to deal with multi-command sequences.
3252
 
    ;;
3253
 
  '$CC '*)
3254
 
    # Test whether the compiler implicitly links with -lc since on some
3255
 
    # systems, -lgcc has to come before -lc. If gcc already passes -lc
3256
 
    # to ld, don't add -lc before -lgcc.
3257
 
    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3258
 
    AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3259
 
    [$rm conftest*
3260
 
    echo 'static int dummy;' > conftest.$ac_ext
3261
 
 
3262
 
    if AC_TRY_EVAL(ac_compile); then
3263
 
      soname=conftest
3264
 
      lib=conftest
3265
 
      libobjs=conftest.$ac_objext
3266
 
      deplibs=
3267
 
      wl=$lt_cv_prog_cc_wl
3268
 
      compiler_flags=-v
3269
 
      linker_flags=-v
3270
 
      verstring=
3271
 
      output_objdir=.
3272
 
      libname=conftest
3273
 
      save_allow_undefined_flag=$allow_undefined_flag
3274
 
      allow_undefined_flag=
3275
 
      if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3276
 
      then
3277
 
        lt_cv_archive_cmds_need_lc=no
3278
 
      else
3279
 
        lt_cv_archive_cmds_need_lc=yes
3280
 
      fi
3281
 
      allow_undefined_flag=$save_allow_undefined_flag
3282
 
    else
3283
 
      cat conftest.err 1>&5
3284
 
    fi])
3285
 
    AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3286
 
    ;;
3287
 
  esac
3288
 
fi
3289
 
need_lc=${lt_cv_archive_cmds_need_lc-yes}
3290
 
 
3291
 
# The second clause should only fire when bootstrapping the
 
3434
  darwin* | rhapsody*)
 
3435
  if test "$GCC" = yes; then
 
3436
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3437
    case "$host_os" in
 
3438
    rhapsody* | darwin1.[[012]])
 
3439
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
3440
      ;;
 
3441
    *) # Darwin 1.3 on
 
3442
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
3443
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
3444
      else
 
3445
        case ${MACOSX_DEPLOYMENT_TARGET} in
 
3446
          10.[[012]])
 
3447
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
3448
            ;;
 
3449
          10.*)
 
3450
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
 
3451
            ;;
 
3452
        esac
 
3453
      fi
 
3454
      ;;
 
3455
    esac
 
3456
    output_verbose_link_cmd='echo'
 
3457
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
 
3458
    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3459
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
3460
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3461
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3462
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3463
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
3464
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
3465
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
3466
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3467
  else
 
3468
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3469
  fi
 
3470
    ;;
 
3471
esac
 
3472
AC_MSG_RESULT([$enable_shared])
 
3473
 
 
3474
AC_MSG_CHECKING([whether to build static libraries])
 
3475
# Make sure either enable_shared or enable_static is yes.
 
3476
test "$enable_shared" = yes || enable_static=yes
 
3477
AC_MSG_RESULT([$enable_static])
 
3478
 
 
3479
AC_LIBTOOL_CONFIG($1)
 
3480
 
 
3481
AC_LANG_POP
 
3482
CC="$lt_save_CC"
 
3483
])# AC_LIBTOOL_LANG_C_CONFIG
 
3484
 
 
3485
 
 
3486
# AC_LIBTOOL_LANG_CXX_CONFIG
 
3487
# --------------------------
 
3488
# Ensure that the configuration vars for the C compiler are
 
3489
# suitably defined.  Those variables are subsequently used by
 
3490
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
3491
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
 
3492
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
 
3493
[AC_LANG_PUSH(C++)
 
3494
AC_REQUIRE([AC_PROG_CXX])
 
3495
AC_REQUIRE([AC_PROG_CXXCPP])
 
3496
 
 
3497
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3498
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
3499
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
3500
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
3501
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
3502
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3503
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
3504
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
3505
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
3506
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
3507
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
3508
_LT_AC_TAGVAR(module_cmds, $1)=
 
3509
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
3510
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
3511
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
3512
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
3513
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
3514
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
3515
 
 
3516
# Dependencies to place before and after the object being linked:
 
3517
_LT_AC_TAGVAR(predep_objects, $1)=
 
3518
_LT_AC_TAGVAR(postdep_objects, $1)=
 
3519
_LT_AC_TAGVAR(predeps, $1)=
 
3520
_LT_AC_TAGVAR(postdeps, $1)=
 
3521
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
3522
 
 
3523
# Source file extension for C++ test sources.
 
3524
ac_ext=cc
 
3525
 
 
3526
# Object file extension for compiled C++ test sources.
 
3527
objext=o
 
3528
_LT_AC_TAGVAR(objext, $1)=$objext
 
3529
 
 
3530
# Code to be used in simple compile tests
 
3531
lt_simple_compile_test_code="int some_variable = 0;\n"
 
3532
 
 
3533
# Code to be used in simple link tests
 
3534
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
 
3535
 
 
3536
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
3537
_LT_AC_SYS_COMPILER
 
3538
 
 
3539
# Allow CC to be a program name with arguments.
 
3540
lt_save_CC=$CC
 
3541
lt_save_LD=$LD
 
3542
lt_save_GCC=$GCC
 
3543
GCC=$GXX
 
3544
lt_save_with_gnu_ld=$with_gnu_ld
 
3545
lt_save_path_LD=$lt_cv_path_LD
 
3546
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
3547
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
3548
else
 
3549
  unset lt_cv_prog_gnu_ld
 
3550
fi
 
3551
if test -n "${lt_cv_path_LDCXX+set}"; then
 
3552
  lt_cv_path_LD=$lt_cv_path_LDCXX
 
3553
else
 
3554
  unset lt_cv_path_LD
 
3555
fi
 
3556
test -z "${LDCXX+set}" || LD=$LDCXX
 
3557
CC=${CXX-"c++"}
 
3558
compiler=$CC
 
3559
_LT_AC_TAGVAR(compiler, $1)=$CC
 
3560
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
3561
 
 
3562
# We don't want -fno-exception wen compiling C++ code, so set the
 
3563
# no_builtin_flag separately
 
3564
if test "$GXX" = yes; then
 
3565
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
3566
else
 
3567
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
3568
fi
 
3569
 
 
3570
if test "$GXX" = yes; then
 
3571
  # Set up default GNU C++ configuration
 
3572
 
 
3573
  AC_PROG_LD
 
3574
 
 
3575
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
3576
  # archiving commands below assume that GNU ld is being used.
 
3577
  if test "$with_gnu_ld" = yes; then
 
3578
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3579
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
3580
 
 
3581
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
3582
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3583
 
 
3584
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
3585
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
3586
    #     investigate it a little bit more. (MM)
 
3587
    wlarc='${wl}'
 
3588
 
 
3589
    # ancient GNU ld didn't support --whole-archive et. al.
 
3590
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
 
3591
        grep 'no-whole-archive' > /dev/null; then
 
3592
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
3593
    else
 
3594
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
3595
    fi
 
3596
  else
 
3597
    with_gnu_ld=no
 
3598
    wlarc=
 
3599
 
 
3600
    # A generic and very simple default shared library creation
 
3601
    # command for GNU C++ for the case where it uses the native
 
3602
    # linker, instead of GNU ld.  If possible, this setting should
 
3603
    # overridden to take advantage of the native linker features on
 
3604
    # the platform it is being used on.
 
3605
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
3606
  fi
 
3607
 
 
3608
  # Commands to make compiler produce verbose output that lists
 
3609
  # what "hidden" libraries, object files and flags are used when
 
3610
  # linking a shared library.
 
3611
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
3612
 
 
3613
else
 
3614
  GXX=no
 
3615
  with_gnu_ld=no
 
3616
  wlarc=
 
3617
fi
 
3618
 
 
3619
# PORTME: fill in a description of your system's C++ link characteristics
 
3620
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
3621
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
3622
case $host_os in
 
3623
  aix3*)
 
3624
    # FIXME: insert proper C++ library support
 
3625
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3626
    ;;
 
3627
  aix4* | aix5*)
 
3628
    if test "$host_cpu" = ia64; then
 
3629
      # On IA64, the linker does run time linking by default, so we don't
 
3630
      # have to do anything special.
 
3631
      aix_use_runtimelinking=no
 
3632
      exp_sym_flag='-Bexport'
 
3633
      no_entry_flag=""
 
3634
    else
 
3635
      aix_use_runtimelinking=no
 
3636
 
 
3637
      # Test if we are trying to use run time linking or normal
 
3638
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
3639
      # need to do runtime linking.
 
3640
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
3641
        for ld_flag in $LDFLAGS; do
 
3642
          case $ld_flag in
 
3643
          *-brtl*)
 
3644
            aix_use_runtimelinking=yes
 
3645
            break
 
3646
            ;;
 
3647
          esac
 
3648
        done
 
3649
      esac
 
3650
 
 
3651
      exp_sym_flag='-bexport'
 
3652
      no_entry_flag='-bnoentry'
 
3653
    fi
 
3654
 
 
3655
    # When large executables or shared objects are built, AIX ld can
 
3656
    # have problems creating the table of contents.  If linking a library
 
3657
    # or program results in "error TOC overflow" add -mminimal-toc to
 
3658
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
3659
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
3660
 
 
3661
    _LT_AC_TAGVAR(archive_cmds, $1)=''
 
3662
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3663
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
3664
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3665
 
 
3666
    if test "$GXX" = yes; then
 
3667
      case $host_os in aix4.[012]|aix4.[012].*)
 
3668
      # We only want to do this on AIX 4.2 and lower, the check
 
3669
      # below for broken collect2 doesn't work under 4.3+
 
3670
        collect2name=`${CC} -print-prog-name=collect2`
 
3671
        if test -f "$collect2name" && \
 
3672
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
3673
        then
 
3674
          # We have reworked collect2
 
3675
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3676
        else
 
3677
          # We have old collect2
 
3678
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
3679
          # It fails to find uninstalled libraries when the uninstalled
 
3680
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
3681
          # to unsupported forces relinking
 
3682
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
3683
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3684
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
3685
        fi
 
3686
      esac
 
3687
      shared_flag='-shared'
 
3688
    else
 
3689
      # not using gcc
 
3690
      if test "$host_cpu" = ia64; then
 
3691
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
3692
        # chokes on -Wl,-G. The following line is correct:
 
3693
        shared_flag='-G'
 
3694
      else
 
3695
        if test "$aix_use_runtimelinking" = yes; then
 
3696
          shared_flag='${wl}-G'
 
3697
        else
 
3698
          shared_flag='${wl}-bM:SRE'
 
3699
        fi
 
3700
      fi
 
3701
    fi
 
3702
 
 
3703
    # It seems that -bexpall does not export symbols beginning with
 
3704
    # underscore (_), so it is better to generate a list of symbols to export.
 
3705
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
3706
    if test "$aix_use_runtimelinking" = yes; then
 
3707
      # Warning - without using the other runtime loading flags (-brtl),
 
3708
      # -berok will link without error, but may produce a broken library.
 
3709
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
3710
      # Determine the default libpath from the value encoded in an empty executable.
 
3711
      _LT_AC_SYS_LIBPATH_AIX
 
3712
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
3713
 
 
3714
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
3715
     else
 
3716
      if test "$host_cpu" = ia64; then
 
3717
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
3718
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
3719
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
3720
      else
 
3721
        # Determine the default libpath from the value encoded in an empty executable.
 
3722
        _LT_AC_SYS_LIBPATH_AIX
 
3723
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
3724
        # Warning - without using the other run time loading flags,
 
3725
        # -berok will link without error, but may produce a broken library.
 
3726
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
3727
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
3728
        # -bexpall does not export symbols beginning with underscore (_)
 
3729
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
3730
        # Exported symbols can be pulled into shared objects from archives
 
3731
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
3732
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
3733
        # This is similar to how AIX traditionally builds it's shared libraries.
 
3734
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
3735
      fi
 
3736
    fi
 
3737
    ;;
 
3738
  chorus*)
 
3739
    case $cc_basename in
 
3740
      *)
 
3741
        # FIXME: insert proper C++ library support
 
3742
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3743
        ;;
 
3744
    esac
 
3745
    ;;
 
3746
 
 
3747
  cygwin* | mingw* | pw32*)
 
3748
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
3749
    # as there is no search path for DLLs.
 
3750
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3751
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
3752
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
3753
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
3754
 
 
3755
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
3756
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
3757
      # If the export-symbols file already is a .def file (1st line
 
3758
      # is EXPORTS), use it as is; otherwise, prepend...
 
3759
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
3760
        cp $export_symbols $output_objdir/$soname.def;
 
3761
      else
 
3762
        echo EXPORTS > $output_objdir/$soname.def;
 
3763
        cat $export_symbols >> $output_objdir/$soname.def;
 
3764
      fi~
 
3765
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
3766
    else
 
3767
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3768
    fi
 
3769
  ;;
 
3770
 
 
3771
  darwin* | rhapsody*)
 
3772
  if test "$GXX" = yes; then
 
3773
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3774
    case "$host_os" in
 
3775
    rhapsody* | darwin1.[[012]])
 
3776
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
3777
      ;;
 
3778
    *) # Darwin 1.3 on
 
3779
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
3780
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
3781
      else
 
3782
        case ${MACOSX_DEPLOYMENT_TARGET} in
 
3783
          10.[[012]])
 
3784
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
3785
            ;;
 
3786
          10.*)
 
3787
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
 
3788
            ;;
 
3789
        esac
 
3790
      fi
 
3791
      ;;
 
3792
    esac
 
3793
    lt_int_apple_cc_single_mod=no
 
3794
    output_verbose_link_cmd='echo'
 
3795
    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
 
3796
      lt_int_apple_cc_single_mod=yes
 
3797
    fi
 
3798
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
3799
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
3800
    else
 
3801
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
3802
    fi
 
3803
    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3804
 
 
3805
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
3806
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
3807
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3808
    else
 
3809
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3810
    fi
 
3811
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3812
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3813
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
3814
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
3815
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
3816
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3817
  else
 
3818
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3819
  fi
 
3820
    ;;
 
3821
 
 
3822
  dgux*)
 
3823
    case $cc_basename in
 
3824
      ec++)
 
3825
        # FIXME: insert proper C++ library support
 
3826
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3827
        ;;
 
3828
      ghcx)
 
3829
        # Green Hills C++ Compiler
 
3830
        # FIXME: insert proper C++ library support
 
3831
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3832
        ;;
 
3833
      *)
 
3834
        # FIXME: insert proper C++ library support
 
3835
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3836
        ;;
 
3837
    esac
 
3838
    ;;
 
3839
  freebsd[12]*)
 
3840
    # C++ shared libraries reported to be fairly broken before switch to ELF
 
3841
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3842
    ;;
 
3843
  freebsd-elf*)
 
3844
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3845
    ;;
 
3846
  freebsd* | kfreebsd*-gnu)
 
3847
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
3848
    # conventions
 
3849
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
3850
    ;;
 
3851
  gnu*)
 
3852
    ;;
 
3853
  hpux9*)
 
3854
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3855
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3856
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3857
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3858
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3859
                                # but as the default
 
3860
                                # location of the library.
 
3861
 
 
3862
    case $cc_basename in
 
3863
    CC)
 
3864
      # FIXME: insert proper C++ library support
 
3865
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3866
      ;;
 
3867
    aCC)
 
3868
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
3869
      # Commands to make compiler produce verbose output that lists
 
3870
      # what "hidden" libraries, object files and flags are used when
 
3871
      # linking a shared library.
 
3872
      #
 
3873
      # There doesn't appear to be a way to prevent this compiler from
 
3874
      # explicitly linking system object files so we need to strip them
 
3875
      # from the output so that they don't get included in the library
 
3876
      # dependencies.
 
3877
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3878
      ;;
 
3879
    *)
 
3880
      if test "$GXX" = yes; then
 
3881
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
3882
      else
 
3883
        # FIXME: insert proper C++ library support
 
3884
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3885
      fi
 
3886
      ;;
 
3887
    esac
 
3888
    ;;
 
3889
  hpux10*|hpux11*)
 
3890
    if test $with_gnu_ld = no; then
 
3891
      case "$host_cpu" in
 
3892
      hppa*64*)
 
3893
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3894
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
3895
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3896
        ;;
 
3897
      ia64*)
 
3898
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3899
        ;;
 
3900
      *)
 
3901
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3902
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3903
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3904
        ;;
 
3905
      esac
 
3906
    fi
 
3907
    case "$host_cpu" in
 
3908
    hppa*64*)
 
3909
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3910
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3911
      ;;
 
3912
    ia64*)
 
3913
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3914
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3915
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3916
                                              # but as the default
 
3917
                                              # location of the library.
 
3918
      ;;
 
3919
    *)
 
3920
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3921
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3922
                                              # but as the default
 
3923
                                              # location of the library.
 
3924
      ;;
 
3925
    esac
 
3926
 
 
3927
    case $cc_basename in
 
3928
      CC)
 
3929
        # FIXME: insert proper C++ library support
 
3930
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3931
        ;;
 
3932
      aCC)
 
3933
        case "$host_cpu" in
 
3934
        hppa*64*|ia64*)
 
3935
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
3936
          ;;
 
3937
        *)
 
3938
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3939
          ;;
 
3940
        esac
 
3941
        # Commands to make compiler produce verbose output that lists
 
3942
        # what "hidden" libraries, object files and flags are used when
 
3943
        # linking a shared library.
 
3944
        #
 
3945
        # There doesn't appear to be a way to prevent this compiler from
 
3946
        # explicitly linking system object files so we need to strip them
 
3947
        # from the output so that they don't get included in the library
 
3948
        # dependencies.
 
3949
        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3950
        ;;
 
3951
      *)
 
3952
        if test "$GXX" = yes; then
 
3953
          if test $with_gnu_ld = no; then
 
3954
            case "$host_cpu" in
 
3955
            ia64*|hppa*64*)
 
3956
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
3957
              ;;
 
3958
            *)
 
3959
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3960
              ;;
 
3961
            esac
 
3962
          fi
 
3963
        else
 
3964
          # FIXME: insert proper C++ library support
 
3965
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3966
        fi
 
3967
        ;;
 
3968
    esac
 
3969
    ;;
 
3970
  irix5* | irix6*)
 
3971
    case $cc_basename in
 
3972
      CC)
 
3973
        # SGI C++
 
3974
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
3975
 
 
3976
        # Archives containing C++ object files must be created using
 
3977
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
3978
        # necessary to make sure instantiated templates are included
 
3979
        # in the archive.
 
3980
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
3981
        ;;
 
3982
      *)
 
3983
        if test "$GXX" = yes; then
 
3984
          if test "$with_gnu_ld" = no; then
 
3985
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
3986
          else
 
3987
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
 
3988
          fi
 
3989
        fi
 
3990
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3991
        ;;
 
3992
    esac
 
3993
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3994
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3995
    ;;
 
3996
  linux*)
 
3997
    case $cc_basename in
 
3998
      KCC)
 
3999
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
4000
 
 
4001
        # KCC will only create a shared library if the output file
 
4002
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
4003
        # to its proper name (with version) after linking.
 
4004
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
4005
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 
4006
        # Commands to make compiler produce verbose output that lists
 
4007
        # what "hidden" libraries, object files and flags are used when
 
4008
        # linking a shared library.
 
4009
        #
 
4010
        # There doesn't appear to be a way to prevent this compiler from
 
4011
        # explicitly linking system object files so we need to strip them
 
4012
        # from the output so that they don't get included in the library
 
4013
        # dependencies.
 
4014
        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
4015
 
 
4016
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
 
4017
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
4018
 
 
4019
        # Archives containing C++ object files must be created using
 
4020
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
4021
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
4022
        ;;
 
4023
      icpc)
 
4024
        # Intel C++
 
4025
        with_gnu_ld=yes
 
4026
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4027
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4028
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4029
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
4030
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
4031
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
4032
        ;;
 
4033
      cxx)
 
4034
        # Compaq C++
 
4035
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4036
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
4037
 
 
4038
        runpath_var=LD_RUN_PATH
 
4039
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
4040
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4041
 
 
4042
        # Commands to make compiler produce verbose output that lists
 
4043
        # what "hidden" libraries, object files and flags are used when
 
4044
        # linking a shared library.
 
4045
        #
 
4046
        # There doesn't appear to be a way to prevent this compiler from
 
4047
        # explicitly linking system object files so we need to strip them
 
4048
        # from the output so that they don't get included in the library
 
4049
        # dependencies.
 
4050
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
4051
        ;;
 
4052
    esac
 
4053
    ;;
 
4054
  lynxos*)
 
4055
    # FIXME: insert proper C++ library support
 
4056
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4057
    ;;
 
4058
  m88k*)
 
4059
    # FIXME: insert proper C++ library support
 
4060
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4061
    ;;
 
4062
  mvs*)
 
4063
    case $cc_basename in
 
4064
      cxx)
 
4065
        # FIXME: insert proper C++ library support
 
4066
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4067
        ;;
 
4068
      *)
 
4069
        # FIXME: insert proper C++ library support
 
4070
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4071
        ;;
 
4072
    esac
 
4073
    ;;
 
4074
  netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
4075
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
4076
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
4077
      wlarc=
 
4078
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
4079
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4080
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4081
    fi
 
4082
    # Workaround some broken pre-1.5 toolchains
 
4083
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
4084
    ;;
 
4085
  osf3*)
 
4086
    case $cc_basename in
 
4087
      KCC)
 
4088
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
4089
 
 
4090
        # KCC will only create a shared library if the output file
 
4091
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
4092
        # to its proper name (with version) after linking.
 
4093
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
4094
 
 
4095
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
4096
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4097
 
 
4098
        # Archives containing C++ object files must be created using
 
4099
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
4100
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
4101
 
 
4102
        ;;
 
4103
      RCC)
 
4104
        # Rational C++ 2.4.1
 
4105
        # FIXME: insert proper C++ library support
 
4106
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4107
        ;;
 
4108
      cxx)
 
4109
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
4110
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
4111
 
 
4112
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
4113
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4114
 
 
4115
        # Commands to make compiler produce verbose output that lists
 
4116
        # what "hidden" libraries, object files and flags are used when
 
4117
        # linking a shared library.
 
4118
        #
 
4119
        # There doesn't appear to be a way to prevent this compiler from
 
4120
        # explicitly linking system object files so we need to strip them
 
4121
        # from the output so that they don't get included in the library
 
4122
        # dependencies.
 
4123
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
4124
        ;;
 
4125
      *)
 
4126
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
4127
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
4128
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
4129
 
 
4130
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
4131
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4132
 
 
4133
          # Commands to make compiler produce verbose output that lists
 
4134
          # what "hidden" libraries, object files and flags are used when
 
4135
          # linking a shared library.
 
4136
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
4137
 
 
4138
        else
 
4139
          # FIXME: insert proper C++ library support
 
4140
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4141
        fi
 
4142
        ;;
 
4143
    esac
 
4144
    ;;
 
4145
  osf4* | osf5*)
 
4146
    case $cc_basename in
 
4147
      KCC)
 
4148
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
4149
 
 
4150
        # KCC will only create a shared library if the output file
 
4151
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
4152
        # to its proper name (with version) after linking.
 
4153
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
4154
 
 
4155
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
4156
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4157
 
 
4158
        # Archives containing C++ object files must be created using
 
4159
        # the KAI C++ compiler.
 
4160
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 
4161
        ;;
 
4162
      RCC)
 
4163
        # Rational C++ 2.4.1
 
4164
        # FIXME: insert proper C++ library support
 
4165
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4166
        ;;
 
4167
      cxx)
 
4168
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
4169
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
4170
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
4171
          echo "-hidden">> $lib.exp~
 
4172
          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
 
4173
          $rm $lib.exp'
 
4174
 
 
4175
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
4176
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4177
 
 
4178
        # Commands to make compiler produce verbose output that lists
 
4179
        # what "hidden" libraries, object files and flags are used when
 
4180
        # linking a shared library.
 
4181
        #
 
4182
        # There doesn't appear to be a way to prevent this compiler from
 
4183
        # explicitly linking system object files so we need to strip them
 
4184
        # from the output so that they don't get included in the library
 
4185
        # dependencies.
 
4186
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
4187
        ;;
 
4188
      *)
 
4189
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
4190
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
4191
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
4192
 
 
4193
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
4194
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4195
 
 
4196
          # Commands to make compiler produce verbose output that lists
 
4197
          # what "hidden" libraries, object files and flags are used when
 
4198
          # linking a shared library.
 
4199
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
4200
 
 
4201
        else
 
4202
          # FIXME: insert proper C++ library support
 
4203
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4204
        fi
 
4205
        ;;
 
4206
    esac
 
4207
    ;;
 
4208
  psos*)
 
4209
    # FIXME: insert proper C++ library support
 
4210
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4211
    ;;
 
4212
  sco*)
 
4213
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4214
    case $cc_basename in
 
4215
      CC)
 
4216
        # FIXME: insert proper C++ library support
 
4217
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4218
        ;;
 
4219
      *)
 
4220
        # FIXME: insert proper C++ library support
 
4221
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4222
        ;;
 
4223
    esac
 
4224
    ;;
 
4225
  sunos4*)
 
4226
    case $cc_basename in
 
4227
      CC)
 
4228
        # Sun C++ 4.x
 
4229
        # FIXME: insert proper C++ library support
 
4230
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4231
        ;;
 
4232
      lcc)
 
4233
        # Lucid
 
4234
        # FIXME: insert proper C++ library support
 
4235
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4236
        ;;
 
4237
      *)
 
4238
        # FIXME: insert proper C++ library support
 
4239
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4240
        ;;
 
4241
    esac
 
4242
    ;;
 
4243
  solaris*)
 
4244
    case $cc_basename in
 
4245
      CC)
 
4246
        # Sun C++ 4.2, 5.x and Centerline C++
 
4247
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
4248
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
4249
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
4250
        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
4251
 
 
4252
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
4253
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4254
        case $host_os in
 
4255
          solaris2.[0-5] | solaris2.[0-5].*) ;;
 
4256
          *)
 
4257
            # The C++ compiler is used as linker so we must use $wl
 
4258
            # flag to pass the commands to the underlying system
 
4259
            # linker.
 
4260
            # Supported since Solaris 2.6 (maybe 2.5.1?)
 
4261
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
4262
            ;;
 
4263
        esac
 
4264
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
4265
 
 
4266
        # Commands to make compiler produce verbose output that lists
 
4267
        # what "hidden" libraries, object files and flags are used when
 
4268
        # linking a shared library.
 
4269
        #
 
4270
        # There doesn't appear to be a way to prevent this compiler from
 
4271
        # explicitly linking system object files so we need to strip them
 
4272
        # from the output so that they don't get included in the library
 
4273
        # dependencies.
 
4274
        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
4275
 
 
4276
        # Archives containing C++ object files must be created using
 
4277
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
4278
        # necessary to make sure instantiated templates are included
 
4279
        # in the archive.
 
4280
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
4281
        ;;
 
4282
      gcx)
 
4283
        # Green Hills C++ Compiler
 
4284
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
4285
 
 
4286
        # The C++ compiler must be used to create the archive.
 
4287
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
4288
        ;;
 
4289
      *)
 
4290
        # GNU C++ compiler with Solaris linker
 
4291
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
4292
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
4293
          if $CC --version | grep -v '^2\.7' > /dev/null; then
 
4294
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
4295
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
4296
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
4297
 
 
4298
            # Commands to make compiler produce verbose output that lists
 
4299
            # what "hidden" libraries, object files and flags are used when
 
4300
            # linking a shared library.
 
4301
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
4302
          else
 
4303
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
4304
            # platform.
 
4305
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
4306
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
4307
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
4308
 
 
4309
            # Commands to make compiler produce verbose output that lists
 
4310
            # what "hidden" libraries, object files and flags are used when
 
4311
            # linking a shared library.
 
4312
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
4313
          fi
 
4314
 
 
4315
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
4316
        fi
 
4317
        ;;
 
4318
    esac
 
4319
    ;;
 
4320
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
 
4321
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4322
    ;;
 
4323
  tandem*)
 
4324
    case $cc_basename in
 
4325
      NCC)
 
4326
        # NonStop-UX NCC 3.20
 
4327
        # FIXME: insert proper C++ library support
 
4328
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4329
        ;;
 
4330
      *)
 
4331
        # FIXME: insert proper C++ library support
 
4332
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4333
        ;;
 
4334
    esac
 
4335
    ;;
 
4336
  vxworks*)
 
4337
    # FIXME: insert proper C++ library support
 
4338
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4339
    ;;
 
4340
  *)
 
4341
    # FIXME: insert proper C++ library support
 
4342
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4343
    ;;
 
4344
esac
 
4345
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
4346
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
4347
 
 
4348
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
4349
_LT_AC_TAGVAR(LD, $1)="$LD"
 
4350
 
 
4351
AC_LIBTOOL_POSTDEP_PREDEP($1)
 
4352
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
4353
AC_LIBTOOL_PROG_CC_C_O($1)
 
4354
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
4355
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
4356
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
4357
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
4358
AC_LIBTOOL_SYS_LIB_STRIP
 
4359
AC_LIBTOOL_DLOPEN_SELF($1)
 
4360
 
 
4361
AC_LIBTOOL_CONFIG($1)
 
4362
 
 
4363
AC_LANG_POP
 
4364
CC=$lt_save_CC
 
4365
LDCXX=$LD
 
4366
LD=$lt_save_LD
 
4367
GCC=$lt_save_GCC
 
4368
with_gnu_ldcxx=$with_gnu_ld
 
4369
with_gnu_ld=$lt_save_with_gnu_ld
 
4370
lt_cv_path_LDCXX=$lt_cv_path_LD
 
4371
lt_cv_path_LD=$lt_save_path_LD
 
4372
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
4373
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
4374
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
4375
 
 
4376
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
 
4377
# ------------------------
 
4378
# Figure out "hidden" library dependencies from verbose
 
4379
# compiler output when linking a shared library.
 
4380
# Parse the compiler output and extract the necessary
 
4381
# objects, libraries and library flags.
 
4382
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
 
4383
dnl we can't use the lt_simple_compile_test_code here,
 
4384
dnl because it contains code intended for an executable,
 
4385
dnl not a library.  It's possible we should let each
 
4386
dnl tag define a new lt_????_link_test_code variable,
 
4387
dnl but it's only used here...
 
4388
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
 
4389
int a;
 
4390
void foo (void) { a = 0; }
 
4391
EOF
 
4392
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
 
4393
class Foo
 
4394
{
 
4395
public:
 
4396
  Foo (void) { a = 0; }
 
4397
private:
 
4398
  int a;
 
4399
};
 
4400
EOF
 
4401
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
 
4402
      subroutine foo
 
4403
      implicit none
 
4404
      integer*4 a
 
4405
      a=0
 
4406
      return
 
4407
      end
 
4408
EOF
 
4409
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
 
4410
public class foo {
 
4411
  private int a;
 
4412
  public void bar (void) {
 
4413
    a = 0;
 
4414
  }
 
4415
};
 
4416
EOF
 
4417
])
 
4418
dnl Parse the compiler output and extract the necessary
 
4419
dnl objects, libraries and library flags.
 
4420
if AC_TRY_EVAL(ac_compile); then
 
4421
  # Parse the compiler output and extract the necessary
 
4422
  # objects, libraries and library flags.
 
4423
 
 
4424
  # Sentinel used to keep track of whether or not we are before
 
4425
  # the conftest object file.
 
4426
  pre_test_object_deps_done=no
 
4427
 
 
4428
  # The `*' in the case matches for architectures that use `case' in
 
4429
  # $output_verbose_cmd can trigger glob expansion during the loop
 
4430
  # eval without this substitution.
 
4431
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
 
4432
 
 
4433
  for p in `eval $output_verbose_link_cmd`; do
 
4434
    case $p in
 
4435
 
 
4436
    -L* | -R* | -l*)
 
4437
       # Some compilers place space between "-{L,R}" and the path.
 
4438
       # Remove the space.
 
4439
       if test $p = "-L" \
 
4440
          || test $p = "-R"; then
 
4441
         prev=$p
 
4442
         continue
 
4443
       else
 
4444
         prev=
 
4445
       fi
 
4446
 
 
4447
       if test "$pre_test_object_deps_done" = no; then
 
4448
         case $p in
 
4449
         -L* | -R*)
 
4450
           # Internal compiler library paths should come after those
 
4451
           # provided the user.  The postdeps already come after the
 
4452
           # user supplied libs so there is no need to process them.
 
4453
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
4454
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
4455
           else
 
4456
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
4457
           fi
 
4458
           ;;
 
4459
         # The "-l" case would never come before the object being
 
4460
         # linked, so don't bother handling this case.
 
4461
         esac
 
4462
       else
 
4463
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
 
4464
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
 
4465
         else
 
4466
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
 
4467
         fi
 
4468
       fi
 
4469
       ;;
 
4470
 
 
4471
    *.$objext)
 
4472
       # This assumes that the test object file only shows up
 
4473
       # once in the compiler output.
 
4474
       if test "$p" = "conftest.$objext"; then
 
4475
         pre_test_object_deps_done=yes
 
4476
         continue
 
4477
       fi
 
4478
 
 
4479
       if test "$pre_test_object_deps_done" = no; then
 
4480
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
 
4481
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
 
4482
         else
 
4483
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
 
4484
         fi
 
4485
       else
 
4486
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
 
4487
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
 
4488
         else
 
4489
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
 
4490
         fi
 
4491
       fi
 
4492
       ;;
 
4493
 
 
4494
    *) ;; # Ignore the rest.
 
4495
 
 
4496
    esac
 
4497
  done
 
4498
 
 
4499
  # Clean up.
 
4500
  rm -f a.out a.exe
 
4501
else
 
4502
  echo "libtool.m4: error: problem compiling $1 test program"
 
4503
fi
 
4504
 
 
4505
$rm -f confest.$objext
 
4506
 
 
4507
case " $_LT_AC_TAGVAR(postdeps, $1) " in
 
4508
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
4509
esac
 
4510
])# AC_LIBTOOL_POSTDEP_PREDEP
 
4511
 
 
4512
# AC_LIBTOOL_LANG_F77_CONFIG
 
4513
# ------------------------
 
4514
# Ensure that the configuration vars for the C compiler are
 
4515
# suitably defined.  Those variables are subsequently used by
 
4516
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
4517
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
 
4518
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
 
4519
[AC_REQUIRE([AC_PROG_F77])
 
4520
AC_LANG_PUSH(Fortran 77)
 
4521
 
 
4522
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4523
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
4524
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
4525
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
4526
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
4527
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4528
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
4529
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
4530
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
4531
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
4532
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
4533
_LT_AC_TAGVAR(module_cmds, $1)=
 
4534
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
4535
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
4536
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
4537
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
4538
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
4539
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
4540
 
 
4541
# Source file extension for f77 test sources.
 
4542
ac_ext=f
 
4543
 
 
4544
# Object file extension for compiled f77 test sources.
 
4545
objext=o
 
4546
_LT_AC_TAGVAR(objext, $1)=$objext
 
4547
 
 
4548
# Code to be used in simple compile tests
 
4549
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
4550
 
 
4551
# Code to be used in simple link tests
 
4552
lt_simple_link_test_code="      program t\n      end\n"
 
4553
 
 
4554
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
4555
_LT_AC_SYS_COMPILER
 
4556
 
 
4557
# Allow CC to be a program name with arguments.
 
4558
lt_save_CC="$CC"
 
4559
CC=${F77-"f77"}
 
4560
compiler=$CC
 
4561
_LT_AC_TAGVAR(compiler, $1)=$CC
 
4562
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
4563
 
 
4564
AC_MSG_CHECKING([if libtool supports shared libraries])
 
4565
AC_MSG_RESULT([$can_build_shared])
 
4566
 
 
4567
AC_MSG_CHECKING([whether to build shared libraries])
 
4568
test "$can_build_shared" = "no" && enable_shared=no
 
4569
 
 
4570
# On AIX, shared libraries and static libraries use the same namespace, and
 
4571
# are all built from PIC.
 
4572
case "$host_os" in
 
4573
aix3*)
 
4574
  test "$enable_shared" = yes && enable_static=no
 
4575
  if test -n "$RANLIB"; then
 
4576
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
4577
    postinstall_cmds='$RANLIB $lib'
 
4578
  fi
 
4579
  ;;
 
4580
aix4* | aix5*)
 
4581
  test "$enable_shared" = yes && enable_static=no
 
4582
  ;;
 
4583
esac
 
4584
AC_MSG_RESULT([$enable_shared])
 
4585
 
 
4586
AC_MSG_CHECKING([whether to build static libraries])
 
4587
# Make sure either enable_shared or enable_static is yes.
 
4588
test "$enable_shared" = yes || enable_static=yes
 
4589
AC_MSG_RESULT([$enable_static])
 
4590
 
 
4591
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
4592
 
 
4593
_LT_AC_TAGVAR(GCC, $1)="$G77"
 
4594
_LT_AC_TAGVAR(LD, $1)="$LD"
 
4595
 
 
4596
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
4597
AC_LIBTOOL_PROG_CC_C_O($1)
 
4598
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
4599
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
4600
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
4601
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
4602
AC_LIBTOOL_SYS_LIB_STRIP
 
4603
 
 
4604
 
 
4605
AC_LIBTOOL_CONFIG($1)
 
4606
 
 
4607
AC_LANG_POP
 
4608
CC="$lt_save_CC"
 
4609
])# AC_LIBTOOL_LANG_F77_CONFIG
 
4610
 
 
4611
 
 
4612
# AC_LIBTOOL_LANG_GCJ_CONFIG
 
4613
# --------------------------
 
4614
# Ensure that the configuration vars for the C compiler are
 
4615
# suitably defined.  Those variables are subsequently used by
 
4616
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
4617
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
 
4618
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
 
4619
[AC_LANG_SAVE
 
4620
 
 
4621
# Source file extension for Java test sources.
 
4622
ac_ext=java
 
4623
 
 
4624
# Object file extension for compiled Java test sources.
 
4625
objext=o
 
4626
_LT_AC_TAGVAR(objext, $1)=$objext
 
4627
 
 
4628
# Code to be used in simple compile tests
 
4629
lt_simple_compile_test_code="class foo {}\n"
 
4630
 
 
4631
# Code to be used in simple link tests
 
4632
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
 
4633
 
 
4634
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
4635
_LT_AC_SYS_COMPILER
 
4636
 
 
4637
# Allow CC to be a program name with arguments.
 
4638
lt_save_CC="$CC"
 
4639
CC=${GCJ-"gcj"}
 
4640
compiler=$CC
 
4641
_LT_AC_TAGVAR(compiler, $1)=$CC
 
4642
 
 
4643
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
4644
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4645
 
 
4646
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
4647
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
4648
AC_LIBTOOL_PROG_CC_C_O($1)
 
4649
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
4650
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
4651
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
4652
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
4653
AC_LIBTOOL_SYS_LIB_STRIP
 
4654
AC_LIBTOOL_DLOPEN_SELF($1)
 
4655
 
 
4656
AC_LIBTOOL_CONFIG($1)
 
4657
 
 
4658
AC_LANG_RESTORE
 
4659
CC="$lt_save_CC"
 
4660
])# AC_LIBTOOL_LANG_GCJ_CONFIG
 
4661
 
 
4662
 
 
4663
# AC_LIBTOOL_LANG_RC_CONFIG
 
4664
# --------------------------
 
4665
# Ensure that the configuration vars for the Windows resource compiler are
 
4666
# suitably defined.  Those variables are subsequently used by
 
4667
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
4668
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
 
4669
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
 
4670
[AC_LANG_SAVE
 
4671
 
 
4672
# Source file extension for RC test sources.
 
4673
ac_ext=rc
 
4674
 
 
4675
# Object file extension for compiled RC test sources.
 
4676
objext=o
 
4677
_LT_AC_TAGVAR(objext, $1)=$objext
 
4678
 
 
4679
# Code to be used in simple compile tests
 
4680
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
4681
 
 
4682
# Code to be used in simple link tests
 
4683
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
4684
 
 
4685
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
4686
_LT_AC_SYS_COMPILER
 
4687
 
 
4688
# Allow CC to be a program name with arguments.
 
4689
lt_save_CC="$CC"
 
4690
CC=${RC-"windres"}
 
4691
compiler=$CC
 
4692
_LT_AC_TAGVAR(compiler, $1)=$CC
 
4693
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
4694
 
 
4695
AC_LIBTOOL_CONFIG($1)
 
4696
 
 
4697
AC_LANG_RESTORE
 
4698
CC="$lt_save_CC"
 
4699
])# AC_LIBTOOL_LANG_RC_CONFIG
 
4700
 
 
4701
 
 
4702
# AC_LIBTOOL_CONFIG([TAGNAME])
 
4703
# ----------------------------
 
4704
# If TAGNAME is not passed, then create an initial libtool script
 
4705
# with a default configuration from the untagged config vars.  Otherwise
 
4706
# add code to config.status for appending the configuration named by
 
4707
# TAGNAME from the matching tagged config vars.
 
4708
AC_DEFUN([AC_LIBTOOL_CONFIG],
 
4709
[# The else clause should only fire when bootstrapping the
3292
4710
# libtool distribution, otherwise you forgot to ship ltmain.sh
3293
4711
# with your package, and you will get complaints that there are
3294
4712
# no rules to generate ltmain.sh.
3295
4713
if test -f "$ltmain"; then
3296
 
  :
3297
 
else
3298
 
  # If there is no Makefile yet, we rely on a make rule to execute
3299
 
  # `config.status --recheck' to rerun these tests and create the
3300
 
  # libtool script then.
3301
 
  test -f Makefile && make "$ltmain"
3302
 
fi
3303
 
 
3304
 
if test -f "$ltmain"; then
3305
 
  trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3306
 
  $rm -f "${ofile}T"
3307
 
 
3308
 
  echo creating $ofile
3309
 
 
 
4714
  # See if we are running on zsh, and set the options which allow our commands through
 
4715
  # without removal of \ escapes.
 
4716
  if test -n "${ZSH_VERSION+set}" ; then
 
4717
    setopt NO_GLOB_SUBST
 
4718
  fi
3310
4719
  # Now quote all the things that may contain metacharacters while being
3311
4720
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
3312
4721
  # variables and quote the copies for generation of the libtool script.
3313
 
  for var in echo old_CC old_CFLAGS SED \
3314
 
    AR AR_FLAGS CC LD LN_S NM SHELL \
3315
 
    reload_flag reload_cmds wl \
3316
 
    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3317
 
    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3318
 
    library_names_spec soname_spec \
3319
 
    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3320
 
    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3321
 
    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3322
 
    old_striplib striplib file_magic_cmd export_symbols_cmds \
3323
 
    deplibs_check_method allow_undefined_flag no_undefined_flag \
3324
 
    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3325
 
    global_symbol_to_c_name_address \
3326
 
    hardcode_libdir_flag_spec hardcode_libdir_separator  \
 
4722
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
 
4723
    SED SHELL STRIP \
 
4724
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 
4725
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 
4726
    deplibs_check_method reload_flag reload_cmds need_locks \
 
4727
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 
4728
    lt_cv_sys_global_symbol_to_c_name_address \
3327
4729
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3328
 
    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
 
4730
    old_postinstall_cmds old_postuninstall_cmds \
 
4731
    _LT_AC_TAGVAR(compiler, $1) \
 
4732
    _LT_AC_TAGVAR(CC, $1) \
 
4733
    _LT_AC_TAGVAR(LD, $1) \
 
4734
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
 
4735
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
 
4736
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
 
4737
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
 
4738
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
 
4739
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
 
4740
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
 
4741
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
 
4742
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
 
4743
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
 
4744
    _LT_AC_TAGVAR(predep_objects, $1) \
 
4745
    _LT_AC_TAGVAR(postdep_objects, $1) \
 
4746
    _LT_AC_TAGVAR(predeps, $1) \
 
4747
    _LT_AC_TAGVAR(postdeps, $1) \
 
4748
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
 
4749
    _LT_AC_TAGVAR(archive_cmds, $1) \
 
4750
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
 
4751
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
 
4752
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
 
4753
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
 
4754
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
 
4755
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
 
4756
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
 
4757
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
 
4758
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
 
4759
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
 
4760
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
 
4761
    _LT_AC_TAGVAR(module_cmds, $1) \
 
4762
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
 
4763
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
 
4764
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
 
4765
    _LT_AC_TAGVAR(include_expsyms, $1); do
3329
4766
 
3330
4767
    case $var in
3331
 
    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
 
4768
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
 
4769
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
 
4770
    _LT_AC_TAGVAR(archive_cmds, $1) | \
 
4771
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
 
4772
    _LT_AC_TAGVAR(module_cmds, $1) | \
 
4773
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
 
4774
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
 
4775
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
 
4776
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 
4777
    postinstall_cmds | postuninstall_cmds | \
3332
4778
    old_postinstall_cmds | old_postuninstall_cmds | \
3333
 
    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3334
 
    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3335
 
    postinstall_cmds | postuninstall_cmds | \
3336
 
    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 
4779
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3337
4780
      # Double-quote double-evaled strings.
3338
4781
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3339
4782
      ;;
3343
4786
    esac
3344
4787
  done
3345
4788
 
3346
 
  cat <<__EOF__ > "${ofile}T"
3347
 
#! $SHELL
3348
 
 
3349
 
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
4789
  case $lt_echo in
 
4790
  *'\[$]0 --fallback-echo"')
 
4791
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
 
4792
    ;;
 
4793
  esac
 
4794
 
 
4795
ifelse([$1], [],
 
4796
  [cfgfile="${ofile}T"
 
4797
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
 
4798
  $rm -f "$cfgfile"
 
4799
  AC_MSG_NOTICE([creating $ofile])],
 
4800
  [cfgfile="$ofile"])
 
4801
 
 
4802
  cat <<__EOF__ >> "$cfgfile"
 
4803
ifelse([$1], [],
 
4804
[#! $SHELL
 
4805
 
 
4806
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3350
4807
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3351
4808
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3352
4809
#
3353
 
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
 
4810
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
 
4811
# Free Software Foundation, Inc.
 
4812
#
 
4813
# This file is part of GNU Libtool:
3354
4814
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3355
4815
#
3356
4816
# This program is free software; you can redistribute it and/or modify
3372
4832
# configuration script generated by Autoconf, you may include it under
3373
4833
# the same distribution terms that you use for the rest of that program.
3374
4834
 
3375
 
# A sed that does not truncate output.
 
4835
# A sed program that does not truncate output.
3376
4836
SED=$lt_SED
3377
4837
 
3378
4838
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3379
 
Xsed="${SED} -e s/^X//"
 
4839
Xsed="$SED -e s/^X//"
3380
4840
 
3381
4841
# The HP-UX ksh and POSIX shell print the target directory to stdout
3382
4842
# if CDPATH is set.
3383
4843
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3384
4844
 
3385
 
# ### BEGIN LIBTOOL CONFIG
 
4845
# The names of the tagged configurations supported by this script.
 
4846
available_tags=
 
4847
 
 
4848
# ### BEGIN LIBTOOL CONFIG],
 
4849
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
3386
4850
 
3387
4851
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3388
4852
 
3396
4860
build_old_libs=$enable_static
3397
4861
 
3398
4862
# Whether or not to add -lc for building shared libraries.
3399
 
build_libtool_need_lc=$need_lc
 
4863
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
 
4864
 
 
4865
# Whether or not to disallow shared libs when runtime libs are static
 
4866
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
3400
4867
 
3401
4868
# Whether or not to optimize for fast installation.
3402
4869
fast_install=$enable_fast_install
3412
4879
AR=$lt_AR
3413
4880
AR_FLAGS=$lt_AR_FLAGS
3414
4881
 
3415
 
# The default C compiler.
3416
 
CC=$lt_CC
 
4882
# A C compiler.
 
4883
LTCC=$lt_LTCC
 
4884
 
 
4885
# A language-specific compiler.
 
4886
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
3417
4887
 
3418
4888
# Is the compiler the GNU C compiler?
3419
 
with_gcc=$GCC
 
4889
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
4890
 
 
4891
# An ERE matcher.
 
4892
EGREP=$lt_EGREP
3420
4893
 
3421
4894
# The linker used to build libraries.
3422
 
LD=$lt_LD
 
4895
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
3423
4896
 
3424
4897
# Whether we need hard or soft links.
3425
4898
LN_S=$lt_LN_S
3428
4901
NM=$lt_NM
3429
4902
 
3430
4903
# A symbol stripping program
3431
 
STRIP=$STRIP
 
4904
STRIP=$lt_STRIP
3432
4905
 
3433
4906
# Used to examine libraries when file_magic_cmd begins "file"
3434
4907
MAGIC_CMD=$MAGIC_CMD
3450
4923
reload_cmds=$lt_reload_cmds
3451
4924
 
3452
4925
# How to pass a linker flag through the compiler.
3453
 
wl=$lt_wl
 
4926
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
3454
4927
 
3455
4928
# Object file suffix (normally "o").
3456
4929
objext="$ac_objext"
3458
4931
# Old archive suffix (normally "a").
3459
4932
libext="$libext"
3460
4933
 
 
4934
# Shared library suffix (normally ".so").
 
4935
shrext_cmds='$shrext_cmds'
 
4936
 
3461
4937
# Executable file suffix (normally "").
3462
4938
exeext="$exeext"
3463
4939
 
3464
4940
# Additional compiler flags for building library objects.
3465
 
pic_flag=$lt_pic_flag
 
4941
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
3466
4942
pic_mode=$pic_mode
3467
4943
 
 
4944
# What is the maximum length of a command?
 
4945
max_cmd_len=$lt_cv_sys_max_cmd_len
 
4946
 
3468
4947
# Does compiler simultaneously support -c and -o options?
3469
 
compiler_c_o=$lt_compiler_c_o
3470
 
 
3471
 
# Can we write directly to a .lo ?
3472
 
compiler_o_lo=$lt_compiler_o_lo
 
4948
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
3473
4949
 
3474
4950
# Must we lock files when doing compilation ?
3475
4951
need_locks=$lt_need_locks
3490
4966
dlopen_self_static=$enable_dlopen_self_static
3491
4967
 
3492
4968
# Compiler flag to prevent dynamic linking.
3493
 
link_static_flag=$lt_link_static_flag
 
4969
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
3494
4970
 
3495
4971
# Compiler flag to turn off builtin functions.
3496
 
no_builtin_flag=$lt_no_builtin_flag
 
4972
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
3497
4973
 
3498
4974
# Compiler flag to allow reflexive dlopens.
3499
 
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
 
4975
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
3500
4976
 
3501
4977
# Compiler flag to generate shared objects directly from archives.
3502
 
whole_archive_flag_spec=$lt_whole_archive_flag_spec
 
4978
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
3503
4979
 
3504
4980
# Compiler flag to generate thread-safe objects.
3505
 
thread_safe_flag_spec=$lt_thread_safe_flag_spec
 
4981
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
3506
4982
 
3507
4983
# Library versioning type.
3508
4984
version_type=$version_type
3519
4995
 
3520
4996
# Commands used to build and install an old-style archive.
3521
4997
RANLIB=$lt_RANLIB
3522
 
old_archive_cmds=$lt_old_archive_cmds
 
4998
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
3523
4999
old_postinstall_cmds=$lt_old_postinstall_cmds
3524
5000
old_postuninstall_cmds=$lt_old_postuninstall_cmds
3525
5001
 
3526
5002
# Create an old-style archive from a shared archive.
3527
 
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
 
5003
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
3528
5004
 
3529
5005
# Create a temporary old-style archive to link instead of a shared archive.
3530
 
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
 
5006
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
3531
5007
 
3532
5008
# Commands used to build and install a shared archive.
3533
 
archive_cmds=$lt_archive_cmds
3534
 
archive_expsym_cmds=$lt_archive_expsym_cmds
 
5009
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
 
5010
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
3535
5011
postinstall_cmds=$lt_postinstall_cmds
3536
5012
postuninstall_cmds=$lt_postuninstall_cmds
3537
5013
 
 
5014
# Commands used to build a loadable module (assumed same as above if empty)
 
5015
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
 
5016
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
 
5017
 
3538
5018
# Commands to strip libraries.
3539
5019
old_striplib=$lt_old_striplib
3540
5020
striplib=$lt_striplib
3541
5021
 
 
5022
# Dependencies to place before the objects being linked to create a
 
5023
# shared library.
 
5024
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
5025
 
 
5026
# Dependencies to place after the objects being linked to create a
 
5027
# shared library.
 
5028
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
5029
 
 
5030
# Dependencies to place before the objects being linked to create a
 
5031
# shared library.
 
5032
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 
5033
 
 
5034
# Dependencies to place after the objects being linked to create a
 
5035
# shared library.
 
5036
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
5037
 
 
5038
# The library search path used internally by the compiler when linking
 
5039
# a shared library.
 
5040
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
5041
 
3542
5042
# Method to check whether dependent libraries are shared objects.
3543
5043
deplibs_check_method=$lt_deplibs_check_method
3544
5044
 
3546
5046
file_magic_cmd=$lt_file_magic_cmd
3547
5047
 
3548
5048
# Flag that allows shared libraries with undefined symbols to be built.
3549
 
allow_undefined_flag=$lt_allow_undefined_flag
 
5049
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
3550
5050
 
3551
5051
# Flag that forces no undefined symbols.
3552
 
no_undefined_flag=$lt_no_undefined_flag
 
5052
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
3553
5053
 
3554
5054
# Commands used to finish a libtool library installation in a directory.
3555
5055
finish_cmds=$lt_finish_cmds
3558
5058
finish_eval=$lt_finish_eval
3559
5059
 
3560
5060
# Take the output of nm and produce a listing of raw symbols and C names.
3561
 
global_symbol_pipe=$lt_global_symbol_pipe
 
5061
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
3562
5062
 
3563
5063
# Transform the output of nm in a proper C declaration
3564
 
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
 
5064
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
3565
5065
 
3566
5066
# Transform the output of nm in a C name address pair
3567
 
global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
 
5067
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
3568
5068
 
3569
5069
# This is the shared library runtime path variable.
3570
5070
runpath_var=$runpath_var
3576
5076
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3577
5077
 
3578
5078
# How to hardcode a shared library path into an executable.
3579
 
hardcode_action=$hardcode_action
 
5079
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
3580
5080
 
3581
5081
# Whether we should hardcode library paths into libraries.
3582
5082
hardcode_into_libs=$hardcode_into_libs
3583
5083
 
3584
5084
# Flag to hardcode \$libdir into a binary during linking.
3585
5085
# This must work even if \$libdir does not exist.
3586
 
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
5086
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
 
5087
 
 
5088
# If ld is used when linking, flag to hardcode \$libdir into
 
5089
# a binary during linking. This must work even if \$libdir does
 
5090
# not exist.
 
5091
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
3587
5092
 
3588
5093
# Whether we need a single -rpath flag with a separated argument.
3589
 
hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
5094
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
3590
5095
 
3591
 
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
 
5096
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
3592
5097
# resulting binary.
3593
 
hardcode_direct=$hardcode_direct
 
5098
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
3594
5099
 
3595
5100
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3596
5101
# resulting binary.
3597
 
hardcode_minus_L=$hardcode_minus_L
 
5102
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
3598
5103
 
3599
5104
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3600
5105
# the resulting binary.
3601
 
hardcode_shlibpath_var=$hardcode_shlibpath_var
 
5106
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
 
5107
 
 
5108
# Set to yes if building a shared library automatically hardcodes DIR into the library
 
5109
# and all subsequent libraries and executables linked against it.
 
5110
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
3602
5111
 
3603
5112
# Variables whose values should be saved in libtool wrapper scripts and
3604
5113
# restored at relink time.
3605
5114
variables_saved_for_relink="$variables_saved_for_relink"
3606
5115
 
3607
5116
# Whether libtool must link a program against all its dependency libraries.
3608
 
link_all_deplibs=$link_all_deplibs
 
5117
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
3609
5118
 
3610
5119
# Compile-time system search path for libraries
3611
5120
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3614
5123
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3615
5124
 
3616
5125
# Fix the shell variable \$srcfile for the compiler.
3617
 
fix_srcfile_path="$fix_srcfile_path"
 
5126
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
3618
5127
 
3619
5128
# Set to yes if exported symbols are required.
3620
 
always_export_symbols=$always_export_symbols
 
5129
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
3621
5130
 
3622
5131
# The commands to list exported symbols.
3623
 
export_symbols_cmds=$lt_export_symbols_cmds
 
5132
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
3624
5133
 
3625
5134
# The commands to extract the exported symbol list from a shared archive.
3626
5135
extract_expsyms_cmds=$lt_extract_expsyms_cmds
3627
5136
 
3628
5137
# Symbols that should not be listed in the preloaded symbols.
3629
 
exclude_expsyms=$lt_exclude_expsyms
 
5138
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
3630
5139
 
3631
5140
# Symbols that must always be exported.
3632
 
include_expsyms=$lt_include_expsyms
 
5141
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
3633
5142
 
3634
 
# ### END LIBTOOL CONFIG
 
5143
ifelse([$1],[],
 
5144
[# ### END LIBTOOL CONFIG],
 
5145
[# ### END LIBTOOL TAG CONFIG: $tagname])
3635
5146
 
3636
5147
__EOF__
3637
5148
 
 
5149
ifelse([$1],[], [
3638
5150
  case $host_os in
3639
5151
  aix3*)
3640
 
    cat <<\EOF >> "${ofile}T"
 
5152
    cat <<\EOF >> "$cfgfile"
3641
5153
 
3642
5154
# AIX sometimes has problems with the GCC collect2 program.  For some
3643
5155
# reason, if we set the COLLECT_NAMES environment variable, the problems
3650
5162
    ;;
3651
5163
  esac
3652
5164
 
3653
 
  case $host_os in
3654
 
  cygwin* | mingw* | pw32* | os2*)
3655
 
    cat <<'EOF' >> "${ofile}T"
3656
 
      # This is a source program that is used to create dlls on Windows
3657
 
      # Don't remove nor modify the starting and closing comments
 
5165
  # We use sed instead of cat because bash on DJGPP gets confused if
 
5166
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
5167
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
5168
  # is reportedly fixed, but why not run on old versions too?
 
5169
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
5170
 
 
5171
  mv -f "$cfgfile" "$ofile" || \
 
5172
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
5173
  chmod +x "$ofile"
 
5174
])
 
5175
else
 
5176
  # If there is no Makefile yet, we rely on a make rule to execute
 
5177
  # `config.status --recheck' to rerun these tests and create the
 
5178
  # libtool script then.
 
5179
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
 
5180
  if test -f "$ltmain_in"; then
 
5181
    test -f Makefile && make "$ltmain"
 
5182
  fi
 
5183
fi
 
5184
])# AC_LIBTOOL_CONFIG
 
5185
 
 
5186
 
 
5187
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
 
5188
# -------------------------------------------
 
5189
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
 
5190
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
5191
 
 
5192
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
5193
 
 
5194
if test "$GCC" = yes; then
 
5195
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
5196
 
 
5197
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
5198
    lt_cv_prog_compiler_rtti_exceptions,
 
5199
    [-fno-rtti -fno-exceptions], [],
 
5200
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
5201
fi
 
5202
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
5203
 
 
5204
 
 
5205
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
5206
# ---------------------------------
 
5207
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
5208
[AC_REQUIRE([AC_CANONICAL_HOST])
 
5209
AC_REQUIRE([AC_PROG_NM])
 
5210
AC_REQUIRE([AC_OBJEXT])
 
5211
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
5212
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
5213
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
5214
[
 
5215
# These are sane defaults that work on at least a few old systems.
 
5216
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
5217
 
 
5218
# Character class describing NM global symbol codes.
 
5219
symcode='[[BCDEGRST]]'
 
5220
 
 
5221
# Regexp to match symbols that can be accessed directly from C.
 
5222
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
5223
 
 
5224
# Transform the above into a raw symbol and a C symbol.
 
5225
symxfrm='\1 \2\3 \3'
 
5226
 
 
5227
# Transform an extracted symbol line into a proper C declaration
 
5228
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
5229
 
 
5230
# Transform an extracted symbol line into symbol name and symbol address
 
5231
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
5232
 
 
5233
# Define system-specific variables.
 
5234
case $host_os in
 
5235
aix*)
 
5236
  symcode='[[BCDT]]'
 
5237
  ;;
 
5238
cygwin* | mingw* | pw32*)
 
5239
  symcode='[[ABCDGISTW]]'
 
5240
  ;;
 
5241
hpux*) # Its linker distinguishes data from code symbols
 
5242
  if test "$host_cpu" = ia64; then
 
5243
    symcode='[[ABCDEGRST]]'
 
5244
  fi
 
5245
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
5246
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
5247
  ;;
 
5248
irix* | nonstopux*)
 
5249
  symcode='[[BCDEGRST]]'
 
5250
  ;;
 
5251
osf*)
 
5252
  symcode='[[BCDEGQRST]]'
 
5253
  ;;
 
5254
solaris* | sysv5*)
 
5255
  symcode='[[BDRT]]'
 
5256
  ;;
 
5257
sysv4)
 
5258
  symcode='[[DFNSTU]]'
 
5259
  ;;
 
5260
esac
 
5261
 
 
5262
# Handle CRLF in mingw tool chain
 
5263
opt_cr=
 
5264
case $build_os in
 
5265
mingw*)
 
5266
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
5267
  ;;
 
5268
esac
 
5269
 
 
5270
# If we're using GNU nm, then use its standard symbol codes.
 
5271
case `$NM -V 2>&1` in
 
5272
*GNU* | *'with BFD'*)
 
5273
  symcode='[[ABCDGIRSTW]]' ;;
 
5274
esac
 
5275
 
 
5276
# Try without a prefix undercore, then with it.
 
5277
for ac_symprfx in "" "_"; do
 
5278
 
 
5279
  # Write the raw and C identifiers.
 
5280
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
 
5281
 
 
5282
  # Check to see that the pipe works correctly.
 
5283
  pipe_works=no
 
5284
 
 
5285
  rm -f conftest*
 
5286
  cat > conftest.$ac_ext <<EOF
 
5287
#ifdef __cplusplus
 
5288
extern "C" {
 
5289
#endif
 
5290
char nm_test_var;
 
5291
void nm_test_func(){}
 
5292
#ifdef __cplusplus
 
5293
}
 
5294
#endif
 
5295
int main(){nm_test_var='a';nm_test_func();return(0);}
 
5296
EOF
 
5297
 
 
5298
  if AC_TRY_EVAL(ac_compile); then
 
5299
    # Now try to grab the symbols.
 
5300
    nlist=conftest.nm
 
5301
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
5302
      # Try sorting and uniquifying the output.
 
5303
      if sort "$nlist" | uniq > "$nlist"T; then
 
5304
        mv -f "$nlist"T "$nlist"
 
5305
      else
 
5306
        rm -f "$nlist"T
 
5307
      fi
 
5308
 
 
5309
      # Make sure that we snagged all the symbols we need.
 
5310
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
 
5311
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
 
5312
          cat <<EOF > conftest.$ac_ext
 
5313
#ifdef __cplusplus
 
5314
extern "C" {
 
5315
#endif
 
5316
 
 
5317
EOF
 
5318
          # Now generate the symbol file.
 
5319
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
5320
 
 
5321
          cat <<EOF >> conftest.$ac_ext
 
5322
#if defined (__STDC__) && __STDC__
 
5323
# define lt_ptr_t void *
 
5324
#else
 
5325
# define lt_ptr_t char *
 
5326
# define const
 
5327
#endif
 
5328
 
 
5329
/* The mapping between symbol names and symbols. */
 
5330
const struct {
 
5331
  const char *name;
 
5332
  lt_ptr_t address;
 
5333
}
 
5334
lt_preloaded_symbols[[]] =
 
5335
{
 
5336
EOF
 
5337
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 
5338
          cat <<\EOF >> conftest.$ac_ext
 
5339
  {0, (lt_ptr_t) 0}
 
5340
};
 
5341
 
 
5342
#ifdef __cplusplus
 
5343
}
 
5344
#endif
 
5345
EOF
 
5346
          # Now try linking the two files.
 
5347
          mv conftest.$ac_objext conftstm.$ac_objext
 
5348
          lt_save_LIBS="$LIBS"
 
5349
          lt_save_CFLAGS="$CFLAGS"
 
5350
          LIBS="conftstm.$ac_objext"
 
5351
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
5352
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
5353
            pipe_works=yes
 
5354
          fi
 
5355
          LIBS="$lt_save_LIBS"
 
5356
          CFLAGS="$lt_save_CFLAGS"
 
5357
        else
 
5358
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
5359
        fi
 
5360
      else
 
5361
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
5362
      fi
 
5363
    else
 
5364
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
5365
    fi
 
5366
  else
 
5367
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
5368
    cat conftest.$ac_ext >&5
 
5369
  fi
 
5370
  rm -f conftest* conftst*
 
5371
 
 
5372
  # Do not use the global_symbol_pipe unless it works.
 
5373
  if test "$pipe_works" = yes; then
 
5374
    break
 
5375
  else
 
5376
    lt_cv_sys_global_symbol_pipe=
 
5377
  fi
 
5378
done
 
5379
])
 
5380
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
5381
  lt_cv_sys_global_symbol_to_cdecl=
 
5382
fi
 
5383
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
5384
  AC_MSG_RESULT(failed)
 
5385
else
 
5386
  AC_MSG_RESULT(ok)
 
5387
fi
 
5388
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
5389
 
 
5390
 
 
5391
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
 
5392
# ---------------------------------------
 
5393
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 
5394
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
 
5395
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5396
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
5397
 
 
5398
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
5399
 ifelse([$1],[CXX],[
 
5400
  # C++ specific cases for pic, static, wl, etc.
 
5401
  if test "$GXX" = yes; then
 
5402
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5403
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5404
 
 
5405
    case $host_os in
 
5406
    aix*)
 
5407
      # All AIX code is PIC.
 
5408
      if test "$host_cpu" = ia64; then
 
5409
        # AIX 5 now supports IA64 processor
 
5410
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5411
      fi
 
5412
      ;;
 
5413
    amigaos*)
 
5414
      # FIXME: we need at least 68020 code to build shared libraries, but
 
5415
      # adding the `-m68020' flag to GCC prevents building anything better,
 
5416
      # like `-m68040'.
 
5417
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
5418
      ;;
 
5419
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
5420
      # PIC is the default for these OSes.
 
5421
      ;;
 
5422
    mingw* | os2* | pw32*)
 
5423
      # This hack is so that the source file can tell whether it is being
 
5424
      # built for inclusion in a dll (and should export symbols for example).
 
5425
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
5426
      ;;
 
5427
    darwin* | rhapsody*)
 
5428
      # PIC is the default on this platform
 
5429
      # Common symbols not allowed in MH_DYLIB files
 
5430
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
5431
      ;;
 
5432
    *djgpp*)
 
5433
      # DJGPP does not support shared libraries at all
 
5434
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5435
      ;;
 
5436
    sysv4*MP*)
 
5437
      if test -d /usr/nec; then
 
5438
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
5439
      fi
 
5440
      ;;
 
5441
    hpux*)
 
5442
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5443
      # not for PA HP-UX.
 
5444
      case "$host_cpu" in
 
5445
      hppa*64*|ia64*)
 
5446
        ;;
 
5447
      *)
 
5448
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5449
        ;;
 
5450
      esac
 
5451
      ;;
 
5452
    *)
 
5453
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5454
      ;;
 
5455
    esac
 
5456
  else
 
5457
    case $host_os in
 
5458
      aix4* | aix5*)
 
5459
        # All AIX code is PIC.
 
5460
        if test "$host_cpu" = ia64; then
 
5461
          # AIX 5 now supports IA64 processor
 
5462
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5463
        else
 
5464
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
5465
        fi
 
5466
        ;;
 
5467
      chorus*)
 
5468
        case $cc_basename in
 
5469
        cxch68)
 
5470
          # Green Hills C++ Compiler
 
5471
          # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
 
5472
          ;;
 
5473
        esac
 
5474
        ;;
 
5475
      dgux*)
 
5476
        case $cc_basename in
 
5477
          ec++)
 
5478
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5479
            ;;
 
5480
          ghcx)
 
5481
            # Green Hills C++ Compiler
 
5482
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5483
            ;;
 
5484
          *)
 
5485
            ;;
 
5486
        esac
 
5487
        ;;
 
5488
      freebsd* | kfreebsd*-gnu)
 
5489
        # FreeBSD uses GNU C++
 
5490
        ;;
 
5491
      hpux9* | hpux10* | hpux11*)
 
5492
        case $cc_basename in
 
5493
          CC)
 
5494
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5495
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
5496
            if test "$host_cpu" != ia64; then
 
5497
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5498
            fi
 
5499
            ;;
 
5500
          aCC)
 
5501
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5502
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
5503
            case "$host_cpu" in
 
5504
            hppa*64*|ia64*)
 
5505
              # +Z the default
 
5506
              ;;
 
5507
            *)
 
5508
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5509
              ;;
 
5510
            esac
 
5511
            ;;
 
5512
          *)
 
5513
            ;;
 
5514
        esac
 
5515
        ;;
 
5516
      irix5* | irix6* | nonstopux*)
 
5517
        case $cc_basename in
 
5518
          CC)
 
5519
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5520
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5521
            # CC pic flag -KPIC is the default.
 
5522
            ;;
 
5523
          *)
 
5524
            ;;
 
5525
        esac
 
5526
        ;;
 
5527
      linux*)
 
5528
        case $cc_basename in
 
5529
          KCC)
 
5530
            # KAI C++ Compiler
 
5531
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
5532
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5533
            ;;
 
5534
          icpc)
 
5535
            # Intel C++
 
5536
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5537
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5538
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5539
            ;;
 
5540
          cxx)
 
5541
            # Compaq C++
 
5542
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
5543
            # Linux and Compaq Tru64 Unix objects are PIC.
 
5544
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5545
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5546
            ;;
 
5547
          *)
 
5548
            ;;
 
5549
        esac
 
5550
        ;;
 
5551
      lynxos*)
 
5552
        ;;
 
5553
      m88k*)
 
5554
        ;;
 
5555
      mvs*)
 
5556
        case $cc_basename in
 
5557
          cxx)
 
5558
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
5559
            ;;
 
5560
          *)
 
5561
            ;;
 
5562
        esac
 
5563
        ;;
 
5564
      netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
5565
        ;;
 
5566
      osf3* | osf4* | osf5*)
 
5567
        case $cc_basename in
 
5568
          KCC)
 
5569
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
5570
            ;;
 
5571
          RCC)
 
5572
            # Rational C++ 2.4.1
 
5573
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5574
            ;;
 
5575
          cxx)
 
5576
            # Digital/Compaq C++
 
5577
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5578
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
5579
            # Linux and Compaq Tru64 Unix objects are PIC.
 
5580
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5581
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5582
            ;;
 
5583
          *)
 
5584
            ;;
 
5585
        esac
 
5586
        ;;
 
5587
      psos*)
 
5588
        ;;
 
5589
      sco*)
 
5590
        case $cc_basename in
 
5591
          CC)
 
5592
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5593
            ;;
 
5594
          *)
 
5595
            ;;
 
5596
        esac
 
5597
        ;;
 
5598
      solaris*)
 
5599
        case $cc_basename in
 
5600
          CC)
 
5601
            # Sun C++ 4.2, 5.x and Centerline C++
 
5602
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5603
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5604
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5605
            ;;
 
5606
          gcx)
 
5607
            # Green Hills C++ Compiler
 
5608
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5609
            ;;
 
5610
          *)
 
5611
            ;;
 
5612
        esac
 
5613
        ;;
 
5614
      sunos4*)
 
5615
        case $cc_basename in
 
5616
          CC)
 
5617
            # Sun C++ 4.x
 
5618
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5619
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5620
            ;;
 
5621
          lcc)
 
5622
            # Lucid
 
5623
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5624
            ;;
 
5625
          *)
 
5626
            ;;
 
5627
        esac
 
5628
        ;;
 
5629
      tandem*)
 
5630
        case $cc_basename in
 
5631
          NCC)
 
5632
            # NonStop-UX NCC 3.20
 
5633
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5634
            ;;
 
5635
          *)
 
5636
            ;;
 
5637
        esac
 
5638
        ;;
 
5639
      unixware*)
 
5640
        ;;
 
5641
      vxworks*)
 
5642
        ;;
 
5643
      *)
 
5644
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5645
        ;;
 
5646
    esac
 
5647
  fi
 
5648
],
 
5649
[
 
5650
  if test "$GCC" = yes; then
 
5651
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5652
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5653
 
 
5654
    case $host_os in
 
5655
      aix*)
 
5656
      # All AIX code is PIC.
 
5657
      if test "$host_cpu" = ia64; then
 
5658
        # AIX 5 now supports IA64 processor
 
5659
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5660
      fi
 
5661
      ;;
 
5662
 
 
5663
    amigaos*)
 
5664
      # FIXME: we need at least 68020 code to build shared libraries, but
 
5665
      # adding the `-m68020' flag to GCC prevents building anything better,
 
5666
      # like `-m68040'.
 
5667
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
5668
      ;;
 
5669
 
 
5670
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
5671
      # PIC is the default for these OSes.
 
5672
      ;;
 
5673
 
 
5674
    mingw* | pw32* | os2*)
 
5675
      # This hack is so that the source file can tell whether it is being
 
5676
      # built for inclusion in a dll (and should export symbols for example).
 
5677
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
5678
      ;;
 
5679
 
 
5680
    darwin* | rhapsody*)
 
5681
      # PIC is the default on this platform
 
5682
      # Common symbols not allowed in MH_DYLIB files
 
5683
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
5684
      ;;
 
5685
 
 
5686
    msdosdjgpp*)
 
5687
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
5688
      # on systems that don't support them.
 
5689
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5690
      enable_shared=no
 
5691
      ;;
 
5692
 
 
5693
    sysv4*MP*)
 
5694
      if test -d /usr/nec; then
 
5695
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
5696
      fi
 
5697
      ;;
 
5698
 
 
5699
    hpux*)
 
5700
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5701
      # not for PA HP-UX.
 
5702
      case "$host_cpu" in
 
5703
      hppa*64*|ia64*)
 
5704
        # +Z the default
 
5705
        ;;
 
5706
      *)
 
5707
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5708
        ;;
 
5709
      esac
 
5710
      ;;
 
5711
 
 
5712
    *)
 
5713
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5714
      ;;
 
5715
    esac
 
5716
  else
 
5717
    # PORTME Check for flag to pass linker flags through the system compiler.
 
5718
    case $host_os in
 
5719
    aix*)
 
5720
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5721
      if test "$host_cpu" = ia64; then
 
5722
        # AIX 5 now supports IA64 processor
 
5723
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5724
      else
 
5725
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
5726
      fi
 
5727
      ;;
 
5728
 
 
5729
    mingw* | pw32* | os2*)
 
5730
      # This hack is so that the source file can tell whether it is being
 
5731
      # built for inclusion in a dll (and should export symbols for example).
 
5732
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
5733
      ;;
 
5734
 
 
5735
    hpux9* | hpux10* | hpux11*)
 
5736
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5737
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5738
      # not for PA HP-UX.
 
5739
      case "$host_cpu" in
 
5740
      hppa*64*|ia64*)
 
5741
        # +Z the default
 
5742
        ;;
 
5743
      *)
 
5744
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5745
        ;;
 
5746
      esac
 
5747
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
5748
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5749
      ;;
 
5750
 
 
5751
    irix5* | irix6* | nonstopux*)
 
5752
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5753
      # PIC (with -KPIC) is the default.
 
5754
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5755
      ;;
 
5756
 
 
5757
    newsos6)
 
5758
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5759
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5760
      ;;
 
5761
 
 
5762
    linux*)
 
5763
      case $CC in
 
5764
      icc* | ecc*)
 
5765
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5766
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5767
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5768
        ;;
 
5769
      ccc*)
 
5770
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5771
        # All Alpha code is PIC.
 
5772
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5773
        ;;
 
5774
      esac
 
5775
      ;;
 
5776
 
 
5777
    osf3* | osf4* | osf5*)
 
5778
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5779
      # All OSF/1 code is PIC.
 
5780
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5781
      ;;
 
5782
 
 
5783
    sco3.2v5*)
 
5784
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
 
5785
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
 
5786
      ;;
 
5787
 
 
5788
    solaris*)
 
5789
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5790
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5791
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5792
      ;;
 
5793
 
 
5794
    sunos4*)
 
5795
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5796
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5797
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5798
      ;;
 
5799
 
 
5800
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
5801
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5802
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5803
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5804
      ;;
 
5805
 
 
5806
    sysv4*MP*)
 
5807
      if test -d /usr/nec ;then
 
5808
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
5809
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5810
      fi
 
5811
      ;;
 
5812
 
 
5813
    uts4*)
 
5814
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5815
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5816
      ;;
 
5817
 
 
5818
    *)
 
5819
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5820
      ;;
 
5821
    esac
 
5822
  fi
 
5823
])
 
5824
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
5825
 
 
5826
#
 
5827
# Check to make sure the PIC flag actually works.
 
5828
#
 
5829
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
5830
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
 
5831
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
 
5832
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
 
5833
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
 
5834
     "" | " "*) ;;
 
5835
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
5836
     esac],
 
5837
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5838
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
5839
fi
 
5840
case "$host_os" in
 
5841
  # For platforms which do not support PIC, -DPIC is meaningless:
 
5842
  *djgpp*)
 
5843
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5844
    ;;
 
5845
  *)
 
5846
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
 
5847
    ;;
 
5848
esac
 
5849
])
 
5850
 
 
5851
 
 
5852
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
 
5853
# ------------------------------------
 
5854
# See if the linker supports building shared libraries.
 
5855
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 
5856
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
5857
ifelse([$1],[CXX],[
 
5858
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5859
  case $host_os in
 
5860
  aix4* | aix5*)
 
5861
    # If we're using GNU nm, then we don't want the "-C" option.
 
5862
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5863
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
5864
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
5865
    else
 
5866
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
5867
    fi
 
5868
    ;;
 
5869
  pw32*)
 
5870
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
5871
  ;;
 
5872
  cygwin* | mingw*)
 
5873
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
5874
  ;;
 
5875
  linux*)
 
5876
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
 
5877
  ;;
 
5878
  *)
 
5879
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5880
  ;;
 
5881
  esac
 
5882
],[
 
5883
  runpath_var=
 
5884
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
5885
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
5886
  _LT_AC_TAGVAR(archive_cmds, $1)=
 
5887
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
5888
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
 
5889
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
5890
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
5891
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5892
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
 
5893
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5894
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
5895
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
5896
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5897
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
5898
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
5899
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
5900
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
5901
  _LT_AC_TAGVAR(module_cmds, $1)=
 
5902
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
5903
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
5904
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5905
  # include_expsyms should be a list of space-separated symbols to be *always*
 
5906
  # included in the symbol list
 
5907
  _LT_AC_TAGVAR(include_expsyms, $1)=
 
5908
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
5909
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
5910
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
5911
  # as well as any symbol that contains `d'.
 
5912
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
5913
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
5914
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
5915
  # the symbol is explicitly referenced.  Since portable code cannot
 
5916
  # rely on this symbol name, it's probably fine to never include it in
 
5917
  # preloaded symbol tables.
 
5918
  extract_expsyms_cmds=
 
5919
 
 
5920
  case $host_os in
 
5921
  cygwin* | mingw* | pw32*)
 
5922
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
5923
    # When not using gcc, we currently assume that we are using
 
5924
    # Microsoft Visual C++.
 
5925
    if test "$GCC" != yes; then
 
5926
      with_gnu_ld=no
 
5927
    fi
 
5928
    ;;
 
5929
  openbsd*)
 
5930
    with_gnu_ld=no
 
5931
    ;;
 
5932
  esac
 
5933
 
 
5934
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
5935
  if test "$with_gnu_ld" = yes; then
 
5936
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
5937
    wlarc='${wl}'
 
5938
 
 
5939
    # See if GNU ld supports shared libraries.
 
5940
    case $host_os in
 
5941
    aix3* | aix4* | aix5*)
 
5942
      # On AIX/PPC, the GNU linker is very broken
 
5943
      if test "$host_cpu" != ia64; then
 
5944
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5945
        cat <<EOF 1>&2
 
5946
 
 
5947
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
5948
*** to be unable to reliably create shared libraries on AIX.
 
5949
*** Therefore, libtool is disabling shared libraries support.  If you
 
5950
*** really care for shared libraries, you may want to modify your PATH
 
5951
*** so that a non-GNU linker is found, and then restart.
 
5952
 
 
5953
EOF
 
5954
      fi
 
5955
      ;;
 
5956
 
 
5957
    amigaos*)
 
5958
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
5959
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5960
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5961
 
 
5962
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
5963
      # that the semantics of dynamic libraries on AmigaOS, at least up
 
5964
      # to version 4, is to share data among multiple programs linked
 
5965
      # with the same dynamic library.  Since this doesn't match the
 
5966
      # behavior of shared libraries on other platforms, we can't use
 
5967
      # them.
 
5968
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5969
      ;;
 
5970
 
 
5971
    beos*)
 
5972
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5973
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5974
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
5975
        # support --undefined.  This deserves some investigation.  FIXME
 
5976
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5977
      else
 
5978
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5979
      fi
 
5980
      ;;
 
5981
 
 
5982
    cygwin* | mingw* | pw32*)
 
5983
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
5984
      # as there is no search path for DLLs.
 
5985
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5986
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5987
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
5988
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5989
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
5990
 
 
5991
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
5992
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
5993
        # If the export-symbols file already is a .def file (1st line
 
5994
        # is EXPORTS), use it as is; otherwise, prepend...
 
5995
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
5996
          cp $export_symbols $output_objdir/$soname.def;
 
5997
        else
 
5998
          echo EXPORTS > $output_objdir/$soname.def;
 
5999
          cat $export_symbols >> $output_objdir/$soname.def;
 
6000
        fi~
 
6001
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
 
6002
      else
 
6003
        ld_shlibs=no
 
6004
      fi
 
6005
      ;;
 
6006
 
 
6007
    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
6008
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
6009
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
6010
        wlarc=
 
6011
      else
 
6012
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6013
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
6014
      fi
 
6015
      ;;
 
6016
 
 
6017
    solaris* | sysv5*)
 
6018
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 
6019
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6020
        cat <<EOF 1>&2
 
6021
 
 
6022
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
6023
*** create shared libraries on Solaris systems.  Therefore, libtool
 
6024
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
6025
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
6026
*** your PATH or compiler configuration so that the native linker is
 
6027
*** used, and then restart.
 
6028
 
 
6029
EOF
 
6030
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
6031
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6032
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
6033
      else
 
6034
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6035
      fi
 
6036
      ;;
 
6037
 
 
6038
    sunos4*)
 
6039
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6040
      wlarc=
 
6041
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6042
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6043
      ;;
 
6044
 
 
6045
  linux*)
 
6046
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
6047
        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6048
        _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
 
6049
      supports_anon_versioning=no
 
6050
      case `$LD -v 2>/dev/null` in
 
6051
        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
6052
        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
6053
        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
6054
        *\ 2.11.*) ;; # other 2.11 versions
 
6055
        *) supports_anon_versioning=yes ;;
 
6056
      esac
 
6057
      if test $supports_anon_versioning = yes; then
 
6058
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
 
6059
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
6060
$echo "local: *; };" >> $output_objdir/$libname.ver~
 
6061
        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
6062
      else
 
6063
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
 
6064
      fi
 
6065
      _LT_AC_TAGVAR(link_all_deplibs, $1)=no
 
6066
    else
 
6067
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6068
    fi
 
6069
    ;;
 
6070
 
 
6071
    *)
 
6072
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
6073
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6074
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
6075
      else
 
6076
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6077
      fi
 
6078
      ;;
 
6079
    esac
 
6080
 
 
6081
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
 
6082
      runpath_var=LD_RUN_PATH
 
6083
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
6084
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
6085
      # ancient GNU ld didn't support --whole-archive et. al.
 
6086
      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
 
6087
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
6088
      else
 
6089
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
6090
      fi
 
6091
    fi
 
6092
  else
 
6093
    # PORTME fill in a description of your system's linker (not GNU ld)
 
6094
    case $host_os in
 
6095
    aix3*)
 
6096
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6097
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
6098
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
 
6099
      # Note: this linker hardcodes the directories in LIBPATH if there
 
6100
      # are no directories specified by -L.
 
6101
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6102
      if test "$GCC" = yes && test -z "$link_static_flag"; then
 
6103
        # Neither direct hardcoding nor static linking is supported with a
 
6104
        # broken collect2.
 
6105
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
6106
      fi
 
6107
      ;;
 
6108
 
 
6109
    aix4* | aix5*)
 
6110
      if test "$host_cpu" = ia64; then
 
6111
        # On IA64, the linker does run time linking by default, so we don't
 
6112
        # have to do anything special.
 
6113
        aix_use_runtimelinking=no
 
6114
        exp_sym_flag='-Bexport'
 
6115
        no_entry_flag=""
 
6116
      else
 
6117
        # If we're using GNU nm, then we don't want the "-C" option.
 
6118
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
6119
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
6120
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
6121
        else
 
6122
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
6123
        fi
 
6124
        aix_use_runtimelinking=no
 
6125
 
 
6126
        # Test if we are trying to use run time linking or normal
 
6127
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
6128
        # need to do runtime linking.
 
6129
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
6130
          for ld_flag in $LDFLAGS; do
 
6131
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
6132
            aix_use_runtimelinking=yes
 
6133
            break
 
6134
          fi
 
6135
          done
 
6136
        esac
 
6137
 
 
6138
        exp_sym_flag='-bexport'
 
6139
        no_entry_flag='-bnoentry'
 
6140
      fi
 
6141
 
 
6142
      # When large executables or shared objects are built, AIX ld can
 
6143
      # have problems creating the table of contents.  If linking a library
 
6144
      # or program results in "error TOC overflow" add -mminimal-toc to
 
6145
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
6146
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
6147
 
 
6148
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
6149
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6150
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
6151
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
6152
 
 
6153
      if test "$GCC" = yes; then
 
6154
        case $host_os in aix4.[012]|aix4.[012].*)
 
6155
        # We only want to do this on AIX 4.2 and lower, the check
 
6156
        # below for broken collect2 doesn't work under 4.3+
 
6157
          collect2name=`${CC} -print-prog-name=collect2`
 
6158
          if test -f "$collect2name" && \
 
6159
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
6160
          then
 
6161
          # We have reworked collect2
 
6162
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6163
          else
 
6164
          # We have old collect2
 
6165
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
6166
          # It fails to find uninstalled libraries when the uninstalled
 
6167
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
6168
          # to unsupported forces relinking
 
6169
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6170
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6171
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
6172
          fi
 
6173
        esac
 
6174
        shared_flag='-shared'
 
6175
      else
 
6176
        # not using gcc
 
6177
        if test "$host_cpu" = ia64; then
 
6178
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
6179
        # chokes on -Wl,-G. The following line is correct:
 
6180
          shared_flag='-G'
 
6181
        else
 
6182
        if test "$aix_use_runtimelinking" = yes; then
 
6183
            shared_flag='${wl}-G'
 
6184
          else
 
6185
            shared_flag='${wl}-bM:SRE'
 
6186
        fi
 
6187
        fi
 
6188
      fi
 
6189
 
 
6190
      # It seems that -bexpall does not export symbols beginning with
 
6191
      # underscore (_), so it is better to generate a list of symbols to export.
 
6192
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
6193
      if test "$aix_use_runtimelinking" = yes; then
 
6194
        # Warning - without using the other runtime loading flags (-brtl),
 
6195
        # -berok will link without error, but may produce a broken library.
 
6196
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
6197
       # Determine the default libpath from the value encoded in an empty executable.
 
6198
       _LT_AC_SYS_LIBPATH_AIX
 
6199
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
6200
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
6201
       else
 
6202
        if test "$host_cpu" = ia64; then
 
6203
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
6204
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
6205
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
6206
        else
 
6207
         # Determine the default libpath from the value encoded in an empty executable.
 
6208
         _LT_AC_SYS_LIBPATH_AIX
 
6209
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
6210
          # Warning - without using the other run time loading flags,
 
6211
          # -berok will link without error, but may produce a broken library.
 
6212
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
6213
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
6214
          # -bexpall does not export symbols beginning with underscore (_)
 
6215
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
6216
          # Exported symbols can be pulled into shared objects from archives
 
6217
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
6218
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6219
          # This is similar to how AIX traditionally builds it's shared libraries.
 
6220
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
6221
        fi
 
6222
      fi
 
6223
      ;;
 
6224
 
 
6225
    amigaos*)
 
6226
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
6227
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6228
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6229
      # see comment about different semantics on the GNU ld section
 
6230
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6231
      ;;
 
6232
 
 
6233
    bsdi4*)
 
6234
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
6235
      ;;
 
6236
 
 
6237
    cygwin* | mingw* | pw32*)
 
6238
      # When not using gcc, we currently assume that we are using
 
6239
      # Microsoft Visual C++.
 
6240
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
6241
      # no search path for DLLs.
 
6242
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
6243
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6244
      # Tell ltmain to make .lib files, not .a files.
 
6245
      libext=lib
 
6246
      # Tell ltmain to make .dll files, not .so files.
 
6247
      shrext_cmds=".dll"
 
6248
      # FIXME: Setting linknames here is a bad hack.
 
6249
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
6250
      # The linker will automatically build a .lib file if we build a DLL.
 
6251
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
 
6252
      # FIXME: Should let the user specify the lib program.
 
6253
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
6254
      fix_srcfile_path='`cygpath -w "$srcfile"`'
 
6255
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6256
      ;;
 
6257
 
 
6258
    darwin* | rhapsody*)
 
6259
    if test "$GXX" = yes ; then
 
6260
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
6261
      case "$host_os" in
 
6262
      rhapsody* | darwin1.[[012]])
 
6263
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
6264
        ;;
 
6265
      *) # Darwin 1.3 on
 
6266
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
6267
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
6268
      else
 
6269
        case ${MACOSX_DEPLOYMENT_TARGET} in
 
6270
          10.[[012]])
 
6271
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
6272
            ;;
 
6273
          10.*)
 
6274
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
 
6275
            ;;
 
6276
        esac
 
6277
      fi
 
6278
        ;;
 
6279
      esac
 
6280
        lt_int_apple_cc_single_mod=no
 
6281
        output_verbose_link_cmd='echo'
 
6282
        if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
 
6283
          lt_int_apple_cc_single_mod=yes
 
6284
        fi
 
6285
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
6286
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
6287
        else
 
6288
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
6289
      fi
 
6290
      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
6291
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
6292
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
6293
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
6294
        else
 
6295
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
6296
        fi
 
6297
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
6298
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
6299
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
6300
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
6301
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
 
6302
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
6303
    else
 
6304
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6305
    fi
 
6306
      ;;
 
6307
 
 
6308
    dgux*)
 
6309
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6310
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6311
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6312
      ;;
 
6313
 
 
6314
    freebsd1*)
 
6315
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6316
      ;;
 
6317
 
 
6318
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
6319
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
6320
    # does not break anything, and helps significantly (at the cost of a little
 
6321
    # extra space).
 
6322
    freebsd2.2*)
 
6323
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
6324
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6325
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6326
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6327
      ;;
 
6328
 
 
6329
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
6330
    freebsd2*)
 
6331
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6332
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6333
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6334
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6335
      ;;
 
6336
 
 
6337
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
6338
    freebsd* | kfreebsd*-gnu)
 
6339
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
6340
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6341
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6342
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6343
      ;;
 
6344
 
 
6345
    hpux9*)
 
6346
      if test "$GCC" = yes; then
 
6347
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
6348
      else
 
6349
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
6350
      fi
 
6351
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6352
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6353
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6354
 
 
6355
      # hardcode_minus_L: Not really in the search PATH,
 
6356
      # but as the default location of the library.
 
6357
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6358
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6359
      ;;
 
6360
 
 
6361
    hpux10* | hpux11*)
 
6362
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
6363
        case "$host_cpu" in
 
6364
        hppa*64*|ia64*)
 
6365
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6366
          ;;
 
6367
        *)
 
6368
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6369
          ;;
 
6370
        esac
 
6371
      else
 
6372
        case "$host_cpu" in
 
6373
        hppa*64*|ia64*)
 
6374
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6375
          ;;
 
6376
        *)
 
6377
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
6378
          ;;
 
6379
        esac
 
6380
      fi
 
6381
      if test "$with_gnu_ld" = no; then
 
6382
        case "$host_cpu" in
 
6383
        hppa*64*)
 
6384
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6385
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
6386
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6387
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
6388
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6389
          ;;
 
6390
        ia64*)
 
6391
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6392
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
6393
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6394
 
 
6395
          # hardcode_minus_L: Not really in the search PATH,
 
6396
          # but as the default location of the library.
 
6397
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6398
          ;;
 
6399
        *)
 
6400
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6401
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6402
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6403
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6404
 
 
6405
          # hardcode_minus_L: Not really in the search PATH,
 
6406
          # but as the default location of the library.
 
6407
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6408
          ;;
 
6409
        esac
 
6410
      fi
 
6411
      ;;
 
6412
 
 
6413
    irix5* | irix6* | nonstopux*)
 
6414
      if test "$GCC" = yes; then
 
6415
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6416
      else
 
6417
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
6418
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
6419
      fi
 
6420
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6421
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6422
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
6423
      ;;
 
6424
 
 
6425
    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
6426
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
6427
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
6428
      else
 
6429
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
6430
      fi
 
6431
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6432
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6433
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6434
      ;;
 
6435
 
 
6436
    newsos6)
 
6437
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6438
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6439
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6440
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6441
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6442
      ;;
 
6443
 
 
6444
    openbsd*)
 
6445
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6446
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6447
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
6448
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6449
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6450
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6451
      else
 
6452
       case $host_os in
 
6453
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
6454
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6455
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6456
           ;;
 
6457
         *)
 
6458
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6459
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6460
           ;;
 
6461
       esac
 
6462
      fi
 
6463
      ;;
 
6464
 
 
6465
    os2*)
 
6466
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6467
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6468
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6469
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 
6470
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
6471
      ;;
 
6472
 
 
6473
    osf3*)
 
6474
      if test "$GCC" = yes; then
 
6475
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6476
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6477
      else
 
6478
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6479
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
6480
      fi
 
6481
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6482
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6483
      ;;
 
6484
 
 
6485
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
6486
      if test "$GCC" = yes; then
 
6487
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6488
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6489
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6490
      else
 
6491
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6492
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
6493
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 
6494
        $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'
 
6495
 
 
6496
        # Both c and cxx compiler support -rpath directly
 
6497
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
6498
      fi
 
6499
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6500
      ;;
 
6501
 
 
6502
    sco3.2v5*)
 
6503
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6504
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6505
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
6506
      runpath_var=LD_RUN_PATH
 
6507
      hardcode_runpath_var=yes
 
6508
      ;;
 
6509
 
 
6510
    solaris*)
 
6511
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
6512
      if test "$GCC" = yes; then
 
6513
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6514
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
6515
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
6516
      else
 
6517
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6518
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
6519
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
6520
      fi
 
6521
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6522
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6523
      case $host_os in
 
6524
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
6525
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
 
6526
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
6527
      esac
 
6528
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
6529
      ;;
 
6530
 
 
6531
    sunos4*)
 
6532
      if test "x$host_vendor" = xsequent; then
 
6533
        # Use $CC to link under sequent, because it throws in some extra .o
 
6534
        # files that make .init and .fini sections work.
 
6535
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
6536
      else
 
6537
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
6538
      fi
 
6539
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6540
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6541
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6542
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6543
      ;;
 
6544
 
 
6545
    sysv4)
 
6546
      case $host_vendor in
 
6547
        sni)
 
6548
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6549
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
6550
        ;;
 
6551
        siemens)
 
6552
          ## LD is ld it makes a PLAMLIB
 
6553
          ## CC just makes a GrossModule.
 
6554
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
6555
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
6556
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
6557
        ;;
 
6558
        motorola)
 
6559
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6560
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
6561
        ;;
 
6562
      esac
 
6563
      runpath_var='LD_RUN_PATH'
 
6564
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6565
      ;;
 
6566
 
 
6567
    sysv4.3*)
 
6568
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6569
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6570
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
6571
      ;;
 
6572
 
 
6573
    sysv4*MP*)
 
6574
      if test -d /usr/nec; then
 
6575
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6576
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6577
        runpath_var=LD_RUN_PATH
 
6578
        hardcode_runpath_var=yes
 
6579
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
6580
      fi
 
6581
      ;;
 
6582
 
 
6583
    sysv4.2uw2*)
 
6584
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
6585
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6586
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
6587
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6588
      hardcode_runpath_var=yes
 
6589
      runpath_var=LD_RUN_PATH
 
6590
      ;;
 
6591
 
 
6592
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
 
6593
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
 
6594
      if test "$GCC" = yes; then
 
6595
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6596
      else
 
6597
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6598
      fi
 
6599
      runpath_var='LD_RUN_PATH'
 
6600
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6601
      ;;
 
6602
 
 
6603
    sysv5*)
 
6604
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
6605
      # $CC -shared without GNU ld will not create a library from C++
 
6606
      # object files and a static libstdc++, better avoid it by now
 
6607
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6608
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
6609
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
6610
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
6611
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6612
      runpath_var='LD_RUN_PATH'
 
6613
      ;;
 
6614
 
 
6615
    uts4*)
 
6616
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6617
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6618
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6619
      ;;
 
6620
 
 
6621
    *)
 
6622
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6623
      ;;
 
6624
    esac
 
6625
  fi
 
6626
])
 
6627
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
6628
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
6629
 
 
6630
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
6631
if test "$GCC" = yes; then
 
6632
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
6633
fi
 
6634
 
 
6635
#
 
6636
# Do we need to explicitly link libc?
 
6637
#
 
6638
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
 
6639
x|xyes)
 
6640
  # Assume -lc should be added
 
6641
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6642
 
 
6643
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
6644
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
6645
    *'~'*)
 
6646
      # FIXME: we may have to deal with multi-command sequences.
 
6647
      ;;
 
6648
    '$CC '*)
 
6649
      # Test whether the compiler implicitly links with -lc since on some
 
6650
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
6651
      # to ld, don't add -lc before -lgcc.
 
6652
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
6653
      $rm conftest*
 
6654
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6655
 
 
6656
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
6657
        soname=conftest
 
6658
        lib=conftest
 
6659
        libobjs=conftest.$ac_objext
 
6660
        deplibs=
 
6661
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
6662
        compiler_flags=-v
 
6663
        linker_flags=-v
 
6664
        verstring=
 
6665
        output_objdir=.
 
6666
        libname=conftest
 
6667
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
6668
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
6669
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
6670
        then
 
6671
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
6672
        else
 
6673
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6674
        fi
 
6675
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
6676
      else
 
6677
        cat conftest.err 1>&5
 
6678
      fi
 
6679
      $rm conftest*
 
6680
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
6681
      ;;
 
6682
    esac
 
6683
  fi
 
6684
  ;;
 
6685
esac
 
6686
])# AC_LIBTOOL_PROG_LD_SHLIBS
 
6687
 
 
6688
 
 
6689
# _LT_AC_FILE_LTDLL_C
 
6690
# -------------------
 
6691
# Be careful that the start marker always follows a newline.
 
6692
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
3658
6693
# /* ltdll.c starts here */
3659
6694
# #define WIN32_LEAN_AND_MEAN
3660
6695
# #include <windows.h>
3688
6723
#   return TRUE;
3689
6724
# }
3690
6725
# /* ltdll.c ends here */
3691
 
        # This is a source program that is used to create import libraries
3692
 
        # on Windows for dlls which lack them. Don't remove nor modify the
3693
 
        # starting and closing comments
3694
 
# /* impgen.c starts here */
3695
 
# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
3696
 
#
3697
 
#  This file is part of GNU libtool.
3698
 
#
3699
 
#  This program is free software; you can redistribute it and/or modify
3700
 
#  it under the terms of the GNU General Public License as published by
3701
 
#  the Free Software Foundation; either version 2 of the License, or
3702
 
#  (at your option) any later version.
3703
 
#
3704
 
#  This program is distributed in the hope that it will be useful,
3705
 
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
3706
 
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3707
 
#  GNU General Public License for more details.
3708
 
#
3709
 
#  You should have received a copy of the GNU General Public License
3710
 
#  along with this program; if not, write to the Free Software
3711
 
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3712
 
#  */
3713
 
#
3714
 
# #include <stdio.h>            /* for printf() */
3715
 
# #include <unistd.h>           /* for open(), lseek(), read() */
3716
 
# #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
3717
 
# #include <string.h>           /* for strdup() */
3718
 
#
3719
 
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3720
 
# #ifndef O_BINARY
3721
 
# #define O_BINARY 0
3722
 
# #endif
3723
 
#
3724
 
# static unsigned int
3725
 
# pe_get16 (fd, offset)
3726
 
#      int fd;
3727
 
#      int offset;
3728
 
# {
3729
 
#   unsigned char b[2];
3730
 
#   lseek (fd, offset, SEEK_SET);
3731
 
#   read (fd, b, 2);
3732
 
#   return b[0] + (b[1]<<8);
3733
 
# }
3734
 
#
3735
 
# static unsigned int
3736
 
# pe_get32 (fd, offset)
3737
 
#     int fd;
3738
 
#     int offset;
3739
 
# {
3740
 
#   unsigned char b[4];
3741
 
#   lseek (fd, offset, SEEK_SET);
3742
 
#   read (fd, b, 4);
3743
 
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3744
 
# }
3745
 
#
3746
 
# static unsigned int
3747
 
# pe_as32 (ptr)
3748
 
#      void *ptr;
3749
 
# {
3750
 
#   unsigned char *b = ptr;
3751
 
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3752
 
# }
3753
 
#
3754
 
# int
3755
 
# main (argc, argv)
3756
 
#     int argc;
3757
 
#     char *argv[];
3758
 
# {
3759
 
#     int dll;
3760
 
#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3761
 
#     unsigned long export_rva, export_size, nsections, secptr, expptr;
3762
 
#     unsigned long name_rvas, nexp;
3763
 
#     unsigned char *expdata, *erva;
3764
 
#     char *filename, *dll_name;
3765
 
#
3766
 
#     filename = argv[1];
3767
 
#
3768
 
#     dll = open(filename, O_RDONLY|O_BINARY);
3769
 
#     if (dll < 1)
3770
 
#       return 1;
3771
 
#
3772
 
#     dll_name = filename;
3773
 
#
3774
 
#     for (i=0; filename[i]; i++)
3775
 
#       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
3776
 
#           dll_name = filename + i +1;
3777
 
#
3778
 
#     pe_header_offset = pe_get32 (dll, 0x3c);
3779
 
#     opthdr_ofs = pe_header_offset + 4 + 20;
3780
 
#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
3781
 
#
3782
 
#     if (num_entries < 1) /* no exports */
3783
 
#       return 1;
3784
 
#
3785
 
#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
3786
 
#     export_size = pe_get32 (dll, opthdr_ofs + 100);
3787
 
#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3788
 
#     secptr = (pe_header_offset + 4 + 20 +
3789
 
#             pe_get16 (dll, pe_header_offset + 4 + 16));
3790
 
#
3791
 
#     expptr = 0;
3792
 
#     for (i = 0; i < nsections; i++)
3793
 
#     {
3794
 
#       char sname[8];
3795
 
#       unsigned long secptr1 = secptr + 40 * i;
3796
 
#       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3797
 
#       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3798
 
#       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3799
 
#       lseek(dll, secptr1, SEEK_SET);
3800
 
#       read(dll, sname, 8);
3801
 
#       if (vaddr <= export_rva && vaddr+vsize > export_rva)
3802
 
#       {
3803
 
#           expptr = fptr + (export_rva - vaddr);
3804
 
#           if (export_rva + export_size > vaddr + vsize)
3805
 
#               export_size = vsize - (export_rva - vaddr);
3806
 
#           break;
3807
 
#       }
3808
 
#     }
3809
 
#
3810
 
#     expdata = (unsigned char*)malloc(export_size);
3811
 
#     lseek (dll, expptr, SEEK_SET);
3812
 
#     read (dll, expdata, export_size);
3813
 
#     erva = expdata - export_rva;
3814
 
#
3815
 
#     nexp = pe_as32 (expdata+24);
3816
 
#     name_rvas = pe_as32 (expdata+32);
3817
 
#
3818
 
#     printf ("EXPORTS\n");
3819
 
#     for (i = 0; i<nexp; i++)
3820
 
#     {
3821
 
#       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3822
 
#       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3823
 
#     }
3824
 
#
3825
 
#     return 0;
3826
 
# }
3827
 
# /* impgen.c ends here */
3828
 
 
3829
 
EOF
3830
 
    ;;
3831
 
  esac
3832
 
 
3833
 
  # We use sed instead of cat because bash on DJGPP gets confused if
3834
 
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3835
 
  # text mode, it properly converts lines to CR/LF.  This bash problem
3836
 
  # is reportedly fixed, but why not run on old versions too?
3837
 
  sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3838
 
 
3839
 
  mv -f "${ofile}T" "$ofile" || \
3840
 
    (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3841
 
  chmod +x "$ofile"
3842
 
fi
3843
 
 
3844
 
])# _LT_AC_LTCONFIG_HACK
3845
 
 
3846
 
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3847
 
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3848
 
 
3849
 
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3850
 
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3851
 
 
3852
 
# AC_ENABLE_SHARED - implement the --enable-shared flag
3853
 
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3854
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3855
 
#   `yes'.
3856
 
AC_DEFUN([AC_ENABLE_SHARED],
3857
 
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3858
 
AC_ARG_ENABLE(shared,
3859
 
changequote(<<, >>)dnl
3860
 
<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3861
 
changequote([, ])dnl
3862
 
[p=${PACKAGE-default}
3863
 
case $enableval in
3864
 
yes) enable_shared=yes ;;
3865
 
no) enable_shared=no ;;
3866
 
*)
3867
 
  enable_shared=no
3868
 
  # Look at the argument we got.  We use all the common list separators.
3869
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3870
 
  for pkg in $enableval; do
3871
 
    if test "X$pkg" = "X$p"; then
3872
 
      enable_shared=yes
3873
 
    fi
3874
 
  done
3875
 
  IFS="$ac_save_ifs"
3876
 
  ;;
3877
 
esac],
3878
 
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3879
 
])
3880
 
 
3881
 
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3882
 
AC_DEFUN([AC_DISABLE_SHARED],
3883
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3884
 
AC_ENABLE_SHARED(no)])
3885
 
 
3886
 
# AC_ENABLE_STATIC - implement the --enable-static flag
3887
 
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3888
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3889
 
#   `yes'.
3890
 
AC_DEFUN([AC_ENABLE_STATIC],
3891
 
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3892
 
AC_ARG_ENABLE(static,
3893
 
changequote(<<, >>)dnl
3894
 
<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3895
 
changequote([, ])dnl
3896
 
[p=${PACKAGE-default}
3897
 
case $enableval in
3898
 
yes) enable_static=yes ;;
3899
 
no) enable_static=no ;;
3900
 
*)
3901
 
  enable_static=no
3902
 
  # Look at the argument we got.  We use all the common list separators.
3903
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3904
 
  for pkg in $enableval; do
3905
 
    if test "X$pkg" = "X$p"; then
3906
 
      enable_static=yes
3907
 
    fi
3908
 
  done
3909
 
  IFS="$ac_save_ifs"
3910
 
  ;;
3911
 
esac],
3912
 
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3913
 
])
3914
 
 
3915
 
# AC_DISABLE_STATIC - set the default static flag to --disable-static
3916
 
AC_DEFUN([AC_DISABLE_STATIC],
3917
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3918
 
AC_ENABLE_STATIC(no)])
3919
 
 
3920
 
 
3921
 
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3922
 
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3923
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3924
 
#   `yes'.
3925
 
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3926
 
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3927
 
AC_ARG_ENABLE(fast-install,
3928
 
changequote(<<, >>)dnl
3929
 
<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3930
 
changequote([, ])dnl
3931
 
[p=${PACKAGE-default}
3932
 
case $enableval in
3933
 
yes) enable_fast_install=yes ;;
3934
 
no) enable_fast_install=no ;;
3935
 
*)
3936
 
  enable_fast_install=no
3937
 
  # Look at the argument we got.  We use all the common list separators.
3938
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3939
 
  for pkg in $enableval; do
3940
 
    if test "X$pkg" = "X$p"; then
3941
 
      enable_fast_install=yes
3942
 
    fi
3943
 
  done
3944
 
  IFS="$ac_save_ifs"
3945
 
  ;;
3946
 
esac],
3947
 
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3948
 
])
3949
 
 
3950
 
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3951
 
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3952
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3953
 
AC_ENABLE_FAST_INSTALL(no)])
3954
 
 
3955
 
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3956
 
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3957
 
#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
3958
 
#   `both'.
3959
 
AC_DEFUN([AC_LIBTOOL_PICMODE],
3960
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3961
 
pic_mode=ifelse($#,1,$1,default)])
3962
 
 
3963
 
 
3964
 
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3965
 
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3966
 
[AC_MSG_CHECKING([for $1])
3967
 
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3968
 
[case $MAGIC_CMD in
3969
 
  /*)
3970
 
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3971
 
  ;;
3972
 
  ?:/*)
3973
 
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3974
 
  ;;
3975
 
  *)
3976
 
  ac_save_MAGIC_CMD="$MAGIC_CMD"
3977
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3978
 
dnl $ac_dummy forces splitting on constant user-supplied paths.
3979
 
dnl POSIX.2 word splitting is done only on the output of word expansions,
3980
 
dnl not every word.  This closes a longstanding sh security hole.
3981
 
  ac_dummy="ifelse([$2], , $PATH, [$2])"
3982
 
  for ac_dir in $ac_dummy; do
3983
 
    test -z "$ac_dir" && ac_dir=.
3984
 
    if test -f $ac_dir/$1; then
3985
 
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3986
 
      if test -n "$file_magic_test_file"; then
3987
 
        case $deplibs_check_method in
3988
 
        "file_magic "*)
3989
 
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3990
 
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3991
 
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3992
 
            egrep "$file_magic_regex" > /dev/null; then
3993
 
            :
3994
 
          else
3995
 
            cat <<EOF 1>&2
3996
 
 
3997
 
*** Warning: the command libtool uses to detect shared libraries,
3998
 
*** $file_magic_cmd, produces output that libtool cannot recognize.
3999
 
*** The result is that libtool may fail to recognize shared libraries
4000
 
*** as such.  This will affect the creation of libtool libraries that
4001
 
*** depend on shared libraries, but programs linked with such libtool
4002
 
*** libraries will work regardless of this problem.  Nevertheless, you
4003
 
*** may want to report the problem to your system manager and/or to
4004
 
*** bug-libtool@gnu.org
4005
 
 
4006
 
EOF
4007
 
          fi ;;
4008
 
        esac
4009
 
      fi
4010
 
      break
4011
 
    fi
4012
 
  done
4013
 
  IFS="$ac_save_ifs"
4014
 
  MAGIC_CMD="$ac_save_MAGIC_CMD"
4015
 
  ;;
4016
 
esac])
4017
 
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4018
 
if test -n "$MAGIC_CMD"; then
4019
 
  AC_MSG_RESULT($MAGIC_CMD)
4020
 
else
4021
 
  AC_MSG_RESULT(no)
4022
 
fi
4023
 
])
4024
 
 
4025
 
 
4026
 
# AC_PATH_MAGIC - find a file program which can recognise a shared library
4027
 
AC_DEFUN([AC_PATH_MAGIC],
4028
 
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4029
 
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4030
 
if test -z "$lt_cv_path_MAGIC_CMD"; then
4031
 
  if test -n "$ac_tool_prefix"; then
4032
 
    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4033
 
  else
4034
 
    MAGIC_CMD=:
4035
 
  fi
4036
 
fi
4037
 
])
4038
 
 
4039
 
 
4040
 
# AC_PROG_LD - find the path to the GNU or non-GNU linker
4041
 
AC_DEFUN([AC_PROG_LD],
4042
 
[AC_ARG_WITH(gnu-ld,
4043
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
4044
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4045
 
AC_REQUIRE([AC_PROG_CC])dnl
4046
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4047
 
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4048
 
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4049
 
ac_prog=ld
4050
 
if test "$GCC" = yes; then
4051
 
  # Check if gcc -print-prog-name=ld gives a path.
4052
 
  AC_MSG_CHECKING([for ld used by GCC])
4053
 
  case $host in
4054
 
  *-*-mingw*)
4055
 
    # gcc leaves a trailing carriage return which upsets mingw
4056
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4057
 
  *)
4058
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4059
 
  esac
4060
 
  case $ac_prog in
4061
 
    # Accept absolute paths.
4062
 
    [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4063
 
      re_direlt='/[[^/]][[^/]]*/\.\./'
4064
 
      # Canonicalize the path of ld
4065
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4066
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4067
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4068
 
      done
4069
 
      test -z "$LD" && LD="$ac_prog"
4070
 
      ;;
4071
 
  "")
4072
 
    # If it fails, then pretend we aren't using GCC.
4073
 
    ac_prog=ld
4074
 
    ;;
4075
 
  *)
4076
 
    # If it is relative, then search for the first ld in PATH.
4077
 
    with_gnu_ld=unknown
4078
 
    ;;
4079
 
  esac
4080
 
elif test "$with_gnu_ld" = yes; then
4081
 
  AC_MSG_CHECKING([for GNU ld])
4082
 
else
4083
 
  AC_MSG_CHECKING([for non-GNU ld])
4084
 
fi
4085
 
AC_CACHE_VAL(lt_cv_path_LD,
4086
 
[if test -z "$LD"; then
4087
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4088
 
  for ac_dir in $PATH; do
4089
 
    test -z "$ac_dir" && ac_dir=.
4090
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4091
 
      lt_cv_path_LD="$ac_dir/$ac_prog"
4092
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
4093
 
      # but apparently some GNU ld's only accept -v.
4094
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
4095
 
      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4096
 
        test "$with_gnu_ld" != no && break
4097
 
      else
4098
 
        test "$with_gnu_ld" != yes && break
4099
 
      fi
4100
 
    fi
4101
 
  done
4102
 
  IFS="$ac_save_ifs"
4103
 
else
4104
 
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4105
 
fi])
4106
 
LD="$lt_cv_path_LD"
4107
 
if test -n "$LD"; then
4108
 
  AC_MSG_RESULT($LD)
4109
 
else
4110
 
  AC_MSG_RESULT(no)
4111
 
fi
4112
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4113
 
AC_PROG_LD_GNU
4114
 
])
4115
 
 
4116
 
# AC_PROG_LD_GNU -
4117
 
AC_DEFUN([AC_PROG_LD_GNU],
4118
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4119
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4120
 
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4121
 
  lt_cv_prog_gnu_ld=yes
4122
 
else
4123
 
  lt_cv_prog_gnu_ld=no
4124
 
fi])
4125
 
with_gnu_ld=$lt_cv_prog_gnu_ld
4126
 
])
4127
 
 
4128
 
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4129
 
#   -- PORTME Some linkers may need a different reload flag.
4130
 
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4131
 
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4132
 
[lt_cv_ld_reload_flag='-r'])
4133
 
reload_flag=$lt_cv_ld_reload_flag
4134
 
test -n "$reload_flag" && reload_flag=" $reload_flag"
4135
 
])
4136
 
 
4137
 
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4138
 
#  -- PORTME fill in with the dynamic library characteristics
4139
 
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4140
 
[AC_CACHE_CHECK([how to recognise dependent libraries],
4141
 
lt_cv_deplibs_check_method,
4142
 
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4143
 
lt_cv_file_magic_test_file=
4144
 
lt_cv_deplibs_check_method='unknown'
4145
 
# Need to set the preceding variable on all platforms that support
4146
 
# interlibrary dependencies.
4147
 
# 'none' -- dependencies not supported.
4148
 
# `unknown' -- same as none, but documents that we really don't know.
4149
 
# 'pass_all' -- all dependencies passed with no checks.
4150
 
# 'test_compile' -- check by making test program.
4151
 
# 'file_magic [[regex]]' -- check by looking for files in library path
4152
 
# which responds to the $file_magic_cmd with a given egrep regex.
4153
 
# If you have `file' or equivalent on your system and you're not sure
4154
 
# whether `pass_all' will *always* work, you probably want this one.
4155
 
 
4156
 
case $host_os in
4157
 
aix4* | aix5*)
4158
 
  lt_cv_deplibs_check_method=pass_all
4159
 
  ;;
4160
 
 
4161
 
beos*)
4162
 
  lt_cv_deplibs_check_method=pass_all
4163
 
  ;;
4164
 
 
4165
 
bsdi4*)
4166
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4167
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4168
 
  lt_cv_file_magic_test_file=/shlib/libc.so
4169
 
  ;;
4170
 
 
4171
 
cygwin* | mingw* | pw32*)
4172
 
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4173
 
  lt_cv_file_magic_cmd='$OBJDUMP -f'
4174
 
  ;;
4175
 
 
4176
 
darwin* | rhapsody*)
4177
 
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4178
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4179
 
  case "$host_os" in
4180
 
  rhapsody* | darwin1.[[012]])
4181
 
    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4182
 
    ;;
4183
 
  *) # Darwin 1.3 on
4184
 
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4185
 
    ;;
4186
 
  esac
4187
 
  ;;
4188
 
 
4189
 
freebsd*)
4190
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4191
 
    case $host_cpu in
4192
 
    i*86 )
4193
 
      # Not sure whether the presence of OpenBSD here was a mistake.
4194
 
      # Let's accept both of them until this is cleared up.
4195
 
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4196
 
      lt_cv_file_magic_cmd=/usr/bin/file
4197
 
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4198
 
      ;;
4199
 
    esac
4200
 
  else
4201
 
    lt_cv_deplibs_check_method=pass_all
4202
 
  fi
4203
 
  ;;
4204
 
 
4205
 
gnu*)
4206
 
  lt_cv_deplibs_check_method=pass_all
4207
 
  ;;
4208
 
 
4209
 
hpux10.20*|hpux11*)
4210
 
  lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4211
 
  lt_cv_file_magic_cmd=/usr/bin/file
4212
 
  lt_cv_file_magic_test_file=/usr/lib/libc.sl
4213
 
  ;;
4214
 
 
4215
 
irix5* | irix6* | nonstopux*)
4216
 
  case $host_os in
4217
 
  irix5* | nonstopux*)
4218
 
    # this will be overridden with pass_all, but let us keep it just in case
4219
 
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4220
 
    ;;
4221
 
  *)
4222
 
    case $LD in
4223
 
    *-32|*"-32 ") libmagic=32-bit;;
4224
 
    *-n32|*"-n32 ") libmagic=N32;;
4225
 
    *-64|*"-64 ") libmagic=64-bit;;
4226
 
    *) libmagic=never-match;;
4227
 
    esac
4228
 
    # this will be overridden with pass_all, but let us keep it just in case
4229
 
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4230
 
    ;;
4231
 
  esac
4232
 
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4233
 
  lt_cv_deplibs_check_method=pass_all
4234
 
  ;;
4235
 
 
4236
 
# This must be Linux ELF.
4237
 
linux-gnu*)
4238
 
  case $host_cpu in
4239
 
  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
4240
 
    lt_cv_deplibs_check_method=pass_all ;;
4241
 
  *)
4242
 
    # glibc up to 2.1.1 does not perform some relocations on ARM
4243
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4244
 
  esac
4245
 
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4246
 
  ;;
4247
 
 
4248
 
netbsd*)
4249
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4250
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4251
 
  else
4252
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4253
 
  fi
4254
 
  ;;
4255
 
 
4256
 
newos6*)
4257
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4258
 
  lt_cv_file_magic_cmd=/usr/bin/file
4259
 
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4260
 
  ;;
4261
 
 
4262
 
openbsd*)
4263
 
  lt_cv_file_magic_cmd=/usr/bin/file
4264
 
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4265
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4266
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4267
 
  else
4268
 
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4269
 
  fi
4270
 
  ;;
4271
 
 
4272
 
osf3* | osf4* | osf5*)
4273
 
  # this will be overridden with pass_all, but let us keep it just in case
4274
 
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4275
 
  lt_cv_file_magic_test_file=/shlib/libc.so
4276
 
  lt_cv_deplibs_check_method=pass_all
4277
 
  ;;
4278
 
 
4279
 
sco3.2v5*)
4280
 
  lt_cv_deplibs_check_method=pass_all
4281
 
  ;;
4282
 
 
4283
 
solaris*)
4284
 
  lt_cv_deplibs_check_method=pass_all
4285
 
  lt_cv_file_magic_test_file=/lib/libc.so
4286
 
  ;;
4287
 
 
4288
 
sysv5uw[[78]]* | sysv4*uw2*)
4289
 
  lt_cv_deplibs_check_method=pass_all
4290
 
  ;;
4291
 
 
4292
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4293
 
  case $host_vendor in
4294
 
  motorola)
4295
 
    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]]'
4296
 
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4297
 
    ;;
4298
 
  ncr)
4299
 
    lt_cv_deplibs_check_method=pass_all
4300
 
    ;;
4301
 
  sequent)
4302
 
    lt_cv_file_magic_cmd='/bin/file'
4303
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4304
 
    ;;
4305
 
  sni)
4306
 
    lt_cv_file_magic_cmd='/bin/file'
4307
 
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4308
 
    lt_cv_file_magic_test_file=/lib/libc.so
4309
 
    ;;
4310
 
  siemens)
4311
 
    lt_cv_deplibs_check_method=pass_all
4312
 
    ;;
4313
 
  esac
4314
 
  ;;
4315
 
esac
4316
 
])
4317
 
file_magic_cmd=$lt_cv_file_magic_cmd
4318
 
deplibs_check_method=$lt_cv_deplibs_check_method
4319
 
])
4320
 
 
4321
 
 
4322
 
# AC_PROG_NM - find the path to a BSD-compatible name lister
4323
 
AC_DEFUN([AC_PROG_NM],
4324
 
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4325
 
AC_MSG_CHECKING([for BSD-compatible nm])
4326
 
AC_CACHE_VAL(lt_cv_path_NM,
4327
 
[if test -n "$NM"; then
4328
 
  # Let the user override the test.
4329
 
  lt_cv_path_NM="$NM"
4330
 
else
4331
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4332
 
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4333
 
    test -z "$ac_dir" && ac_dir=.
4334
 
    tmp_nm=$ac_dir/${ac_tool_prefix}nm
4335
 
    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4336
 
      # Check to see if the nm accepts a BSD-compat flag.
4337
 
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4338
 
      #   nm: unknown option "B" ignored
4339
 
      # Tru64's nm complains that /dev/null is an invalid object file
4340
 
      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4341
 
        lt_cv_path_NM="$tmp_nm -B"
4342
 
        break
4343
 
      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4344
 
        lt_cv_path_NM="$tmp_nm -p"
4345
 
        break
4346
 
      else
4347
 
        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4348
 
        continue # so that we can try to find one that supports BSD flags
4349
 
      fi
4350
 
    fi
4351
 
  done
4352
 
  IFS="$ac_save_ifs"
4353
 
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4354
 
fi])
4355
 
NM="$lt_cv_path_NM"
4356
 
AC_MSG_RESULT([$NM])
4357
 
])
4358
 
 
4359
 
# AC_CHECK_LIBM - check for math library
4360
 
AC_DEFUN([AC_CHECK_LIBM],
4361
 
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4362
 
LIBM=
4363
 
case $host in
4364
 
*-*-beos* | *-*-cygwin* | *-*-pw32*)
4365
 
  # These system don't have libm
4366
 
  ;;
4367
 
*-ncr-sysv4.3*)
4368
 
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4369
 
  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4370
 
  ;;
4371
 
*)
4372
 
  AC_CHECK_LIB(m, main, LIBM="-lm")
4373
 
  ;;
4374
 
esac
4375
 
])
4376
 
 
4377
 
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4378
 
# the libltdl convenience library and LTDLINCL to the include flags for
4379
 
# the libltdl header and adds --enable-ltdl-convenience to the
4380
 
# configure arguments.  Note that LIBLTDL and LTDLINCL are not
4381
 
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
4382
 
# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
4383
 
# with '${top_builddir}/' and LTDLINCL will be prefixed with
4384
 
# '${top_srcdir}/' (note the single quotes!).  If your package is not
4385
 
# flat and you're not using automake, define top_builddir and
4386
 
# top_srcdir appropriately in the Makefiles.
4387
 
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4388
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4389
 
  case $enable_ltdl_convenience in
4390
 
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4391
 
  "") enable_ltdl_convenience=yes
4392
 
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4393
 
  esac
4394
 
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4395
 
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4396
 
  # For backwards non-gettext consistent compatibility...
4397
 
  INCLTDL="$LTDLINCL"
4398
 
])
4399
 
 
4400
 
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4401
 
# the libltdl installable library and LTDLINCL to the include flags for
4402
 
# the libltdl header and adds --enable-ltdl-install to the configure
4403
 
# arguments.  Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4404
 
# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
4405
 
# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
4406
 
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4407
 
# with '${top_srcdir}/' (note the single quotes!).  If your package is
4408
 
# not flat and you're not using automake, define top_builddir and
4409
 
# top_srcdir appropriately in the Makefiles.
4410
 
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4411
 
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4412
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4413
 
  AC_CHECK_LIB(ltdl, main,
4414
 
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4415
 
  [if test x"$enable_ltdl_install" = xno; then
4416
 
     AC_MSG_WARN([libltdl not installed, but installation disabled])
4417
 
   else
4418
 
     enable_ltdl_install=yes
4419
 
   fi
4420
 
  ])
4421
 
  if test x"$enable_ltdl_install" = x"yes"; then
4422
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
4423
 
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4424
 
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4425
 
  else
4426
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4427
 
    LIBLTDL="-lltdl"
4428
 
    LTDLINCL=
4429
 
  fi
4430
 
  # For backwards non-gettext consistent compatibility...
4431
 
  INCLTDL="$LTDLINCL"
4432
 
])
 
6726
])# _LT_AC_FILE_LTDLL_C
 
6727
 
 
6728
 
 
6729
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
 
6730
# ---------------------------------
 
6731
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
6732
 
4433
6733
 
4434
6734
# old names
4435
6735
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
4443
6743
# This is just to silence aclocal about the macro not being used
4444
6744
ifelse([AC_DISABLE_FAST_INSTALL])
4445
6745
 
 
6746
AC_DEFUN([LT_AC_PROG_GCJ],
 
6747
[AC_CHECK_TOOL(GCJ, gcj, no)
 
6748
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
6749
  AC_SUBST(GCJFLAGS)
 
6750
])
 
6751
 
 
6752
AC_DEFUN([LT_AC_PROG_RC],
 
6753
[AC_CHECK_TOOL(RC, windres, no)
 
6754
])
 
6755
 
4446
6756
# NOTE: This macro has been submitted for inclusion into   #
4447
6757
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
4448
6758
#  a released version of Autoconf we should remove this    #
4456
6766
AC_CACHE_VAL(lt_cv_path_SED,
4457
6767
[# Loop through the user's path and test for sed and gsed.
4458
6768
# Then use that list of sed's as ones to test for truncation.
4459
 
as_executable_p="test -f"
4460
6769
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461
6770
for as_dir in $PATH
4462
6771
do
4463
6772
  IFS=$as_save_IFS
4464
6773
  test -z "$as_dir" && as_dir=.
4465
 
  for ac_prog in sed gsed; do
 
6774
  for lt_ac_prog in sed gsed; do
4466
6775
    for ac_exec_ext in '' $ac_executable_extensions; do
4467
 
      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4468
 
        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
 
6776
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
6777
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
4469
6778
      fi
4470
6779
    done
4471
6780
  done
4472
6781
done
4473
 
 
4474
 
  # Create a temporary directory, and hook for its removal unless debugging.
4475
 
$debug ||
4476
 
{
4477
 
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4478
 
  trap '{ (exit 1); exit 1; }' 1 2 13 15
4479
 
}
4480
 
 
4481
 
# Create a (secure) tmp directory for tmp files.
4482
 
: ${TMPDIR=/tmp}
4483
 
{
4484
 
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4485
 
  test -n "$tmp" && test -d "$tmp"
4486
 
}  ||
4487
 
{
4488
 
  tmp=$TMPDIR/sed$$-$RANDOM
4489
 
  (umask 077 && mkdir $tmp)
4490
 
} ||
4491
 
{
4492
 
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4493
 
   { (exit 1); exit 1; }
4494
 
}
4495
 
  _max=0
4496
 
  _count=0
4497
 
  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4498
 
  # along with /bin/sed that truncates output.
4499
 
  for _sed in $_sed_list /usr/xpg4/bin/sed; do
4500
 
    test ! -f ${_sed} && break
4501
 
    cat /dev/null > "$tmp/sed.in"
4502
 
    _count=0
4503
 
    echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4504
 
    # Check for GNU sed and select it if it is found.
4505
 
    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4506
 
      lt_cv_path_SED=${_sed}
4507
 
      break
 
6782
lt_ac_max=0
 
6783
lt_ac_count=0
 
6784
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
6785
# along with /bin/sed that truncates output.
 
6786
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
6787
  test ! -f $lt_ac_sed && break
 
6788
  cat /dev/null > conftest.in
 
6789
  lt_ac_count=0
 
6790
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
6791
  # Check for GNU sed and select it if it is found.
 
6792
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
6793
    lt_cv_path_SED=$lt_ac_sed
 
6794
    break
 
6795
  fi
 
6796
  while true; do
 
6797
    cat conftest.in conftest.in >conftest.tmp
 
6798
    mv conftest.tmp conftest.in
 
6799
    cp conftest.in conftest.nl
 
6800
    echo >>conftest.nl
 
6801
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
6802
    cmp -s conftest.out conftest.nl || break
 
6803
    # 10000 chars as input seems more than enough
 
6804
    test $lt_ac_count -gt 10 && break
 
6805
    lt_ac_count=`expr $lt_ac_count + 1`
 
6806
    if test $lt_ac_count -gt $lt_ac_max; then
 
6807
      lt_ac_max=$lt_ac_count
 
6808
      lt_cv_path_SED=$lt_ac_sed
4508
6809
    fi
4509
 
    while true; do
4510
 
      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4511
 
      mv "$tmp/sed.tmp" "$tmp/sed.in"
4512
 
      cp "$tmp/sed.in" "$tmp/sed.nl"
4513
 
      echo >>"$tmp/sed.nl"
4514
 
      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4515
 
      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4516
 
      # 40000 chars as input seems more than enough
4517
 
      test $_count -gt 10 && break
4518
 
      _count=`expr $_count + 1`
4519
 
      if test $_count -gt $_max; then
4520
 
        _max=$_count
4521
 
        lt_cv_path_SED=$_sed
4522
 
      fi
4523
 
    done
4524
6810
  done
4525
 
  rm -rf "$tmp"
 
6811
done
 
6812
SED=$lt_cv_path_SED
4526
6813
])
4527
 
if test "X$SED" != "X"; then
4528
 
  lt_cv_path_SED=$SED
4529
 
else
4530
 
  SED=$lt_cv_path_SED
4531
 
fi
4532
6814
AC_MSG_RESULT([$SED])
4533
6815
])
4534
6816
 
 
6817
# gettext.m4 serial 28 (gettext-0.13)
 
6818
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
 
6819
dnl This file is free software, distributed under the terms of the GNU
 
6820
dnl General Public License.  As a special exception to the GNU General
 
6821
dnl Public License, this file may be distributed as part of a program
 
6822
dnl that contains a configuration script generated by Autoconf, under
 
6823
dnl the same distribution terms as the rest of that program.
 
6824
dnl
 
6825
dnl This file can can be used in projects which are not available under
 
6826
dnl the GNU General Public License or the GNU Library General Public
 
6827
dnl License but which still want to provide support for the GNU gettext
 
6828
dnl functionality.
 
6829
dnl Please note that the actual code of the GNU gettext library is covered
 
6830
dnl by the GNU Library General Public License, and the rest of the GNU
 
6831
dnl gettext package package is covered by the GNU General Public License.
 
6832
dnl They are *not* in the public domain.
 
6833
 
 
6834
dnl Authors:
 
6835
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
6836
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
6837
 
 
6838
dnl Macro to add for using GNU gettext.
 
6839
 
 
6840
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
 
6841
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
 
6842
dnl    default (if it is not specified or empty) is 'no-libtool'.
 
6843
dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
 
6844
dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
 
6845
dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
 
6846
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
 
6847
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
 
6848
dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
 
6849
dnl    $(top_builddir)/intl/libintl.a will be created.
 
6850
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
 
6851
dnl    implementations (in libc or libintl) without the ngettext() function
 
6852
dnl    will be ignored.  If NEEDSYMBOL is specified and is
 
6853
dnl    'need-formatstring-macros', then GNU gettext implementations that don't
 
6854
dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
 
6855
dnl INTLDIR is used to find the intl libraries.  If empty,
 
6856
dnl    the value `$(top_builddir)/intl/' is used.
 
6857
dnl
 
6858
dnl The result of the configuration is one of three cases:
 
6859
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
 
6860
dnl    and used.
 
6861
dnl    Catalog format: GNU --> install in $(datadir)
 
6862
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
6863
dnl 2) GNU gettext has been found in the system's C library.
 
6864
dnl    Catalog format: GNU --> install in $(datadir)
 
6865
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
6866
dnl 3) No internationalization, always use English msgid.
 
6867
dnl    Catalog format: none
 
6868
dnl    Catalog extension: none
 
6869
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
 
6870
dnl The use of .gmo is historical (it was needed to avoid overwriting the
 
6871
dnl GNU format catalogs when building on a platform with an X/Open gettext),
 
6872
dnl but we keep it in order not to force irrelevant filename changes on the
 
6873
dnl maintainers.
 
6874
dnl
 
6875
AC_DEFUN([AM_GNU_GETTEXT],
 
6876
[
 
6877
  dnl Argument checking.
 
6878
  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
 
6879
    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
 
6880
])])])])])
 
6881
  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
 
6882
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
 
6883
])])])])
 
6884
  define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
 
6885
  define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
 
6886
 
 
6887
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
 
6888
  ifelse(gt_included_intl, yes, [
 
6889
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
 
6890
  ])
 
6891
 
 
6892
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
6893
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
6894
  AC_REQUIRE([AC_LIB_RPATH])
 
6895
 
 
6896
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
 
6897
  dnl Ideally we would do this search only after the
 
6898
  dnl      if test "$USE_NLS" = "yes"; then
 
6899
  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
 
6900
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
 
6901
  dnl the configure script would need to contain the same shell code
 
6902
  dnl again, outside any 'if'. There are two solutions:
 
6903
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
 
6904
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
 
6905
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
 
6906
  dnl documented, we avoid it.
 
6907
  ifelse(gt_included_intl, yes, , [
 
6908
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
 
6909
  ])
 
6910
 
 
6911
  dnl Set USE_NLS.
 
6912
  AM_NLS
 
6913
 
 
6914
  ifelse(gt_included_intl, yes, [
 
6915
    BUILD_INCLUDED_LIBINTL=no
 
6916
    USE_INCLUDED_LIBINTL=no
 
6917
  ])
 
6918
  LIBINTL=
 
6919
  LTLIBINTL=
 
6920
  POSUB=
 
6921
 
 
6922
  dnl If we use NLS figure out what method
 
6923
  if test "$USE_NLS" = "yes"; then
 
6924
    gt_use_preinstalled_gnugettext=no
 
6925
    ifelse(gt_included_intl, yes, [
 
6926
      AC_MSG_CHECKING([whether included gettext is requested])
 
6927
      AC_ARG_WITH(included-gettext,
 
6928
        [  --with-included-gettext use the GNU gettext library included here],
 
6929
        nls_cv_force_use_gnu_gettext=$withval,
 
6930
        nls_cv_force_use_gnu_gettext=no)
 
6931
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
 
6932
 
 
6933
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
 
6934
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
 
6935
    ])
 
6936
        dnl User does not insist on using GNU NLS library.  Figure out what
 
6937
        dnl to use.  If GNU gettext is available we use this.  Else we have
 
6938
        dnl to fall back to GNU NLS library.
 
6939
 
 
6940
        dnl Add a version number to the cache macros.
 
6941
        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
 
6942
        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
 
6943
        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
 
6944
 
 
6945
        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
 
6946
         [AC_TRY_LINK([#include <libintl.h>
 
6947
]ifelse([$2], [need-formatstring-macros],
 
6948
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 
6949
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 
6950
#endif
 
6951
changequote(,)dnl
 
6952
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
 
6953
changequote([,])dnl
 
6954
], [])[extern int _nl_msg_cat_cntr;
 
6955
extern int *_nl_domain_bindings;],
 
6956
            [bindtextdomain ("", "");
 
6957
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
 
6958
            gt_cv_func_gnugettext_libc=yes,
 
6959
            gt_cv_func_gnugettext_libc=no)])
 
6960
 
 
6961
        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
 
6962
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
 
6963
          ifelse(gt_included_intl, yes, , [
 
6964
            AM_ICONV_LINK
 
6965
          ])
 
6966
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
 
6967
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
 
6968
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
 
6969
          dnl even if libiconv doesn't exist.
 
6970
          AC_LIB_LINKFLAGS_BODY([intl])
 
6971
          AC_CACHE_CHECK([for GNU gettext in libintl],
 
6972
            gt_cv_func_gnugettext_libintl,
 
6973
           [gt_save_CPPFLAGS="$CPPFLAGS"
 
6974
            CPPFLAGS="$CPPFLAGS $INCINTL"
 
6975
            gt_save_LIBS="$LIBS"
 
6976
            LIBS="$LIBS $LIBINTL"
 
6977
            dnl Now see whether libintl exists and does not depend on libiconv.
 
6978
            AC_TRY_LINK([#include <libintl.h>
 
6979
]ifelse([$2], [need-formatstring-macros],
 
6980
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 
6981
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 
6982
#endif
 
6983
changequote(,)dnl
 
6984
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
 
6985
changequote([,])dnl
 
6986
], [])[extern int _nl_msg_cat_cntr;
 
6987
extern
 
6988
#ifdef __cplusplus
 
6989
"C"
 
6990
#endif
 
6991
const char *_nl_expand_alias ();],
 
6992
              [bindtextdomain ("", "");
 
6993
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
 
6994
              gt_cv_func_gnugettext_libintl=yes,
 
6995
              gt_cv_func_gnugettext_libintl=no)
 
6996
            dnl Now see whether libintl exists and depends on libiconv.
 
6997
            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
 
6998
              LIBS="$LIBS $LIBICONV"
 
6999
              AC_TRY_LINK([#include <libintl.h>
 
7000
]ifelse([$2], [need-formatstring-macros],
 
7001
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 
7002
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 
7003
#endif
 
7004
changequote(,)dnl
 
7005
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
 
7006
changequote([,])dnl
 
7007
], [])[extern int _nl_msg_cat_cntr;
 
7008
extern
 
7009
#ifdef __cplusplus
 
7010
"C"
 
7011
#endif
 
7012
const char *_nl_expand_alias ();],
 
7013
                [bindtextdomain ("", "");
 
7014
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
 
7015
               [LIBINTL="$LIBINTL $LIBICONV"
 
7016
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
 
7017
                gt_cv_func_gnugettext_libintl=yes
 
7018
               ])
 
7019
            fi
 
7020
            CPPFLAGS="$gt_save_CPPFLAGS"
 
7021
            LIBS="$gt_save_LIBS"])
 
7022
        fi
 
7023
 
 
7024
        dnl If an already present or preinstalled GNU gettext() is found,
 
7025
        dnl use it.  But if this macro is used in GNU gettext, and GNU
 
7026
        dnl gettext is already preinstalled in libintl, we update this
 
7027
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
 
7028
        if test "$gt_cv_func_gnugettext_libc" = "yes" \
 
7029
           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
 
7030
                && test "$PACKAGE" != gettext-runtime \
 
7031
                && test "$PACKAGE" != gettext-tools; }; then
 
7032
          gt_use_preinstalled_gnugettext=yes
 
7033
        else
 
7034
          dnl Reset the values set by searching for libintl.
 
7035
          LIBINTL=
 
7036
          LTLIBINTL=
 
7037
          INCINTL=
 
7038
        fi
 
7039
 
 
7040
    ifelse(gt_included_intl, yes, [
 
7041
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
 
7042
          dnl GNU gettext is not found in the C library.
 
7043
          dnl Fall back on included GNU gettext library.
 
7044
          nls_cv_use_gnu_gettext=yes
 
7045
        fi
 
7046
      fi
 
7047
 
 
7048
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
 
7049
        dnl Mark actions used to generate GNU NLS library.
 
7050
        BUILD_INCLUDED_LIBINTL=yes
 
7051
        USE_INCLUDED_LIBINTL=yes
 
7052
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
 
7053
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
 
7054
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
 
7055
      fi
 
7056
 
 
7057
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
7058
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
7059
        dnl Mark actions to use GNU gettext tools.
 
7060
        CATOBJEXT=.gmo
 
7061
      fi
 
7062
    ])
 
7063
 
 
7064
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
7065
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
7066
      AC_DEFINE(ENABLE_NLS, 1,
 
7067
        [Define to 1 if translation of program messages to the user's native language
 
7068
   is requested.])
 
7069
    else
 
7070
      USE_NLS=no
 
7071
    fi
 
7072
  fi
 
7073
 
 
7074
  AC_MSG_CHECKING([whether to use NLS])
 
7075
  AC_MSG_RESULT([$USE_NLS])
 
7076
  if test "$USE_NLS" = "yes"; then
 
7077
    AC_MSG_CHECKING([where the gettext function comes from])
 
7078
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
 
7079
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
 
7080
        gt_source="external libintl"
 
7081
      else
 
7082
        gt_source="libc"
 
7083
      fi
 
7084
    else
 
7085
      gt_source="included intl directory"
 
7086
    fi
 
7087
    AC_MSG_RESULT([$gt_source])
 
7088
  fi
 
7089
 
 
7090
  if test "$USE_NLS" = "yes"; then
 
7091
 
 
7092
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
 
7093
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
 
7094
        AC_MSG_CHECKING([how to link with libintl])
 
7095
        AC_MSG_RESULT([$LIBINTL])
 
7096
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
 
7097
      fi
 
7098
 
 
7099
      dnl For backward compatibility. Some packages may be using this.
 
7100
      AC_DEFINE(HAVE_GETTEXT, 1,
 
7101
       [Define if the GNU gettext() function is already present or preinstalled.])
 
7102
      AC_DEFINE(HAVE_DCGETTEXT, 1,
 
7103
       [Define if the GNU dcgettext() function is already present or preinstalled.])
 
7104
    fi
 
7105
 
 
7106
    dnl We need to process the po/ directory.
 
7107
    POSUB=po
 
7108
  fi
 
7109
 
 
7110
  ifelse(gt_included_intl, yes, [
 
7111
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
 
7112
    dnl to 'yes' because some of the testsuite requires it.
 
7113
    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
 
7114
      BUILD_INCLUDED_LIBINTL=yes
 
7115
    fi
 
7116
 
 
7117
    dnl Make all variables we use known to autoconf.
 
7118
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
 
7119
    AC_SUBST(USE_INCLUDED_LIBINTL)
 
7120
    AC_SUBST(CATOBJEXT)
 
7121
 
 
7122
    dnl For backward compatibility. Some configure.ins may be using this.
 
7123
    nls_cv_header_intl=
 
7124
    nls_cv_header_libgt=
 
7125
 
 
7126
    dnl For backward compatibility. Some Makefiles may be using this.
 
7127
    DATADIRNAME=share
 
7128
    AC_SUBST(DATADIRNAME)
 
7129
 
 
7130
    dnl For backward compatibility. Some Makefiles may be using this.
 
7131
    INSTOBJEXT=.mo
 
7132
    AC_SUBST(INSTOBJEXT)
 
7133
 
 
7134
    dnl For backward compatibility. Some Makefiles may be using this.
 
7135
    GENCAT=gencat
 
7136
    AC_SUBST(GENCAT)
 
7137
 
 
7138
    dnl For backward compatibility. Some Makefiles may be using this.
 
7139
    if test "$USE_INCLUDED_LIBINTL" = yes; then
 
7140
      INTLOBJS="\$(GETTOBJS)"
 
7141
    fi
 
7142
    AC_SUBST(INTLOBJS)
 
7143
 
 
7144
    dnl Enable libtool support if the surrounding package wishes it.
 
7145
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
 
7146
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
 
7147
  ])
 
7148
 
 
7149
  dnl For backward compatibility. Some Makefiles may be using this.
 
7150
  INTLLIBS="$LIBINTL"
 
7151
  AC_SUBST(INTLLIBS)
 
7152
 
 
7153
  dnl Make all documented variables known to autoconf.
 
7154
  AC_SUBST(LIBINTL)
 
7155
  AC_SUBST(LTLIBINTL)
 
7156
  AC_SUBST(POSUB)
 
7157
])
 
7158
 
 
7159
 
 
7160
dnl Checks for all prerequisites of the intl subdirectory,
 
7161
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
 
7162
dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
 
7163
AC_DEFUN([AM_INTL_SUBDIR],
 
7164
[
 
7165
  AC_REQUIRE([AC_PROG_INSTALL])dnl
 
7166
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
 
7167
  AC_REQUIRE([AC_PROG_CC])dnl
 
7168
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
7169
  AC_REQUIRE([AC_PROG_RANLIB])dnl
 
7170
  AC_REQUIRE([AC_ISC_POSIX])dnl
 
7171
  AC_REQUIRE([AC_HEADER_STDC])dnl
 
7172
  AC_REQUIRE([AC_C_CONST])dnl
 
7173
  AC_REQUIRE([bh_C_SIGNED])dnl
 
7174
  AC_REQUIRE([AC_C_INLINE])dnl
 
7175
  AC_REQUIRE([AC_TYPE_OFF_T])dnl
 
7176
  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
 
7177
  AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
 
7178
  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
 
7179
  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
 
7180
  AC_REQUIRE([gt_TYPE_WINT_T])dnl
 
7181
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
 
7182
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
 
7183
  AC_REQUIRE([gt_TYPE_INTMAX_T])
 
7184
  AC_REQUIRE([gt_PRINTF_POSIX])
 
7185
  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 
7186
  AC_REQUIRE([AC_FUNC_MMAP])dnl
 
7187
  AC_REQUIRE([jm_GLIBC21])dnl
 
7188
  AC_REQUIRE([gt_INTDIV0])dnl
 
7189
  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
 
7190
  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
 
7191
  AC_REQUIRE([gt_INTTYPES_PRI])dnl
 
7192
  AC_REQUIRE([gl_XSIZE])dnl
 
7193
 
 
7194
  AC_CHECK_TYPE([ptrdiff_t], ,
 
7195
    [AC_DEFINE([ptrdiff_t], [long],
 
7196
       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
 
7197
    ])
 
7198
  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
 
7199
stdlib.h string.h unistd.h sys/param.h])
 
7200
  AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
 
7201
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
 
7202
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
 
7203
__fsetlocking])
 
7204
 
 
7205
  dnl Use the _snprintf function only if it is declared (because on NetBSD it
 
7206
  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
 
7207
  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
 
7208
  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
 
7209
 
 
7210
  dnl Use the *_unlocked functions only if they are declared.
 
7211
  dnl (because some of them were defined without being declared in Solaris
 
7212
  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
 
7213
  dnl on Solaris 2.5.1 to run on Solaris 2.6).
 
7214
  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
 
7215
  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
 
7216
  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
 
7217
  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
 
7218
 
 
7219
  case $gt_cv_func_printf_posix in
 
7220
    *yes) HAVE_POSIX_PRINTF=1 ;;
 
7221
    *) HAVE_POSIX_PRINTF=0 ;;
 
7222
  esac
 
7223
  AC_SUBST([HAVE_POSIX_PRINTF])
 
7224
  if test "$ac_cv_func_asprintf" = yes; then
 
7225
    HAVE_ASPRINTF=1
 
7226
  else
 
7227
    HAVE_ASPRINTF=0
 
7228
  fi
 
7229
  AC_SUBST([HAVE_ASPRINTF])
 
7230
  if test "$ac_cv_func_snprintf" = yes; then
 
7231
    HAVE_SNPRINTF=1
 
7232
  else
 
7233
    HAVE_SNPRINTF=0
 
7234
  fi
 
7235
  AC_SUBST([HAVE_SNPRINTF])
 
7236
  if test "$ac_cv_func_wprintf" = yes; then
 
7237
    HAVE_WPRINTF=1
 
7238
  else
 
7239
    HAVE_WPRINTF=0
 
7240
  fi
 
7241
  AC_SUBST([HAVE_WPRINTF])
 
7242
 
 
7243
  AM_ICONV
 
7244
  AM_LANGINFO_CODESET
 
7245
  if test $ac_cv_header_locale_h = yes; then
 
7246
    AM_LC_MESSAGES
 
7247
  fi
 
7248
 
 
7249
  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
 
7250
  dnl because plural.y uses bison specific features. It requires at least
 
7251
  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
 
7252
  dnl compile.
 
7253
  dnl bison is only needed for the maintainer (who touches plural.y). But in
 
7254
  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
 
7255
  dnl the rule in general Makefile. Now, some people carelessly touch the
 
7256
  dnl files or have a broken "make" program, hence the plural.c rule will
 
7257
  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
 
7258
  dnl present or too old.
 
7259
  AC_CHECK_PROGS([INTLBISON], [bison])
 
7260
  if test -z "$INTLBISON"; then
 
7261
    ac_verc_fail=yes
 
7262
  else
 
7263
    dnl Found it, now check the version.
 
7264
    AC_MSG_CHECKING([version of bison])
 
7265
changequote(<<,>>)dnl
 
7266
    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
 
7267
    case $ac_prog_version in
 
7268
      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
 
7269
      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
 
7270
changequote([,])dnl
 
7271
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
 
7272
      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
7273
    esac
 
7274
    AC_MSG_RESULT([$ac_prog_version])
 
7275
  fi
 
7276
  if test $ac_verc_fail = yes; then
 
7277
    INTLBISON=:
 
7278
  fi
 
7279
])
 
7280
 
 
7281
 
 
7282
dnl gt_CHECK_DECL(FUNC, INCLUDES)
 
7283
dnl Check whether a function is declared.
 
7284
AC_DEFUN([gt_CHECK_DECL],
 
7285
[
 
7286
  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
 
7287
    [AC_TRY_COMPILE([$2], [
 
7288
#ifndef $1
 
7289
  char *p = (char *) $1;
 
7290
#endif
 
7291
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
 
7292
  if test $ac_cv_have_decl_$1 = yes; then
 
7293
    gt_value=1
 
7294
  else
 
7295
    gt_value=0
 
7296
  fi
 
7297
  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
 
7298
    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
 
7299
])
 
7300
 
 
7301
 
 
7302
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
 
7303
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
 
7304
 
 
7305
# po.m4 serial 3 (gettext-0.14)
 
7306
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
 
7307
dnl This file is free software, distributed under the terms of the GNU
 
7308
dnl General Public License.  As a special exception to the GNU General
 
7309
dnl Public License, this file may be distributed as part of a program
 
7310
dnl that contains a configuration script generated by Autoconf, under
 
7311
dnl the same distribution terms as the rest of that program.
 
7312
dnl
 
7313
dnl This file can can be used in projects which are not available under
 
7314
dnl the GNU General Public License or the GNU Library General Public
 
7315
dnl License but which still want to provide support for the GNU gettext
 
7316
dnl functionality.
 
7317
dnl Please note that the actual code of the GNU gettext library is covered
 
7318
dnl by the GNU Library General Public License, and the rest of the GNU
 
7319
dnl gettext package package is covered by the GNU General Public License.
 
7320
dnl They are *not* in the public domain.
 
7321
 
 
7322
dnl Authors:
 
7323
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
7324
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
7325
 
 
7326
dnl Checks for all prerequisites of the po subdirectory.
 
7327
AC_DEFUN([AM_PO_SUBDIRS],
 
7328
[
 
7329
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
7330
  AC_REQUIRE([AC_PROG_INSTALL])dnl
 
7331
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
 
7332
  AC_REQUIRE([AM_NLS])dnl
 
7333
 
 
7334
  dnl Perform the following tests also if --disable-nls has been given,
 
7335
  dnl because they are needed for "make dist" to work.
 
7336
 
 
7337
  dnl Search for GNU msgfmt in the PATH.
 
7338
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
 
7339
  dnl The second test excludes FreeBSD msgfmt.
 
7340
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
7341
    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
 
7342
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 
7343
    :)
 
7344
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
7345
 
 
7346
  dnl Search for GNU xgettext 0.12 or newer in the PATH.
 
7347
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
 
7348
  dnl The second test excludes FreeBSD xgettext.
 
7349
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
7350
    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
 
7351
     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 
7352
    :)
 
7353
  dnl Remove leftover from FreeBSD xgettext call.
 
7354
  rm -f messages.po
 
7355
 
 
7356
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
 
7357
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
 
7358
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
 
7359
 
 
7360
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
 
7361
  dnl Test whether we really found GNU msgfmt.
 
7362
  if test "$GMSGFMT" != ":"; then
 
7363
    dnl If it is no GNU msgfmt we define it as : so that the
 
7364
    dnl Makefiles still can work.
 
7365
    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
 
7366
       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
 
7367
      : ;
 
7368
    else
 
7369
      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
 
7370
      AC_MSG_RESULT(
 
7371
        [found $GMSGFMT program is not GNU msgfmt; ignore it])
 
7372
      GMSGFMT=":"
 
7373
    fi
 
7374
  fi
 
7375
 
 
7376
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
 
7377
  dnl Test whether we really found GNU xgettext.
 
7378
  if test "$XGETTEXT" != ":"; then
 
7379
    dnl If it is no GNU xgettext we define it as : so that the
 
7380
    dnl Makefiles still can work.
 
7381
    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
 
7382
       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
 
7383
      : ;
 
7384
    else
 
7385
      AC_MSG_RESULT(
 
7386
        [found xgettext program is not GNU xgettext; ignore it])
 
7387
      XGETTEXT=":"
 
7388
    fi
 
7389
    dnl Remove leftover from FreeBSD xgettext call.
 
7390
    rm -f messages.po
 
7391
  fi
 
7392
 
 
7393
  AC_OUTPUT_COMMANDS([
 
7394
    for ac_file in $CONFIG_FILES; do
 
7395
      # Support "outfile[:infile[:infile...]]"
 
7396
      case "$ac_file" in
 
7397
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
 
7398
      esac
 
7399
      # PO directories have a Makefile.in generated from Makefile.in.in.
 
7400
      case "$ac_file" in */Makefile.in)
 
7401
        # Adjust a relative srcdir.
 
7402
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 
7403
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
7404
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 
7405
        # In autoconf-2.13 it is called $ac_given_srcdir.
 
7406
        # In autoconf-2.50 it is called $srcdir.
 
7407
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 
7408
        case "$ac_given_srcdir" in
 
7409
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 
7410
          /*) top_srcdir="$ac_given_srcdir" ;;
 
7411
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
7412
        esac
 
7413
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
 
7414
          rm -f "$ac_dir/POTFILES"
 
7415
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
 
7416
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
 
7417
          POMAKEFILEDEPS="POTFILES.in"
 
7418
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
 
7419
          # on $ac_dir but don't depend on user-specified configuration
 
7420
          # parameters.
 
7421
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 
7422
            # The LINGUAS file contains the set of available languages.
 
7423
            if test -n "$OBSOLETE_ALL_LINGUAS"; then
 
7424
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 
7425
            fi
 
7426
            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
7427
            # Hide the ALL_LINGUAS assigment from automake.
 
7428
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 
7429
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 
7430
          else
 
7431
            # The set of available languages was given in configure.in.
 
7432
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
 
7433
          fi
 
7434
          # Compute POFILES
 
7435
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 
7436
          # Compute UPDATEPOFILES
 
7437
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 
7438
          # Compute DUMMYPOFILES
 
7439
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 
7440
          # Compute GMOFILES
 
7441
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
 
7442
          case "$ac_given_srcdir" in
 
7443
            .) srcdirpre= ;;
 
7444
            *) srcdirpre='$(srcdir)/' ;;
 
7445
          esac
 
7446
          POFILES=
 
7447
          UPDATEPOFILES=
 
7448
          DUMMYPOFILES=
 
7449
          GMOFILES=
 
7450
          for lang in $ALL_LINGUAS; do
 
7451
            POFILES="$POFILES $srcdirpre$lang.po"
 
7452
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 
7453
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 
7454
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 
7455
          done
 
7456
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
 
7457
          # environment variable.
 
7458
          INST_LINGUAS=
 
7459
          if test -n "$ALL_LINGUAS"; then
 
7460
            for presentlang in $ALL_LINGUAS; do
 
7461
              useit=no
 
7462
              if test "%UNSET%" != "$LINGUAS"; then
 
7463
                desiredlanguages="$LINGUAS"
 
7464
              else
 
7465
                desiredlanguages="$ALL_LINGUAS"
 
7466
              fi
 
7467
              for desiredlang in $desiredlanguages; do
 
7468
                # Use the presentlang catalog if desiredlang is
 
7469
                #   a. equal to presentlang, or
 
7470
                #   b. a variant of presentlang (because in this case,
 
7471
                #      presentlang can be used as a fallback for messages
 
7472
                #      which are not translated in the desiredlang catalog).
 
7473
                case "$desiredlang" in
 
7474
                  "$presentlang"*) useit=yes;;
 
7475
                esac
 
7476
              done
 
7477
              if test $useit = yes; then
 
7478
                INST_LINGUAS="$INST_LINGUAS $presentlang"
 
7479
              fi
 
7480
            done
 
7481
          fi
 
7482
          CATALOGS=
 
7483
          if test -n "$INST_LINGUAS"; then
 
7484
            for lang in $INST_LINGUAS; do
 
7485
              CATALOGS="$CATALOGS $lang.gmo"
 
7486
            done
 
7487
          fi
 
7488
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
 
7489
          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
 
7490
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
 
7491
            if test -f "$f"; then
 
7492
              case "$f" in
 
7493
                *.orig | *.bak | *~) ;;
 
7494
                *) cat "$f" >> "$ac_dir/Makefile" ;;
 
7495
              esac
 
7496
            fi
 
7497
          done
 
7498
        fi
 
7499
        ;;
 
7500
      esac
 
7501
    done],
 
7502
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
 
7503
    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
 
7504
    # from automake.
 
7505
    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
 
7506
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
 
7507
    LINGUAS="${LINGUAS-%UNSET%}"
 
7508
   ])
 
7509
])
 
7510
 
 
7511
dnl Postprocesses a Makefile in a directory containing PO files.
 
7512
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
 
7513
[
 
7514
  # When this code is run, in config.status, two variables have already been
 
7515
  # set:
 
7516
  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
 
7517
  # - LINGUAS is the value of the environment variable LINGUAS at configure
 
7518
  #   time.
 
7519
 
 
7520
changequote(,)dnl
 
7521
  # Adjust a relative srcdir.
 
7522
  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 
7523
  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
7524
  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 
7525
  # In autoconf-2.13 it is called $ac_given_srcdir.
 
7526
  # In autoconf-2.50 it is called $srcdir.
 
7527
  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 
7528
  case "$ac_given_srcdir" in
 
7529
    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 
7530
    /*) top_srcdir="$ac_given_srcdir" ;;
 
7531
    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
7532
  esac
 
7533
 
 
7534
  # Find a way to echo strings without interpreting backslash.
 
7535
  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
 
7536
    gt_echo='echo'
 
7537
  else
 
7538
    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
 
7539
      gt_echo='printf %s\n'
 
7540
    else
 
7541
      echo_func () {
 
7542
        cat <<EOT
 
7543
$*
 
7544
EOT
 
7545
      }
 
7546
      gt_echo='echo_func'
 
7547
    fi
 
7548
  fi
 
7549
 
 
7550
  # A sed script that extracts the value of VARIABLE from a Makefile.
 
7551
  sed_x_variable='
 
7552
# Test if the hold space is empty.
 
7553
x
 
7554
s/P/P/
 
7555
x
 
7556
ta
 
7557
# Yes it was empty. Look if we have the expected variable definition.
 
7558
/^[      ]*VARIABLE[     ]*=/{
 
7559
  # Seen the first line of the variable definition.
 
7560
  s/^[   ]*VARIABLE[     ]*=//
 
7561
  ba
 
7562
}
 
7563
bd
 
7564
:a
 
7565
# Here we are processing a line from the variable definition.
 
7566
# Remove comment, more precisely replace it with a space.
 
7567
s/#.*$/ /
 
7568
# See if the line ends in a backslash.
 
7569
tb
 
7570
:b
 
7571
s/\\$//
 
7572
# Print the line, without the trailing backslash.
 
7573
p
 
7574
tc
 
7575
# There was no trailing backslash. The end of the variable definition is
 
7576
# reached. Clear the hold space.
 
7577
s/^.*$//
 
7578
x
 
7579
bd
 
7580
:c
 
7581
# A trailing backslash means that the variable definition continues in the
 
7582
# next line. Put a nonempty string into the hold space to indicate this.
 
7583
s/^.*$/P/
 
7584
x
 
7585
:d
 
7586
'
 
7587
changequote([,])dnl
 
7588
 
 
7589
  # Set POTFILES to the value of the Makefile variable POTFILES.
 
7590
  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
 
7591
  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
 
7592
  # Compute POTFILES_DEPS as
 
7593
  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
 
7594
  POTFILES_DEPS=
 
7595
  for file in $POTFILES; do
 
7596
    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
 
7597
  done
 
7598
  POMAKEFILEDEPS=""
 
7599
 
 
7600
  if test -n "$OBSOLETE_ALL_LINGUAS"; then
 
7601
    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 
7602
  fi
 
7603
  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 
7604
    # The LINGUAS file contains the set of available languages.
 
7605
    ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
7606
    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 
7607
  else
 
7608
    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
 
7609
    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
 
7610
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
 
7611
  fi
 
7612
  # Hide the ALL_LINGUAS assigment from automake.
 
7613
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 
7614
  # Compute POFILES
 
7615
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 
7616
  # Compute UPDATEPOFILES
 
7617
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 
7618
  # Compute DUMMYPOFILES
 
7619
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 
7620
  # Compute GMOFILES
 
7621
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
 
7622
  # Compute PROPERTIESFILES
 
7623
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
 
7624
  # Compute CLASSFILES
 
7625
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
 
7626
  # Compute QMFILES
 
7627
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
 
7628
  # Compute MSGFILES
 
7629
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
 
7630
  # Compute RESOURCESDLLFILES
 
7631
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
 
7632
  case "$ac_given_srcdir" in
 
7633
    .) srcdirpre= ;;
 
7634
    *) srcdirpre='$(srcdir)/' ;;
 
7635
  esac
 
7636
  POFILES=
 
7637
  UPDATEPOFILES=
 
7638
  DUMMYPOFILES=
 
7639
  GMOFILES=
 
7640
  PROPERTIESFILES=
 
7641
  CLASSFILES=
 
7642
  QMFILES=
 
7643
  MSGFILES=
 
7644
  RESOURCESDLLFILES=
 
7645
  for lang in $ALL_LINGUAS; do
 
7646
    POFILES="$POFILES $srcdirpre$lang.po"
 
7647
    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 
7648
    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 
7649
    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 
7650
    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
 
7651
    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
 
7652
    QMFILES="$QMFILES $srcdirpre$lang.qm"
 
7653
    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
7654
    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
 
7655
    frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
7656
    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
 
7657
  done
 
7658
  # CATALOGS depends on both $ac_dir and the user's LINGUAS
 
7659
  # environment variable.
 
7660
  INST_LINGUAS=
 
7661
  if test -n "$ALL_LINGUAS"; then
 
7662
    for presentlang in $ALL_LINGUAS; do
 
7663
      useit=no
 
7664
      if test "%UNSET%" != "$LINGUAS"; then
 
7665
        desiredlanguages="$LINGUAS"
 
7666
      else
 
7667
        desiredlanguages="$ALL_LINGUAS"
 
7668
      fi
 
7669
      for desiredlang in $desiredlanguages; do
 
7670
        # Use the presentlang catalog if desiredlang is
 
7671
        #   a. equal to presentlang, or
 
7672
        #   b. a variant of presentlang (because in this case,
 
7673
        #      presentlang can be used as a fallback for messages
 
7674
        #      which are not translated in the desiredlang catalog).
 
7675
        case "$desiredlang" in
 
7676
          "$presentlang"*) useit=yes;;
 
7677
        esac
 
7678
      done
 
7679
      if test $useit = yes; then
 
7680
        INST_LINGUAS="$INST_LINGUAS $presentlang"
 
7681
      fi
 
7682
    done
 
7683
  fi
 
7684
  CATALOGS=
 
7685
  JAVACATALOGS=
 
7686
  QTCATALOGS=
 
7687
  TCLCATALOGS=
 
7688
  CSHARPCATALOGS=
 
7689
  if test -n "$INST_LINGUAS"; then
 
7690
    for lang in $INST_LINGUAS; do
 
7691
      CATALOGS="$CATALOGS $lang.gmo"
 
7692
      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
 
7693
      QTCATALOGS="$QTCATALOGS $lang.qm"
 
7694
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
7695
      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
 
7696
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
7697
      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
 
7698
    done
 
7699
  fi
 
7700
 
 
7701
  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
 
7702
  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
 
7703
    # Add dependencies that cannot be formulated as a simple suffix rule.
 
7704
    for lang in $ALL_LINGUAS; do
 
7705
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
7706
      cat >> "$ac_file.tmp" <<EOF
 
7707
$frobbedlang.msg: $lang.po
 
7708
        @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
 
7709
        \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
7710
EOF
 
7711
    done
 
7712
  fi
 
7713
  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
 
7714
    # Add dependencies that cannot be formulated as a simple suffix rule.
 
7715
    for lang in $ALL_LINGUAS; do
 
7716
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
7717
      cat >> "$ac_file.tmp" <<EOF
 
7718
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
 
7719
        @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
 
7720
        \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
7721
EOF
 
7722
    done
 
7723
  fi
 
7724
  if test -n "$POMAKEFILEDEPS"; then
 
7725
    cat >> "$ac_file.tmp" <<EOF
 
7726
Makefile: $POMAKEFILEDEPS
 
7727
EOF
 
7728
  fi
 
7729
  mv "$ac_file.tmp" "$ac_file"
 
7730
])
 
7731
 
 
7732
# nls.m4 serial 1 (gettext-0.12)
 
7733
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
 
7734
dnl This file is free software, distributed under the terms of the GNU
 
7735
dnl General Public License.  As a special exception to the GNU General
 
7736
dnl Public License, this file may be distributed as part of a program
 
7737
dnl that contains a configuration script generated by Autoconf, under
 
7738
dnl the same distribution terms as the rest of that program.
 
7739
dnl
 
7740
dnl This file can can be used in projects which are not available under
 
7741
dnl the GNU General Public License or the GNU Library General Public
 
7742
dnl License but which still want to provide support for the GNU gettext
 
7743
dnl functionality.
 
7744
dnl Please note that the actual code of the GNU gettext library is covered
 
7745
dnl by the GNU Library General Public License, and the rest of the GNU
 
7746
dnl gettext package package is covered by the GNU General Public License.
 
7747
dnl They are *not* in the public domain.
 
7748
 
 
7749
dnl Authors:
 
7750
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
7751
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
7752
 
 
7753
AC_DEFUN([AM_NLS],
 
7754
[
 
7755
  AC_MSG_CHECKING([whether NLS is requested])
 
7756
  dnl Default is enabled NLS
 
7757
  AC_ARG_ENABLE(nls,
 
7758
    [  --disable-nls           do not use Native Language Support],
 
7759
    USE_NLS=$enableval, USE_NLS=yes)
 
7760
  AC_MSG_RESULT($USE_NLS)
 
7761
  AC_SUBST(USE_NLS)
 
7762
])
 
7763
 
 
7764
AC_DEFUN([AM_MKINSTALLDIRS],
 
7765
[
 
7766
  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
7767
  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
 
7768
  dnl Try to locate it.
 
7769
  MKINSTALLDIRS=
 
7770
  if test -n "$ac_aux_dir"; then
 
7771
    case "$ac_aux_dir" in
 
7772
      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
 
7773
      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
 
7774
    esac
 
7775
  fi
 
7776
  if test -z "$MKINSTALLDIRS"; then
 
7777
    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
7778
  fi
 
7779
  AC_SUBST(MKINSTALLDIRS)
 
7780
])
 
7781
 
 
7782
# progtest.m4 serial 3 (gettext-0.12)
 
7783
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
 
7784
dnl This file is free software, distributed under the terms of the GNU
 
7785
dnl General Public License.  As a special exception to the GNU General
 
7786
dnl Public License, this file may be distributed as part of a program
 
7787
dnl that contains a configuration script generated by Autoconf, under
 
7788
dnl the same distribution terms as the rest of that program.
 
7789
dnl
 
7790
dnl This file can can be used in projects which are not available under
 
7791
dnl the GNU General Public License or the GNU Library General Public
 
7792
dnl License but which still want to provide support for the GNU gettext
 
7793
dnl functionality.
 
7794
dnl Please note that the actual code of the GNU gettext library is covered
 
7795
dnl by the GNU Library General Public License, and the rest of the GNU
 
7796
dnl gettext package package is covered by the GNU General Public License.
 
7797
dnl They are *not* in the public domain.
 
7798
 
 
7799
dnl Authors:
 
7800
dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
 
7801
 
 
7802
# Search path for a program which passes the given test.
 
7803
 
 
7804
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
7805
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
7806
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
 
7807
[
 
7808
# Prepare PATH_SEPARATOR.
 
7809
# The user is always right.
 
7810
if test "${PATH_SEPARATOR+set}" != set; then
 
7811
  echo "#! /bin/sh" >conf$$.sh
 
7812
  echo  "exit 0"   >>conf$$.sh
 
7813
  chmod +x conf$$.sh
 
7814
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
7815
    PATH_SEPARATOR=';'
 
7816
  else
 
7817
    PATH_SEPARATOR=:
 
7818
  fi
 
7819
  rm -f conf$$.sh
 
7820
fi
 
7821
 
 
7822
# Find out how to test for executable files. Don't use a zero-byte file,
 
7823
# as systems may use methods other than mode bits to determine executability.
 
7824
cat >conf$$.file <<_ASEOF
 
7825
#! /bin/sh
 
7826
exit 0
 
7827
_ASEOF
 
7828
chmod +x conf$$.file
 
7829
if test -x conf$$.file >/dev/null 2>&1; then
 
7830
  ac_executable_p="test -x"
 
7831
else
 
7832
  ac_executable_p="test -f"
 
7833
fi
 
7834
rm -f conf$$.file
 
7835
 
 
7836
# Extract the first word of "$2", so it can be a program name with args.
 
7837
set dummy $2; ac_word=[$]2
 
7838
AC_MSG_CHECKING([for $ac_word])
 
7839
AC_CACHE_VAL(ac_cv_path_$1,
 
7840
[case "[$]$1" in
 
7841
  [[\\/]]* | ?:[[\\/]]*)
 
7842
    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
7843
    ;;
 
7844
  *)
 
7845
    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
 
7846
    for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
7847
      IFS="$ac_save_IFS"
 
7848
      test -z "$ac_dir" && ac_dir=.
 
7849
      for ac_exec_ext in '' $ac_executable_extensions; do
 
7850
        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
 
7851
          if [$3]; then
 
7852
            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
 
7853
            break 2
 
7854
          fi
 
7855
        fi
 
7856
      done
 
7857
    done
 
7858
    IFS="$ac_save_IFS"
 
7859
dnl If no 4th arg is given, leave the cache variable unset,
 
7860
dnl so AC_PATH_PROGS will keep looking.
 
7861
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
7862
])dnl
 
7863
    ;;
 
7864
esac])dnl
 
7865
$1="$ac_cv_path_$1"
 
7866
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
7867
  AC_MSG_RESULT([$]$1)
 
7868
else
 
7869
  AC_MSG_RESULT(no)
 
7870
fi
 
7871
AC_SUBST($1)dnl
 
7872
])
 
7873
 
 
7874
# lib-prefix.m4 serial 3 (gettext-0.13)
 
7875
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
 
7876
dnl This file is free software, distributed under the terms of the GNU
 
7877
dnl General Public License.  As a special exception to the GNU General
 
7878
dnl Public License, this file may be distributed as part of a program
 
7879
dnl that contains a configuration script generated by Autoconf, under
 
7880
dnl the same distribution terms as the rest of that program.
 
7881
 
 
7882
dnl From Bruno Haible.
 
7883
 
 
7884
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
 
7885
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
 
7886
dnl require excessive bracketing.
 
7887
ifdef([AC_HELP_STRING],
 
7888
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
 
7889
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
 
7890
 
 
7891
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
 
7892
dnl to access previously installed libraries. The basic assumption is that
 
7893
dnl a user will want packages to use other packages he previously installed
 
7894
dnl with the same --prefix option.
 
7895
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
 
7896
dnl libraries, but is otherwise very convenient.
 
7897
AC_DEFUN([AC_LIB_PREFIX],
 
7898
[
 
7899
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
 
7900
  AC_REQUIRE([AC_PROG_CC])
 
7901
  AC_REQUIRE([AC_CANONICAL_HOST])
 
7902
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
7903
  dnl By default, look in $includedir and $libdir.
 
7904
  use_additional=yes
 
7905
  AC_LIB_WITH_FINAL_PREFIX([
 
7906
    eval additional_includedir=\"$includedir\"
 
7907
    eval additional_libdir=\"$libdir\"
 
7908
  ])
 
7909
  AC_LIB_ARG_WITH([lib-prefix],
 
7910
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
 
7911
  --without-lib-prefix    don't search for libraries in includedir and libdir],
 
7912
[
 
7913
    if test "X$withval" = "Xno"; then
 
7914
      use_additional=no
 
7915
    else
 
7916
      if test "X$withval" = "X"; then
 
7917
        AC_LIB_WITH_FINAL_PREFIX([
 
7918
          eval additional_includedir=\"$includedir\"
 
7919
          eval additional_libdir=\"$libdir\"
 
7920
        ])
 
7921
      else
 
7922
        additional_includedir="$withval/include"
 
7923
        additional_libdir="$withval/lib"
 
7924
      fi
 
7925
    fi
 
7926
])
 
7927
  if test $use_additional = yes; then
 
7928
    dnl Potentially add $additional_includedir to $CPPFLAGS.
 
7929
    dnl But don't add it
 
7930
    dnl   1. if it's the standard /usr/include,
 
7931
    dnl   2. if it's already present in $CPPFLAGS,
 
7932
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
 
7933
    dnl   4. if it doesn't exist as a directory.
 
7934
    if test "X$additional_includedir" != "X/usr/include"; then
 
7935
      haveit=
 
7936
      for x in $CPPFLAGS; do
 
7937
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
7938
        if test "X$x" = "X-I$additional_includedir"; then
 
7939
          haveit=yes
 
7940
          break
 
7941
        fi
 
7942
      done
 
7943
      if test -z "$haveit"; then
 
7944
        if test "X$additional_includedir" = "X/usr/local/include"; then
 
7945
          if test -n "$GCC"; then
 
7946
            case $host_os in
 
7947
              linux*) haveit=yes;;
 
7948
            esac
 
7949
          fi
 
7950
        fi
 
7951
        if test -z "$haveit"; then
 
7952
          if test -d "$additional_includedir"; then
 
7953
            dnl Really add $additional_includedir to $CPPFLAGS.
 
7954
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
 
7955
          fi
 
7956
        fi
 
7957
      fi
 
7958
    fi
 
7959
    dnl Potentially add $additional_libdir to $LDFLAGS.
 
7960
    dnl But don't add it
 
7961
    dnl   1. if it's the standard /usr/lib,
 
7962
    dnl   2. if it's already present in $LDFLAGS,
 
7963
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
 
7964
    dnl   4. if it doesn't exist as a directory.
 
7965
    if test "X$additional_libdir" != "X/usr/lib"; then
 
7966
      haveit=
 
7967
      for x in $LDFLAGS; do
 
7968
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
7969
        if test "X$x" = "X-L$additional_libdir"; then
 
7970
          haveit=yes
 
7971
          break
 
7972
        fi
 
7973
      done
 
7974
      if test -z "$haveit"; then
 
7975
        if test "X$additional_libdir" = "X/usr/local/lib"; then
 
7976
          if test -n "$GCC"; then
 
7977
            case $host_os in
 
7978
              linux*) haveit=yes;;
 
7979
            esac
 
7980
          fi
 
7981
        fi
 
7982
        if test -z "$haveit"; then
 
7983
          if test -d "$additional_libdir"; then
 
7984
            dnl Really add $additional_libdir to $LDFLAGS.
 
7985
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
 
7986
          fi
 
7987
        fi
 
7988
      fi
 
7989
    fi
 
7990
  fi
 
7991
])
 
7992
 
 
7993
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
 
7994
dnl acl_final_exec_prefix, containing the values to which $prefix and
 
7995
dnl $exec_prefix will expand at the end of the configure script.
 
7996
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
 
7997
[
 
7998
  dnl Unfortunately, prefix and exec_prefix get only finally determined
 
7999
  dnl at the end of configure.
 
8000
  if test "X$prefix" = "XNONE"; then
 
8001
    acl_final_prefix="$ac_default_prefix"
 
8002
  else
 
8003
    acl_final_prefix="$prefix"
 
8004
  fi
 
8005
  if test "X$exec_prefix" = "XNONE"; then
 
8006
    acl_final_exec_prefix='${prefix}'
 
8007
  else
 
8008
    acl_final_exec_prefix="$exec_prefix"
 
8009
  fi
 
8010
  acl_save_prefix="$prefix"
 
8011
  prefix="$acl_final_prefix"
 
8012
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
 
8013
  prefix="$acl_save_prefix"
 
8014
])
 
8015
 
 
8016
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
 
8017
dnl variables prefix and exec_prefix bound to the values they will have
 
8018
dnl at the end of the configure script.
 
8019
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
 
8020
[
 
8021
  acl_save_prefix="$prefix"
 
8022
  prefix="$acl_final_prefix"
 
8023
  acl_save_exec_prefix="$exec_prefix"
 
8024
  exec_prefix="$acl_final_exec_prefix"
 
8025
  $1
 
8026
  exec_prefix="$acl_save_exec_prefix"
 
8027
  prefix="$acl_save_prefix"
 
8028
])
 
8029
 
 
8030
# lib-link.m4 serial 4 (gettext-0.12)
 
8031
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
 
8032
dnl This file is free software, distributed under the terms of the GNU
 
8033
dnl General Public License.  As a special exception to the GNU General
 
8034
dnl Public License, this file may be distributed as part of a program
 
8035
dnl that contains a configuration script generated by Autoconf, under
 
8036
dnl the same distribution terms as the rest of that program.
 
8037
 
 
8038
dnl From Bruno Haible.
 
8039
 
 
8040
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 
8041
dnl the libraries corresponding to explicit and implicit dependencies.
 
8042
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 
8043
dnl augments the CPPFLAGS variable.
 
8044
AC_DEFUN([AC_LIB_LINKFLAGS],
 
8045
[
 
8046
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
8047
  AC_REQUIRE([AC_LIB_RPATH])
 
8048
  define([Name],[translit([$1],[./-], [___])])
 
8049
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
8050
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
8051
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
 
8052
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
8053
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
 
8054
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
 
8055
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
 
8056
  ])
 
8057
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
 
8058
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
 
8059
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
 
8060
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
8061
  AC_SUBST([LIB]NAME)
 
8062
  AC_SUBST([LTLIB]NAME)
 
8063
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
 
8064
  dnl results of this search when this library appears as a dependency.
 
8065
  HAVE_LIB[]NAME=yes
 
8066
  undefine([Name])
 
8067
  undefine([NAME])
 
8068
])
 
8069
 
 
8070
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
 
8071
dnl searches for libname and the libraries corresponding to explicit and
 
8072
dnl implicit dependencies, together with the specified include files and
 
8073
dnl the ability to compile and link the specified testcode. If found, it
 
8074
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
 
8075
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 
8076
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 
8077
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
 
8078
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 
8079
[
 
8080
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
8081
  AC_REQUIRE([AC_LIB_RPATH])
 
8082
  define([Name],[translit([$1],[./-], [___])])
 
8083
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
8084
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
8085
 
 
8086
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
 
8087
  dnl accordingly.
 
8088
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
8089
 
 
8090
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
 
8091
  dnl because if the user has installed lib[]Name and not disabled its use
 
8092
  dnl via --without-lib[]Name-prefix, he wants to use it.
 
8093
  ac_save_CPPFLAGS="$CPPFLAGS"
 
8094
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
8095
 
 
8096
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
 
8097
    ac_save_LIBS="$LIBS"
 
8098
    LIBS="$LIBS $LIB[]NAME"
 
8099
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
 
8100
    LIBS="$ac_save_LIBS"
 
8101
  ])
 
8102
  if test "$ac_cv_lib[]Name" = yes; then
 
8103
    HAVE_LIB[]NAME=yes
 
8104
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
 
8105
    AC_MSG_CHECKING([how to link with lib[]$1])
 
8106
    AC_MSG_RESULT([$LIB[]NAME])
 
8107
  else
 
8108
    HAVE_LIB[]NAME=no
 
8109
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
 
8110
    dnl $INC[]NAME either.
 
8111
    CPPFLAGS="$ac_save_CPPFLAGS"
 
8112
    LIB[]NAME=
 
8113
    LTLIB[]NAME=
 
8114
  fi
 
8115
  AC_SUBST([HAVE_LIB]NAME)
 
8116
  AC_SUBST([LIB]NAME)
 
8117
  AC_SUBST([LTLIB]NAME)
 
8118
  undefine([Name])
 
8119
  undefine([NAME])
 
8120
])
 
8121
 
 
8122
dnl Determine the platform dependent parameters needed to use rpath:
 
8123
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
 
8124
dnl hardcode_direct, hardcode_minus_L.
 
8125
AC_DEFUN([AC_LIB_RPATH],
 
8126
[
 
8127
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
 
8128
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
 
8129
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
 
8130
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
 
8131
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
 
8132
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
 
8133
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
 
8134
    . ./conftest.sh
 
8135
    rm -f ./conftest.sh
 
8136
    acl_cv_rpath=done
 
8137
  ])
 
8138
  wl="$acl_cv_wl"
 
8139
  libext="$acl_cv_libext"
 
8140
  shlibext="$acl_cv_shlibext"
 
8141
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
 
8142
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
 
8143
  hardcode_direct="$acl_cv_hardcode_direct"
 
8144
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
 
8145
  dnl Determine whether the user wants rpath handling at all.
 
8146
  AC_ARG_ENABLE(rpath,
 
8147
    [  --disable-rpath         do not hardcode runtime library paths],
 
8148
    :, enable_rpath=yes)
 
8149
])
 
8150
 
 
8151
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 
8152
dnl the libraries corresponding to explicit and implicit dependencies.
 
8153
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
 
8154
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 
8155
[
 
8156
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
8157
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
8158
  dnl By default, look in $includedir and $libdir.
 
8159
  use_additional=yes
 
8160
  AC_LIB_WITH_FINAL_PREFIX([
 
8161
    eval additional_includedir=\"$includedir\"
 
8162
    eval additional_libdir=\"$libdir\"
 
8163
  ])
 
8164
  AC_LIB_ARG_WITH([lib$1-prefix],
 
8165
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
 
8166
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
 
8167
[
 
8168
    if test "X$withval" = "Xno"; then
 
8169
      use_additional=no
 
8170
    else
 
8171
      if test "X$withval" = "X"; then
 
8172
        AC_LIB_WITH_FINAL_PREFIX([
 
8173
          eval additional_includedir=\"$includedir\"
 
8174
          eval additional_libdir=\"$libdir\"
 
8175
        ])
 
8176
      else
 
8177
        additional_includedir="$withval/include"
 
8178
        additional_libdir="$withval/lib"
 
8179
      fi
 
8180
    fi
 
8181
])
 
8182
  dnl Search the library and its dependencies in $additional_libdir and
 
8183
  dnl $LDFLAGS. Using breadth-first-seach.
 
8184
  LIB[]NAME=
 
8185
  LTLIB[]NAME=
 
8186
  INC[]NAME=
 
8187
  rpathdirs=
 
8188
  ltrpathdirs=
 
8189
  names_already_handled=
 
8190
  names_next_round='$1 $2'
 
8191
  while test -n "$names_next_round"; do
 
8192
    names_this_round="$names_next_round"
 
8193
    names_next_round=
 
8194
    for name in $names_this_round; do
 
8195
      already_handled=
 
8196
      for n in $names_already_handled; do
 
8197
        if test "$n" = "$name"; then
 
8198
          already_handled=yes
 
8199
          break
 
8200
        fi
 
8201
      done
 
8202
      if test -z "$already_handled"; then
 
8203
        names_already_handled="$names_already_handled $name"
 
8204
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
 
8205
        dnl or AC_LIB_HAVE_LINKFLAGS call.
 
8206
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
 
8207
        eval value=\"\$HAVE_LIB$uppername\"
 
8208
        if test -n "$value"; then
 
8209
          if test "$value" = yes; then
 
8210
            eval value=\"\$LIB$uppername\"
 
8211
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
 
8212
            eval value=\"\$LTLIB$uppername\"
 
8213
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
 
8214
          else
 
8215
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
 
8216
            dnl that this library doesn't exist. So just drop it.
 
8217
            :
 
8218
          fi
 
8219
        else
 
8220
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
 
8221
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
 
8222
          found_dir=
 
8223
          found_la=
 
8224
          found_so=
 
8225
          found_a=
 
8226
          if test $use_additional = yes; then
 
8227
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
 
8228
              found_dir="$additional_libdir"
 
8229
              found_so="$additional_libdir/lib$name.$shlibext"
 
8230
              if test -f "$additional_libdir/lib$name.la"; then
 
8231
                found_la="$additional_libdir/lib$name.la"
 
8232
              fi
 
8233
            else
 
8234
              if test -f "$additional_libdir/lib$name.$libext"; then
 
8235
                found_dir="$additional_libdir"
 
8236
                found_a="$additional_libdir/lib$name.$libext"
 
8237
                if test -f "$additional_libdir/lib$name.la"; then
 
8238
                  found_la="$additional_libdir/lib$name.la"
 
8239
                fi
 
8240
              fi
 
8241
            fi
 
8242
          fi
 
8243
          if test "X$found_dir" = "X"; then
 
8244
            for x in $LDFLAGS $LTLIB[]NAME; do
 
8245
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
8246
              case "$x" in
 
8247
                -L*)
 
8248
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
 
8249
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
 
8250
                    found_dir="$dir"
 
8251
                    found_so="$dir/lib$name.$shlibext"
 
8252
                    if test -f "$dir/lib$name.la"; then
 
8253
                      found_la="$dir/lib$name.la"
 
8254
                    fi
 
8255
                  else
 
8256
                    if test -f "$dir/lib$name.$libext"; then
 
8257
                      found_dir="$dir"
 
8258
                      found_a="$dir/lib$name.$libext"
 
8259
                      if test -f "$dir/lib$name.la"; then
 
8260
                        found_la="$dir/lib$name.la"
 
8261
                      fi
 
8262
                    fi
 
8263
                  fi
 
8264
                  ;;
 
8265
              esac
 
8266
              if test "X$found_dir" != "X"; then
 
8267
                break
 
8268
              fi
 
8269
            done
 
8270
          fi
 
8271
          if test "X$found_dir" != "X"; then
 
8272
            dnl Found the library.
 
8273
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
 
8274
            if test "X$found_so" != "X"; then
 
8275
              dnl Linking with a shared library. We attempt to hardcode its
 
8276
              dnl directory into the executable's runpath, unless it's the
 
8277
              dnl standard /usr/lib.
 
8278
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
 
8279
                dnl No hardcoding is needed.
 
8280
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
8281
              else
 
8282
                dnl Use an explicit option to hardcode DIR into the resulting
 
8283
                dnl binary.
 
8284
                dnl Potentially add DIR to ltrpathdirs.
 
8285
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
8286
                haveit=
 
8287
                for x in $ltrpathdirs; do
 
8288
                  if test "X$x" = "X$found_dir"; then
 
8289
                    haveit=yes
 
8290
                    break
 
8291
                  fi
 
8292
                done
 
8293
                if test -z "$haveit"; then
 
8294
                  ltrpathdirs="$ltrpathdirs $found_dir"
 
8295
                fi
 
8296
                dnl The hardcoding into $LIBNAME is system dependent.
 
8297
                if test "$hardcode_direct" = yes; then
 
8298
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
 
8299
                  dnl resulting binary.
 
8300
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
8301
                else
 
8302
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
 
8303
                    dnl Use an explicit option to hardcode DIR into the resulting
 
8304
                    dnl binary.
 
8305
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
8306
                    dnl Potentially add DIR to rpathdirs.
 
8307
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
 
8308
                    haveit=
 
8309
                    for x in $rpathdirs; do
 
8310
                      if test "X$x" = "X$found_dir"; then
 
8311
                        haveit=yes
 
8312
                        break
 
8313
                      fi
 
8314
                    done
 
8315
                    if test -z "$haveit"; then
 
8316
                      rpathdirs="$rpathdirs $found_dir"
 
8317
                    fi
 
8318
                  else
 
8319
                    dnl Rely on "-L$found_dir".
 
8320
                    dnl But don't add it if it's already contained in the LDFLAGS
 
8321
                    dnl or the already constructed $LIBNAME
 
8322
                    haveit=
 
8323
                    for x in $LDFLAGS $LIB[]NAME; do
 
8324
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
8325
                      if test "X$x" = "X-L$found_dir"; then
 
8326
                        haveit=yes
 
8327
                        break
 
8328
                      fi
 
8329
                    done
 
8330
                    if test -z "$haveit"; then
 
8331
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
 
8332
                    fi
 
8333
                    if test "$hardcode_minus_L" != no; then
 
8334
                      dnl FIXME: Not sure whether we should use
 
8335
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
8336
                      dnl here.
 
8337
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
8338
                    else
 
8339
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
 
8340
                      dnl here, because this doesn't fit in flags passed to the
 
8341
                      dnl compiler. So give up. No hardcoding. This affects only
 
8342
                      dnl very old systems.
 
8343
                      dnl FIXME: Not sure whether we should use
 
8344
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
8345
                      dnl here.
 
8346
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
8347
                    fi
 
8348
                  fi
 
8349
                fi
 
8350
              fi
 
8351
            else
 
8352
              if test "X$found_a" != "X"; then
 
8353
                dnl Linking with a static library.
 
8354
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
 
8355
              else
 
8356
                dnl We shouldn't come here, but anyway it's good to have a
 
8357
                dnl fallback.
 
8358
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
 
8359
              fi
 
8360
            fi
 
8361
            dnl Assume the include files are nearby.
 
8362
            additional_includedir=
 
8363
            case "$found_dir" in
 
8364
              */lib | */lib/)
 
8365
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
 
8366
                additional_includedir="$basedir/include"
 
8367
                ;;
 
8368
            esac
 
8369
            if test "X$additional_includedir" != "X"; then
 
8370
              dnl Potentially add $additional_includedir to $INCNAME.
 
8371
              dnl But don't add it
 
8372
              dnl   1. if it's the standard /usr/include,
 
8373
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
 
8374
              dnl   3. if it's already present in $CPPFLAGS or the already
 
8375
              dnl      constructed $INCNAME,
 
8376
              dnl   4. if it doesn't exist as a directory.
 
8377
              if test "X$additional_includedir" != "X/usr/include"; then
 
8378
                haveit=
 
8379
                if test "X$additional_includedir" = "X/usr/local/include"; then
 
8380
                  if test -n "$GCC"; then
 
8381
                    case $host_os in
 
8382
                      linux*) haveit=yes;;
 
8383
                    esac
 
8384
                  fi
 
8385
                fi
 
8386
                if test -z "$haveit"; then
 
8387
                  for x in $CPPFLAGS $INC[]NAME; do
 
8388
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
8389
                    if test "X$x" = "X-I$additional_includedir"; then
 
8390
                      haveit=yes
 
8391
                      break
 
8392
                    fi
 
8393
                  done
 
8394
                  if test -z "$haveit"; then
 
8395
                    if test -d "$additional_includedir"; then
 
8396
                      dnl Really add $additional_includedir to $INCNAME.
 
8397
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
 
8398
                    fi
 
8399
                  fi
 
8400
                fi
 
8401
              fi
 
8402
            fi
 
8403
            dnl Look for dependencies.
 
8404
            if test -n "$found_la"; then
 
8405
              dnl Read the .la file. It defines the variables
 
8406
              dnl dlname, library_names, old_library, dependency_libs, current,
 
8407
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
 
8408
              save_libdir="$libdir"
 
8409
              case "$found_la" in
 
8410
                */* | *\\*) . "$found_la" ;;
 
8411
                *) . "./$found_la" ;;
 
8412
              esac
 
8413
              libdir="$save_libdir"
 
8414
              dnl We use only dependency_libs.
 
8415
              for dep in $dependency_libs; do
 
8416
                case "$dep" in
 
8417
                  -L*)
 
8418
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
 
8419
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
 
8420
                    dnl But don't add it
 
8421
                    dnl   1. if it's the standard /usr/lib,
 
8422
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
 
8423
                    dnl   3. if it's already present in $LDFLAGS or the already
 
8424
                    dnl      constructed $LIBNAME,
 
8425
                    dnl   4. if it doesn't exist as a directory.
 
8426
                    if test "X$additional_libdir" != "X/usr/lib"; then
 
8427
                      haveit=
 
8428
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
 
8429
                        if test -n "$GCC"; then
 
8430
                          case $host_os in
 
8431
                            linux*) haveit=yes;;
 
8432
                          esac
 
8433
                        fi
 
8434
                      fi
 
8435
                      if test -z "$haveit"; then
 
8436
                        haveit=
 
8437
                        for x in $LDFLAGS $LIB[]NAME; do
 
8438
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
8439
                          if test "X$x" = "X-L$additional_libdir"; then
 
8440
                            haveit=yes
 
8441
                            break
 
8442
                          fi
 
8443
                        done
 
8444
                        if test -z "$haveit"; then
 
8445
                          if test -d "$additional_libdir"; then
 
8446
                            dnl Really add $additional_libdir to $LIBNAME.
 
8447
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
 
8448
                          fi
 
8449
                        fi
 
8450
                        haveit=
 
8451
                        for x in $LDFLAGS $LTLIB[]NAME; do
 
8452
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
8453
                          if test "X$x" = "X-L$additional_libdir"; then
 
8454
                            haveit=yes
 
8455
                            break
 
8456
                          fi
 
8457
                        done
 
8458
                        if test -z "$haveit"; then
 
8459
                          if test -d "$additional_libdir"; then
 
8460
                            dnl Really add $additional_libdir to $LTLIBNAME.
 
8461
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
 
8462
                          fi
 
8463
                        fi
 
8464
                      fi
 
8465
                    fi
 
8466
                    ;;
 
8467
                  -R*)
 
8468
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
 
8469
                    if test "$enable_rpath" != no; then
 
8470
                      dnl Potentially add DIR to rpathdirs.
 
8471
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
 
8472
                      haveit=
 
8473
                      for x in $rpathdirs; do
 
8474
                        if test "X$x" = "X$dir"; then
 
8475
                          haveit=yes
 
8476
                          break
 
8477
                        fi
 
8478
                      done
 
8479
                      if test -z "$haveit"; then
 
8480
                        rpathdirs="$rpathdirs $dir"
 
8481
                      fi
 
8482
                      dnl Potentially add DIR to ltrpathdirs.
 
8483
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
8484
                      haveit=
 
8485
                      for x in $ltrpathdirs; do
 
8486
                        if test "X$x" = "X$dir"; then
 
8487
                          haveit=yes
 
8488
                          break
 
8489
                        fi
 
8490
                      done
 
8491
                      if test -z "$haveit"; then
 
8492
                        ltrpathdirs="$ltrpathdirs $dir"
 
8493
                      fi
 
8494
                    fi
 
8495
                    ;;
 
8496
                  -l*)
 
8497
                    dnl Handle this in the next round.
 
8498
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
 
8499
                    ;;
 
8500
                  *.la)
 
8501
                    dnl Handle this in the next round. Throw away the .la's
 
8502
                    dnl directory; it is already contained in a preceding -L
 
8503
                    dnl option.
 
8504
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
 
8505
                    ;;
 
8506
                  *)
 
8507
                    dnl Most likely an immediate library name.
 
8508
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
 
8509
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
 
8510
                    ;;
 
8511
                esac
 
8512
              done
 
8513
            fi
 
8514
          else
 
8515
            dnl Didn't find the library; assume it is in the system directories
 
8516
            dnl known to the linker and runtime loader. (All the system
 
8517
            dnl directories known to the linker should also be known to the
 
8518
            dnl runtime loader, otherwise the system is severely misconfigured.)
 
8519
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
8520
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
 
8521
          fi
 
8522
        fi
 
8523
      fi
 
8524
    done
 
8525
  done
 
8526
  if test "X$rpathdirs" != "X"; then
 
8527
    if test -n "$hardcode_libdir_separator"; then
 
8528
      dnl Weird platform: only the last -rpath option counts, the user must
 
8529
      dnl pass all path elements in one option. We can arrange that for a
 
8530
      dnl single library, but not when more than one $LIBNAMEs are used.
 
8531
      alldirs=
 
8532
      for found_dir in $rpathdirs; do
 
8533
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
 
8534
      done
 
8535
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
 
8536
      acl_save_libdir="$libdir"
 
8537
      libdir="$alldirs"
 
8538
      eval flag=\"$hardcode_libdir_flag_spec\"
 
8539
      libdir="$acl_save_libdir"
 
8540
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
8541
    else
 
8542
      dnl The -rpath options are cumulative.
 
8543
      for found_dir in $rpathdirs; do
 
8544
        acl_save_libdir="$libdir"
 
8545
        libdir="$found_dir"
 
8546
        eval flag=\"$hardcode_libdir_flag_spec\"
 
8547
        libdir="$acl_save_libdir"
 
8548
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
8549
      done
 
8550
    fi
 
8551
  fi
 
8552
  if test "X$ltrpathdirs" != "X"; then
 
8553
    dnl When using libtool, the option that works for both libraries and
 
8554
    dnl executables is -R. The -R options are cumulative.
 
8555
    for found_dir in $ltrpathdirs; do
 
8556
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
 
8557
    done
 
8558
  fi
 
8559
])
 
8560
 
 
8561
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
 
8562
dnl unless already present in VAR.
 
8563
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
 
8564
dnl contains two or three consecutive elements that belong together.
 
8565
AC_DEFUN([AC_LIB_APPENDTOVAR],
 
8566
[
 
8567
  for element in [$2]; do
 
8568
    haveit=
 
8569
    for x in $[$1]; do
 
8570
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
8571
      if test "X$x" = "X$element"; then
 
8572
        haveit=yes
 
8573
        break
 
8574
      fi
 
8575
    done
 
8576
    if test -z "$haveit"; then
 
8577
      [$1]="${[$1]}${[$1]:+ }$element"
 
8578
    fi
 
8579
  done
 
8580
])
 
8581
 
 
8582
# lib-ld.m4 serial 3 (gettext-0.13)
 
8583
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
 
8584
dnl This file is free software, distributed under the terms of the GNU
 
8585
dnl General Public License.  As a special exception to the GNU General
 
8586
dnl Public License, this file may be distributed as part of a program
 
8587
dnl that contains a configuration script generated by Autoconf, under
 
8588
dnl the same distribution terms as the rest of that program.
 
8589
 
 
8590
dnl Subroutines of libtool.m4,
 
8591
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
 
8592
dnl with libtool.m4.
 
8593
 
 
8594
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
 
8595
AC_DEFUN([AC_LIB_PROG_LD_GNU],
 
8596
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
 
8597
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
8598
case `$LD -v 2>&1 </dev/null` in
 
8599
*GNU* | *'with BFD'*)
 
8600
  acl_cv_prog_gnu_ld=yes ;;
 
8601
*)
 
8602
  acl_cv_prog_gnu_ld=no ;;
 
8603
esac])
 
8604
with_gnu_ld=$acl_cv_prog_gnu_ld
 
8605
])
 
8606
 
 
8607
dnl From libtool-1.4. Sets the variable LD.
 
8608
AC_DEFUN([AC_LIB_PROG_LD],
 
8609
[AC_ARG_WITH(gnu-ld,
 
8610
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 
8611
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 
8612
AC_REQUIRE([AC_PROG_CC])dnl
 
8613
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
8614
# Prepare PATH_SEPARATOR.
 
8615
# The user is always right.
 
8616
if test "${PATH_SEPARATOR+set}" != set; then
 
8617
  echo "#! /bin/sh" >conf$$.sh
 
8618
  echo  "exit 0"   >>conf$$.sh
 
8619
  chmod +x conf$$.sh
 
8620
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
8621
    PATH_SEPARATOR=';'
 
8622
  else
 
8623
    PATH_SEPARATOR=:
 
8624
  fi
 
8625
  rm -f conf$$.sh
 
8626
fi
 
8627
ac_prog=ld
 
8628
if test "$GCC" = yes; then
 
8629
  # Check if gcc -print-prog-name=ld gives a path.
 
8630
  AC_MSG_CHECKING([for ld used by GCC])
 
8631
  case $host in
 
8632
  *-*-mingw*)
 
8633
    # gcc leaves a trailing carriage return which upsets mingw
 
8634
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
8635
  *)
 
8636
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
8637
  esac
 
8638
  case $ac_prog in
 
8639
    # Accept absolute paths.
 
8640
    [[\\/]* | [A-Za-z]:[\\/]*)]
 
8641
      [re_direlt='/[^/][^/]*/\.\./']
 
8642
      # Canonicalize the path of ld
 
8643
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 
8644
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
8645
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 
8646
      done
 
8647
      test -z "$LD" && LD="$ac_prog"
 
8648
      ;;
 
8649
  "")
 
8650
    # If it fails, then pretend we aren't using GCC.
 
8651
    ac_prog=ld
 
8652
    ;;
 
8653
  *)
 
8654
    # If it is relative, then search for the first ld in PATH.
 
8655
    with_gnu_ld=unknown
 
8656
    ;;
 
8657
  esac
 
8658
elif test "$with_gnu_ld" = yes; then
 
8659
  AC_MSG_CHECKING([for GNU ld])
 
8660
else
 
8661
  AC_MSG_CHECKING([for non-GNU ld])
 
8662
fi
 
8663
AC_CACHE_VAL(acl_cv_path_LD,
 
8664
[if test -z "$LD"; then
 
8665
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
8666
  for ac_dir in $PATH; do
 
8667
    test -z "$ac_dir" && ac_dir=.
 
8668
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
8669
      acl_cv_path_LD="$ac_dir/$ac_prog"
 
8670
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
8671
      # but apparently some GNU ld's only accept -v.
 
8672
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
8673
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
 
8674
      *GNU* | *'with BFD'*)
 
8675
        test "$with_gnu_ld" != no && break ;;
 
8676
      *)
 
8677
        test "$with_gnu_ld" != yes && break ;;
 
8678
      esac
 
8679
    fi
 
8680
  done
 
8681
  IFS="$ac_save_ifs"
 
8682
else
 
8683
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
 
8684
fi])
 
8685
LD="$acl_cv_path_LD"
 
8686
if test -n "$LD"; then
 
8687
  AC_MSG_RESULT($LD)
 
8688
else
 
8689
  AC_MSG_RESULT(no)
 
8690
fi
 
8691
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
8692
AC_LIB_PROG_LD_GNU
 
8693
])
 
8694
 
 
8695
# iconv.m4 serial AM4 (gettext-0.11.3)
 
8696
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
8697
dnl This file is free software, distributed under the terms of the GNU
 
8698
dnl General Public License.  As a special exception to the GNU General
 
8699
dnl Public License, this file may be distributed as part of a program
 
8700
dnl that contains a configuration script generated by Autoconf, under
 
8701
dnl the same distribution terms as the rest of that program.
 
8702
 
 
8703
dnl From Bruno Haible.
 
8704
 
 
8705
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
 
8706
[
 
8707
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
8708
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
8709
  AC_REQUIRE([AC_LIB_RPATH])
 
8710
 
 
8711
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
8712
  dnl accordingly.
 
8713
  AC_LIB_LINKFLAGS_BODY([iconv])
 
8714
])
 
8715
 
 
8716
AC_DEFUN([AM_ICONV_LINK],
 
8717
[
 
8718
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
 
8719
  dnl those with the standalone portable GNU libiconv installed).
 
8720
 
 
8721
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
8722
  dnl accordingly.
 
8723
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
 
8724
 
 
8725
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
 
8726
  dnl because if the user has installed libiconv and not disabled its use
 
8727
  dnl via --without-libiconv-prefix, he wants to use it. The first
 
8728
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
 
8729
  am_save_CPPFLAGS="$CPPFLAGS"
 
8730
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
 
8731
 
 
8732
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
 
8733
    am_cv_func_iconv="no, consider installing GNU libiconv"
 
8734
    am_cv_lib_iconv=no
 
8735
    AC_TRY_LINK([#include <stdlib.h>
 
8736
#include <iconv.h>],
 
8737
      [iconv_t cd = iconv_open("","");
 
8738
       iconv(cd,NULL,NULL,NULL,NULL);
 
8739
       iconv_close(cd);],
 
8740
      am_cv_func_iconv=yes)
 
8741
    if test "$am_cv_func_iconv" != yes; then
 
8742
      am_save_LIBS="$LIBS"
 
8743
      LIBS="$LIBS $LIBICONV"
 
8744
      AC_TRY_LINK([#include <stdlib.h>
 
8745
#include <iconv.h>],
 
8746
        [iconv_t cd = iconv_open("","");
 
8747
         iconv(cd,NULL,NULL,NULL,NULL);
 
8748
         iconv_close(cd);],
 
8749
        am_cv_lib_iconv=yes
 
8750
        am_cv_func_iconv=yes)
 
8751
      LIBS="$am_save_LIBS"
 
8752
    fi
 
8753
  ])
 
8754
  if test "$am_cv_func_iconv" = yes; then
 
8755
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
 
8756
  fi
 
8757
  if test "$am_cv_lib_iconv" = yes; then
 
8758
    AC_MSG_CHECKING([how to link with libiconv])
 
8759
    AC_MSG_RESULT([$LIBICONV])
 
8760
  else
 
8761
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
 
8762
    dnl either.
 
8763
    CPPFLAGS="$am_save_CPPFLAGS"
 
8764
    LIBICONV=
 
8765
    LTLIBICONV=
 
8766
  fi
 
8767
  AC_SUBST(LIBICONV)
 
8768
  AC_SUBST(LTLIBICONV)
 
8769
])
 
8770
 
 
8771
AC_DEFUN([AM_ICONV],
 
8772
[
 
8773
  AM_ICONV_LINK
 
8774
  if test "$am_cv_func_iconv" = yes; then
 
8775
    AC_MSG_CHECKING([for iconv declaration])
 
8776
    AC_CACHE_VAL(am_cv_proto_iconv, [
 
8777
      AC_TRY_COMPILE([
 
8778
#include <stdlib.h>
 
8779
#include <iconv.h>
 
8780
extern
 
8781
#ifdef __cplusplus
 
8782
"C"
 
8783
#endif
 
8784
#if defined(__STDC__) || defined(__cplusplus)
 
8785
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
 
8786
#else
 
8787
size_t iconv();
 
8788
#endif
 
8789
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
 
8790
      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
 
8791
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
 
8792
    AC_MSG_RESULT([$]{ac_t:-
 
8793
         }[$]am_cv_proto_iconv)
 
8794
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
 
8795
      [Define as const if the declaration of iconv() needs const.])
 
8796
  fi
 
8797
])
 
8798
 
 
8799
# signed.m4 serial 1 (gettext-0.10.40)
 
8800
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
8801
dnl This file is free software, distributed under the terms of the GNU
 
8802
dnl General Public License.  As a special exception to the GNU General
 
8803
dnl Public License, this file may be distributed as part of a program
 
8804
dnl that contains a configuration script generated by Autoconf, under
 
8805
dnl the same distribution terms as the rest of that program.
 
8806
 
 
8807
dnl From Bruno Haible.
 
8808
 
 
8809
AC_DEFUN([bh_C_SIGNED],
 
8810
[
 
8811
  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
 
8812
   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
 
8813
  if test $bh_cv_c_signed = no; then
 
8814
    AC_DEFINE(signed, ,
 
8815
              [Define to empty if the C compiler doesn't support this keyword.])
 
8816
  fi
 
8817
])
 
8818
 
 
8819
# longlong.m4 serial 4
 
8820
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
 
8821
dnl This file is free software, distributed under the terms of the GNU
 
8822
dnl General Public License.  As a special exception to the GNU General
 
8823
dnl Public License, this file may be distributed as part of a program
 
8824
dnl that contains a configuration script generated by Autoconf, under
 
8825
dnl the same distribution terms as the rest of that program.
 
8826
 
 
8827
dnl From Paul Eggert.
 
8828
 
 
8829
# Define HAVE_LONG_LONG if 'long long' works.
 
8830
 
 
8831
AC_DEFUN([jm_AC_TYPE_LONG_LONG],
 
8832
[
 
8833
  AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
 
8834
  [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
 
8835
    [long long llmax = (long long) -1;
 
8836
     return ll << i | ll >> i | llmax / ll | llmax % ll;],
 
8837
    ac_cv_type_long_long=yes,
 
8838
    ac_cv_type_long_long=no)])
 
8839
  if test $ac_cv_type_long_long = yes; then
 
8840
    AC_DEFINE(HAVE_LONG_LONG, 1,
 
8841
      [Define if you have the 'long long' type.])
 
8842
  fi
 
8843
])
 
8844
 
 
8845
# longdouble.m4 serial 1 (gettext-0.12)
 
8846
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
8847
dnl This file is free software, distributed under the terms of the GNU
 
8848
dnl General Public License.  As a special exception to the GNU General
 
8849
dnl Public License, this file may be distributed as part of a program
 
8850
dnl that contains a configuration script generated by Autoconf, under
 
8851
dnl the same distribution terms as the rest of that program.
 
8852
 
 
8853
dnl From Bruno Haible.
 
8854
dnl Test whether the compiler supports the 'long double' type.
 
8855
dnl Prerequisite: AC_PROG_CC
 
8856
 
 
8857
AC_DEFUN([gt_TYPE_LONGDOUBLE],
 
8858
[
 
8859
  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
 
8860
    [if test "$GCC" = yes; then
 
8861
       gt_cv_c_long_double=yes
 
8862
     else
 
8863
       AC_TRY_COMPILE([
 
8864
         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
 
8865
         long double foo = 0.0;
 
8866
         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
 
8867
         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
 
8868
         ], ,
 
8869
         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
 
8870
     fi])
 
8871
  if test $gt_cv_c_long_double = yes; then
 
8872
    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
 
8873
  fi
 
8874
])
 
8875
 
 
8876
# wchar_t.m4 serial 1 (gettext-0.12)
 
8877
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
8878
dnl This file is free software, distributed under the terms of the GNU
 
8879
dnl General Public License.  As a special exception to the GNU General
 
8880
dnl Public License, this file may be distributed as part of a program
 
8881
dnl that contains a configuration script generated by Autoconf, under
 
8882
dnl the same distribution terms as the rest of that program.
 
8883
 
 
8884
dnl From Bruno Haible.
 
8885
dnl Test whether <stddef.h> has the 'wchar_t' type.
 
8886
dnl Prerequisite: AC_PROG_CC
 
8887
 
 
8888
AC_DEFUN([gt_TYPE_WCHAR_T],
 
8889
[
 
8890
  AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
 
8891
    [AC_TRY_COMPILE([#include <stddef.h>
 
8892
       wchar_t foo = (wchar_t)'\0';], ,
 
8893
       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
 
8894
  if test $gt_cv_c_wchar_t = yes; then
 
8895
    AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
 
8896
  fi
 
8897
])
 
8898
 
 
8899
# wint_t.m4 serial 1 (gettext-0.12)
 
8900
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
8901
dnl This file is free software, distributed under the terms of the GNU
 
8902
dnl General Public License.  As a special exception to the GNU General
 
8903
dnl Public License, this file may be distributed as part of a program
 
8904
dnl that contains a configuration script generated by Autoconf, under
 
8905
dnl the same distribution terms as the rest of that program.
 
8906
 
 
8907
dnl From Bruno Haible.
 
8908
dnl Test whether <wchar.h> has the 'wint_t' type.
 
8909
dnl Prerequisite: AC_PROG_CC
 
8910
 
 
8911
AC_DEFUN([gt_TYPE_WINT_T],
 
8912
[
 
8913
  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
 
8914
    [AC_TRY_COMPILE([#include <wchar.h>
 
8915
       wint_t foo = (wchar_t)'\0';], ,
 
8916
       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
 
8917
  if test $gt_cv_c_wint_t = yes; then
 
8918
    AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
 
8919
  fi
 
8920
])
 
8921
 
 
8922
# inttypes_h.m4 serial 5 (gettext-0.12)
 
8923
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
 
8924
dnl This file is free software, distributed under the terms of the GNU
 
8925
dnl General Public License.  As a special exception to the GNU General
 
8926
dnl Public License, this file may be distributed as part of a program
 
8927
dnl that contains a configuration script generated by Autoconf, under
 
8928
dnl the same distribution terms as the rest of that program.
 
8929
 
 
8930
dnl From Paul Eggert.
 
8931
 
 
8932
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
 
8933
# doesn't clash with <sys/types.h>, and declares uintmax_t.
 
8934
 
 
8935
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
 
8936
[
 
8937
  AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
 
8938
  [AC_TRY_COMPILE(
 
8939
    [#include <sys/types.h>
 
8940
#include <inttypes.h>],
 
8941
    [uintmax_t i = (uintmax_t) -1;],
 
8942
    jm_ac_cv_header_inttypes_h=yes,
 
8943
    jm_ac_cv_header_inttypes_h=no)])
 
8944
  if test $jm_ac_cv_header_inttypes_h = yes; then
 
8945
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
 
8946
      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
 
8947
       and declares uintmax_t. ])
 
8948
  fi
 
8949
])
 
8950
 
 
8951
# stdint_h.m4 serial 3 (gettext-0.12)
 
8952
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
 
8953
dnl This file is free software, distributed under the terms of the GNU
 
8954
dnl General Public License.  As a special exception to the GNU General
 
8955
dnl Public License, this file may be distributed as part of a program
 
8956
dnl that contains a configuration script generated by Autoconf, under
 
8957
dnl the same distribution terms as the rest of that program.
 
8958
 
 
8959
dnl From Paul Eggert.
 
8960
 
 
8961
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
 
8962
# doesn't clash with <sys/types.h>, and declares uintmax_t.
 
8963
 
 
8964
AC_DEFUN([jm_AC_HEADER_STDINT_H],
 
8965
[
 
8966
  AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
 
8967
  [AC_TRY_COMPILE(
 
8968
    [#include <sys/types.h>
 
8969
#include <stdint.h>],
 
8970
    [uintmax_t i = (uintmax_t) -1;],
 
8971
    jm_ac_cv_header_stdint_h=yes,
 
8972
    jm_ac_cv_header_stdint_h=no)])
 
8973
  if test $jm_ac_cv_header_stdint_h = yes; then
 
8974
    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
 
8975
      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
 
8976
       and declares uintmax_t. ])
 
8977
  fi
 
8978
])
 
8979
 
 
8980
# intmax.m4 serial 1 (gettext-0.12)
 
8981
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
8982
dnl This file is free software, distributed under the terms of the GNU
 
8983
dnl General Public License.  As a special exception to the GNU General
 
8984
dnl Public License, this file may be distributed as part of a program
 
8985
dnl that contains a configuration script generated by Autoconf, under
 
8986
dnl the same distribution terms as the rest of that program.
 
8987
 
 
8988
dnl From Bruno Haible.
 
8989
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
 
8990
dnl find a replacement if it is lacking.
 
8991
 
 
8992
AC_DEFUN([gt_TYPE_INTMAX_T],
 
8993
[
 
8994
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
 
8995
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
 
8996
  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
 
8997
    [AC_TRY_COMPILE([
 
8998
#include <stddef.h> 
 
8999
#include <stdlib.h>
 
9000
#if HAVE_STDINT_H_WITH_UINTMAX
 
9001
#include <stdint.h>
 
9002
#endif
 
9003
#if HAVE_INTTYPES_H_WITH_UINTMAX
 
9004
#include <inttypes.h>
 
9005
#endif
 
9006
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
 
9007
  if test $gt_cv_c_intmax_t = yes; then
 
9008
    AC_DEFINE(HAVE_INTMAX_T, 1,
 
9009
      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
 
9010
  fi
 
9011
])
 
9012
 
 
9013
# printf-posix.m4 serial 2 (gettext-0.13.1)
 
9014
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
9015
dnl This file is free software, distributed under the terms of the GNU
 
9016
dnl General Public License.  As a special exception to the GNU General
 
9017
dnl Public License, this file may be distributed as part of a program
 
9018
dnl that contains a configuration script generated by Autoconf, under
 
9019
dnl the same distribution terms as the rest of that program.
 
9020
 
 
9021
dnl From Bruno Haible.
 
9022
dnl Test whether the printf() function supports POSIX/XSI format strings with
 
9023
dnl positions.
 
9024
 
 
9025
AC_DEFUN([gt_PRINTF_POSIX],
 
9026
[
 
9027
  AC_REQUIRE([AC_PROG_CC])
 
9028
  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
 
9029
    gt_cv_func_printf_posix,
 
9030
    [
 
9031
      AC_TRY_RUN([
 
9032
#include <stdio.h>
 
9033
#include <string.h>
 
9034
/* The string "%2$d %1$d", with dollar characters protected from the shell's
 
9035
   dollar expansion (possibly an autoconf bug).  */
 
9036
static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
 
9037
static char buf[100];
 
9038
int main ()
 
9039
{
 
9040
  sprintf (buf, format, 33, 55);
 
9041
  return (strcmp (buf, "55 33") != 0);
 
9042
}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
 
9043
      [
 
9044
        AC_EGREP_CPP(notposix, [
 
9045
#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
 
9046
  notposix
 
9047
#endif
 
9048
        ], gt_cv_func_printf_posix="guessing no",
 
9049
           gt_cv_func_printf_posix="guessing yes")
 
9050
      ])
 
9051
    ])
 
9052
  case $gt_cv_func_printf_posix in
 
9053
    *yes)
 
9054
      AC_DEFINE(HAVE_POSIX_PRINTF, 1,
 
9055
        [Define if your printf() function supports format strings with positions.])
 
9056
      ;;
 
9057
  esac
 
9058
])
 
9059
 
 
9060
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
 
9061
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
9062
dnl This file is free software, distributed under the terms of the GNU
 
9063
dnl General Public License.  As a special exception to the GNU General
 
9064
dnl Public License, this file may be distributed as part of a program
 
9065
dnl that contains a configuration script generated by Autoconf, under
 
9066
dnl the same distribution terms as the rest of that program.
 
9067
 
 
9068
# Test for the GNU C Library, version 2.1 or newer.
 
9069
# From Bruno Haible.
 
9070
 
 
9071
AC_DEFUN([jm_GLIBC21],
 
9072
  [
 
9073
    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
 
9074
      ac_cv_gnu_library_2_1,
 
9075
      [AC_EGREP_CPP([Lucky GNU user],
 
9076
        [
 
9077
#include <features.h>
 
9078
#ifdef __GNU_LIBRARY__
 
9079
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
 
9080
  Lucky GNU user
 
9081
 #endif
 
9082
#endif
 
9083
        ],
 
9084
        ac_cv_gnu_library_2_1=yes,
 
9085
        ac_cv_gnu_library_2_1=no)
 
9086
      ]
 
9087
    )
 
9088
    AC_SUBST(GLIBC21)
 
9089
    GLIBC21="$ac_cv_gnu_library_2_1"
 
9090
  ]
 
9091
)
 
9092
 
 
9093
# intdiv0.m4 serial 1 (gettext-0.11.3)
 
9094
dnl Copyright (C) 2002 Free Software Foundation, Inc.
 
9095
dnl This file is free software, distributed under the terms of the GNU
 
9096
dnl General Public License.  As a special exception to the GNU General
 
9097
dnl Public License, this file may be distributed as part of a program
 
9098
dnl that contains a configuration script generated by Autoconf, under
 
9099
dnl the same distribution terms as the rest of that program.
 
9100
 
 
9101
dnl From Bruno Haible.
 
9102
 
 
9103
AC_DEFUN([gt_INTDIV0],
 
9104
[
 
9105
  AC_REQUIRE([AC_PROG_CC])dnl
 
9106
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
9107
 
 
9108
  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
 
9109
    gt_cv_int_divbyzero_sigfpe,
 
9110
    [
 
9111
      AC_TRY_RUN([
 
9112
#include <stdlib.h>
 
9113
#include <signal.h>
 
9114
 
 
9115
static void
 
9116
#ifdef __cplusplus
 
9117
sigfpe_handler (int sig)
 
9118
#else
 
9119
sigfpe_handler (sig) int sig;
 
9120
#endif
 
9121
{
 
9122
  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
 
9123
  exit (sig != SIGFPE);
 
9124
}
 
9125
 
 
9126
int x = 1;
 
9127
int y = 0;
 
9128
int z;
 
9129
int nan;
 
9130
 
 
9131
int main ()
 
9132
{
 
9133
  signal (SIGFPE, sigfpe_handler);
 
9134
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
 
9135
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
 
9136
  signal (SIGTRAP, sigfpe_handler);
 
9137
#endif
 
9138
/* Linux/SPARC yields signal SIGILL.  */
 
9139
#if defined (__sparc__) && defined (__linux__)
 
9140
  signal (SIGILL, sigfpe_handler);
 
9141
#endif
 
9142
 
 
9143
  z = x / y;
 
9144
  nan = y / y;
 
9145
  exit (1);
 
9146
}
 
9147
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
 
9148
        [
 
9149
          # Guess based on the CPU.
 
9150
          case "$host_cpu" in
 
9151
            alpha* | i[34567]86 | m68k | s390*)
 
9152
              gt_cv_int_divbyzero_sigfpe="guessing yes";;
 
9153
            *)
 
9154
              gt_cv_int_divbyzero_sigfpe="guessing no";;
 
9155
          esac
 
9156
        ])
 
9157
    ])
 
9158
  case "$gt_cv_int_divbyzero_sigfpe" in
 
9159
    *yes) value=1;;
 
9160
    *) value=0;;
 
9161
  esac
 
9162
  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
 
9163
    [Define if integer division by zero raises signal SIGFPE.])
 
9164
])
 
9165
 
 
9166
# uintmax_t.m4 serial 7 (gettext-0.12)
 
9167
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
 
9168
dnl This file is free software, distributed under the terms of the GNU
 
9169
dnl General Public License.  As a special exception to the GNU General
 
9170
dnl Public License, this file may be distributed as part of a program
 
9171
dnl that contains a configuration script generated by Autoconf, under
 
9172
dnl the same distribution terms as the rest of that program.
 
9173
 
 
9174
dnl From Paul Eggert.
 
9175
 
 
9176
AC_PREREQ(2.13)
 
9177
 
 
9178
# Define uintmax_t to 'unsigned long' or 'unsigned long long'
 
9179
# if it is not already defined in <stdint.h> or <inttypes.h>.
 
9180
 
 
9181
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
 
9182
[
 
9183
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
 
9184
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
 
9185
  if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
 
9186
    AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
 
9187
    test $ac_cv_type_unsigned_long_long = yes \
 
9188
      && ac_type='unsigned long long' \
 
9189
      || ac_type='unsigned long'
 
9190
    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
 
9191
      [Define to unsigned long or unsigned long long
 
9192
       if <stdint.h> and <inttypes.h> don't define.])
 
9193
  else
 
9194
    AC_DEFINE(HAVE_UINTMAX_T, 1,
 
9195
      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
 
9196
  fi
 
9197
])
 
9198
 
 
9199
# ulonglong.m4 serial 3
 
9200
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
 
9201
dnl This file is free software, distributed under the terms of the GNU
 
9202
dnl General Public License.  As a special exception to the GNU General
 
9203
dnl Public License, this file may be distributed as part of a program
 
9204
dnl that contains a configuration script generated by Autoconf, under
 
9205
dnl the same distribution terms as the rest of that program.
 
9206
 
 
9207
dnl From Paul Eggert.
 
9208
 
 
9209
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
 
9210
 
 
9211
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
 
9212
[
 
9213
  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
 
9214
  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
 
9215
    [unsigned long long ullmax = (unsigned long long) -1;
 
9216
     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
 
9217
    ac_cv_type_unsigned_long_long=yes,
 
9218
    ac_cv_type_unsigned_long_long=no)])
 
9219
  if test $ac_cv_type_unsigned_long_long = yes; then
 
9220
    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
 
9221
      [Define if you have the 'unsigned long long' type.])
 
9222
  fi
 
9223
])
 
9224
 
 
9225
# inttypes.m4 serial 1 (gettext-0.11.4)
 
9226
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
 
9227
dnl This file is free software, distributed under the terms of the GNU
 
9228
dnl General Public License.  As a special exception to the GNU General
 
9229
dnl Public License, this file may be distributed as part of a program
 
9230
dnl that contains a configuration script generated by Autoconf, under
 
9231
dnl the same distribution terms as the rest of that program.
 
9232
 
 
9233
dnl From Paul Eggert.
 
9234
 
 
9235
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
 
9236
# <sys/types.h>.
 
9237
 
 
9238
AC_DEFUN([gt_HEADER_INTTYPES_H],
 
9239
[
 
9240
  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
 
9241
  [
 
9242
    AC_TRY_COMPILE(
 
9243
      [#include <sys/types.h>
 
9244
#include <inttypes.h>],
 
9245
      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
 
9246
  ])
 
9247
  if test $gt_cv_header_inttypes_h = yes; then
 
9248
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
 
9249
      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
 
9250
  fi
 
9251
])
 
9252
 
 
9253
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
 
9254
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
 
9255
dnl This file is free software, distributed under the terms of the GNU
 
9256
dnl General Public License.  As a special exception to the GNU General
 
9257
dnl Public License, this file may be distributed as part of a program
 
9258
dnl that contains a configuration script generated by Autoconf, under
 
9259
dnl the same distribution terms as the rest of that program.
 
9260
 
 
9261
dnl From Bruno Haible.
 
9262
 
 
9263
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
 
9264
# macros to non-string values.  This is the case on AIX 4.3.3.
 
9265
 
 
9266
AC_DEFUN([gt_INTTYPES_PRI],
 
9267
[
 
9268
  AC_REQUIRE([gt_HEADER_INTTYPES_H])
 
9269
  if test $gt_cv_header_inttypes_h = yes; then
 
9270
    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
 
9271
      gt_cv_inttypes_pri_broken,
 
9272
      [
 
9273
        AC_TRY_COMPILE([#include <inttypes.h>
 
9274
#ifdef PRId32
 
9275
char *p = PRId32;
 
9276
#endif
 
9277
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
 
9278
      ])
 
9279
  fi
 
9280
  if test "$gt_cv_inttypes_pri_broken" = yes; then
 
9281
    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
 
9282
      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
 
9283
  fi
 
9284
])
 
9285
 
 
9286
# xsize.m4 serial 2
 
9287
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
9288
dnl This file is free software, distributed under the terms of the GNU
 
9289
dnl General Public License.  As a special exception to the GNU General
 
9290
dnl Public License, this file may be distributed as part of a program
 
9291
dnl that contains a configuration script generated by Autoconf, under
 
9292
dnl the same distribution terms as the rest of that program.
 
9293
 
 
9294
AC_DEFUN([gl_XSIZE],
 
9295
[
 
9296
  dnl Prerequisites of lib/xsize.h.
 
9297
  AC_REQUIRE([gl_SIZE_MAX])
 
9298
  AC_CHECK_HEADERS(stdint.h)
 
9299
])
 
9300
 
 
9301
# size_max.m4 serial 2
 
9302
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
9303
dnl This file is free software, distributed under the terms of the GNU
 
9304
dnl General Public License.  As a special exception to the GNU General
 
9305
dnl Public License, this file may be distributed as part of a program
 
9306
dnl that contains a configuration script generated by Autoconf, under
 
9307
dnl the same distribution terms as the rest of that program.
 
9308
 
 
9309
dnl From Bruno Haible.
 
9310
 
 
9311
AC_DEFUN([gl_SIZE_MAX],
 
9312
[
 
9313
  AC_CHECK_HEADERS(stdint.h)
 
9314
  dnl First test whether the system already has SIZE_MAX.
 
9315
  AC_MSG_CHECKING([for SIZE_MAX])
 
9316
  result=
 
9317
  AC_EGREP_CPP([Found it], [
 
9318
#include <limits.h>
 
9319
#if HAVE_STDINT_H
 
9320
#include <stdint.h>
 
9321
#endif
 
9322
#ifdef SIZE_MAX
 
9323
Found it
 
9324
#endif
 
9325
], result=yes)
 
9326
  if test -z "$result"; then
 
9327
    dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
 
9328
    dnl than the type 'unsigned long'.
 
9329
    dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
 
9330
    dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
 
9331
    _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
 
9332
      [#include <stddef.h>], result=?)
 
9333
    _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
 
9334
      [#include <stddef.h>], result=?)
 
9335
    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
 
9336
      [#include <stddef.h>], result=?)
 
9337
    if test "$fits_in_uint" = 1; then
 
9338
      dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
 
9339
      dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
 
9340
      AC_TRY_COMPILE([#include <stddef.h>
 
9341
        extern size_t foo;
 
9342
        extern unsigned long foo;
 
9343
        ], [], fits_in_uint=0)
 
9344
    fi
 
9345
    if test -z "$result"; then
 
9346
      if test "$fits_in_uint" = 1; then
 
9347
        result="$res_hi$res_lo"U
 
9348
      else
 
9349
        result="$res_hi$res_lo"UL
 
9350
      fi
 
9351
    else
 
9352
      dnl Shouldn't happen, but who knows...
 
9353
      result='~(size_t)0'
 
9354
    fi
 
9355
  fi
 
9356
  AC_MSG_RESULT([$result])
 
9357
  if test "$result" != yes; then
 
9358
    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
 
9359
      [Define as the maximum value of type 'size_t', if the system doesn't define it.])
 
9360
  fi
 
9361
])
 
9362
 
 
9363
# codeset.m4 serial AM1 (gettext-0.10.40)
 
9364
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
9365
dnl This file is free software, distributed under the terms of the GNU
 
9366
dnl General Public License.  As a special exception to the GNU General
 
9367
dnl Public License, this file may be distributed as part of a program
 
9368
dnl that contains a configuration script generated by Autoconf, under
 
9369
dnl the same distribution terms as the rest of that program.
 
9370
 
 
9371
dnl From Bruno Haible.
 
9372
 
 
9373
AC_DEFUN([AM_LANGINFO_CODESET],
 
9374
[
 
9375
  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
 
9376
    [AC_TRY_LINK([#include <langinfo.h>],
 
9377
      [char* cs = nl_langinfo(CODESET);],
 
9378
      am_cv_langinfo_codeset=yes,
 
9379
      am_cv_langinfo_codeset=no)
 
9380
    ])
 
9381
  if test $am_cv_langinfo_codeset = yes; then
 
9382
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
 
9383
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
 
9384
  fi
 
9385
])
 
9386
 
 
9387
# lcmessage.m4 serial 3 (gettext-0.11.3)
 
9388
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
9389
dnl This file is free software, distributed under the terms of the GNU
 
9390
dnl General Public License.  As a special exception to the GNU General
 
9391
dnl Public License, this file may be distributed as part of a program
 
9392
dnl that contains a configuration script generated by Autoconf, under
 
9393
dnl the same distribution terms as the rest of that program.
 
9394
dnl
 
9395
dnl This file can can be used in projects which are not available under
 
9396
dnl the GNU General Public License or the GNU Library General Public
 
9397
dnl License but which still want to provide support for the GNU gettext
 
9398
dnl functionality.
 
9399
dnl Please note that the actual code of the GNU gettext library is covered
 
9400
dnl by the GNU Library General Public License, and the rest of the GNU
 
9401
dnl gettext package package is covered by the GNU General Public License.
 
9402
dnl They are *not* in the public domain.
 
9403
 
 
9404
dnl Authors:
 
9405
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
 
9406
 
 
9407
# Check whether LC_MESSAGES is available in <locale.h>.
 
9408
 
 
9409
AC_DEFUN([AM_LC_MESSAGES],
 
9410
[
 
9411
  AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
9412
    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
9413
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
9414
  if test $am_cv_val_LC_MESSAGES = yes; then
 
9415
    AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
9416
      [Define if your <locale.h> file defines LC_MESSAGES.])
 
9417
  fi
 
9418
])
 
9419
 
4535
9420
 
4536
9421
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
4537
9422
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
4623
9508
dnl Get the cflags and libraries from the xine-config script
4624
9509
dnl
4625
9510
AC_ARG_WITH(xine-prefix,
4626
 
    [  --with-xine-prefix=PFX  Prefix where XINE is installed (optional)],
 
9511
    AC_HELP_STRING([--with-xine-prefix=DIR], [prefix where XINE is installed (optional)]),
4627
9512
            xine_config_prefix="$withval", xine_config_prefix="")
4628
9513
AC_ARG_WITH(xine-exec-prefix,
4629
 
    [  --with-xine-exec-prefix=PFX                                                                             Exec prefix where XINE is installed (optional)],
 
9514
    AC_HELP_STRING([--with-xine-exec-prefix=DIR], [exec prefix where XINE is installed (optional)]),
4630
9515
            xine_config_exec_prefix="$withval", xine_config_exec_prefix="")
4631
9516
AC_ARG_ENABLE(xinetest, 
4632
 
    [  --disable-xinetest      Do not try to compile and run a test XINE program],, enable_xinetest=yes)
 
9517
    AC_HELP_STRING([--disable-xinetest], [do not try to compile and run a test XINE program]),
 
9518
            enable_xinetest=$enableval, enable_xinetest=yes)
4633
9519
 
4634
9520
  if test x$xine_config_exec_prefix != x ; then
4635
9521
     xine_config_args="$xine_config_args --exec-prefix=$xine_config_exec_prefix"