@@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file
5
5
dnl initialize autoconf
6
6
dnl releases only do -Wall, git and prerelease does -Werror too
7
7
dnl use a three digit version number for releases, and four for git/pre
8
- AC_INIT ( [ GStreamer Inference] ,[ 0.1 .0.1] ,[ https://github.com/RidgeRun/gst-inference/issues] ,[ gst-inference] )
8
+ AC_INIT ( [ GStreamer Inference] ,[ 0.2 .0.1] ,[ https://github.com/RidgeRun/gst-inference/issues] ,[ gst-inference] )
9
9
10
10
AG_GST_INIT
11
11
@@ -20,6 +20,7 @@ AS_NANO(GST_GIT="no", GST_GIT="yes")
20
20
21
21
dnl can autoconf find the source ?
22
22
AC_CONFIG_SRCDIR ( [ ext/r2inference/gstinference.c] )
23
+ AC_CONFIG_SRCDIR ( [ ext/opencv/gstinferenceoverlay.c] )
23
24
24
25
dnl define the output header for config
25
26
AC_CONFIG_HEADERS ( [ config.h] )
@@ -155,6 +156,7 @@ AG_GST_CHECK_GST_BASE($GST_API_VERSION, [$GST_REQ], yes)
155
156
AG_GST_CHECK_GST_CONTROLLER($GST_API_VERSION, [ $GST_REQ] , yes)
156
157
AG_GST_CHECK_GST_CHECK($GST_API_VERSION, [ $GST_REQ] , no)
157
158
AG_GST_CHECK_GST_PLUGINS_BASE($GST_API_VERSION, [ $GSTPB_REQ] , yes)
159
+ AG_GST_CHECK_MODULES(GST_VIDEO, gstreamer-video-[ $GST_API_VERSION] , [ $GST_REQ] , [ GStreamer Video] , yes)
158
160
159
161
GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-$GST_API_VERSION`
160
162
if test -z $GST_TOOLS_DIR; then
@@ -264,8 +266,33 @@ echo
264
266
AC_MSG_NOTICE ( [ Checking libraries for plugins in ext/] )
265
267
echo
266
268
267
- AG_GST_CHECK_FEATURE(R2INFERENCE, [ RidgeRun's Inference Framework] , gstinference, [
269
+ dnl *** opencv ***
270
+ OPENCV_REQ=2.3.1
271
+ translit ( dnm , m , l ) AM_CONDITIONAL(USE_OPENCV, true)
272
+ AG_GST_CHECK_FEATURE(OPENCV, [ OpenCV computer vision library] , opencv, [
273
+ AG_GST_PKG_CHECK_MODULES(OPENCV, opencv >= $OPENCV_REQ )
274
+ ] )
275
+ dnl define conditional for opencv versions 2.3.1 to 3.1.0
276
+ if test "$USE_OPENCV" = "yes"; then
277
+ OCV_BASE_VERSION_MAJOR=3
278
+ OCV_BASE_VERSION_MINOR=2
279
+ OCV_VERSION_MAJOR=$(pkg-config --modversion opencv | awk -F. '{print $1}')
280
+ OCV_VERSION_MINOR=$(pkg-config --modversion opencv | awk -F. '{print $2}')
281
+ if test "$OCV_VERSION_MAJOR" -lt "$OCV_BASE_VERSION_MAJOR"; then
282
+ AC_DEFINE ( [ OCV_VERSION_LT_3_2] , [ 1] , [ Defined if OpenCV version is less than 3.2] )
283
+ else
284
+ if test "$OCV_VERSION_MINOR" -lt "$OCV_BASE_VERSION_MINOR"; then
285
+ AC_DEFINE ( [ OCV_VERSION_LT_3_2] , [ 1] , [ Defined if OpenCV version is less than 3.2] )
286
+ fi
287
+ fi
288
+ AC_MSG_NOTICE ( [ OpenCV version: $OCV_VERSION_MAJOR.$OCV_VERSION_MINOR] )
289
+ fi
290
+
291
+ dnl *** r2inference ***
292
+ AG_GST_CHECK_FEATURE(R2INFERENCE, [ RidgeRun\'s Inference Framework] , r2inference, [
268
293
AG_GST_PKG_CHECK_MODULES(R2INFERENCE, r2inference-0.0)
294
+ ] ,[ ] ,[ ] ,[
295
+ AC_MSG_ERROR ( [ Please install R2Inference from https://github.com/RidgeRun/r2inference.git] )
269
296
] )
270
297
271
298
else
@@ -354,8 +381,11 @@ gst-libs/gst/r2inference/Makefile
354
381
m4/Makefile
355
382
ext/Makefile
356
383
ext/r2inference/Makefile
384
+ ext/opencv/Makefile
357
385
tests/Makefile
358
386
tests/check/Makefile
387
+ tests/examples/classification/Makefile
388
+ tests/examples/detection/Makefile
359
389
tests/examples/Makefile
360
390
tests/files/Makefile
361
391
)
0 commit comments