]> git.sesse.net Git - vlc/blobdiff - configure.ac
- OpenCV video filter module by Dugal Harris
[vlc] / configure.ac
index 1efc3eb48f49f61be841e123ac45a52ba7d270cf..05c2ca881cbae164405fe519d6af41475a714977 100644 (file)
@@ -1143,6 +1143,7 @@ VLC_ADD_PLUGINS([access_http access_mms access_ftp ipv4])
 VLC_ADD_PLUGINS([packetizer_mpegvideo packetizer_h264])
 VLC_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
 
+
 if test "${SYS}" != "mingwce"; then
 dnl  VLC_ADD_PLUGINS([externrun])
   VLC_ADD_PLUGINS([access_fake access_filter_timeshift access_filter_record])
@@ -1873,6 +1874,45 @@ then
   fi
 fi
 
+
+dnl
+dnl  OpenCV wrapper and example filters
+dnl
+AC_ARG_ENABLE(opencv,
+  [  --enable-opencv            OpenCV (computer vision) filter (default disabled)])
+if test "${enable_opencv}" = "yes" -a "${CXX}" != "";
+then
+  AC_ARG_WITH(opencv-tree,
+  [    --with-opencv-tree=PATH opencv tree for linking])
+  if test -n "${with_opencv_tree}"
+  then
+    if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
+    then
+         AC_MSG_CHECKING(for opencv in ${with_opencv_tree})
+         if test -f ${with_opencv_tree}/cv/include/cv.h -a -f ${with_opencv_tree}/cxcore/include/cxcore.h \
+           -a -f ${with_opencv_tree}/cvaux/include/cvaux.h -a -f ${with_opencv_tree}/otherlibs/highgui/highgui.h
+      then
+        AC_MSG_RESULT(yes)
+        VLC_ADD_PLUGINS([opencv_wrapper])
+        VLC_ADD_LDFLAGS([opencv_wrapper],[-L${with_opencv_tree}/lib -lcv -lcxcore -lcvaux -lhighgui])
+        VLC_ADD_CFLAGS([opencv_wrapper],[-I${with_opencv_tree}/cv/include -I${with_opencv_tree}/cxcore/include -I${with_opencv_tree}/cvaux/include -I${with_opencv_tree}/otherlibs/highgui])
+        AC_LANG_PUSH(C++)
+        VLC_ADD_PLUGINS([opencv_example])
+        VLC_ADD_LDFLAGS([opencv_example],[-L${with_opencv_tree}/lib -lcv -lcxcore -lcvaux -lhighgui])
+        VLC_ADD_CXXFLAGS([opencv_example],[-I${with_opencv_tree}/cv/include -I${with_opencv_tree}/cxcore/include -I${with_opencv_tree}/cvaux/include -I${with_opencv_tree}/otherlibs/highgui])
+        AC_LANG_POP(C++)        
+         else
+        dnl  No opencv could be found, sorry
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([cannot find opencv in ${with_opencv_tree}])
+         fi
+    else
+         AC_MSG_WARN([--enable-opencv currently only works on windows])
+    fi
+  fi  
+fi
+
+
 dnl
 dnl  libsmbclient plugin
 dnl