From b8f38ee186cd450cc6cb942b17c46f26fe2a78e6 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 23 Jul 2007 19:02:09 +0000 Subject: [PATCH] use libpath, not prefix/lib, for libtool -rpath svn: r6952 --- src/configure | 16 +++++++++------- src/mzscheme/configure.ac | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/configure b/src/configure index a4e363a1de..2dd2a6e155 100755 --- a/src/configure +++ b/src/configure @@ -11146,13 +11146,15 @@ if test "${enable_shared}" = "yes" ; then fi abssrcdir=`(cd ${srcdir}; pwd)` - # Try to convert prefix to an absolute path: - if test -d "${prefix}" ; then - absprefix=`(cd ${prefix}; pwd)` + # Try to convert libdir to an absolute path: + # (Is this necessary anymore?) + if test -d "${libdir}" ; then + abslibdir=`(cd ${libdir}; pwd)` else - absprefix="${prefix}" + abslibdir="${libdir}" fi + if test "${LIBTOOLPROG}" = "" ; then (cd lt; sh ${abssrcdir}/lt/configure --enable-shared --disable-static) 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` 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" ARFLAGS="" RANLIB=":" - MZLINKER="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc} -rpath ${absprefix}/lib" - MREDLINKER="${LIBTOOLPROG} --mode=link --tag=CXX $CXX${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 ${abslibdir}" PLAIN_CC="$CC" CC="${LIBTOOLPROG} --mode=compile --tag=CC $CC" CXX="${LIBTOOLPROG} --mode=compile --tag=CXX $CXX" diff --git a/src/mzscheme/configure.ac b/src/mzscheme/configure.ac index b7395420a2..049cad3357 100644 --- a/src/mzscheme/configure.ac +++ b/src/mzscheme/configure.ac @@ -1159,12 +1159,14 @@ if test "${enable_shared}" = "yes" ; then fi abssrcdir=`(cd ${srcdir}; pwd)` - # Try to convert prefix to an absolute path: - if test -d "${prefix}" ; then - absprefix=`(cd ${prefix}; pwd)` + # Try to convert libdir to an absolute path: + # (Is this necessary anymore?) + if test -d "${libdir}" ; then + abslibdir=`(cd ${libdir}; pwd)` else - absprefix="${prefix}" + abslibdir="${libdir}" fi + if test "${LIBTOOLPROG}" = "" ; then (cd lt; sh ${abssrcdir}/lt/configure --enable-shared --disable-static) @@ -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` 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" ARFLAGS="" RANLIB=":" - MZLINKER="${LIBTOOLPROG} --mode=link --tag=CC $CC${need_gcc_static_libgcc} -rpath ${absprefix}/lib" - MREDLINKER="${LIBTOOLPROG} --mode=link --tag=CXX $CXX${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 ${abslibdir}" PLAIN_CC="$CC" CC="${LIBTOOLPROG} --mode=compile --tag=CC $CC" CXX="${LIBTOOLPROG} --mode=compile --tag=CXX $CXX"