[0.6.229] add line coverage option
[platform/core/multimedia/libmm-player.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.61)
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])
9
10 # Checks for programs.
11 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
12 AC_PROG_CC
13 AC_PROG_CXX
14
15 AC_PROG_LIBTOOL
16
17 AC_FUNC_MMAP
18 AC_FUNC_REALLOC
19 AC_FUNC_SELECT_ARGTYPES
20 AC_FUNC_STAT
21 AC_FUNC_VPRINTF
22 AC_HEADER_STDBOOL
23 AC_HEADER_STDC
24 AC_HEADER_TIME
25 AC_PROG_GCC_TRADITIONAL
26
27 # Checks for libraries.
28
29 # Checks for header files.
30 AC_HEADER_STDC
31 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h syslog.h unistd.h])
32
33 # Checks for typedefs, structures, and compiler characteristics.
34 AC_HEADER_STDBOOL
35 AC_C_CONST
36 AC_TYPE_INT64_T
37 AC_HEADER_TIME
38 AC_SUBST(GCC_CXXFLAGS)
39
40 # Checks for library functions.
41 AC_FUNC_MALLOC
42 AC_FUNC_MEMCMP
43 AC_FUNC_STAT
44 AC_CHECK_FUNCS([gettimeofday memset strchr strstr])
45
46 PKG_CHECK_MODULES(MMCOMMON,mm-common)
47 AC_SUBST(MMCOMMON_CFLAGS)
48 AC_SUBST(MMCOMMON_LIBS)
49
50 PKG_CHECK_MODULES(MMSOUND,mm-sound)
51 AC_SUBST(MMSOUND_CFLAGS)
52 AC_SUBST(MMSOUND_LIBS)
53
54 PKG_CHECK_MODULES(GLIB, glib-2.0)
55 AC_SUBST(GLIB_CFLAGS)
56 AC_SUBST(GLIB_LIBS)
57
58 PKG_CHECK_MODULES(GST, gstreamer-1.0 >= 1.2.0)
59 AC_SUBST(GST_CFLAGS)
60 AC_SUBST(GST_LIBS)
61
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)
65
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)
69
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)
73
74 PKG_CHECK_MODULES(STORAGE, storage)
75 AC_SUBST(STORAGE_CFLAGS)
76 AC_SUBST(STORAGE_LIBS)
77
78 PKG_CHECK_MODULES(TZPLATFORM_CONFIG, libtzplatform-config)
79 AC_SUBST(TZPLATFORM_CONFIG_CFLAGS)
80 AC_SUBST(TZPLATFORM_CONFIG_LIBS)
81
82 # for testsuite
83 PKG_CHECK_MODULES(MMUTIL_COMMON, mmutil-common)
84 AC_SUBST(MMUTIL_COMMON_CFLAGS)
85 AC_SUBST(MMUTIL_COMMON_LIBS)
86
87 PKG_CHECK_MODULES(MMUTIL, mmutil-imgp)
88 AC_SUBST(MMUTIL_CFLAGS)
89 AC_SUBST(MMUTIL_LIBS)
90
91 PKG_CHECK_MODULES(INIPARSER, iniparser)
92 AC_SUBST(INIPARSER_CFLAGS)
93 AC_SUBST(INIPARSER_LIBS)
94
95 PKG_CHECK_MODULES(ICU, icu-i18n)
96 AC_SUBST(ICU_CFLAGS)
97 AC_SUBST(ICU_LIBS)
98
99 PKG_CHECK_MODULES(MEDIAPACKET, capi-media-tool)
100 AC_SUBST(MEDIAPACKET_CFLAGS)
101 AC_SUBST(MEDIAPACKET_LIBS)
102
103 PKG_CHECK_MODULES(MM_RESOURCE_MANAGER, mm-resource-manager)
104 AC_SUBST(MM_RESOURCE_MANAGER_CFLAGS)
105 AC_SUBST(MM_RESOURCE_MANAGER_LIBS)
106
107 PKG_CHECK_MODULES(DLOG, dlog)
108 AC_SUBST(DLOG_CFLAGS)
109 AC_SUBST(DLOG_LIBS)
110
111 PKG_CHECK_MODULES(SYSTEMINFO, capi-system-info)
112 AC_SUBST(SYSTEMINFO_CFLAGS)
113 AC_SUBST(SYSTEMINFO_LIBS)
114
115 # for Spatial audio
116 PKG_CHECK_MODULES(MEDIASOUNDMGR,capi-media-sound-manager)
117 AC_SUBST(MEDIASOUNDMGR_CFLAGS)
118 AC_SUBST(MEDIASOUNDMGR_LIBS)
119
120 PKG_CHECK_MODULES([GST_ALLOCATORS], [gstreamer-allocators-1.0])
121 AC_SUBST(GST_ALLOCATORS_CFLAGS)
122 AC_SUBST(GST_ALLOCATORS_LIBS)
123
124 PKG_CHECK_MODULES(TBM, libtbm)
125 AC_SUBST(TBM_CFLAGS)
126 AC_SUBST(TBM_LIBS)
127
128 AC_ARG_ENABLE(tests, AC_HELP_STRING([--enable-tests], [unittest build]),
129          [
130                 case "${enableval}" in
131                 yes) IS_TESTS=yes ;;
132                 no)  IS_TESTS=no ;;
133                   *)   AC_MSG_ERROR(bad value ${enableval} for --enable-tests) ;;
134                 esac
135         ],
136 [IS_TESTS=no])
137 AM_CONDITIONAL([IS_TESTS], [test "x$IS_TESTS" = "xyes"])
138
139 AS_IF([test "x$enable_tests" = "xyes"], [
140         PKG_CHECK_MODULES(GTESTS, gmock)
141         AC_SUBST(GTESTS_CFLAGS)
142         AC_SUBST(GTESTS_LIBS)
143 ])
144
145 AC_ARG_ENABLE(sdk, AC_HELP_STRING([--enable-sdk], [sdk build]),
146          [
147                 case "${enableval}" in
148                 yes) IS_SDK=yes ;;
149                 no)  IS_SDK=no ;;
150                   *)   AC_MSG_ERROR(bad value ${enableval} for --enable-sdk) ;;
151                 esac
152         ],
153 [IS_SDK=no])
154 AM_CONDITIONAL([IS_SDK], [test "x$IS_SDK" = "xyes"])
155
156 AC_CONFIG_FILES([Makefile
157                  src/Makefile
158                  unittest/Makefile
159                  mm-player.pc
160 ])
161 AC_OUTPUT