# Checks for programs.
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_CC
+AC_PROG_CXX
AC_PROG_LIBTOOL
AC_C_CONST
AC_TYPE_INT64_T
AC_HEADER_TIME
+AC_SUBST(GCC_CXXFLAGS)
# Checks for library functions.
AC_FUNC_MALLOC
AC_SUBST(MEDIAPACKET_CFLAGS)
AC_SUBST(MEDIAPACKET_LIBS)
-PKG_CHECK_MODULES(MRP_RESOURCE, murphy-resource)
-AC_SUBST(MRP_RESOURCE_CFLAGS)
-AC_SUBST(MRP_RESOURCE_LIBS)
-
-PKG_CHECK_MODULES(MRP_GLIB, murphy-glib)
-AC_SUBST(MRP_GLIB_CFLAGS)
-AC_SUBST(MRP_GLIB_LIBS)
+PKG_CHECK_MODULES(MM_RESOURCE_MANAGER, mm-resource-manager)
+AC_SUBST(MM_RESOURCE_MANAGER_CFLAGS)
+AC_SUBST(MM_RESOURCE_MANAGER_LIBS)
PKG_CHECK_MODULES(DLOG, dlog)
AC_SUBST(DLOG_CFLAGS)
AC_SUBST(MEDIASOUNDMGR_CFLAGS)
AC_SUBST(MEDIASOUNDMGR_LIBS)
+PKG_CHECK_MODULES([GST_ALLOCATORS], [gstreamer-allocators-1.0])
+AC_SUBST(GST_ALLOCATORS_CFLAGS)
+AC_SUBST(GST_ALLOCATORS_LIBS)
+
+PKG_CHECK_MODULES(TBM, libtbm)
+AC_SUBST(TBM_CFLAGS)
+AC_SUBST(TBM_LIBS)
+
+AC_ARG_ENABLE(tests, AC_HELP_STRING([--enable-tests], [unittest build]),
+ [
+ case "${enableval}" in
+ yes) IS_TESTS=yes ;;
+ no) IS_TESTS=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-tests) ;;
+ esac
+ ],
+[IS_TESTS=no])
+AM_CONDITIONAL([IS_TESTS], [test "x$IS_TESTS" = "xyes"])
+
+AS_IF([test "x$enable_tests" = "xyes"], [
+ PKG_CHECK_MODULES(GTESTS, gmock)
+ AC_SUBST(GTESTS_CFLAGS)
+ AC_SUBST(GTESTS_LIBS)
+])
+
AC_ARG_ENABLE(sdk, AC_HELP_STRING([--enable-sdk], [sdk build]),
[
case "${enableval}" in
AC_CONFIG_FILES([Makefile
src/Makefile
+ unittest/Makefile
mm-player.pc
])
AC_OUTPUT