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"
* Boston, MA 02111-1307, USA.
*/
+/* This breaks the build for reasons that aren't entirely clear to me yet */
+#if 0
+//#ifdef HAVE_CONFIG_H
+//#include "config.h"
+//#endif
+#endif
+
#include <cstdlib>
#include <errno.h>
#include <math.h>
#define MOTIONCELLS_H_
#include <cv.h> // includes OpenCV definitions
-#ifndef __OPENCV_OLD_CV_H__
+#ifdef HAVE_HIGHGUI_H
#include <highgui.h> // includes highGUI definitions
-#else
-#include <opencv2/highgui/highgui.hpp> // includes highGUI definitions
+#endif
+#ifdef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H
+#include <opencv2/highgui/highgui_c.h> // includes highGUI definitions
#endif
#include <iostream>
#include <fstream>
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "gstopencvutils.h"
static gboolean
#include <gst/gst.h>
#include <cv.h>
-#ifndef __OPENCV_OLD_CV_H__
+#ifdef HAVE_HIGHGUI_H
#include <highgui.h> // includes highGUI definitions
-#else
-#include <opencv2/highgui/highgui.hpp> // includes highGUI definitions
+#endif
+#ifdef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H
+#include <opencv2/highgui/highgui_c.h> // includes highGUI definitions
#endif
G_BEGIN_DECLS
* Boston, MA 02111-1307, USA.
*/
+/* This breaks the build for reasons that aren't entirely clear to me yet */
+#if 0
+//#ifdef HAVE_CONFIG_H
+//#include "config.h"
+//#endif
+#endif
+
#include <stdio.h>
#include <limits.h>
#include "motioncells_wrapper.h"