Salome HOME
Merge from V6_main_20120808 08Aug12
[samples/light.git] / adm_local / unix / config_files / check_LIGHT.m4
index 69e16f2456cecffaf193b9cfc5c8025a1df712e7..e372608ce6a4da614ec1846890b784a283d12a55 100755 (executable)
@@ -1,7 +1,23 @@
+dnl Copyright (C) 2005-2012  OPEN CASCADE
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
 #  Check availability of LIGHT module binary distribution
-#
-#  Author : Marc Tajchman (CEA, 2002)
-#------------------------------------------------------------
 
 AC_DEFUN([CHECK_LIGHT],[
 
@@ -9,6 +25,9 @@ AC_CHECKING(for Light)
 
 Light_ok=no
 
+LIGHT_LDFLAGS=""
+LIGHT_CXXFLAGS=""
+
 AC_ARG_WITH(gui,
            --with-light=DIR root directory path of LIGHT installation,
            LIGHT_DIR="$withval",LIGHT_DIR="")
@@ -43,6 +62,12 @@ if test -f ${LIGHT_DIR}/lib/salome/libLIGHT.so  ; then
     LIGHT_ROOT_DIR=${LIGHT_DIR}
   fi
   AC_SUBST(LIGHT_ROOT_DIR)
+
+  LIGHT_LDFLAGS=-L${LIGHT_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+  LIGHT_CXXFLAGS=-I${LIGHT_DIR}/include/salome
+
+  AC_SUBST(LIGHT_LDFLAGS)
+  AC_SUBST(LIGHT_CXXFLAGS)
 else
   AC_MSG_WARN("Cannot find compiled LIGHT distribution")
 fi