Pass rpath to linker if --enable-shared was given (#65, #66, #82)

This commit is contained in:
Yamashita Yuu 2013-12-20 18:19:22 +09:00
parent 3d5156ed1d
commit 43212f64ed

View file

@ -1316,6 +1316,10 @@ if [ -n "$DEBUG" ]; then
PYTHON_CONFIGURE_OPTS="--with-pydebug $PYTHON_CONFIGURE_OPTS"
fi
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-shared"* ]] && [[ "$LDFLAGS" != *"-Wl,-rpath="* ]]; then
LDFLAGS="-Wl,-rpath=${PREFIX_PATH}/lib ${LDFLAGS}"
fi
SEED="$(date "+%Y%m%d%H%M%S").$$"
LOG_PATH="${TMP}/python-build.${SEED}.log"
PYTHON_BIN="${PREFIX_PATH}/bin/python"