diff options
author | Carlos Rafael Giani <dv@pseudoterminal.org> | 2015-08-20 14:09:37 +0200 |
---|---|---|
committer | Luis de Bethencourt <luis@debethencourt.com> | 2015-08-20 14:18:28 +0100 |
commit | 0cc2156572755626a170ad99345647faf4d43a84 (patch) | |
tree | 858f5fd7a59259a0660d0ec690d2b8e6410579f1 /configure.ac | |
parent | 09b4f050e04203ece28add79d419910801072ef7 (diff) | |
download | gstreamer-plugins-bad-0cc2156572755626a170ad99345647faf4d43a84.tar.gz |
opencv: Fix OpenCV data path check to work with cross compilation
https://bugzilla.gnome.org/show_bug.cgi?id=753651
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 955244c6b..2ba930d81 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,9 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], [AM_DEFAULT_VERBOSITY=1 AC_SUBST(AM_DEFAULT_VERBOSITY)]) +dnl PKG_CONFIG_SYSROOT_DIR is a valid environment variable +m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR) + dnl our libraries and install dirs use GST_API_VERSION in the filename dnl to allow side-by-side installation of different API versions GST_API_VERSION=1.0 @@ -2486,9 +2489,15 @@ AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [ AC_SUBST(OPENCV_PREFIX) AC_SUBST(OPENCV_CFLAGS) AC_SUBST(OPENCV_LIBS) - AC_CHECK_FILE([$OPENCV_PREFIX/share/opencv/], - [AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["opencv"], [OpenCV path name])], - [AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["OpenCV"], [OpenCV path name])]) + dnl the OpenCV prefix is used at runtime for some object properties, and also + dnl used here to detect which directory is the correct one. For the second + dnl case, make sure the right sysroot is used, ensuring correct behavior + dnl during cross compilation. + if test -d "$PKG_CONFIG_SYSROOT_DIR/$OPENCV_PREFIX/share/opencv/"; then + AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["opencv"], [OpenCV path name]) + else + AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["OpenCV"], [OpenCV path name]) + fi ]) dnl *** OpenEXR *** |