Demo of Dali toolkit and core capabilities
[platform/core/uifw/dali-demo.git] / build / tizen / 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 # 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 -Werror 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_VERSION=dali_version
29 AC_SUBST(DALI_VERSION)
30
31 PKG_CHECK_MODULES(DALI, dali)
32 PKG_CHECK_MODULES(DALI_TOOLKIT, dali-toolkit)
33 PKG_CHECK_MODULES(ECORE_X, ecore-x)
34 PKG_CHECK_MODULES(CAPI_MEDIA_PLAYER, capi-media-player)
35 PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
36 PKG_CHECK_MODULES(AUL, aul)
37 PKG_CHECK_MODULES(DLOG, dlog)
38
39 DALIDEMO_CFLAGS=-DPLATFORM_SLP
40
41 AC_ARG_ENABLE([debug],
42               [AC_HELP_STRING([--enable-debug],
43                               [Turns on debugging])],
44               [enable_debug=$enableval],
45               [enable_debug=no])
46
47 if test "x$enable_debug" = "xyes"; then
48   DALIDEMO_CFLAGS="$DALIDEMO_CFLAGS -DDEBUG_ENABLED"
49 fi
50
51 if test x$DALI_APP_DIR != x; then
52   appdatadir=$DALI_APP_DIR
53   exedir=${appdatadir}/bin/
54 else
55   appdatadir=${prefix}/share/com.samsung.dali-demo/
56   exedir=${prefix}/bin/
57 fi
58
59 AC_SUBST(datadir)
60 AC_SUBST(appdatadir)
61 AC_SUBST(exedir)
62 AC_SUBST(DALIDEMO_CFLAGS)
63
64 dnl **************************************************************************
65 dnl ** Set Debian install Prefix                                            **
66 dnl **************************************************************************
67 debian_prefix=${prefix#*/}
68 AC_SUBST(debian_prefix)
69
70 AC_CONFIG_FILES([
71   Makefile
72   demo/Makefile
73   examples/Makefile
74 ])
75
76
77 AC_OUTPUT
78
79 echo "
80 Configuration
81 -------------
82   Prefix:                           $prefix
83   Debug Build:                      $enable_debug
84   Application Data Dir:             $appdatadir
85   Application Exe Dir:              $exedir
86   DALIDEMO_CFLAGS:                  ${DALIDEMO_CFLAGS}
87 "