2 # Copyright (c) 2019 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])
24 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
28 DALI_TOOLKIT_VERSION=dali_version
29 AC_SUBST(DALI_TOOLKIT_VERSION)
32 DALI_TOOLKIT_CFLAGS=-DPLATFORM_TIZEN
34 AC_ARG_ENABLE(exportall,
35 [AC_HELP_STRING([--enable-exportall],
36 [enables the exporting of all the symbols in the library])],
37 [enable_exportall=yes],
38 [enable_exportall=no])
40 AC_ARG_ENABLE([debug],
41 [AC_HELP_STRING([--enable-debug],
42 [Turns on debugging])],
43 [enable_debug=$enableval],
47 [AC_HELP_STRING([--enable-i18n],
48 [Turns on internationalisation])],
49 [enable_i18n=$enableval],
52 # option to build JavaScript plugin
53 # configure settings and output
54 # --enable-javascript // enable_javascript = yes
55 # --enable-javascript=yes // enable_javascript = yes
56 # --enable-javascript=no // enable_javascript = no
57 # --disable-javascript // enable_javascript = no
58 # no setting // enable_javascript = automatic ( enable if v8 present)
59 AC_ARG_ENABLE([javascript],
60 [AC_HELP_STRING([--enable-javascript],
61 [Enable JavaScript plugin])],
62 [enable_javascript=$enableval],
63 [enable_javascript=automatic])
65 # option to build C# plugin
66 # configure settings and output
67 # --enable-csharp // enable_csharp = yes
68 # --enable-csharp=yes // enable_csharp = yes
69 # --enable-csharp=no // enable_csharp = no
70 # no setting // enable_csharp = no
71 AC_ARG_ENABLE([csharp],
72 [AC_HELP_STRING([--enable-csharp],
73 [Enable csharp plugin])],
74 [enable_csharp=$enableval],
75 [enable_csharp=automatic])
77 AC_ARG_ENABLE([rename_so],
78 [AC_HELP_STRING([--enable-rename-so],
79 [Specify whether so file is renamed or not])],
80 [enable_rename_so=$enableval],
81 [enable_rename_so=yes])
83 AM_CONDITIONAL([ENABLE_RENAME_SO], [test x$enable_rename_so = xyes])
85 if test "x$enable_debug" = "xyes"; then
86 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED"
89 if test "x$enable_trace" = "xyes"; then
90 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DTRACE_ENABLED"
93 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
94 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
97 if test "x$enable_i18n" = "xyes"; then
98 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDGETTEXT_ENABLED "
101 # Tizen Profile options
102 AC_ARG_ENABLE([profile],
103 [AC_HELP_STRING([--enable-profile=UBUNTU,TIZEN],
104 [Select the variant of tizen])],
105 [dali_profile=$enableval],
106 [dali_profile=UBUNTU])
110 [AC_HELP_STRING([--with-style],
111 [Select the style folder to use])],
112 [dali_style=$withval],
113 [dali_style=480x800])
115 # Ensure valid profile selected
116 if test "x$dali_profile" != "xUBUNTU" -a "x$dali_profile" != "xTIZEN"; then
117 AC_MSG_ERROR([$enable_profile is an invalid profile])
120 if test x$DALI_DATA_RW_DIR != x; then
121 dataReadWriteDir=${DALI_DATA_RW_DIR}/
123 dataReadWriteDir=${prefix}/share/dali/
126 if test x$DALI_DATA_RO_DIR != x; then
127 dataReadOnlyDir=${DALI_DATA_RO_DIR}/
129 dataReadOnlyDir=${prefix}/share/dali/
132 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDALI_PROFILE_${dali_profile}"
135 STYLE_BASE_DIR=../../../dali-toolkit/styles
136 STYLE_DIR=$STYLE_BASE_DIR/$dali_style
138 AC_SUBST(STYLE_BASE_DIR)
141 # v8 version 4+ requires c++11
142 PKG_CHECK_MODULES(V8, v8 = 3.32.7, [ pkg_check_v8=yes ], [ pkg_check_v8=no ] )
144 # Rules for building JavaScript plugin
145 # If enable_javascript=yes and v8 installed = build javascript
146 # If enable_javascript=automatic and v8 installed = build javascript
147 # If enable_javascript=yes and v8 not installed = throw an error
148 build_javascript_plugin=no
149 if test x$enable_javascript = xyes; then
150 if test x$pkg_check_v8 = xno; then
151 [build_javascript_plugin=no]
152 AC_MSG_ERROR("V8 not found or incorrect version installed")
153 AC_MSG_NOTICE("To disable building of JavaScript plugin use --disable-javascript")
155 [build_javascript_plugin=yes]
156 AC_MSG_NOTICE(V8 library found. Building DALi JavaScript plugin)
159 if test x$enable_javascript = xautomatic && test x$pkg_check_v8 = xyes; then
160 [build_javascript_plugin=yes]
161 AC_MSG_NOTICE( V8 library found. Automatic building of JavaScript plugin. Use use --disable-javascript to disable)
165 #set a variable for the makefile to force compile the JAvaSplugin
166 AM_CONDITIONAL([ENABLE_JAVASCRIPT_PLUGIN], [test x$build_javascript_plugin = xyes])
168 # Platforms with highp shader support can use vector based text
169 AM_CONDITIONAL([ENABLE_VECTOR_BASED_TEXT_RENDERING], [test x$dali_profile = xUBUNTU])
171 AC_SUBST(dataReadWriteDir)
172 AC_SUBST(dataReadOnlyDir)
173 AC_SUBST(DALI_TOOLKIT_CFLAGS)
176 # Specify the include directory for development headers
177 #devincludepath=${includedir}/dali/internal
178 devincludepath=${includedir}
179 AC_SUBST(devincludepath)
182 DOXYGEN_DOCS_DIR=../../../docs
183 DOXYGEN_ROOT_DIR=../../..
184 AC_SUBST(DOXYGEN_DOCS_DIR)
185 AC_SUBST(DOXYGEN_ROOT_DIR)
187 PKG_CHECK_MODULES(DALICORE, dali-core)
188 PKG_CHECK_MODULES(DALIADAPTOR, dali-adaptor)
190 # Enable csharp plugin
191 build_csharp_plugin=no
193 if test x$enable_csharp = xyes; then
194 [build_csharp_plugin=yes]
195 AC_MSG_NOTICE(Building DALi csharp plugin ...)
196 AC_PATH_PROG([SWIG], [swig])
198 # if gbs enable, then only use swig, without ruby or mcs
199 if test "x$dali_profile" = "xUBUNTU"; then
200 [build_ruby_flag=yes]
201 AC_PATH_PROG([RUBY], [ruby])
202 AC_PATH_PROGS([MCS], [mcs gmcs gmcs2])
203 AC_MSG_NOTICE(swig ruby mcs working ...)
206 AC_PATH_PROG([RUBY], [ruby])
207 #AC_PATH_PROGS([MCS], [mcs gmcs gmcs2])
208 #AC_MSG_NOTICE(swig only working ...)
211 # Set varaibles for dali-toolkit
212 DALITOOLKIT_CFLAGS="-I${prefix}/include -I${prefix}/include/dali-toolkit"
213 DALITOOLKIT_LIBS="-L${prefix}/lib -ldali-toolkit -ldali-core"
214 AC_SUBST(DALITOOLKIT_CFLAGS)
215 AC_SUBST(DALITOOLKIT_LIBS)
218 #set a variable for the makefile to force compile the csharp plugin
219 AM_CONDITIONAL([ENABLE_CSHARP_PLUGIN], [test x$build_csharp_plugin = xyes])
220 AM_CONDITIONAL([ENABLE_RUBY_FLAG], [test x$build_ruby_flag = xyes])
224 dali-toolkit/Makefile
225 plugins/javascript/Makefile
226 plugins/csharp/Makefile
229 docs-internal/dali-internal.doxy
230 ../../automated-tests/CMakeLists.txt
240 Debug Build: $enable_debug
241 Trace Build: $enable_trace
242 JavaScript support (V8 required) $build_javascript_plugin
243 CSharp support $build_csharp_plugin
244 Profile: $dali_profile
245 Data Dir (Read/Write): $dataReadWriteDir
246 Data Dir (Read Only): $dataReadOnlyDir
247 Style Dir: $STYLE_DIR