91 |
AC_REQUIRE([AC_EXEEXT])dnl |
AC_REQUIRE([AC_EXEEXT])dnl |
92 |
dnl |
dnl |
93 |
|
|
94 |
|
AC_LIBTOOL_SYS_MAX_CMD_LEN |
95 |
|
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
96 |
|
AC_LIBTOOL_OBJDIR |
97 |
|
|
98 |
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
99 |
_LT_AC_PROG_ECHO_BACKSLASH |
_LT_AC_PROG_ECHO_BACKSLASH |
100 |
|
|
191 |
[ --disable-libtool-lock avoid locking (might break parallel builds)]) |
[ --disable-libtool-lock avoid locking (might break parallel builds)]) |
192 |
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
193 |
|
|
194 |
|
AC_ARG_WITH(pic, |
195 |
|
[ --with-pic try to use only PIC/non-PIC objects [default=use both]], |
196 |
|
pic_mode="$withval", pic_mode=default) |
197 |
|
test -z "$pic_mode" && pic_mode=default |
198 |
|
|
199 |
# Use C for the default configuration in the libtool script |
# Use C for the default configuration in the libtool script |
200 |
tagname= |
tagname= |
201 |
_LT_AC_LANG_C_CONFIG |
AC_LIBTOOL_LANG_C_CONFIG |
|
_LT_AC_LTCONFIG_HACK |
|
|
AC_LIBTOOL_CONFIG |
|
202 |
_LT_AC_TAGCONFIG |
_LT_AC_TAGCONFIG |
203 |
])# AC_LIBTOOL_SETUP |
])# AC_LIBTOOL_SETUP |
204 |
|
|
539 |
# AC_LIBTOOL_SYS_MAX_CMD_LEN |
# AC_LIBTOOL_SYS_MAX_CMD_LEN |
540 |
# -------------------------- |
# -------------------------- |
541 |
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], |
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], |
542 |
[max_cmd_len= |
[# find the maximum length of command line arguments |
|
# find the maximum length of command line arguments |
|
543 |
AC_MSG_CHECKING([the maximum length of command line arguments]) |
AC_MSG_CHECKING([the maximum length of command line arguments]) |
544 |
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl |
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl |
545 |
i=0 |
i=0 |
560 |
testring= |
testring= |
561 |
# add a significant safety factor because C++ compilers can tack on massive |
# add a significant safety factor because C++ compilers can tack on massive |
562 |
# amounts of additional arguments before passing them to the linker. 1/4 |
# amounts of additional arguments before passing them to the linker. 1/4 |
563 |
# should be good. |
# should be good. |
564 |
len=`expr $lt_cv_sys_max_cmd_len \/ 4` |
len=`expr $lt_cv_sys_max_cmd_len \/ 4` |
565 |
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len` |
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len` |
566 |
]) |
]) |
567 |
if test -n $lt_cv_sys_max_cmd_len ; then |
if test -n $lt_cv_sys_max_cmd_len ; then |
568 |
max_cmd_len=$lt_cv_sys_max_cmd_len |
AC_MSG_RESULT($lt_cv_sys_max_cmd_len) |
569 |
else |
else |
570 |
max_cmd_len=none |
AC_MSG_RESULT(none) |
571 |
fi |
fi |
|
AC_MSG_RESULT($max_cmd_len) |
|
572 |
])# AC_LIBTOOL_SYS_MAX_CMD_LEN |
])# AC_LIBTOOL_SYS_MAX_CMD_LEN |
573 |
|
|
574 |
|
|
|
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
|
|
# --------------------------------- |
|
|
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
|
|
[AC_REQUIRE([AC_CANONICAL_HOST]) |
|
|
AC_REQUIRE([AC_PROG_NM]) |
|
|
AC_REQUIRE([AC_OBJEXT]) |
|
|
# Check for command to grab the raw symbol name followed by C symbol from nm. |
|
|
AC_MSG_CHECKING([command to parse $NM output]) |
|
|
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl |
|
|
|
|
|
# These are sane defaults that work on at least a few old systems. |
|
|
# [They come from Ultrix. What could be older than Ultrix?!! ;)] |
|
|
|
|
|
# Character class describing NM global symbol codes. |
|
|
[symcode='[BCDEGRST]'] |
|
|
|
|
|
# Regexp to match symbols that can be accessed directly from C. |
|
|
[sympat='\([_A-Za-z][_A-Za-z0-9]*\)'] |
|
|
|
|
|
# Transform the above into a raw symbol and a C symbol. |
|
|
symxfrm='\1 \2\3 \3' |
|
|
|
|
|
# Transform an extracted symbol line into a proper C declaration |
|
|
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" |
|
|
|
|
|
# Define system-specific variables. |
|
|
case $host_os in |
|
|
aix*) |
|
|
[symcode='[BCDT]'] |
|
|
;; |
|
|
cygwin* | mingw* | pw32*) |
|
|
[symcode='[ABCDGISTW]'] |
|
|
;; |
|
|
hpux*) # Its linker distinguishes data from code symbols |
|
|
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
|
|
;; |
|
|
irix*) |
|
|
[symcode='[BCDEGRST]'] |
|
|
;; |
|
|
solaris* | sysv5*) |
|
|
[symcode='[BDT]'] |
|
|
;; |
|
|
sysv4) |
|
|
[symcode='[DFNSTU]'] |
|
|
;; |
|
|
esac |
|
|
|
|
|
# Handle CRLF in mingw tool chain |
|
|
opt_cr= |
|
|
case $host_os in |
|
|
mingw*) |
|
|
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
|
|
;; |
|
|
esac |
|
|
|
|
|
# If we're using GNU nm, then use its standard symbol codes. |
|
|
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
|
|
[symcode='[ABCDGISTW]'] |
|
|
fi |
|
|
|
|
|
# Try without a prefix undercore, then with it. |
|
|
for ac_symprfx in "" "_"; do |
|
|
|
|
|
# Write the raw and C identifiers. |
|
|
[lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"] |
|
|
|
|
|
# Check to see that the pipe works correctly. |
|
|
pipe_works=no |
|
|
|
|
|
rm -f conftest* |
|
|
cat > conftest.$ac_ext <<EOF |
|
|
#ifdef __cplusplus |
|
|
extern "C" { |
|
|
#endif |
|
|
char nm_test_var; |
|
|
void nm_test_func(){} |
|
|
#ifdef __cplusplus |
|
|
} |
|
|
#endif |
|
|
int main(){nm_test_var='a';nm_test_func();return(0);} |
|
|
EOF |
|
|
|
|
|
if AC_TRY_EVAL(ac_compile); then |
|
|
# Now try to grab the symbols. |
|
|
nlist=conftest.nm |
|
|
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
|
|
# Try sorting and uniquifying the output. |
|
|
if sort "$nlist" | uniq > "$nlist"T; then |
|
|
mv -f "$nlist"T "$nlist" |
|
|
else |
|
|
rm -f "$nlist"T |
|
|
fi |
|
|
|
|
|
# Make sure that we snagged all the symbols we need. |
|
|
if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
|
|
if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
|
|
cat <<EOF > conftest.$ac_ext |
|
|
#ifdef __cplusplus |
|
|
extern "C" { |
|
|
#endif |
|
|
|
|
|
EOF |
|
|
# Now generate the symbol file. |
|
|
eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' |
|
|
|
|
|
cat <<EOF >> conftest.$ac_ext |
|
|
#if defined (__STDC__) && __STDC__ |
|
|
# define lt_ptr_t void * |
|
|
#else |
|
|
# define lt_ptr_t char * |
|
|
# define const |
|
|
#endif |
|
|
|
|
|
/* The mapping between symbol names and symbols. */ |
|
|
const struct { |
|
|
const char *name; |
|
|
lt_ptr_t address; |
|
|
} |
|
|
[lt_preloaded_symbols[] =] |
|
|
{ |
|
|
EOF |
|
|
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext |
|
|
cat <<\EOF >> conftest.$ac_ext |
|
|
{0, (lt_ptr_t) 0} |
|
|
}; |
|
|
|
|
|
#ifdef __cplusplus |
|
|
} |
|
|
#endif |
|
|
EOF |
|
|
# Now try linking the two files. |
|
|
mv conftest.$ac_objext conftstm.$ac_objext |
|
|
save_LIBS="$LIBS" |
|
|
save_CFLAGS="$CFLAGS" |
|
|
LIBS="conftstm.$ac_objext" |
|
|
CFLAGS="$CFLAGS$no_builtin_flag" |
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest; then |
|
|
pipe_works=yes |
|
|
fi |
|
|
LIBS="$save_LIBS" |
|
|
CFLAGS="$save_CFLAGS" |
|
|
else |
|
|
echo "cannot find nm_test_func in $nlist" >&AC_FD_CC |
|
|
fi |
|
|
else |
|
|
echo "cannot find nm_test_var in $nlist" >&AC_FD_CC |
|
|
fi |
|
|
else |
|
|
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC |
|
|
fi |
|
|
else |
|
|
echo "$progname: failed program was:" >&AC_FD_CC |
|
|
cat conftest.$ac_ext >&5 |
|
|
fi |
|
|
rm -f conftest* conftst* |
|
|
|
|
|
# Do not use the global_symbol_pipe unless it works. |
|
|
if test "$pipe_works" = yes; then |
|
|
break |
|
|
else |
|
|
lt_cv_sys_global_symbol_pipe= |
|
|
fi |
|
|
done |
|
|
]) |
|
|
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" |
|
|
if test -z "$lt_cv_sys_global_symbol_pipe"; then |
|
|
global_symbol_to_cdecl= |
|
|
else |
|
|
global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" |
|
|
fi |
|
|
if test -z "$global_symbol_pipe$global_symbol_to_cdecl"; then |
|
|
AC_MSG_RESULT(failed) |
|
|
else |
|
|
AC_MSG_RESULT(ok) |
|
|
fi |
|
|
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
|
|
|
|
|
|
|
575 |
# _LT_AC_CHECK_DLFCN |
# _LT_AC_CHECK_DLFCN |
576 |
# -------------------- |
# -------------------- |
577 |
AC_DEFUN(_LT_AC_CHECK_DLFCN, |
AC_DEFUN(_LT_AC_CHECK_DLFCN, |
760 |
])# AC_LIBTOOL_DLOPEN_SELF |
])# AC_LIBTOOL_DLOPEN_SELF |
761 |
|
|
762 |
|
|
763 |
# AC_LIBTOOL_PROG_CC_C_O |
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) |
764 |
# ---------------------- |
# --------------------------------- |
765 |
# Check to see if options -c and -o are simultaneously supported by compiler |
# Check to see if options -c and -o are simultaneously supported by compiler |
766 |
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], |
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], |
767 |
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
768 |
|
|
769 |
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], |
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], |
770 |
[lt_cv_compiler_c_o], |
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], |
771 |
[lt_cv_compiler_c_o=no |
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no |
772 |
$rm -r conftest 2>/dev/null |
$rm -r conftest 2>/dev/null |
773 |
mkdir conftest |
mkdir conftest |
774 |
cd conftest |
cd conftest |
792 |
# Append any errors to the config.log. |
# Append any errors to the config.log. |
793 |
cat out/conftest.err 1>&AC_FD_CC |
cat out/conftest.err 1>&AC_FD_CC |
794 |
else |
else |
795 |
lt_cv_compiler_c_o=yes |
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
796 |
fi |
fi |
797 |
fi |
fi |
798 |
CFLAGS="$save_CFLAGS" |
CFLAGS="$save_CFLAGS" |
804 |
rmdir conftest |
rmdir conftest |
805 |
$rm conftest* |
$rm conftest* |
806 |
]) |
]) |
|
compiler_c_o=$lt_cv_compiler_c_o |
|
807 |
])# AC_LIBTOOL_PROG_CC_C_O |
])# AC_LIBTOOL_PROG_CC_C_O |
808 |
|
|
809 |
|
|
810 |
# AC_LIBTOOL_PROG_CC_NO_RTTI |
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) |
811 |
# -------------------------- |
# ----------------------------------------- |
|
AC_DEFUN([AC_LIBTOOL_PROG_CC_NO_RTTI], |
|
|
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
|
|
|
|
|
if test "$GCC" = yes; then |
|
|
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], |
|
|
lt_cv_prog_cc_rtti_exceptions, |
|
|
[-fno-rtti -fno-exceptions -c conftest.$ac_ext], [], |
|
|
[no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'], |
|
|
[no_builtin_flag=' -fno-builtin']) |
|
|
compiler_rtti_exceptions=$lt_cv_prog_cc_rtti_exceptions |
|
|
fi |
|
|
])# AC_LIBTOOL_PROG_CC_NO_RTTI |
|
|
|
|
|
|
|
|
# AC_LIBTOOL_PROG_CC_PIC |
|
|
# ---------------------- |
|
|
AC_DEFUN([AC_LIBTOOL_PROG_CC_PIC], |
|
|
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
|
|
|
|
|
AC_ARG_WITH(pic, |
|
|
[ --with-pic try to use only PIC/non-PIC objects [default=use both]], |
|
|
pic_mode="$withval", pic_mode=default) |
|
|
test -z "$pic_mode" && pic_mode=default |
|
|
|
|
|
# We assume here that the value for lt_cv_prog_cc_pic will not be cached |
|
|
# in isolation, and that seeing it set (from the cache) indicates that |
|
|
# the associated values are set (in the cache) correctly too. |
|
|
AC_MSG_CHECKING([for $compiler option to produce PIC]) |
|
|
AC_CACHE_VAL(lt_cv_prog_cc_pic, |
|
|
[ lt_cv_prog_cc_pic= |
|
|
lt_cv_prog_cc_shlib= |
|
|
lt_cv_prog_cc_wl= |
|
|
lt_cv_prog_cc_static= |
|
|
lt_cv_prog_cc_no_builtin= |
|
|
lt_cv_prog_cc_can_build_shared=$can_build_shared |
|
|
|
|
|
if test "$GCC" = yes; then |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
lt_cv_prog_cc_static='-static' |
|
|
|
|
|
case $host_os in |
|
|
aix*) |
|
|
# All AIX code is PIC. |
|
|
if test "$host_cpu" = ia64; then |
|
|
# AIX 5 now supports IA64 processor |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
else |
|
|
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' |
|
|
fi |
|
|
;; |
|
|
amigaos*) |
|
|
# FIXME: we need at least 68020 code to build shared libraries, but |
|
|
# adding the `-m68020' flag to GCC prevents building anything better, |
|
|
# like `-m68040'. |
|
|
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' |
|
|
;; |
|
|
beos* | irix5* | irix6* | osf3* | osf4* | osf5*) |
|
|
# PIC is the default for these OSes. |
|
|
;; |
|
|
cygwin* | mingw* | pw32* | os2*) |
|
|
# This hack is so that the source file can tell whether it is being |
|
|
# built for inclusion in a dll (and should export symbols for example). |
|
|
lt_cv_prog_cc_pic='-DDLL_EXPORT' |
|
|
;; |
|
|
darwin* | rhapsody*) |
|
|
# PIC is the default on this platform |
|
|
# Common symbols not allowed in MH_DYLIB files |
|
|
lt_cv_prog_cc_pic='-fno-common' |
|
|
;; |
|
|
*djgpp*) |
|
|
# DJGPP does not support shared libraries at all |
|
|
lt_cv_prog_cc_pic= |
|
|
;; |
|
|
sysv4*MP*) |
|
|
if test -d /usr/nec; then |
|
|
lt_cv_prog_cc_pic=-Kconform_pic |
|
|
fi |
|
|
;; |
|
|
*) |
|
|
lt_cv_prog_cc_pic='-fPIC' |
|
|
;; |
|
|
esac |
|
|
else |
|
|
# PORTME Check for PIC flags for the system compiler. |
|
|
case $host_os in |
|
|
aix*) |
|
|
# All AIX code is PIC. |
|
|
if test "$host_cpu" = ia64; then |
|
|
# AIX 5 now supports IA64 processor |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
else |
|
|
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' |
|
|
fi |
|
|
;; |
|
|
|
|
|
cygwin* | mingw* | pw32* | os2*) |
|
|
# This hack is so that the source file can tell whether it is being |
|
|
# built for inclusion in a dll (and should export symbols for example). |
|
|
lt_cv_prog_cc_pic='-DDLL_EXPORT' |
|
|
;; |
|
|
|
|
|
hpux9* | hpux10* | hpux11*) |
|
|
# Is there a better lt_cv_prog_cc_static that works with the bundled CC? |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" |
|
|
lt_cv_prog_cc_pic='+Z' |
|
|
;; |
|
|
|
|
|
irix5* | irix6*) |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
lt_cv_prog_cc_static='-non_shared' |
|
|
# PIC (with -KPIC) is the default. |
|
|
;; |
|
|
|
|
|
newsos6) |
|
|
lt_cv_prog_cc_pic='-KPIC' |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
;; |
|
|
|
|
|
osf3* | osf4* | osf5*) |
|
|
# All OSF/1 code is PIC. |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
lt_cv_prog_cc_static='-non_shared' |
|
|
;; |
|
|
|
|
|
sco3.2v5*) |
|
|
lt_cv_prog_cc_pic='-Kpic' |
|
|
lt_cv_prog_cc_static='-dn' |
|
|
lt_cv_prog_cc_shlib='-belf' |
|
|
;; |
|
|
|
|
|
solaris*) |
|
|
lt_cv_prog_cc_pic='-KPIC' |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
;; |
|
|
|
|
|
sunos4*) |
|
|
lt_cv_prog_cc_pic='-PIC' |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
lt_cv_prog_cc_wl='-Qoption ld ' |
|
|
;; |
|
|
|
|
|
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
|
|
lt_cv_prog_cc_pic='-KPIC' |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
if test "x$host_vendor" = xsni; then |
|
|
lt_cv_prog_cc_wl='-LD' |
|
|
else |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
fi |
|
|
;; |
|
|
|
|
|
sysv4*MP*) |
|
|
if test -d /usr/nec ;then |
|
|
lt_cv_prog_cc_pic='-Kconform_pic' |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
fi |
|
|
;; |
|
|
|
|
|
uts4*) |
|
|
lt_cv_prog_cc_pic='-pic' |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
;; |
|
|
|
|
|
*) |
|
|
lt_cv_prog_cc_can_build_shared=no |
|
|
;; |
|
|
esac |
|
|
fi |
|
|
case "$host_os" in |
|
|
# For platforms which do not support PIC, -DPIC is meaningless: |
|
|
*djgpp*) |
|
|
lt_cv_prog_cc_pic= |
|
|
;; |
|
|
*) |
|
|
lt_cv_prog_cc_pic="$lt_cv_prog_cc_pic -DPIC" |
|
|
;; |
|
|
esac |
|
|
]) |
|
|
if test -z "$lt_cv_prog_cc_pic"; then |
|
|
AC_MSG_RESULT([none]) |
|
|
else |
|
|
AC_MSG_RESULT([$lt_cv_prog_cc_pic]) |
|
|
fi |
|
|
|
|
|
# Check for any special shared library compilation flags. |
|
|
if test -n "$lt_cv_prog_cc_shlib"; then |
|
|
AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) |
|
|
if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]"] >/dev/null; then : |
|
|
else |
|
|
AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) |
|
|
lt_cv_prog_cc_can_build_shared=no |
|
|
fi |
|
|
fi |
|
|
|
|
|
pic_flag="$lt_cv_prog_cc_pic" |
|
|
special_shlib_compile_flags="$lt_cv_prog_cc_shlib" |
|
|
wl="$lt_cv_prog_cc_wl" |
|
|
no_builtin_flag="$lt_cv_prog_cc_no_builtin" |
|
|
can_build_shared="$lt_cv_prog_cc_can_build_shared" |
|
|
])# AC_LIBTOOL_PROG_CC_PIC |
|
|
|
|
|
|
|
|
# AC_LIBTOOL_PROG_CC_PIC_WORKS |
|
|
# ---------------------------- |
|
|
AC_DEFUN([AC_LIBTOOL_PROG_CC_PIC_WORKS], |
|
|
[AC_REQUIRE([AC_LIBTOOL_PROG_CC_PIC]) |
|
|
|
|
|
if test -n "$lt_cv_prog_cc_pic"; then |
|
|
# Check to make sure the pic_flag actually works. |
|
|
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $lt_cv_prog_cc_pic works], |
|
|
lt_cv_prog_cc_pic_works, [$lt_cv_prog_cc_pic -DPIC], [], |
|
|
[case $lt_cv_prog_cc_pic in |
|
|
"" | " "*) ;; |
|
|
*) lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" ;; |
|
|
esac], |
|
|
[lt_cv_prog_cc_pic= |
|
|
lt_cv_prog_cc_can_build_shared=no]) |
|
|
fi |
|
|
])# AC_LIBTOOL_PROG_CC_PIC_WORKS |
|
|
|
|
|
|
|
|
# AC_LIBTOOL_PROG_CC_STATIC_WORKS |
|
|
# ------------------------------- |
|
|
AC_DEFUN([AC_LIBTOOL_PROG_CC_STATIC_WORKS], |
|
|
[## FIXME: lt_cv_prog_cc_static is set from here at the moment: |
|
|
AC_REQUIRE([AC_LIBTOOL_PROG_CC_PIC]) |
|
|
|
|
|
compiler_static="$lt_cv_prog_cc_static" |
|
|
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $compiler_static works], |
|
|
lt_cv_prog_cc_static_works, $compiler_static, |
|
|
[], |
|
|
lt_cv_prog_cc_static=) |
|
|
link_static_flag="$lt_cv_prog_cc_static" |
|
|
])# AC_LIBTOOL_PROG_CC_STATIC_WORKS |
|
|
|
|
|
|
|
|
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS |
|
|
# ------------------------------ |
|
812 |
# Check to see if we can do hard links to lock some files if needed |
# Check to see if we can do hard links to lock some files if needed |
813 |
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], |
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], |
814 |
[AC_REQUIRE([_LT_AC_LOCK])dnl |
[AC_REQUIRE([_LT_AC_LOCK])dnl |
|
AC_REQUIRE([AC_LIBTOOL_PROG_CC_C_O])dnl |
|
815 |
|
|
816 |
hard_links="nottested" |
hard_links="nottested" |
817 |
if test "$compiler_c_o" = no && test "$need_locks" != no; then |
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then |
818 |
# do not overwrite the value of need_locks provided by the user |
# do not overwrite the value of need_locks provided by the user |
819 |
AC_MSG_CHECKING([if we can lock with hard links]) |
AC_MSG_CHECKING([if we can lock with hard links]) |
820 |
hard_links=yes |
hard_links=yes |
834 |
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS |
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS |
835 |
|
|
836 |
|
|
|
# AC_LIBTOOL_PROG_LD_SHLIBS |
|
|
# ------------------------- |
|
|
# See if the linker supports building shared libraries. |
|
|
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], |
|
|
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl |
|
|
|
|
|
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) |
|
|
|
|
|
allow_undefined_flag= |
|
|
no_undefined_flag= |
|
|
need_lib_prefix=unknown |
|
|
need_version=unknown |
|
|
# when you set need_version to no, make sure it does not cause -set_version |
|
|
# flags to be left without arguments |
|
|
archive_cmds= |
|
|
archive_expsym_cmds= |
|
|
old_archive_from_new_cmds= |
|
|
old_archive_from_expsyms_cmds= |
|
|
export_dynamic_flag_spec= |
|
|
whole_archive_flag_spec= |
|
|
thread_safe_flag_spec= |
|
|
hardcode_into_libs=no |
|
|
hardcode_libdir_flag_spec= |
|
|
hardcode_libdir_separator= |
|
|
hardcode_direct=no |
|
|
hardcode_minus_L=no |
|
|
hardcode_shlibpath_var=unsupported |
|
|
runpath_var= |
|
|
link_all_deplibs=unknown |
|
|
always_export_symbols=no |
|
|
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
|
|
# include_expsyms should be a list of space-separated symbols to be *always* |
|
|
# included in the symbol list |
|
|
include_expsyms= |
|
|
# exclude_expsyms can be an egrep regular expression of symbols to exclude |
|
|
# it will be wrapped by ` (' and `)$', so one must not match beginning or |
|
|
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
|
|
# as well as any symbol that contains `d'. |
|
|
exclude_expsyms="_GLOBAL_OFFSET_TABLE_" |
|
|
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
|
|
# platforms (ab)use it in PIC code, but their linkers get confused if |
|
|
# the symbol is explicitly referenced. Since portable code cannot |
|
|
# rely on this symbol name, it's probably fine to never include it in |
|
|
# preloaded symbol tables. |
|
|
extract_expsyms_cmds= |
|
|
|
|
|
case $host_os in |
|
|
cygwin* | mingw* | pw32* ) |
|
|
# FIXME: the MSVC++ port hasn't been tested in a loooong time |
|
|
# When not using gcc, we currently assume that we are using |
|
|
# Microsoft Visual C++. |
|
|
if test "$GCC" != yes; then |
|
|
with_gnu_ld=no |
|
|
fi |
|
|
;; |
|
|
|
|
|
esac |
|
|
|
|
|
ld_shlibs=yes |
|
|
if test "$with_gnu_ld" = yes; then |
|
|
# If archive_cmds runs LD, not CC, wlarc should be empty |
|
|
wlarc='${wl}' |
|
|
|
|
|
# See if GNU ld supports shared libraries. |
|
|
case $host_os in |
|
|
aix3* | aix4* | aix5*) |
|
|
# On AIX, the GNU linker is very broken |
|
|
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. |
|
|
ld_shlibs=no |
|
|
cat <<EOF 1>&2 |
|
|
|
|
|
*** Warning: the GNU linker, at least up to release 2.9.1, is reported |
|
|
*** to be unable to reliably create shared libraries on AIX. |
|
|
*** Therefore, libtool is disabling shared libraries support. If you |
|
|
*** really care for shared libraries, you may want to modify your PATH |
|
|
*** so that a non-GNU linker is found, and then restart. |
|
|
|
|
|
EOF |
|
|
;; |
|
|
|
|
|
amigaos*) |
|
|
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)' |
|
|
hardcode_libdir_flag_spec='-L$libdir' |
|
|
hardcode_minus_L=yes |
|
|
|
|
|
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
|
|
# that the semantics of dynamic libraries on AmigaOS, at least up |
|
|
# to version 4, is to share data among multiple programs linked |
|
|
# with the same dynamic library. Since this doesn't match the |
|
|
# behavior of shared libraries on other platforms, we can't use |
|
|
# them. |
|
|
ld_shlibs=no |
|
|
;; |
|
|
|
|
|
beos*) |
|
|
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
|
|
allow_undefined_flag=unsupported |
|
|
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
|
|
# support --undefined. This deserves some investigation. FIXME |
|
|
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
|
|
else |
|
|
ld_shlibs=no |
|
|
fi |
|
|
;; |
|
|
|
|
|
cygwin* | mingw* | pw32*) |
|
|
# hardcode_libdir_flag_spec is actually meaningless, as there is |
|
|
# no search path for DLLs. |
|
|
hardcode_libdir_flag_spec='-L$libdir' |
|
|
allow_undefined_flag=unsupported |
|
|
always_export_symbols=yes |
|
|
|
|
|
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ |
|
|
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ |
|
|
test -f $output_objdir/impgen.exe || (cd $output_objdir && \ |
|
|
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ |
|
|
else $CC -o impgen impgen.c ; fi)~ |
|
|
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' |
|
|
|
|
|
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' |
|
|
|
|
|
# cygwin and mingw dlls have different entry points and sets of symbols |
|
|
# to exclude. |
|
|
# FIXME: what about values for MSVC? |
|
|
dll_entry=__cygwin_dll_entry@12 |
|
|
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ |
|
|
case $host_os in |
|
|
mingw*) |
|
|
# mingw values |
|
|
dll_entry=_DllMainCRTStartup@12 |
|
|
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ |
|
|
;; |
|
|
esac |
|
|
|
|
|
# mingw and cygwin differ, and it's simplest to just exclude the union |
|
|
# of the two symbol sets. |
|
|
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 |
|
|
|
|
|
# recent cygwin and mingw systems supply a stub DllMain which the user |
|
|
# can override, but on older systems we have to supply one (in ltdll.c) |
|
|
if test "x$lt_cv_need_dllmain" = "xyes"; then |
|
|
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " |
|
|
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~ |
|
|
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' |
|
|
else |
|
|
ltdll_obj= |
|
|
ltdll_cmds= |
|
|
fi |
|
|
|
|
|
# Extract the symbol export list from an `--export-all' def file, |
|
|
# then regenerate the def file from the symbol export list, so that |
|
|
# the compiled dll only exports the symbol export list. |
|
|
# Be careful not to strip the DATA tag left by newer dlltools. |
|
|
export_symbols_cmds="$ltdll_cmds"' |
|
|
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ |
|
|
[sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols' |
|
|
|
|
|
# If the export-symbols file already is a .def file (1st line |
|
|
# is EXPORTS), use it as is. |
|
|
# If DATA tags from a recent dlltool are present, honour them! |
|
|
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then |
|
|
cp $export_symbols $output_objdir/$soname-def; |
|
|
else |
|
|
echo EXPORTS > $output_objdir/$soname-def; |
|
|
_lt_hint=1; |
|
|
cat $export_symbols | while read symbol; do |
|
|
set dummy \$symbol; |
|
|
case \[$]# in |
|
|
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; |
|
|
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; |
|
|
esac; |
|
|
_lt_hint=`expr 1 + \$_lt_hint`; |
|
|
done; |
|
|
fi~ |
|
|
'"$ltdll_cmds"' |
|
|
$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~ |
|
|
$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~ |
|
|
$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~ |
|
|
$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~ |
|
|
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' |
|
|
;; |
|
|
|
|
|
darwin* | rhapsody*) |
|
|
allow_undefined_flag='-undefined suppress' |
|
|
# FIXME: Relying on posixy $() will cause problems for |
|
|
# cross-compilation, but unfortunately the echo tests do not |
|
|
# yet detect zsh echo's removal of \ escapes. |
|
|
archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)' |
|
|
# We need to add '_' to the symbols in $export_symbols first |
|
|
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' |
|
|
hardcode_direct=yes |
|
|
hardcode_shlibpath_var=no |
|
|
whole_archive_flag_spec='-all_load $convenience' |
|
|
;; |
|
|
|
|
|
netbsd*) |
|
|
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
|
|
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
|
|
wlarc= |
|
|
else |
|
|
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
|
|
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
|
|
fi |
|
|
;; |
|
|
|
|
|
solaris* | sysv5*) |
|
|
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
|
|
ld_shlibs=no |
|
|
cat <<EOF 1>&2 |
|
|
|
|
|
*** Warning: The releases 2.8.* of the GNU linker cannot reliably |
|
|
*** create shared libraries on Solaris systems. Therefore, libtool |
|
|
*** is disabling shared libraries support. We urge you to upgrade GNU |
|
|
*** binutils to release 2.9.1 or newer. Another option is to modify |
|
|
*** your PATH or compiler configuration so that the native linker is |
|
|
*** used, and then restart. |
|
|
|
|
|
EOF |
|
|
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
|
|
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
|
|
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
|
|
else |
|
|
ld_shlibs=no |
|
|
fi |
|
|
;; |
|
|
|
|
|
sunos4*) |
|
|
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
|
|
wlarc= |
|
|
hardcode_direct=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
*) |
|
|
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
|
|
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
|
|
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
|
|
else |
|
|
ld_shlibs=no |
|
|
fi |
|
|
;; |
|
|
esac |
|
|
|
|
|
if test "$ld_shlibs" = yes; then |
|
|
runpath_var=LD_RUN_PATH |
|
|
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' |
|
|
export_dynamic_flag_spec='${wl}--export-dynamic' |
|
|
case $host_os in |
|
|
cygwin* | mingw* | pw32*) |
|
|
# dlltool doesn't understand --whole-archive et. al. |
|
|
whole_archive_flag_spec= |
|
|
;; |
|
|
*) |
|
|
# ancient GNU ld didn't support --whole-archive et. al. |
|
|
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
|
|
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
|
|
else |
|
|
whole_archive_flag_spec= |
|
|
fi |
|
|
;; |
|
|
esac |
|
|
fi |
|
|
else |
|
|
# PORTME fill in a description of your system's linker (not GNU ld) |
|
|
case $host_os in |
|
|
aix3*) |
|
|
allow_undefined_flag=unsupported |
|
|
always_export_symbols=yes |
|
|
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' |
|
|
# Note: this linker hardcodes the directories in LIBPATH if there |
|
|
# are no directories specified by -L. |
|
|
hardcode_minus_L=yes |
|
|
if test "$GCC" = yes && test -z "$link_static_flag"; then |
|
|
# Neither direct hardcoding nor static linking is supported with a |
|
|
# broken collect2. |
|
|
hardcode_direct=unsupported |
|
|
fi |
|
|
;; |
|
|
|
|
|
aix4* | aix5*) |
|
|
hardcode_direct=yes |
|
|
hardcode_libdir_separator=':' |
|
|
link_all_deplibs=yes |
|
|
# When large executables or shared objects are built, AIX ld can |
|
|
# have problems creating the table of contents. If linking a library |
|
|
# or program results in "error TOC overflow" add -mminimal-toc to |
|
|
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
|
|
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
|
|
if test "$GCC" = yes; then |
|
|
case $host_os in aix4.[012]|aix4.[-12].*) |
|
|
# We only want to do this on AIX 4.2 and lower, the check |
|
|
# below for broken collect2 doesn't work under 4.3+ |
|
|
collect2name=`${CC} -print-prog-name=collect2` |
|
|
if test -f "$collect2name" && \ |
|
|
strings "$collect2name" | grep resolve_lib_name >/dev/null |
|
|
then |
|
|
# We have reworked collect2 |
|
|
hardcode_direct=yes |
|
|
else |
|
|
# We have old collect2 |
|
|
hardcode_direct=unsupported |
|
|
# It fails to find uninstalled libraries when the uninstalled |
|
|
# path is not listed in the libpath. Setting hardcode_minus_L |
|
|
# to unsupported forces relinking |
|
|
hardcode_minus_L=yes |
|
|
hardcode_libdir_flag_spec='-L$libdir' |
|
|
hardcode_libdir_separator= |
|
|
fi |
|
|
esac |
|
|
shared_flag='-shared' |
|
|
else |
|
|
# not using gcc |
|
|
if test "$host_cpu" = ia64; then |
|
|
shared_flag='${wl}-G' |
|
|
else |
|
|
shared_flag='${wl}-bM:SRE' |
|
|
fi |
|
|
fi |
|
|
|
|
|
if test "$host_cpu" = ia64; then |
|
|
# On IA64, the linker does run time linking by default, so we don't |
|
|
# have to do anything special. |
|
|
aix_use_runtimelinking=no |
|
|
exp_sym_flag='-Bexport' |
|
|
no_entry_flag="" |
|
|
else |
|
|
# Test if we are trying to use run time linking, or normal AIX style |
|
|
# linking. If -brtl is somewhere in LDFLAGS, we need to do run time |
|
|
# linking. |
|
|
aix_use_runtimelinking=no |
|
|
for ld_flag in $LDFLAGS; do |
|
|
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then |
|
|
aix_use_runtimelinking=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
exp_sym_flag='-bexport' |
|
|
no_entry_flag='-bnoentry' |
|
|
fi |
|
|
# -bexpall does not export symbols beginning with underscore (_) |
|
|
always_export_symbols=yes |
|
|
if test "$aix_use_runtimelinking" = yes; then |
|
|
# Warning - without using the other run time loading flags (-brtl), |
|
|
# -berok will link without error, but may produce a broken |
|
|
# library. |
|
|
allow_undefined_flag=' $wl}-berok' |
|
|
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' |
|
|
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" |
|
|
else |
|
|
if test "$host_cpu" = ia64; then |
|
|
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
|
|
allow_undefined_flag="-z nodefs" |
|
|
archive_expsym_cmds="\$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" |
|
|
else |
|
|
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' |
|
|
allow_undefined_flag=' ${wl}-berok' |
|
|
# -bexpall does not export symbols beginning with underscore (_) |
|
|
always_export_symbols=yes |
|
|
# Exported symbols can be pulled into shared objects from archives |
|
|
whole_archive_flag_spec=' ' |
|
|
build_libtool_need_lc=yes |
|
|
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' |
|
|
# This is similar to how AIX traditionally builds it's shared |
|
|
# libraries. |
|
|
archive_expsym_cmds="\$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' |
|
|
fi |
|
|
fi |
|
|
;; |
|
|
|
|
|
amigaos*) |
|
|
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)' |
|
|
hardcode_libdir_flag_spec='-L$libdir' |
|
|
hardcode_minus_L=yes |
|
|
# see comment about different semantics on the GNU ld section |
|
|
ld_shlibs=no |
|
|
;; |
|
|
|
|
|
cygwin* | mingw* | pw32*) |
|
|
# When not using gcc, we currently assume that we are using |
|
|
# Microsoft Visual C++. |
|
|
# hardcode_libdir_flag_spec is actually meaningless, as there is |
|
|
# no search path for DLLs. |
|
|
hardcode_libdir_flag_spec=' ' |
|
|
allow_undefined_flag=unsupported |
|
|
# Tell ltmain to make .lib files, not .a files. |
|
|
libext=lib |
|
|
# FIXME: Setting linknames here is a bad hack. |
|
|
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
|
|
# The linker will automatically build a .lib file if we build a DLL. |
|
|
old_archive_from_new_cmds='true' |
|
|
# FIXME: Should let the user specify the lib program. |
|
|
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' |
|
|
fix_srcfile_path='`cygpath -w "$srcfile"`' |
|
|
;; |
|
|
|
|
|
dgux*) |
|
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_libdir_flag_spec='-L$libdir' |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
freebsd1*) |
|
|
ld_shlibs=no |
|
|
;; |
|
|
|
|
|
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
|
|
# support. Future versions do this automatically, but an explicit c++rt0.o |
|
|
# does not break anything, and helps significantly (at the cost of a little |
|
|
# extra space). |
|
|
freebsd2.2*) |
|
|
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
|
|
hardcode_libdir_flag_spec='-R$libdir' |
|
|
hardcode_direct=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
# Unfortunately, older versions of FreeBSD 2 do not have this feature. |
|
|
freebsd2*) |
|
|
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_direct=yes |
|
|
hardcode_minus_L=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
# FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
|
|
freebsd*) |
|
|
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
|
|
hardcode_libdir_flag_spec='-R$libdir' |
|
|
hardcode_direct=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
hpux9* | hpux10* | hpux11*) |
|
|
case $host_os in |
|
|
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' ;; |
|
|
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; |
|
|
esac |
|
|
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
|
|
hardcode_libdir_separator=: |
|
|
hardcode_direct=yes |
|
|
hardcode_minus_L=yes # Not in the search PATH, but as the default |
|
|
# location of the library. |
|
|
export_dynamic_flag_spec='${wl}-E' |
|
|
;; |
|
|
|
|
|
irix5* | irix6*) |
|
|
if test "$GCC" = yes; then |
|
|
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' |
|
|
else |
|
|
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' |
|
|
fi |
|
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|
|
hardcode_libdir_separator=: |
|
|
link_all_deplibs=yes |
|
|
;; |
|
|
|
|
|
netbsd*) |
|
|
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
|
|
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
|
|
else |
|
|
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
|
|
fi |
|
|
hardcode_libdir_flag_spec='-R$libdir' |
|
|
hardcode_direct=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
newsos6) |
|
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
|
|
hardcode_direct=yes |
|
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|
|
hardcode_libdir_separator=: |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
openbsd*) |
|
|
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_libdir_flag_spec='-R$libdir' |
|
|
hardcode_direct=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
os2*) |
|
|
hardcode_libdir_flag_spec='-L$libdir' |
|
|
hardcode_minus_L=yes |
|
|
allow_undefined_flag=unsupported |
|
|
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' |
|
|
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
|
|
;; |
|
|
|
|
|
osf3*) |
|
|
if test "$GCC" = yes; then |
|
|
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
|
|
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' |
|
|
else |
|
|
allow_undefined_flag=' -expect_unresolved \*' |
|
|
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' |
|
|
fi |
|
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|
|
hardcode_libdir_separator=: |
|
|
;; |
|
|
|
|
|
osf4* | osf5*) # as osf3* with the addition of -msym flag |
|
|
if test "$GCC" = yes; then |
|
|
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
|
|
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' |
|
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|
|
else |
|
|
allow_undefined_flag=' -expect_unresolved \*' |
|
|
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' |
|
|
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
|
|
$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' |
|
|
|
|
|
# Both c and cxx compiler support -rpath directly |
|
|
hardcode_libdir_flag_spec='-rpath $libdir' |
|
|
fi |
|
|
hardcode_libdir_separator=: |
|
|
;; |
|
|
|
|
|
sco3.2v5*) |
|
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_shlibpath_var=no |
|
|
runpath_var=LD_RUN_PATH |
|
|
hardcode_runpath_var=yes |
|
|
;; |
|
|
|
|
|
solaris*) |
|
|
no_undefined_flag=' -z defs' |
|
|
# $CC -shared without GNU ld will not create a library from C++ |
|
|
# object files and a static libstdc++, better avoid it by now |
|
|
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
|
|
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
|
|
hardcode_libdir_flag_spec='-R$libdir' |
|
|
hardcode_shlibpath_var=no |
|
|
case $host_os in |
|
|
[solaris2.[0-5] | solaris2.[0-5].*]) ;; |
|
|
*) # Supported since Solaris 2.6 (maybe 2.5.1?) |
|
|
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; |
|
|
esac |
|
|
link_all_deplibs=yes |
|
|
;; |
|
|
|
|
|
sunos4*) |
|
|
if test "x$host_vendor" = xsequent; then |
|
|
# Use $CC to link under sequent, because it throws in some extra .o |
|
|
# files that make .init and .fini sections work. |
|
|
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
|
|
else |
|
|
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
|
|
fi |
|
|
hardcode_libdir_flag_spec='-L$libdir' |
|
|
hardcode_direct=yes |
|
|
hardcode_minus_L=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
sysv4) |
|
|
if test "x$host_vendor" = xsni; then |
|
|
archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts' |
|
|
hardcode_direct=yes # is this really true??? |
|
|
else |
|
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_direct=no #Motorola manual says yes, but my tests say they lie |
|
|
fi |
|
|
runpath_var='LD_RUN_PATH' |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
sysv4.3*) |
|
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_shlibpath_var=no |
|
|
export_dynamic_flag_spec='-Bexport' |
|
|
;; |
|
|
|
|
|
sysv4*MP*) |
|
|
if test -d /usr/nec; then |
|
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_shlibpath_var=no |
|
|
runpath_var=LD_RUN_PATH |
|
|
hardcode_runpath_var=yes |
|
|
ld_shlibs=yes |
|
|
fi |
|
|
;; |
|
|
|
|
|
sysv4.2uw2*) |
|
|
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_direct=yes |
|
|
hardcode_minus_L=no |
|
|
hardcode_shlibpath_var=no |
|
|
hardcode_runpath_var=yes |
|
|
runpath_var=LD_RUN_PATH |
|
|
;; |
|
|
|
|
|
sysv5uw7* | unixware7*) |
|
|
no_undefined_flag='${wl}-z ${wl}text' |
|
|
if test "$GCC" = yes; then |
|
|
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
|
|
else |
|
|
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
|
|
fi |
|
|
runpath_var='LD_RUN_PATH' |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
sysv5*) |
|
|
no_undefined_flag=' -z text' |
|
|
# $CC -shared without GNU ld will not create a library from C++ |
|
|
# object files and a static libstdc++, better avoid it by now |
|
|
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
|
|
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
|
|
hardcode_libdir_flag_spec= |
|
|
hardcode_shlibpath_var=no |
|
|
runpath_var='LD_RUN_PATH' |
|
|
;; |
|
|
|
|
|
uts4*) |
|
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_libdir_flag_spec='-L$libdir' |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
*) |
|
|
ld_shlibs=no |
|
|
;; |
|
|
esac |
|
|
fi |
|
|
AC_MSG_RESULT([$ld_shlibs]) |
|
|
test "$ld_shlibs" = no && can_build_shared=no |
|
|
|
|
|
variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
|
|
if test "$GCC" = yes; then |
|
|
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
|
|
fi |
|
|
])# AC_LIBTOOL_PROG_LD_SHLIBS |
|
|
|
|
|
|
|
837 |
# AC_LIBTOOL_OBJDIR |
# AC_LIBTOOL_OBJDIR |
838 |
# ----------------- |
# ----------------- |
839 |
AC_DEFUN([AC_LIBTOOL_OBJDIR], |
AC_DEFUN([AC_LIBTOOL_OBJDIR], |
851 |
])# AC_LIBTOOL_OBJDIR |
])# AC_LIBTOOL_OBJDIR |
852 |
|
|
853 |
|
|
854 |
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH |
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) |
855 |
# ----------------------------------- |
# ---------------------------------------------- |
856 |
# Check hardcoding attributes. |
# Check hardcoding attributes. |
857 |
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], |
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], |
858 |
[AC_MSG_CHECKING([how to hardcode library paths into programs]) |
[AC_MSG_CHECKING([how to hardcode library paths into programs]) |
859 |
hardcode_action= |
_LT_AC_TAGVAR(hardcode_action, $1)= |
860 |
if test -n "$hardcode_libdir_flag_spec" || \ |
if test -n "$hardcode_libdir_flag_spec" || \ |
861 |
test -n "$runpath_var"; then |
test -n "$runpath_var"; then |
862 |
|
|
863 |
# We can hardcode non-existant directories. |
# We can hardcode non-existant directories. |
864 |
if test "$hardcode_direct" != no && |
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && |
865 |
# If the only mechanism to avoid hardcoding is shlibpath_var, we |
# If the only mechanism to avoid hardcoding is shlibpath_var, we |
866 |
# have to relink, otherwise we might link with an installed library |
# have to relink, otherwise we might link with an installed library |
867 |
# when we should be linking with a yet-to-be-installed one |
# when we should be linking with a yet-to-be-installed one |
868 |
## test "$hardcode_shlibpath_var" != no && |
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && |
869 |
test "$hardcode_minus_L" != no; then |
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then |
870 |
# Linking always hardcodes the temporary library directory. |
# Linking always hardcodes the temporary library directory. |
871 |
hardcode_action=relink |
_LT_AC_TAGVAR(hardcode_action, $1)=relink |
872 |
else |
else |
873 |
# We can link without hardcoding, and we can hardcode nonexisting dirs. |
# We can link without hardcoding, and we can hardcode nonexisting dirs. |
874 |
hardcode_action=immediate |
_LT_AC_TAGVAR(hardcode_action, $1)=immediate |
875 |
fi |
fi |
876 |
else |
else |
877 |
# We cannot hardcode anything, or else we can only hardcode existing |
# We cannot hardcode anything, or else we can only hardcode existing |
878 |
# directories. |
# directories. |
879 |
hardcode_action=unsupported |
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported |
880 |
fi |
fi |
881 |
AC_MSG_RESULT([$hardcode_action]) |
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) |
882 |
|
|
883 |
if test "$hardcode_action" = relink; then |
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then |
884 |
# Fast installation is not supported |
# Fast installation is not supported |
885 |
enable_fast_install=no |
enable_fast_install=no |
886 |
elif test "$shlibpath_overrides_runpath" = yes || |
elif test "$shlibpath_overrides_runpath" = yes || |
925 |
dynamic_linker="$host_os ld.so" |
dynamic_linker="$host_os ld.so" |
926 |
sys_lib_dlsearch_path_spec="/lib /usr/lib" |
sys_lib_dlsearch_path_spec="/lib /usr/lib" |
927 |
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
928 |
|
need_lib_prefix=unknown |
929 |
|
hardcode_into_libs=no |
930 |
|
|
931 |
|
# when you set need_version to no, make sure it does not cause -set_version |
932 |
|
# flags to be left without arguments |
933 |
|
need_version=unknown |
934 |
|
|
935 |
case $host_os in |
case $host_os in |
936 |
aix3*) |
aix3*) |
1004 |
shlibpath_var=LD_LIBRARY_PATH |
shlibpath_var=LD_LIBRARY_PATH |
1005 |
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
1006 |
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
|
export_dynamic_flag_spec=-rdynamic |
|
1007 |
# the default ld.so.conf also contains /usr/contrib/lib and |
# the default ld.so.conf also contains /usr/contrib/lib and |
1008 |
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
1009 |
# libtool to hard-code these into programs |
# libtool to hard-code these into programs |
1075 |
freebsd-elf*) |
freebsd-elf*) |
1076 |
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
1077 |
need_version=no |
need_version=no |
|
need_lc=no |
|
1078 |
need_lib_prefix=no |
need_lib_prefix=no |
1079 |
;; |
;; |
1080 |
freebsd-*) |
freebsd-*) |
1306 |
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER |
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER |
1307 |
|
|
1308 |
|
|
|
# AC_LIBTOOL_PROG_ARCHIVE_CMDS_NEED_LC |
|
|
# ------------------------------------ |
|
|
AC_DEFUN([AC_LIBTOOL_PROG_ARCHIVE_CMDS_NEED_LC], |
|
|
[if test "$enable_shared" = yes && test "$GCC" = yes; then |
|
|
case $archive_cmds in |
|
|
*'~'*) |
|
|
# FIXME: we may have to deal with multi-command sequences. |
|
|
;; |
|
|
'$CC '*) |
|
|
# Test whether the compiler implicitly links with -lc since on some |
|
|
# systems, -lgcc has to come before -lc. If gcc already passes -lc |
|
|
# to ld, don't add -lc before -lgcc. |
|
|
AC_CACHE_CHECK([whether -lc should be explicitly linked in], |
|
|
[lt_cv_archive_cmds_need_lc], |
|
|
[$rm conftest* |
|
|
echo 'static int dummy;' > conftest.$ac_ext |
|
|
|
|
|
if AC_TRY_EVAL(ac_compile); then |
|
|
soname=conftest |
|
|
lib=conftest |
|
|
libobjs=conftest.$ac_objext |
|
|
deplibs= |
|
|
wl=$lt_cv_prog_cc_wl |
|
|
compiler_flags=-v |
|
|
linker_flags=-v |
|
|
verstring= |
|
|
output_objdir=. |
|
|
libname=conftest |
|
|
save_allow_undefined_flag=$allow_undefined_flag |
|
|
allow_undefined_flag= |
|
|
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
|
|
then |
|
|
lt_cv_archive_cmds_need_lc=no |
|
|
else |
|
|
lt_cv_archive_cmds_need_lc=yes |
|
|
fi |
|
|
allow_undefined_flag=$save_allow_undefined_flag |
|
|
else |
|
|
cat conftest.err 1>&5 |
|
|
fi]) |
|
|
;; |
|
|
esac |
|
|
fi |
|
|
need_lc=${lt_cv_archive_cmds_need_lc-yes} |
|
|
])# AC_LIBTOOL_PROG_ARCHIVE_CMDS_NEED_LC |
|
|
|
|
|
|
|
|
# AC_LIBTOOL_CONFIG([APPEND?]) |
|
|
# ---------------------------- |
|
|
# If `APPEND?' is empty, create an initial libtool script |
|
|
# otherwise append a configuration tag name $tagname |
|
|
AC_DEFUN([AC_LIBTOOL_CONFIG], |
|
|
[# The else clause should only fire when bootstrapping the |
|
|
# libtool distribution, otherwise you forgot to ship ltmain.sh |
|
|
# with your package, and you will get complaints that there are |
|
|
# no rules to generate ltmain.sh. |
|
|
if test -f "$ltmain"; then |
|
|
# Now quote all the things that may contain metacharacters while being |
|
|
# careful not to overquote the AC_SUBSTed values. We take copies of the |
|
|
# variables and quote the copies for generation of the libtool script. |
|
|
for var in echo old_CC old_CFLAGS \ |
|
|
AR AR_FLAGS CC LD LN_S NM SHELL \ |
|
|
reload_flag reload_cmds wl \ |
|
|
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ |
|
|
thread_safe_flag_spec whole_archive_flag_spec libname_spec \ |
|
|
library_names_spec soname_spec \ |
|
|
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ |
|
|
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ |
|
|
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ |
|
|
old_striplib striplib file_magic_cmd export_symbols_cmds \ |
|
|
deplibs_check_method allow_undefined_flag no_undefined_flag \ |
|
|
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ |
|
|
hardcode_libdir_flag_spec hardcode_libdir_separator \ |
|
|
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
|
|
compiler_c_o need_locks exclude_expsyms include_expsyms; do |
|
|
|
|
|
case $var in |
|
|
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ |
|
|
old_postinstall_cmds | old_postuninstall_cmds | \ |
|
|
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ |
|
|
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ |
|
|
postinstall_cmds | postuninstall_cmds | \ |
|
|
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
|
|
# Double-quote double-evaled strings. |
|
|
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
|
|
;; |
|
|
*) |
|
|
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
|
|
;; |
|
|
esac |
|
|
done |
|
|
|
|
|
case $lt_echo in |
|
|
*'\[$]0 --fallback-echo"') |
|
|
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` |
|
|
;; |
|
|
esac |
|
|
|
|
|
ifelse([$1], [], |
|
|
[cfgfile="${ofile}T" |
|
|
trap "$rm \"$cfgfile\"; exit 1" 1 2 15 |
|
|
$rm -f "$cfgfile" |
|
|
echo creating $ofile], |
|
|
[cfgfile="$ofile"]) |
|
|
|
|
|
cat <<__EOF__ >> "$cfgfile" |
|
|
ifelse([$1], [], |
|
|
[#! $SHELL |
|
|
|
|
|
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
|
|
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
|
|
# NOTE: Changes made to this file will be lost: look at ltmain.sh. |
|
|
# |
|
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 |
|
|
# Free Software Foundation, Inc. |
|
|
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
|
|
# |
|
|
# This program is free software; you can redistribute it and/or modify |
|
|
# it under the terms of the GNU General Public License as published by |
|
|
# the Free Software Foundation; either version 2 of the License, or |
|
|
# (at your option) any later version. |
|
|
# |
|
|
# This program is distributed in the hope that it will be useful, but |
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
|
# General Public License for more details. |
|
|
# |
|
|
# You should have received a copy of the GNU General Public License |
|
|
# along with this program; if not, write to the Free Software |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
|
# |
|
|
# As a special exception to the GNU General Public License, if you |
|
|
# distribute this file as part of a program that contains a |
|
|
# configuration script generated by Autoconf, you may include it under |
|
|
# the same distribution terms that you use for the rest of that program. |
|
|
|
|
|
# Sed that helps us avoid accidentally triggering echo(1) options like -n. |
|
|
Xsed="sed -e s/^X//" |
|
|
|
|
|
# The HP-UX ksh and POSIX shell print the target directory to stdout |
|
|
# if CDPATH is set. |
|
|
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
|
|
|
|
|
# The names of the tagged configurations supported by this script. |
|
|
available_tags= |
|
|
|
|
|
# ### BEGIN LIBTOOL CONFIG], |
|
|
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) |
|
|
|
|
|
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
|
|
|
|
|
# Shell to use when invoking shell scripts. |
|
|
SHELL=$lt_SHELL |
|
|
|
|
|
# Whether or not to build shared libraries. |
|
|
build_libtool_libs=$enable_shared |
|
|
|
|
|
# Whether or not to add -lc for building shared libraries. |
|
|
build_libtool_need_lc=$need_lc |
|
|
|
|
|
# Whether or not to build static libraries. |
|
|
build_old_libs=$enable_static |
|
|
|
|
|
# Whether or not to optimize for fast installation. |
|
|
fast_install=$enable_fast_install |
|
|
|
|
|
# The host system. |
|
|
host_alias=$host_alias |
|
|
host=$host |
|
|
|
|
|
# An echo program that does not interpret backslashes. |
|
|
echo=$lt_echo |
|
|
|
|
|
# The archiver. |
|
|
AR=$lt_AR |
|
|
AR_FLAGS=$lt_AR_FLAGS |
|
|
|
|
|
# A C compiler. |
|
|
LTCC=$LTCC |
|
|
|
|
|
# A language-specific compiler. |
|
|
CC=$lt_CC |
|
|
|
|
|
# Is the compiler the GNU C compiler? |
|
|
with_gcc=$GCC |
|
|
|
|
|
# The linker used to build libraries. |
|
|
LD=$lt_LD |
|
|
|
|
|
# Whether we need hard or soft links. |
|
|
LN_S=$lt_LN_S |
|
|
|
|
|
# A BSD-compatible nm program. |
|
|
NM=$lt_NM |
|
|
|
|
|
# A symbol stripping program |
|
|
STRIP=$STRIP |
|
|
|
|
|
# Used to examine libraries when file_magic_cmd begins "file" |
|
|
MAGIC_CMD=$MAGIC_CMD |
|
|
|
|
|
# Used on cygwin: DLL creation program. |
|
|
DLLTOOL="$DLLTOOL" |
|
|
|
|
|
# Used on cygwin: object dumper. |
|
|
OBJDUMP="$OBJDUMP" |
|
|
|
|
|
# Used on cygwin: assembler. |
|
|
AS="$AS" |
|
|
|
|
|
# The name of the directory that contains temporary libtool files. |
|
|
objdir=$objdir |
|
|
|
|
|
# How to create reloadable object files. |
|
|
reload_flag=$lt_reload_flag |
|
|
reload_cmds=$lt_reload_cmds |
|
|
|
|
|
# How to pass a linker flag through the compiler. |
|
|
wl=$lt_wl |
|
|
|
|
|
# Object file suffix (normally "o"). |
|
|
objext="$ac_objext" |
|
|
|
|
|
# Old archive suffix (normally "a"). |
|
|
libext="$libext" |
|
|
|
|
|
# Executable file suffix (normally ""). |
|
|
exeext="$exeext" |
|
|
|
|
|
# Additional compiler flags for building library objects. |
|
|
pic_flag=$lt_pic_flag |
|
|
pic_mode=$pic_mode |
|
|
|
|
|
# What is the maximum length of a command? |
|
|
max_cmd_len=$max_cmd_len |
|
|
|
|
|
# Does compiler simultaneously support -c and -o options? |
|
|
compiler_c_o=$lt_compiler_c_o |
|
|
|
|
|
# Must we lock files when doing compilation ? |
|
|
need_locks=$lt_need_locks |
|
|
|
|
|
# Do we need the lib prefix for modules? |
|
|
need_lib_prefix=$need_lib_prefix |
|
|
|
|
|
# Do we need a version for libraries? |
|
|
need_version=$need_version |
|
|
|
|
|
# Whether dlopen is supported. |
|
|
dlopen_support=$enable_dlopen |
|
|
|
|
|
# Whether dlopen of programs is supported. |
|
|
dlopen_self=$enable_dlopen_self |
|
|
|
|
|
# Whether dlopen of statically linked programs is supported. |
|
|
dlopen_self_static=$enable_dlopen_self_static |
|
|
|
|
|
# Compiler flag to prevent dynamic linking. |
|
|
link_static_flag=$lt_link_static_flag |
|
|
|
|
|
# Compiler flag to turn off builtin functions. |
|
|
no_builtin_flag=$lt_no_builtin_flag |
|
|
|
|
|
# Compiler flag to allow reflexive dlopens. |
|
|
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec |
|
|
|
|
|
# Compiler flag to generate shared objects directly from archives. |
|
|
whole_archive_flag_spec=$lt_whole_archive_flag_spec |
|
|
|
|
|
# Compiler flag to generate thread-safe objects. |
|
|
thread_safe_flag_spec=$lt_thread_safe_flag_spec |
|
|
|
|
|
# Library versioning type. |
|
|
version_type=$version_type |
|
|
|
|
|
# Format of library name prefix. |
|
|
libname_spec=$lt_libname_spec |
|
|
|
|
|
# List of archive names. First name is the real one, the rest are links. |
|
|
# The last name is the one that the linker finds with -lNAME. |
|
|
library_names_spec=$lt_library_names_spec |
|
|
|
|
|
# The coded name of the library, if different from the real name. |
|
|
soname_spec=$lt_soname_spec |
|
|
|
|
|
# Commands used to build and install an old-style archive. |
|
|
RANLIB=$lt_RANLIB |
|
|
old_archive_cmds=$lt_old_archive_cmds |
|
|
old_postinstall_cmds=$lt_old_postinstall_cmds |
|
|
old_postuninstall_cmds=$lt_old_postuninstall_cmds |
|
|
|
|
|
# Create an old-style archive from a shared archive. |
|
|
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds |
|
|
|
|
|
# Create a temporary old-style archive to link instead of a shared archive. |
|
|
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds |
|
|
|
|
|
# Commands used to build and install a shared archive. |
|
|
archive_cmds=$lt_archive_cmds |
|
|
archive_expsym_cmds=$lt_archive_expsym_cmds |
|
|
postinstall_cmds=$lt_postinstall_cmds |
|
|
postuninstall_cmds=$lt_postuninstall_cmds |
|
|
|
|
|
# Commands to strip libraries. |
|
|
old_striplib=$lt_old_striplib |
|
|
striplib=$lt_striplib |
|
|
|
|
|
# Dependencies to place before the objects being linked to create a |
|
|
# shared library. |
|
|
predep_objects=$predep_objects |
|
|
|
|
|
# Dependencies to place after the objects being linked to create a |
|
|
# shared library. |
|
|
postdep_objects=$postdep_objects |
|
|
|
|
|
# Dependencies to place before the objects being linked to create a |
|
|
# shared library. |
|
|
predeps=$predeps |
|
|
|
|
|
# Dependencies to place after the objects being linked to create a |
|
|
# shared library. |
|
|
postdeps=$postdeps |
|
|
|
|
|
# The library search path used internally by the compiler when linking |
|
|
# a shared library. |
|
|
compiler_lib_search_path=$compiler_lib_search_path |
|
|
|
|
|
# Method to check whether dependent libraries are shared objects. |
|
|
deplibs_check_method=$lt_deplibs_check_method |
|
|
|
|
|
# Command to use when deplibs_check_method == file_magic. |
|
|
file_magic_cmd=$lt_file_magic_cmd |
|
|
|
|
|
# Flag that allows shared libraries with undefined symbols to be built. |
|
|
allow_undefined_flag=$lt_allow_undefined_flag |
|
|
|
|
|
# Flag that forces no undefined symbols. |
|
|
no_undefined_flag=$lt_no_undefined_flag |
|
|
|
|
|
# Commands used to finish a libtool library installation in a directory. |
|
|
finish_cmds=$lt_finish_cmds |
|
|
|
|
|
# Same as above, but a single script fragment to be evaled but not shown. |
|
|
finish_eval=$lt_finish_eval |
|
|
|
|
|
# Take the output of nm and produce a listing of raw symbols and C names. |
|
|
global_symbol_pipe=$lt_global_symbol_pipe |
|
|
|
|
|
# Transform the output of nm in a proper C declaration |
|
|
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl |
|
|
|
|
|
# This is the shared library runtime path variable. |
|
|
runpath_var=$runpath_var |
|
|
|
|
|
# This is the shared library path variable. |
|
|
shlibpath_var=$shlibpath_var |
|
|
|
|
|
# Is shlibpath searched before the hard-coded library search path? |
|
|
shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
|
|
|
|
|
# How to hardcode a shared library path into an executable. |
|
|
hardcode_action=$hardcode_action |
|
|
|
|
|
# Whether we should hardcode library paths into libraries. |
|
|
hardcode_into_libs=$hardcode_into_libs |
|
|
|
|
|
# Flag to hardcode \$libdir into a binary during linking. |
|
|
# This must work even if \$libdir does not exist. |
|
|
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec |
|
|
|
|
|
# Whether we need a single -rpath flag with a separated argument. |
|
|
hardcode_libdir_separator=$lt_hardcode_libdir_separator |
|
|
|
|
|
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
|
|
# resulting binary. |
|
|
hardcode_direct=$hardcode_direct |
|
|
|
|
|
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
|
|
# resulting binary. |
|
|
hardcode_minus_L=$hardcode_minus_L |
|
|
|
|
|
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
|
|
# the resulting binary. |
|
|
hardcode_shlibpath_var=$hardcode_shlibpath_var |
|
|
|
|
|
# Variables whose values should be saved in libtool wrapper scripts and |
|
|
# restored at relink time. |
|
|
variables_saved_for_relink="$variables_saved_for_relink" |
|
|
|
|
|
# Whether libtool must link a program against all its dependency libraries. |
|
|
link_all_deplibs=$link_all_deplibs |
|
|
|
|
|
# Compile-time system search path for libraries |
|
|
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
|
|
|
|
|
# Run-time system search path for libraries |
|
|
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
|
|
|
|
|
# Fix the shell variable \$srcfile for the compiler. |
|
|
fix_srcfile_path="$fix_srcfile_path" |
|
|
|
|
|
# Set to yes if exported symbols are required. |
|
|
always_export_symbols=$always_export_symbols |
|
|
|
|
|
# The commands to list exported symbols. |
|
|
export_symbols_cmds=$lt_export_symbols_cmds |
|
|
|
|
|
# The commands to extract the exported symbol list from a shared archive. |
|
|
extract_expsyms_cmds=$lt_extract_expsyms_cmds |
|
|
|
|
|
# Symbols that should not be listed in the preloaded symbols. |
|
|
exclude_expsyms=$lt_exclude_expsyms |
|
|
|
|
|
# Symbols that must always be exported. |
|
|
include_expsyms=$lt_include_expsyms |
|
|
|
|
|
ifelse([$1],[], |
|
|
[# ### END LIBTOOL CONFIG], |
|
|
[# ### END LIBTOOL TAG CONFIG: $tagname]) |
|
|
|
|
|
__EOF__ |
|
|
|
|
|
ifelse([$1],[], [ |
|
|
case $host_os in |
|
|
aix3*) |
|
|
cat <<\EOF >> "$cfgfile" |
|
|
|
|
|
# AIX sometimes has problems with the GCC collect2 program. For some |
|
|
# reason, if we set the COLLECT_NAMES environment variable, the problems |
|
|
# vanish in a puff of smoke. |
|
|
if test "X${COLLECT_NAMES+set}" != Xset; then |
|
|
COLLECT_NAMES= |
|
|
export COLLECT_NAMES |
|
|
fi |
|
|
EOF |
|
|
;; |
|
|
|
|
|
cygwin* | mingw* | pw32* | os2*) |
|
|
cat <<'EOF' >> "$cfgfile" |
|
|
# This is a source program that is used to create dlls on Windows |
|
|
# Don't remove nor modify the starting and closing comments |
|
|
# /* ltdll.c starts here */ |
|
|
# #define WIN32_LEAN_AND_MEAN |
|
|
# #include <windows.h> |
|
|
# #undef WIN32_LEAN_AND_MEAN |
|
|
# #include <stdio.h> |
|
|
# |
|
|
# #ifndef __CYGWIN__ |
|
|
# # ifdef __CYGWIN32__ |
|
|
# # define __CYGWIN__ __CYGWIN32__ |
|
|
# # endif |
|
|
# #endif |
|
|
# |
|
|
# #ifdef __cplusplus |
|
|
# extern "C" { |
|
|
# #endif |
|
|
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
|
|
# #ifdef __cplusplus |
|
|
# } |
|
|
# #endif |
|
|
# |
|
|
# #ifdef __CYGWIN__ |
|
|
# #include <cygwin/cygwin_dll.h> |
|
|
# DECLARE_CYGWIN_DLL( DllMain ); |
|
|
# #endif |
|
|
# HINSTANCE __hDllInstance_base; |
|
|
# |
|
|
# BOOL APIENTRY |
|
|
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
|
|
# { |
|
|
# __hDllInstance_base = hInst; |
|
|
# return TRUE; |
|
|
# } |
|
|
# /* ltdll.c ends here */ |
|
|
# This is a source program that is used to create import libraries |
|
|
# on Windows for dlls which lack them. Don't remove nor modify the |
|
|
# starting and closing comments |
|
|
# /* impgen.c starts here */ |
|
|
# /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. |
|
|
# |
|
|
# This file is part of GNU libtool. |
|
|
# |
|
|
# This program is free software; you can redistribute it and/or modify |
|
|
# it under the terms of the GNU General Public License as published by |
|
|
# the Free Software Foundation; either version 2 of the License, or |
|
|
# (at your option) any later version. |
|
|
# |
|
|
# This program is distributed in the hope that it will be useful, |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
# GNU General Public License for more details. |
|
|
# |
|
|
# You should have received a copy of the GNU General Public License |
|
|
# along with this program; if not, write to the Free Software |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
|
# */ |
|
|
# |
|
|
# #include <stdio.h> /* for printf() */ |
|
|
# #include <unistd.h> /* for open(), lseek(), read() */ |
|
|
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */ |
|
|
# #include <string.h> /* for strdup() */ |
|
|
# |
|
|
# /* O_BINARY isn't required (or even defined sometimes) under Unix */ |
|
|
# #ifndef O_BINARY |
|
|
# #define O_BINARY 0 |
|
|
# #endif |
|
|
# |
|
|
# static unsigned int |
|
|
# pe_get16 (fd, offset) |
|
|
# int fd; |
|
|
# int offset; |
|
|
# { |
|
|
# unsigned char b[2]; |
|
|
# lseek (fd, offset, SEEK_SET); |
|
|
# read (fd, b, 2); |
|
|
# return b[0] + (b[1]<<8); |
|
|
# } |
|
|
# |
|
|
# static unsigned int |
|
|
# pe_get32 (fd, offset) |
|
|
# int fd; |
|
|
# int offset; |
|
|
# { |
|
|
# unsigned char b[4]; |
|
|
# lseek (fd, offset, SEEK_SET); |
|
|
# read (fd, b, 4); |
|
|
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
|
|
# } |
|
|
# |
|
|
# static unsigned int |
|
|
# pe_as32 (ptr) |
|
|
# void *ptr; |
|
|
# { |
|
|
# unsigned char *b = ptr; |
|
|
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
|
|
# } |
|
|
# |
|
|
# int |
|
|
# main (argc, argv) |
|
|
# int argc; |
|
|
# char *argv[]; |
|
|
# { |
|
|
# int dll; |
|
|
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; |
|
|
# unsigned long export_rva, export_size, nsections, secptr, expptr; |
|
|
# unsigned long name_rvas, nexp; |
|
|
# unsigned char *expdata, *erva; |
|
|
# char *filename, *dll_name; |
|
|
# |
|
|
# filename = argv[1]; |
|
|
# |
|
|
# dll = open(filename, O_RDONLY|O_BINARY); |
|
|
# if (dll < 1) |
|
|
# return 1; |
|
|
# |
|
|
# dll_name = filename; |
|
|
# |
|
|
# for (i=0; filename[i]; i++) |
|
|
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') |
|
|
# dll_name = filename + i +1; |
|
|
# |
|
|
# pe_header_offset = pe_get32 (dll, 0x3c); |
|
|
# opthdr_ofs = pe_header_offset + 4 + 20; |
|
|
# num_entries = pe_get32 (dll, opthdr_ofs + 92); |
|
|
# |
|
|
# if (num_entries < 1) /* no exports */ |
|
|
# return 1; |
|
|
# |
|
|
# export_rva = pe_get32 (dll, opthdr_ofs + 96); |
|
|
# export_size = pe_get32 (dll, opthdr_ofs + 100); |
|
|
# nsections = pe_get16 (dll, pe_header_offset + 4 +2); |
|
|
# secptr = (pe_header_offset + 4 + 20 + |
|
|
# pe_get16 (dll, pe_header_offset + 4 + 16)); |
|
|
# |
|
|
# expptr = 0; |
|
|
# for (i = 0; i < nsections; i++) |
|
|
# { |
|
|
# char sname[8]; |
|
|
# unsigned long secptr1 = secptr + 40 * i; |
|
|
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); |
|
|
# unsigned long vsize = pe_get32 (dll, secptr1 + 16); |
|
|
# unsigned long fptr = pe_get32 (dll, secptr1 + 20); |
|
|
# lseek(dll, secptr1, SEEK_SET); |
|
|
# read(dll, sname, 8); |
|
|
# if (vaddr <= export_rva && vaddr+vsize > export_rva) |
|
|
# { |
|
|
# expptr = fptr + (export_rva - vaddr); |
|
|
# if (export_rva + export_size > vaddr + vsize) |
|
|
# export_size = vsize - (export_rva - vaddr); |
|
|
# break; |
|
|
# } |
|
|
# } |
|
|
# |
|
|
# expdata = (unsigned char*)malloc(export_size); |
|
|
# lseek (dll, expptr, SEEK_SET); |
|
|
# read (dll, expdata, export_size); |
|
|
# erva = expdata - export_rva; |
|
|
# |
|
|
# nexp = pe_as32 (expdata+24); |
|
|
# name_rvas = pe_as32 (expdata+32); |
|
|
# |
|
|
# printf ("EXPORTS\n"); |
|
|
# for (i = 0; i<nexp; i++) |
|
|
# { |
|
|
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); |
|
|
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); |
|
|
# } |
|
|
# |
|
|
# return 0; |
|
|
# } |
|
|
# /* impgen.c ends here */ |
|
|
|
|
|
EOF |
|
|
;; |
|
|
esac |
|
|
|
|
|
# We use sed instead of cat because bash on DJGPP gets confused if |
|
|
# if finds mixed CR/LF and LF-only lines. Since sed operates in |
|
|
# text mode, it properly converts lines to CR/LF. This bash problem |
|
|
# is reportedly fixed, but why not run on old versions too? |
|
|
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) |
|
|
|
|
|
mv -f "$cfgfile" "$ofile" || \ |
|
|
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") |
|
|
chmod +x "$ofile" |
|
|
]) |
|
|
else |
|
|
# If there is no Makefile yet, we rely on a make rule to execute |
|
|
# `config.status --recheck' to rerun these tests and create the |
|
|
# libtool script then. |
|
|
test -f Makefile && make "$ltmain" |
|
|
fi |
|
|
])# AC_LIBTOOL_CONFIG |
|
|
|
|
1309 |
# _LT_AC_TAGCONFIG |
# _LT_AC_TAGCONFIG |
1310 |
# ---------------- |
# ---------------- |
1311 |
AC_DEFUN([_LT_AC_TAGCONFIG], |
AC_DEFUN([_LT_AC_TAGCONFIG], |
1314 |
[tagnames="$withval"], |
[tagnames="$withval"], |
1315 |
[tagnames="CXX,GCJ"]) |
[tagnames="CXX,GCJ"]) |
1316 |
|
|
|
## Dependencies to place before and after the object being linked: |
|
|
predep_objects= |
|
|
postdep_objects= |
|
|
predeps= |
|
|
postdeps= |
|
|
compiler_lib_search_path= |
|
|
|
|
1317 |
if test -f "$ltmain" && test -n "$tagnames"; then |
if test -f "$ltmain" && test -n "$tagnames"; then |
1318 |
if test ! -f "${ofile}"; then |
if test ! -f "${ofile}"; then |
1319 |
AC_MSG_WARN([output file \`$ofile' does not exist]) |
AC_MSG_WARN([output file \`$ofile' does not exist]) |
1332 |
# Note that this assumes the entire list is on one line. |
# Note that this assumes the entire list is on one line. |
1333 |
available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` |
available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` |
1334 |
|
|
1335 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}:," |
1336 |
for tagname in $tagnames; do |
for tagname in $tagnames; do |
1337 |
# Check whether tagname contains only valid characters |
# Check whether tagname contains only valid characters |
1338 |
[case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in] |
[case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in] |
1351 |
echo appending configuration tag \"$tagname\" to $ofile |
echo appending configuration tag \"$tagname\" to $ofile |
1352 |
|
|
1353 |
case $tagname in |
case $tagname in |
1354 |
CXX) CC=c++ ;; |
CXX) |
1355 |
GCJ) CC=gcj ;; |
AC_LIBTOOL_LANG_CXX_CONFIG |
1356 |
*) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; |
;; |
1357 |
|
|
1358 |
|
GCJ) |
1359 |
|
AC_LIBTOOL_LANG_GCJ_CONFIG |
1360 |
|
;; |
1361 |
|
|
1362 |
|
*) |
1363 |
|
AC_MSG_ERROR([Unsupported tag name: $tagname]) |
1364 |
|
;; |
1365 |
esac |
esac |
|
_LT_AC_LTCONFIG_HACK |
|
|
AC_LIBTOOL_CONFIG([tag-append]) |
|
1366 |
|
|
1367 |
# Append the new tag name to the list of available tags. |
# Append the new tag name to the list of available tags. |
1368 |
available_tags="$available_tags $tagname" |
available_tags="$available_tags $tagname" |
1381 |
])# _LT_AC_TAGCONFIG |
])# _LT_AC_TAGCONFIG |
1382 |
|
|
1383 |
|
|
1384 |
# _LT_AC_LANG_C_CONFIG |
# _LT_AC_LTCONFIG_HACK([TAGNAME]) |
1385 |
# -------------------- |
# ------------------------------- |
1386 |
AC_DEFUN([_LT_AC_LANG_C_CONFIG], |
# If TAGNAME is not passed, then create an initial libtool configuration |
1387 |
[# Source file extension for C test sources. |
# for the default language. Otherwise make the configuration named by |
1388 |
ac_ext=c |
# TAGNAME. |
|
|
|
|
# Object file extension for compiled C test sources. |
|
|
objext=o |
|
|
|
|
|
# Code to be used in simple compile tests |
|
|
lt_simple_compile_test_code="int some_variable = 0;" |
|
|
|
|
|
# Code to be used in simple link tests |
|
|
lt_simple_link_test_code='main(){return(0);}' |
|
|
|
|
|
AC_LIBTOOL_PROG_CC_PIC |
|
|
AC_LIBTOOL_PROG_LD_SHLIBS |
|
|
AC_LIBTOOL_PROG_ARCHIVE_CMDS_NEED_LC |
|
|
])# _LT_AC_LANG_C_CONFIG |
|
|
|
|
|
|
|
|
# _LT_AC_LANG_CXX_CONFIG |
|
|
# ---------------------- |
|
|
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], |
|
|
[AC_REQUIRE([AC_PROG_CXX]) |
|
|
AC_REQUIRE([AC_PROG_CXXCPP]) |
|
|
|
|
|
# Source file extension for C++ test sources. |
|
|
ac_ext=cc |
|
|
|
|
|
# Object file extension for compiled C++ test sources. |
|
|
objext=o |
|
|
|
|
|
# Code to be used in simple compile tests |
|
|
lt_simple_compile_test_code="int some_variable = 0;" |
|
|
|
|
|
# Code to be used in simple link tests |
|
|
lt_simple_link_test_code='int main(int char *[]) { return(0); }' |
|
|
|
|
|
lt_save_CC="$CC" |
|
|
lt_save_CFLAGS="$CFLAGS" |
|
|
LTCC="$CC" |
|
|
CC="$CXX" |
|
|
CFLAGS="$CXXFLAGS" |
|
|
|
|
|
AC_LIBTOOL_PROG_LD_SHLIBS |
|
|
AC_LIBTOOL_PROG_CC_PIC |
|
|
AC_LIBTOOL_PROG_ARCHIVE_CMDS_NEED_LC |
|
|
|
|
|
CC="$lt_save_CC" |
|
|
CFLAGS="$lt_save_CFLAGS" |
|
|
])# _LT_AC_LANG_CXX_CONFIG |
|
|
|
|
|
|
|
|
# _LT_AC_LTCONFIG_HACK |
|
|
# -------------------- |
|
1389 |
AC_DEFUN([_LT_AC_LTCONFIG_HACK], |
AC_DEFUN([_LT_AC_LTCONFIG_HACK], |
1390 |
[ |
[ |
1391 |
## CAVEAT EMPTOR: |
## CAVEAT EMPTOR: |
1392 |
## There is no encapsulation within the following macros, do not change |
## There is no encapsulation within the following macros, do not change |
1393 |
## the running order or otherwise move them around unless you know exactly |
## the running order or otherwise move them around unless you know exactly |
1394 |
## what you are doing... |
## what you are doing... |
|
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
|
|
AC_LIBTOOL_PROG_CC_PIC_WORKS |
|
|
AC_LIBTOOL_PROG_CC_STATIC_WORKS |
|
|
AC_LIBTOOL_SYS_MAX_CMD_LEN |
|
|
AC_LIBTOOL_PROG_CC_NO_RTTI |
|
|
AC_LIBTOOL_PROG_CC_C_O |
|
|
AC_LIBTOOL_SYS_HARD_LINK_LOCKS |
|
|
AC_LIBTOOL_OBJDIR |
|
|
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH |
|
|
AC_LIBTOOL_SYS_LIB_STRIP |
|
|
AC_LIBTOOL_SYS_DYNAMIC_LINKER |
|
|
AC_LIBTOOL_DLOPEN_SELF |
|
|
|
|
|
# Report the final consequences. |
|
|
AC_MSG_CHECKING([if libtool supports shared libraries]) |
|
|
AC_MSG_RESULT([$can_build_shared]) |
|
1395 |
])# _LT_AC_LTCONFIG_HACK |
])# _LT_AC_LTCONFIG_HACK |
1396 |
|
|
1397 |
|
|
1428 |
*) |
*) |
1429 |
enable_shared=no |
enable_shared=no |
1430 |
# Look at the argument we got. We use all the common list separators. |
# Look at the argument we got. We use all the common list separators. |
1431 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}:," |
1432 |
for pkg in $enableval; do |
for pkg in $enableval; do |
1433 |
if test "X$pkg" = "X$p"; then |
if test "X$pkg" = "X$p"; then |
1434 |
enable_shared=yes |
enable_shared=yes |
1435 |
fi |
fi |
1436 |
done |
done |
1437 |
IFS="$ac_save_ifs" |
IFS="$lt_save_ifs" |
1438 |
;; |
;; |
1439 |
esac], |
esac], |
1440 |
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
1467 |
*) |
*) |
1468 |
enable_static=no |
enable_static=no |
1469 |
# Look at the argument we got. We use all the common list separators. |
# Look at the argument we got. We use all the common list separators. |
1470 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}:," |
1471 |
for pkg in $enableval; do |
for pkg in $enableval; do |
1472 |
if test "X$pkg" = "X$p"; then |
if test "X$pkg" = "X$p"; then |
1473 |
enable_static=yes |
enable_static=yes |
1474 |
fi |
fi |
1475 |
done |
done |
1476 |
IFS="$ac_save_ifs" |
IFS="$lt_save_ifs" |
1477 |
;; |
;; |
1478 |
esac], |
esac], |
1479 |
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
1506 |
*) |
*) |
1507 |
enable_fast_install=no |
enable_fast_install=no |
1508 |
# Look at the argument we got. We use all the common list separators. |
# Look at the argument we got. We use all the common list separators. |
1509 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}:," |
1510 |
for pkg in $enableval; do |
for pkg in $enableval; do |
1511 |
if test "X$pkg" = "X$p"; then |
if test "X$pkg" = "X$p"; then |
1512 |
enable_fast_install=yes |
enable_fast_install=yes |
1513 |
fi |
fi |
1514 |
done |
done |
1515 |
IFS="$ac_save_ifs" |
IFS="$lt_save_ifs" |
1516 |
;; |
;; |
1517 |
esac], |
esac], |
1518 |
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl |
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl |
1552 |
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. |
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. |
1553 |
;; |
;; |
1554 |
*) |
*) |
1555 |
ac_save_MAGIC_CMD="$MAGIC_CMD" |
lt_save_MAGIC_CMD="$MAGIC_CMD" |
1556 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS=":" |
1557 |
dnl $ac_dummy forces splitting on constant user-supplied paths. |
dnl $ac_dummy forces splitting on constant user-supplied paths. |
1558 |
dnl POSIX.2 word splitting is done only on the output of word expansions, |
dnl POSIX.2 word splitting is done only on the output of word expansions, |
1559 |
dnl not every word. This closes a longstanding sh security hole. |
dnl not every word. This closes a longstanding sh security hole. |
1589 |
break |
break |
1590 |
fi |
fi |
1591 |
done |
done |
1592 |
IFS="$ac_save_ifs" |
IFS="$lt_save_ifs" |
1593 |
MAGIC_CMD="$ac_save_MAGIC_CMD" |
MAGIC_CMD="$lt_save_MAGIC_CMD" |
1594 |
;; |
;; |
1595 |
esac]) |
esac]) |
1596 |
MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
1620 |
|
|
1621 |
# AC_PROG_LD |
# AC_PROG_LD |
1622 |
# ---------- |
# ---------- |
1623 |
find the path to the GNU or non-GNU linker |
# find the path to the GNU or non-GNU linker |
1624 |
AC_DEFUN([AC_PROG_LD], |
AC_DEFUN([AC_PROG_LD], |
1625 |
[AC_ARG_WITH(gnu-ld, |
[AC_ARG_WITH(gnu-ld, |
1626 |
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
1666 |
fi |
fi |
1667 |
AC_CACHE_VAL(lt_cv_path_LD, |
AC_CACHE_VAL(lt_cv_path_LD, |
1668 |
[if test -z "$LD"; then |
[if test -z "$LD"; then |
1669 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
1670 |
for ac_dir in $PATH; do |
for ac_dir in $PATH; do |
1671 |
test -z "$ac_dir" && ac_dir=. |
test -z "$ac_dir" && ac_dir=. |
1672 |
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
1681 |
fi |
fi |
1682 |
fi |
fi |
1683 |
done |
done |
1684 |
IFS="$ac_save_ifs" |
IFS="$lt_save_ifs" |
1685 |
else |
else |
1686 |
lt_cv_path_LD="$LD" # Let the user override the test with a path. |
lt_cv_path_LD="$LD" # Let the user override the test with a path. |
1687 |
fi]) |
fi]) |
1911 |
# Let the user override the test. |
# Let the user override the test. |
1912 |
lt_cv_path_NM="$NM" |
lt_cv_path_NM="$NM" |
1913 |
else |
else |
1914 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
IFS="${IFS= }"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
1915 |
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
1916 |
test -z "$ac_dir" && ac_dir=. |
test -z "$ac_dir" && ac_dir=. |
1917 |
tmp_nm=$ac_dir/${ac_tool_prefix}nm |
tmp_nm=$ac_dir/${ac_tool_prefix}nm |
1932 |
fi |
fi |
1933 |
fi |
fi |
1934 |
done |
done |
1935 |
IFS="$ac_save_ifs" |
IFS="$lt_save_ifs" |
1936 |
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
1937 |
fi]) |
fi]) |
1938 |
NM="$lt_cv_path_NM" |
NM="$lt_cv_path_NM" |
2052 |
# _LT_AC_LANG_GCJ |
# _LT_AC_LANG_GCJ |
2053 |
# --------------- |
# --------------- |
2054 |
AC_DEFUN([_LT_AC_LANG_GCJ], |
AC_DEFUN([_LT_AC_LANG_GCJ], |
2055 |
[AC_REQUIRE([AC_PROG_LIBTOOL]) |
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], |
|
AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], |
|
2056 |
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], |
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], |
2057 |
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], |
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], |
2058 |
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], |
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], |
2061 |
])# _LT_AC_LANG_GCJ |
])# _LT_AC_LANG_GCJ |
2062 |
|
|
2063 |
|
|
2064 |
|
# AC_LIBTOOL_LANG_C_CONFIG |
2065 |
|
# ------------------------ |
2066 |
|
# Ensure that the configuration vars for the C compiler are |
2067 |
|
# suitably defined. Those variables are subsequently used by |
2068 |
|
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
2069 |
|
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) |
2070 |
|
AC_DEFUN([_LT_AC_LANG_C_CONFIG], |
2071 |
|
[lt_save_CC="$CC" |
2072 |
|
AC_LANG_SAVE |
2073 |
|
AC_LANG_C |
2074 |
|
|
2075 |
|
# Source file extension for C test sources. |
2076 |
|
ac_ext=c |
2077 |
|
|
2078 |
|
# Object file extension for compiled C test sources. |
2079 |
|
objext=o |
2080 |
|
_LT_AC_TAGVAR(objext, $1)=$objext |
2081 |
|
|
2082 |
|
# Code to be used in simple compile tests |
2083 |
|
lt_simple_compile_test_code="int some_variable = 0;" |
2084 |
|
|
2085 |
|
# Code to be used in simple link tests |
2086 |
|
lt_simple_link_test_code='main(){return(0);}' |
2087 |
|
|
2088 |
|
_LT_AC_SYS_COMPILER |
2089 |
|
|
2090 |
|
# |
2091 |
|
# Check for any special shared library compilation flags. |
2092 |
|
# |
2093 |
|
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= |
2094 |
|
if test "$GCC" = no; then |
2095 |
|
case $host_os in |
2096 |
|
sco3.2v5*) |
2097 |
|
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' |
2098 |
|
;; |
2099 |
|
esac |
2100 |
|
fi |
2101 |
|
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then |
2102 |
|
AC_MSG_WARN([\`$CC' requires \`$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) |
2103 |
|
if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]"] >/dev/null; then : |
2104 |
|
else |
2105 |
|
AC_MSG_WARN([add \`$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) |
2106 |
|
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no |
2107 |
|
fi |
2108 |
|
fi |
2109 |
|
|
2110 |
|
|
2111 |
|
# |
2112 |
|
# Check to make sure the static flag actually works. |
2113 |
|
# |
2114 |
|
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], |
2115 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), |
2116 |
|
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1), |
2117 |
|
[], |
2118 |
|
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) |
2119 |
|
|
2120 |
|
|
2121 |
|
## CAVEAT EMPTOR: |
2122 |
|
## There is no encapsulation within the following macros, do not change |
2123 |
|
## the running order or otherwise move them around unless you know exactly |
2124 |
|
## what you are doing... |
2125 |
|
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
2126 |
|
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
2127 |
|
AC_LIBTOOL_PROG_COMPILER_PIC($1) |
2128 |
|
AC_LIBTOOL_PROG_CC_C_O($1) |
2129 |
|
AC_LIBTOOL_PROG_LD_SHLIBS($1) |
2130 |
|
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
2131 |
|
AC_LIBTOOL_SYS_LIB_STRIP |
2132 |
|
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
2133 |
|
AC_LIBTOOL_DLOPEN_SELF($1) |
2134 |
|
|
2135 |
|
# Report the final consequences. |
2136 |
|
AC_MSG_CHECKING([if libtool supports shared libraries]) |
2137 |
|
AC_MSG_RESULT([$can_build_shared]) |
2138 |
|
|
2139 |
|
AC_LIBTOOL_CONFIG($1) |
2140 |
|
|
2141 |
|
AC_LANG_RESTORE |
2142 |
|
CC="$lt_save_CC" |
2143 |
|
])# AC_LIBTOOL_LANG_C_CONFIG |
2144 |
|
|
2145 |
|
|
2146 |
|
# AC_LIBTOOL_LANG_CXX_CONFIG |
2147 |
|
# -------------------------- |
2148 |
|
# Ensure that the configuration vars for the C compiler are |
2149 |
|
# suitably defined. Those variables are subsequently used by |
2150 |
|
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
2151 |
|
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) |
2152 |
|
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], |
2153 |
|
[AC_LANG_SAVE |
2154 |
|
AC_LANG_CPLUSPLUS |
2155 |
|
AC_REQUIRE([AC_PROG_CXX]) |
2156 |
|
AC_REQUIRE([AC_PROG_CXXCPP]) |
2157 |
|
|
2158 |
|
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
2159 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)= |
2160 |
|
_LT_AC_TAGVAR(always_export_symbols, $1)=no |
2161 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
2162 |
|
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
2163 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
2164 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
2165 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
2166 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
2167 |
|
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
2168 |
|
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
2169 |
|
_LT_AC_TAGVAR(no_undefined_flag, $1)= |
2170 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
2171 |
|
|
2172 |
|
# Dependencies to place before and after the object being linked: |
2173 |
|
_LT_AC_TAGVAR(predep_objects, $1)= |
2174 |
|
_LT_AC_TAGVAR(postdep_objects, $1)= |
2175 |
|
_LT_AC_TAGVAR(predeps, $1)= |
2176 |
|
_LT_AC_TAGVAR(postdeps, $1)= |
2177 |
|
_LT_AC_TAGVAR(compiler_lib_search_path, $1)= |
2178 |
|
|
2179 |
|
# Source file extension for C test sources. |
2180 |
|
ac_ext=cc |
2181 |
|
|
2182 |
|
# Object file extension for compiled C test sources. |
2183 |
|
objext=o |
2184 |
|
_LT_AC_TAGVAR(objext, $1)=$objext |
2185 |
|
|
2186 |
|
# Code to be used in simple compile tests |
2187 |
|
lt_simple_compile_test_code="int some_variable = 0;" |
2188 |
|
|
2189 |
|
# Code to be used in simple link tests |
2190 |
|
lt_simple_link_test_code='int main(int char *[]) { return(0); }' |
2191 |
|
|
2192 |
|
# ltmain only uses $CC for tagged configurations so make sure $CC is set. |
2193 |
|
_LT_AC_SYS_COMPILER |
2194 |
|
|
2195 |
|
# Allow CC to be a program name with arguments. |
2196 |
|
lt_save_CC="$CC" |
2197 |
|
CC=${CXX-"c++"} |
2198 |
|
set dummy $CC |
2199 |
|
compiler="[$]2" |
2200 |
|
_LT_AC_TAGVAR(compiler, $1)=$CC |
2201 |
|
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` |
2202 |
|
|
2203 |
|
# We don't want -fno-exception wen compiling C++ code, so set the |
2204 |
|
# no_builtin_flag separately |
2205 |
|
if test "$GXX" = yes; then |
2206 |
|
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
2207 |
|
else |
2208 |
|
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
2209 |
|
fi |
2210 |
|
|
2211 |
|
if test "$GXX" = yes; then |
2212 |
|
# Set up default GNU C++ configuration |
2213 |
|
|
2214 |
|
# Check if GNU C++ uses GNU ld as the underlying linker, since the |
2215 |
|
# archiving commands below assume that GNU ld is being used. |
2216 |
|
if eval "`$CC -print-prog-name=ld` --version 2>&1" | \ |
2217 |
|
egrep 'GNU ld' > /dev/null; then |
2218 |
|
with_gnu_ld=yes |
2219 |
|
|
2220 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
2221 |
|
_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' |
2222 |
|
|
2223 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' |
2224 |
|
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
2225 |
|
|
2226 |
|
# If archive_cmds runs LD, not CC, wlarc should be empty |
2227 |
|
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to |
2228 |
|
# investigate it a little bit more. (MM) |
2229 |
|
wlarc='${wl}' |
2230 |
|
|
2231 |
|
# ancient GNU ld didn't support --whole-archive et. al. |
2232 |
|
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ |
2233 |
|
egrep 'no-whole-archive' > /dev/null; then |
2234 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
2235 |
|
else |
2236 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
2237 |
|
fi |
2238 |
|
else |
2239 |
|
with_gnu_ld=no |
2240 |
|
wlarc= |
2241 |
|
|
2242 |
|
# A generic and very simple default shared library creation |
2243 |
|
# command for GNU C++ for the case where it uses the native |
2244 |
|
# linker, instead of GNU ld. If possible, this setting should |
2245 |
|
# overridden to take advantage of the native linker features on |
2246 |
|
# the platform it is being used on. |
2247 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' |
2248 |
|
fi |
2249 |
|
|
2250 |
|
# Commands to make compiler produce verbose output that lists |
2251 |
|
# what "hidden" libraries, object files and flags are used when |
2252 |
|
# linking a shared library. |
2253 |
|
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' |
2254 |
|
|
2255 |
|
else |
2256 |
|
GXX=no |
2257 |
|
with_gnu_ld=no |
2258 |
|
wlarc= |
2259 |
|
fi |
2260 |
|
|
2261 |
|
# PORTME: fill in a description of your system's C++ link characteristics |
2262 |
|
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
2263 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=yes |
2264 |
|
case $host_os in |
2265 |
|
aix3*) |
2266 |
|
# FIXME: insert proper C++ library support |
2267 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2268 |
|
;; |
2269 |
|
aix4* | aix5*) |
2270 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='' |
2271 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
2272 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
2273 |
|
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
2274 |
|
# When large executables or shared objects are built, AIX ld can |
2275 |
|
# have problems creating the table of contents. If linking a library |
2276 |
|
# or program results in "error TOC overflow" add -mminimal-toc to |
2277 |
|
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
2278 |
|
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
2279 |
|
if test "$GXX" = yes; then |
2280 |
|
case $host_os in aix4.[012]|aix4.[012].*) |
2281 |
|
# We only want to do this on AIX 4.2 and lower, the check |
2282 |
|
# below for broken collect2 doesn't work under 4.3+ |
2283 |
|
collect2name=`${CC} -print-prog-name=collect2` |
2284 |
|
if test -f "$collect2name" && \ |
2285 |
|
strings "$collect2name" | grep resolve_lib_name >/dev/null |
2286 |
|
then |
2287 |
|
# We have reworked collect2 |
2288 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
2289 |
|
else |
2290 |
|
# We have old collect2 |
2291 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
2292 |
|
# It fails to find uninstalled libraries when the uninstalled |
2293 |
|
# path is not listed in the libpath. Setting hardcode_minus_L |
2294 |
|
# to unsupported forces relinking |
2295 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
2296 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
2297 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
2298 |
|
fi |
2299 |
|
esac |
2300 |
|
shared_flag='-shared' |
2301 |
|
else |
2302 |
|
# not using gcc |
2303 |
|
if test "$host_cpu" = ia64; then |
2304 |
|
shared_flag='${wl}-G' |
2305 |
|
else |
2306 |
|
shared_flag='${wl}-bM:SRE' |
2307 |
|
fi |
2308 |
|
fi |
2309 |
|
|
2310 |
|
if test "$host_cpu" = ia64; then |
2311 |
|
# On IA64, the linker does run time linking by default, so we don't |
2312 |
|
# have to do anything special. |
2313 |
|
aix_use_runtimelinking=no |
2314 |
|
exp_sym_flag='-Bexport' |
2315 |
|
no_entry_flag="" |
2316 |
|
else |
2317 |
|
# Test if we are trying to use run time linking, or normal AIX style linking. |
2318 |
|
# If -brtl is somewhere in LDFLAGS, we need to do run time linking. |
2319 |
|
aix_use_runtimelinking=no |
2320 |
|
for ld_flag in $LDFLAGS; do |
2321 |
|
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then |
2322 |
|
aix_use_runtimelinking=yes |
2323 |
|
break |
2324 |
|
fi |
2325 |
|
done |
2326 |
|
exp_sym_flag='-bexport' |
2327 |
|
no_entry_flag='-bnoentry' |
2328 |
|
fi |
2329 |
|
# It seems that -bexpall does not export symbols beginning with |
2330 |
|
# underscore (_), so it is better to generate a list of symbols to export. |
2331 |
|
_LT_AC_TAGVAR(always_export_symbols, $1)=yes |
2332 |
|
if test "$aix_use_runtimelinking" = yes; then |
2333 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:/usr/lib:/lib' |
2334 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -Wl,-G' |
2335 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}-brtl \${wl}$exp_sym_flag:\$export_symbols" |
2336 |
|
else |
2337 |
|
if test "$host_cpu" = ia64; then |
2338 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
2339 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
2340 |
|
_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" |
2341 |
|
else |
2342 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:/usr/lib:/lib' |
2343 |
|
# Warning - without using the other run time loading flags, -berok will |
2344 |
|
# link without error, but may produce a broken library. |
2345 |
|
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bnoerok' |
2346 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' |
2347 |
|
# -bexpall does not export symbols beginning with underscore (_) |
2348 |
|
_LT_AC_TAGVAR(always_export_symbols, $1)=yes |
2349 |
|
# Exported symbols can be pulled into shared objects from archives |
2350 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' |
2351 |
|
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
2352 |
|
# This is similar to how AIX traditionally builds it's shared libraries. |
2353 |
|
_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' |
2354 |
|
fi |
2355 |
|
fi |
2356 |
|
;; |
2357 |
|
chorus*) |
2358 |
|
case $cc_basename in |
2359 |
|
*) |
2360 |
|
# FIXME: insert proper C++ library support |
2361 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2362 |
|
;; |
2363 |
|
esac |
2364 |
|
;; |
2365 |
|
dgux*) |
2366 |
|
case $cc_basename in |
2367 |
|
ec++) |
2368 |
|
# FIXME: insert proper C++ library support |
2369 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2370 |
|
;; |
2371 |
|
ghcx) |
2372 |
|
# Green Hills C++ Compiler |
2373 |
|
# FIXME: insert proper C++ library support |
2374 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2375 |
|
;; |
2376 |
|
*) |
2377 |
|
# FIXME: insert proper C++ library support |
2378 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2379 |
|
;; |
2380 |
|
esac |
2381 |
|
;; |
2382 |
|
freebsd[12]*) |
2383 |
|
# C++ shared libraries reported to be fairly broken before switch to ELF |
2384 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2385 |
|
;; |
2386 |
|
freebsd-elf*) |
2387 |
|
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
2388 |
|
;; |
2389 |
|
freebsd*) |
2390 |
|
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF |
2391 |
|
# conventions |
2392 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=yes |
2393 |
|
;; |
2394 |
|
hpux*) |
2395 |
|
if test $with_gnu_ld = no; then |
2396 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
2397 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
2398 |
|
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
2399 |
|
fi |
2400 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
2401 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but as the default |
2402 |
|
# location of the library. |
2403 |
|
|
2404 |
|
case $cc_basename in |
2405 |
|
CC) |
2406 |
|
# FIXME: insert proper C++ library support |
2407 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2408 |
|
;; |
2409 |
|
aCC) |
2410 |
|
case $host_os in |
2411 |
|
hpux9*) _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' ;; |
2412 |
|
*) _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' ;; |
2413 |
|
esac |
2414 |
|
# Commands to make compiler produce verbose output that lists |
2415 |
|
# what "hidden" libraries, object files and flags are used when |
2416 |
|
# linking a shared library. |
2417 |
|
# |
2418 |
|
# There doesn't appear to be a way to prevent this compiler from |
2419 |
|
# explicitly linking system object files so we need to strip them |
2420 |
|
# from the output so that they don't get included in the library |
2421 |
|
# dependencies. |
2422 |
|
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
2423 |
|
;; |
2424 |
|
*) |
2425 |
|
if test $GXX = yes; then |
2426 |
|
if test $with_gnu_ld = no; then |
2427 |
|
case "$host_os" in |
2428 |
|
hpux9*) _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' ;; |
2429 |
|
*) _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' ;; |
2430 |
|
esac |
2431 |
|
fi |
2432 |
|
else |
2433 |
|
# FIXME: insert proper C++ library support |
2434 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2435 |
|
fi |
2436 |
|
;; |
2437 |
|
esac |
2438 |
|
;; |
2439 |
|
irix5* | irix6*) |
2440 |
|
case $cc_basename in |
2441 |
|
CC) |
2442 |
|
# SGI C++ |
2443 |
|
_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' |
2444 |
|
|
2445 |
|
# Archives containing C++ object files must be created using |
2446 |
|
# "CC -ar", where "CC" is the IRIX C++ compiler. This is |
2447 |
|
# necessary to make sure instantiated templates are included |
2448 |
|
# in the archive. |
2449 |
|
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' |
2450 |
|
;; |
2451 |
|
*) |
2452 |
|
if test "$GXX" = yes; then |
2453 |
|
if test "$with_gnu_ld" = no; then |
2454 |
|
_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' |
2455 |
|
else |
2456 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib' |
2457 |
|
fi |
2458 |
|
fi |
2459 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
2460 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
2461 |
|
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
2462 |
|
;; |
2463 |
|
esac |
2464 |
|
;; |
2465 |
|
linux*) |
2466 |
|
case $cc_basename in |
2467 |
|
KCC) |
2468 |
|
# Kuck and Associates, Inc. (KAI) C++ Compiler |
2469 |
|
|
2470 |
|
# KCC will only create a shared library if the output file |
2471 |
|
# ends with ".so" (or ".sl" for HP-UX), so rename the library |
2472 |
|
# to its proper name (with version) after linking. |
2473 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
2474 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' |
2475 |
|
|
2476 |
|
# Commands to make compiler produce verbose output that lists |
2477 |
|
# what "hidden" libraries, object files and flags are used when |
2478 |
|
# linking a shared library. |
2479 |
|
# |
2480 |
|
# There doesn't appear to be a way to prevent this compiler from |
2481 |
|
# explicitly linking system object files so we need to strip them |
2482 |
|
# from the output so that they don't get included in the library |
2483 |
|
# dependencies. |
2484 |
|
output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
2485 |
|
|
2486 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' |
2487 |
|
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
2488 |
|
|
2489 |
|
# Archives containing C++ object files must be created using |
2490 |
|
# "CC -Bstatic", where "CC" is the KAI C++ compiler. |
2491 |
|
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
2492 |
|
;; |
2493 |
|
cxx) |
2494 |
|
# Compaq C++ |
2495 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
2496 |
|
_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' |
2497 |
|
|
2498 |
|
runpath_var=LD_RUN_PATH |
2499 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
2500 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
2501 |
|
|
2502 |
|
# Commands to make compiler produce verbose output that lists |
2503 |
|
# what "hidden" libraries, object files and flags are used when |
2504 |
|
# linking a shared library. |
2505 |
|
# |
2506 |
|
# There doesn't appear to be a way to prevent this compiler from |
2507 |
|
# explicitly linking system object files so we need to strip them |
2508 |
|
# from the output so that they don't get included in the library |
2509 |
|
# dependencies. |
2510 |
|
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' |
2511 |
|
;; |
2512 |
|
esac |
2513 |
|
;; |
2514 |
|
lynxos*) |
2515 |
|
# FIXME: insert proper C++ library support |
2516 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2517 |
|
;; |
2518 |
|
m88k*) |
2519 |
|
# FIXME: insert proper C++ library support |
2520 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2521 |
|
;; |
2522 |
|
mvs*) |
2523 |
|
case $cc_basename in |
2524 |
|
cxx) |
2525 |
|
# FIXME: insert proper C++ library support |
2526 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2527 |
|
;; |
2528 |
|
*) |
2529 |
|
# FIXME: insert proper C++ library support |
2530 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2531 |
|
;; |
2532 |
|
esac |
2533 |
|
;; |
2534 |
|
netbsd*) |
2535 |
|
# NetBSD uses g++ - do we need to do anything? |
2536 |
|
;; |
2537 |
|
osf3*) |
2538 |
|
if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
2539 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
2540 |
|
_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' |
2541 |
|
|
2542 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
2543 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
2544 |
|
|
2545 |
|
# Commands to make compiler produce verbose output that lists |
2546 |
|
# what "hidden" libraries, object files and flags are used when |
2547 |
|
# linking a shared library. |
2548 |
|
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' |
2549 |
|
fi |
2550 |
|
|
2551 |
|
case $cc_basename in |
2552 |
|
KCC) |
2553 |
|
# Kuck and Associates, Inc. (KAI) C++ Compiler |
2554 |
|
|
2555 |
|
# KCC will only create a shared library if the output file |
2556 |
|
# ends with ".so" (or ".sl" for HP-UX), so rename the library |
2557 |
|
# to its proper name (with version) after linking. |
2558 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
2559 |
|
|
2560 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
2561 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
2562 |
|
|
2563 |
|
# Archives containing C++ object files must be created using |
2564 |
|
# "CC -Bstatic", where "CC" is the KAI C++ compiler. |
2565 |
|
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
2566 |
|
|
2567 |
|
;; |
2568 |
|
RCC) |
2569 |
|
# Rational C++ 2.4.1 |
2570 |
|
# FIXME: insert proper C++ library support |
2571 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2572 |
|
;; |
2573 |
|
cxx) |
2574 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
2575 |
|
_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' |
2576 |
|
|
2577 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
2578 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
2579 |
|
|
2580 |
|
# Commands to make compiler produce verbose output that lists |
2581 |
|
# what "hidden" libraries, object files and flags are used when |
2582 |
|
# linking a shared library. |
2583 |
|
# |
2584 |
|
# There doesn't appear to be a way to prevent this compiler from |
2585 |
|
# explicitly linking system object files so we need to strip them |
2586 |
|
# from the output so that they don't get included in the library |
2587 |
|
# dependencies. |
2588 |
|
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' |
2589 |
|
;; |
2590 |
|
*) |
2591 |
|
# FIXME: insert proper C++ library support |
2592 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2593 |
|
;; |
2594 |
|
esac |
2595 |
|
;; |
2596 |
|
osf4* | osf5*) |
2597 |
|
if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
2598 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
2599 |
|
_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' |
2600 |
|
|
2601 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
2602 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
2603 |
|
|
2604 |
|
# Commands to make compiler produce verbose output that lists |
2605 |
|
# what "hidden" libraries, object files and flags are used when |
2606 |
|
# linking a shared library. |
2607 |
|
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' |
2608 |
|
fi |
2609 |
|
|
2610 |
|
case $cc_basename in |
2611 |
|
KCC) |
2612 |
|
# Kuck and Associates, Inc. (KAI) C++ Compiler |
2613 |
|
|
2614 |
|
# KCC will only create a shared library if the output file |
2615 |
|
# ends with ".so" (or ".sl" for HP-UX), so rename the library |
2616 |
|
# to its proper name (with version) after linking. |
2617 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
2618 |
|
|
2619 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
2620 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
2621 |
|
|
2622 |
|
# Archives containing C++ object files must be created using |
2623 |
|
# the KAI C++ compiler. |
2624 |
|
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' |
2625 |
|
;; |
2626 |
|
RCC) |
2627 |
|
# Rational C++ 2.4.1 |
2628 |
|
# FIXME: insert proper C++ library support |
2629 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2630 |
|
;; |
2631 |
|
cxx) |
2632 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
2633 |
|
_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' |
2634 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~ |
2635 |
|
echo "-hidden">> $lib.exp~ |
2636 |
|
$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~ |
2637 |
|
$rm $lib.exp' |
2638 |
|
|
2639 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
2640 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
2641 |
|
|
2642 |
|
# Commands to make compiler produce verbose output that lists |
2643 |
|
# what "hidden" libraries, object files and flags are used when |
2644 |
|
# linking a shared library. |
2645 |
|
# |
2646 |
|
# There doesn't appear to be a way to prevent this compiler from |
2647 |
|
# explicitly linking system object files so we need to strip them |
2648 |
|
# from the output so that they don't get included in the library |
2649 |
|
# dependencies. |
2650 |
|
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' |
2651 |
|
;; |
2652 |
|
*) |
2653 |
|
# FIXME: insert proper C++ library support |
2654 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2655 |
|
;; |
2656 |
|
esac |
2657 |
|
;; |
2658 |
|
psos*) |
2659 |
|
# FIXME: insert proper C++ library support |
2660 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2661 |
|
;; |
2662 |
|
sco*) |
2663 |
|
case $cc_basename in |
2664 |
|
CC) |
2665 |
|
# FIXME: insert proper C++ library support |
2666 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2667 |
|
;; |
2668 |
|
*) |
2669 |
|
# FIXME: insert proper C++ library support |
2670 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2671 |
|
;; |
2672 |
|
esac |
2673 |
|
;; |
2674 |
|
sunos4*) |
2675 |
|
case $cc_basename in |
2676 |
|
CC) |
2677 |
|
# Sun C++ 4.x |
2678 |
|
# FIXME: insert proper C++ library support |
2679 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2680 |
|
;; |
2681 |
|
lcc) |
2682 |
|
# Lucid |
2683 |
|
# FIXME: insert proper C++ library support |
2684 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2685 |
|
;; |
2686 |
|
*) |
2687 |
|
# FIXME: insert proper C++ library support |
2688 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2689 |
|
;; |
2690 |
|
esac |
2691 |
|
;; |
2692 |
|
solaris*) |
2693 |
|
case $cc_basename in |
2694 |
|
CC) |
2695 |
|
# Sun C++ 4.2, 5.x and Centerline C++ |
2696 |
|
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' |
2697 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
2698 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
2699 |
|
$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' |
2700 |
|
|
2701 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
2702 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
2703 |
|
case $host_os in |
2704 |
|
solaris2.[0-5] | solaris2.[0-5].*) ;; |
2705 |
|
*) |
2706 |
|
# The C++ compiler is used as linker so we must use $wl |
2707 |
|
# flag to pass the commands to the underlying system |
2708 |
|
# linker. |
2709 |
|
# Supported since Solaris 2.6 (maybe 2.5.1?) |
2710 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' |
2711 |
|
;; |
2712 |
|
esac |
2713 |
|
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
2714 |
|
|
2715 |
|
# Commands to make compiler produce verbose output that lists |
2716 |
|
# what "hidden" libraries, object files and flags are used when |
2717 |
|
# linking a shared library. |
2718 |
|
# |
2719 |
|
# There doesn't appear to be a way to prevent this compiler from |
2720 |
|
# explicitly linking system object files so we need to strip them |
2721 |
|
# from the output so that they don't get included in the library |
2722 |
|
# dependencies. |
2723 |
|
output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
2724 |
|
|
2725 |
|
# Archives containing C++ object files must be created using |
2726 |
|
# "CC -xar", where "CC" is the Sun C++ compiler. This is |
2727 |
|
# necessary to make sure instantiated templates are included |
2728 |
|
# in the archive. |
2729 |
|
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' |
2730 |
|
;; |
2731 |
|
gcx) |
2732 |
|
# Green Hills C++ Compiler |
2733 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
2734 |
|
|
2735 |
|
# The C++ compiler must be used to create the archive. |
2736 |
|
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' |
2737 |
|
;; |
2738 |
|
*) |
2739 |
|
# GNU C++ compiler with Solaris linker |
2740 |
|
if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
2741 |
|
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' |
2742 |
|
if $CC --version | egrep -v '^2\.7' > /dev/null; then |
2743 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' |
2744 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
2745 |
|
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' |
2746 |
|
|
2747 |
|
# Commands to make compiler produce verbose output that lists |
2748 |
|
# what "hidden" libraries, object files and flags are used when |
2749 |
|
# linking a shared library. |
2750 |
|
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" |
2751 |
|
else |
2752 |
|
# g++ 2.7 appears to require `-G' NOT `-shared' on this |
2753 |
|
# platform. |
2754 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' |
2755 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
2756 |
|
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' |
2757 |
|
|
2758 |
|
# Commands to make compiler produce verbose output that lists |
2759 |
|
# what "hidden" libraries, object files and flags are used when |
2760 |
|
# linking a shared library. |
2761 |
|
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" |
2762 |
|
fi |
2763 |
|
|
2764 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' |
2765 |
|
fi |
2766 |
|
;; |
2767 |
|
esac |
2768 |
|
;; |
2769 |
|
tandem*) |
2770 |
|
case $cc_basename in |
2771 |
|
NCC) |
2772 |
|
# NonStop-UX NCC 3.20 |
2773 |
|
# FIXME: insert proper C++ library support |
2774 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2775 |
|
;; |
2776 |
|
*) |
2777 |
|
# FIXME: insert proper C++ library support |
2778 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2779 |
|
;; |
2780 |
|
esac |
2781 |
|
;; |
2782 |
|
unixware*) |
2783 |
|
# FIXME: insert proper C++ library support |
2784 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2785 |
|
;; |
2786 |
|
vxworks*) |
2787 |
|
# FIXME: insert proper C++ library support |
2788 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2789 |
|
;; |
2790 |
|
*) |
2791 |
|
# FIXME: insert proper C++ library support |
2792 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
2793 |
|
;; |
2794 |
|
esac |
2795 |
|
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) |
2796 |
|
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
2797 |
|
|
2798 |
|
# Figure out "hidden" C++ library dependencies from verbose |
2799 |
|
# compiler output whening linking a shared library. |
2800 |
|
cat > conftest.$ac_ext <<EOF |
2801 |
|
class Foo |
2802 |
|
{ |
2803 |
|
public: |
2804 |
|
Foo (void) { a = 0; } |
2805 |
|
private: |
2806 |
|
int a; |
2807 |
|
}; |
2808 |
|
EOF |
2809 |
|
|
2810 |
|
|
2811 |
|
if AC_TRY_EVAL(ac_compile); then |
2812 |
|
# Parse the compiler output and extract the necessary |
2813 |
|
# objects, libraries and library flags. |
2814 |
|
|
2815 |
|
# Sentinel used to keep track of whether or not we are before |
2816 |
|
# the conftest object file. |
2817 |
|
pre_test_object_deps_done=no |
2818 |
|
|
2819 |
|
for p in `eval $output_verbose_link_cmd`; do |
2820 |
|
|
2821 |
|
case $p in |
2822 |
|
|
2823 |
|
-L* | -R* | -l*) |
2824 |
|
# Some compilers place space between "-{L,R}" and the path. |
2825 |
|
# Remove the space. |
2826 |
|
if test $p = "-L" \ |
2827 |
|
|| test $p = "-R"; then |
2828 |
|
prev=$p |
2829 |
|
continue |
2830 |
|
else |
2831 |
|
prev= |
2832 |
|
fi |
2833 |
|
|
2834 |
|
if test "$pre_test_object_deps_done" = no; then |
2835 |
|
case $p in |
2836 |
|
-L* | -R*) |
2837 |
|
# Internal compiler library paths should come after those |
2838 |
|
# provided the user. The postdeps already come after the |
2839 |
|
# user supplied libs so there is no need to process them. |
2840 |
|
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then |
2841 |
|
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" |
2842 |
|
else |
2843 |
|
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" |
2844 |
|
fi |
2845 |
|
;; |
2846 |
|
# The "-l" case would never come before the object being |
2847 |
|
# linked, so don't bother handling this case. |
2848 |
|
esac |
2849 |
|
else |
2850 |
|
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then |
2851 |
|
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" |
2852 |
|
else |
2853 |
|
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" |
2854 |
|
fi |
2855 |
|
fi |
2856 |
|
;; |
2857 |
|
|
2858 |
|
*.$objext) |
2859 |
|
# This assumes that the test object file only shows up |
2860 |
|
# once in the compiler output. |
2861 |
|
if test "$p" = "conftest.$objext"; then |
2862 |
|
pre_test_object_deps_done=yes |
2863 |
|
continue |
2864 |
|
fi |
2865 |
|
|
2866 |
|
if test "$pre_test_object_deps_done" = no; then |
2867 |
|
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then |
2868 |
|
_LT_AC_TAGVAR(predep_objects, $1)="$p" |
2869 |
|
else |
2870 |
|
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" |
2871 |
|
fi |
2872 |
|
else |
2873 |
|
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then |
2874 |
|
_LT_AC_TAGVAR(postdep_objects, $1)="$p" |
2875 |
|
else |
2876 |
|
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" |
2877 |
|
fi |
2878 |
|
fi |
2879 |
|
;; |
2880 |
|
|
2881 |
|
*) ;; # Ignore the rest. |
2882 |
|
|
2883 |
|
esac |
2884 |
|
done |
2885 |
|
|
2886 |
|
# Clean up. |
2887 |
|
rm -f a.out |
2888 |
|
else |
2889 |
|
echo "ltcf-cxx.sh: error: problem compiling test program" |
2890 |
|
fi |
2891 |
|
|
2892 |
|
$rm -f confest.$objext |
2893 |
|
|
2894 |
|
case " $_LT_AC_TAGVAR(postdeps, $1) " in |
2895 |
|
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; |
2896 |
|
*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;; |
2897 |
|
esac |
2898 |
|
|
2899 |
|
_LT_AC_TAGVAR(GCC, $1)="$GXX" |
2900 |
|
_LT_AC_TAGVAR(LD, $1)="$LD" |
2901 |
|
|
2902 |
|
## CAVEAT EMPTOR: |
2903 |
|
## There is no encapsulation within the following macros, do not change |
2904 |
|
## the running order or otherwise move them around unless you know exactly |
2905 |
|
## what you are doing... |
2906 |
|
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
2907 |
|
AC_LIBTOOL_PROG_COMPILER_PIC($1) |
2908 |
|
AC_LIBTOOL_PROG_CC_C_O($1) |
2909 |
|
AC_LIBTOOL_PROG_LD_SHLIBS($1) |
2910 |
|
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
2911 |
|
AC_LIBTOOL_SYS_LIB_STRIP |
2912 |
|
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
2913 |
|
AC_LIBTOOL_DLOPEN_SELF($1) |
2914 |
|
|
2915 |
|
# Report the final consequences. |
2916 |
|
AC_MSG_CHECKING([if libtool supports shared libraries]) |
2917 |
|
AC_MSG_RESULT([$can_build_shared]) |
2918 |
|
|
2919 |
|
AC_LIBTOOL_CONFIG($1) |
2920 |
|
|
2921 |
|
AC_LANG_RESTORE |
2922 |
|
CC="$lt_save_CC" |
2923 |
|
])# AC_LIBTOOL_LANG_CXX_CONFIG |
2924 |
|
|
2925 |
|
|
2926 |
|
# AC_LIBTOOL_LANG_GCJ_CONFIG |
2927 |
|
# -------------------------- |
2928 |
|
# Ensure that the configuration vars for the C compiler are |
2929 |
|
# suitably defined. Those variables are subsequently used by |
2930 |
|
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
2931 |
|
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) |
2932 |
|
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], |
2933 |
|
[AC_LANG_SAVE |
2934 |
|
|
2935 |
|
# Source file extension for C test sources. |
2936 |
|
ac_ext=java |
2937 |
|
|
2938 |
|
# Object file extension for compiled C test sources. |
2939 |
|
objext=o |
2940 |
|
_LT_AC_TAGVAR(objext, $1)=$objext |
2941 |
|
|
2942 |
|
# Code to be used in simple compile tests |
2943 |
|
lt_simple_compile_test_code="class foo {}" |
2944 |
|
|
2945 |
|
# Code to be used in simple link tests |
2946 |
|
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' |
2947 |
|
|
2948 |
|
# ltmain only uses $CC for tagged configurations so make sure $CC is set. |
2949 |
|
_LT_AC_SYS_COMPILER |
2950 |
|
|
2951 |
|
# Allow CC to be a program name with arguments. |
2952 |
|
lt_save_CC="$CC" |
2953 |
|
CC=${GCJ-"gcj"} |
2954 |
|
set dummy $CC |
2955 |
|
compiler="[$]2" |
2956 |
|
_LT_AC_TAGVAR(compiler, $1)=$CC |
2957 |
|
|
2958 |
|
# GCJ did not exist at the time GCC didn't implicitly link libc in. |
2959 |
|
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
2960 |
|
|
2961 |
|
## CAVEAT EMPTOR: |
2962 |
|
## There is no encapsulation within the following macros, do not change |
2963 |
|
## the running order or otherwise move them around unless you know exactly |
2964 |
|
## what you are doing... |
2965 |
|
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
2966 |
|
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
2967 |
|
AC_LIBTOOL_PROG_COMPILER_PIC($1) |
2968 |
|
AC_LIBTOOL_PROG_CC_C_O($1) |
2969 |
|
AC_LIBTOOL_PROG_LD_SHLIBS($1) |
2970 |
|
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
2971 |
|
AC_LIBTOOL_SYS_LIB_STRIP |
2972 |
|
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
2973 |
|
AC_LIBTOOL_DLOPEN_SELF($1) |
2974 |
|
|
2975 |
|
AC_LIBTOOL_CONFIG($1) |
2976 |
|
|
2977 |
|
AC_LANG_RESTORE |
2978 |
|
CC="$lt_save_CC" |
2979 |
|
])# AC_LIBTOOL_LANG_GCJ_CONFIG |
2980 |
|
|
2981 |
|
|
2982 |
|
# AC_LIBTOOL_CONFIG([TAGNAME]) |
2983 |
|
# ---------------------------- |
2984 |
|
# If TAGNAME is not passed, then create an initial libtool script |
2985 |
|
# with a default configuration from the untagged config vars. Otherwise |
2986 |
|
# add code to config.status for appending the configuration named by |
2987 |
|
# TAGNAME from the matching tagged config vars. |
2988 |
|
AC_DEFUN([AC_LIBTOOL_CONFIG], |
2989 |
|
[# The else clause should only fire when bootstrapping the |
2990 |
|
# libtool distribution, otherwise you forgot to ship ltmain.sh |
2991 |
|
# with your package, and you will get complaints that there are |
2992 |
|
# no rules to generate ltmain.sh. |
2993 |
|
if test -f "$ltmain"; then |
2994 |
|
# Now quote all the things that may contain metacharacters while being |
2995 |
|
# careful not to overquote the AC_SUBSTed values. We take copies of the |
2996 |
|
# variables and quote the copies for generation of the libtool script. |
2997 |
|
for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S NM SHELL \ |
2998 |
|
libname_spec library_names_spec soname_spec extract_expsyms_cmds \ |
2999 |
|
old_striplib striplib file_magic_cmd finish_cmds finish_eval \ |
3000 |
|
deplibs_check_method reload_flag reload_cmds need_locks \ |
3001 |
|
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ |
3002 |
|
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
3003 |
|
old_postinstall_cmds old_postuninstall_cmds \ |
3004 |
|
_LT_AC_TAGVAR(compiler, $1) \ |
3005 |
|
_LT_AC_TAGVAR(CC, $1) \ |
3006 |
|
_LT_AC_TAGVAR(LD, $1) \ |
3007 |
|
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ |
3008 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ |
3009 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ |
3010 |
|
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ |
3011 |
|
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ |
3012 |
|
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ |
3013 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ |
3014 |
|
_LT_AC_TAGVAR(old_archive_cmds, $1) \ |
3015 |
|
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ |
3016 |
|
_LT_AC_TAGVAR(predep_objects, $1) \ |
3017 |
|
_LT_AC_TAGVAR(postdep_objects, $1) \ |
3018 |
|
_LT_AC_TAGVAR(predeps, $1) \ |
3019 |
|
_LT_AC_TAGVAR(postdeps, $1) \ |
3020 |
|
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \ |
3021 |
|
_LT_AC_TAGVAR(archive_cmds, $1) \ |
3022 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \ |
3023 |
|
_LT_AC_TAGVAR(postinstall_cmds, $1) \ |
3024 |
|
_LT_AC_TAGVAR(postuninstall_cmds, $1) \ |
3025 |
|
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ |
3026 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1) \ |
3027 |
|
_LT_AC_TAGVAR(no_undefined_flag, $1) \ |
3028 |
|
_LT_AC_TAGVAR(export_symbols_cmds, $1) \ |
3029 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ |
3030 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ |
3031 |
|
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ |
3032 |
|
_LT_AC_TAGVAR(exclude_expsyms, $1) \ |
3033 |
|
_LT_AC_TAGVAR(include_expsyms, $1); do |
3034 |
|
|
3035 |
|
case $var in |
3036 |
|
_LT_AC_TAGVAR(old_archive_cmds, $1) | \ |
3037 |
|
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ |
3038 |
|
_LT_AC_TAGVAR(archive_cmds, $1) | \ |
3039 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ |
3040 |
|
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ |
3041 |
|
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \ |
3042 |
|
extract_expsyms_cmds | reload_cmds | finish_cmds | \ |
3043 |
|
postinstall_cmds | postuninstall_cmds | \ |
3044 |
|
old_postinstall_cmds | old_postuninstall_cmds | \ |
3045 |
|
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
3046 |
|
# Double-quote double-evaled strings. |
3047 |
|
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
3048 |
|
;; |
3049 |
|
*) |
3050 |
|
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
3051 |
|
;; |
3052 |
|
esac |
3053 |
|
done |
3054 |
|
|
3055 |
|
case $lt_echo in |
3056 |
|
*'\[$]0 --fallback-echo"') |
3057 |
|
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` |
3058 |
|
;; |
3059 |
|
esac |
3060 |
|
|
3061 |
|
ifelse([$1], [], |
3062 |
|
[cfgfile="${ofile}T" |
3063 |
|
trap "$rm \"$cfgfile\"; exit 1" 1 2 15 |
3064 |
|
$rm -f "$cfgfile" |
3065 |
|
echo creating $ofile], |
3066 |
|
[cfgfile="$ofile"]) |
3067 |
|
|
3068 |
|
cat <<__EOF__ >> "$cfgfile" |
3069 |
|
ifelse([$1], [], |
3070 |
|
[#! $SHELL |
3071 |
|
|
3072 |
|
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
3073 |
|
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
3074 |
|
# NOTE: Changes made to this file will be lost: look at ltmain.sh. |
3075 |
|
# |
3076 |
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 |
3077 |
|
# Free Software Foundation, Inc. |
3078 |
|
# |
3079 |
|
# This file is part of GNU Libtool: |
3080 |
|
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
3081 |
|
# |
3082 |
|
# This program is free software; you can redistribute it and/or modify |
3083 |
|
# it under the terms of the GNU General Public License as published by |
3084 |
|
# the Free Software Foundation; either version 2 of the License, or |
3085 |
|
# (at your option) any later version. |
3086 |
|
# |
3087 |
|
# This program is distributed in the hope that it will be useful, but |
3088 |
|
# WITHOUT ANY WARRANTY; without even the implied warranty of |
3089 |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3090 |
|
# General Public License for more details. |
3091 |
|
# |
3092 |
|
# You should have received a copy of the GNU General Public License |
3093 |
|
# along with this program; if not, write to the Free Software |
3094 |
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
3095 |
|
# |
3096 |
|
# As a special exception to the GNU General Public License, if you |
3097 |
|
# distribute this file as part of a program that contains a |
3098 |
|
# configuration script generated by Autoconf, you may include it under |
3099 |
|
# the same distribution terms that you use for the rest of that program. |
3100 |
|
|
3101 |
|
# Sed that helps us avoid accidentally triggering echo(1) options like -n. |
3102 |
|
Xsed="sed -e s/^X//" |
3103 |
|
|
3104 |
|
# The HP-UX ksh and POSIX shell print the target directory to stdout |
3105 |
|
# if CDPATH is set. |
3106 |
|
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
3107 |
|
|
3108 |
|
# The names of the tagged configurations supported by this script. |
3109 |
|
available_tags= |
3110 |
|
|
3111 |
|
# ### BEGIN LIBTOOL CONFIG], |
3112 |
|
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) |
3113 |
|
|
3114 |
|
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
3115 |
|
|
3116 |
|
# Shell to use when invoking shell scripts. |
3117 |
|
SHELL=$lt_SHELL |
3118 |
|
|
3119 |
|
# Whether or not to build shared libraries. |
3120 |
|
build_libtool_libs=$enable_shared |
3121 |
|
|
3122 |
|
# Whether or not to add -lc for building shared libraries. |
3123 |
|
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) |
3124 |
|
|
3125 |
|
# Whether or not to build static libraries. |
3126 |
|
build_old_libs=$enable_static |
3127 |
|
|
3128 |
|
# Whether or not to optimize for fast installation. |
3129 |
|
fast_install=$enable_fast_install |
3130 |
|
|
3131 |
|
# The host system. |
3132 |
|
host_alias=$host_alias |
3133 |
|
host=$host |
3134 |
|
|
3135 |
|
# An echo program that does not interpret backslashes. |
3136 |
|
echo=$lt_echo |
3137 |
|
|
3138 |
|
# The archiver. |
3139 |
|
AR=$lt_AR |
3140 |
|
AR_FLAGS=$lt_AR_FLAGS |
3141 |
|
|
3142 |
|
# A C compiler. |
3143 |
|
LTCC=$LTCC |
3144 |
|
|
3145 |
|
# A language-specific compiler. |
3146 |
|
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) |
3147 |
|
|
3148 |
|
# Is the compiler the GNU C compiler? |
3149 |
|
with_gcc=$_LT_AC_TAGVAR(GCC, $1) |
3150 |
|
|
3151 |
|
# The linker used to build libraries. |
3152 |
|
LD=$lt_[]_LT_AC_TAGVAR(LD, $1) |
3153 |
|
|
3154 |
|
# Whether we need hard or soft links. |
3155 |
|
LN_S=$lt_LN_S |
3156 |
|
|
3157 |
|
# A BSD-compatible nm program. |
3158 |
|
NM=$lt_NM |
3159 |
|
|
3160 |
|
# A symbol stripping program |
3161 |
|
STRIP=$STRIP |
3162 |
|
|
3163 |
|
# Used to examine libraries when file_magic_cmd begins "file" |
3164 |
|
MAGIC_CMD=$MAGIC_CMD |
3165 |
|
|
3166 |
|
# Used on cygwin: DLL creation program. |
3167 |
|
DLLTOOL="$DLLTOOL" |
3168 |
|
|
3169 |
|
# Used on cygwin: object dumper. |
3170 |
|
OBJDUMP="$OBJDUMP" |
3171 |
|
|
3172 |
|
# Used on cygwin: assembler. |
3173 |
|
AS="$AS" |
3174 |
|
|
3175 |
|
# The name of the directory that contains temporary libtool files. |
3176 |
|
objdir=$objdir |
3177 |
|
|
3178 |
|
# How to create reloadable object files. |
3179 |
|
reload_flag=$lt_reload_flag |
3180 |
|
reload_cmds=$lt_reload_cmds |
3181 |
|
|
3182 |
|
# How to pass a linker flag through the compiler. |
3183 |
|
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) |
3184 |
|
|
3185 |
|
# Object file suffix (normally "o"). |
3186 |
|
objext="$ac_objext" |
3187 |
|
|
3188 |
|
# Old archive suffix (normally "a"). |
3189 |
|
libext="$libext" |
3190 |
|
|
3191 |
|
# Executable file suffix (normally ""). |
3192 |
|
exeext="$exeext" |
3193 |
|
|
3194 |
|
# Additional compiler flags for building library objects. |
3195 |
|
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) |
3196 |
|
pic_mode=$pic_mode |
3197 |
|
|
3198 |
|
# What is the maximum length of a command? |
3199 |
|
max_cmd_len=$lt_cv_sys_max_cmd_len |
3200 |
|
|
3201 |
|
# Does compiler simultaneously support -c and -o options? |
3202 |
|
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) |
3203 |
|
|
3204 |
|
# Must we lock files when doing compilation ? |
3205 |
|
need_locks=$lt_need_locks |
3206 |
|
|
3207 |
|
# Do we need the lib prefix for modules? |
3208 |
|
need_lib_prefix=$need_lib_prefix |
3209 |
|
|
3210 |
|
# Do we need a version for libraries? |
3211 |
|
need_version=$need_version |
3212 |
|
|
3213 |
|
# Whether dlopen is supported. |
3214 |
|
dlopen_support=$enable_dlopen |
3215 |
|
|
3216 |
|
# Whether dlopen of programs is supported. |
3217 |
|
dlopen_self=$enable_dlopen_self |
3218 |
|
|
3219 |
|
# Whether dlopen of statically linked programs is supported. |
3220 |
|
dlopen_self_static=$enable_dlopen_self_static |
3221 |
|
|
3222 |
|
# Compiler flag to prevent dynamic linking. |
3223 |
|
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) |
3224 |
|
|
3225 |
|
# Compiler flag to turn off builtin functions. |
3226 |
|
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) |
3227 |
|
|
3228 |
|
# Compiler flag to allow reflexive dlopens. |
3229 |
|
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) |
3230 |
|
|
3231 |
|
# Compiler flag to generate shared objects directly from archives. |
3232 |
|
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) |
3233 |
|
|
3234 |
|
# Compiler flag to generate thread-safe objects. |
3235 |
|
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) |
3236 |
|
|
3237 |
|
# Library versioning type. |
3238 |
|
version_type=$version_type |
3239 |
|
|
3240 |
|
# Format of library name prefix. |
3241 |
|
libname_spec=$lt_libname_spec |
3242 |
|
|
3243 |
|
# List of archive names. First name is the real one, the rest are links. |
3244 |
|
# The last name is the one that the linker finds with -lNAME. |
3245 |
|
library_names_spec=$lt_library_names_spec |
3246 |
|
|
3247 |
|
# The coded name of the library, if different from the real name. |
3248 |
|
soname_spec=$lt_soname_spec |
3249 |
|
|
3250 |
|
# Commands used to build and install an old-style archive. |
3251 |
|
RANLIB=$lt_RANLIB |
3252 |
|
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) |
3253 |
|
old_postinstall_cmds=$lt_old_postinstall_cmds |
3254 |
|
old_postuninstall_cmds=$lt_old_postuninstall_cmds |
3255 |
|
|
3256 |
|
# Create an old-style archive from a shared archive. |
3257 |
|
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) |
3258 |
|
|
3259 |
|
# Create a temporary old-style archive to link instead of a shared archive. |
3260 |
|
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) |
3261 |
|
|
3262 |
|
# Commands used to build and install a shared archive. |
3263 |
|
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) |
3264 |
|
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) |
3265 |
|
postinstall_cmds=$lt_postinstall_cmds |
3266 |
|
postuninstall_cmds=$lt_postuninstall_cmds |
3267 |
|
|
3268 |
|
# Commands to strip libraries. |
3269 |
|
old_striplib=$lt_old_striplib |
3270 |
|
striplib=$lt_striplib |
3271 |
|
|
3272 |
|
# Dependencies to place before the objects being linked to create a |
3273 |
|
# shared library. |
3274 |
|
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) |
3275 |
|
|
3276 |
|
# Dependencies to place after the objects being linked to create a |
3277 |
|
# shared library. |
3278 |
|
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) |
3279 |
|
|
3280 |
|
# Dependencies to place before the objects being linked to create a |
3281 |
|
# shared library. |
3282 |
|
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) |
3283 |
|
|
3284 |
|
# Dependencies to place after the objects being linked to create a |
3285 |
|
# shared library. |
3286 |
|
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) |
3287 |
|
|
3288 |
|
# The library search path used internally by the compiler when linking |
3289 |
|
# a shared library. |
3290 |
|
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) |
3291 |
|
|
3292 |
|
# Method to check whether dependent libraries are shared objects. |
3293 |
|
deplibs_check_method=$lt_deplibs_check_method |
3294 |
|
|
3295 |
|
# Command to use when deplibs_check_method == file_magic. |
3296 |
|
file_magic_cmd=$lt_file_magic_cmd |
3297 |
|
|
3298 |
|
# Flag that allows shared libraries with undefined symbols to be built. |
3299 |
|
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) |
3300 |
|
|
3301 |
|
# Flag that forces no undefined symbols. |
3302 |
|
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) |
3303 |
|
|
3304 |
|
# Commands used to finish a libtool library installation in a directory. |
3305 |
|
finish_cmds=$lt_finish_cmds |
3306 |
|
|
3307 |
|
# Same as above, but a single script fragment to be evaled but not shown. |
3308 |
|
finish_eval=$lt_finish_eval |
3309 |
|
|
3310 |
|
# Take the output of nm and produce a listing of raw symbols and C names. |
3311 |
|
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe |
3312 |
|
|
3313 |
|
# Transform the output of nm in a proper C declaration |
3314 |
|
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl |
3315 |
|
|
3316 |
|
# This is the shared library runtime path variable. |
3317 |
|
runpath_var=$runpath_var |
3318 |
|
|
3319 |
|
# This is the shared library path variable. |
3320 |
|
shlibpath_var=$shlibpath_var |
3321 |
|
|
3322 |
|
# Is shlibpath searched before the hard-coded library search path? |
3323 |
|
shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
3324 |
|
|
3325 |
|
# How to hardcode a shared library path into an executable. |
3326 |
|
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) |
3327 |
|
|
3328 |
|
# Whether we should hardcode library paths into libraries. |
3329 |
|
hardcode_into_libs=$hardcode_into_libs |
3330 |
|
|
3331 |
|
# Flag to hardcode \$libdir into a binary during linking. |
3332 |
|
# This must work even if \$libdir does not exist. |
3333 |
|
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) |
3334 |
|
|
3335 |
|
# Whether we need a single -rpath flag with a separated argument. |
3336 |
|
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) |
3337 |
|
|
3338 |
|
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
3339 |
|
# resulting binary. |
3340 |
|
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) |
3341 |
|
|
3342 |
|
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
3343 |
|
# resulting binary. |
3344 |
|
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) |
3345 |
|
|
3346 |
|
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
3347 |
|
# the resulting binary. |
3348 |
|
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) |
3349 |
|
|
3350 |
|
# Variables whose values should be saved in libtool wrapper scripts and |
3351 |
|
# restored at relink time. |
3352 |
|
variables_saved_for_relink="$variables_saved_for_relink" |
3353 |
|
|
3354 |
|
# Whether libtool must link a program against all its dependency libraries. |
3355 |
|
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) |
3356 |
|
|
3357 |
|
# Compile-time system search path for libraries |
3358 |
|
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
3359 |
|
|
3360 |
|
# Run-time system search path for libraries |
3361 |
|
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
3362 |
|
|
3363 |
|
# Fix the shell variable \$srcfile for the compiler. |
3364 |
|
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" |
3365 |
|
|
3366 |
|
# Set to yes if exported symbols are required. |
3367 |
|
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) |
3368 |
|
|
3369 |
|
# The commands to list exported symbols. |
3370 |
|
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) |
3371 |
|
|
3372 |
|
# The commands to extract the exported symbol list from a shared archive. |
3373 |
|
extract_expsyms_cmds=$lt_extract_expsyms_cmds |
3374 |
|
|
3375 |
|
# Symbols that should not be listed in the preloaded symbols. |
3376 |
|
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) |
3377 |
|
|
3378 |
|
# Symbols that must always be exported. |
3379 |
|
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) |
3380 |
|
|
3381 |
|
ifelse([$1],[], |
3382 |
|
[# ### END LIBTOOL CONFIG], |
3383 |
|
[# ### END LIBTOOL TAG CONFIG: $tagname]) |
3384 |
|
|
3385 |
|
__EOF__ |
3386 |
|
|
3387 |
|
ifelse([$1],[], [ |
3388 |
|
case $host_os in |
3389 |
|
aix3*) |
3390 |
|
cat <<\EOF >> "$cfgfile" |
3391 |
|
|
3392 |
|
# AIX sometimes has problems with the GCC collect2 program. For some |
3393 |
|
# reason, if we set the COLLECT_NAMES environment variable, the problems |
3394 |
|
# vanish in a puff of smoke. |
3395 |
|
if test "X${COLLECT_NAMES+set}" != Xset; then |
3396 |
|
COLLECT_NAMES= |
3397 |
|
export COLLECT_NAMES |
3398 |
|
fi |
3399 |
|
EOF |
3400 |
|
;; |
3401 |
|
|
3402 |
|
cygwin* | mingw* | pw32* | os2*) |
3403 |
|
cat <<'EOF' >> "$cfgfile" |
3404 |
|
# This is a source program that is used to create dlls on Windows |
3405 |
|
# Don't remove nor modify the starting and closing comments |
3406 |
|
_LT_AC_FILE_LTDLL_C |
3407 |
|
# This is a source program that is used to create import libraries |
3408 |
|
# on Windows for dlls which lack them. Don't remove nor modify the |
3409 |
|
# starting and closing comments |
3410 |
|
_LT_AC_FILE_IMPGEN_C |
3411 |
|
EOF |
3412 |
|
;; |
3413 |
|
esac |
3414 |
|
|
3415 |
|
# We use sed instead of cat because bash on DJGPP gets confused if |
3416 |
|
# if finds mixed CR/LF and LF-only lines. Since sed operates in |
3417 |
|
# text mode, it properly converts lines to CR/LF. This bash problem |
3418 |
|
# is reportedly fixed, but why not run on old versions too? |
3419 |
|
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) |
3420 |
|
|
3421 |
|
mv -f "$cfgfile" "$ofile" || \ |
3422 |
|
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") |
3423 |
|
chmod +x "$ofile" |
3424 |
|
]) |
3425 |
|
else |
3426 |
|
# If there is no Makefile yet, we rely on a make rule to execute |
3427 |
|
# `config.status --recheck' to rerun these tests and create the |
3428 |
|
# libtool script then. |
3429 |
|
test -f Makefile && make "$ltmain" |
3430 |
|
fi |
3431 |
|
])# AC_LIBTOOL_CONFIG |
3432 |
|
|
3433 |
|
|
3434 |
|
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) |
3435 |
|
# ------------------------------------------- |
3436 |
|
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], |
3437 |
|
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
3438 |
|
|
3439 |
|
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
3440 |
|
|
3441 |
|
if test "$GCC" = yes; then |
3442 |
|
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
3443 |
|
|
3444 |
|
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], |
3445 |
|
lt_cv_prog_compiler_rtti_exceptions, |
3446 |
|
[-fno-rtti -fno-exceptions -c conftest.$ac_ext], [], |
3447 |
|
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) |
3448 |
|
fi |
3449 |
|
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI |
3450 |
|
|
3451 |
|
|
3452 |
|
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
3453 |
|
# --------------------------------- |
3454 |
|
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
3455 |
|
[AC_REQUIRE([AC_CANONICAL_HOST]) |
3456 |
|
AC_REQUIRE([AC_PROG_NM]) |
3457 |
|
AC_REQUIRE([AC_OBJEXT]) |
3458 |
|
# Check for command to grab the raw symbol name followed by C symbol from nm. |
3459 |
|
AC_MSG_CHECKING([command to parse $NM output from $compiler object]) |
3460 |
|
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], |
3461 |
|
[ |
3462 |
|
# These are sane defaults that work on at least a few old systems. |
3463 |
|
# [They come from Ultrix. What could be older than Ultrix?!! ;)] |
3464 |
|
|
3465 |
|
# Character class describing NM global symbol codes. |
3466 |
|
[symcode='[BCDEGRST]'] |
3467 |
|
|
3468 |
|
# Regexp to match symbols that can be accessed directly from C. |
3469 |
|
[sympat='\([_A-Za-z][_A-Za-z0-9]*\)'] |
3470 |
|
|
3471 |
|
# Transform the above into a raw symbol and a C symbol. |
3472 |
|
symxfrm='\1 \2\3 \3' |
3473 |
|
|
3474 |
|
# Transform an extracted symbol line into a proper C declaration |
3475 |
|
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" |
3476 |
|
|
3477 |
|
# Define system-specific variables. |
3478 |
|
case $host_os in |
3479 |
|
aix*) |
3480 |
|
[symcode='[BCDT]'] |
3481 |
|
;; |
3482 |
|
cygwin* | mingw* | pw32*) |
3483 |
|
[symcode='[ABCDGISTW]'] |
3484 |
|
;; |
3485 |
|
hpux*) # Its linker distinguishes data from code symbols |
3486 |
|
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
3487 |
|
;; |
3488 |
|
irix*) |
3489 |
|
[symcode='[BCDEGRST]'] |
3490 |
|
;; |
3491 |
|
solaris* | sysv5*) |
3492 |
|
[symcode='[BDT]'] |
3493 |
|
;; |
3494 |
|
sysv4) |
3495 |
|
[symcode='[DFNSTU]'] |
3496 |
|
;; |
3497 |
|
esac |
3498 |
|
|
3499 |
|
# Handle CRLF in mingw tool chain |
3500 |
|
opt_cr= |
3501 |
|
case $host_os in |
3502 |
|
mingw*) |
3503 |
|
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
3504 |
|
;; |
3505 |
|
esac |
3506 |
|
|
3507 |
|
# If we're using GNU nm, then use its standard symbol codes. |
3508 |
|
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
3509 |
|
[symcode='[ABCDGISTW]'] |
3510 |
|
fi |
3511 |
|
|
3512 |
|
# Try without a prefix undercore, then with it. |
3513 |
|
for ac_symprfx in "" "_"; do |
3514 |
|
|
3515 |
|
# Write the raw and C identifiers. |
3516 |
|
lt_cv_sys_global_symbol_pipe=["sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"] |
3517 |
|
|
3518 |
|
# Check to see that the pipe works correctly. |
3519 |
|
pipe_works=no |
3520 |
|
|
3521 |
|
rm -f conftest* |
3522 |
|
cat > conftest.$ac_ext <<EOF |
3523 |
|
#ifdef __cplusplus |
3524 |
|
extern "C" { |
3525 |
|
#endif |
3526 |
|
char nm_test_var; |
3527 |
|
void nm_test_func(){} |
3528 |
|
#ifdef __cplusplus |
3529 |
|
} |
3530 |
|
#endif |
3531 |
|
int main(){nm_test_var='a';nm_test_func();return(0);} |
3532 |
|
EOF |
3533 |
|
|
3534 |
|
if AC_TRY_EVAL(ac_compile); then |
3535 |
|
# Now try to grab the symbols. |
3536 |
|
nlist=conftest.nm |
3537 |
|
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
3538 |
|
# Try sorting and uniquifying the output. |
3539 |
|
if sort "$nlist" | uniq > "$nlist"T; then |
3540 |
|
mv -f "$nlist"T "$nlist" |
3541 |
|
else |
3542 |
|
rm -f "$nlist"T |
3543 |
|
fi |
3544 |
|
|
3545 |
|
# Make sure that we snagged all the symbols we need. |
3546 |
|
if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
3547 |
|
if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
3548 |
|
cat <<EOF > conftest.$ac_ext |
3549 |
|
#ifdef __cplusplus |
3550 |
|
extern "C" { |
3551 |
|
#endif |
3552 |
|
|
3553 |
|
EOF |
3554 |
|
# Now generate the symbol file. |
3555 |
|
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' |
3556 |
|
|
3557 |
|
cat <<EOF >> conftest.$ac_ext |
3558 |
|
#if defined (__STDC__) && __STDC__ |
3559 |
|
# define lt_ptr_t void * |
3560 |
|
#else |
3561 |
|
# define lt_ptr_t char * |
3562 |
|
# define const |
3563 |
|
#endif |
3564 |
|
|
3565 |
|
/* The mapping between symbol names and symbols. */ |
3566 |
|
const struct { |
3567 |
|
const char *name; |
3568 |
|
lt_ptr_t address; |
3569 |
|
} |
3570 |
|
[lt_preloaded_symbols[] =] |
3571 |
|
{ |
3572 |
|
EOF |
3573 |
|
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext |
3574 |
|
cat <<\EOF >> conftest.$ac_ext |
3575 |
|
{0, (lt_ptr_t) 0} |
3576 |
|
}; |
3577 |
|
|
3578 |
|
#ifdef __cplusplus |
3579 |
|
} |
3580 |
|
#endif |
3581 |
|
EOF |
3582 |
|
# Now try linking the two files. |
3583 |
|
mv conftest.$ac_objext conftstm.$ac_objext |
3584 |
|
lt_save_LIBS="$LIBS" |
3585 |
|
lt_save_CFLAGS="$CFLAGS" |
3586 |
|
LIBS="conftstm.$ac_objext" |
3587 |
|
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" |
3588 |
|
if AC_TRY_EVAL(ac_link) && test -s conftest; then |
3589 |
|
pipe_works=yes |
3590 |
|
fi |
3591 |
|
LIBS="$lt_save_LIBS" |
3592 |
|
CFLAGS="$lt_save_CFLAGS" |
3593 |
|
else |
3594 |
|
echo "cannot find nm_test_func in $nlist" >&AC_FD_CC |
3595 |
|
fi |
3596 |
|
else |
3597 |
|
echo "cannot find nm_test_var in $nlist" >&AC_FD_CC |
3598 |
|
fi |
3599 |
|
else |
3600 |
|
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC |
3601 |
|
fi |
3602 |
|
else |
3603 |
|
echo "$progname: failed program was:" >&AC_FD_CC |
3604 |
|
cat conftest.$ac_ext >&5 |
3605 |
|
fi |
3606 |
|
rm -f conftest* conftst* |
3607 |
|
|
3608 |
|
# Do not use the global_symbol_pipe unless it works. |
3609 |
|
if test "$pipe_works" = yes; then |
3610 |
|
break |
3611 |
|
else |
3612 |
|
lt_cv_sys_global_symbol_pipe= |
3613 |
|
fi |
3614 |
|
done |
3615 |
|
]) |
3616 |
|
if test -z "$lt_cv_sys_global_symbol_pipe"; then |
3617 |
|
lt_cv_sys_global_symbol_to_cdecl= |
3618 |
|
fi |
3619 |
|
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then |
3620 |
|
AC_MSG_RESULT(failed) |
3621 |
|
else |
3622 |
|
AC_MSG_RESULT(ok) |
3623 |
|
fi |
3624 |
|
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
3625 |
|
|
3626 |
|
|
3627 |
|
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) |
3628 |
|
# --------------------------------------- |
3629 |
|
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], |
3630 |
|
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= |
3631 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
3632 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= |
3633 |
|
|
3634 |
|
AC_MSG_CHECKING([for $compiler option to produce PIC]) |
3635 |
|
if test "$GCC" = yes; then |
3636 |
|
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
3637 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
3638 |
|
|
3639 |
|
case $host_os in |
3640 |
|
aix*) |
3641 |
|
# All AIX code is PIC. |
3642 |
|
if test "$host_cpu" = ia64; then |
3643 |
|
# AIX 5 now supports IA64 processor |
3644 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
3645 |
|
else |
3646 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
3647 |
|
fi |
3648 |
|
;; |
3649 |
|
|
3650 |
|
amigaos*) |
3651 |
|
# FIXME: we need at least 68020 code to build shared libraries, but |
3652 |
|
# adding the `-m68020' flag to GCC prevents building anything better, |
3653 |
|
# like `-m68040'. |
3654 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
3655 |
|
;; |
3656 |
|
|
3657 |
|
beos* | irix5* | irix6* | osf3* | osf4* | osf5*) |
3658 |
|
# PIC is the default for these OSes. |
3659 |
|
;; |
3660 |
|
|
3661 |
|
cygwin* | mingw* | pw32* | os2*) |
3662 |
|
# This hack is so that the source file can tell whether it is being |
3663 |
|
# built for inclusion in a dll (and should export symbols for example). |
3664 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
3665 |
|
;; |
3666 |
|
|
3667 |
|
darwin* | rhapsody*) |
3668 |
|
# PIC is the default on this platform |
3669 |
|
# Common symbols not allowed in MH_DYLIB files |
3670 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
3671 |
|
;; |
3672 |
|
|
3673 |
|
*djgpp*) |
3674 |
|
# DJGPP does not support shared libraries at all |
3675 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
3676 |
|
;; |
3677 |
|
|
3678 |
|
sysv4*MP*) |
3679 |
|
if test -d /usr/nec; then |
3680 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
3681 |
|
fi |
3682 |
|
;; |
3683 |
|
|
3684 |
|
*) |
3685 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
3686 |
|
;; |
3687 |
|
esac |
3688 |
|
else |
3689 |
|
# PORTME Check for flag to pass linker flags through the system compiler. |
3690 |
|
case $host_os in |
3691 |
|
aix*) |
3692 |
|
if test "$host_cpu" = ia64; then |
3693 |
|
# AIX 5 now supports IA64 processor |
3694 |
|
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
3695 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
3696 |
|
else |
3697 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
3698 |
|
fi |
3699 |
|
;; |
3700 |
|
|
3701 |
|
cygwin* | mingw* | pw32* | os2*) |
3702 |
|
# This hack is so that the source file can tell whether it is being |
3703 |
|
# built for inclusion in a dll (and should export symbols for example). |
3704 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
3705 |
|
;; |
3706 |
|
|
3707 |
|
hpux9* | hpux10* | hpux11*) |
3708 |
|
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
3709 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
3710 |
|
# Is there a better lt_prog_compiler_static that works with the bundled CC? |
3711 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' |
3712 |
|
;; |
3713 |
|
|
3714 |
|
irix5* | irix6*) |
3715 |
|
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
3716 |
|
# PIC (with -KPIC) is the default. |
3717 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
3718 |
|
;; |
3719 |
|
|
3720 |
|
newsos6) |
3721 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
3722 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
3723 |
|
;; |
3724 |
|
|
3725 |
|
osf3* | osf4* | osf5*) |
3726 |
|
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
3727 |
|
# All OSF/1 code is PIC. |
3728 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
3729 |
|
;; |
3730 |
|
|
3731 |
|
sco3.2v5*) |
3732 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' |
3733 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' |
3734 |
|
;; |
3735 |
|
|
3736 |
|
solaris*) |
3737 |
|
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
3738 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
3739 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
3740 |
|
;; |
3741 |
|
|
3742 |
|
sunos4*) |
3743 |
|
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
3744 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
3745 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
3746 |
|
;; |
3747 |
|
|
3748 |
|
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
3749 |
|
if test "x$host_vendor" = xsni; then |
3750 |
|
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD' |
3751 |
|
else |
3752 |
|
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
3753 |
|
fi |
3754 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
3755 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
3756 |
|
;; |
3757 |
|
|
3758 |
|
sysv4*MP*) |
3759 |
|
if test -d /usr/nec ;then |
3760 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' |
3761 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
3762 |
|
fi |
3763 |
|
;; |
3764 |
|
|
3765 |
|
uts4*) |
3766 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
3767 |
|
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
3768 |
|
;; |
3769 |
|
|
3770 |
|
*) |
3771 |
|
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
3772 |
|
;; |
3773 |
|
esac |
3774 |
|
fi |
3775 |
|
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) |
3776 |
|
|
3777 |
|
# |
3778 |
|
# Check to make sure the PIC flag actually works. |
3779 |
|
# |
3780 |
|
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then |
3781 |
|
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], |
3782 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), |
3783 |
|
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [], |
3784 |
|
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in |
3785 |
|
"" | " "*) ;; |
3786 |
|
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; |
3787 |
|
esac], |
3788 |
|
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
3789 |
|
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) |
3790 |
|
fi |
3791 |
|
case "$host_os" in |
3792 |
|
# For platforms which do not support PIC, -DPIC is meaningless: |
3793 |
|
*djgpp*) |
3794 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
3795 |
|
;; |
3796 |
|
*) |
3797 |
|
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC" |
3798 |
|
;; |
3799 |
|
esac |
3800 |
|
]) |
3801 |
|
|
3802 |
|
|
3803 |
|
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) |
3804 |
|
# ------------------------------------ |
3805 |
|
# See if the linker supports building shared libraries. |
3806 |
|
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], |
3807 |
|
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
3808 |
|
|
3809 |
|
runpath_var= |
3810 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)= |
3811 |
|
|
3812 |
|
_LT_AC_TAGVAR(archive_cmds, $1)= |
3813 |
|
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)= |
3814 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
3815 |
|
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= |
3816 |
|
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= |
3817 |
|
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
3818 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
3819 |
|
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)= |
3820 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
3821 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
3822 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
3823 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
3824 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
3825 |
|
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
3826 |
|
_LT_AC_TAGVAR(always_export_symbols, $1)=no |
3827 |
|
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
3828 |
|
# include_expsyms should be a list of space-separated symbols to be *always* |
3829 |
|
# included in the symbol list |
3830 |
|
_LT_AC_TAGVAR(include_expsyms, $1)= |
3831 |
|
# exclude_expsyms can be an egrep regular expression of symbols to exclude |
3832 |
|
# it will be wrapped by ` (' and `)$', so one must not match beginning or |
3833 |
|
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
3834 |
|
# as well as any symbol that contains `d'. |
3835 |
|
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" |
3836 |
|
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
3837 |
|
# platforms (ab)use it in PIC code, but their linkers get confused if |
3838 |
|
# the symbol is explicitly referenced. Since portable code cannot |
3839 |
|
# rely on this symbol name, it's probably fine to never include it in |
3840 |
|
# preloaded symbol tables. |
3841 |
|
extract_expsyms_cmds= |
3842 |
|
|
3843 |
|
case $host_os in |
3844 |
|
cygwin* | mingw* | pw32* ) |
3845 |
|
# FIXME: the MSVC++ port hasn't been tested in a loooong time |
3846 |
|
# When not using gcc, we currently assume that we are using |
3847 |
|
# Microsoft Visual C++. |
3848 |
|
if test "$GCC" != yes; then |
3849 |
|
with_gnu_ld=no |
3850 |
|
fi |
3851 |
|
;; |
3852 |
|
|
3853 |
|
esac |
3854 |
|
|
3855 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=yes |
3856 |
|
if test "$with_gnu_ld" = yes; then |
3857 |
|
# If archive_cmds runs LD, not CC, wlarc should be empty |
3858 |
|
wlarc='${wl}' |
3859 |
|
|
3860 |
|
# See if GNU ld supports shared libraries. |
3861 |
|
case $host_os in |
3862 |
|
aix3* | aix4* | aix5*) |
3863 |
|
# On AIX, the GNU linker is very broken |
3864 |
|
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. |
3865 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
3866 |
|
cat <<EOF 1>&2 |
3867 |
|
|
3868 |
|
*** Warning: the GNU linker, at least up to release 2.9.1, is reported |
3869 |
|
*** to be unable to reliably create shared libraries on AIX. |
3870 |
|
*** Therefore, libtool is disabling shared libraries support. If you |
3871 |
|
*** really care for shared libraries, you may want to modify your PATH |
3872 |
|
*** so that a non-GNU linker is found, and then restart. |
3873 |
|
|
3874 |
|
EOF |
3875 |
|
;; |
3876 |
|
|
3877 |
|
amigaos*) |
3878 |
|
_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)' |
3879 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
3880 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
3881 |
|
|
3882 |
|
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
3883 |
|
# that the semantics of dynamic libraries on AmigaOS, at least up |
3884 |
|
# to version 4, is to share data among multiple programs linked |
3885 |
|
# with the same dynamic library. Since this doesn't match the |
3886 |
|
# behavior of shared libraries on other platforms, we can't use |
3887 |
|
# them. |
3888 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
3889 |
|
;; |
3890 |
|
|
3891 |
|
beos*) |
3892 |
|
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
3893 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
3894 |
|
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
3895 |
|
# support --undefined. This deserves some investigation. FIXME |
3896 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
3897 |
|
else |
3898 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
3899 |
|
fi |
3900 |
|
;; |
3901 |
|
|
3902 |
|
cygwin* | mingw* | pw32*) |
3903 |
|
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is |
3904 |
|
# no search path for DLLs. |
3905 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
3906 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
3907 |
|
_LT_AC_TAGVAR(always_export_symbols, $1)=yes |
3908 |
|
|
3909 |
|
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ |
3910 |
|
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ |
3911 |
|
test -f $output_objdir/impgen.exe || (cd $output_objdir && \ |
3912 |
|
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ |
3913 |
|
else $CC -o impgen impgen.c ; fi)~ |
3914 |
|
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' |
3915 |
|
|
3916 |
|
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' |
3917 |
|
|
3918 |
|
# cygwin and mingw dlls have different entry points and sets of symbols |
3919 |
|
# to exclude. |
3920 |
|
# FIXME: what about values for MSVC? |
3921 |
|
dll_entry=__cygwin_dll_entry@12 |
3922 |
|
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ |
3923 |
|
case $host_os in |
3924 |
|
mingw*) |
3925 |
|
# mingw values |
3926 |
|
dll_entry=_DllMainCRTStartup@12 |
3927 |
|
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ |
3928 |
|
;; |
3929 |
|
esac |
3930 |
|
|
3931 |
|
# mingw and cygwin differ, and it's simplest to just exclude the union |
3932 |
|
# of the two symbol sets. |
3933 |
|
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 |
3934 |
|
|
3935 |
|
# recent cygwin and mingw systems supply a stub DllMain which the user |
3936 |
|
# can override, but on older systems we have to supply one (in ltdll.c) |
3937 |
|
if test "x$lt_cv_need_dllmain" = "xyes"; then |
3938 |
|
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " |
3939 |
|
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~ |
3940 |
|
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' |
3941 |
|
else |
3942 |
|
ltdll_obj= |
3943 |
|
ltdll_cmds= |
3944 |
|
fi |
3945 |
|
|
3946 |
|
# Extract the symbol export list from an `--export-all' def file, |
3947 |
|
# then regenerate the def file from the symbol export list, so that |
3948 |
|
# the compiled dll only exports the symbol export list. |
3949 |
|
# Be careful not to strip the DATA tag left by newer dlltools. |
3950 |
|
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"' |
3951 |
|
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ |
3952 |
|
[sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols' |
3953 |
|
|
3954 |
|
# If the export-symbols file already is a .def file (1st line |
3955 |
|
# is EXPORTS), use it as is. |
3956 |
|
# If DATA tags from a recent dlltool are present, honour them! |
3957 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then |
3958 |
|
cp $export_symbols $output_objdir/$soname-def; |
3959 |
|
else |
3960 |
|
echo EXPORTS > $output_objdir/$soname-def; |
3961 |
|
_lt_hint=1; |
3962 |
|
cat $export_symbols | while read symbol; do |
3963 |
|
set dummy \$symbol; |
3964 |
|
case \[$]# in |
3965 |
|
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; |
3966 |
|
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; |
3967 |
|
esac; |
3968 |
|
_lt_hint=`expr 1 + \$_lt_hint`; |
3969 |
|
done; |
3970 |
|
fi~ |
3971 |
|
'"$ltdll_cmds"' |
3972 |
|
$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~ |
3973 |
|
$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~ |
3974 |
|
$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~ |
3975 |
|
$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~ |
3976 |
|
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' |
3977 |
|
;; |
3978 |
|
|
3979 |
|
darwin* | rhapsody*) |
3980 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' |
3981 |
|
# FIXME: Relying on posixy $() will cause problems for |
3982 |
|
# cross-compilation, but unfortunately the echo tests do not |
3983 |
|
# yet detect zsh echo's removal of \ escapes. |
3984 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)' |
3985 |
|
# We need to add '_' to the symbols in $export_symbols first |
3986 |
|
#_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols' |
3987 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
3988 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
3989 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' |
3990 |
|
;; |
3991 |
|
|
3992 |
|
netbsd*) |
3993 |
|
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
3994 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
3995 |
|
wlarc= |
3996 |
|
else |
3997 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
3998 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
3999 |
|
fi |
4000 |
|
;; |
4001 |
|
|
4002 |
|
solaris* | sysv5*) |
4003 |
|
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
4004 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
4005 |
|
cat <<EOF 1>&2 |
4006 |
|
|
4007 |
|
*** Warning: The releases 2.8.* of the GNU linker cannot reliably |
4008 |
|
*** create shared libraries on Solaris systems. Therefore, libtool |
4009 |
|
*** is disabling shared libraries support. We urge you to upgrade GNU |
4010 |
|
*** binutils to release 2.9.1 or newer. Another option is to modify |
4011 |
|
*** your PATH or compiler configuration so that the native linker is |
4012 |
|
*** used, and then restart. |
4013 |
|
|
4014 |
|
EOF |
4015 |
|
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
4016 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
4017 |
|
_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' |
4018 |
|
else |
4019 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
4020 |
|
fi |
4021 |
|
;; |
4022 |
|
|
4023 |
|
sunos4*) |
4024 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
4025 |
|
wlarc= |
4026 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4027 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4028 |
|
;; |
4029 |
|
|
4030 |
|
*) |
4031 |
|
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
4032 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
4033 |
|
_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' |
4034 |
|
else |
4035 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
4036 |
|
fi |
4037 |
|
;; |
4038 |
|
esac |
4039 |
|
|
4040 |
|
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then |
4041 |
|
runpath_var=LD_RUN_PATH |
4042 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' |
4043 |
|
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
4044 |
|
case $host_os in |
4045 |
|
cygwin* | mingw* | pw32*) |
4046 |
|
# dlltool doesn't understand --whole-archive et. al. |
4047 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
4048 |
|
;; |
4049 |
|
*) |
4050 |
|
# ancient GNU ld didn't support --whole-archive et. al. |
4051 |
|
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
4052 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
4053 |
|
else |
4054 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
4055 |
|
fi |
4056 |
|
;; |
4057 |
|
esac |
4058 |
|
fi |
4059 |
|
else |
4060 |
|
# PORTME fill in a description of your system's linker (not GNU ld) |
4061 |
|
case $host_os in |
4062 |
|
aix3*) |
4063 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
4064 |
|
_LT_AC_TAGVAR(always_export_symbols, $1)=yes |
4065 |
|
_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' |
4066 |
|
# Note: this linker hardcodes the directories in LIBPATH if there |
4067 |
|
# are no directories specified by -L. |
4068 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
4069 |
|
if test "$GCC" = yes && test -z "$link_static_flag"; then |
4070 |
|
# Neither direct hardcoding nor static linking is supported with a |
4071 |
|
# broken collect2. |
4072 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
4073 |
|
fi |
4074 |
|
;; |
4075 |
|
|
4076 |
|
aix4* | aix5*) |
4077 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4078 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
4079 |
|
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
4080 |
|
# When large executables or shared objects are built, AIX ld can |
4081 |
|
# have problems creating the table of contents. If linking a library |
4082 |
|
# or program results in "error TOC overflow" add -mminimal-toc to |
4083 |
|
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
4084 |
|
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
4085 |
|
if test "$GCC" = yes; then |
4086 |
|
case $host_os in aix4.[012]|aix4.[-12].*) |
4087 |
|
# We only want to do this on AIX 4.2 and lower, the check |
4088 |
|
# below for broken collect2 doesn't work under 4.3+ |
4089 |
|
collect2name=`${CC} -print-prog-name=collect2` |
4090 |
|
if test -f "$collect2name" && \ |
4091 |
|
strings "$collect2name" | grep resolve_lib_name >/dev/null |
4092 |
|
then |
4093 |
|
# We have reworked collect2 |
4094 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4095 |
|
else |
4096 |
|
# We have old collect2 |
4097 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
4098 |
|
# It fails to find uninstalled libraries when the uninstalled |
4099 |
|
# path is not listed in the libpath. Setting hardcode_minus_L |
4100 |
|
# to unsupported forces relinking |
4101 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
4102 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
4103 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
4104 |
|
fi |
4105 |
|
esac |
4106 |
|
shared_flag='-shared' |
4107 |
|
else |
4108 |
|
# not using gcc |
4109 |
|
if test "$host_cpu" = ia64; then |
4110 |
|
shared_flag='${wl}-G' |
4111 |
|
else |
4112 |
|
shared_flag='${wl}-bM:SRE' |
4113 |
|
fi |
4114 |
|
fi |
4115 |
|
|
4116 |
|
if test "$host_cpu" = ia64; then |
4117 |
|
# On IA64, the linker does run time linking by default, so we don't |
4118 |
|
# have to do anything special. |
4119 |
|
aix_use_runtimelinking=no |
4120 |
|
exp_sym_flag='-Bexport' |
4121 |
|
no_entry_flag="" |
4122 |
|
else |
4123 |
|
# Test if we are trying to use run time linking, or normal AIX style |
4124 |
|
# linking. If -brtl is somewhere in LDFLAGS, we need to do run time |
4125 |
|
# linking. |
4126 |
|
aix_use_runtimelinking=no |
4127 |
|
for ld_flag in $LDFLAGS; do |
4128 |
|
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then |
4129 |
|
aix_use_runtimelinking=yes |
4130 |
|
break |
4131 |
|
fi |
4132 |
|
done |
4133 |
|
exp_sym_flag='-bexport' |
4134 |
|
no_entry_flag='-bnoentry' |
4135 |
|
fi |
4136 |
|
# -bexpall does not export symbols beginning with underscore (_) |
4137 |
|
_LT_AC_TAGVAR(always_export_symbols, $1)=yes |
4138 |
|
if test "$aix_use_runtimelinking" = yes; then |
4139 |
|
# Warning - without using the other run time loading flags (-brtl), |
4140 |
|
# -berok will link without error, but may produce a broken |
4141 |
|
# library. |
4142 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' $wl}-berok' |
4143 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:/usr/lib:/lib' |
4144 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
4145 |
|
else |
4146 |
|
if test "$host_cpu" = ia64; then |
4147 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
4148 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
4149 |
|
_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" |
4150 |
|
else |
4151 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' |
4152 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' |
4153 |
|
# -bexpall does not export symbols beginning with underscore (_) |
4154 |
|
_LT_AC_TAGVAR(always_export_symbols, $1)=yes |
4155 |
|
# Exported symbols can be pulled into shared objects from archives |
4156 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' |
4157 |
|
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
4158 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:/usr/lib:/lib' |
4159 |
|
# This is similar to how AIX traditionally builds it's shared |
4160 |
|
# libraries. |
4161 |
|
_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' |
4162 |
|
fi |
4163 |
|
fi |
4164 |
|
;; |
4165 |
|
|
4166 |
|
amigaos*) |
4167 |
|
_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)' |
4168 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
4169 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
4170 |
|
# see comment about different semantics on the GNU ld section |
4171 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
4172 |
|
;; |
4173 |
|
|
4174 |
|
bsdi4*) |
4175 |
|
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic |
4176 |
|
;; |
4177 |
|
|
4178 |
|
cygwin* | mingw* | pw32*) |
4179 |
|
# When not using gcc, we currently assume that we are using |
4180 |
|
# Microsoft Visual C++. |
4181 |
|
# hardcode_libdir_flag_spec is actually meaningless, as there is |
4182 |
|
# no search path for DLLs. |
4183 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
4184 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
4185 |
|
# Tell ltmain to make .lib files, not .a files. |
4186 |
|
libext=lib |
4187 |
|
# FIXME: Setting linknames here is a bad hack. |
4188 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
4189 |
|
# The linker will automatically build a .lib file if we build a DLL. |
4190 |
|
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' |
4191 |
|
# FIXME: Should let the user specify the lib program. |
4192 |
|
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' |
4193 |
|
fix_srcfile_path='`cygpath -w "$srcfile"`' |
4194 |
|
;; |
4195 |
|
|
4196 |
|
dgux*) |
4197 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
4198 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
4199 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4200 |
|
;; |
4201 |
|
|
4202 |
|
freebsd1*) |
4203 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
4204 |
|
;; |
4205 |
|
|
4206 |
|
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
4207 |
|
# support. Future versions do this automatically, but an explicit c++rt0.o |
4208 |
|
# does not break anything, and helps significantly (at the cost of a little |
4209 |
|
# extra space). |
4210 |
|
freebsd2.2*) |
4211 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
4212 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
4213 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4214 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4215 |
|
;; |
4216 |
|
|
4217 |
|
# Unfortunately, older versions of FreeBSD 2 do not have this feature. |
4218 |
|
freebsd2*) |
4219 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
4220 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4221 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
4222 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4223 |
|
;; |
4224 |
|
|
4225 |
|
# FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
4226 |
|
freebsd*) |
4227 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
4228 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
4229 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4230 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4231 |
|
;; |
4232 |
|
|
4233 |
|
hpux9* | hpux10* | hpux11*) |
4234 |
|
case $host_os in |
4235 |
|
hpux9*) _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' ;; |
4236 |
|
*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; |
4237 |
|
esac |
4238 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
4239 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
4240 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4241 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but as the default |
4242 |
|
# location of the library. |
4243 |
|
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
4244 |
|
;; |
4245 |
|
|
4246 |
|
irix5* | irix6*) |
4247 |
|
if test "$GCC" = yes; then |
4248 |
|
_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' |
4249 |
|
else |
4250 |
|
_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' |
4251 |
|
fi |
4252 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
4253 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
4254 |
|
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
4255 |
|
;; |
4256 |
|
|
4257 |
|
netbsd*) |
4258 |
|
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
4259 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
4260 |
|
else |
4261 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
4262 |
|
fi |
4263 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
4264 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4265 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4266 |
|
;; |
4267 |
|
|
4268 |
|
newsos6) |
4269 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
4270 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4271 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
4272 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
4273 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4274 |
|
;; |
4275 |
|
|
4276 |
|
openbsd*) |
4277 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
4278 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
4279 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4280 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4281 |
|
;; |
4282 |
|
|
4283 |
|
os2*) |
4284 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
4285 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
4286 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
4287 |
|
_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' |
4288 |
|
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
4289 |
|
;; |
4290 |
|
|
4291 |
|
osf3*) |
4292 |
|
if test "$GCC" = yes; then |
4293 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
4294 |
|
_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' |
4295 |
|
else |
4296 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
4297 |
|
_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' |
4298 |
|
fi |
4299 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
4300 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
4301 |
|
;; |
4302 |
|
|
4303 |
|
osf4* | osf5*) # as osf3* with the addition of -msym flag |
4304 |
|
if test "$GCC" = yes; then |
4305 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
4306 |
|
_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' |
4307 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
4308 |
|
else |
4309 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
4310 |
|
_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' |
4311 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
4312 |
|
$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' |
4313 |
|
|
4314 |
|
# Both c and cxx compiler support -rpath directly |
4315 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
4316 |
|
fi |
4317 |
|
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
4318 |
|
;; |
4319 |
|
|
4320 |
|
sco3.2v5*) |
4321 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
4322 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4323 |
|
runpath_var=LD_RUN_PATH |
4324 |
|
hardcode_runpath_var=yes |
4325 |
|
;; |
4326 |
|
|
4327 |
|
solaris*) |
4328 |
|
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z defs' |
4329 |
|
# $CC -shared without GNU ld will not create a library from C++ |
4330 |
|
# object files and a static libstdc++, better avoid it by now |
4331 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
4332 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
4333 |
|
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
4334 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
4335 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4336 |
|
case $host_os in |
4337 |
|
[solaris2.[0-5] | solaris2.[0-5].*]) ;; |
4338 |
|
*) # Supported since Solaris 2.6 (maybe 2.5.1?) |
4339 |
|
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; |
4340 |
|
esac |
4341 |
|
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
4342 |
|
;; |
4343 |
|
|
4344 |
|
sunos4*) |
4345 |
|
if test "x$host_vendor" = xsequent; then |
4346 |
|
# Use $CC to link under sequent, because it throws in some extra .o |
4347 |
|
# files that make .init and .fini sections work. |
4348 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
4349 |
|
else |
4350 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
4351 |
|
fi |
4352 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
4353 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4354 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
4355 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4356 |
|
;; |
4357 |
|
|
4358 |
|
sysv4) |
4359 |
|
if test "x$host_vendor" = xsni; then |
4360 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts' |
4361 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? |
4362 |
|
else |
4363 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
4364 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie |
4365 |
|
fi |
4366 |
|
runpath_var='LD_RUN_PATH' |
4367 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4368 |
|
;; |
4369 |
|
|
4370 |
|
sysv4.3*) |
4371 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
4372 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4373 |
|
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' |
4374 |
|
;; |
4375 |
|
|
4376 |
|
sysv4*MP*) |
4377 |
|
if test -d /usr/nec; then |
4378 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
4379 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4380 |
|
runpath_var=LD_RUN_PATH |
4381 |
|
hardcode_runpath_var=yes |
4382 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=yes |
4383 |
|
fi |
4384 |
|
;; |
4385 |
|
|
4386 |
|
sysv4.2uw2*) |
4387 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
4388 |
|
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
4389 |
|
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
4390 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4391 |
|
hardcode_runpath_var=yes |
4392 |
|
runpath_var=LD_RUN_PATH |
4393 |
|
;; |
4394 |
|
|
4395 |
|
sysv5uw7* | unixware7*) |
4396 |
|
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' |
4397 |
|
if test "$GCC" = yes; then |
4398 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
4399 |
|
else |
4400 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
4401 |
|
fi |
4402 |
|
runpath_var='LD_RUN_PATH' |
4403 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4404 |
|
;; |
4405 |
|
|
4406 |
|
sysv5*) |
4407 |
|
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' |
4408 |
|
# $CC -shared without GNU ld will not create a library from C++ |
4409 |
|
# object files and a static libstdc++, better avoid it by now |
4410 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
4411 |
|
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
4412 |
|
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
4413 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
4414 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4415 |
|
runpath_var='LD_RUN_PATH' |
4416 |
|
;; |
4417 |
|
|
4418 |
|
uts4*) |
4419 |
|
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
4420 |
|
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
4421 |
|
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
4422 |
|
;; |
4423 |
|
|
4424 |
|
*) |
4425 |
|
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
4426 |
|
;; |
4427 |
|
esac |
4428 |
|
fi |
4429 |
|
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) |
4430 |
|
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
4431 |
|
|
4432 |
|
variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
4433 |
|
if test "$GCC" = yes; then |
4434 |
|
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
4435 |
|
fi |
4436 |
|
|
4437 |
|
# |
4438 |
|
# Do we need to explicitly link libc? |
4439 |
|
# |
4440 |
|
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
4441 |
|
if test "$enable_shared" = yes && test "$GCC" = yes; then |
4442 |
|
case $_LT_AC_TAGVAR(archive_cmds, $1) in |
4443 |
|
*'~'*) |
4444 |
|
# FIXME: we may have to deal with multi-command sequences. |
4445 |
|
;; |
4446 |
|
'$CC '*) |
4447 |
|
# Test whether the compiler implicitly links with -lc since on some |
4448 |
|
# systems, -lgcc has to come before -lc. If gcc already passes -lc |
4449 |
|
# to ld, don't add -lc before -lgcc. |
4450 |
|
AC_MSG_CHECKING([whether -lc should be explicitly linked in]) |
4451 |
|
$rm conftest* |
4452 |
|
echo 'static int dummy;' > conftest.$ac_ext |
4453 |
|
|
4454 |
|
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then |
4455 |
|
soname=conftest |
4456 |
|
lib=conftest |
4457 |
|
libobjs=conftest.$ac_objext |
4458 |
|
deplibs= |
4459 |
|
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) |
4460 |
|
compiler_flags=-v |
4461 |
|
linker_flags=-v |
4462 |
|
verstring= |
4463 |
|
output_objdir=. |
4464 |
|
libname=conftest |
4465 |
|
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) |
4466 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)= |
4467 |
|
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
4468 |
|
then |
4469 |
|
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
4470 |
|
else |
4471 |
|
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
4472 |
|
fi |
4473 |
|
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag |
4474 |
|
else |
4475 |
|
cat conftest.err 1>&5 |
4476 |
|
fi |
4477 |
|
$rm conftest* |
4478 |
|
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) |
4479 |
|
;; |
4480 |
|
esac |
4481 |
|
fi |
4482 |
|
])# AC_LIBTOOL_PROG_LD_SHLIBS |
4483 |
|
|
4484 |
|
|
4485 |
|
# _LT_AC_FILE_LTDLL_C |
4486 |
|
# ------------------- |
4487 |
|
AC_DEFUN([_LT_AC_FILE_LTDLL_C], |
4488 |
|
[# /* ltdll.c starts here */ |
4489 |
|
# #define WIN32_LEAN_AND_MEAN |
4490 |
|
# #include <windows.h> |
4491 |
|
# #undef WIN32_LEAN_AND_MEAN |
4492 |
|
# #include <stdio.h> |
4493 |
|
# |
4494 |
|
# #ifndef __CYGWIN__ |
4495 |
|
# # ifdef __CYGWIN32__ |
4496 |
|
# # define __CYGWIN__ __CYGWIN32__ |
4497 |
|
# # endif |
4498 |
|
# #endif |
4499 |
|
# |
4500 |
|
# #ifdef __cplusplus |
4501 |
|
# extern "C" { |
4502 |
|
# #endif |
4503 |
|
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
4504 |
|
# #ifdef __cplusplus |
4505 |
|
# } |
4506 |
|
# #endif |
4507 |
|
# |
4508 |
|
# #ifdef __CYGWIN__ |
4509 |
|
# #include <cygwin/cygwin_dll.h> |
4510 |
|
# DECLARE_CYGWIN_DLL( DllMain ); |
4511 |
|
# #endif |
4512 |
|
# HINSTANCE __hDllInstance_base; |
4513 |
|
# |
4514 |
|
# BOOL APIENTRY |
4515 |
|
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
4516 |
|
# { |
4517 |
|
# __hDllInstance_base = hInst; |
4518 |
|
# return TRUE; |
4519 |
|
# } |
4520 |
|
# /* ltdll.c ends here */ |
4521 |
|
])# _LT_AC_FILE_LTDLL_C |
4522 |
|
|
4523 |
|
|
4524 |
|
# _LT_AC_FILE_IMPGEN_C |
4525 |
|
# -------------------- |
4526 |
|
AC_DEFUN([_LT_AC_FILE_IMPGEN_C], |
4527 |
|
[# /* impgen.c starts here */ |
4528 |
|
# /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. |
4529 |
|
# |
4530 |
|
# This file is part of GNU libtool. |
4531 |
|
# |
4532 |
|
# This program is free software; you can redistribute it and/or modify |
4533 |
|
# it under the terms of the GNU General Public License as published by |
4534 |
|
# the Free Software Foundation; either version 2 of the License, or |
4535 |
|
# (at your option) any later version. |
4536 |
|
# |
4537 |
|
# This program is distributed in the hope that it will be useful, |
4538 |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4539 |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4540 |
|
# GNU General Public License for more details. |
4541 |
|
# |
4542 |
|
# You should have received a copy of the GNU General Public License |
4543 |
|
# along with this program; if not, write to the Free Software |
4544 |
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
4545 |
|
# */ |
4546 |
|
# |
4547 |
|
# #include <stdio.h> /* for printf() */ |
4548 |
|
# #include <unistd.h> /* for open(), lseek(), read() */ |
4549 |
|
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */ |
4550 |
|
# #include <string.h> /* for strdup() */ |
4551 |
|
# |
4552 |
|
# /* O_BINARY isn't required (or even defined sometimes) under Unix */ |
4553 |
|
# #ifndef O_BINARY |
4554 |
|
# #define O_BINARY 0 |
4555 |
|
# #endif |
4556 |
|
# |
4557 |
|
# static unsigned int |
4558 |
|
# pe_get16 (fd, offset) |
4559 |
|
# int fd; |
4560 |
|
# int offset; |
4561 |
|
# { |
4562 |
|
# unsigned char b[2]; |
4563 |
|
# lseek (fd, offset, SEEK_SET); |
4564 |
|
# read (fd, b, 2); |
4565 |
|
# return b[0] + (b[1]<<8); |
4566 |
|
# } |
4567 |
|
# |
4568 |
|
# static unsigned int |
4569 |
|
# pe_get32 (fd, offset) |
4570 |
|
# int fd; |
4571 |
|
# int offset; |
4572 |
|
# { |
4573 |
|
# unsigned char b[4]; |
4574 |
|
# lseek (fd, offset, SEEK_SET); |
4575 |
|
# read (fd, b, 4); |
4576 |
|
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
4577 |
|
# } |
4578 |
|
# |
4579 |
|
# static unsigned int |
4580 |
|
# pe_as32 (ptr) |
4581 |
|
# void *ptr; |
4582 |
|
# { |
4583 |
|
# unsigned char *b = ptr; |
4584 |
|
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
4585 |
|
# } |
4586 |
|
# |
4587 |
|
# int |
4588 |
|
# main (argc, argv) |
4589 |
|
# int argc; |
4590 |
|
# char *argv[]; |
4591 |
|
# { |
4592 |
|
# int dll; |
4593 |
|
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; |
4594 |
|
# unsigned long export_rva, export_size, nsections, secptr, expptr; |
4595 |
|
# unsigned long name_rvas, nexp; |
4596 |
|
# unsigned char *expdata, *erva; |
4597 |
|
# char *filename, *dll_name; |
4598 |
|
# |
4599 |
|
# filename = argv[1]; |
4600 |
|
# |
4601 |
|
# dll = open(filename, O_RDONLY|O_BINARY); |
4602 |
|
# if (dll < 1) |
4603 |
|
# return 1; |
4604 |
|
# |
4605 |
|
# dll_name = filename; |
4606 |
|
# |
4607 |
|
# for (i=0; filename[i]; i++) |
4608 |
|
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') |
4609 |
|
# dll_name = filename + i +1; |
4610 |
|
# |
4611 |
|
# pe_header_offset = pe_get32 (dll, 0x3c); |
4612 |
|
# opthdr_ofs = pe_header_offset + 4 + 20; |
4613 |
|
# num_entries = pe_get32 (dll, opthdr_ofs + 92); |
4614 |
|
# |
4615 |
|
# if (num_entries < 1) /* no exports */ |
4616 |
|
# return 1; |
4617 |
|
# |
4618 |
|
# export_rva = pe_get32 (dll, opthdr_ofs + 96); |
4619 |
|
# export_size = pe_get32 (dll, opthdr_ofs + 100); |
4620 |
|
# nsections = pe_get16 (dll, pe_header_offset + 4 +2); |
4621 |
|
# secptr = (pe_header_offset + 4 + 20 + |
4622 |
|
# pe_get16 (dll, pe_header_offset + 4 + 16)); |
4623 |
|
# |
4624 |
|
# expptr = 0; |
4625 |
|
# for (i = 0; i < nsections; i++) |
4626 |
|
# { |
4627 |
|
# char sname[8]; |
4628 |
|
# unsigned long secptr1 = secptr + 40 * i; |
4629 |
|
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); |
4630 |
|
# unsigned long vsize = pe_get32 (dll, secptr1 + 16); |
4631 |
|
# unsigned long fptr = pe_get32 (dll, secptr1 + 20); |
4632 |
|
# lseek(dll, secptr1, SEEK_SET); |
4633 |
|
# read(dll, sname, 8); |
4634 |
|
# if (vaddr <= export_rva && vaddr+vsize > export_rva) |
4635 |
|
# { |
4636 |
|
# expptr = fptr + (export_rva - vaddr); |
4637 |
|
# if (export_rva + export_size > vaddr + vsize) |
4638 |
|
# export_size = vsize - (export_rva - vaddr); |
4639 |
|
# break; |
4640 |
|
# } |
4641 |
|
# } |
4642 |
|
# |
4643 |
|
# expdata = (unsigned char*)malloc(export_size); |
4644 |
|
# lseek (dll, expptr, SEEK_SET); |
4645 |
|
# read (dll, expdata, export_size); |
4646 |
|
# erva = expdata - export_rva; |
4647 |
|
# |
4648 |
|
# nexp = pe_as32 (expdata+24); |
4649 |
|
# name_rvas = pe_as32 (expdata+32); |
4650 |
|
# |
4651 |
|
# printf ("EXPORTS\n"); |
4652 |
|
# for (i = 0; i<nexp; i++) |
4653 |
|
# { |
4654 |
|
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); |
4655 |
|
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); |
4656 |
|
# } |
4657 |
|
# |
4658 |
|
# return 0; |
4659 |
|
# } |
4660 |
|
# /* impgen.c ends here */ |
4661 |
|
])# _LT_AC_FILE_IMPGEN_C |
4662 |
|
|
4663 |
|
# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) |
4664 |
|
# --------------------------------- |
4665 |
|
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) |
4666 |
|
|
4667 |
|
|
4668 |
# old names |
# old names |
4669 |
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
4670 |
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |