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)
32 PKG_CHECK_MODULES(DALI, dali)
34 DALI_TOOLKIT_CFLAGS=-DPLATFORM_TIZEN
36 AC_ARG_ENABLE(exportall,
37 [AC_HELP_STRING([--enable-exportall],
38 [enables the exporting of all the symbols in the library])],
39 [enable_exportall=yes],
40 [enable_exportall=no])
42 AC_ARG_ENABLE([debug],
43 [AC_HELP_STRING([--enable-debug],
44 [Turns on debugging])],
45 [enable_debug=$enableval],
48 # option to build JavaScript plugin
49 # configure settings and output
50 # --enable-javascript // enable_javascript = yes
51 # --enable-javascript=yes // enable_javascript = yes
52 # --enable-javascript=no // enable_javascript = no
53 # --disable-javascript // enable_javascript = no
54 # no setting // enable_javascript = automatic ( enable if v8 present)
55 AC_ARG_ENABLE([javascript],
56 [AC_HELP_STRING([--enable-javascript],
57 [Enable JavaScript plugin])] ,
58 [enable_javascript=$enableval],
59 [enable_javascript=automatic])
62 if test "x$enable_debug" = "xyes"; then
63 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED"
66 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
67 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
73 # Tizen Profile options
74 AC_ARG_ENABLE([profile],
75 [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,WEARABLE,TV],
76 [Select the variant of tizen])],
77 [dali_profile=$enableval],
78 [dali_profile=COMMON])
80 if test x$DALI_DATA_RW_DIR != x; then
81 dataReadWriteDir=${DALI_DATA_RW_DIR}/
83 dataReadWriteDir=${prefix}/share/dali/
86 if test x$DALI_DATA_RO_DIR != x; then
87 dataReadOnlyDir=${DALI_DATA_RO_DIR}/
89 dataReadOnlyDir=${prefix}/share/dali/
92 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDALI_PROFILE_${enable_profile}"
93 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
94 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
96 # v8 version 4+ requires c++11
97 PKG_CHECK_MODULES(V8, v8 = 3.32.7, [ pkg_check_v8=yes ], [ pkg_check_v8=no ] )
99 # Rules for building JavaScript plugin
100 # If enable_javascript=yes and v8 installed = build javascript
101 # If enable_javascript=automatic and v8 installed = build javascript
102 # If enable_javascript=yes and v8 not installed = throw an error
103 build_javascript_plugin=no
104 if test x$enable_javascript = xyes; then
105 if test x$pkg_check_v8 = xno; then
106 [build_javascript_plugin=no]
107 AC_MSG_ERROR("V8 not found or incorrect version installed")
108 AC_MSG_NOTICE("To disable building of JavaScript plugin use --disable-javascript")
110 [build_javascript_plugin=yes]
111 AC_MSG_NOTICE(V8 library found. Building DALi JavaScript plugin)
114 if test x$enable_javascript = xautomatic && test x$pkg_check_v8 = xyes; then
115 [build_javascript_plugin=yes]
116 AC_MSG_NOTICE( V8 library found. Automatic building of JavaScript plugin. Use use --disable-javascript to disable)
120 #set a variable for the makefile to force compile the JAvaSplugin
121 AM_CONDITIONAL([ENABLE_JAVASCRIPT_PLUGIN], [test x$build_javascript_plugin = xyes])
123 AC_SUBST(dataReadWriteDir)
124 AC_SUBST(dataReadOnlyDir)
125 AC_SUBST(DALI_TOOLKIT_CFLAGS)
128 # Specify the include directory for development headers
129 #devincludepath=${includedir}/dali/internal
130 devincludepath=${includedir}
131 AC_SUBST(devincludepath)
134 DOXYGEN_DOCS_DIR=../../../docs
135 DOXYGEN_ROOT_DIR=../../..
136 AC_SUBST(DOXYGEN_DOCS_DIR)
137 AC_SUBST(DOXYGEN_ROOT_DIR)
141 dali-toolkit/Makefile
154 Debug Build: $enable_debug
155 JavaScript support (V8 required) $build_javascript_plugin
156 Profile: $dali_profile
157 Data Dir (Read/Write): $dataReadWriteDir
158 Data Dir (Read Only): $dataReadOnlyDir