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)
48 # Check for availability of BulletPhysics
49 PKG_CHECK_EXISTS(bullet, [
50 BULLET_CFLAGS=`pkg-config --cflags bullet`
51 BULLET_LIBS=`pkg-config --libs bullet`
54 AC_MSG_WARN([BulletPhysics development files not found, not building bullet plugin])
60 AC_SUBST(BULLET_CFLAGS)
63 AC_ARG_ENABLE([bullet],
64 [AC_HELP_STRING([ --enable-bullet],
65 [Enable bullet plugin])],
70 AC_ARG_ENABLE([feedback],
71 [AC_HELP_STRING([ --enable-feedback],
72 [Enable feedback plugin])],
73 [enable_feedback=yes],
76 AM_CONDITIONAL([USE_BULLET], [test x$BULLET = xyes && test x$enable_bullet = xyes])
77 AM_CONDITIONAL([USE_FEEDBACK], [test x$enable_feedback = xyes])
79 DALI_ADAPTOR_CFLAGS=-DPLATFORM_SLP
81 AC_ARG_ENABLE(exportall,
82 [AC_HELP_STRING([--enable-exportall],
83 [enables the exporting of all the symbols in the library])],
84 [enable_exportall=yes],
85 [enable_exportall=no])
87 AC_ARG_ENABLE([debug],
88 [AC_HELP_STRING([--enable-debug],
89 [Turns on debugging])],
90 [enable_debug=$enableval],
93 if test "x$enable_debug" = "xyes"; then
94 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED"
97 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
98 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
101 AC_ARG_ENABLE([assimp],
102 [AC_HELP_STRING([--enable-assimp],
103 [Enable assimp plugin, overriding platform defaults])],
107 AC_ARG_ENABLE([gles],
108 [AC_HELP_STRING([--enable-gles],
109 [Specify the OpenGL ES version for backwards compatibility])],
110 [enable_gles=$enableval],
113 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
115 AC_ARG_WITH([jpeg-turbo],
116 [AC_HELP_STRING([--with-jpeg-turbo],
117 [Use the JPEG Turbo library])],
118 [with_jpeg_turbo=$withval],
119 [with_jpeg_turbo=yes])
121 AM_CONDITIONAL(TURBO_JPEG_IS_ON, test $with_jpeg_turbo = yes)
123 # Tizen Profile options
124 AC_ARG_ENABLE([profile],
125 [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,LITE,WEARABLE,TV,UBUNTU],
126 [Select the variant of tizen])],
127 [enable_profile=$enableval],
128 [enable_profile=COMMON])
130 # Ensure valid profile selected
131 if test "x$enable_profile" != "xCOMMON" -a "x$enable_profile" != "xMOBILE" -a "x$enable_profile" != "xLITE" -a "x$enable_profile" != "xWEARABLE" -a "x$enable_profile" != "xTV" -a "x$enable_profile" != "xUBUNTU"; then
132 AC_MSG_ERROR([$enable_profile is an invalid profile])
135 AC_ARG_ENABLE(wayland,
136 [ --enable-wayland Build on Wayland],
140 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
141 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
142 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
143 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
144 AM_CONDITIONAL([LITE_PROFILE], [test x$enable_profile = xLITE])
145 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
146 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
147 AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
148 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
150 # Platforms should either enable features or remove them, they
151 # should not disable features. This allows the developer to override
152 # features through the command line.
154 if test "x$enable_profile" = "xCOMMON"; then
155 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
158 if test "x$enable_profile" = "xMOBILE"; then
159 PKG_CHECK_MODULES(OPENGLES20, opengl-es-20)
162 if test "x$enable_profile" = "xLITE"; then
163 PKG_CHECK_MODULES(OPENGLES20, gles20)
166 if test "x$enable_profile" = "xWEARABLE"; then
167 PKG_CHECK_MODULES(OPENGLES20, gles20)
170 if test "x$enable_profile" = "xTV"; then
171 PKG_CHECK_MODULES(OPENGLES20, gles20)
174 if test "x$enable_profile" = "xUBUNTU"; then
175 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
177 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
178 PKG_CHECK_MODULES(DLOG, dlog)
179 PKG_CHECK_MODULES(SENSOR, sensor)
180 PKG_CHECK_MODULES(TTS, tts)
181 PKG_CHECK_MODULES(VCONF, vconf)
182 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
185 if test "x$enable_profile" != "xTV" && test "x$enable_profile" != "xUBUNTU"; then
186 PKG_CHECK_MODULES(EFL_ASSIST, efl-assist)
189 if test "x$enable_wayland" = "xyes"; then
190 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
191 [DALI_HAS_ECOREWL=yes],
192 [DALI_HAS_ECOREWL=no])
194 PKG_CHECK_MODULES(ECORE_X, [ecore-x],
195 [DALI_HAS_ECOREX=yes],
196 [DALI_HAS_ECOREX=no])
197 PKG_CHECK_MODULES(X11, [x11],
202 if test "x$enable_feedback" = "xyes"; then
204 if test "x$enable_profile" = "xCOMMON" || test "x$enable_profile" = "xTV"; then
205 PKG_CHECK_MODULES(HAPTIC, haptic)
208 if test "x$enable_profile" = "xMOBILE"; then
209 PKG_CHECK_MODULES(DEVICED, deviced)
212 PKG_CHECK_MODULES(FEEDBACK, feedback)
213 PKG_CHECK_MODULES(MMFSOUND, mm-sound)
216 if test "x$enable_assimp" = "xyes" ; then
217 PKG_CHECK_MODULES(ASSIMP, assimp)
218 ASSIMP_CFLAGS+=-DASSIMP_ENABLED
221 # Don't move this - it depends on the platform defaults above
222 AM_CONDITIONAL([ASSIMP_ENABLED], [test x$enable_assimp = xyes])
224 if test x$DALI_DATA_RW_DIR != x; then
225 dataReadWriteDir=$DALI_DATA_RW_DIR
227 dataReadWriteDir=${prefix}/share/dali/
230 if test x$DALI_DATA_RO_DIR != x; then
231 dataReadOnlyDir=$DALI_DATA_RO_DIR
233 dataReadOnlyDir=${prefix}/share/dali/
236 if test x$FONT_PRELOADED_PATH != x; then
237 fontPreloadedPath=$FONT_PRELOADED_PATH
239 fontPreloadedPath=/usr/share/fonts/
242 if test x$FONT_DOWNLOADED_PATH != x; then
243 fontDownloadedPath=$FONT_DOWNLOADED_PATH
245 fontDownloadedPath=/opt/share/fonts/
248 if test x$FONT_APPLICATION_PATH != x; then
249 fontApplicationPath=$FONT_APPLICATION_PATH
251 fontApplicationPath=~/.fonts/
254 if test x$FONT_CONFIGURATION_FILE != x; then
255 fontConfigurationFilePath=$FONT_CONFIGURATION_FILE
258 AC_SUBST(dataReadWriteDir)
259 AC_SUBST(dataReadOnlyDir)
260 AC_SUBST(fontPreloadedPath)
261 AC_SUBST(fontDownloadedPath)
262 AC_SUBST(fontApplicationPath)
263 AC_SUBST(fontConfigurationFilePath)
264 AC_SUBST(DALI_ADAPTOR_CFLAGS)
265 AC_SUBST(DALI_PROFILE_CFLAGS)
267 # Specify the include directory for development headers
268 #devincludepath=${includedir}/dali/internal
269 devincludepath=${includedir}
270 AC_SUBST(devincludepath)
278 AM_CONDITIONAL([USE_PLUGIN], [test x$enable_feedback = xyes || test x$enable_bullet = xyes])
280 if test "x$enable_feedback" = "xyes" || test "x$enable_bullet" = "xyes"; then
293 Debug Build: $enable_debug
294 Compile flags $DALI_ADAPTOR_CFLAGS
295 Using Assimp Library: $enable_assimp
296 Using JPEG Turbo Library: $with_jpeg_turbo
297 Profile: $enable_profile
298 Data Dir (Read/Write): $dataReadWriteDir
299 Data Dir (Read Only): $dataReadOnlyDir
300 Font Path (Preloaded): $fontPreloadedPath
301 Font Path (Downloaded): $fontDownloadedPath
302 Font Path (Application): $fontApplicationPath
303 Font Configuration File: $fontConfigurationFilePath