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
36 PKG_CHECK_MODULES(DALICORE, dali-core)
37 PKG_CHECK_MODULES(ELEMENTARY, elementary)
38 PKG_CHECK_MODULES(ECORE, ecore)
39 PKG_CHECK_MODULES(ECORE_IPC, ecore-ipc)
40 PKG_CHECK_MODULES(EXIF, libexif)
41 PKG_CHECK_MODULES(FREETYPE, [freetype2 >= $FREETYPE_REQUIRED])
42 PKG_CHECK_MODULES(FONTCONFIG, fontconfig)
43 PKG_CHECK_MODULES(PNG, libpng)
44 PKG_CHECK_MODULES(XML, libxml-2.0)
45 PKG_CHECK_MODULES(LIBEXIF, libexif)
46 PKG_CHECK_MODULES(LIBDRM, libdrm)
47 PKG_CHECK_MODULES(LIBCURL, libcurl)
49 # Check for availability of BulletPhysics
50 PKG_CHECK_EXISTS(bullet, [
51 BULLET_CFLAGS=`pkg-config --cflags bullet`
52 BULLET_LIBS=`pkg-config --libs bullet`
55 AC_MSG_WARN([BulletPhysics development files not found, not building bullet plugin])
61 AC_SUBST(BULLET_CFLAGS)
64 AC_ARG_ENABLE([bullet],
65 [AC_HELP_STRING([ --enable-bullet],
66 [Enable bullet plugin])],
71 AC_ARG_ENABLE([feedback],
72 [AC_HELP_STRING([ --enable-feedback],
73 [Enable feedback plugin])],
74 [enable_feedback=yes],
77 AM_CONDITIONAL([USE_BULLET], [test x$BULLET = xyes && test x$enable_bullet = xyes])
78 AM_CONDITIONAL([USE_FEEDBACK], [test x$enable_feedback = xyes])
80 DALI_ADAPTOR_CFLAGS=-DPLATFORM_TIZEN
82 AC_ARG_ENABLE(exportall,
83 [AC_HELP_STRING([--enable-exportall],
84 [enables the exporting of all the symbols in the library])],
85 [enable_exportall=yes],
86 [enable_exportall=no])
88 AC_ARG_ENABLE([debug],
89 [AC_HELP_STRING([--enable-debug],
90 [Turns on debugging])],
91 [enable_debug=$enableval],
94 AC_ARG_ENABLE(shaderbincache,
95 [AC_HELP_STRING([--enable-shaderbincache],
96 [enables shader binary cache])],
97 [enable_shaderbincache=$enableval],
98 [enable_shaderbincache=DISABLE])
100 if test "x$enable_debug" = "xyes"; then
101 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED"
104 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
105 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
108 if test "x$enable_shaderbincache" = "xENABLE"; then
109 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DSHADERBIN_CACHE_ENABLED"
112 AC_ARG_ENABLE([assimp],
113 [AC_HELP_STRING([--enable-assimp],
114 [Enable assimp plugin, overriding platform defaults])],
118 AC_ARG_ENABLE([gles],
119 [AC_HELP_STRING([--enable-gles],
120 [Specify the OpenGL ES version for backwards compatibility])],
121 [enable_gles=$enableval],
124 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
126 AC_ARG_WITH([jpeg-turbo],
127 [AC_HELP_STRING([--with-jpeg-turbo],
128 [Use the JPEG Turbo library])],
129 [with_jpeg_turbo=$withval],
130 [with_jpeg_turbo=yes])
132 AM_CONDITIONAL(TURBO_JPEG_IS_ON, test $with_jpeg_turbo = yes)
134 AC_ARG_WITH([over-tizen_2_2],
135 [AC_HELP_STRING([--with-over-tizen_2_2],
136 [Use tizen API over ver. 2.2])],
137 [with_over_tizen_2_2=yes],
138 [with_over_tizen_2_2=no])
140 # Tizen Profile options
141 AC_ARG_ENABLE([profile],
142 [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,WEARABLE,TV,UBUNTU],
143 [Select the variant of tizen])],
144 [enable_profile=$enableval],
145 [enable_profile=COMMON])
147 # Ensure valid profile selected
148 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
149 AC_MSG_ERROR([$enable_profile is an invalid profile])
152 AC_ARG_ENABLE(wayland,
153 [ --enable-wayland Build on Wayland],
157 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
158 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
159 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
160 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
161 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
162 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
163 AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
164 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
166 # Platforms should either enable features or remove them, they
167 # should not disable features. This allows the developer to override
168 # features through the command line.
170 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
172 if test "x$enable_profile" != "xUBUNTU"; then
173 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
174 PKG_CHECK_MODULES(DLOG, dlog)
175 PKG_CHECK_MODULES(SENSOR, sensor)
176 PKG_CHECK_MODULES(TTS, tts)
177 PKG_CHECK_MODULES(VCONF, vconf)
178 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
180 if test "x$with_over_tizen_2_2" = "xyes"; then
181 PKG_CHECK_MODULES(CAPI_SYSTEM_INFO, capi-system-info)
184 fi # ubuntu profile test
186 if test "x$enable_wayland" = "xyes"; then
187 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
188 [DALI_HAS_ECOREWL=yes],
189 [DALI_HAS_ECOREWL=no])
191 PKG_CHECK_MODULES(ECORE_X, [ecore-x],
192 [DALI_HAS_ECOREX=yes],
193 [DALI_HAS_ECOREX=no])
194 PKG_CHECK_MODULES(X11, [x11],
199 if test "x$enable_feedback" = "xyes"; then
201 if test "x$enable_profile" = "xCOMMON" || test "x$enable_profile" = "xTV"; then
202 PKG_CHECK_MODULES(HAPTIC, haptic)
205 if test "x$enable_profile" = "xMOBILE"; then
206 PKG_CHECK_MODULES(DEVICED, deviced)
209 PKG_CHECK_MODULES(FEEDBACK, feedback)
210 PKG_CHECK_MODULES(MMFSOUND, mm-sound)
213 if test "x$enable_assimp" = "xyes" ; then
214 PKG_CHECK_MODULES(ASSIMP, assimp)
215 ASSIMP_CFLAGS+=-DASSIMP_ENABLED
218 # Don't move this - it depends on the platform defaults above
219 AM_CONDITIONAL([ASSIMP_ENABLED], [test x$enable_assimp = xyes])
221 if test x$DALI_DATA_RW_DIR != x; then
222 dataReadWriteDir=$DALI_DATA_RW_DIR
224 dataReadWriteDir=${prefix}/share/dali/
227 if test x$DALI_DATA_RO_DIR != x; then
228 dataReadOnlyDir=$DALI_DATA_RO_DIR
230 dataReadOnlyDir=${prefix}/share/dali/
233 if test x$FONT_PRELOADED_PATH != x; then
234 fontPreloadedPath=$FONT_PRELOADED_PATH
236 fontPreloadedPath=/usr/share/fonts/
239 if test x$FONT_DOWNLOADED_PATH != x; then
240 fontDownloadedPath=$FONT_DOWNLOADED_PATH
242 fontDownloadedPath=/opt/share/fonts/
245 if test x$FONT_APPLICATION_PATH != x; then
246 fontApplicationPath=$FONT_APPLICATION_PATH
248 fontApplicationPath=~/.fonts/
251 if test x$FONT_CONFIGURATION_FILE != x; then
252 fontConfigurationFilePath=$FONT_CONFIGURATION_FILE
255 AC_SUBST(dataReadWriteDir)
256 AC_SUBST(dataReadOnlyDir)
257 AC_SUBST(fontPreloadedPath)
258 AC_SUBST(fontDownloadedPath)
259 AC_SUBST(fontApplicationPath)
260 AC_SUBST(fontConfigurationFilePath)
261 AC_SUBST(DALI_ADAPTOR_CFLAGS)
262 AC_SUBST(DALI_PROFILE_CFLAGS)
264 # Specify the include directory for development headers
265 #devincludepath=${includedir}/dali/internal
266 devincludepath=${includedir}
267 AC_SUBST(devincludepath)
275 AM_CONDITIONAL([USE_PLUGIN], [test x$enable_feedback = xyes || test x$enable_bullet = xyes])
277 if test "x$enable_feedback" = "xyes" || test "x$enable_bullet" = "xyes"; then
290 Debug Build: $enable_debug
291 Compile flags $DALI_ADAPTOR_CFLAGS
292 Using Assimp Library: $enable_assimp
293 Using JPEG Turbo Library: $with_jpeg_turbo
294 Profile: $enable_profile
295 Data Dir (Read/Write): $dataReadWriteDir
296 Data Dir (Read Only): $dataReadOnlyDir
297 Font Path (Preloaded): $fontPreloadedPath
298 Font Path (Downloaded): $fontDownloadedPath
299 Font Path (Application): $fontApplicationPath
300 Font Configuration File: $fontConfigurationFilePath
301 OVERTIZEN2.2: $with_over_tizen_2_2