Merge "Refactoring Button: remove painter" into tizen
[platform/core/uifw/dali-toolkit.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_PROG_CXX
22 AC_PROG_LIBTOOL
23
24 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
25
26 LT_INIT
27
28 DALI_TOOLKIT_VERSION=dali_version
29 AC_SUBST(DALI_TOOLKIT_VERSION)
30
31 PKG_CHECK_MODULES(DALICORE, dali-core)
32 PKG_CHECK_MODULES(DALI, dali)
33 PKG_CHECK_MODULES(FRIBIDI, fribidi)
34
35 DALI_TOOLKIT_CFLAGS=-DPLATFORM_TIZEN
36
37 AC_ARG_ENABLE(exportall,
38               [AC_HELP_STRING([--enable-exportall],
39                               [enables the exporting of all the symbols in the library])],
40               [enable_exportall=yes],
41               [enable_exportall=no])
42
43 AC_ARG_ENABLE([debug],
44               [AC_HELP_STRING([--enable-debug],
45                               [Turns on debugging])],
46               [enable_debug=$enableval],
47               [enable_debug=no])
48
49 # option for JavaScript plugin
50 AC_ARG_ENABLE(javascript,
51               [AC_HELP_STRING([--enable-javascript],
52                               [Enable JavaScript plugin])] ,
53                [enable_javascript=yes],
54                [enable_javascript=no])
55
56 if test "x$enable_debug" = "xyes"; then
57   DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED"
58   DALI_SCRIPTV8_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED"
59 fi
60
61 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
62   DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
63   DALI_SCRIPTV8_CFLAGS="$DALI_TOOLKIT_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
64 fi
65
66 #set a variable for the makefile to conditionally compile the plugin
67 AM_CONDITIONAL([ENABLE_JAVASCRIPT_PLUGIN], [test x$enable_javascript = xyes])
68
69
70 # Tizen Profile options
71 AC_ARG_ENABLE([profile],
72               [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,LITE,WEARABLE,TV],
73                             [Select the variant of tizen])],
74               [dali_profile=$enableval],
75               [dali_profile=COMMON])
76
77 if test x$DALI_DATA_RW_DIR != x; then
78   dataReadWriteDir=${DALI_DATA_RW_DIR}/
79 else
80   dataReadWriteDir=${prefix}/share/dali/
81 fi
82
83 if test x$DALI_DATA_RO_DIR != x; then
84   dataReadOnlyDir=${DALI_DATA_RO_DIR}/
85 else
86   dataReadOnlyDir=${prefix}/share/dali/
87 fi
88
89 AC_SUBST(dataReadWriteDir)
90 AC_SUBST(dataReadOnlyDir)
91 AC_SUBST(DALI_TOOLKIT_CFLAGS)
92 AC_SUBST(DALI_SCRIPTV8_CFLAGS)
93 AC_SUBST(DALI_SCRIPTV8_LIBS)
94
95 # Specify the include directory for development headers
96 #devincludepath=${includedir}/dali/internal
97 devincludepath=${includedir}
98 AC_SUBST(devincludepath)
99
100 # Doxygen paths
101 DOXYGEN_DOCS_DIR=../../../docs
102 DOXYGEN_ROOT_DIR=../../..
103 AC_SUBST(DOXYGEN_DOCS_DIR)
104 AC_SUBST(DOXYGEN_ROOT_DIR)
105
106 AC_CONFIG_FILES([
107  Makefile
108  dali-toolkit/Makefile
109  plugins/Makefile
110  dali-toolkit.pc
111  docs/Makefile
112  docs/dali.doxy
113 ])
114
115 AC_OUTPUT
116
117 echo "
118 Configuration
119 -------------
120   Prefix:                           $prefix
121   Debug Build:                      $enable_debug
122   JavaScript support (V8 required)  $enable_javascript
123   Profile:                          $dali_profile
124   Data Dir (Read/Write):            $dataReadWriteDir
125   Data Dir (Read Only):             $dataReadOnlyDir
126 "