configure: allow configuration without pkg-config

This commit is contained in:
Martin Pulec
2022-10-21 12:07:08 +02:00
parent 057aae7503
commit dd817a4f68

View File

@@ -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"