2 # Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 m4_define([dali_version],[0.1.0])
18 AC_INIT([dali], [dali_version])
19 AM_INIT_AUTOMAKE([-Wall foreign])
21 AC_CONFIG_MACRO_DIR([m4])
27 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
31 DALI_ADAPTOR_VERSION=dali_version
32 AC_SUBST(DALI_ADAPTOR_VERSION)
34 FREETYPE_REQUIRED=9.16.3
35 # 17.1.11 = Freetype version 2.5.2
36 FREETYPE_BITMAP_SUPPORT_VERSION=17.1.11
38 PKG_CHECK_MODULES(DALICORE, dali-core)
39 PKG_CHECK_MODULES(ELEMENTARY, elementary)
40 PKG_CHECK_MODULES(ECORE, ecore)
41 PKG_CHECK_MODULES(ECORE_IPC, ecore-ipc)
42 PKG_CHECK_MODULES(EXIF, libexif)
43 PKG_CHECK_MODULES(FREETYPE, [freetype2 >= $FREETYPE_REQUIRED])
44 PKG_CHECK_MODULES(FREETYPE_BITMAP_SUPPORT, [freetype2 >= $FREETYPE_BITMAP_SUPPORT_VERSION], [ freetype_bitmap_support=yes ], [ freetype_bitmap_support=no ] )
45 PKG_CHECK_MODULES(FONTCONFIG, fontconfig)
46 PKG_CHECK_MODULES(PNG, libpng)
47 PKG_CHECK_MODULES(XML, libxml-2.0)
48 PKG_CHECK_MODULES(LIBEXIF, libexif)
49 PKG_CHECK_MODULES(LIBDRM, libdrm)
50 PKG_CHECK_MODULES(LIBCURL, libcurl)
51 PKG_CHECK_MODULES(HARFBUZZ, harfbuzz)
52 PKG_CHECK_MODULES(FRIBIDI, fribidi)
53 PKG_CHECK_MODULES(TTRACE, ttrace, AC_DEFINE(ENABLE_TTRACE, 1, [ttrace available]),
54 [ AC_MSG_NOTICE([Tizen Trace not avaiable]) ]
58 # Check for EldBus.h in ECore
59 PKG_CHECK_MODULES(ELDBUS, eldbus, [ eldbus_available=yes ], [ eldbus_available=no ] )
61 DALI_ELDBUS_AVAILABLE=
62 if test "x$eldbus_available" = "xyes"; then
63 DALI_ELDBUS_AVAILABLE=true
64 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_ELDBUS_AVAILABLE "
66 AC_SUBST(DALI_ELDBUS_AVAILABLE)
69 PKG_CHECK_EXISTS(bullet, [
70 BULLET_CFLAGS=`pkg-config --cflags bullet`
71 BULLET_LIBS=`pkg-config --libs bullet`
74 AC_MSG_WARN([BulletPhysics development files not found, not building bullet plugin])
80 AC_SUBST(BULLET_CFLAGS)
83 AC_ARG_ENABLE([bullet],
84 [AC_HELP_STRING([ --enable-bullet],
85 [Enable bullet plugin])],
90 AC_ARG_ENABLE([feedback],
91 [AC_HELP_STRING([ --enable-feedback],
92 [Enable feedback plugin])],
93 [enable_feedback=yes],
96 AM_CONDITIONAL([USE_BULLET], [test x$BULLET = xyes && test x$enable_bullet = xyes])
97 AM_CONDITIONAL([USE_FEEDBACK], [test x$enable_feedback = xyes])
99 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DPLATFORM_TIZEN"
101 AC_ARG_ENABLE(exportall,
102 [AC_HELP_STRING([--enable-exportall],
103 [enables the exporting of all the symbols in the library])],
104 [enable_exportall=yes],
105 [enable_exportall=no])
107 AC_ARG_ENABLE([debug],
108 [AC_HELP_STRING([--enable-debug],
109 [Turns on debugging])],
110 [enable_debug=$enableval],
113 AC_ARG_ENABLE(shaderbincache,
114 [AC_HELP_STRING([--enable-shaderbincache],
115 [enables shader binary cache])],
116 [enable_shaderbincache=$enableval],
117 [enable_shaderbincache=DISABLE])
119 if test "x$enable_debug" = "xyes"; then
120 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED"
123 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
124 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
127 if test "x$enable_shaderbincache" = "xENABLE"; then
128 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DSHADERBIN_CACHE_ENABLED"
131 AC_ARG_ENABLE([gles],
132 [AC_HELP_STRING([--enable-gles],
133 [Specify the OpenGL ES version for backwards compatibility])],
134 [enable_gles=$enableval],
137 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
139 # node.js by default statically links against libuv, so it doesn't need to install
140 # a libuv headers/ shared library. So we can't use pkg-config to access any headers.
141 # As a work around we pass the node deps path so we can access the libuv headers inside nodes
143 AC_ARG_WITH([node-js],
144 [AC_HELP_STRING([--with-node-js],
145 [Node.JS path that contains Lib UV headers. Setting this configures DALi to work with LibUV mainloop used in Node.JS.
146 For example /usr/tmp/downloads/node-v0.12.4/deps/uv/include/ ])],
147 [with_node_js=$withval],
150 # Node.JS already has a libuv main loop running,so we have to integrate with it
151 AM_CONDITIONAL(LIB_UV_EVENT_LOOP, test x$with_node_js != xno)
155 if test "x$with_node_js" != "xno"; then
156 AC_MSG_NOTICE("build for node_js == yes");
157 [build_for_node_js=yes]
158 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DNODE_JS_SUPPORT -I${with_node_js}"
160 #not using node.js build
161 AC_MSG_NOTICE("build for node_js == no");
165 AC_ARG_WITH([over-tizen_2_2],
166 [AC_HELP_STRING([--with-over-tizen_2_2],
167 [Use tizen API over ver. 2.2])],
168 [with_over_tizen_2_2=yes],
169 [with_over_tizen_2_2=no])
171 # Tizen Profile options
172 AC_ARG_ENABLE([profile],
173 [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,WEARABLE,TV,UBUNTU],
174 [Select the variant of tizen])],
175 [enable_profile=$enableval],
176 [enable_profile=COMMON])
178 # Ensure valid profile selected
179 if test "x$enable_profile" != "xCOMMON" -a "x$enable_profile" != "xMOBILE" -a "x$enable_profile" != "xWEARABLE" -a "x$enable_profile" != "xTV" -a "x$enable_profile" != "xUBUNTU"; then
180 AC_MSG_ERROR([$enable_profile is an invalid profile])
183 AC_ARG_ENABLE(wayland,
184 [ --enable-wayland Build on Wayland],
188 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
189 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
190 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
191 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
192 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
193 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
194 AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
195 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
197 # Platforms should either enable features or remove them, they
198 # should not disable features. This allows the developer to override
199 # features through the command line.
201 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
203 if test "x$enable_profile" != "xUBUNTU"; then
204 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
205 PKG_CHECK_MODULES(DLOG, dlog)
206 PKG_CHECK_MODULES(SENSOR, sensor)
207 PKG_CHECK_MODULES(TTS, tts)
208 PKG_CHECK_MODULES(VCONF, vconf)
209 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
211 if test "x$with_over_tizen_2_2" = "xyes"; then
212 PKG_CHECK_MODULES(CAPI_SYSTEM_INFO, capi-system-info)
215 fi # ubuntu profile test
217 if test "x$enable_wayland" = "xyes"; then
218 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
219 [DALI_HAS_ECOREWL=yes],
220 [DALI_HAS_ECOREWL=no])
222 PKG_CHECK_MODULES(ECORE_X, [ecore-x],
223 [DALI_HAS_ECOREX=yes],
224 [DALI_HAS_ECOREX=no])
225 PKG_CHECK_MODULES(X11, [x11],
230 if test "x$enable_feedback" = "xyes"; then
232 if test "x$enable_profile" = "xCOMMON" || test "x$enable_profile" = "xTV"; then
233 PKG_CHECK_MODULES(HAPTIC, haptic)
236 if test "x$enable_profile" = "xMOBILE"; then
237 PKG_CHECK_MODULES(DEVICED, deviced)
240 PKG_CHECK_MODULES(FEEDBACK, feedback)
241 PKG_CHECK_MODULES(MMFSOUND, mm-sound)
244 if test x$DALI_DATA_RW_DIR != x; then
245 dataReadWriteDir=$DALI_DATA_RW_DIR
247 dataReadWriteDir=${prefix}/share/dali/
250 if test x$DALI_DATA_RO_DIR != x; then
251 dataReadOnlyDir=$DALI_DATA_RO_DIR
253 dataReadOnlyDir=${prefix}/share/dali/
256 AC_SUBST(dataReadWriteDir)
257 AC_SUBST(dataReadOnlyDir)
258 AC_SUBST(DALI_ADAPTOR_CFLAGS)
259 AC_SUBST(DALI_PROFILE_CFLAGS)
261 # Specify the include directory for development headers
262 #devincludepath=${includedir}/dali/internal
263 devincludepath=${includedir}
264 AC_SUBST(devincludepath)
270 adaptor/dali-adaptor-integration.pc
273 AM_CONDITIONAL([USE_PLUGIN], [test x$enable_feedback = xyes || test x$enable_bullet = xyes])
275 if test "x$enable_feedback" = "xyes" || test "x$enable_bullet" = "xyes"; then
281 if test "x$freetype_bitmap_support" = "xyes"; then
282 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DFREETYPE_BITMAP_SUPPORT"
292 Debug Build: $enable_debug
293 Compile flags $DALI_ADAPTOR_CFLAGS
294 Freetype bitmap support (Emoji): $freetype_bitmap_support
295 Profile: $enable_profile
296 Data Dir (Read/Write): $dataReadWriteDir
297 Data Dir (Read Only): $dataReadOnlyDir
298 OVERTIZEN2.2: $with_over_tizen_2_2
299 EldBus: $eldbus_available
300 Build for Node.JS (LibUV) $build_for_node_js
302 # optional output of node.js source path if we're building for node.js
303 if test "x$build_for_node_js" != "xno"; then
304 echo " Node.JS LibUV header path $with_node_js"