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])
24 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
28 DALI_TOOLKIT_VERSION=dali_version
29 AC_SUBST(DALI_TOOLKIT_VERSION)
31 PKG_CHECK_MODULES(DALICORE, dali-core)
33 DALI_TOOLKIT_CFLAGS=-DPLATFORM_TIZEN
35 AC_ARG_ENABLE(exportall,
36 [AC_HELP_STRING([--enable-exportall],
37 [enables the exporting of all the symbols in the library])],
38 [enable_exportall=yes],
39 [enable_exportall=no])
41 AC_ARG_ENABLE([debug],
42 [AC_HELP_STRING([--enable-debug],
43 [Turns on debugging])],
44 [enable_debug=$enableval],
48 [AC_HELP_STRING([--enable-i18n],
49 [Turns on internationalisation])],
50 [enable_i18n=$enableval],
53 # option to build JavaScript plugin
54 # configure settings and output
55 # --enable-javascript // enable_javascript = yes
56 # --enable-javascript=yes // enable_javascript = yes
57 # --enable-javascript=no // enable_javascript = no
58 # --disable-javascript // enable_javascript = no
59 # no setting // enable_javascript = automatic ( enable if v8 present)
60 AC_ARG_ENABLE([javascript],
61 [AC_HELP_STRING([--enable-javascript],
62 [Enable JavaScript plugin])] ,
63 [enable_javascript=$enableval],
64 [enable_javascript=automatic])
67 if test "x$enable_debug" = "xyes"; then
68 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED"
71 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
72 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
75 if test "x$enable_i18n" = "xyes"; then
76 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDGETTEXT_ENABLED "
79 # Tizen Profile options
80 AC_ARG_ENABLE([profile],
81 [AC_HELP_STRING([--enable-profile=UBUNTU,MOBILE,WEARABLE,TV],
82 [Select the variant of tizen])],
83 [dali_profile=$enableval],
84 [dali_profile=UBUNTU])
88 [AC_HELP_STRING([--with-style],
89 [Select the style folder to use])],
90 [dali_style=$withval],
93 # Ensure valid profile selected
94 if test "x$dali_profile" != "xUBUNTU" -a "x$dali_profile" != "xMOBILE" -a "x$dali_profile" != "xWEARABLE" -a "x$dali_profile" != "xTV" ; then
95 AC_MSG_ERROR([$enable_profile is an invalid profile])
98 if test x$DALI_DATA_RW_DIR != x; then
99 dataReadWriteDir=${DALI_DATA_RW_DIR}/
101 dataReadWriteDir=${prefix}/share/dali/
104 if test x$DALI_DATA_RO_DIR != x; then
105 dataReadOnlyDir=${DALI_DATA_RO_DIR}/
107 dataReadOnlyDir=${prefix}/share/dali/
110 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDALI_PROFILE_${dali_profile}"
113 STYLE_DIR=../../../dali-toolkit/styles
114 STYLE_DIR=$STYLE_DIR/$dali_style
118 # v8 version 4+ requires c++11
119 PKG_CHECK_MODULES(V8, v8 = 3.32.7, [ pkg_check_v8=yes ], [ pkg_check_v8=no ] )
121 # Rules for building JavaScript plugin
122 # If enable_javascript=yes and v8 installed = build javascript
123 # If enable_javascript=automatic and v8 installed = build javascript
124 # If enable_javascript=yes and v8 not installed = throw an error
125 build_javascript_plugin=no
126 if test x$enable_javascript = xyes; then
127 if test x$pkg_check_v8 = xno; then
128 [build_javascript_plugin=no]
129 AC_MSG_ERROR("V8 not found or incorrect version installed")
130 AC_MSG_NOTICE("To disable building of JavaScript plugin use --disable-javascript")
132 [build_javascript_plugin=yes]
133 AC_MSG_NOTICE(V8 library found. Building DALi JavaScript plugin)
136 if test x$enable_javascript = xautomatic && test x$pkg_check_v8 = xyes; then
137 [build_javascript_plugin=yes]
138 AC_MSG_NOTICE( V8 library found. Automatic building of JavaScript plugin. Use use --disable-javascript to disable)
142 #set a variable for the makefile to force compile the JAvaSplugin
143 AM_CONDITIONAL([ENABLE_JAVASCRIPT_PLUGIN], [test x$build_javascript_plugin = xyes])
145 # Platforms with highp shader support can use vector based text
146 AM_CONDITIONAL([ENABLE_VECTOR_BASED_TEXT_RENDERING], [test x$dali_profile = xUBUNTU])
148 AC_SUBST(dataReadWriteDir)
149 AC_SUBST(dataReadOnlyDir)
150 AC_SUBST(DALI_TOOLKIT_CFLAGS)
153 # Specify the include directory for development headers
154 #devincludepath=${includedir}/dali/internal
155 devincludepath=${includedir}
156 AC_SUBST(devincludepath)
159 DOXYGEN_DOCS_DIR=../../../docs
160 DOXYGEN_ROOT_DIR=../../..
161 AC_SUBST(DOXYGEN_DOCS_DIR)
162 AC_SUBST(DOXYGEN_ROOT_DIR)
166 dali-toolkit/Makefile
171 docs-internal/dali-internal.doxy
172 ../../automated-tests/CMakeLists.txt
181 Debug Build: $enable_debug
182 JavaScript support (V8 required) $build_javascript_plugin
183 Profile: $dali_profile
184 Data Dir (Read/Write): $dataReadWriteDir
185 Data Dir (Read Only): $dataReadOnlyDir
186 Style Dir: $STYLE_DIR