From 9dacd3323e4e785078a52f9fa8cadbdf8ac9de60 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 2 Jun 2005 13:15:49 +0000 Subject: [PATCH] If CASROOT is not defined, search in LD_LIBRARY_PATH --- salome_adm/unix/config_files/check_cas.m4 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/salome_adm/unix/config_files/check_cas.m4 b/salome_adm/unix/config_files/check_cas.m4 index b27c7deac..f064b1c9c 100644 --- a/salome_adm/unix/config_files/check_cas.m4 +++ b/salome_adm/unix/config_files/check_cas.m4 @@ -72,6 +72,21 @@ case $host_os in esac AC_MSG_CHECKING(for OpenCascade directories) + +if test -z $CASROOT; then + AC_MSG_RESULT(CASROOT not defined) + dnl E.A. : if CASROOT is not defined, trying to find libTKernel.so + dnl E.A. : in LD_LIBRARY_PATH ... + for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do + if test -f $d/libTKernel.so ; then + AC_MSG_RESULT(libTKernel.so detected in $d) + CASROOT=$d + CASROOT=`echo ${CASROOT} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` + break + fi + done +fi + if test -d ${CASROOT}/${casdir}/lib; then CAS_LDPATH="-L$CASROOT/$casdir/lib " AC_MSG_RESULT(yes) -- 2.39.2