From 0f3f935e3db024a38ffb08c3bd664cf8ac465f6f Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 21 Dec 2005 07:51:45 +0000 Subject: [PATCH] Fix a bug with environment for qwt libraries --- config_files/qwt-0.4.1.sh | 20 +++++++++----------- config_files/qwt-4.2.0.sh | 7 ++++--- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/config_files/qwt-0.4.1.sh b/config_files/qwt-0.4.1.sh index 1656160..61a6e72 100755 --- a/config_files/qwt-0.4.1.sh +++ b/config_files/qwt-0.4.1.sh @@ -2,14 +2,11 @@ check_version() { -if [ -z "$QWTHOME" ]; then - #echo "QWTHOME doesn't set" - return 1 -fi -check_lib_version libqwt.so.0.4.1 ${QWTHOME}/lib -if [ "$?" -eq "0" ]; then - #echo "The product ${PRODUCT} has been already installed on yours system" - return 0 +if [ -n "${QWTHOME}" ]; then + check_lib_version libqwt.so.0.4.1 ${QWTHOME}/lib + if [ "$?" -eq "0" ]; then + return 0 + fi fi return 1 } @@ -29,13 +26,14 @@ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" # looks for the native product and collects it's environment (used by make_env()) try_native(){ qwthome="`find_in_path libqwt.so.0.4.1 ${LD_LIBRARY_PATH}`" +if [ -z "${qwthome}" ] ; then + qwthome="`find_in_path libqwt.so.0.4.1 /usr/lib`" +fi if [ -n "${qwthome}" ] ; then - qwthome=`cd ${qwthome}/..; pwd` - tmp="\${QWTHOME}/lib ${QWTHOME}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; + tmp="${qwthome} ${qwthome} \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; ld_library_path=`sort_path ${tmp}` cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <