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)
62 AM_CONDITIONAL([USE_BULLET], [test x$BULLET = xyes])
64 DALI_ADAPTOR_CFLAGS=-DPLATFORM_SLP
66 AC_ARG_ENABLE(exportall,
67 [AC_HELP_STRING([--enable-exportall],
68 [enables the exporting of all the symbols in the library])],
69 [enable_exportall=yes],
70 [enable_exportall=no])
72 AC_ARG_ENABLE([debug],
73 [AC_HELP_STRING([--enable-debug],
74 [Turns on debugging])],
75 [enable_debug=$enableval],
78 if test "x$enable_debug" = "xyes"; then
79 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED"
82 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
83 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
86 AC_ARG_ENABLE([assimp],
87 [AC_HELP_STRING([--enable-assimp],
88 [Enable assimp plugin, overriding platform defaults])],
93 [AC_HELP_STRING([--enable-gles],
94 [Specify the OpenGL ES version for backwards compatibility])],
95 [enable_gles=$enableval],
98 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
100 AC_ARG_WITH([jpeg-turbo],
101 [AC_HELP_STRING([--with-jpeg-turbo],
102 [Use the JPEG Turbo library])],
103 [with_jpeg_turbo=$withval],
104 [with_jpeg_turbo=yes])
106 AM_CONDITIONAL(TURBO_JPEG_IS_ON, test $with_jpeg_turbo = yes)
108 # Tizen Profile options
109 AC_ARG_ENABLE([profile],
110 [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,LITE,WEARABLE,TV,UBUNTU],
111 [Select the variant of tizen])],
112 [enable_profile=$enableval],
113 [enable_profile=COMMON])
115 # Ensure valid profile selected
116 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
117 AC_MSG_ERROR([$enable_profile is an invalid profile])
120 AC_ARG_ENABLE(wayland,
121 [ --enable-wayland Build on Wayland],
125 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
126 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
127 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
128 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
129 AM_CONDITIONAL([LITE_PROFILE], [test x$enable_profile = xLITE])
130 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
131 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
132 AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
133 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
135 # Platforms should either enable features or remove them, they
136 # should not disable features. This allows the developer to override
137 # features through the command line.
139 if test "x$enable_profile" = "xCOMMON"; then
140 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
141 PKG_CHECK_MODULES(HAPTIC, haptic)
144 if test "x$enable_profile" = "xMOBILE"; then
145 PKG_CHECK_MODULES(OPENGLES20, opengl-es-20)
146 PKG_CHECK_MODULES(DEVICED, deviced)
150 if test "x$enable_profile" = "xLITE"; then
151 PKG_CHECK_MODULES(OPENGLES20, gles20)
154 if test "x$enable_profile" = "xWEARABLE"; then
155 PKG_CHECK_MODULES(OPENGLES20, gles20)
158 if test "x$enable_profile" = "xTV"; then
159 PKG_CHECK_MODULES(OPENGLES20, gles20)
160 PKG_CHECK_MODULES(HAPTIC, haptic)
163 if test "x$enable_profile" = "xUBUNTU"; then
164 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
166 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
167 PKG_CHECK_MODULES(DLOG, dlog)
168 PKG_CHECK_MODULES(FEEDBACK, feedback)
169 PKG_CHECK_MODULES(MMFSOUND, mm-sound)
170 PKG_CHECK_MODULES(SENSOR, sensor)
171 PKG_CHECK_MODULES(TTS, tts)
172 PKG_CHECK_MODULES(VCONF, vconf)
173 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
175 if test "x$enable_profile" != "xTV"; then
176 PKG_CHECK_MODULES(EFL_ASSIST, efl-assist)
181 if test "x$enable_wayland" = "xyes"; then
182 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
183 [DALI_HAS_ECOREWL=yes],
184 [DALI_HAS_ECOREWL=no])
186 PKG_CHECK_MODULES(ECORE_X, [ecore-x],
187 [DALI_HAS_ECOREX=yes],
188 [DALI_HAS_ECOREX=no])
189 PKG_CHECK_MODULES(X11, [x11],
194 if test "x$enable_assimp" = "xyes" ; then
195 PKG_CHECK_MODULES(ASSIMP, assimp)
196 ASSIMP_CFLAGS+=-DASSIMP_ENABLED
199 # Don't move this - it depends on the platform defaults above
200 AM_CONDITIONAL([ASSIMP_ENABLED], [test x$enable_assimp = xyes])
203 if test x$DALI_DATA_RW_DIR != x; then
204 dataReadWriteDir=$DALI_DATA_RW_DIR
206 dataReadWriteDir=${prefix}/share/dali/
209 if test x$DALI_DATA_RO_DIR != x; then
210 dataReadOnlyDir=$DALI_DATA_RO_DIR
212 dataReadOnlyDir=${prefix}/share/dali/
215 if test x$FONT_PRELOADED_PATH != x; then
216 fontPreloadedPath=$FONT_PRELOADED_PATH
218 fontPreloadedPath=/usr/share/fonts/
221 if test x$FONT_DOWNLOADED_PATH != x; then
222 fontDownloadedPath=$FONT_DOWNLOADED_PATH
224 fontDownloadedPath=/opt/share/fonts/
227 if test x$FONT_APPLICATION_PATH != x; then
228 fontApplicationPath=$FONT_APPLICATION_PATH
230 fontApplicationPath=~/.fonts/
233 if test x$FONT_CONFIGURATION_FILE != x; then
234 fontConfigurationFilePath=$FONT_CONFIGURATION_FILE
237 AC_SUBST(dataReadWriteDir)
238 AC_SUBST(dataReadOnlyDir)
239 AC_SUBST(fontPreloadedPath)
240 AC_SUBST(fontDownloadedPath)
241 AC_SUBST(fontApplicationPath)
242 AC_SUBST(fontConfigurationFilePath)
243 AC_SUBST(DALI_ADAPTOR_CFLAGS)
244 AC_SUBST(DALI_PROFILE_CFLAGS)
246 # Specify the include directory for development headers
247 #devincludepath=${includedir}/dali/internal
248 devincludepath=${includedir}
249 AC_SUBST(devincludepath)
257 if test "x$enable_profile" != "xLITE"; then
270 Debug Build: $enable_debug
271 Compile flags $DALI_ADAPTOR_CFLAGS
272 Using Assimp Library: $enable_assimp
273 Using JPEG Turbo Library: $with_jpeg_turbo
274 Profile: $enable_profile
275 Data Dir (Read/Write): $dataReadWriteDir
276 Data Dir (Read Only): $dataReadOnlyDir
277 Font Path (Preloaded): $fontPreloadedPath
278 Font Path (Downloaded): $fontDownloadedPath
279 Font Path (Application): $fontApplicationPath
280 Font Configuration File: $fontConfigurationFilePath