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 AM_CONDITIONAL([RM_SUPPORT], [test "x$RM_SUPPORT" = "xyes"])
118 PKG_CHECK_MODULES(STORAGE, storage)
119 AC_SUBST(STORAGE_CFLAGS)
120 AC_SUBST(STORAGE_LIBS)
122 PKG_CHECK_MODULES(TTRACE, ttrace)
123 AC_SUBST(TTRACE_CFLAGS)
124 AC_SUBST(TTRACE_LIBS)
126 PKG_CHECK_MODULES(DPM, dpm)
130 PKG_CHECK_MODULES(DLOG, dlog)
131 AC_SUBST(DLOG_CFLAGS)
134 AC_ARG_ENABLE(product-tv, AC_HELP_STRING([--enable-product-tv],[enable tv defined code]),
136 case "${enableval}" in
137 yes) PRODUCT_TV=yes ;;
139 *) AC_MSG_ERROR([bad value ${enableval} for --enable-product-tv]) ;;
142 AM_CONDITIONAL([PRODUCT_TV], [test "x$PRODUCT_TV" = "xyes"])
144 AC_ARG_ENABLE(gtests, AC_HELP_STRING([--enable-gtests], [enable gtests]),
146 case "${enableval}" in
149 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtests) ;;
152 if test "x$GTESTS" = "xyes"; then
153 PKG_CHECK_MODULES(GMOCK, gmock)
154 AC_SUBST(GMOCK_CFLAGS)
157 AM_CONDITIONAL([GTESTS], [test "x$GTESTS" = "xyes"])
159 # Checks for header files.
161 AC_CHECK_HEADERS([fcntl.h memory.h stdlib.h string.h sys/time.h unistd.h])
163 # Checks for typedefs, structures, and compiler characteristics.
168 # Checks for library functions.
173 AC_FUNC_SELECT_ARGTYPES
175 AC_CHECK_FUNCS([memset select])