use libpath, not prefix/lib, for libtool -rpath

svn: r6952
This commit is contained in:
Matthew Flatt 2007-07-23 19:02:09 +00:00
parent b0ac0c7c87
commit b8f38ee186
2 changed files with 18 additions and 14 deletions

16
src/configure vendored
View File

@ -11146,13 +11146,15 @@ if test "${enable_shared}" = "yes" ; then
fi fi
abssrcdir=`(cd ${srcdir}; pwd)` abssrcdir=`(cd ${srcdir}; pwd)`
# Try to convert prefix to an absolute path: # Try to convert libdir to an absolute path:
if test -d "${prefix}" ; then # (Is this necessary anymore?)
absprefix=`(cd ${prefix}; pwd)` if test -d "${libdir}" ; then
abslibdir=`(cd ${libdir}; pwd)`
else else
absprefix="${prefix}" abslibdir="${libdir}"
fi fi
if test "${LIBTOOLPROG}" = "" ; then if test "${LIBTOOLPROG}" = "" ; then
(cd lt; sh ${abssrcdir}/lt/configure --enable-shared --disable-static) (cd lt; sh ${abssrcdir}/lt/configure --enable-shared --disable-static)
LIBTOOLPROG=`pwd`/lt/libtool LIBTOOLPROG=`pwd`/lt/libtool
@ -11176,12 +11178,12 @@ if test "${enable_shared}" = "yes" ; then
plt_lib_version=`grep " MZSCHEME_VERSION " ${srcdir}/mzscheme/src/schvers.h | cut -d '"' -f 2` plt_lib_version=`grep " MZSCHEME_VERSION " ${srcdir}/mzscheme/src/schvers.h | cut -d '"' -f 2`
fi fi
AR="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc}${ar_libtool_no_undefined} -release ${plt_lib_version} -rpath ${absprefix}/lib -o" AR="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc}${ar_libtool_no_undefined} -release ${plt_lib_version} -rpath ${abslibdir} -o"
STATIC_AR="${LIBTOOLPROG} --mode=link --tag=CC $CC -o" STATIC_AR="${LIBTOOLPROG} --mode=link --tag=CC $CC -o"
ARFLAGS="" ARFLAGS=""
RANLIB=":" RANLIB=":"
MZLINKER="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc} -rpath ${absprefix}/lib" MZLINKER="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc} -rpath ${abslibdir}"
MREDLINKER="${LIBTOOLPROG} --mode=link --tag=CXX $CXX${need_gcc_static_libgcc} -rpath ${absprefix}/lib" MREDLINKER="${LIBTOOLPROG} --mode=link --tag=CXX $CXX${need_gcc_static_libgcc} -rpath ${abslibdir}"
PLAIN_CC="$CC" PLAIN_CC="$CC"
CC="${LIBTOOLPROG} --mode=compile --tag=CC $CC" CC="${LIBTOOLPROG} --mode=compile --tag=CC $CC"
CXX="${LIBTOOLPROG} --mode=compile --tag=CXX $CXX" CXX="${LIBTOOLPROG} --mode=compile --tag=CXX $CXX"

View File

@ -1159,13 +1159,15 @@ if test "${enable_shared}" = "yes" ; then
fi fi
abssrcdir=`(cd ${srcdir}; pwd)` abssrcdir=`(cd ${srcdir}; pwd)`
# Try to convert prefix to an absolute path: # Try to convert libdir to an absolute path:
if test -d "${prefix}" ; then # (Is this necessary anymore?)
absprefix=`(cd ${prefix}; pwd)` if test -d "${libdir}" ; then
abslibdir=`(cd ${libdir}; pwd)`
else else
absprefix="${prefix}" abslibdir="${libdir}"
fi fi
if test "${LIBTOOLPROG}" = "" ; then if test "${LIBTOOLPROG}" = "" ; then
(cd lt; sh ${abssrcdir}/lt/configure --enable-shared --disable-static) (cd lt; sh ${abssrcdir}/lt/configure --enable-shared --disable-static)
LIBTOOLPROG=`pwd`/lt/libtool LIBTOOLPROG=`pwd`/lt/libtool
@ -1189,12 +1191,12 @@ if test "${enable_shared}" = "yes" ; then
plt_lib_version=`grep " MZSCHEME_VERSION " ${srcdir}/mzscheme/src/schvers.h | cut -d '"' -f 2` plt_lib_version=`grep " MZSCHEME_VERSION " ${srcdir}/mzscheme/src/schvers.h | cut -d '"' -f 2`
fi fi
AR="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc}${ar_libtool_no_undefined} -release ${plt_lib_version} -rpath ${absprefix}/lib -o" AR="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc}${ar_libtool_no_undefined} -release ${plt_lib_version} -rpath ${abslibdir} -o"
STATIC_AR="${LIBTOOLPROG} --mode=link --tag=CC $CC -o" STATIC_AR="${LIBTOOLPROG} --mode=link --tag=CC $CC -o"
ARFLAGS="" ARFLAGS=""
RANLIB=":" RANLIB=":"
MZLINKER="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc} -rpath ${absprefix}/lib" MZLINKER="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc} -rpath ${abslibdir}"
MREDLINKER="${LIBTOOLPROG} --mode=link --tag=CXX $CXX${need_gcc_static_libgcc} -rpath ${absprefix}/lib" MREDLINKER="${LIBTOOLPROG} --mode=link --tag=CXX $CXX${need_gcc_static_libgcc} -rpath ${abslibdir}"
PLAIN_CC="$CC" PLAIN_CC="$CC"
CC="${LIBTOOLPROG} --mode=compile --tag=CC $CC" CC="${LIBTOOLPROG} --mode=compile --tag=CC $CC"
CXX="${LIBTOOLPROG} --mode=compile --tag=CXX $CXX" CXX="${LIBTOOLPROG} --mode=compile --tag=CXX $CXX"