Merge "Use Fonts from property system" into new_text
[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
34 DALI_TOOLKIT_CFLAGS=-DPLATFORM_TIZEN
35
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])
41
42 AC_ARG_ENABLE([debug],
43               [AC_HELP_STRING([--enable-debug],
44                               [Turns on debugging])],
45               [enable_debug=$enableval],
46               [enable_debug=no])
47
48 # option for JavaScript plugin
49 AC_ARG_ENABLE(javascript,
50               [AC_HELP_STRING([--enable-javascript],
51                               [Enable JavaScript plugin])] ,
52                [enable_javascript=yes],
53                [enable_javascript=no])
54
55 if test "x$enable_debug" = "xyes"; then
56   DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED"
57   DALI_SCRIPTV8_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED"
58 fi
59
60 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
61   DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
62   DALI_SCRIPTV8_CFLAGS="$DALI_TOOLKIT_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
63 fi
64
65 #set a variable for the makefile to conditionally compile the plugin
66 AM_CONDITIONAL([ENABLE_JAVASCRIPT_PLUGIN], [test x$enable_javascript = xyes])
67
68
69 # Tizen Profile options
70 AC_ARG_ENABLE([profile],
71               [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,LITE,WEARABLE,TV],
72                             [Select the variant of tizen])],
73               [dali_profile=$enableval],
74               [dali_profile=COMMON])
75
76 if test x$DALI_DATA_RW_DIR != x; then
77   dataReadWriteDir=${DALI_DATA_RW_DIR}/
78 else
79   dataReadWriteDir=${prefix}/share/dali/
80 fi
81
82 if test x$DALI_DATA_RO_DIR != x; then
83   dataReadOnlyDir=${DALI_DATA_RO_DIR}/
84 else
85   dataReadOnlyDir=${prefix}/share/dali/
86 fi
87
88 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDALI_PROFILE_${enable_profile}"
89 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
90 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
91
92 AC_SUBST(dataReadWriteDir)
93 AC_SUBST(dataReadOnlyDir)
94 AC_SUBST(DALI_TOOLKIT_CFLAGS)
95 AC_SUBST(DALI_SCRIPTV8_CFLAGS)
96 AC_SUBST(DALI_SCRIPTV8_LIBS)
97
98 # Specify the include directory for development headers
99 #devincludepath=${includedir}/dali/internal
100 devincludepath=${includedir}
101 AC_SUBST(devincludepath)
102
103 # Doxygen paths
104 DOXYGEN_DOCS_DIR=../../../docs
105 DOXYGEN_ROOT_DIR=../../..
106 AC_SUBST(DOXYGEN_DOCS_DIR)
107 AC_SUBST(DOXYGEN_ROOT_DIR)
108
109 AC_CONFIG_FILES([
110  Makefile
111  dali-toolkit/Makefile
112  plugins/Makefile
113  dali-toolkit.pc
114  docs/Makefile
115  docs/dali.doxy
116 ])
117
118 AC_OUTPUT
119
120 echo "
121 Configuration
122 -------------
123   Prefix:                           $prefix
124   Debug Build:                      $enable_debug
125   JavaScript support (V8 required)  $enable_javascript
126   Profile:                          $dali_profile
127   Data Dir (Read/Write):            $dataReadWriteDir
128   Data Dir (Read Only):             $dataReadOnlyDir
129 "