mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-12 14:06:37 +08:00
*** empty log message ***
This commit is contained in:
parent
9817e05d7b
commit
c23e0a74db
18
ltconfig.in
18
ltconfig.in
@ -1558,10 +1558,11 @@ finish_eval=
|
||||
shlibpath_var=
|
||||
version_type=none
|
||||
dynamic_linker="$host_os ld.so"
|
||||
sys_lib_search_path="/lib /usr/lib /usr/local/lib"
|
||||
check_shared_deplibs_method='none'
|
||||
# Need to set the preceding variable on all platforms that support
|
||||
# interlibrary dependencies.
|
||||
# 'none' -- dependencies disabled.
|
||||
# 'none' -- dependencies not supported.
|
||||
# 'pass_all' -- all dependencies passed with no checks.
|
||||
# 'test_compile' -- check by making test program.
|
||||
# 'file_regex' -- check by looking for filenames that look like the shared
|
||||
@ -1662,6 +1663,7 @@ linux-gnu*)
|
||||
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
check_shared_deplibs_method='file_magic ELF 32-bit LSB shared object'
|
||||
sys_lib_search_path="/lib /usr/lib /usr/local/lib `echo $LD_LIBRARY_PATH | sed -e 's/:/ /g'`"
|
||||
|
||||
if test -f /lib/ld.so.1; then
|
||||
dynamic_linker='GNU ld.so'
|
||||
@ -1802,16 +1804,18 @@ case "$ltmain" in
|
||||
pic_flag link_static_flag no_builtin_flag export_dynamic_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 postinstall_cmds postuninstall_cmds \
|
||||
old_postuninstall_cmds archive_cmds archive_sym_cmds postinstall_cmds postuninstall_cmds \
|
||||
check_shared_deplibs_method allow_undefined_flag no_undefined_flag \
|
||||
finish_cmds finish_eval global_symbol_pipe \
|
||||
hardcode_libdir_flag_spec hardcode_libdir_separator \
|
||||
hardcode_libdir_flag_spec hardcode_libdir_separator sys_lib_search_path \
|
||||
compiler_c_o compiler_o_lo need_locks; do
|
||||
|
||||
case "$var" in
|
||||
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
|
||||
old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \
|
||||
postinstall_cmds | postuninstall_cmds | finish_cmds)
|
||||
old_postinstall_cmds | old_postuninstall_cmds | \
|
||||
archive_cmds | archive_sym_cmds | \
|
||||
postinstall_cmds | postuninstall_cmds | \
|
||||
finish_cmds | sys_lib_search_path)
|
||||
# Double-quote double-evaled strings.
|
||||
eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`\\\""
|
||||
;;
|
||||
@ -2006,6 +2010,7 @@ old_archive_from_new_cmds=$old_archive_from_new_cmds
|
||||
|
||||
# Commands used to build and install a shared archive.
|
||||
archive_cmds=$archive_cmds
|
||||
archive_sym_cmds=$archive_sym_cmds
|
||||
postinstall_cmds=$postinstall_cmds
|
||||
postuninstall_cmds=$postuninstall_cmds
|
||||
|
||||
@ -2055,6 +2060,9 @@ hardcode_minus_L=$hardcode_minus_L
|
||||
# the resulting binary.
|
||||
hardcode_shlibpath_var=$hardcode_shlibpath_var
|
||||
|
||||
# System search path for libraries
|
||||
sys_lib_search_path=$sys_lib_search_path
|
||||
|
||||
# Fix the shell variable \$srcfile for the compiler.
|
||||
fix_srcfile_path="$fix_srcfile_path"
|
||||
EOF
|
||||
|
339
ltmain.in
339
ltmain.in
@ -575,8 +575,7 @@ compiler."
|
||||
convenience=
|
||||
old_convenience=
|
||||
deplibs=
|
||||
extradeplibs=
|
||||
lib_search_path="/lib /usr/lib"
|
||||
eval lib_search_path=\"$sys_lib_search_path\"
|
||||
|
||||
dlfiles=
|
||||
dlprefiles=
|
||||
@ -729,12 +728,10 @@ compiler."
|
||||
;;
|
||||
esac
|
||||
deplibs="$deplibs $arg"
|
||||
extradeplibs="$extradeplibs $arg"
|
||||
lib_search_path="$lib_search_path `expr $arg : '-L\(.*\)'`"
|
||||
;;
|
||||
|
||||
-l*) deplibs="$deplibs $arg" ;;
|
||||
-El*) extradeplibs="$extradeplibs -`expr $arg : '-E\(.*\)'`" ;;
|
||||
|
||||
-module)
|
||||
module=yes
|
||||
@ -1333,185 +1330,167 @@ compiler."
|
||||
fi
|
||||
|
||||
if test "$build_libtool_libs" = yes; then
|
||||
# Transform deplibs into only deplibs that can be linked in shared.
|
||||
## Gordon: Do you check for the existence of the libraries in deplibs
|
||||
## on the system? That should maybe be merged in here someplace....
|
||||
## Actually: I think test_compile and file_magic do this... file_regex
|
||||
## sorta does this. Only pas_all needs to be changed. -Toshio
|
||||
name_save=$name
|
||||
libname_save=$libname
|
||||
release_save=$release
|
||||
versuffix_save=$versuffix
|
||||
major_save=$major
|
||||
# I'm not sure if I'm treating the release correctly. I think
|
||||
# release should show up in the -l (ie -lgmp5) so we don't want to
|
||||
# add it in twice. Is that correct?
|
||||
release=""
|
||||
versuffix=""
|
||||
major=""
|
||||
newdeplibs=
|
||||
case "$check_shared_deplibs_method" in
|
||||
pass_all)
|
||||
newdeplibs=$deplibs
|
||||
;; # Don't check for shared/static. Everything works.
|
||||
# This might be a little naive. We might want to check
|
||||
# whether the library exists or not. But this is on
|
||||
# osf3 & osf4 and I'm not really sure... Just
|
||||
# implementing what was already the behaviour.
|
||||
test_compile)
|
||||
# This code stresses the "libraries are programs" paradigm to its
|
||||
# limits. Maybe even breaks it. We compile a program, linking it
|
||||
# against the deplibs as a proxy for the library. Then we can check
|
||||
# whether they linked in statically or dynamically with ldd.
|
||||
$rm conftest.c
|
||||
cat > conftest.c <<EOF
|
||||
int main() { return 0; }
|
||||
# Transform deplibs into only deplibs that can be linked in shared.
|
||||
## Gordon: Do you check for the existence of the libraries in deplibs
|
||||
## on the system? That should maybe be merged in here someplace....
|
||||
## Actually: I think test_compile and file_magic do this... file_regex
|
||||
## sorta does this. Only pas_all needs to be changed. -Toshio
|
||||
name_save=$name
|
||||
libname_save=$libname
|
||||
release_save=$release
|
||||
versuffix_save=$versuffix
|
||||
major_save=$major
|
||||
# I'm not sure if I'm treating the release correctly. I think
|
||||
# release should show up in the -l (ie -lgmp5) so we don't want to
|
||||
# add it in twice. Is that correct?
|
||||
release=""
|
||||
versuffix=""
|
||||
major=""
|
||||
newdeplibs=
|
||||
case "$check_shared_deplibs_method" in
|
||||
pass_all)
|
||||
newdeplibs=$deplibs
|
||||
;; # Don't check for shared/static. Everything works.
|
||||
# This might be a little naive. We might want to check
|
||||
# whether the library exists or not. But this is on
|
||||
# osf3 & osf4 and I'm not really sure... Just
|
||||
# implementing what was already the behaviour.
|
||||
test_compile)
|
||||
# This code stresses the "libraries are programs" paradigm to its
|
||||
# limits. Maybe even breaks it. We compile a program, linking it
|
||||
# against the deplibs as a proxy for the library. Then we can check
|
||||
# whether they linked in statically or dynamically with ldd.
|
||||
$rm conftest.c
|
||||
cat > conftest.c <<EOF
|
||||
int main() { return 0; }
|
||||
EOF
|
||||
$rm a.out
|
||||
$C_compiler conftest.c $deplibs $extradeplibs
|
||||
if test $? -eq 0 ; then
|
||||
ldd_output=`ldd a.out`
|
||||
for i in $deplibs; do
|
||||
name="`expr $i : '-l\(.*\)'`"
|
||||
# If $name is empty we are operating on a -L argument.
|
||||
if test "$name" != "" ; then
|
||||
libname=`eval \\$echo \"$libname_spec\"`
|
||||
deplib_matches=`eval \\$echo \"$library_names_spec\"`
|
||||
set dummy $deplib_matches
|
||||
deplib_match=$2
|
||||
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
|
||||
newdeplibs="$newdeplibs $i"
|
||||
else
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $i."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
fi
|
||||
else
|
||||
newdeplibs="$newdeplibs $i"
|
||||
fi
|
||||
done
|
||||
else
|
||||
# Error occured in the first compile. Let's try to salvage the situation:
|
||||
# 1) Is the error in the extradeplibs?
|
||||
$rm a.out
|
||||
$C_compiler conftest.c $extradeplibs
|
||||
if test $? -ne 0 ; then
|
||||
echo
|
||||
echo "*** Warning! Not all libraries necessary to the dependent libraries are"
|
||||
echo "*** working! You will probably need to install some of:"
|
||||
echo "*** $extradeplibs"
|
||||
echo "*** before this library will be fully functional. Installing these"
|
||||
echo "*** libraries before continuing would be even better."
|
||||
newextradeplibs=
|
||||
for i in $extradeplibs; do
|
||||
if test `expr "$i" : '-L'` -ne 0 ; then
|
||||
newextradeplibs="$newextradeplibs $i"
|
||||
fi
|
||||
done
|
||||
extradeplibs=$newextradeplibs
|
||||
fi
|
||||
# 2) Compile a seperate program for each library.
|
||||
for i in $deplibs; do
|
||||
name="`expr $i : '-l\(.*\)'`"
|
||||
$rm a.out
|
||||
$C_compiler conftest.c $deplibs
|
||||
if test $? -eq 0 ; then
|
||||
ldd_output=`ldd a.out`
|
||||
for i in $deplibs; do
|
||||
name="`expr $i : '-l\(.*\)'`"
|
||||
# If $name is empty we are operating on a -L argument.
|
||||
if test "$name" != "" ; then
|
||||
$rm a.out
|
||||
$C_compiler conftest.c $i $extradeplibs
|
||||
# Did it work?
|
||||
if test $? -eq 0 ; then
|
||||
ldd_output=`ldd a.out`
|
||||
libname=`eval \\$echo \"$libname_spec\"`
|
||||
deplib_matches=`eval \\$echo \"$library_names_spec\"`
|
||||
set dummy $deplib_matches
|
||||
deplib_match=$2
|
||||
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
|
||||
newdeplibs="$newdeplibs $i"
|
||||
else
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $i."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
fi
|
||||
else
|
||||
echo
|
||||
echo "*** Warning! Library $i is needed by this library but I was not able to"
|
||||
echo "*** make it link in! You will probably need to install it or some"
|
||||
echo "*** library that it depends on before this library will be fully"
|
||||
echo "*** functional. Installing it before continuing would be even better."
|
||||
fi
|
||||
else
|
||||
newdeplibs="$newdeplibs $i"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
deplibs=$newdeplibs
|
||||
;;
|
||||
file_magic* | file_regex)
|
||||
set dummy $check_shared_deplibs_method
|
||||
file_magic_regex="`expr \"$check_shared_deplibs_method\" : \"$2\(.*\)\"`"
|
||||
for a_deplib in $deplibs; do
|
||||
name="`expr $a_deplib : '-l\(.*\)'`"
|
||||
if test "$name" != "" ; then
|
||||
libname=`eval \\$echo \"$libname_spec\"`
|
||||
deplib_matches=`eval \\$echo \"$library_names_spec\"`
|
||||
set dummy $deplib_matches
|
||||
deplib_match=$2
|
||||
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
|
||||
newdeplibs="$newdeplibs $i"
|
||||
else
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $i."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
fi
|
||||
else
|
||||
newdeplibs="$newdeplibs $i"
|
||||
fi
|
||||
done
|
||||
else
|
||||
# Error occured in the first compile. Let's try to salvage the situation:
|
||||
# Compile a seperate program for each library.
|
||||
for i in $deplibs; do
|
||||
name="`expr $i : '-l\(.*\)'`"
|
||||
# If $name is empty we are operating on a -L argument.
|
||||
if test "$name" != "" ; then
|
||||
libname=`eval \\$echo \"$libname_spec\"`
|
||||
case "$check_shared_deplibs_method" in
|
||||
file_magic*)
|
||||
for i in $lib_search_path; do
|
||||
# This needs to be more general than file_regex in order to
|
||||
# catch things like glibc on linux. Maybe file_regex
|
||||
# should be more general as well, but maybe not. Since
|
||||
# library names are supposed to conform to
|
||||
# library_name_spec, I think file_regex should remain
|
||||
# strict. What do you think Gordon?
|
||||
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
|
||||
for potent_lib in $potential_libs; do
|
||||
file_output=`file $potent_lib`
|
||||
if test `expr "$file_output" : ".*$file_magic_regex"` -ne 0 ; then
|
||||
newdeplibs="$newdeplibs $a_deplib"
|
||||
a_deplib=""
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
;;
|
||||
file_regex)
|
||||
deplib_matches=`eval \\$echo \"$library_names_spec\"`
|
||||
set dummy $deplib_matches
|
||||
deplib_match=$2
|
||||
for i in $lib_search_path; do
|
||||
potential_libs=`ls $i/$deplib_match* 2>/dev/null`
|
||||
if test "$potential_libs" != "" ; then
|
||||
newdeplibs="$newdeplibs $a_deplib"
|
||||
a_deplib=""
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
if test "$a_deplib" != "" ; then
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $a_deplib."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
fi
|
||||
else
|
||||
# Add a -L argument.
|
||||
newdeplibs="$newdeplibs $a_deplib"
|
||||
fi
|
||||
done # Gone through all deplibs.
|
||||
;;
|
||||
none | *) deplibs="" ;;
|
||||
esac
|
||||
versuffix=$versuffix_save
|
||||
major=$major_save
|
||||
release=$release_save
|
||||
libname=$libname_save
|
||||
name=$name_save
|
||||
deplibs=$newdeplibs
|
||||
if test "$name" != "" ; then
|
||||
$rm a.out
|
||||
$C_compiler conftest.c $i
|
||||
# Did it work?
|
||||
if test $? -eq 0 ; then
|
||||
ldd_output=`ldd a.out`
|
||||
libname=`eval \\$echo \"$libname_spec\"`
|
||||
deplib_matches=`eval \\$echo \"$library_names_spec\"`
|
||||
set dummy $deplib_matches
|
||||
deplib_match=$2
|
||||
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
|
||||
newdeplibs="$newdeplibs $i"
|
||||
else
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $i."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
fi
|
||||
else
|
||||
echo
|
||||
echo "*** Warning! Library $i is needed by this library but I was not able to"
|
||||
echo "*** make it link in! You will probably need to install it or some"
|
||||
echo "*** library that it depends on before this library will be fully"
|
||||
echo "*** functional. Installing it before continuing would be even better."
|
||||
fi
|
||||
else
|
||||
newdeplibs="$newdeplibs $i"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
deplibs=$newdeplibs
|
||||
;;
|
||||
file_magic* | file_regex)
|
||||
set dummy $check_shared_deplibs_method
|
||||
file_magic_regex="`expr \"$check_shared_deplibs_method\" : \"$2\(.*\)\"`"
|
||||
for a_deplib in $deplibs; do
|
||||
name="`expr $a_deplib : '-l\(.*\)'`"
|
||||
# If $name is empty we are operating on a -L argument.
|
||||
if test "$name" != "" ; then
|
||||
libname=`eval \\$echo \"$libname_spec\"`
|
||||
case "$check_shared_deplibs_method" in
|
||||
file_magic*)
|
||||
for i in $lib_search_path; do
|
||||
# This needs to be more general than file_regex in order to
|
||||
# catch things like glibc on linux. Maybe file_regex
|
||||
# should be more general as well, but maybe not. Since
|
||||
# library names are supposed to conform to
|
||||
# library_name_spec, I think file_regex should remain
|
||||
# strict. What do you think Gordon?
|
||||
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
|
||||
for potent_lib in $potential_libs; do
|
||||
file_output=`file $potent_lib`
|
||||
if test `expr "$file_output" : ".*$file_magic_regex"` -ne 0 ; then
|
||||
newdeplibs="$newdeplibs $a_deplib"
|
||||
a_deplib=""
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
;;
|
||||
file_regex)
|
||||
deplib_matches=`eval \\$echo \"$library_names_spec\"`
|
||||
set dummy $deplib_matches
|
||||
deplib_match=$2
|
||||
for i in $lib_search_path; do
|
||||
potential_libs=`ls $i/$deplib_match* 2>/dev/null`
|
||||
if test "$potential_libs" != "" ; then
|
||||
newdeplibs="$newdeplibs $a_deplib"
|
||||
a_deplib=""
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
if test "$a_deplib" != "" ; then
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $a_deplib."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
fi
|
||||
else
|
||||
# Add a -L argument.
|
||||
newdeplibs="$newdeplibs $a_deplib"
|
||||
fi
|
||||
done # Gone through all deplibs.
|
||||
;;
|
||||
none | *) deplibs="" ;;
|
||||
esac
|
||||
versuffix=$versuffix_save
|
||||
major=$major_save
|
||||
release=$release_save
|
||||
libname=$libname_save
|
||||
name=$name_save
|
||||
deplibs=$newdeplibs
|
||||
# Done checking deplibs!
|
||||
|
||||
# Get the real and link names of the library.
|
||||
|
Loading…
Reference in New Issue
Block a user