Merge "Support using wl_surface for legacy_player_test" into tizen
[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
14 AC_PROG_LIBTOOL
15
16 AC_FUNC_MMAP
17 AC_FUNC_REALLOC
18 AC_FUNC_SELECT_ARGTYPES
19 AC_FUNC_STAT
20 AC_FUNC_VPRINTF
21 AC_HEADER_STDBOOL
22 AC_HEADER_STDC
23 AC_HEADER_TIME
24 AC_PROG_GCC_TRADITIONAL
25
26 # Checks for libraries.
27
28 # Checks for header files.
29 AC_HEADER_STDC
30 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h syslog.h unistd.h])
31
32 # Checks for typedefs, structures, and compiler characteristics.
33 AC_HEADER_STDBOOL
34 AC_C_CONST
35 AC_TYPE_INT64_T
36 AC_HEADER_TIME
37
38 # Checks for library functions.
39 AC_FUNC_MALLOC
40 AC_FUNC_MEMCMP
41 AC_FUNC_STAT
42 AC_CHECK_FUNCS([gettimeofday memset strchr strstr])
43
44 PKG_CHECK_MODULES(MMCOMMON,mm-common)
45 AC_SUBST(MMCOMMON_CFLAGS)
46 AC_SUBST(MMCOMMON_LIBS)
47
48 PKG_CHECK_MODULES(MMSOUND,mm-sound)
49 AC_SUBST(MMSOUND_CFLAGS)
50 AC_SUBST(MMSOUND_LIBS)
51
52 PKG_CHECK_MODULES(GLIB, glib-2.0)
53 AC_SUBST(GLIB_CFLAGS)
54 AC_SUBST(GLIB_LIBS)
55
56 PKG_CHECK_MODULES(GST, gstreamer-1.0 >= 1.2.0)
57 AC_SUBST(GST_CFLAGS)
58 AC_SUBST(GST_LIBS)
59
60 PKG_CHECK_MODULES(GST_PLUGIN_BASE, gstreamer-plugins-base-1.0 >= 1.2.0)
61 AC_SUBST(GST_PLUGIN_BASE_CFLAGS)
62 AC_SUBST(GST_PLUGIN_BASE_LIBS)
63
64 AC_ARG_ENABLE(wayland, AC_HELP_STRING([--enable-wayland], [enable wayland]),
65 [
66  case "${enableval}" in
67          yes) WAYLAND_SUPPORT=yes ;;
68          no)  WAYLAND_SUPPORT=no ;;
69          *)   AC_MSG_ERROR(bad value ${enableval} for --enable-wayland) ;;
70  esac
71  ],[WAYLAND_SUPPORT=no])
72 if test "x$WAYLAND_SUPPORT" = "xyes"; then
73 PKG_CHECK_MODULES(GST_WAYLAND, gstreamer-wayland-1.0 >= 1.2.0)
74 AC_SUBST(GST_WAYLAND_CFLAGS)
75 AC_SUBST(GST_WAYLAND_LIBS)
76 fi
77 AM_CONDITIONAL([WAYLAND_SUPPORT], [test "x$WAYLAND_SUPPORT" = "xyes"])
78
79 PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-1.0 >= 1.2.0)
80 AC_SUBST(GST_VIDEO_CFLAGS)
81 AC_SUBST(GST_VIDEO_LIBS)
82
83 PKG_CHECK_MODULES(GST_APP, gstreamer-app-1.0 >= 1.2.0)
84 AC_SUBST(GST_APP_CFLAGS)
85 AC_SUBST(GST_APP_LIBS)
86
87 PKG_CHECK_MODULES(APPFWK, appcore-efl)
88 AC_SUBST(APPFWK_CFLAGS)
89 AC_SUBST(APPFWK_LIBS)
90
91 PKG_CHECK_MODULES(ELEMENTARY, elementary)
92 AC_SUBST(ELEMENTARY_CFLAGS)
93 AC_SUBST(ELEMENTARY_LIBS)
94
95 # for testsuite
96 PKG_CHECK_MODULES(MMUTIL, mmutil-imgp)
97 AC_SUBST(MMUTIL_CFLAGS)
98 AC_SUBST(MMUTIL_LIBS)
99
100 PKG_CHECK_MODULES(EVAS, evas)
101 AC_SUBST(EVAS_CFLAGS)
102 AC_SUBST(EVAS_LIBS)
103
104 PKG_CHECK_MODULES(ECORE, ecore)
105 AC_SUBST(ECORE_CFLAGS)
106 AC_SUBST(ECORE_LIBS)
107
108 PKG_CHECK_MODULES(INIPARSER, iniparser)
109 AC_SUBST(INIPARSER_CFLAGS)
110 AC_SUBST(INIPARSER_LIBS)
111
112 PKG_CHECK_MODULES(VCONF, vconf)
113 AC_SUBST(VCONF_CFLAGS)
114 AC_SUBST(VCONF_LIBS)
115
116 PKG_CHECK_MODULES(ICU, icu-i18n)
117 AC_SUBST(ICU_CFLAGS)
118 AC_SUBST(ICU_LIBS)
119
120 PKG_CHECK_MODULES(MEDIAPACKET, capi-media-tool)
121 AC_SUBST(MEDIAPACKET_CFLAGS)
122 AC_SUBST(MEDIAPACKET_LIBS)
123
124 PKG_CHECK_MODULES(MRP_RESOURCE, murphy-resource)
125 AC_SUBST(MRP_RESOURCE_CFLAGS)
126 AC_SUBST(MRP_RESOURCE_LIBS)
127
128 PKG_CHECK_MODULES(MRP_GLIB, murphy-glib)
129 AC_SUBST(MRP_GLIB_CFLAGS)
130 AC_SUBST(MRP_GLIB_LIBS)
131
132 PKG_CHECK_MODULES(DLOG, dlog)
133 AC_SUBST(DLOG_CFLAGS)
134 AC_SUBST(DLOG_LIBS)
135
136 AC_ARG_ENABLE(sdk, AC_HELP_STRING([--enable-sdk], [sdk build]),
137          [
138                 case "${enableval}" in
139                 yes) IS_SDK=yes ;;
140                 no)  IS_SDK=no ;;
141                   *)   AC_MSG_ERROR(bad value ${enableval} for --enable-sdk) ;;
142                 esac
143         ],
144 [IS_SDK=no])
145 AM_CONDITIONAL([IS_SDK], [test "x$IS_SDK" = "xyes"])
146
147 AC_CONFIG_FILES([Makefile
148                  src/Makefile
149                  mm-player.pc
150 ])
151 AC_OUTPUT