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
35 # 17.1.11 = Freetype version 2.5.2
36 FREETYPE_BITMAP_SUPPORT_VERSION=17.1.11
38 PKG_CHECK_MODULES(DALICORE, dali-core)
39 PKG_CHECK_MODULES(ELEMENTARY, elementary)
40 PKG_CHECK_MODULES(ECORE, ecore)
41 PKG_CHECK_MODULES(ECORE_IPC, ecore-ipc)
42 PKG_CHECK_MODULES(EXIF, libexif)
43 PKG_CHECK_MODULES(FREETYPE, [freetype2 >= $FREETYPE_REQUIRED])
44 PKG_CHECK_MODULES(FREETYPE_BITMAP_SUPPORT, [freetype2 >= $FREETYPE_BITMAP_SUPPORT_VERSION], [ freetype_bitmap_support=yes ], [ freetype_bitmap_support=no ] )
45 PKG_CHECK_MODULES(FONTCONFIG, fontconfig)
46 PKG_CHECK_MODULES(PNG, libpng)
47 PKG_CHECK_MODULES(XML, libxml-2.0)
48 PKG_CHECK_MODULES(LIBEXIF, libexif)
49 PKG_CHECK_MODULES(LIBDRM, libdrm)
50 PKG_CHECK_MODULES(LIBCURL, libcurl)
51 PKG_CHECK_MODULES(HARFBUZZ, harfbuzz)
52 PKG_CHECK_MODULES(FRIBIDI, fribidi)
53 PKG_CHECK_MODULES(TTRACE, ttrace, AC_DEFINE(ENABLE_TTRACE, 1, [ttrace available]),
54 [ AC_MSG_NOTICE([Tizen Trace not avaiable]) ]
58 # Check for availability of BulletPhysics
59 PKG_CHECK_EXISTS(bullet, [
60 BULLET_CFLAGS=`pkg-config --cflags bullet`
61 BULLET_LIBS=`pkg-config --libs bullet`
64 AC_MSG_WARN([BulletPhysics development files not found, not building bullet plugin])
70 AC_SUBST(BULLET_CFLAGS)
73 AC_ARG_ENABLE([bullet],
74 [AC_HELP_STRING([ --enable-bullet],
75 [Enable bullet plugin])],
80 AC_ARG_ENABLE([feedback],
81 [AC_HELP_STRING([ --enable-feedback],
82 [Enable feedback plugin])],
83 [enable_feedback=yes],
86 AM_CONDITIONAL([USE_BULLET], [test x$BULLET = xyes && test x$enable_bullet = xyes])
87 AM_CONDITIONAL([USE_FEEDBACK], [test x$enable_feedback = xyes])
89 DALI_ADAPTOR_CFLAGS=-DPLATFORM_TIZEN
91 AC_ARG_ENABLE(exportall,
92 [AC_HELP_STRING([--enable-exportall],
93 [enables the exporting of all the symbols in the library])],
94 [enable_exportall=yes],
95 [enable_exportall=no])
97 AC_ARG_ENABLE([debug],
98 [AC_HELP_STRING([--enable-debug],
99 [Turns on debugging])],
100 [enable_debug=$enableval],
103 AC_ARG_ENABLE(shaderbincache,
104 [AC_HELP_STRING([--enable-shaderbincache],
105 [enables shader binary cache])],
106 [enable_shaderbincache=$enableval],
107 [enable_shaderbincache=DISABLE])
109 if test "x$enable_debug" = "xyes"; then
110 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED"
113 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
114 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
117 if test "x$enable_shaderbincache" = "xENABLE"; then
118 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DSHADERBIN_CACHE_ENABLED"
121 AC_ARG_ENABLE([gles],
122 [AC_HELP_STRING([--enable-gles],
123 [Specify the OpenGL ES version for backwards compatibility])],
124 [enable_gles=$enableval],
127 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
129 AC_ARG_WITH([over-tizen_2_2],
130 [AC_HELP_STRING([--with-over-tizen_2_2],
131 [Use tizen API over ver. 2.2])],
132 [with_over_tizen_2_2=yes],
133 [with_over_tizen_2_2=no])
135 # Tizen Profile options
136 AC_ARG_ENABLE([profile],
137 [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,WEARABLE,TV,UBUNTU],
138 [Select the variant of tizen])],
139 [enable_profile=$enableval],
140 [enable_profile=COMMON])
142 # Ensure valid profile selected
143 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
144 AC_MSG_ERROR([$enable_profile is an invalid profile])
147 AC_ARG_ENABLE(wayland,
148 [ --enable-wayland Build on Wayland],
152 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
153 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
154 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
155 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
156 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
157 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
158 AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
159 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
161 # Platforms should either enable features or remove them, they
162 # should not disable features. This allows the developer to override
163 # features through the command line.
165 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
167 if test "x$enable_profile" != "xUBUNTU"; then
168 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
169 PKG_CHECK_MODULES(DLOG, dlog)
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$with_over_tizen_2_2" = "xyes"; then
176 PKG_CHECK_MODULES(CAPI_SYSTEM_INFO, capi-system-info)
179 fi # ubuntu profile test
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_feedback" = "xyes"; then
196 if test "x$enable_profile" = "xCOMMON" || test "x$enable_profile" = "xTV"; then
197 PKG_CHECK_MODULES(HAPTIC, haptic)
200 if test "x$enable_profile" = "xMOBILE"; then
201 PKG_CHECK_MODULES(DEVICED, deviced)
204 PKG_CHECK_MODULES(FEEDBACK, feedback)
205 PKG_CHECK_MODULES(MMFSOUND, mm-sound)
208 if test x$DALI_DATA_RW_DIR != x; then
209 dataReadWriteDir=$DALI_DATA_RW_DIR
211 dataReadWriteDir=${prefix}/share/dali/
214 if test x$DALI_DATA_RO_DIR != x; then
215 dataReadOnlyDir=$DALI_DATA_RO_DIR
217 dataReadOnlyDir=${prefix}/share/dali/
220 AC_SUBST(dataReadWriteDir)
221 AC_SUBST(dataReadOnlyDir)
222 AC_SUBST(DALI_ADAPTOR_CFLAGS)
223 AC_SUBST(DALI_PROFILE_CFLAGS)
225 # Specify the include directory for development headers
226 #devincludepath=${includedir}/dali/internal
227 devincludepath=${includedir}
228 AC_SUBST(devincludepath)
234 adaptor/dali-adaptor-integration.pc
237 AM_CONDITIONAL([USE_PLUGIN], [test x$enable_feedback = xyes || test x$enable_bullet = xyes])
239 if test "x$enable_feedback" = "xyes" || test "x$enable_bullet" = "xyes"; then
245 if test "x$freetype_bitmap_support" = "xyes"; then
246 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DFREETYPE_BITMAP_SUPPORT"
256 Debug Build: $enable_debug
257 Compile flags $DALI_ADAPTOR_CFLAGS
258 Freetype bitmap support (Emoji): $freetype_bitmap_support
259 Profile: $enable_profile
260 Data Dir (Read/Write): $dataReadWriteDir
261 Data Dir (Read Only): $dataReadOnlyDir
262 OVERTIZEN2.2: $with_over_tizen_2_2