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])
25 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
29 DALI_ADAPTOR_VERSION=dali_version
30 AC_SUBST(DALI_ADAPTOR_VERSION)
32 FREETYPE_REQUIRED=9.16.3
34 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
35 PKG_CHECK_MODULES(DALICORE, dali-core)
36 PKG_CHECK_MODULES(DLOG, dlog)
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(FEEDBACK, feedback)
43 PKG_CHECK_MODULES(FONTCONFIG, fontconfig)
44 PKG_CHECK_MODULES(MMFSOUND, mm-sound)
45 PKG_CHECK_MODULES(PNG, libpng)
46 PKG_CHECK_MODULES(SENSOR, sensor)
47 PKG_CHECK_MODULES(TTS, tts)
48 PKG_CHECK_MODULES(VCONF, vconf)
49 PKG_CHECK_MODULES(XML, libxml-2.0)
50 PKG_CHECK_MODULES(LIBDRM, libdrm)
51 PKG_CHECK_MODULES(LIBEXIF, libexif)
52 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
53 PKG_CHECK_MODULES(EFL_ASSIST, efl-assist)
55 # Check for availability of BulletPhysics
56 PKG_CHECK_EXISTS(bullet, [
57 BULLET_CFLAGS=`pkg-config --cflags bullet`
58 BULLET_LIBS=`pkg-config --libs bullet`
61 AC_MSG_WARN([BulletPhysics development files not found, not building bullet plugin])
67 AC_SUBST(BULLET_CFLAGS)
69 AM_CONDITIONAL([USE_BULLET], [test x$BULLET = xyes])
71 DALI_ADAPTOR_CFLAGS=-DPLATFORM_SLP
73 AC_ARG_ENABLE(exportall,
74 [AC_HELP_STRING([--enable-exportall],
75 [enables the exporting of all the symbols in the library])],
76 [enable_exportall=yes],
77 [enable_exportall=no])
79 AC_ARG_ENABLE([debug],
80 [AC_HELP_STRING([--enable-debug],
81 [Turns on debugging])],
82 [enable_debug=$enableval],
85 if test "x$enable_debug" = "xyes"; then
86 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED"
89 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
90 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
94 [AC_HELP_STRING([--enable-gles],
95 [Specify the OpenGL ES version for backwards compatibility])],
96 [enable_gles=$enableval],
99 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
101 AC_ARG_WITH([jpeg-turbo],
102 [AC_HELP_STRING([--with-jpeg-turbo],
103 [Use the JPEG Turbo library])],
104 [with_jpeg_turbo=$withval],
105 [with_jpeg_turbo=yes])
107 AM_CONDITIONAL(TURBO_JPEG_IS_ON, test $with_jpeg_turbo = yes)
109 # Tizen Profile options
110 AC_ARG_ENABLE([profile],
111 [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,LITE,WEARABLE,TV],
112 [Select the variant of tizen])],
113 [enable_profile=$enableval],
114 [enable_profile=COMMON])
116 AC_ARG_ENABLE(wayland,
117 [ --enable-wayland Build on Wayland],
121 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
122 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
123 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
124 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
125 AM_CONDITIONAL([LITE_PROFILE], [test x$enable_profile = xLITE])
126 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
127 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
128 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
130 if test "x$enable_profile" = "xCOMMON"; then
131 if test "x$enable_wayland" = "xyes"; then
132 PKG_CHECK_MODULES(OPENGLES20, glesv2)
134 PKG_CHECK_MODULES(OPENGLES20, gles20)
136 PKG_CHECK_MODULES(HAPTIC, haptic)
139 if test "x$enable_profile" = "xMOBILE"; then
140 PKG_CHECK_MODULES(OPENGLES20, opengl-es-20)
141 PKG_CHECK_MODULES(ASSIMP, assimp)
142 PKG_CHECK_MODULES(DEVICED, deviced)
145 if test "x$enable_profile" = "xLITE"; then
146 PKG_CHECK_MODULES(OPENGLES20, gles20)
149 if test "x$enable_profile" = "xWEARABLE"; then
150 PKG_CHECK_MODULES(OPENGLES20, gles20)
153 if test "x$enable_profile" = "xTV"; then
154 PKG_CHECK_MODULES(OPENGLES20, gles20)
155 PKG_CHECK_MODULES(ASSIMP, assimp)
156 PKG_CHECK_MODULES(HAPTIC, haptic)
159 if test "x$enable_wayland" = "xyes"; then
160 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
161 [DALI_HAS_ECOREWL=yes],
162 [DALI_HAS_ECOREWL=no])
164 PKG_CHECK_MODULES(ECORE_X, [ecore-x],
165 [DALI_HAS_ECOREX=yes],
166 [DALI_HAS_ECOREX=no])
167 PKG_CHECK_MODULES(X11, [x11],
172 if test x$DALI_DATA_RW_DIR != x; then
173 dataReadWriteDir=$DALI_DATA_RW_DIR
175 dataReadWriteDir=${prefix}/share/dali/
178 if test x$DALI_DATA_RO_DIR != x; then
179 dataReadOnlyDir=$DALI_DATA_RO_DIR
181 dataReadOnlyDir=${prefix}/share/dali/
184 if test x$FONT_PRELOADED_PATH != x; then
185 fontPreloadedPath=$FONT_PRELOADED_PATH
187 fontPreloadedPath=/usr/share/fonts/
190 if test x$FONT_DOWNLOADED_PATH != x; then
191 fontDownloadedPath=$FONT_DOWNLOADED_PATH
193 fontDownloadedPath=/opt/share/fonts/
196 if test x$FONT_APPLICATION_PATH != x; then
197 fontApplicationPath=$FONT_APPLICATION_PATH
199 fontApplicationPath=~/.fonts/
202 if test x$FONT_CONFIGURATION_FILE != x; then
203 fontConfigurationFilePath=$FONT_CONFIGURATION_FILE
206 AC_SUBST(dataReadWriteDir)
207 AC_SUBST(dataReadOnlyDir)
208 AC_SUBST(fontPreloadedPath)
209 AC_SUBST(fontDownloadedPath)
210 AC_SUBST(fontApplicationPath)
211 AC_SUBST(fontConfigurationFilePath)
212 AC_SUBST(DALI_ADAPTOR_CFLAGS)
213 AC_SUBST(DALI_PROFILE_CFLAGS)
215 # Specify the include directory for development headers
216 #devincludepath=${includedir}/dali/internal
217 devincludepath=${includedir}
218 AC_SUBST(devincludepath)
223 dali-adaptor/Makefile
225 dali-application/Makefile
229 if test "x$enable_profile" != "xLITE"; then
242 Debug Build: $enable_debug
243 Compile flags $DALI_ADAPTOR_CFLAGS
244 Using JPEG Turbo Library: $with_jpeg_turbo
245 Profile: $enable_profile
246 Data Dir (Read/Write): $dataReadWriteDir
247 Data Dir (Read Only): $dataReadOnlyDir
248 Font Path (Preloaded): $fontPreloadedPath
249 Font Path (Downloaded): $fontDownloadedPath
250 Font Path (Application): $fontApplicationPath
251 Font Configuration File: $fontConfigurationFilePath