--- /dev/null
+dnl Copyright (C) 2007-2011 CEA/DEN, EDF R&D
+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
+
+dnl File : check_OpenCV.m4
+dnl Author : Renaud NEDELEC, Open CASCADE S.A.S (renaud.nedelec@opencascade.com)
+dnl
+AC_DEFUN([CHECK_OPENCV],[
+
+AC_REQUIRE([AC_PROG_CXX])dnl
+AC_REQUIRE([AC_PROG_CXXCPP])dnl
+
+AC_CHECKING([for OPENCV product])
+
+AC_LANG_SAVE
+AC_LANG_C
+
+OPENCV_INCLUDES=""
+OPENCV_LIBS=""
+
+AC_ARG_WITH([opencv],
+ [ --with-opencv=DIR root directory path of OPENCV installation])
+
+opencv_ok=no
+
+if test "$with_opencv" != "no" ; then
+ if test "$with_opencv" == "yes" || test "$with_opencv" == "auto"; then
+ OPENCV_HOME=""
+ else
+ OPENCV_HOME="$with_opencv"
+ fi
+
+ if test "$OPENCV_HOME" == "" ; then
+ if test "x$OPENCVHOME" != "x" ; then
+ OPENCV_HOME=$OPENCVHOME
+ fi
+ fi
+
+ if test "x$OPENCV_HOME" != "x"; then
+
+ LOCAL_INCLUDES="-I$OPENCV_HOME/include -I$OPENCV_HOME/include/opencv"
+ LOCAL_LIBS="-L$OPENCV_HOME/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann"
+
+ CPPFLAGS_old="$CPPFLAGS"
+ CXXFLAGS_old="$CXXFLAGS"
+ CPPFLAGS="$LOCAL_INCLUDES $CPPFLAGS"
+ CXXFLAGS="$LOCAL_INCLUDES $CXXFLAGS"
+
+ AC_MSG_CHECKING([for OPENCV library])
+
+ LDFLAGS_old="$LDFLAGS"
+ LDFLAGS="-L. $LOCAL_LIBS $LDFLAGS"
+
+ LDFLAGS="$LDFLAGS_old"
+
+ opencv_ok=yes
+
+ AC_MSG_RESULT([$opencv_ok])
+
+ CPPFLAGS="$CPPFLAGS_old"
+ CXXFLAGS="$CXXFLAGS_old"
+
+ fi
+fi
+
+if test "x$opencv_ok" == xno ; then
+ AC_MSG_RESULT([for OPENCV: no])
+ AC_MSG_WARN([OPENCV includes or libraries are not found or are not properly installed])
+ AC_MSG_WARN([Cannot build without OPENCV. Use --with-opencv option to define OPENCV installation.])
+else
+ OPENCV_INCLUDES=$LOCAL_INCLUDES
+ OPENCV_LIBS=$LOCAL_LIBS
+ AC_MSG_RESULT([for OPENCV: yes])
+fi
+
+AC_SUBST(OPENCV_INCLUDES)
+AC_SUBST(OPENCV_LIBS)
+
+AC_LANG_RESTORE
+
+])dnl
echo
CHECK_SPHINX
+echo
+echo ---------------------------------------------
+echo testing Opencv
+echo ---------------------------------------------
+echo
+CHECK_OPENCV
+
echo
echo ---------------------------------------------
echo Testing Kernel
echo Configure
if test "${gui_ok}" = "yes"; then
- variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok sphinx_ok Kernel_ok gui_ok"
+ variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok sphinx_ok opencv_ok Kernel_ok gui_ok"
elif test "${SalomeGUI_need}" != "no"; then
- variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok gui_ok"
+ variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok opencv_ok Kernel_ok gui_ok"
else
- variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok"
+ variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok opencv_ok Kernel_ok"
fi
for var in $variables
$(GUI_CXXFLAGS) \
$(CORBA_CXXFLAGS) \
$(CORBA_INCLUDES) \
+ $(OPENCV_INCLUDES) \
-I$(srcdir)/../GEOMGUI \
-I$(srcdir)/../DlgRef \
-I$(srcdir)/../GEOMBase \
-I$(srcdir)/../SKETCHER \
-I$(srcdir)/../GEOM \
-I$(top_builddir)/src/DlgRef \
- -I$(top_builddir)/idl \
- -I/home/palmco/OpenCV/OpenCV-2.3.0/install/include/opencv \
- -I/home/palmco/OpenCV/OpenCV-2.3.0/install/include
+ -I$(top_builddir)/idl
libEntityGUI_la_LDFLAGS = \
../GEOMFiltersSelection/libGEOMFiltersSelection.la \
../GEOMGUI/libGEOM.la \
$(QT_MT_LIBS) \
$(CAS_TKTopAlgo) -lTKernel \
- -L/home/palmco/OpenCV/OpenCV-2.3.0/install/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
-
+ $(OPENCV_LIBS)