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)
48 PKG_CHECK_MODULES(HARFBUZZ, harfbuzz)
49 PKG_CHECK_MODULES(FRIBIDI, fribidi)
51 # Check for availability of BulletPhysics
52 PKG_CHECK_EXISTS(bullet, [
53 BULLET_CFLAGS=`pkg-config --cflags bullet`
54 BULLET_LIBS=`pkg-config --libs bullet`
57 AC_MSG_WARN([BulletPhysics development files not found, not building bullet plugin])
63 AC_SUBST(BULLET_CFLAGS)
66 AC_ARG_ENABLE([bullet],
67 [AC_HELP_STRING([ --enable-bullet],
68 [Enable bullet plugin])],
73 AC_ARG_ENABLE([feedback],
74 [AC_HELP_STRING([ --enable-feedback],
75 [Enable feedback plugin])],
76 [enable_feedback=yes],
79 AM_CONDITIONAL([USE_BULLET], [test x$BULLET = xyes && test x$enable_bullet = xyes])
80 AM_CONDITIONAL([USE_FEEDBACK], [test x$enable_feedback = xyes])
82 DALI_ADAPTOR_CFLAGS=-DPLATFORM_TIZEN
84 AC_ARG_ENABLE(exportall,
85 [AC_HELP_STRING([--enable-exportall],
86 [enables the exporting of all the symbols in the library])],
87 [enable_exportall=yes],
88 [enable_exportall=no])
90 AC_ARG_ENABLE([debug],
91 [AC_HELP_STRING([--enable-debug],
92 [Turns on debugging])],
93 [enable_debug=$enableval],
96 AC_ARG_ENABLE(shaderbincache,
97 [AC_HELP_STRING([--enable-shaderbincache],
98 [enables shader binary cache])],
99 [enable_shaderbincache=$enableval],
100 [enable_shaderbincache=DISABLE])
102 if test "x$enable_debug" = "xyes"; then
103 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED"
106 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
107 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
110 if test "x$enable_shaderbincache" = "xENABLE"; then
111 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DSHADERBIN_CACHE_ENABLED"
114 AC_ARG_ENABLE([assimp],
115 [AC_HELP_STRING([--enable-assimp],
116 [Enable assimp plugin, overriding platform defaults])],
120 AC_ARG_ENABLE([gles],
121 [AC_HELP_STRING([--enable-gles],
122 [Specify the OpenGL ES version for backwards compatibility])],
123 [enable_gles=$enableval],
126 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
128 AC_ARG_WITH([jpeg-turbo],
129 [AC_HELP_STRING([--with-jpeg-turbo],
130 [Use the JPEG Turbo library])],
131 [with_jpeg_turbo=$withval],
132 [with_jpeg_turbo=yes])
134 AM_CONDITIONAL(TURBO_JPEG_IS_ON, test $with_jpeg_turbo = yes)
136 AC_ARG_WITH([over-tizen_2_2],
137 [AC_HELP_STRING([--with-over-tizen_2_2],
138 [Use tizen API over ver. 2.2])],
139 [with_over_tizen_2_2=yes],
140 [with_over_tizen_2_2=no])
142 # Tizen Profile options
143 AC_ARG_ENABLE([profile],
144 [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,WEARABLE,TV,UBUNTU],
145 [Select the variant of tizen])],
146 [enable_profile=$enableval],
147 [enable_profile=COMMON])
149 # Ensure valid profile selected
150 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
151 AC_MSG_ERROR([$enable_profile is an invalid profile])
154 AC_ARG_ENABLE(wayland,
155 [ --enable-wayland Build on Wayland],
159 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
160 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
161 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
162 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
163 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
164 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
165 AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
166 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
168 # Platforms should either enable features or remove them, they
169 # should not disable features. This allows the developer to override
170 # features through the command line.
172 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
174 if test "x$enable_profile" != "xUBUNTU"; then
175 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
176 PKG_CHECK_MODULES(DLOG, dlog)
177 PKG_CHECK_MODULES(SENSOR, sensor)
178 PKG_CHECK_MODULES(TTS, tts)
179 PKG_CHECK_MODULES(VCONF, vconf)
180 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
182 if test "x$with_over_tizen_2_2" = "xyes"; then
183 PKG_CHECK_MODULES(CAPI_SYSTEM_INFO, capi-system-info)
186 fi # ubuntu profile test
188 if test "x$enable_wayland" = "xyes"; then
189 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
190 [DALI_HAS_ECOREWL=yes],
191 [DALI_HAS_ECOREWL=no])
193 PKG_CHECK_MODULES(ECORE_X, [ecore-x],
194 [DALI_HAS_ECOREX=yes],
195 [DALI_HAS_ECOREX=no])
196 PKG_CHECK_MODULES(X11, [x11],
201 if test "x$enable_feedback" = "xyes"; then
203 if test "x$enable_profile" = "xCOMMON" || test "x$enable_profile" = "xTV"; then
204 PKG_CHECK_MODULES(HAPTIC, haptic)
207 if test "x$enable_profile" = "xMOBILE"; then
208 PKG_CHECK_MODULES(DEVICED, deviced)
211 PKG_CHECK_MODULES(FEEDBACK, feedback)
212 PKG_CHECK_MODULES(MMFSOUND, mm-sound)
215 if test "x$enable_assimp" = "xyes" ; then
216 PKG_CHECK_MODULES(ASSIMP, assimp)
217 ASSIMP_CFLAGS+=-DASSIMP_ENABLED
220 # Don't move this - it depends on the platform defaults above
221 AM_CONDITIONAL([ASSIMP_ENABLED], [test x$enable_assimp = xyes])
223 if test x$DALI_DATA_RW_DIR != x; then
224 dataReadWriteDir=$DALI_DATA_RW_DIR
226 dataReadWriteDir=${prefix}/share/dali/
229 if test x$DALI_DATA_RO_DIR != x; then
230 dataReadOnlyDir=$DALI_DATA_RO_DIR
232 dataReadOnlyDir=${prefix}/share/dali/
235 AC_SUBST(dataReadWriteDir)
236 AC_SUBST(dataReadOnlyDir)
237 AC_SUBST(DALI_ADAPTOR_CFLAGS)
238 AC_SUBST(DALI_PROFILE_CFLAGS)
240 # Specify the include directory for development headers
241 #devincludepath=${includedir}/dali/internal
242 devincludepath=${includedir}
243 AC_SUBST(devincludepath)
249 adaptor/dali-adaptor-integration.pc
252 AM_CONDITIONAL([USE_PLUGIN], [test x$enable_feedback = xyes || test x$enable_bullet = xyes])
254 if test "x$enable_feedback" = "xyes" || test "x$enable_bullet" = "xyes"; then
267 Debug Build: $enable_debug
268 Compile flags $DALI_ADAPTOR_CFLAGS
269 Using Assimp Library: $enable_assimp
270 Using JPEG Turbo Library: $with_jpeg_turbo
271 Profile: $enable_profile
272 Data Dir (Read/Write): $dataReadWriteDir
273 Data Dir (Read Only): $dataReadOnlyDir
274 OVERTIZEN2.2: $with_over_tizen_2_2