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
}
# 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 <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
-export QWTHOME=${qwthome}
export LD_LIBRARY_PATH=${ld_library_path}
##
EOF
# looks for the native product and collects it's environment (used by make_env())
try_native(){
qwthome="`find_in_path libqwt.so.4.2.0 ${LD_LIBRARY_PATH}`"
+if [ -z "${qwthome}" ] ; then
+ qwthome="`find_in_path libqwt.so.4.2.0 /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 <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
-export QWTHOME=${qwthome}
export LD_LIBRARY_PATH=${ld_library_path}
##
EOF