1 # Copyright (c) 2019 Samsung Electronics Co., Ltd.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 m4_define([dali_version],[0.1.1])
17 AC_INIT([dali], [dali_version])
18 AM_INIT_AUTOMAKE([-Wall foreign])
24 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
28 DALI_VERSION=dali_version
29 AC_SUBST(DALI_VERSION)
31 DALI_CFLAGS=-DPLATFORM_TIZEN
34 DALI_CFLAGS="$DALI_CFLAGS -std=c++11 -Wnon-virtual-dtor -Woverloaded-virtual -Wold-style-cast -Werror -Wall -Wextra -Wno-unused-parameter -Wfloat-equal -Wconversion"
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 AC_ARG_ENABLE([backtrace],
49 [AC_HELP_STRING([--enable-backtrace],
50 [Backtrace for exceptions])],
51 [enable_backtrace=$enableval],
52 [enable_backtrace=yes])
54 AC_ARG_ENABLE([lock_backtrace],
55 [AC_HELP_STRING([--enable-lock-backtrace],
56 [Backtrace for when more than 1 lock is held on the same thread])],
57 [enable_lock_backtrace=$enableval],
58 [enable_lock_backtrace=no])
60 AC_ARG_ENABLE([rename_so],
61 [AC_HELP_STRING([--enable-rename-so],
62 [Specify whether so file is renamed or not])],
63 [enable_rename_so=$enableval],
64 [enable_rename_so=yes])
66 AM_CONDITIONAL([ENABLE_RENAME_SO], [test x$enable_rename_so = xyes])
68 if test "x$enable_debug" = "xyes"; then
69 DALI_CFLAGS="$DALI_CFLAGS -DDEBUG_ENABLED"
72 if test "x$enable_trace" = "xyes"; then
73 DALI_CFLAGS="$DALI_CFLAGS -DTRACE_ENABLED"
76 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
77 DALI_CFLAGS="$DALI_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
80 if test "x$enable_lock_backtrace" = "xyes"; then
81 DALI_CFLAGS="$DALI_CFLAGS -DLOCK_BACKTRACE_ENABLED"
82 enable_backtrace="yes"
85 # Must come after locks backtrace feature test
86 if test "x$enable_backtrace" = "xyes"; then
87 DALI_CFLAGS="$DALI_CFLAGS -DBACKTRACE_ENABLED"
90 if test x$DALI_DATA_RW_DIR != x; then
91 dataReadWriteDir=$DALI_DATA_RW_DIR
93 dataReadWriteDir=${prefix}/share/dali/
96 if test x$DALI_DATA_RO_DIR != x; then
97 dataReadOnlyDir=$DALI_DATA_RO_DIR
99 dataReadOnlyDir=${prefix}/share/dali/
102 DALI_CFLAGS="$DALI_CFLAGS -I${includedir}"
103 DALI_LDFLAGS="-L${libdir}"
105 AC_SUBST(dataReadWriteDir)
106 AC_SUBST(dataReadOnlyDir)
107 AC_SUBST(DALI_CFLAGS)
108 AC_SUBST(DALI_LDFLAGS)
110 # Specify the include directory for development headers
111 devincludepath=${includedir}
112 AC_SUBST(devincludepath)
126 Debug Build: $enable_debug
127 Trace Build: $enable_trace
128 Data Dir (Read/Write): $dataReadWriteDir
129 Data Dir (Read Only): $dataReadOnlyDir
130 Backtrace: $enable_backtrace
131 ScopedLock Backtrace: $enable_lock_backtrace
132 Rename so file: $enable_rename_so