Make dependency in AUL optional.
[platform/core/uifw/dali-demo.git] / build / tizen / configure.ac
1 # Copyright (c) 2014 Samsung Electronics Co., Ltd.
2
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
6
7 # http://www.apache.org/licenses/LICENSE-2.0
8
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.
14
15
16 m4_define([dali_version],[0.1.0])
17 AC_INIT([dali], [dali_version])
18 AM_INIT_AUTOMAKE([-Wall foreign])
19
20 AC_PROG_CXX
21 AC_PROG_LIBTOOL
22
23 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
24
25 LT_INIT
26
27 DALI_VERSION=dali_version
28 AC_SUBST(DALI_VERSION)
29
30 PKG_CHECK_MODULES(DALI, dali)
31 PKG_CHECK_MODULES(DALI_TOOLKIT, dali-toolkit)
32 PKG_CHECK_MODULES(AUL, aul,
33                   [AC_DEFINE([HAS_AUL], [1])],
34                   [1])
35
36 DALIDEMO_CFLAGS=-DPLATFORM_SLP
37
38 AC_ARG_ENABLE([debug],
39               [AC_HELP_STRING([--enable-debug],
40                               [Turns on debugging])],
41               [enable_debug=$enableval],
42               [enable_debug=no])
43
44 if test "x$enable_debug" = "xyes"; then
45   DALIDEMO_CFLAGS="$DALIDEMO_CFLAGS -DDEBUG_ENABLED"
46 fi
47
48 if test x$DALI_APP_DIR != x; then
49   appdatadir=$DALI_APP_DIR
50   exedir=${appdatadir}/bin/
51 else
52   appdatadir=${prefix}/share/com.samsung.dali-demo/
53   exedir=${prefix}/bin/
54 fi
55
56 AC_SUBST(datadir)
57 AC_SUBST(appdatadir)
58 AC_SUBST(exedir)
59 AC_SUBST(DALIDEMO_CFLAGS)
60
61 dnl **************************************************************************
62 dnl ** Set Debian install Prefix                                            **
63 dnl **************************************************************************
64 debian_prefix=${prefix#*/}
65 AC_SUBST(debian_prefix)
66
67 AC_CONFIG_FILES([
68   Makefile
69   demo/Makefile
70   examples/Makefile
71 ])
72
73
74 AC_OUTPUT
75
76 echo "
77 Configuration
78 -------------
79   Prefix:                           $prefix
80   Debug Build:                      $enable_debug
81   Application Data Dir:             $appdatadir
82   Application Exe Dir:              $exedir
83   DALIDEMO_CFLAGS:                  ${DALIDEMO_CFLAGS}
84 "