(Build) Disable efl-assist for UBUNTU profile
[platform/core/uifw/dali-adaptor.git] / build / tizen / configure.ac
1 #
2 # Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 #
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
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15 #
16
17 m4_define([dali_version],[0.1.0])
18 AC_INIT([dali], [dali_version])
19 AM_INIT_AUTOMAKE([-Wall foreign])
20
21 AC_CONFIG_MACRO_DIR([m4])
22
23 AC_PROG_CXX
24 AC_PROG_LIBTOOL
25 AC_PROG_MKDIR_P
26
27 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
28
29 LT_INIT
30
31 DALI_ADAPTOR_VERSION=dali_version
32 AC_SUBST(DALI_ADAPTOR_VERSION)
33
34 FREETYPE_REQUIRED=9.16.3
35
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
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`
52   BULLET=yes
53 ], [
54   AC_MSG_WARN([BulletPhysics development files not found, not building bullet plugin])
55   BULLET_CFLAGS=
56   BULLET_LIBS=
57   BULLET=no
58 ])
59
60 AC_SUBST(BULLET_CFLAGS)
61 AC_SUBST(BULLET_LIBS)
62
63 AC_ARG_ENABLE([bullet],
64               [AC_HELP_STRING([ --enable-bullet],
65                               [Enable bullet plugin])],
66               [enable_bullet=yes],
67               [enable_bullet=no])
68
69
70 AC_ARG_ENABLE([feedback],
71               [AC_HELP_STRING([ --enable-feedback],
72                               [Enable feedback plugin])],
73               [enable_feedback=yes],
74               [enable_feedback=no])
75
76 AM_CONDITIONAL([USE_BULLET], [test x$BULLET = xyes && test x$enable_bullet = xyes])
77 AM_CONDITIONAL([USE_FEEDBACK], [test x$enable_feedback = xyes])
78
79 DALI_ADAPTOR_CFLAGS=-DPLATFORM_SLP
80
81 AC_ARG_ENABLE(exportall,
82               [AC_HELP_STRING([--enable-exportall],
83                               [enables the exporting of all the symbols in the library])],
84               [enable_exportall=yes],
85               [enable_exportall=no])
86
87 AC_ARG_ENABLE([debug],
88               [AC_HELP_STRING([--enable-debug],
89                               [Turns on debugging])],
90               [enable_debug=$enableval],
91               [enable_debug=no])
92
93 if test "x$enable_debug" = "xyes"; then
94   DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED"
95 fi
96
97 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
98   DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
99 fi
100
101 AC_ARG_ENABLE([assimp],
102               [AC_HELP_STRING([--enable-assimp],
103                               [Enable assimp plugin, overriding platform defaults])],
104               [enable_assimp=yes],
105               [enable_assimp=no])
106
107 AC_ARG_ENABLE([gles],
108               [AC_HELP_STRING([--enable-gles],
109                               [Specify the OpenGL ES version for backwards compatibility])],
110               [enable_gles=$enableval],
111               [enable_gles=30])
112
113 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
114
115 AC_ARG_WITH([jpeg-turbo],
116             [AC_HELP_STRING([--with-jpeg-turbo],
117                             [Use the JPEG Turbo library])],
118             [with_jpeg_turbo=$withval],
119             [with_jpeg_turbo=yes])
120
121 AM_CONDITIONAL(TURBO_JPEG_IS_ON, test $with_jpeg_turbo = yes)
122
123 # Tizen Profile options
124 AC_ARG_ENABLE([profile],
125               [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,LITE,WEARABLE,TV,UBUNTU],
126                             [Select the variant of tizen])],
127               [enable_profile=$enableval],
128               [enable_profile=COMMON])
129
130 # Ensure valid profile selected
131 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
132   AC_MSG_ERROR([$enable_profile is an invalid profile])
133 fi
134
135 AC_ARG_ENABLE(wayland,
136               [  --enable-wayland       Build on Wayland],
137               enable_wayland=yes,
138               enable_wayland=no)
139
140 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
141 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
142 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
143 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
144 AM_CONDITIONAL([LITE_PROFILE], [test x$enable_profile = xLITE])
145 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
146 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
147 AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
148 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
149
150 # Platforms should either enable features or remove them, they
151 # should not disable features. This allows the developer to override
152 # features through the command line.
153
154 if test "x$enable_profile" = "xCOMMON"; then
155 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
156 fi
157
158 if test "x$enable_profile" = "xMOBILE"; then
159 PKG_CHECK_MODULES(OPENGLES20, opengl-es-20)
160 fi
161
162 if test "x$enable_profile" = "xLITE"; then
163 PKG_CHECK_MODULES(OPENGLES20, gles20)
164 fi
165
166 if test "x$enable_profile" = "xWEARABLE"; then
167 PKG_CHECK_MODULES(OPENGLES20, gles20)
168 fi
169
170 if test "x$enable_profile" = "xTV"; then
171 PKG_CHECK_MODULES(OPENGLES20, gles20)
172 fi
173
174 if test "x$enable_profile" = "xUBUNTU"; then
175 PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
176 else
177 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
178 PKG_CHECK_MODULES(DLOG, dlog)
179 PKG_CHECK_MODULES(SENSOR, sensor)
180 PKG_CHECK_MODULES(TTS, tts)
181 PKG_CHECK_MODULES(VCONF, vconf)
182 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
183 fi
184
185 if test "x$enable_profile" != "xTV" && test "x$enable_profile" != "xUBUNTU"; then
186 PKG_CHECK_MODULES(EFL_ASSIST, efl-assist)
187 fi
188
189 if test "x$enable_wayland" = "xyes"; then
190 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
191                   [DALI_HAS_ECOREWL=yes],
192                   [DALI_HAS_ECOREWL=no])
193 else
194 PKG_CHECK_MODULES(ECORE_X, [ecore-x],
195                   [DALI_HAS_ECOREX=yes],
196                   [DALI_HAS_ECOREX=no])
197 PKG_CHECK_MODULES(X11, [x11],
198                   [DALI_HAS_X11=yes],
199                   [DALI_HAS_X11=no])
200 fi
201
202 if test "x$enable_feedback" = "xyes"; then
203
204 if test "x$enable_profile" = "xCOMMON" || test "x$enable_profile" = "xTV"; then
205 PKG_CHECK_MODULES(HAPTIC, haptic)
206 fi
207
208 if test "x$enable_profile" = "xMOBILE"; then
209 PKG_CHECK_MODULES(DEVICED, deviced)
210 fi
211
212 PKG_CHECK_MODULES(FEEDBACK, feedback)
213 PKG_CHECK_MODULES(MMFSOUND, mm-sound)
214 fi
215
216 if test "x$enable_assimp" = "xyes" ; then
217   PKG_CHECK_MODULES(ASSIMP, assimp)
218   ASSIMP_CFLAGS+=-DASSIMP_ENABLED
219 fi
220
221 # Don't move this - it depends on the platform defaults above
222 AM_CONDITIONAL([ASSIMP_ENABLED], [test x$enable_assimp = xyes])
223
224 if test x$DALI_DATA_RW_DIR != x; then
225   dataReadWriteDir=$DALI_DATA_RW_DIR
226 else
227   dataReadWriteDir=${prefix}/share/dali/
228 fi
229
230 if test x$DALI_DATA_RO_DIR != x; then
231   dataReadOnlyDir=$DALI_DATA_RO_DIR
232 else
233   dataReadOnlyDir=${prefix}/share/dali/
234 fi
235
236 if test x$FONT_PRELOADED_PATH != x; then
237   fontPreloadedPath=$FONT_PRELOADED_PATH
238 else
239   fontPreloadedPath=/usr/share/fonts/
240 fi
241
242 if test x$FONT_DOWNLOADED_PATH != x; then
243   fontDownloadedPath=$FONT_DOWNLOADED_PATH
244 else
245   fontDownloadedPath=/opt/share/fonts/
246 fi
247
248 if test x$FONT_APPLICATION_PATH != x; then
249   fontApplicationPath=$FONT_APPLICATION_PATH
250 else
251   fontApplicationPath=~/.fonts/
252 fi
253
254 if test x$FONT_CONFIGURATION_FILE != x; then
255   fontConfigurationFilePath=$FONT_CONFIGURATION_FILE
256 fi
257
258 AC_SUBST(dataReadWriteDir)
259 AC_SUBST(dataReadOnlyDir)
260 AC_SUBST(fontPreloadedPath)
261 AC_SUBST(fontDownloadedPath)
262 AC_SUBST(fontApplicationPath)
263 AC_SUBST(fontConfigurationFilePath)
264 AC_SUBST(DALI_ADAPTOR_CFLAGS)
265 AC_SUBST(DALI_PROFILE_CFLAGS)
266
267 # Specify the include directory for development headers
268 #devincludepath=${includedir}/dali/internal
269 devincludepath=${includedir}
270 AC_SUBST(devincludepath)
271
272 AC_CONFIG_FILES([
273  Makefile
274  adaptor/Makefile
275  dali.pc
276 ])
277
278 AM_CONDITIONAL([USE_PLUGIN], [test x$enable_feedback = xyes || test x$enable_bullet = xyes])
279
280 if test "x$enable_feedback" = "xyes" || test "x$enable_bullet" = "xyes"; then
281 AC_CONFIG_FILES([
282  plugins/Makefile
283 ])
284 fi
285
286 AC_OUTPUT
287
288
289 echo "
290 Configuration
291 -------------
292   Prefix:                           $prefix
293   Debug Build:                      $enable_debug
294   Compile flags                     $DALI_ADAPTOR_CFLAGS
295   Using Assimp Library:             $enable_assimp
296   Using JPEG Turbo Library:         $with_jpeg_turbo
297   Profile:                          $enable_profile
298   Data Dir (Read/Write):            $dataReadWriteDir
299   Data Dir (Read Only):             $dataReadOnlyDir
300   Font Path (Preloaded):            $fontPreloadedPath
301   Font Path (Downloaded):           $fontDownloadedPath
302   Font Path (Application):          $fontApplicationPath
303   Font Configuration File:          $fontConfigurationFilePath
304 "