2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([libmm-player],[0.3.0])
6 AC_CONFIG_SRCDIR([src])
7 AC_CONFIG_HEADER([config.h])
8 AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
10 # Checks for programs.
11 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
19 AC_FUNC_SELECT_ARGTYPES
25 AC_PROG_GCC_TRADITIONAL
27 # Checks for libraries.
29 # Checks for header files.
31 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h syslog.h unistd.h])
33 # Checks for typedefs, structures, and compiler characteristics.
38 AC_SUBST(GCC_CXXFLAGS)
40 # Checks for library functions.
44 AC_CHECK_FUNCS([gettimeofday memset strchr strstr])
46 PKG_CHECK_MODULES(MMCOMMON,mm-common)
47 AC_SUBST(MMCOMMON_CFLAGS)
48 AC_SUBST(MMCOMMON_LIBS)
50 PKG_CHECK_MODULES(MMSOUND,mm-sound)
51 AC_SUBST(MMSOUND_CFLAGS)
52 AC_SUBST(MMSOUND_LIBS)
54 PKG_CHECK_MODULES(GLIB, glib-2.0)
58 PKG_CHECK_MODULES(GST, gstreamer-1.0 >= 1.2.0)
62 PKG_CHECK_MODULES(GST_PLUGIN_BASE, gstreamer-plugins-base-1.0 >= 1.2.0)
63 AC_SUBST(GST_PLUGIN_BASE_CFLAGS)
64 AC_SUBST(GST_PLUGIN_BASE_LIBS)
66 PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-1.0 >= 1.2.0)
67 AC_SUBST(GST_VIDEO_CFLAGS)
68 AC_SUBST(GST_VIDEO_LIBS)
70 PKG_CHECK_MODULES(GST_APP, gstreamer-app-1.0 >= 1.2.0)
71 AC_SUBST(GST_APP_CFLAGS)
72 AC_SUBST(GST_APP_LIBS)
74 PKG_CHECK_MODULES(STORAGE, storage)
75 AC_SUBST(STORAGE_CFLAGS)
76 AC_SUBST(STORAGE_LIBS)
78 PKG_CHECK_MODULES(TZPLATFORM_CONFIG, libtzplatform-config)
79 AC_SUBST(TZPLATFORM_CONFIG_CFLAGS)
80 AC_SUBST(TZPLATFORM_CONFIG_LIBS)
83 PKG_CHECK_MODULES(MMUTIL_COMMON, mmutil-common)
84 AC_SUBST(MMUTIL_COMMON_CFLAGS)
85 AC_SUBST(MMUTIL_COMMON_LIBS)
87 PKG_CHECK_MODULES(MMUTIL, mmutil-imgp)
88 AC_SUBST(MMUTIL_CFLAGS)
91 PKG_CHECK_MODULES(INIPARSER, iniparser)
92 AC_SUBST(INIPARSER_CFLAGS)
93 AC_SUBST(INIPARSER_LIBS)
95 PKG_CHECK_MODULES(ICU, icu-i18n)
99 PKG_CHECK_MODULES(MEDIAPACKET, capi-media-tool)
100 AC_SUBST(MEDIAPACKET_CFLAGS)
101 AC_SUBST(MEDIAPACKET_LIBS)
103 PKG_CHECK_MODULES(MM_RESOURCE_MANAGER, mm-resource-manager)
104 AC_SUBST(MM_RESOURCE_MANAGER_CFLAGS)
105 AC_SUBST(MM_RESOURCE_MANAGER_LIBS)
107 PKG_CHECK_MODULES(DLOG, dlog)
108 AC_SUBST(DLOG_CFLAGS)
111 PKG_CHECK_MODULES(SYSTEMINFO, capi-system-info)
112 AC_SUBST(SYSTEMINFO_CFLAGS)
113 AC_SUBST(SYSTEMINFO_LIBS)
116 PKG_CHECK_MODULES(MEDIASOUNDMGR,capi-media-sound-manager)
117 AC_SUBST(MEDIASOUNDMGR_CFLAGS)
118 AC_SUBST(MEDIASOUNDMGR_LIBS)
120 PKG_CHECK_MODULES([GST_ALLOCATORS], [gstreamer-allocators-1.0])
121 AC_SUBST(GST_ALLOCATORS_CFLAGS)
122 AC_SUBST(GST_ALLOCATORS_LIBS)
124 PKG_CHECK_MODULES(TBM, libtbm)
128 AC_ARG_ENABLE(tests, AC_HELP_STRING([--enable-tests], [unittest build]),
130 case "${enableval}" in
133 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tests) ;;
137 AM_CONDITIONAL([IS_TESTS], [test "x$IS_TESTS" = "xyes"])
139 AS_IF([test "x$enable_tests" = "xyes"], [
140 PKG_CHECK_MODULES(GTESTS, gmock)
141 AC_SUBST(GTESTS_CFLAGS)
142 AC_SUBST(GTESTS_LIBS)
145 AC_ARG_ENABLE(sdk, AC_HELP_STRING([--enable-sdk], [sdk build]),
147 case "${enableval}" in
150 *) AC_MSG_ERROR(bad value ${enableval} for --enable-sdk) ;;
154 AM_CONDITIONAL([IS_SDK], [test "x$IS_SDK" = "xyes"])
156 AC_CONFIG_FILES([Makefile