d7afe31ca8b7fbab269db06fc20bce1a6f0af54a
[platform/core/multimedia/libmm-camcorder.git] / configure.ac
1 AC_PREREQ(2.52)
2
3 AC_INIT([libmm-camcorder], [0.8.0])
4 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
5 AC_CONFIG_HEADERS([config.h:config.hin])
6 AC_CONFIG_MACRO_DIR([m4])
7
8 # Checks for programs.
9 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
10 AC_PROG_CC
11 AM_PROG_CC_C_O
12 AC_C_CONST
13 dnl AC_FUNC_MALLOC
14 AC_FUNC_MMAP
15 AC_FUNC_REALLOC
16 AC_FUNC_SELECT_ARGTYPES
17 AC_FUNC_STAT
18 AC_FUNC_VPRINTF
19 AC_HEADER_STDBOOL
20 AC_HEADER_STDC
21 AC_HEADER_TIME
22 AC_PROG_GCC_TRADITIONAL
23 AC_PROG_LIBTOOL
24 AC_PROG_CXX
25 AC_SUBST(GCC_CXXFLAGS)
26
27 # Checks for libraries.
28 PKG_CHECK_MODULES(GST, gstreamer-1.0 >= 1.2.0)
29 AC_SUBST(GST_CFLAGS)
30 AC_SUBST(GST_LIBS)
31
32 PKG_CHECK_MODULES(GST_PLUGIN_BASE, gstreamer-base-1.0 >= 1.2.0)
33 AC_SUBST(GST_PLUGIN_BASE_CFLAGS)
34 AC_SUBST(GST_PLUGIN_BASE_LIBS)
35
36 PKG_CHECK_MODULES(GST_ALLOCATORS, gstreamer-allocators-1.0 >= 1.2.0)
37 AC_SUBST(GST_ALLOCATORS_CFLAGS)
38 AC_SUBST(GST_ALLOCATORS_LIBS)
39
40 PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-1.0 >= 1.2.0)
41 AC_SUBST(GST_VIDEO_CFLAGS)
42 AC_SUBST(GST_VIDEO_LIBS)
43
44 PKG_CHECK_MODULES(GST_APP, gstreamer-app-1.0 >= 1.2.0)
45 AC_SUBST(GST_APP_CFLAGS)
46 AC_SUBST(GST_APP_LIBS)
47
48 PKG_CHECK_MODULES(MM_COMMON, mm-common)
49 AC_SUBST(MM_COMMON_CFLAGS)
50 AC_SUBST(MM_COMMON_LIBS)
51
52 AC_ARG_ENABLE(mm-resource-manager, AC_HELP_STRING([--enable-mm-resource-manager], [enable mm-resource-manager]),
53 [
54   case "${enableval}" in
55     yes) MM_RESOURCE_MANAGER_SUPPORT=yes ;;
56     no)  MM_RESOURCE_MANAGER_SUPPORT=no ;;
57     *) AC_MSG_ERROR(bad value ${enableval} for --enable-mm-resource-manager) ;;
58   esac
59 ],[MM_RESOURCE_MANAGER_SUPPORT=no])
60 if test "x$MM_RESOURCE_MANAGER_SUPPORT" = "xyes"; then
61 PKG_CHECK_MODULES(MM_RESOURCE_MANAGER, mm-resource-manager)
62 AC_SUBST(MM_RESOURCE_MANAGER_CFLAGS)
63 AC_SUBST(MM_RESOURCE_MANAGER_LIBS)
64 fi
65 AM_CONDITIONAL([MM_RESOURCE_MANAGER_SUPPORT], [test "x$MM_RESOURCE_MANAGER_SUPPORT" = "xyes"])
66
67 PKG_CHECK_MODULES(EXIF, libexif)
68 AC_SUBST(EXIF_CFLAGS)
69 AC_SUBST(EXIF_LIBS)
70
71 PKG_CHECK_MODULES(GLIB, glib-2.0)
72 AC_SUBST(GLIB_CFLAGS)
73 AC_SUBST(GLIB_LIBS)
74
75 PKG_CHECK_MODULES(GIO, gio-2.0)
76 AC_SUBST(GIO_CFLAGS)
77 AC_SUBST(GIO_LIBS)
78
79 PKG_CHECK_MODULES(MMUTIL_IMGP, mmutil-imgp)
80 AC_SUBST(MMUTIL_IMGP_CFLAGS)
81 AC_SUBST(MMUTIL_IMGP_LIBS)
82
83 PKG_CHECK_MODULES(MMUTIL_JPEG, mmutil-jpeg)
84 AC_SUBST(MMUTIL_JPEG_CFLAGS)
85 AC_SUBST(MMUTIL_JPEG_LIBS)
86
87 PKG_CHECK_MODULES(VCONF, vconf)
88 AC_SUBST(VCONF_CFLAGS)
89 AC_SUBST(VCONF_LIBS)
90
91 PKG_CHECK_MODULES(SYSTEMINFO, capi-system-info)
92 AC_SUBST(SYSTEMINFO_CFLAGS)
93 AC_SUBST(SYSTEMINFO_LIBS)
94
95 PKG_CHECK_MODULES(TBM, libtbm)
96 AC_SUBST(TBM_CFLAGS)
97 AC_SUBST(TBM_LIBS)
98
99 AC_ARG_ENABLE(rm, AC_HELP_STRING([--enable-rm], [enable rm]),
100 [
101   case "${enableval}" in
102     yes) RM_SUPPORT=yes ;;
103     no)  RM_SUPPORT=no ;;
104     *) AC_MSG_ERROR(bad value ${enableval} for --enable-rm) ;;
105   esac
106 ],[RM_SUPPORT=no])
107 if test "x$RM_SUPPORT" = "xyes"; then
108 PKG_CHECK_MODULES(RM, tv-resource-manager)
109 AC_SUBST(RM_CFLAGS)
110 AC_SUBST(RM_LIBS)
111
112 PKG_CHECK_MODULES(AUL, aul)
113 AC_SUBST(AUL_CFLAGS)
114 AC_SUBST(AUL_LIBS)
115
116 PKG_CHECK_MODULES(RI, tv-resource-information)
117 AC_SUBST(RI_CFLAGS)
118 AC_SUBST(RI_LIBS)
119
120 PKG_CHECK_MODULES(RC, resource-center-api)
121 AC_SUBST(RC_CFLAGS)
122 AC_SUBST(RC_LIBS)
123 fi
124 AM_CONDITIONAL([RM_SUPPORT], [test "x$RM_SUPPORT" = "xyes"])
125
126 AC_ARG_ENABLE(camera-conf-mgr-tv, AC_HELP_STRING([--enable-camera-conf-mgr-tv], [enable camera-conf-mgr-tv]),
127 [
128   case "${enableval}" in
129     yes) CAMERA_CONF_MGR_SUPPORT=yes ;;
130     no)  CAMERA_CONF_MGR_SUPPORT=no ;;
131     *) AC_MSG_ERROR(bad value ${enableval} for --enable-camera-conf-mgr-tv) ;;
132   esac
133 ],[CAMERA_CONF_MGR_SUPPORT=no])
134 if test "x$CAMERA_CONF_MGR_SUPPORT" = "xyes"; then
135 PKG_CHECK_MODULES(CAMERA_CONF_MGR, camera-conf-mgr-tv)
136 AC_SUBST(CAMERA_CONF_MGR_CFLAGS)
137 AC_SUBST(CAMERA_CONF_MGR_LIBS)
138 fi
139 AM_CONDITIONAL([CAMERA_CONF_MGR_SUPPORT], [test "x$CAMERA_CONF_MGR_SUPPORT" = "xyes"])
140
141 PKG_CHECK_MODULES(STORAGE, storage)
142 AC_SUBST(STORAGE_CFLAGS)
143 AC_SUBST(STORAGE_LIBS)
144
145 PKG_CHECK_MODULES(TTRACE, ttrace)
146 AC_SUBST(TTRACE_CFLAGS)
147 AC_SUBST(TTRACE_LIBS)
148
149 PKG_CHECK_MODULES(DPM, dpm)
150 AC_SUBST(DPM_CFLAGS)
151 AC_SUBST(DPM_LIBS)
152
153 PKG_CHECK_MODULES(DLOG, dlog)
154 AC_SUBST(DLOG_CFLAGS)
155 AC_SUBST(DLOG_LIBS)
156
157 AC_ARG_ENABLE(product-tv, AC_HELP_STRING([--enable-product-tv],[enable tv defined code]),
158 [
159   case "${enableval}" in
160     yes) PRODUCT_TV=yes ;;
161     no)  PRODUCT_TV=no ;;
162     *) AC_MSG_ERROR([bad value ${enableval} for --enable-product-tv]) ;;
163   esac
164 ],[PRODUCT_TV=no])
165 AM_CONDITIONAL([PRODUCT_TV], [test "x$PRODUCT_TV" = "xyes"])
166
167 AC_ARG_ENABLE(gtests, AC_HELP_STRING([--enable-gtests], [enable gtests]),
168 [
169   case "${enableval}" in
170     yes) GTESTS=yes ;;
171     no)  GTESTS=no ;;
172     *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtests) ;;
173   esac
174 ],[GTESTS=no])
175 if test "x$GTESTS" = "xyes"; then
176 PKG_CHECK_MODULES(GMOCK, gmock)
177 AC_SUBST(GMOCK_CFLAGS)
178 AC_SUBST(GMOCK_LIBS)
179 fi
180 AM_CONDITIONAL([GTESTS], [test "x$GTESTS" = "xyes"])
181
182 # Checks for header files.
183 AC_HEADER_STDC
184 AC_CHECK_HEADERS([fcntl.h memory.h stdlib.h string.h sys/time.h unistd.h])
185
186 # Checks for typedefs, structures, and compiler characteristics.
187 AC_C_CONST
188 AC_TYPE_PID_T
189 AC_TYPE_SIZE_T
190
191 # Checks for library functions.
192 AC_FUNC_ALLOCA
193 AC_FUNC_FORK
194 AC_FUNC_MALLOC
195 AC_FUNC_MEMCMP
196 AC_FUNC_SELECT_ARGTYPES
197 AC_TYPE_SIGNAL
198 AC_CHECK_FUNCS([memset select])
199 AC_CONFIG_FILES([
200 Makefile
201 src/Makefile
202 unittest/Makefile
203 mm-camcorder.pc
204 ])
205 AC_OUTPUT