# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([libmm-player],[0.0.1])
-AC_CONFIG_SRCDIR([src/mm_player_priv.c])
+AC_INIT([libmm-player],[0.3.0])
+AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADER([config.h])
-AM_INIT_AUTOMAKE([-Wall foreign])
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
# 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_FUNC_STAT
AC_CHECK_FUNCS([gettimeofday memset strchr strstr])
-PKG_CHECK_MODULES(MMTA, mm-ta)
-AC_SUBST(MMTA_CFLAGS)
-AC_SUBST(MMTA_LIBS)
-
PKG_CHECK_MODULES(MMCOMMON,mm-common)
AC_SUBST(MMCOMMON_CFLAGS)
AC_SUBST(MMCOMMON_LIBS)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
-if test "$use_gstreamer_1" = "1"; then
- PKG_CHECK_MODULES(GST, gstreamer-1.0)
- AC_SUBST(GST_CFLAGS)
- AC_SUBST(GST_LIBS)
-else
- PKG_CHECK_MODULES(GST, gstreamer-0.10)
- AC_SUBST(GST_CFLAGS)
- AC_SUBST(GST_LIBS)
-fi
-
-if test "$use_gstreamer_1" = "1"; then
- PKG_CHECK_MODULES(GST_PLUGIN_BASE, gstreamer-plugins-base-1.0 )
- AC_SUBST(GST_PLUGIN_BASE_CFLAGS)
- AC_SUBST(GST_PLUGIN_BASE_LIBS)
-else
- PKG_CHECK_MODULES(GST_PLUGIN_BASE, gstreamer-plugins-base-0.10 >= 0.10)
- AC_SUBST(GST_PLUGIN_BASE_CFLAGS)
- AC_SUBST(GST_PLUGIN_BASE_LIBS)
-
- PKG_CHECK_MODULES(GST_INTERFACE, gstreamer-interfaces-0.10 >= 0.10)
- AC_SUBST(GST_INTERFACE_CFLAGS)
- AC_SUBST(GST_INTERFACE_LIBS)
-fi
-
-if test "$use_gstreamer_1" = "1"; then
- PKG_CHECK_MODULES(GST_APP, gstreamer-app-1.0 )
- AC_SUBST(GST_APP_CFLAGS)
- AC_SUBST(GST_APP_LIBS)
-
- PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-1.0 )
- AC_SUBST(GST_VIDEO_CFLAGS)
- AC_SUBST(GST_VIDEO_LIBS)
-else
- PKG_CHECK_MODULES(GST_APP, gstreamer-app-0.10 >= 0.10 )
- AC_SUBST(GST_APP_CFLAGS)
- AC_SUBST(GST_APP_LIBS)
-fi
-
-PKG_CHECK_MODULES(MMSESSION, mm-session)
-AC_SUBST(MMSESSION_CFLAGS)
-AC_SUBST(MMSESSION_LIBS)
+PKG_CHECK_MODULES(GST, gstreamer-1.0 >= 1.2.0)
+AC_SUBST(GST_CFLAGS)
+AC_SUBST(GST_LIBS)
+
+PKG_CHECK_MODULES(GST_PLUGIN_BASE, gstreamer-plugins-base-1.0 >= 1.2.0)
+AC_SUBST(GST_PLUGIN_BASE_CFLAGS)
+AC_SUBST(GST_PLUGIN_BASE_LIBS)
+
+PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-1.0 >= 1.2.0)
+AC_SUBST(GST_VIDEO_CFLAGS)
+AC_SUBST(GST_VIDEO_LIBS)
+
+PKG_CHECK_MODULES(GST_APP, gstreamer-app-1.0 >= 1.2.0)
+AC_SUBST(GST_APP_CFLAGS)
+AC_SUBST(GST_APP_LIBS)
+PKG_CHECK_MODULES(STORAGE, storage)
+AC_SUBST(STORAGE_CFLAGS)
+AC_SUBST(STORAGE_LIBS)
+
+PKG_CHECK_MODULES(TZPLATFORM_CONFIG, libtzplatform-config)
+AC_SUBST(TZPLATFORM_CONFIG_CFLAGS)
+AC_SUBST(TZPLATFORM_CONFIG_LIBS)
+
+# for testsuite
PKG_CHECK_MODULES(MMUTIL, mmutil-imgp)
AC_SUBST(MMUTIL_CFLAGS)
AC_SUBST(MMUTIL_LIBS)
-PKG_CHECK_MODULES(AUDIOSESSIONMGR, audio-session-mgr)
-AC_SUBST(AUDIOSESSIONMGR_CFLAGS)
-AC_SUBST(AUDIOSESSIONMGR_LIBS)
+PKG_CHECK_MODULES(INIPARSER, iniparser)
+AC_SUBST(INIPARSER_CFLAGS)
+AC_SUBST(INIPARSER_LIBS)
PKG_CHECK_MODULES(ICU, icu-i18n)
AC_SUBST(ICU_CFLAGS)
AC_SUBST(ICU_LIBS)
-PKG_CHECK_MODULES(INIPARSER, iniparser)
-AC_SUBST(INIPARSER_CFLAGS)
-AC_SUBST(INIPARSER_LIBS)
+PKG_CHECK_MODULES(MEDIAPACKET, capi-media-tool)
+AC_SUBST(MEDIAPACKET_CFLAGS)
+AC_SUBST(MEDIAPACKET_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(DLOG_LIBS)
+
+PKG_CHECK_MODULES(SYSTEMINFO, capi-system-info)
+AC_SUBST(SYSTEMINFO_CFLAGS)
+AC_SUBST(SYSTEMINFO_LIBS)
+
+# for Spatial audio
+PKG_CHECK_MODULES(MEDIASOUNDMGR,capi-media-sound-manager)
+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)
+])
-PKG_CHECK_MODULES(VCONF, vconf)
-AC_SUBST(VCONF_CFLAGS)
-AC_SUBST(VCONF_LIBS)
+AC_ARG_ENABLE(sdk, AC_HELP_STRING([--enable-sdk], [sdk build]),
+ [
+ case "${enableval}" in
+ yes) IS_SDK=yes ;;
+ no) IS_SDK=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-sdk) ;;
+ esac
+ ],
+[IS_SDK=no])
+AM_CONDITIONAL([IS_SDK], [test "x$IS_SDK" = "xyes"])
AC_CONFIG_FILES([Makefile
src/Makefile
+ unittest/Makefile
mm-player.pc
])
AC_OUTPUT