diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-03-17 12:47:52 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-03-17 14:53:50 +0000 |
commit | 692bf9ba633c909efd313259598202d30ce0bb08 (patch) | |
tree | 4acda54eebaf9f914607e6239bd58abf95fe655d /configure.ac | |
parent | 486ddd38cf872099048f05b5f7739d6205e8d979 (diff) | |
download | gstreamer-plugins-bad-692bf9ba633c909efd313259598202d30ce0bb08.tar.gz |
opencv: fix configure check and build with opencv 2.1
AC_CHECK_HEADERS() calls action-if-not-found also if just one of
the headers checked for is missing, which is not what we wanted.
Also, check for highgui_c.h instead of highgui.hpp.
https://bugzilla.gnome.org/show_bug.cgi?id=672226
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 9cf3de2fc..ec821e224 100644 --- a/configure.ac +++ b/configure.ac @@ -1432,14 +1432,15 @@ AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [ AC_LANG_CPLUSPLUS OLD_CPPFLAGS=$CPPFLAGS CPPFLAGS=$OPENCV_CFLAGS - AC_CHECK_HEADERS(highgui.h opencv2/highgui/highgui.hpp, HAVE_HIGHGUI="yes", HAVE_HIGHGUI="no") + AC_CHECK_HEADERS([highgui.h opencv2/highgui/highgui_c.h]) CPPFLAGS=$OLD_CPPFLAGS AC_LANG_C - if test "x$HAVE_HIGHGUI" = "xno"; then - AC_MSG_RESULT(highgui.h could not be found.) - HAVE_OPENCV="no" - else + + 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]) + HAVE_OPENCV="no" fi ], [ HAVE_OPENCV="no" |