Emscripten workarounds and llvm syntax fixes
[platform/core/uifw/dali-core.git] / build / slp / configure.ac
1 #
2 # Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 #
4 # Licensed under the Flora License, Version 1.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://floralicense.org/license/
9
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an AS IS BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17
18 m4_define([dali_version],[0.1.1])
19 AC_INIT([dali], [dali_version])
20 AM_INIT_AUTOMAKE([-Wall -Wfloat-equal -Werror foreign])
21
22 AC_PROG_CXX
23 AC_PROG_LIBTOOL
24 AC_PROG_MKDIR_P
25
26 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
27
28 LT_INIT
29
30 DALI_VERSION=dali_version
31 AC_SUBST(DALI_VERSION)
32
33 PKG_CHECK_MODULES(OPENGLES20, opengl-es-20)
34
35 DALI_CFLAGS=-DPLATFORM_SLP
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 AC_ARG_ENABLE([emscripten],
50               [AC_HELP_STRING([--enable-emscripten],
51                               [Emscripten builds])],
52               [enable_emscripten=$enableval],
53               [enable_emscripten=no])
54
55 if test "x$enable_debug" = "xyes"; then
56   DALI_CFLAGS="$DALI_CFLAGS -DDEBUG_ENABLED -DDEBUG_BACKTRACE"
57 fi
58
59 if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
60   DALI_CFLAGS="$DALI_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
61 fi
62
63 if test "x$enable_emscripten" = "xyes"; then
64   DALI_CFLAGS="$DALI_CFLAGS -DEMSCRIPTEN -std=c++11"
65 fi
66
67 AC_ARG_ENABLE([performance-monitor],
68               [AC_HELP_STRING([--enable-performance-monitor],
69                               [Enables the performance monitor output])],
70               [enable_performance_monitor=$enableval],
71               [enable_performance_monitor=no])
72
73 if test "x$enable_performance_monitor" = "xyes"; then
74   DALI_CFLAGS="$DALI_CFLAGS -DPERFORMANCE_MONITOR_ENABLED"
75 fi
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_CFLAGS)
92
93 # Specify the include directory for development headers
94 devincludepath=${includedir}
95 AC_SUBST(devincludepath)
96
97 AC_CONFIG_FILES([
98  Makefile
99  dali-core/Makefile
100  dali-core.pc
101  dali-test-suite-utils.pc
102  ../../automated-tests/rules.mk
103 ])
104
105 AC_OUTPUT
106
107 echo "
108 Configuration
109 -------------
110   Prefix:                           $prefix
111   Debug Build:                      $enable_debug
112   Performance Monitor:              $enable_performance_monitor
113   Data Dir (Read/Write):            $dataReadWriteDir
114   Data Dir (Read Only):             $dataReadOnlyDir
115   Emscripten:                       $enable_emscripten
116 "