*** empty log message ***
This commit is contained in:
parent
f9ad60c4aa
commit
3712e7c870
|
@ -17,7 +17,7 @@ AC_PROG_MAKE_SET
|
||||||
|
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug,
|
||||||
AC_HELP_STRING([--disable-buidl], [Disable debug build]),
|
AC_HELP_STRING([--disable-debug], [Disable debug build]),
|
||||||
[build_debug=$enableval], [build_debug=no])
|
[build_debug=$enableval], [build_debug=no])
|
||||||
|
|
||||||
if test $build_debug = yes; then
|
if test $build_debug = yes; then
|
||||||
|
|
|
@ -49,14 +49,14 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The name of this program.
|
# The name of this program.
|
||||||
progname=`$echo "$0" | ${SED} 's%^.*/%%'`
|
progname=`$echo "$0" | sed 's%^.*/%%'`
|
||||||
modename="$progname"
|
modename="$progname"
|
||||||
|
|
||||||
# Constants.
|
# Constants.
|
||||||
PROGRAM=ltmain.sh
|
PROGRAM=ltmain.sh
|
||||||
PACKAGE=libtool
|
PACKAGE=libtool
|
||||||
VERSION=1.4.3
|
VERSION=1.4.2
|
||||||
TIMESTAMP=" (1.922.2.111 2002/10/23 02:54:36)"
|
TIMESTAMP=" (1.4 2001/11/19 00:06:02)"
|
||||||
|
|
||||||
default_mode=
|
default_mode=
|
||||||
help="Try \`$progname --help' for more information."
|
help="Try \`$progname --help' for more information."
|
||||||
|
@ -67,19 +67,10 @@ rm="rm -f"
|
||||||
|
|
||||||
# Sed substitution that helps us do robust quoting. It backslashifies
|
# Sed substitution that helps us do robust quoting. It backslashifies
|
||||||
# metacharacters that are still active within double-quoted strings.
|
# metacharacters that are still active within double-quoted strings.
|
||||||
Xsed="${SED}"' -e 1s/^X//'
|
Xsed='sed -e 1s/^X//'
|
||||||
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
|
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
|
||||||
# test EBCDIC or ASCII
|
SP2NL='tr \040 \012'
|
||||||
case `echo A|od -x` in
|
NL2SP='tr \015\012 \040\040'
|
||||||
*[Cc]1*) # EBCDIC based system
|
|
||||||
SP2NL="tr '\100' '\n'"
|
|
||||||
NL2SP="tr '\r\n' '\100\100'"
|
|
||||||
;;
|
|
||||||
*) # Assume ASCII based system
|
|
||||||
SP2NL="tr '\040' '\012'"
|
|
||||||
NL2SP="tr '\015\012' '\040\040'"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# NLS nuisances.
|
# NLS nuisances.
|
||||||
# Only set LANG and LC_ALL to C if already set.
|
# Only set LANG and LC_ALL to C if already set.
|
||||||
|
@ -153,7 +144,7 @@ do
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--config)
|
--config)
|
||||||
${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
|
sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -186,8 +177,6 @@ do
|
||||||
--mode) prevopt="--mode" prev=mode ;;
|
--mode) prevopt="--mode" prev=mode ;;
|
||||||
--mode=*) mode="$optarg" ;;
|
--mode=*) mode="$optarg" ;;
|
||||||
|
|
||||||
--preserve-dup-deps) duplicate_deps="yes" ;;
|
|
||||||
|
|
||||||
--quiet | --silent)
|
--quiet | --silent)
|
||||||
show=:
|
show=:
|
||||||
;;
|
;;
|
||||||
|
@ -226,7 +215,7 @@ if test -z "$show_help"; then
|
||||||
# Infer the operation mode.
|
# Infer the operation mode.
|
||||||
if test -z "$mode"; then
|
if test -z "$mode"; then
|
||||||
case $nonopt in
|
case $nonopt in
|
||||||
*cc | *++ | gcc* | *-gcc* | xlc*)
|
*cc | *++ | gcc* | *-gcc*)
|
||||||
mode=link
|
mode=link
|
||||||
for arg
|
for arg
|
||||||
do
|
do
|
||||||
|
@ -478,7 +467,7 @@ if test -z "$show_help"; then
|
||||||
pic_mode=default
|
pic_mode=default
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
|
if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
|
||||||
# non-PIC code in shared libraries is not supported
|
# non-PIC code in shared libraries is not supported
|
||||||
pic_mode=default
|
pic_mode=default
|
||||||
fi
|
fi
|
||||||
|
@ -1003,7 +992,7 @@ compiler."
|
||||||
# so, if we see these flags be careful not to treat them like -L
|
# so, if we see these flags be careful not to treat them like -L
|
||||||
-L[A-Z][A-Z]*:*)
|
-L[A-Z][A-Z]*:*)
|
||||||
case $with_gcc/$host in
|
case $with_gcc/$host in
|
||||||
no/*-*-irix* | no/*-*-nonstopux*)
|
no/*-*-irix*)
|
||||||
compile_command="$compile_command $arg"
|
compile_command="$compile_command $arg"
|
||||||
finalize_command="$finalize_command $arg"
|
finalize_command="$finalize_command $arg"
|
||||||
;;
|
;;
|
||||||
|
@ -1054,14 +1043,14 @@ compiler."
|
||||||
# These systems don't actually have a C library (as such)
|
# These systems don't actually have a C library (as such)
|
||||||
test "X$arg" = "X-lc" && continue
|
test "X$arg" = "X-lc" && continue
|
||||||
;;
|
;;
|
||||||
*-*-openbsd* | *-*-freebsd*)
|
*-*-openbsd*)
|
||||||
# Do not include libc due to us having libc/libc_r.
|
# Do not include libc due to us having libc/libc_r.
|
||||||
test "X$arg" = "X-lc" && continue
|
test "X$arg" = "X-lc" && continue
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
elif test "X$arg" = "X-lc_r"; then
|
elif test "X$arg" = "X-lc_r"; then
|
||||||
case $host in
|
case $host in
|
||||||
*-*-openbsd* | *-*-freebsd*)
|
*-*-openbsd*)
|
||||||
# Do not include libc_r directly, use -pthread flag.
|
# Do not include libc_r directly, use -pthread flag.
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
|
@ -1314,11 +1303,11 @@ compiler."
|
||||||
output_objdir="$output_objdir/$objdir"
|
output_objdir="$output_objdir/$objdir"
|
||||||
fi
|
fi
|
||||||
# Create the object directory.
|
# Create the object directory.
|
||||||
if test ! -d "$output_objdir"; then
|
if test ! -d $output_objdir; then
|
||||||
$show "$mkdir $output_objdir"
|
$show "$mkdir $output_objdir"
|
||||||
$run $mkdir "$output_objdir"
|
$run $mkdir $output_objdir
|
||||||
status=$?
|
status=$?
|
||||||
if test $status -ne 0 && test ! -d "$output_objdir"; then
|
if test $status -ne 0 && test ! -d $output_objdir; then
|
||||||
exit $status
|
exit $status
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1341,11 +1330,9 @@ compiler."
|
||||||
# Find all interdependent deplibs by searching for libraries
|
# Find all interdependent deplibs by searching for libraries
|
||||||
# that are linked more than once (e.g. -la -lb -la)
|
# that are linked more than once (e.g. -la -lb -la)
|
||||||
for deplib in $deplibs; do
|
for deplib in $deplibs; do
|
||||||
if test "X$duplicate_deps" = "Xyes" ; then
|
case "$libs " in
|
||||||
case "$libs " in
|
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
esac
|
||||||
esac
|
|
||||||
fi
|
|
||||||
libs="$libs $deplib"
|
libs="$libs $deplib"
|
||||||
done
|
done
|
||||||
deplibs=
|
deplibs=
|
||||||
|
@ -1474,12 +1461,10 @@ compiler."
|
||||||
lib)
|
lib)
|
||||||
if test "$deplibs_check_method" != pass_all; then
|
if test "$deplibs_check_method" != pass_all; then
|
||||||
echo
|
echo
|
||||||
echo "*** Warning: Trying to link with static lib archive $deplib."
|
echo "*** Warning: This library needs some functionality provided by $deplib."
|
||||||
echo "*** I have the capability to make that library automatically link in when"
|
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 "*** 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"
|
echo "*** shared version of the library, which you do not appear to have."
|
||||||
echo "*** because the file extensions .$libext of this argument makes me believe"
|
|
||||||
echo "*** that it is just a static archive that I should not used here."
|
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo "*** Warning: Linking the shared library $output against the"
|
echo "*** Warning: Linking the shared library $output against the"
|
||||||
|
@ -1523,7 +1508,7 @@ compiler."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check to see that this really is a libtool archive.
|
# Check to see that this really is a libtool archive.
|
||||||
if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
||||||
else
|
else
|
||||||
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -1550,7 +1535,7 @@ compiler."
|
||||||
|
|
||||||
if test "$linkmode,$pass" = "lib,link" ||
|
if test "$linkmode,$pass" = "lib,link" ||
|
||||||
test "$linkmode,$pass" = "prog,scan" ||
|
test "$linkmode,$pass" = "prog,scan" ||
|
||||||
{ test $linkmode != lib && test $linkmode != prog; }; then
|
{ test $linkmode = oldlib && test $linkmode = obj; }; then
|
||||||
# Add dl[pre]opened files of deplib
|
# Add dl[pre]opened files of deplib
|
||||||
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
|
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
|
||||||
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
|
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
|
||||||
|
@ -1558,7 +1543,9 @@ compiler."
|
||||||
|
|
||||||
if test $pass = conv; then
|
if test $pass = conv; then
|
||||||
# Only check for convenience libraries
|
# Only check for convenience libraries
|
||||||
deplibs="$lib $deplibs"
|
if test "$libdir"; then
|
||||||
|
deplibs="$lib $deplibs"
|
||||||
|
fi
|
||||||
if test -z "$libdir"; then
|
if test -z "$libdir"; then
|
||||||
if test -z "$old_library"; then
|
if test -z "$old_library"; then
|
||||||
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
|
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
|
||||||
|
@ -1570,11 +1557,9 @@ compiler."
|
||||||
tmp_libs=
|
tmp_libs=
|
||||||
for deplib in $dependency_libs; do
|
for deplib in $dependency_libs; do
|
||||||
deplibs="$deplib $deplibs"
|
deplibs="$deplib $deplibs"
|
||||||
if test "X$duplicate_deps" = "Xyes" ; then
|
case "$tmp_libs " in
|
||||||
case "$tmp_libs " in
|
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
esac
|
||||||
esac
|
|
||||||
fi
|
|
||||||
tmp_libs="$tmp_libs $deplib"
|
tmp_libs="$tmp_libs $deplib"
|
||||||
done
|
done
|
||||||
elif test $linkmode != prog && test $linkmode != lib; then
|
elif test $linkmode != prog && test $linkmode != lib; then
|
||||||
|
@ -1697,11 +1682,9 @@ compiler."
|
||||||
# or/and link against static libraries
|
# or/and link against static libraries
|
||||||
newdependency_libs="$deplib $newdependency_libs"
|
newdependency_libs="$deplib $newdependency_libs"
|
||||||
fi
|
fi
|
||||||
if test "X$duplicate_deps" = "Xyes" ; then
|
case "$tmp_libs " in
|
||||||
case "$tmp_libs " in
|
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
esac
|
||||||
esac
|
|
||||||
fi
|
|
||||||
tmp_libs="$tmp_libs $deplib"
|
tmp_libs="$tmp_libs $deplib"
|
||||||
done # for deplib
|
done # for deplib
|
||||||
continue
|
continue
|
||||||
|
@ -1785,8 +1768,8 @@ compiler."
|
||||||
|
|
||||||
# Make a new name for the extract_expsyms_cmds to use
|
# Make a new name for the extract_expsyms_cmds to use
|
||||||
soroot="$soname"
|
soroot="$soname"
|
||||||
soname=`echo $soroot | ${SED} -e 's/^.*\///'`
|
soname=`echo $soroot | sed -e 's/^.*\///'`
|
||||||
newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
|
newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
|
||||||
|
|
||||||
# If the library has no export list, then create one now
|
# If the library has no export list, then create one now
|
||||||
if test -f "$output_objdir/$soname-def"; then :
|
if test -f "$output_objdir/$soname-def"; then :
|
||||||
|
@ -1903,11 +1886,7 @@ compiler."
|
||||||
add="-l$name"
|
add="-l$name"
|
||||||
else
|
else
|
||||||
# We cannot seem to hardcode it, guess we'll fake it.
|
# We cannot seem to hardcode it, guess we'll fake it.
|
||||||
if test "X$installed" = Xyes; then
|
add_dir="-L$libdir"
|
||||||
add_dir="-L$libdir"
|
|
||||||
else
|
|
||||||
add_dir="-L$DESTDIR$libdir"
|
|
||||||
fi
|
|
||||||
add="-l$name"
|
add="-l$name"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1949,14 +1928,13 @@ compiler."
|
||||||
# Just print a warning and add the library to dependency_libs so
|
# Just print a warning and add the library to dependency_libs so
|
||||||
# that the program can be linked against the static library.
|
# that the program can be linked against the static library.
|
||||||
echo
|
echo
|
||||||
echo "*** Warning: This system can not link to static lib archive $lib."
|
echo "*** Warning: This library needs some functionality provided by $lib."
|
||||||
echo "*** I have the capability to make that library automatically link in when"
|
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 "*** 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."
|
echo "*** shared version of the library, which you do not appear to have."
|
||||||
if test "$module" = yes; then
|
if test "$module" = yes; then
|
||||||
echo "*** But as you try to build a module library, libtool will still create "
|
echo "*** Therefore, libtool will create a static module, that should work "
|
||||||
echo "*** a static module, that should work as long as the dlopening application"
|
echo "*** as long as the dlopening application is linked with the -dlopen flag."
|
||||||
echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
|
|
||||||
if test -z "$global_symbol_pipe"; then
|
if test -z "$global_symbol_pipe"; then
|
||||||
echo
|
echo
|
||||||
echo "*** However, this would only work if libtool was able to extract symbol"
|
echo "*** However, this would only work if libtool was able to extract symbol"
|
||||||
|
@ -2005,11 +1983,9 @@ compiler."
|
||||||
tmp_libs=
|
tmp_libs=
|
||||||
for deplib in $dependency_libs; do
|
for deplib in $dependency_libs; do
|
||||||
newdependency_libs="$deplib $newdependency_libs"
|
newdependency_libs="$deplib $newdependency_libs"
|
||||||
if test "X$duplicate_deps" = "Xyes" ; then
|
case "$tmp_libs " in
|
||||||
case "$tmp_libs " in
|
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
esac
|
||||||
esac
|
|
||||||
fi
|
|
||||||
tmp_libs="$tmp_libs $deplib"
|
tmp_libs="$tmp_libs $deplib"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -2035,7 +2011,7 @@ compiler."
|
||||||
if grep "^installed=no" $deplib > /dev/null; then
|
if grep "^installed=no" $deplib > /dev/null; then
|
||||||
path="-L$absdir/$objdir"
|
path="-L$absdir/$objdir"
|
||||||
else
|
else
|
||||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
||||||
if test -z "$libdir"; then
|
if test -z "$libdir"; then
|
||||||
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
|
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -2299,21 +2275,16 @@ compiler."
|
||||||
versuffix=".$current";
|
versuffix=".$current";
|
||||||
;;
|
;;
|
||||||
|
|
||||||
irix | nonstopux)
|
irix)
|
||||||
major=`expr $current - $age + 1`
|
major=`expr $current - $age + 1`
|
||||||
|
verstring="sgi$major.$revision"
|
||||||
case $version_type in
|
|
||||||
nonstopux) verstring_prefix=nonstopux ;;
|
|
||||||
*) verstring_prefix=sgi ;;
|
|
||||||
esac
|
|
||||||
verstring="$verstring_prefix$major.$revision"
|
|
||||||
|
|
||||||
# Add in all the interfaces that we are compatible with.
|
# Add in all the interfaces that we are compatible with.
|
||||||
loop=$revision
|
loop=$revision
|
||||||
while test $loop != 0; do
|
while test $loop != 0; do
|
||||||
iface=`expr $revision - $loop`
|
iface=`expr $revision - $loop`
|
||||||
loop=`expr $loop - 1`
|
loop=`expr $loop - 1`
|
||||||
verstring="$verstring_prefix$major.$iface:$verstring"
|
verstring="sgi$major.$iface:$verstring"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Before this point, $major must not contain `.'.
|
# Before this point, $major must not contain `.'.
|
||||||
|
@ -2327,7 +2298,7 @@ compiler."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
osf)
|
osf)
|
||||||
major=.`expr $current - $age`
|
major=`expr $current - $age`
|
||||||
versuffix=".$current.$age.$revision"
|
versuffix=".$current.$age.$revision"
|
||||||
verstring="$current.$age.$revision"
|
verstring="$current.$age.$revision"
|
||||||
|
|
||||||
|
@ -2419,9 +2390,9 @@ compiler."
|
||||||
|
|
||||||
# Eliminate all temporary directories.
|
# Eliminate all temporary directories.
|
||||||
for path in $notinst_path; do
|
for path in $notinst_path; do
|
||||||
lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
|
lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
|
||||||
deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
|
deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
|
||||||
dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
|
dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
|
||||||
done
|
done
|
||||||
|
|
||||||
if test -n "$xrpath"; then
|
if test -n "$xrpath"; then
|
||||||
|
@ -2472,7 +2443,7 @@ compiler."
|
||||||
*-*-netbsd*)
|
*-*-netbsd*)
|
||||||
# Don't link with libc until the a.out ld.so is fixed.
|
# Don't link with libc until the a.out ld.so is fixed.
|
||||||
;;
|
;;
|
||||||
*-*-openbsd* | *-*-freebsd*)
|
*-*-openbsd*)
|
||||||
# Do not include libc due to us having libc/libc_r.
|
# Do not include libc due to us having libc/libc_r.
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -2533,20 +2504,18 @@ EOF
|
||||||
else
|
else
|
||||||
droppeddeps=yes
|
droppeddeps=yes
|
||||||
echo
|
echo
|
||||||
echo "*** Warning: dynamic linker does not accept needed library $i."
|
echo "*** Warning: This library needs some functionality provided by $i."
|
||||||
echo "*** I have the capability to make that library automatically link in when"
|
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 "*** you link to this library. But I can only do this if you have a"
|
||||||
echo "*** shared version of the library, which I believe you do not have"
|
echo "*** shared version of the library, which you do not appear to have."
|
||||||
echo "*** because a test_compile did reveal that the linker did not use it for"
|
|
||||||
echo "*** its dynamic dependency list that programs get resolved with at runtime."
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
newdeplibs="$newdeplibs $i"
|
newdeplibs="$newdeplibs $i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
# Error occured in the first compile. Let's try to salvage
|
# Error occured in the first compile. Let's try to salvage the situation:
|
||||||
# the situation: Compile a separate program for each library.
|
# Compile a seperate program for each library.
|
||||||
for i in $deplibs; do
|
for i in $deplibs; do
|
||||||
name="`expr $i : '-l\(.*\)'`"
|
name="`expr $i : '-l\(.*\)'`"
|
||||||
# If $name is empty we are operating on a -L argument.
|
# If $name is empty we are operating on a -L argument.
|
||||||
|
@ -2565,12 +2534,10 @@ EOF
|
||||||
else
|
else
|
||||||
droppeddeps=yes
|
droppeddeps=yes
|
||||||
echo
|
echo
|
||||||
echo "*** Warning: dynamic linker does not accept needed library $i."
|
echo "*** Warning: This library needs some functionality provided by $i."
|
||||||
echo "*** I have the capability to make that library automatically link in when"
|
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 "*** 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"
|
echo "*** shared version of the library, which you do not appear to have."
|
||||||
echo "*** because a test_compile did reveal that the linker did not use this one"
|
|
||||||
echo "*** as a dynamic dependency that programs can get resolved with at runtime."
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
droppeddeps=yes
|
droppeddeps=yes
|
||||||
|
@ -2609,21 +2576,14 @@ EOF
|
||||||
# but so what?
|
# but so what?
|
||||||
potlib="$potent_lib"
|
potlib="$potent_lib"
|
||||||
while test -h "$potlib" 2>/dev/null; do
|
while test -h "$potlib" 2>/dev/null; do
|
||||||
potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
|
potliblink=`ls -ld $potlib | sed 's/.* -> //'`
|
||||||
case $potliblink in
|
case $potliblink in
|
||||||
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
|
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
|
||||||
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
|
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
# It is ok to link against an archive when
|
|
||||||
# building a shared library.
|
|
||||||
if $AR -t $potlib > /dev/null 2>&1; then
|
|
||||||
newdeplibs="$newdeplibs $a_deplib"
|
|
||||||
a_deplib=""
|
|
||||||
break 2
|
|
||||||
fi
|
|
||||||
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
|
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
|
||||||
| ${SED} 10q \
|
| sed 10q \
|
||||||
| egrep "$file_magic_regex" > /dev/null; then
|
| egrep "$file_magic_regex" > /dev/null; then
|
||||||
newdeplibs="$newdeplibs $a_deplib"
|
newdeplibs="$newdeplibs $a_deplib"
|
||||||
a_deplib=""
|
a_deplib=""
|
||||||
|
@ -2634,17 +2594,10 @@ EOF
|
||||||
if test -n "$a_deplib" ; then
|
if test -n "$a_deplib" ; then
|
||||||
droppeddeps=yes
|
droppeddeps=yes
|
||||||
echo
|
echo
|
||||||
echo "*** Warning: linker path does not have real file for library $a_deplib."
|
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 "*** 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 "*** 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"
|
echo "*** shared version of the library, which you do not appear to have."
|
||||||
echo "*** because I did check the linker path looking for a file starting"
|
|
||||||
if test -z "$potlib" ; then
|
|
||||||
echo "*** with $libname but no candidates were found. (...for file magic test)"
|
|
||||||
else
|
|
||||||
echo "*** with $libname and none of the candidates passed a file format test"
|
|
||||||
echo "*** using a file magic. Last file checked: $potlib"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Add a -L argument.
|
# Add a -L argument.
|
||||||
|
@ -2663,9 +2616,8 @@ EOF
|
||||||
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
|
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
|
||||||
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
|
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
|
||||||
for potent_lib in $potential_libs; do
|
for potent_lib in $potential_libs; do
|
||||||
potlib="$potent_lib" # see symlink-check below in file_magic test
|
|
||||||
if eval echo \"$potent_lib\" 2>/dev/null \
|
if eval echo \"$potent_lib\" 2>/dev/null \
|
||||||
| ${SED} 10q \
|
| sed 10q \
|
||||||
| egrep "$match_pattern_regex" > /dev/null; then
|
| egrep "$match_pattern_regex" > /dev/null; then
|
||||||
newdeplibs="$newdeplibs $a_deplib"
|
newdeplibs="$newdeplibs $a_deplib"
|
||||||
a_deplib=""
|
a_deplib=""
|
||||||
|
@ -2676,17 +2628,10 @@ EOF
|
||||||
if test -n "$a_deplib" ; then
|
if test -n "$a_deplib" ; then
|
||||||
droppeddeps=yes
|
droppeddeps=yes
|
||||||
echo
|
echo
|
||||||
echo "*** Warning: linker path does not have real file for library $a_deplib."
|
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 "*** 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 "*** 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"
|
echo "*** shared version of the library, which you do not appear to have."
|
||||||
echo "*** because I did check the linker path looking for a file starting"
|
|
||||||
if test -z "$potlib" ; then
|
|
||||||
echo "*** with $libname but no candidates were found. (...for regex pattern test)"
|
|
||||||
else
|
|
||||||
echo "*** with $libname and none of the candidates passed a file format test"
|
|
||||||
echo "*** using a regex pattern. Last file checked: $potlib"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Add a -L argument.
|
# Add a -L argument.
|
||||||
|
@ -2951,18 +2896,7 @@ EOF
|
||||||
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
|
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
|
||||||
eval cmds=\"$archive_expsym_cmds\"
|
eval cmds=\"$archive_expsym_cmds\"
|
||||||
else
|
else
|
||||||
save_deplibs="$deplibs"
|
|
||||||
for conv in $convenience; do
|
|
||||||
tmp_deplibs=
|
|
||||||
for test_deplib in $deplibs; do
|
|
||||||
if test "$test_deplib" != "$conv"; then
|
|
||||||
tmp_deplibs="$tmp_deplibs $test_deplib"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
deplibs="$tmp_deplibs"
|
|
||||||
done
|
|
||||||
eval cmds=\"$archive_cmds\"
|
eval cmds=\"$archive_cmds\"
|
||||||
deplibs="$save_deplibs"
|
|
||||||
fi
|
fi
|
||||||
save_ifs="$IFS"; IFS='~'
|
save_ifs="$IFS"; IFS='~'
|
||||||
for cmd in $cmds; do
|
for cmd in $cmds; do
|
||||||
|
@ -3161,7 +3095,7 @@ EOF
|
||||||
|
|
||||||
prog)
|
prog)
|
||||||
case $host in
|
case $host in
|
||||||
*cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
|
*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
|
||||||
esac
|
esac
|
||||||
if test -n "$vinfo"; then
|
if test -n "$vinfo"; then
|
||||||
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
|
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
|
||||||
|
@ -3183,13 +3117,6 @@ EOF
|
||||||
# On Rhapsody replace the C library is the System framework
|
# On Rhapsody replace the C library is the System framework
|
||||||
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
|
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
|
||||||
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
|
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
|
||||||
case $host in
|
|
||||||
*darwin*)
|
|
||||||
# Don't allow lazy linking, it breaks C++ global constructors
|
|
||||||
compile_command="$compile_command ${wl}-bind_at_load"
|
|
||||||
finalize_command="$finalize_command ${wl}-bind_at_load"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -3356,9 +3283,9 @@ extern \"C\" {
|
||||||
if test -z "$export_symbols"; then
|
if test -z "$export_symbols"; then
|
||||||
export_symbols="$output_objdir/$output.exp"
|
export_symbols="$output_objdir/$output.exp"
|
||||||
$run $rm $export_symbols
|
$run $rm $export_symbols
|
||||||
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
$run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
||||||
else
|
else
|
||||||
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
|
$run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
|
||||||
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
|
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
|
||||||
$run eval 'mv "$nlist"T "$nlist"'
|
$run eval 'mv "$nlist"T "$nlist"'
|
||||||
fi
|
fi
|
||||||
|
@ -3366,7 +3293,7 @@ extern \"C\" {
|
||||||
|
|
||||||
for arg in $dlprefiles; do
|
for arg in $dlprefiles; do
|
||||||
$show "extracting global C symbols from \`$arg'"
|
$show "extracting global C symbols from \`$arg'"
|
||||||
name=`echo "$arg" | ${SED} -e 's%^.*/%%'`
|
name=`echo "$arg" | sed -e 's%^.*/%%'`
|
||||||
$run eval 'echo ": $name " >> "$nlist"'
|
$run eval 'echo ": $name " >> "$nlist"'
|
||||||
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
|
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
|
||||||
done
|
done
|
||||||
|
@ -3381,13 +3308,7 @@ extern \"C\" {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Try sorting and uniquifying the output.
|
# Try sorting and uniquifying the output.
|
||||||
if grep -v "^: " < "$nlist" |
|
if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
|
||||||
if sort -k 3 </dev/null >/dev/null 2>&1; then
|
|
||||||
sort -k 3
|
|
||||||
else
|
|
||||||
sort +2
|
|
||||||
fi |
|
|
||||||
uniq > "$nlist"S; then
|
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
grep -v "^: " < "$nlist" > "$nlist"S
|
grep -v "^: " < "$nlist" > "$nlist"S
|
||||||
|
@ -3609,7 +3530,7 @@ static const void *lt_preloaded_setup() {
|
||||||
relink_command="$var=\"$var_value\"; export $var; $relink_command"
|
relink_command="$var=\"$var_value\"; export $var; $relink_command"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
relink_command="(cd `pwd`; $relink_command)"
|
relink_command="cd `pwd`; $relink_command"
|
||||||
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
|
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -3629,7 +3550,7 @@ static const void *lt_preloaded_setup() {
|
||||||
# win32 will think the script is a binary if it has
|
# win32 will think the script is a binary if it has
|
||||||
# a .exe suffix, so we strip it off here.
|
# a .exe suffix, so we strip it off here.
|
||||||
case $output in
|
case $output in
|
||||||
*.exe) output=`echo $output|${SED} 's,.exe$,,'` ;;
|
*.exe) output=`echo $output|sed 's,.exe$,,'` ;;
|
||||||
esac
|
esac
|
||||||
# test for cygwin because mv fails w/o .exe extensions
|
# test for cygwin because mv fails w/o .exe extensions
|
||||||
case $host in
|
case $host in
|
||||||
|
@ -3653,7 +3574,7 @@ static const void *lt_preloaded_setup() {
|
||||||
|
|
||||||
# Sed substitution that helps us do robust quoting. It backslashifies
|
# Sed substitution that helps us do robust quoting. It backslashifies
|
||||||
# metacharacters that are still active within double-quoted strings.
|
# metacharacters that are still active within double-quoted strings.
|
||||||
Xsed="${SED}"' -e 1s/^X//'
|
Xsed='sed -e 1s/^X//'
|
||||||
sed_quote_subst='$sed_quote_subst'
|
sed_quote_subst='$sed_quote_subst'
|
||||||
|
|
||||||
# The HP-UX ksh and POSIX shell print the target directory to stdout
|
# The HP-UX ksh and POSIX shell print the target directory to stdout
|
||||||
|
@ -3691,7 +3612,7 @@ else
|
||||||
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
|
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
|
||||||
|
|
||||||
# Follow symbolic links until we get to the real thisdir.
|
# Follow symbolic links until we get to the real thisdir.
|
||||||
file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
|
file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
|
||||||
while test -n \"\$file\"; do
|
while test -n \"\$file\"; do
|
||||||
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
|
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
|
||||||
|
|
||||||
|
@ -3704,7 +3625,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
|
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
|
||||||
file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
|
file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
|
||||||
done
|
done
|
||||||
|
|
||||||
# Try to get the absolute directory name.
|
# Try to get the absolute directory name.
|
||||||
|
@ -3718,7 +3639,7 @@ else
|
||||||
progdir=\"\$thisdir/$objdir\"
|
progdir=\"\$thisdir/$objdir\"
|
||||||
|
|
||||||
if test ! -f \"\$progdir/\$program\" || \\
|
if test ! -f \"\$progdir/\$program\" || \\
|
||||||
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
|
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
|
||||||
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
|
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
|
||||||
|
|
||||||
file=\"\$\$-\$program\"
|
file=\"\$\$-\$program\"
|
||||||
|
@ -3764,7 +3685,7 @@ else
|
||||||
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
|
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
|
||||||
|
|
||||||
# Some systems cannot cope with colon-terminated $shlibpath_var
|
# Some systems cannot cope with colon-terminated $shlibpath_var
|
||||||
# The second colon is a workaround for a bug in BeOS R4 ${SED}
|
# The second colon is a workaround for a bug in BeOS R4 sed
|
||||||
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
|
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
|
||||||
|
|
||||||
export $shlibpath_var
|
export $shlibpath_var
|
||||||
|
@ -3939,7 +3860,7 @@ fi\
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# Quote the link command for shipping.
|
# Quote the link command for shipping.
|
||||||
relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
|
relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
|
||||||
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
|
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
|
||||||
|
|
||||||
# Only create the output if not a dry run.
|
# Only create the output if not a dry run.
|
||||||
|
@ -3956,7 +3877,7 @@ fi\
|
||||||
case $deplib in
|
case $deplib in
|
||||||
*.la)
|
*.la)
|
||||||
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
|
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
|
||||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
||||||
if test -z "$libdir"; then
|
if test -z "$libdir"; then
|
||||||
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
|
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -3970,7 +3891,7 @@ fi\
|
||||||
newdlfiles=
|
newdlfiles=
|
||||||
for lib in $dlfiles; do
|
for lib in $dlfiles; do
|
||||||
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
|
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
|
||||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
||||||
if test -z "$libdir"; then
|
if test -z "$libdir"; then
|
||||||
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -3981,7 +3902,7 @@ fi\
|
||||||
newdlprefiles=
|
newdlprefiles=
|
||||||
for lib in $dlprefiles; do
|
for lib in $dlprefiles; do
|
||||||
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
|
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
|
||||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
||||||
if test -z "$libdir"; then
|
if test -z "$libdir"; then
|
||||||
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -4205,7 +4126,7 @@ relink_command=\"$relink_command\""
|
||||||
|
|
||||||
*.la)
|
*.la)
|
||||||
# Check to see that this really is a libtool archive.
|
# Check to see that this really is a libtool archive.
|
||||||
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
||||||
else
|
else
|
||||||
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
|
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
|
||||||
$echo "$help" 1>&2
|
$echo "$help" 1>&2
|
||||||
|
@ -4222,21 +4143,12 @@ relink_command=\"$relink_command\""
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Add the libdir to current_libdirs if it is the destination.
|
# Add the libdir to current_libdirs if it is the destination.
|
||||||
DESTDIR=
|
|
||||||
if test "X$destdir" = "X$libdir"; then
|
if test "X$destdir" = "X$libdir"; then
|
||||||
case "$current_libdirs " in
|
case "$current_libdirs " in
|
||||||
*" $libdir "*) ;;
|
*" $libdir "*) ;;
|
||||||
*) current_libdirs="$current_libdirs $libdir" ;;
|
*) current_libdirs="$current_libdirs $libdir" ;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
case "$destdir" in
|
|
||||||
*"$libdir")
|
|
||||||
DESTDIR=`$echo "$destdir" | sed -e 's!'"$libdir"'$!!'`
|
|
||||||
if test "X$destdir" != "X$DESTDIR$libdir"; then
|
|
||||||
DESTDIR=
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
# Note the libdir as a future libdir.
|
# Note the libdir as a future libdir.
|
||||||
case "$future_libdirs " in
|
case "$future_libdirs " in
|
||||||
*" $libdir "*) ;;
|
*" $libdir "*) ;;
|
||||||
|
@ -4250,7 +4162,6 @@ relink_command=\"$relink_command\""
|
||||||
|
|
||||||
if test -n "$relink_command"; then
|
if test -n "$relink_command"; then
|
||||||
$echo "$modename: warning: relinking \`$file'" 1>&2
|
$echo "$modename: warning: relinking \`$file'" 1>&2
|
||||||
export DESTDIR
|
|
||||||
$show "$relink_command"
|
$show "$relink_command"
|
||||||
if $run eval "$relink_command"; then :
|
if $run eval "$relink_command"; then :
|
||||||
else
|
else
|
||||||
|
@ -4258,7 +4169,6 @@ relink_command=\"$relink_command\""
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
unset DESTDIR
|
|
||||||
|
|
||||||
# See the names of the shared library.
|
# See the names of the shared library.
|
||||||
set dummy $library_names
|
set dummy $library_names
|
||||||
|
@ -4365,27 +4275,19 @@ relink_command=\"$relink_command\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Do a test to see if this is really a libtool program.
|
# Do a test to see if this is really a libtool program.
|
||||||
case $host in
|
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
||||||
*cygwin*|*mingw*)
|
|
||||||
wrapper=`echo $file | ${SED} -e 's,.exe$,,'`
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
wrapper=$file
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
|
|
||||||
notinst_deplibs=
|
notinst_deplibs=
|
||||||
relink_command=
|
relink_command=
|
||||||
|
|
||||||
# If there is no directory component, then add one.
|
# If there is no directory component, then add one.
|
||||||
case $file in
|
case $file in
|
||||||
*/* | *\\*) . $wrapper ;;
|
*/* | *\\*) . $file ;;
|
||||||
*) . ./$wrapper ;;
|
*) . ./$file ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Check the variables that should have been set.
|
# Check the variables that should have been set.
|
||||||
if test -z "$notinst_deplibs"; then
|
if test -z "$notinst_deplibs"; then
|
||||||
$echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
|
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -4410,8 +4312,8 @@ relink_command=\"$relink_command\""
|
||||||
relink_command=
|
relink_command=
|
||||||
# If there is no directory component, then add one.
|
# If there is no directory component, then add one.
|
||||||
case $file in
|
case $file in
|
||||||
*/* | *\\*) . $wrapper ;;
|
*/* | *\\*) . $file ;;
|
||||||
*) . ./$wrapper ;;
|
*) . ./$file ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
outputname=
|
outputname=
|
||||||
|
@ -4419,11 +4321,7 @@ relink_command=\"$relink_command\""
|
||||||
if test "$finalize" = yes && test -z "$run"; then
|
if test "$finalize" = yes && test -z "$run"; then
|
||||||
tmpdir="/tmp"
|
tmpdir="/tmp"
|
||||||
test -n "$TMPDIR" && tmpdir="$TMPDIR"
|
test -n "$TMPDIR" && tmpdir="$TMPDIR"
|
||||||
tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null`
|
tmpdir="$tmpdir/libtool-$$"
|
||||||
if test $? = 0 ; then :
|
|
||||||
else
|
|
||||||
tmpdir="$tmpdir/libtool-$$"
|
|
||||||
fi
|
|
||||||
if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
|
if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
|
||||||
else
|
else
|
||||||
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
|
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
|
||||||
|
@ -4463,7 +4361,7 @@ relink_command=\"$relink_command\""
|
||||||
destfile=$destfile.exe
|
destfile=$destfile.exe
|
||||||
;;
|
;;
|
||||||
*:*.exe)
|
*:*.exe)
|
||||||
destfile=`echo $destfile | ${SED} -e 's,.exe$,,'`
|
destfile=`echo $destfile | sed -e 's,.exe$,,'`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
@ -4611,7 +4509,7 @@ relink_command=\"$relink_command\""
|
||||||
case $file in
|
case $file in
|
||||||
*.la)
|
*.la)
|
||||||
# Check to see that this really is a libtool archive.
|
# Check to see that this really is a libtool archive.
|
||||||
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
||||||
else
|
else
|
||||||
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
||||||
$echo "$help" 1>&2
|
$echo "$help" 1>&2
|
||||||
|
@ -4682,7 +4580,7 @@ relink_command=\"$relink_command\""
|
||||||
-*) ;;
|
-*) ;;
|
||||||
*)
|
*)
|
||||||
# Do a test to see if this is really a libtool program.
|
# Do a test to see if this is really a libtool program.
|
||||||
if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
||||||
# If there is no directory component, then add one.
|
# If there is no directory component, then add one.
|
||||||
case $file in
|
case $file in
|
||||||
*/* | *\\*) . $file ;;
|
*/* | *\\*) . $file ;;
|
||||||
|
@ -4714,7 +4612,7 @@ relink_command=\"$relink_command\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Now prepare to actually exec the command.
|
# Now prepare to actually exec the command.
|
||||||
exec_cmd="\$cmd$args"
|
exec_cmd='"$cmd"$args'
|
||||||
else
|
else
|
||||||
# Display what would be done.
|
# Display what would be done.
|
||||||
if test -n "$shlibpath_var"; then
|
if test -n "$shlibpath_var"; then
|
||||||
|
@ -4791,7 +4689,7 @@ relink_command=\"$relink_command\""
|
||||||
case $name in
|
case $name in
|
||||||
*.la)
|
*.la)
|
||||||
# Possibly a libtool archive, so verify it.
|
# Possibly a libtool archive, so verify it.
|
||||||
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
||||||
. $dir/$name
|
. $dir/$name
|
||||||
|
|
||||||
# Delete the libtool libraries and symlinks.
|
# Delete the libtool libraries and symlinks.
|
||||||
|
@ -4837,30 +4735,16 @@ relink_command=\"$relink_command\""
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*.lo)
|
*.lo)
|
||||||
# Possibly a libtool object, so verify it.
|
if test "$build_old_libs" = yes; then
|
||||||
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
|
||||||
|
rmfiles="$rmfiles $dir/$oldobj"
|
||||||
# Read the .lo file
|
|
||||||
. $dir/$name
|
|
||||||
|
|
||||||
# Add PIC object to the list of files to remove.
|
|
||||||
if test -n "$pic_object" \
|
|
||||||
&& test "$pic_object" != none; then
|
|
||||||
rmfiles="$rmfiles $dir/$pic_object"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add non-PIC object to the list of files to remove.
|
|
||||||
if test -n "$non_pic_object" \
|
|
||||||
&& test "$non_pic_object" != none; then
|
|
||||||
rmfiles="$rmfiles $dir/$non_pic_object"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
# Do a test to see if this is a libtool program.
|
# Do a test to see if this is a libtool program.
|
||||||
if test $mode = clean &&
|
if test $mode = clean &&
|
||||||
(${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
(sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
||||||
relink_command=
|
relink_command=
|
||||||
. $dir/$file
|
. $dir/$file
|
||||||
|
|
||||||
|
|
|
@ -41,13 +41,15 @@
|
||||||
|
|
||||||
#include "Window.h"
|
#include "Window.h"
|
||||||
#include <QuickTime/Movies.h>
|
#include <QuickTime/Movies.h>
|
||||||
|
#include <OpenGL/OpenGL.h>
|
||||||
#include "org_lwjgl_opengl_Window.h"
|
#include "org_lwjgl_opengl_Window.h"
|
||||||
#include "extgl.h"
|
#include "extgl.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
#include "common_tools.h"
|
#include "common_tools.h"
|
||||||
|
|
||||||
static WindowRef win_ref;
|
static WindowRef win_ref;
|
||||||
static AGLContext context;
|
static AGLContext windowed_context;
|
||||||
|
static CGLContextObj fullscreen_context;
|
||||||
static bool close_requested;
|
static bool close_requested;
|
||||||
static Ptr fullscreen_ptr;
|
static Ptr fullscreen_ptr;
|
||||||
static bool current_fullscreen;
|
static bool current_fullscreen;
|
||||||
|
@ -152,14 +154,19 @@ static void destroyWindow(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void destroy(void) {
|
static void destroy(void) {
|
||||||
aglSetCurrentContext(NULL);
|
if (current_fullscreen) {
|
||||||
aglDestroyContext(context);
|
CGLSetCurrentContext(NULL);
|
||||||
|
CGLDestroyContext(fullscreen_context);
|
||||||
|
} else {
|
||||||
|
aglSetCurrentContext(NULL);
|
||||||
|
aglDestroyContext(windowed_context);
|
||||||
|
}
|
||||||
destroyWindow();
|
destroyWindow();
|
||||||
extgl_Close();
|
extgl_Close();
|
||||||
destroyLock();
|
destroyLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool createContext(JNIEnv *env, jint bpp, jint alpha, jint depth, jint stencil) {
|
static bool createWindowedContext(JNIEnv *env, jint bpp, jint alpha, jint depth, jint stencil) {
|
||||||
AGLDrawable drawable = GetWindowPort(win_ref);
|
AGLDrawable drawable = GetWindowPort(win_ref);
|
||||||
SetPort(drawable);
|
SetPort(drawable);
|
||||||
GLint attrib[] = {AGL_RGBA,
|
GLint attrib[] = {AGL_RGBA,
|
||||||
|
@ -177,25 +184,60 @@ static bool createContext(JNIEnv *env, jint bpp, jint alpha, jint depth, jint st
|
||||||
throwException(env, "Could not find matching pixel format");
|
throwException(env, "Could not find matching pixel format");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
context = aglCreateContext (format, NULL);
|
windowed_context = aglCreateContext (format, NULL);
|
||||||
aglDestroyPixelFormat(format);
|
aglDestroyPixelFormat(format);
|
||||||
if (context == NULL) {
|
if (windowed_context == NULL) {
|
||||||
throwException(env, "Could not create context");
|
throwException(env, "Could not create context");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (aglSetDrawable(context, drawable) == GL_FALSE) {
|
if (aglSetDrawable(windowed_context, drawable) == GL_FALSE) {
|
||||||
aglDestroyContext(context);
|
aglDestroyContext(windowed_context);
|
||||||
throwException(env, "Could not attach context");
|
throwException(env, "Could not attach context");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (aglSetCurrentContext(context) == GL_FALSE) {
|
if (aglSetCurrentContext(windowed_context) == GL_FALSE) {
|
||||||
aglDestroyContext(context);
|
aglDestroyContext(windowed_context);
|
||||||
throwException(env, "Could not set current context");
|
throwException(env, "Could not set current context");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool createFullscreenContext(JNIEnv *env, jint bpp, jint alpha, jint depth, jint stencil) {
|
||||||
|
CGOpenGLDisplayMask display_mask = CGDisplayIDToOpenGLDisplayMask(kCGDirectMainDisplay);
|
||||||
|
CGLPixelFormatObj pixel_format;
|
||||||
|
long num_formats;
|
||||||
|
CGLPixelFormatAttribute attribs[] = {kCGLPFAFullScreen,
|
||||||
|
kCGLPFADoubleBuffer,
|
||||||
|
kCGLPFAMinimumPolicy,
|
||||||
|
kCGLPFAAccelerated,
|
||||||
|
kCGLPFADisplayMask,
|
||||||
|
(CGLPixelFormatAttribute)display_mask,
|
||||||
|
kCGLPFAColorSize,
|
||||||
|
(CGLPixelFormatAttribute)bpp,
|
||||||
|
kCGLPFAAlphaSize,
|
||||||
|
(CGLPixelFormatAttribute)alpha,
|
||||||
|
kCGLPFADepthSize,
|
||||||
|
(CGLPixelFormatAttribute)depth,
|
||||||
|
kCGLPFAStencilSize,
|
||||||
|
(CGLPixelFormatAttribute)stencil,
|
||||||
|
(CGLPixelFormatAttribute)NULL};
|
||||||
|
CGLChoosePixelFormat(attribs, &pixel_format, &num_formats);
|
||||||
|
if (pixel_format == NULL) {
|
||||||
|
throwException(env, "Could not find matching pixel format");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CGLCreateContext(pixel_format, NULL, &fullscreen_context);
|
||||||
|
CGLDestroyPixelFormat(pixel_format);
|
||||||
|
if (fullscreen_context == NULL) {
|
||||||
|
throwException(env, "Could not create fullscreen context");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CGLSetFullScreen(fullscreen_context);
|
||||||
|
CGLSetCurrentContext(fullscreen_context);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Window_nIsCloseRequested(JNIEnv *, jclass) {
|
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Window_nIsCloseRequested(JNIEnv *, jclass) {
|
||||||
bool saved;
|
bool saved;
|
||||||
lock();
|
lock();
|
||||||
|
@ -235,12 +277,12 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nCreate(JNIEnv *env, jclass
|
||||||
throwException(env, "Could not create window");
|
throwException(env, "Could not create window");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!registerEventHandlers(env)) {
|
if (!initLock(env)) {
|
||||||
destroyWindow();
|
destroyWindow();
|
||||||
extgl_Close();
|
extgl_Close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!initLock(env)) {
|
if (!registerEventHandlers(env)) {
|
||||||
destroyWindow();
|
destroyWindow();
|
||||||
extgl_Close();
|
extgl_Close();
|
||||||
return;
|
return;
|
||||||
|
@ -248,7 +290,13 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nCreate(JNIEnv *env, jclass
|
||||||
setWindowTitle(env, title);
|
setWindowTitle(env, title);
|
||||||
const RGBColor background_color = {0, 0, 0};
|
const RGBColor background_color = {0, 0, 0};
|
||||||
SetWindowContentColor(win_ref, &background_color);
|
SetWindowContentColor(win_ref, &background_color);
|
||||||
if (!createContext(env, bpp, alpha, depth, stencil)) {
|
bool success;
|
||||||
|
if (current_fullscreen) {
|
||||||
|
success = createFullscreenContext(env, bpp, alpha, depth, stencil);
|
||||||
|
} else {
|
||||||
|
success = createWindowedContext(env, bpp, alpha, depth, stencil);
|
||||||
|
}
|
||||||
|
if (!success) {
|
||||||
destroyLock();
|
destroyLock();
|
||||||
destroyWindow();
|
destroyWindow();
|
||||||
extgl_Close();
|
extgl_Close();
|
||||||
|
@ -275,7 +323,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_update(JNIEnv *env, jclass c
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_swapBuffers(JNIEnv * env, jclass clazz) {
|
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_swapBuffers(JNIEnv * env, jclass clazz) {
|
||||||
aglSwapBuffers(context);
|
if (current_fullscreen) {
|
||||||
|
CGLFlushDrawable(fullscreen_context);
|
||||||
|
} else {
|
||||||
|
aglSwapBuffers(windowed_context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_minimize(JNIEnv *env, jclass clazz) {
|
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_minimize(JNIEnv *env, jclass clazz) {
|
||||||
|
|
Loading…
Reference in New Issue