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])
9 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
16 AC_FUNC_SELECT_ARGTYPES
22 AC_PROG_GCC_TRADITIONAL
25 AC_SUBST(GCC_CXXFLAGS)
27 # Checks for libraries.
28 PKG_CHECK_MODULES(GST, gstreamer-1.0 >= 1.2.0)
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)
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)
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)
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)
48 PKG_CHECK_MODULES(MM_COMMON, mm-common)
49 AC_SUBST(MM_COMMON_CFLAGS)
50 AC_SUBST(MM_COMMON_LIBS)
52 AC_ARG_ENABLE(mm-resource-manager, AC_HELP_STRING([--enable-mm-resource-manager], [enable mm-resource-manager]),
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) ;;
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)
65 AM_CONDITIONAL([MM_RESOURCE_MANAGER_SUPPORT], [test "x$MM_RESOURCE_MANAGER_SUPPORT" = "xyes"])
67 PKG_CHECK_MODULES(EXIF, libexif)
71 PKG_CHECK_MODULES(GLIB, glib-2.0)
75 PKG_CHECK_MODULES(GIO, gio-2.0)
79 PKG_CHECK_MODULES(MMUTIL_IMGP, mmutil-imgp)
80 AC_SUBST(MMUTIL_IMGP_CFLAGS)
81 AC_SUBST(MMUTIL_IMGP_LIBS)
83 PKG_CHECK_MODULES(MMUTIL_JPEG, mmutil-jpeg)
84 AC_SUBST(MMUTIL_JPEG_CFLAGS)
85 AC_SUBST(MMUTIL_JPEG_LIBS)
87 PKG_CHECK_MODULES(VCONF, vconf)
88 AC_SUBST(VCONF_CFLAGS)
91 PKG_CHECK_MODULES(SYSTEMINFO, capi-system-info)
92 AC_SUBST(SYSTEMINFO_CFLAGS)
93 AC_SUBST(SYSTEMINFO_LIBS)
95 PKG_CHECK_MODULES(TBM, libtbm)
99 AC_ARG_ENABLE(rm, AC_HELP_STRING([--enable-rm], [enable rm]),
101 case "${enableval}" in
102 yes) RM_SUPPORT=yes ;;
104 *) AC_MSG_ERROR(bad value ${enableval} for --enable-rm) ;;
107 if test "x$RM_SUPPORT" = "xyes"; then
108 PKG_CHECK_MODULES(RM, tv-resource-manager)
112 PKG_CHECK_MODULES(AUL, aul)
116 PKG_CHECK_MODULES(RI, tv-resource-information)
120 PKG_CHECK_MODULES(RC, resource-center-api)
124 AM_CONDITIONAL([RM_SUPPORT], [test "x$RM_SUPPORT" = "xyes"])
126 AC_ARG_ENABLE(camera-conf-mgr-tv, AC_HELP_STRING([--enable-camera-conf-mgr-tv], [enable camera-conf-mgr-tv]),
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) ;;
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)
139 AM_CONDITIONAL([CAMERA_CONF_MGR_SUPPORT], [test "x$CAMERA_CONF_MGR_SUPPORT" = "xyes"])
141 PKG_CHECK_MODULES(STORAGE, storage)
142 AC_SUBST(STORAGE_CFLAGS)
143 AC_SUBST(STORAGE_LIBS)
145 PKG_CHECK_MODULES(TTRACE, ttrace)
146 AC_SUBST(TTRACE_CFLAGS)
147 AC_SUBST(TTRACE_LIBS)
149 PKG_CHECK_MODULES(DPM, dpm)
153 PKG_CHECK_MODULES(DLOG, dlog)
154 AC_SUBST(DLOG_CFLAGS)
157 AC_ARG_ENABLE(product-tv, AC_HELP_STRING([--enable-product-tv],[enable tv defined code]),
159 case "${enableval}" in
160 yes) PRODUCT_TV=yes ;;
162 *) AC_MSG_ERROR([bad value ${enableval} for --enable-product-tv]) ;;
165 AM_CONDITIONAL([PRODUCT_TV], [test "x$PRODUCT_TV" = "xyes"])
167 AC_ARG_ENABLE(gtests, AC_HELP_STRING([--enable-gtests], [enable gtests]),
169 case "${enableval}" in
172 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtests) ;;
175 if test "x$GTESTS" = "xyes"; then
176 PKG_CHECK_MODULES(GMOCK, gmock)
177 AC_SUBST(GMOCK_CFLAGS)
180 AM_CONDITIONAL([GTESTS], [test "x$GTESTS" = "xyes"])
182 # Checks for header files.
184 AC_CHECK_HEADERS([fcntl.h memory.h stdlib.h string.h sys/time.h unistd.h])
186 # Checks for typedefs, structures, and compiler characteristics.
191 # Checks for library functions.
196 AC_FUNC_SELECT_ARGTYPES
198 AC_CHECK_FUNCS([memset select])