[dali_1.4.27] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / build / tizen / configure.ac
1 #
2 # Copyright (c) 2019 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
32 DALI_TOOLKIT_CFLAGS=-DPLATFORM_TIZEN
33
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])
39
40 AC_ARG_ENABLE([debug],
41               [AC_HELP_STRING([--enable-debug],
42                               [Turns on debugging])],
43               [enable_debug=$enableval],
44               [enable_debug=no])
45
46 AC_ARG_ENABLE([i18n],
47               [AC_HELP_STRING([--enable-i18n],
48                               [Turns on internationalisation])],
49               [enable_i18n=$enableval],
50               [enable_i18n=no])
51
52 AC_ARG_ENABLE([rename_so],
53               [AC_HELP_STRING([--enable-rename-so],
54                               [Specify whether so file is renamed or not])],
55               [enable_rename_so=$enableval],
56               [enable_rename_so=yes])
57
58 AM_CONDITIONAL([ENABLE_RENAME_SO], [test x$enable_rename_so = xyes])
59
60 if test "x$enable_debug" = "xyes"; then
61   DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED"
62 fi
63
64 if test "x$enable_trace" = "xyes"; then
65   DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DTRACE_ENABLED"
66 fi
67
68 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
69   DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
70 fi
71
72 if test "x$enable_i18n" = "xyes"; then
73   DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDGETTEXT_ENABLED "
74 fi
75
76 # Tizen Profile options
77 AC_ARG_ENABLE([profile],
78               [AC_HELP_STRING([--enable-profile=UBUNTU,TIZEN],
79                             [Select the variant of tizen])],
80               [dali_profile=$enableval],
81               [dali_profile=UBUNTU])
82
83 # Tizen Style Folder
84 AC_ARG_WITH(style,
85               [AC_HELP_STRING([--with-style],
86                             [Select the style folder to use])],
87               [dali_style=$withval],
88               [dali_style=480x800])
89
90 # Ensure valid profile selected
91 if test "x$dali_profile" != "xUBUNTU" -a "x$dali_profile" != "xTIZEN"; then
92   AC_MSG_ERROR([$enable_profile is an invalid profile])
93 fi
94
95 if test x$DALI_DATA_RW_DIR != x; then
96   dataReadWriteDir=${DALI_DATA_RW_DIR}/
97 else
98   dataReadWriteDir=${prefix}/share/dali/
99 fi
100
101 if test x$DALI_DATA_RO_DIR != x; then
102   dataReadOnlyDir=${DALI_DATA_RO_DIR}/
103 else
104   dataReadOnlyDir=${prefix}/share/dali/
105 fi
106
107 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDALI_PROFILE_${dali_profile}"
108
109 # Style folder
110 STYLE_BASE_DIR=../../../dali-toolkit/styles
111 STYLE_DIR=$STYLE_BASE_DIR/$dali_style
112
113 AC_SUBST(STYLE_BASE_DIR)
114 AC_SUBST(STYLE_DIR)
115
116 # Platforms with highp shader support can use vector based text
117 AM_CONDITIONAL([ENABLE_VECTOR_BASED_TEXT_RENDERING], [test x$dali_profile = xUBUNTU])
118
119 AC_SUBST(dataReadWriteDir)
120 AC_SUBST(dataReadOnlyDir)
121 AC_SUBST(DALI_TOOLKIT_CFLAGS)
122
123
124 # Specify the include directory for development headers
125 #devincludepath=${includedir}/dali/internal
126 devincludepath=${includedir}
127 AC_SUBST(devincludepath)
128
129 # Doxygen paths
130 DOXYGEN_DOCS_DIR=../../../docs
131 DOXYGEN_ROOT_DIR=../../..
132 AC_SUBST(DOXYGEN_DOCS_DIR)
133 AC_SUBST(DOXYGEN_ROOT_DIR)
134
135 PKG_CHECK_MODULES(DALICORE, dali-core)
136 PKG_CHECK_MODULES(DALIADAPTOR, dali-adaptor)
137
138 AC_CONFIG_FILES([
139  Makefile
140  dali-toolkit/Makefile
141  docs/Makefile
142  docs/dali.doxy
143  docs-internal/dali-internal.doxy
144  ../../automated-tests/CMakeLists.txt
145  dali-toolkit.pc
146 ])
147
148 AC_OUTPUT
149
150 echo "
151 Configuration
152 -------------
153   Prefix:                           $prefix
154   Debug Build:                      $enable_debug
155   Trace Build:                      $enable_trace
156   Profile:                          $dali_profile
157   Data Dir (Read/Write):            $dataReadWriteDir
158   Data Dir (Read Only):             $dataReadOnlyDir
159   Style Dir:                        $STYLE_DIR
160   Style:                            $dali_style
161   i18n:                             $enable_i18n
162 "