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(HARFBUZZ, harfbuzz)
48 PKG_CHECK_MODULES(FRIBIDI, fribidi)
50 # Check for availability of BulletPhysics
51 PKG_CHECK_EXISTS(bullet, [
52 BULLET_CFLAGS=`pkg-config --cflags bullet`
53 BULLET_LIBS=`pkg-config --libs bullet`
56 AC_MSG_WARN([BulletPhysics development files not found, not building bullet plugin])
62 AC_SUBST(BULLET_CFLAGS)
64 AM_CONDITIONAL([USE_BULLET], [test x$BULLET = xyes])
66 DALI_ADAPTOR_CFLAGS=-DPLATFORM_SLP
68 AC_ARG_ENABLE(exportall,
69 [AC_HELP_STRING([--enable-exportall],
70 [enables the exporting of all the symbols in the library])],
71 [enable_exportall=yes],
72 [enable_exportall=no])
74 AC_ARG_ENABLE([debug],
75 [AC_HELP_STRING([--enable-debug],
76 [Turns on debugging])],
77 [enable_debug=$enableval],
80 if test "x$enable_debug" = "xyes"; then
81 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED"
84 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
85 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
88 AC_ARG_ENABLE([assimp],
89 [AC_HELP_STRING([--enable-assimp],
90 [Enable assimp plugin, overriding platform defaults])],
95 [AC_HELP_STRING([--enable-gles],
96 [Specify the OpenGL ES version for backwards compatibility])],
97 [enable_gles=$enableval],
100 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
102 AC_ARG_WITH([jpeg-turbo],
103 [AC_HELP_STRING([--with-jpeg-turbo],
104 [Use the JPEG Turbo library])],
105 [with_jpeg_turbo=$withval],
106 [with_jpeg_turbo=yes])
108 AM_CONDITIONAL(TURBO_JPEG_IS_ON, test $with_jpeg_turbo = yes)
110 # Tizen Profile options
111 AC_ARG_ENABLE([profile],
112 [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,LITE,WEARABLE,TV,UBUNTU],
113 [Select the variant of tizen])],
114 [enable_profile=$enableval],
115 [enable_profile=COMMON])
117 # Ensure valid profile selected
118 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
119 AC_MSG_ERROR([$enable_profile is an invalid profile])
122 AC_ARG_ENABLE(wayland,
123 [ --enable-wayland Build on Wayland],
127 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
128 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
129 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
130 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
131 AM_CONDITIONAL([LITE_PROFILE], [test x$enable_profile = xLITE])
132 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
133 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
134 AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
135 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
137 # Platforms should either enable features or remove them, they
138 # should not disable features. This allows the developer to override
139 # features through the command line.
141 if test "x$enable_profile" = "xCOMMON"; then
142 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
143 PKG_CHECK_MODULES(HAPTIC, haptic)
146 if test "x$enable_profile" = "xMOBILE"; then
147 PKG_CHECK_MODULES(OPENGLES20, opengl-es-20)
148 PKG_CHECK_MODULES(DEVICED, deviced)
152 if test "x$enable_profile" = "xLITE"; then
153 PKG_CHECK_MODULES(OPENGLES20, gles20)
156 if test "x$enable_profile" = "xWEARABLE"; then
157 PKG_CHECK_MODULES(OPENGLES20, gles20)
160 if test "x$enable_profile" = "xTV"; then
161 PKG_CHECK_MODULES(OPENGLES20, gles20)
162 PKG_CHECK_MODULES(HAPTIC, haptic)
165 if test "x$enable_profile" = "xUBUNTU"; then
166 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
168 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
169 PKG_CHECK_MODULES(DLOG, dlog)
170 PKG_CHECK_MODULES(FEEDBACK, feedback)
171 PKG_CHECK_MODULES(MMFSOUND, mm-sound)
172 PKG_CHECK_MODULES(SENSOR, sensor)
173 PKG_CHECK_MODULES(TTS, tts)
174 PKG_CHECK_MODULES(VCONF, vconf)
175 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
177 if test "x$enable_profile" != "xTV"; then
178 PKG_CHECK_MODULES(EFL_ASSIST, efl-assist)
183 if test "x$enable_wayland" = "xyes"; then
184 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
185 [DALI_HAS_ECOREWL=yes],
186 [DALI_HAS_ECOREWL=no])
188 PKG_CHECK_MODULES(ECORE_X, [ecore-x],
189 [DALI_HAS_ECOREX=yes],
190 [DALI_HAS_ECOREX=no])
191 PKG_CHECK_MODULES(X11, [x11],
196 if test "x$enable_assimp" = "xyes" ; then
197 PKG_CHECK_MODULES(ASSIMP, assimp)
198 ASSIMP_CFLAGS+=-DASSIMP_ENABLED
201 # Don't move this - it depends on the platform defaults above
202 AM_CONDITIONAL([ASSIMP_ENABLED], [test x$enable_assimp = xyes])
205 if test x$DALI_DATA_RW_DIR != x; then
206 dataReadWriteDir=$DALI_DATA_RW_DIR
208 dataReadWriteDir=${prefix}/share/dali/
211 if test x$DALI_DATA_RO_DIR != x; then
212 dataReadOnlyDir=$DALI_DATA_RO_DIR
214 dataReadOnlyDir=${prefix}/share/dali/
217 if test x$FONT_PRELOADED_PATH != x; then
218 fontPreloadedPath=$FONT_PRELOADED_PATH
220 fontPreloadedPath=/usr/share/fonts/
223 if test x$FONT_DOWNLOADED_PATH != x; then
224 fontDownloadedPath=$FONT_DOWNLOADED_PATH
226 fontDownloadedPath=/opt/share/fonts/
229 if test x$FONT_APPLICATION_PATH != x; then
230 fontApplicationPath=$FONT_APPLICATION_PATH
232 fontApplicationPath=~/.fonts/
235 if test x$FONT_CONFIGURATION_FILE != x; then
236 fontConfigurationFilePath=$FONT_CONFIGURATION_FILE
239 AC_SUBST(dataReadWriteDir)
240 AC_SUBST(dataReadOnlyDir)
241 AC_SUBST(fontPreloadedPath)
242 AC_SUBST(fontDownloadedPath)
243 AC_SUBST(fontApplicationPath)
244 AC_SUBST(fontConfigurationFilePath)
245 AC_SUBST(DALI_ADAPTOR_CFLAGS)
246 AC_SUBST(DALI_PROFILE_CFLAGS)
248 # Specify the include directory for development headers
249 #devincludepath=${includedir}/dali/internal
250 devincludepath=${includedir}
251 AC_SUBST(devincludepath)
259 if test "x$enable_profile" != "xLITE"; then
272 Debug Build: $enable_debug
273 Compile flags $DALI_ADAPTOR_CFLAGS
274 Using Assimp Library: $enable_assimp
275 Using JPEG Turbo Library: $with_jpeg_turbo
276 Profile: $enable_profile
277 Data Dir (Read/Write): $dataReadWriteDir
278 Data Dir (Read Only): $dataReadOnlyDir
279 Font Path (Preloaded): $fontPreloadedPath
280 Font Path (Downloaded): $fontDownloadedPath
281 Font Path (Application): $fontApplicationPath
282 Font Configuration File: $fontConfigurationFilePath