Makefile.am (libgomp_la_LDFLAGS): Add -bindir flag.
libgomp/ChangeLog: * Makefile.am (libgomp_la_LDFLAGS): Add -bindir flag. * Makefile.in: Regenerate. ChangeLog: * ltmain.sh (func_normal_abspath): New function. (func_relative_path): Likewise. (func_mode_help): Document new -bindir option for link mode. (func_mode_link): Add new -bindir option, and use it to place output DLL if specified. libgfortran/ChangeLog: * Makefile.am (LTLDFLAGS): Add -bindir flag. * Makefile.in: Regenerate. libssp/ChangeLog: * Makefile.am (libssp_la_LDFLAGS): Add -bindir flag. * Makefile.in: Regenerate. libjava/libltdl/ChangeLog: * Makefile.am (libltdl_la_LDFLAGS): Add -bindir flag. * Makefile.in: Regenerate. libjava/classpath/ChangeLog: * ltmain.sh (func_normal_abspath): New function. (func_relative_path): Likewise. (func_mode_help): Document new -bindir option for link mode. (func_mode_link): Add new -bindir option, and use it to place output DLL if specified. From-SVN: r150960
This commit is contained in:
parent
7e9f2c0f33
commit
197c68cc97
@ -1,3 +1,11 @@
|
||||
2009-08-20 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||
|
||||
* ltmain.sh (func_normal_abspath): New function.
|
||||
(func_relative_path): Likewise.
|
||||
(func_mode_help): Document new -bindir option for link mode.
|
||||
(func_mode_link): Add new -bindir option, and use it to place
|
||||
output DLL if specified.
|
||||
|
||||
2009-08-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* configure.ac: Call AC_DISABLE_OPTION_CHECKING.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-08-20 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||
|
||||
* Makefile.am (LTLDFLAGS): Add -bindir flag.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2009-08-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/41075
|
||||
|
@ -14,7 +14,7 @@ version_arg =
|
||||
endif
|
||||
|
||||
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) \
|
||||
-no-undefined
|
||||
-no-undefined -bindir "$(bindir)"
|
||||
|
||||
toolexeclib_LTLIBRARIES = libgfortran.la
|
||||
libgfortran_la_LINK = $(LINK)
|
||||
|
@ -958,7 +958,7 @@ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
|
||||
@LIBGFOR_USE_SYMVER_FALSE@version_arg =
|
||||
@LIBGFOR_USE_SYMVER_TRUE@version_arg = -Wl,--version-script=$(srcdir)/gfortran.map
|
||||
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) \
|
||||
-no-undefined
|
||||
-no-undefined -bindir "$(bindir)"
|
||||
|
||||
toolexeclib_LTLIBRARIES = libgfortran.la
|
||||
libgfortran_la_LINK = $(LINK)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-08-20 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||
|
||||
* Makefile.am (libgomp_la_LDFLAGS): Add -bindir flag.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2009-08-19 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/41102
|
||||
|
@ -28,7 +28,7 @@ libgomp_version_script =
|
||||
endif
|
||||
libgomp_version_info = -version-info $(libtool_VERSION)
|
||||
libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \
|
||||
-no-undefined
|
||||
-no-undefined -bindir "$(bindir)"
|
||||
|
||||
libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
|
||||
iter_ull.c loop.c loop_ull.c ordered.c parallel.c sections.c single.c \
|
||||
|
@ -305,7 +305,7 @@ nodist_toolexeclib_HEADERS = libgomp.spec
|
||||
@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,--version-script,$(top_srcdir)/libgomp.map
|
||||
libgomp_version_info = -version-info $(libtool_VERSION)
|
||||
libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \
|
||||
-no-undefined
|
||||
-no-undefined -bindir "$(bindir)"
|
||||
|
||||
libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
|
||||
iter_ull.c loop.c loop_ull.c ordered.c parallel.c sections.c single.c \
|
||||
@ -316,9 +316,10 @@ nodist_noinst_HEADERS = libgomp_f.h
|
||||
nodist_libsubinclude_HEADERS = omp.h
|
||||
@USE_FORTRAN_TRUE@nodist_finclude_HEADERS = omp_lib.h omp_lib.f90 omp_lib.mod omp_lib_kinds.mod
|
||||
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
LINK = $(LIBTOOL) --tag CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LTLDFLAGS) -o $@
|
||||
|
||||
|
||||
# Automake Documentation:
|
||||
# If your package has Texinfo files in many directories, you can use the
|
||||
# variable TEXINFO_TEX to tell Automake where to find the canonical
|
||||
|
@ -1,3 +1,11 @@
|
||||
2009-08-20 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||
|
||||
* ltmain.sh (func_normal_abspath): New function.
|
||||
(func_relative_path): Likewise.
|
||||
(func_mode_help): Document new -bindir option for link mode.
|
||||
(func_mode_link): Add new -bindir option, and use it to place
|
||||
output DLL if specified.
|
||||
|
||||
2009-06-29 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR java/40590
|
||||
|
@ -170,6 +170,151 @@ func_dirname_and_basename ()
|
||||
|
||||
# Generated shell functions inserted here.
|
||||
|
||||
# These SED scripts presuppose an absolute path with a trailing slash.
|
||||
pathcar="s,^/\([^/]*\).*$,\1,"
|
||||
pathcdr="s,^/[^/]*,,"
|
||||
removedotparts="s,/\(\./\)\{1\,\},/,g;s,/\.$,/,"
|
||||
collapseslashes="s,/\{1\,\},/,g"
|
||||
finalslash="s,/*$,/,"
|
||||
|
||||
# func_normal_abspath PATH
|
||||
# Remove doubled-up and trailing slashes, "." path components,
|
||||
# and cancel out any ".." path components in PATH after making
|
||||
# it an absolute path.
|
||||
# value returned in "$func_normal_abspath_result"
|
||||
func_normal_abspath ()
|
||||
{
|
||||
# Start from root dir and reassemble the path.
|
||||
func_normal_abspath_result=
|
||||
func_normal_abspath_tpath=$1
|
||||
func_normal_abspath_altnamespace=
|
||||
case $func_normal_abspath_tpath in
|
||||
"")
|
||||
# Empty path, that just means $cwd.
|
||||
func_stripname '' '/' "`pwd`"
|
||||
func_normal_abspath_result=$func_stripname_result
|
||||
return
|
||||
;;
|
||||
# The next three entries are used to spot a run of precisely
|
||||
# two leading slashes without using negated character classes;
|
||||
# we take advantage of case's first-match behaviour.
|
||||
///*)
|
||||
# Unusual form of absolute path, do nothing.
|
||||
;;
|
||||
//*)
|
||||
# Not necessarily an ordinary path; POSIX reserves leading '//'
|
||||
# and for example Cygwin uses it to access remote file shares
|
||||
# over CIFS/SMB, so we conserve a leading double slash if found.
|
||||
func_normal_abspath_altnamespace=/
|
||||
;;
|
||||
/*)
|
||||
# Absolute path, do nothing.
|
||||
;;
|
||||
*)
|
||||
# Relative path, prepend $cwd.
|
||||
func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
|
||||
;;
|
||||
esac
|
||||
# Cancel out all the simple stuff to save iterations. We also want
|
||||
# the path to end with a slash for ease of parsing, so make sure
|
||||
# there is one (and only one) here.
|
||||
func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
|
||||
-e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
|
||||
while :; do
|
||||
# Processed it all yet?
|
||||
if test "$func_normal_abspath_tpath" = / ; then
|
||||
# If we ascended to the root using ".." the result may be empty now.
|
||||
if test -z "$func_normal_abspath_result" ; then
|
||||
func_normal_abspath_result=/
|
||||
fi
|
||||
break
|
||||
fi
|
||||
func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
|
||||
-e "$pathcar"`
|
||||
func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
|
||||
-e "$pathcdr"`
|
||||
# Figure out what to do with it
|
||||
case $func_normal_abspath_tcomponent in
|
||||
"")
|
||||
# Trailing empty path component, ignore it.
|
||||
;;
|
||||
..)
|
||||
# Parent dir; strip last assembled component from result.
|
||||
func_dirname "$func_normal_abspath_result"
|
||||
func_normal_abspath_result=$func_dirname_result
|
||||
;;
|
||||
*)
|
||||
# Actual path component, append it.
|
||||
func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
|
||||
;;
|
||||
esac
|
||||
done
|
||||
# Restore leading double-slash if one was found on entry.
|
||||
func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
|
||||
}
|
||||
|
||||
# func_relative_path SRCDIR DSTDIR
|
||||
# generates a relative path from SRCDIR to DSTDIR, with a trailing
|
||||
# slash if non-empty, suitable for immediately appending a filename
|
||||
# without needing to append a separator.
|
||||
# value returned in "$func_relative_path_result"
|
||||
func_relative_path ()
|
||||
{
|
||||
func_relative_path_result=
|
||||
func_normal_abspath "$1"
|
||||
func_relative_path_tlibdir=$func_normal_abspath_result
|
||||
func_normal_abspath "$2"
|
||||
func_relative_path_tbindir=$func_normal_abspath_result
|
||||
|
||||
# Ascend the tree starting from libdir
|
||||
while :; do
|
||||
# check if we have found a prefix of bindir
|
||||
case $func_relative_path_tbindir in
|
||||
$func_relative_path_tlibdir)
|
||||
# found an exact match
|
||||
func_relative_path_tcancelled=
|
||||
break
|
||||
;;
|
||||
$func_relative_path_tlibdir*)
|
||||
# found a matching prefix
|
||||
func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
|
||||
func_relative_path_tcancelled=$func_stripname_result
|
||||
if test -z "$func_relative_path_result"; then
|
||||
func_relative_path_result=.
|
||||
fi
|
||||
break
|
||||
;;
|
||||
*)
|
||||
func_dirname $func_relative_path_tlibdir
|
||||
func_relative_path_tlibdir=${func_dirname_result}
|
||||
if test "x$func_relative_path_tlibdir" = x ; then
|
||||
# Have to descend all the way to the root!
|
||||
func_relative_path_result=../$func_relative_path_result
|
||||
func_relative_path_tcancelled=$func_relative_path_tbindir
|
||||
break
|
||||
fi
|
||||
func_relative_path_result=../$func_relative_path_result
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Now calculate path; take care to avoid doubling-up slashes.
|
||||
func_stripname '' '/' "$func_relative_path_result"
|
||||
func_relative_path_result=$func_stripname_result
|
||||
func_stripname '/' '/' "$func_relative_path_tcancelled"
|
||||
if test "x$func_stripname_result" != x ; then
|
||||
func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
|
||||
fi
|
||||
|
||||
# Normalisation. If bindir is libdir, return empty string,
|
||||
# else relative path ending with a slash; either way, target
|
||||
# file name can be directly appended.
|
||||
if test ! -z "$func_relative_path_result"; then
|
||||
func_stripname './' '' "$func_relative_path_result/"
|
||||
func_relative_path_result=$func_stripname_result
|
||||
fi
|
||||
}
|
||||
|
||||
# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
|
||||
# is ksh but when the shell is invoked as "sh" and the current value of
|
||||
# the _XPG environment variable is not equal to 1 (one), the special
|
||||
@ -1558,6 +1703,8 @@ The following components of LINK-COMMAND are treated specially:
|
||||
|
||||
-all-static do not do any dynamic linking at all
|
||||
-avoid-version do not add a version suffix if possible
|
||||
-bindir BINDIR specify path to binaries directory (for systems where
|
||||
libraries must be found in the PATH setting at runtime)
|
||||
-dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
|
||||
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
|
||||
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
|
||||
@ -4072,6 +4219,7 @@ func_mode_link ()
|
||||
new_inherited_linker_flags=
|
||||
|
||||
avoid_version=no
|
||||
bindir=
|
||||
dlfiles=
|
||||
dlprefiles=
|
||||
dlself=no
|
||||
@ -4164,6 +4312,11 @@ func_mode_link ()
|
||||
esac
|
||||
|
||||
case $prev in
|
||||
bindir)
|
||||
bindir="$arg"
|
||||
prev=
|
||||
continue
|
||||
;;
|
||||
dlfiles|dlprefiles)
|
||||
if test "$preload" = no; then
|
||||
# Add the symbol object into the linking commands.
|
||||
@ -4425,6 +4578,11 @@ func_mode_link ()
|
||||
continue
|
||||
;;
|
||||
|
||||
-bindir)
|
||||
prev=bindir
|
||||
continue
|
||||
;;
|
||||
|
||||
-dlopen)
|
||||
prev=dlfiles
|
||||
continue
|
||||
@ -8121,9 +8279,27 @@ EOF
|
||||
fi
|
||||
$RM $output
|
||||
# place dlname in correct position for cygwin
|
||||
# In fact, it would be nice if we could use this code for all target
|
||||
# systems that can't hard-code library paths into their executables
|
||||
# and that have no shared library path variable independent of PATH,
|
||||
# but it turns out we can't easily determine that from inspecting
|
||||
# libtool variables, so we have to hard-code the OSs to which it
|
||||
# applies here; at the moment, that means platforms that use the PE
|
||||
# object format with DLL files. See the long comment at the top of
|
||||
# tests/bindir.at for full details.
|
||||
tdlname=$dlname
|
||||
case $host,$output,$installed,$module,$dlname in
|
||||
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
|
||||
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
|
||||
# If a -bindir argument was supplied, place the dll there.
|
||||
if test "x$bindir" != x ;
|
||||
then
|
||||
func_relative_path "$install_libdir" "$bindir"
|
||||
tdlname=$func_relative_path_result$dlname
|
||||
else
|
||||
# Otherwise fall back on heuristic.
|
||||
tdlname=../bin/$dlname
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
$ECHO > $output "\
|
||||
# $outputname - a libtool library file
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-08-20 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||
|
||||
* Makefile.am (libltdl_la_LDFLAGS): Add -bindir flag.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* Makefile.in: Regenerate.
|
||||
|
@ -22,7 +22,7 @@ endif
|
||||
CLEANFILES = libltdl.la libltdlc.la
|
||||
|
||||
libltdl_la_SOURCES = ltdl.c
|
||||
libltdl_la_LDFLAGS = -no-undefined -version-info 4:1:1
|
||||
libltdl_la_LDFLAGS = -no-undefined -bindir "$(bindir)" -version-info 4:1:1
|
||||
libltdl_la_LIBADD = $(LIBADD_DL)
|
||||
|
||||
libltdlc_la_SOURCES = ltdl.c
|
||||
|
@ -232,7 +232,7 @@ INCLUDES = $(GCINCS)
|
||||
@CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = libltdlc.la
|
||||
CLEANFILES = libltdl.la libltdlc.la
|
||||
libltdl_la_SOURCES = ltdl.c
|
||||
libltdl_la_LDFLAGS = -no-undefined -version-info 4:1:1
|
||||
libltdl_la_LDFLAGS = -no-undefined -bindir "$(bindir)" -version-info 4:1:1
|
||||
libltdl_la_LIBADD = $(LIBADD_DL)
|
||||
libltdlc_la_SOURCES = ltdl.c
|
||||
libltdlc_la_LIBADD = $(LIBADD_DL)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-08-20 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||
|
||||
* Makefile.am (libssp_la_LDFLAGS): Add -bindir flag.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.
|
||||
|
@ -35,7 +35,7 @@ libssp_la_SOURCES = \
|
||||
libssp_la_LIBADD =
|
||||
libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD)
|
||||
libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
|
||||
$(version_arg) -no-undefined
|
||||
$(version_arg) -no-undefined -bindir "$(bindir)"
|
||||
|
||||
libssp_nonshared_la_SOURCES = \
|
||||
ssp-local.c
|
||||
|
@ -259,7 +259,7 @@ libssp_la_SOURCES = \
|
||||
libssp_la_LIBADD =
|
||||
libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD)
|
||||
libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
|
||||
$(version_arg) -no-undefined
|
||||
$(version_arg) -no-undefined -bindir "$(bindir)"
|
||||
|
||||
libssp_nonshared_la_SOURCES = \
|
||||
ssp-local.c
|
||||
|
178
ltmain.sh
178
ltmain.sh
@ -170,6 +170,151 @@ func_dirname_and_basename ()
|
||||
|
||||
# Generated shell functions inserted here.
|
||||
|
||||
# These SED scripts presuppose an absolute path with a trailing slash.
|
||||
pathcar="s,^/\([^/]*\).*$,\1,"
|
||||
pathcdr="s,^/[^/]*,,"
|
||||
removedotparts="s,/\(\./\)\{1\,\},/,g;s,/\.$,/,"
|
||||
collapseslashes="s,/\{1\,\},/,g"
|
||||
finalslash="s,/*$,/,"
|
||||
|
||||
# func_normal_abspath PATH
|
||||
# Remove doubled-up and trailing slashes, "." path components,
|
||||
# and cancel out any ".." path components in PATH after making
|
||||
# it an absolute path.
|
||||
# value returned in "$func_normal_abspath_result"
|
||||
func_normal_abspath ()
|
||||
{
|
||||
# Start from root dir and reassemble the path.
|
||||
func_normal_abspath_result=
|
||||
func_normal_abspath_tpath=$1
|
||||
func_normal_abspath_altnamespace=
|
||||
case $func_normal_abspath_tpath in
|
||||
"")
|
||||
# Empty path, that just means $cwd.
|
||||
func_stripname '' '/' "`pwd`"
|
||||
func_normal_abspath_result=$func_stripname_result
|
||||
return
|
||||
;;
|
||||
# The next three entries are used to spot a run of precisely
|
||||
# two leading slashes without using negated character classes;
|
||||
# we take advantage of case's first-match behaviour.
|
||||
///*)
|
||||
# Unusual form of absolute path, do nothing.
|
||||
;;
|
||||
//*)
|
||||
# Not necessarily an ordinary path; POSIX reserves leading '//'
|
||||
# and for example Cygwin uses it to access remote file shares
|
||||
# over CIFS/SMB, so we conserve a leading double slash if found.
|
||||
func_normal_abspath_altnamespace=/
|
||||
;;
|
||||
/*)
|
||||
# Absolute path, do nothing.
|
||||
;;
|
||||
*)
|
||||
# Relative path, prepend $cwd.
|
||||
func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
|
||||
;;
|
||||
esac
|
||||
# Cancel out all the simple stuff to save iterations. We also want
|
||||
# the path to end with a slash for ease of parsing, so make sure
|
||||
# there is one (and only one) here.
|
||||
func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
|
||||
-e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
|
||||
while :; do
|
||||
# Processed it all yet?
|
||||
if test "$func_normal_abspath_tpath" = / ; then
|
||||
# If we ascended to the root using ".." the result may be empty now.
|
||||
if test -z "$func_normal_abspath_result" ; then
|
||||
func_normal_abspath_result=/
|
||||
fi
|
||||
break
|
||||
fi
|
||||
func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
|
||||
-e "$pathcar"`
|
||||
func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
|
||||
-e "$pathcdr"`
|
||||
# Figure out what to do with it
|
||||
case $func_normal_abspath_tcomponent in
|
||||
"")
|
||||
# Trailing empty path component, ignore it.
|
||||
;;
|
||||
..)
|
||||
# Parent dir; strip last assembled component from result.
|
||||
func_dirname "$func_normal_abspath_result"
|
||||
func_normal_abspath_result=$func_dirname_result
|
||||
;;
|
||||
*)
|
||||
# Actual path component, append it.
|
||||
func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
|
||||
;;
|
||||
esac
|
||||
done
|
||||
# Restore leading double-slash if one was found on entry.
|
||||
func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
|
||||
}
|
||||
|
||||
# func_relative_path SRCDIR DSTDIR
|
||||
# generates a relative path from SRCDIR to DSTDIR, with a trailing
|
||||
# slash if non-empty, suitable for immediately appending a filename
|
||||
# without needing to append a separator.
|
||||
# value returned in "$func_relative_path_result"
|
||||
func_relative_path ()
|
||||
{
|
||||
func_relative_path_result=
|
||||
func_normal_abspath "$1"
|
||||
func_relative_path_tlibdir=$func_normal_abspath_result
|
||||
func_normal_abspath "$2"
|
||||
func_relative_path_tbindir=$func_normal_abspath_result
|
||||
|
||||
# Ascend the tree starting from libdir
|
||||
while :; do
|
||||
# check if we have found a prefix of bindir
|
||||
case $func_relative_path_tbindir in
|
||||
$func_relative_path_tlibdir)
|
||||
# found an exact match
|
||||
func_relative_path_tcancelled=
|
||||
break
|
||||
;;
|
||||
$func_relative_path_tlibdir*)
|
||||
# found a matching prefix
|
||||
func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
|
||||
func_relative_path_tcancelled=$func_stripname_result
|
||||
if test -z "$func_relative_path_result"; then
|
||||
func_relative_path_result=.
|
||||
fi
|
||||
break
|
||||
;;
|
||||
*)
|
||||
func_dirname $func_relative_path_tlibdir
|
||||
func_relative_path_tlibdir=${func_dirname_result}
|
||||
if test "x$func_relative_path_tlibdir" = x ; then
|
||||
# Have to descend all the way to the root!
|
||||
func_relative_path_result=../$func_relative_path_result
|
||||
func_relative_path_tcancelled=$func_relative_path_tbindir
|
||||
break
|
||||
fi
|
||||
func_relative_path_result=../$func_relative_path_result
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Now calculate path; take care to avoid doubling-up slashes.
|
||||
func_stripname '' '/' "$func_relative_path_result"
|
||||
func_relative_path_result=$func_stripname_result
|
||||
func_stripname '/' '/' "$func_relative_path_tcancelled"
|
||||
if test "x$func_stripname_result" != x ; then
|
||||
func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
|
||||
fi
|
||||
|
||||
# Normalisation. If bindir is libdir, return empty string,
|
||||
# else relative path ending with a slash; either way, target
|
||||
# file name can be directly appended.
|
||||
if test ! -z "$func_relative_path_result"; then
|
||||
func_stripname './' '' "$func_relative_path_result/"
|
||||
func_relative_path_result=$func_stripname_result
|
||||
fi
|
||||
}
|
||||
|
||||
# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
|
||||
# is ksh but when the shell is invoked as "sh" and the current value of
|
||||
# the _XPG environment variable is not equal to 1 (one), the special
|
||||
@ -1558,6 +1703,8 @@ The following components of LINK-COMMAND are treated specially:
|
||||
|
||||
-all-static do not do any dynamic linking at all
|
||||
-avoid-version do not add a version suffix if possible
|
||||
-bindir BINDIR specify path to binaries directory (for systems where
|
||||
libraries must be found in the PATH setting at runtime)
|
||||
-dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
|
||||
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
|
||||
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
|
||||
@ -4072,6 +4219,7 @@ func_mode_link ()
|
||||
new_inherited_linker_flags=
|
||||
|
||||
avoid_version=no
|
||||
bindir=
|
||||
dlfiles=
|
||||
dlprefiles=
|
||||
dlself=no
|
||||
@ -4164,6 +4312,11 @@ func_mode_link ()
|
||||
esac
|
||||
|
||||
case $prev in
|
||||
bindir)
|
||||
bindir="$arg"
|
||||
prev=
|
||||
continue
|
||||
;;
|
||||
dlfiles|dlprefiles)
|
||||
if test "$preload" = no; then
|
||||
# Add the symbol object into the linking commands.
|
||||
@ -4425,6 +4578,11 @@ func_mode_link ()
|
||||
continue
|
||||
;;
|
||||
|
||||
-bindir)
|
||||
prev=bindir
|
||||
continue
|
||||
;;
|
||||
|
||||
-dlopen)
|
||||
prev=dlfiles
|
||||
continue
|
||||
@ -8121,9 +8279,27 @@ EOF
|
||||
fi
|
||||
$RM $output
|
||||
# place dlname in correct position for cygwin
|
||||
# In fact, it would be nice if we could use this code for all target
|
||||
# systems that can't hard-code library paths into their executables
|
||||
# and that have no shared library path variable independent of PATH,
|
||||
# but it turns out we can't easily determine that from inspecting
|
||||
# libtool variables, so we have to hard-code the OSs to which it
|
||||
# applies here; at the moment, that means platforms that use the PE
|
||||
# object format with DLL files. See the long comment at the top of
|
||||
# tests/bindir.at for full details.
|
||||
tdlname=$dlname
|
||||
case $host,$output,$installed,$module,$dlname in
|
||||
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
|
||||
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
|
||||
# If a -bindir argument was supplied, place the dll there.
|
||||
if test "x$bindir" != x ;
|
||||
then
|
||||
func_relative_path "$install_libdir" "$bindir"
|
||||
tdlname=$func_relative_path_result$dlname
|
||||
else
|
||||
# Otherwise fall back on heuristic.
|
||||
tdlname=../bin/$dlname
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
$ECHO > $output "\
|
||||
# $outputname - a libtool library file
|
||||
|
Loading…
Reference in New Issue
Block a user