generate libraries with correct RPATH definition if --prefix is used

remove Darwin-specific hack
This commit is contained in:
Joachim Reichel 2007-03-26 17:47:01 +00:00
parent 02530f52c8
commit cae96de071
1 changed files with 11 additions and 17 deletions

View File

@ -3919,15 +3919,18 @@ write_linker_flags()
fi
done
if [ -n "${RUNTIME_LINKER_FLAG}" ]; then
if [ "${CGAL_DIR}" = "${CGAL_INSTALL_DIR}" ]; then
_CGAL_IDIR=`concat_path \"\\\$(CGAL_LIB_DIR)\" \"\\\$(CGAL_OS_COMPILER)\"`
else
_CGAL_IDIR=`concat_path "${CGAL_INSTALL_DIR}" lib`
fi
RUNTIME_PATH="`split_up \"RUNTIME_PATH\" \":\"`"
if [ -z "${RUNTIME_PATH}" ]; then
makefile_print_continuationline \
"${RUNTIME_LINKER_FLAG}`concat_path \"\\\$(CGAL_LIB_DIR)\" \"\\\$(CGAL_OS_COMPILER)\"`" \
>> ${FILE}
makefile_print_continuationline \
"${RUNTIME_LINKER_FLAG}${_CGAL_IDIR}" >> ${FILE}
else
makefile_print_continuationline \
"${RUNTIME_LINKER_FLAG}`concat_path \"\\\$(CGAL_LIB_DIR)\" \"\\\$(CGAL_OS_COMPILER)\"`:${RUNTIME_PATH}" \
>> ${FILE}
makefile_print_continuationline \
"${RUNTIME_LINKER_FLAG}${_CGAL_IDIR}:${RUNTIME_PATH}" >> ${FILE}
fi
fi
makefile_print_continuationline ")" >> ${FILE}
@ -4488,6 +4491,7 @@ installation()
make_lib_dir
# install header files
# remove config/${CGAL_OS_COMPILER}/CGAL
_CGAL_IDIR="${CGAL_INSTALL_DIR}/include"
_check_dir_exists_create "${_CGAL_IDIR}"
_do_command \
@ -4501,16 +4505,6 @@ installation()
_do_command \
"cd \"${CGAL_LIB_DIR}/${CGAL_OS_COMPILER}\"; ${_tar} cf - . | (cd \"${_CGAL_IDIR}\"; ${_tar} xf -)" \
"Install CGAL libraries"
# On Darwin, the path is encoded into the shared library
case ${CGAL_OS_COMPILER} in
*Darwin*)
#for i in "${_CGAL_IDIR}"/*${CGAL_SHARED_LIB_EXT}; do
for i in `cd "${CGAL_LIB_DIR}/${CGAL_OS_COMPILER}"; ls *${CGAL_SHARED_LIB_EXT}`; do
log_print "Fixing lib paths in" "${i}"
${_install_name_tool} -id "${_CGAL_IDIR}/${i}" "${_CGAL_IDIR}/${i}"
${_install_name_tool} -change "${CGAL_LIB_DIR}/${CGAL_OS_COMPILER}/libCGAL.dylib" "${_CGAL_IDIR}/libCGAL.dylib" "${_CGAL_IDIR}/${i}"
done;;
esac
# install binaries
_CGAL_IDIR="${CGAL_INSTALL_DIR}/bin"
@ -4520,6 +4514,7 @@ installation()
"Install CGAL programs"
# install makefile
# adjust makefile
_CGAL_IDIR="${CGAL_INSTALL_DIR}/share/cgal"
_check_dir_exists_create "${_CGAL_IDIR}"
CGAL_INSTALL_MAKEFILE="${_CGAL_IDIR}/makefile"
@ -5032,7 +5027,6 @@ startup()
guess_os 'log_print'
case ${SYST} in
*CYGWIN*) _check_for_sysutil cygpath y;;
*Darwin*) _check_for_sysutil install_name_tool y;;
esac
${_printf} "\n%s\n" \
"--------------------------------------------------------"