Allow using external OpenMAX IL headers
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 21 Feb 2013 09:59:29 +0000 (10:59 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 21 Feb 2013 09:59:29 +0000 (10:59 +0100)
configure.ac
omx/Makefile.am

index 26c3fc2..23952ef 100644 (file)
@@ -152,6 +152,10 @@ GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
 AC_SUBST(GLIB_PREFIX)
 AC_SUBST(GST_PREFIX)
 
+dnl Check for external OpenMAX IL headers
+AC_CHECK_HEADER([OMX_Core.h], [HAVE_EXTERNAL_OMX=yes], [HAVE_EXTERNAL_OMX=no], [AC_INCLUDES_DEFAULT])
+AM_CONDITIONAL(HAVE_EXTERNAL_OMX, test "x$HAVE_EXTERNAL_OMX" = "xyes")
+
 dnl Check for -Bsymbolic-functions linker flag used to avoid
 dnl intra-library PLT jumps, if available.
 AC_ARG_ENABLE(Bsymbolic,
@@ -188,7 +192,6 @@ esac
 AM_CONDITIONAL(USE_OMX_TARGET_GENERIC, test "x$ac_cv_omx_target" = "xgeneric")
 AM_CONDITIONAL(USE_OMX_TARGET_RPI, test "x$ac_cv_omx_target" = "xrpi")
 
-
 AC_ARG_WITH([omx-struct-packing],
         AS_HELP_STRING([--with-omx-struct-packing],[Force OpenMAX struct packing, (default is none)]),
         [ac_cv_omx_struct_packing="$withval"], [ac_cv_omx_struct_packing="none"])
index 238ff34..a1ba5fe 100644 (file)
@@ -30,9 +30,13 @@ noinst_HEADERS = \
        gstomxh263enc.h \
        gstomxaacenc.h
 
+if !HAVE_EXTERNAL_OMX
+OMX_INCLUDEPATH = -I$(abs_srcdir)/openmax
+endif
+
 libgstomx_la_CFLAGS = \
        -DGST_USE_UNSTABLE_API=1 \
-       -I$(abs_srcdir)/openmax \
+       $(OMX_INCLUDEPATH) \
        $(GST_PLUGINS_BASE_CFLAGS) \
        $(GST_BASE_CFLAGS) \
        $(GST_CFLAGS)