diff --git a/configure.ac b/configure.ac index edeb664..941115e 100644 --- a/configure.ac +++ b/configure.ac @@ -121,7 +121,15 @@ AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes") # Use OpenCV? ac_cv_my_have_opencv="no" OPENCV="no" -PKG_CHECK_MODULES(OPENCV, opencv, [ac_cv_my_have_opencv="yes"], [:]) +#FIXME: check for highgui, too. +PKG_CHECK_MODULES(OPENCV, opencv, + [save_CPPFLAGS="${CPPFLAGS}" + CPPFLAGS="${CPPFLAGS} ${OPENCV_CFLAGS}" + AC_CHECK_HEADERS(highgui.h, + [ac_cv_my_have_opencv="yes"], + [:]) + CPPFLAGS="${save_CPPFLAGS}"], + [:]) if test "${ac_cv_my_have_opencv}" != "no"; then AC_DEFINE(USE_OPENCV, 1, Define to 1 to use OpenCV) fi