From 64080e632d7e86b218f2595bcc7b3a9199c1bc4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Sun, 12 Apr 2015 00:56:48 +0000 Subject: [PATCH] opencv: Change configure test to check for OpenCV2 headers * Checks for opencv2 headers only, not for legacy opencv1 headers * Checks for every opencv2 header that the implementation needs, not just highgui_c.h https://bugzilla.gnome.org/show_bug.cgi?id=725163 --- configure.ac | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 2ba3033ca1..bfde9c63b1 100644 --- a/configure.ac +++ b/configure.ac @@ -2447,15 +2447,26 @@ AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [ AC_LANG([C++]) OLD_CPPFLAGS=$CPPFLAGS CPPFLAGS=$OPENCV_CFLAGS - AC_CHECK_HEADERS([highgui.h opencv2/highgui/highgui_c.h]) + something_not_found=no + AC_CHECK_HEADERS([opencv2/contrib/contrib.hpp \ + opencv2/core/core_c.h \ + opencv2/core/types_c.h \ + opencv2/core/version.hpp \ + opencv2/highgui/highgui_c.h \ + opencv2/imgproc/imgproc.hpp \ + opencv2/imgproc/imgproc_c.h \ + opencv2/legacy/compat.hpp \ + opencv2/legacy/legacy.hpp \ + opencv2/objdetect/objdetect.hpp \ + opencv2/video/background_segm.hpp], [], [something_not_found=yes]) CPPFLAGS=$OLD_CPPFLAGS AC_LANG([C]) - if test $ac_cv_header_highgui_h = "yes" -o $ac_cv_header_opencv2_highgui_highgui_c_h = "yes" ; then - HAVE_OPENCV="yes" - else - AC_MSG_RESULT([neither highgui.h nor opencv2/highgui/highgui_c.h could not be found]) + if test $something_not_found = "yes"; then + AC_MSG_RESULT([not all opencv2 headers were found]) HAVE_OPENCV="no" + else + HAVE_OPENCV="yes" fi ], [ HAVE_OPENCV="no"