From dd817a4f68dbbc085caecdde98b307d6be890c63 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 21 Oct 2022 12:07:08 +0200 Subject: [PATCH] configure: allow configuration without pkg-config --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index b368e0d8f..cbf2d80ee 100644 --- a/configure.ac +++ b/configure.ac @@ -1348,7 +1348,17 @@ fi if test "$found_opencv" = yes && test "$opencv_req" != no; then OPENCV_LIBS=$(remove_all_libs_but_opencv_core $OPENCV_LIBS) opencv="yes" +fi +if test "$found_opencv" = no && test "$opencv_req" != no; then + AC_CHECK_LIB(opencv_core, cvCreateMat) + if test "$ac_cv_lib_opencv_core_cvCreateMat" = yes; then + OPENCV_LIBS=-lopencv_core + opencv=yes + fi +fi + +if test "$opencv" = yes; then # opencv_imgproc is commonly needed so make the check here SAVED_LIBS=$LIBS LIBS="$LIBS $OPENCV_LIBS"