Fix TC-2372 Dialer crashes when BT phone is offline
[profile/ivi/lemolo.git] / configure.ac
1 AC_PREREQ([2.60])
2 AC_INIT([lemolo], [0.1.7])
3
4 AM_INIT_AUTOMAKE([foreign subdir-objects])
5 AM_CONFIG_HEADER([config.h])
6 AC_CONFIG_MACRO_DIR([m4])
7
8 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
9
10 PKG_PROG_PKG_CONFIG
11
12 AC_LANG_C
13
14 AC_USE_SYSTEM_EXTENSIONS
15 AC_PROG_CC
16 AM_PROG_CC_C_O
17 AC_C___ATTRIBUTE__
18 AC_DISABLE_STATIC
19 AC_PROG_LIBTOOL
20 AM_GNU_GETTEXT([external])
21
22 EFL_COMPILER_FLAG
23 EFL_COMPILER_FLAG([-Wall])
24 EFL_COMPILER_FLAG([-Wextra])
25 EFL_COMPILER_FLAG([-Wshadow])
26 EFL_COMPILER_FLAG([-fvisibility=hidden])
27
28 PKG_CHECK_MODULES([EFL],
29         [
30                 elementary
31                 eldbus
32                 dbus-1
33          ])
34
35 PKG_CHECK_MODULES([PULSEAUDIO],
36         [
37                 libpulse
38                 libpulse-mainloop-glib
39                 libpulse-simple
40          ])
41
42 EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
43
44 want_tizen="auto"
45 have_tizen="no"
46 AC_ARG_ENABLE([tizen],
47    AC_HELP_STRING([--enable-tizen], [enable Tizen integration. @<:@default=auto@:>@]),
48    [want_tizen="${enableval}"], [:])
49
50 if test "$want_tizen" != "no"; then
51    PKG_CHECK_MODULES([TIZEN],
52                 [
53                         appcore-efl
54                         contacts-service2
55                         vconf
56                         capi-system-power
57                         aul
58                         appsvc
59                         notification
60                 ],
61                 [have_tizen="yes"],
62                 [have_tizen="no"])
63 fi
64
65 if test "$want_tizen" = "yes" -a "$have_tizen" = "no"; then
66    AC_MSG_ERROR([Want tizen, but not found])
67 elif test "$have_tizen" = "yes"; then
68      AC_DEFINE([HAVE_TIZEN], 1, [Tizen support])
69 fi
70
71 AM_CONDITIONAL([HAVE_TIZEN], [test "$have_tizen" = "yes"])
72
73 AC_ARG_ENABLE([notification],
74    AC_HELP_STRING([--enable-notification], [enable Tizen notification. @<:@default=auto@:>@]),
75    [want_notification="${enableval}"], [:])
76
77 if test "$have_tizen" = "yes" -a "$want_notification" = "yes"; then
78      AC_DEFINE([HAVE_NOTIFICATION], 1, [Notification support])
79 fi
80
81 AM_CONDITIONAL([HAVE_NOTIFICATION], [test "$have_tizen" = "yes"])
82
83 with_max_log_level="EINA_LOG_LEVEL_DBG"
84 AC_ARG_WITH(maximum-log-level,
85    [AC_HELP_STRING([--with-maximum-log-level=NUMBER],
86                    [limit log level, any call to EINA_LOG() with values greater than this will be compiled out, ignoring runtime settings, but saving function calls.])],
87    [with_max_log_level="${withval}"], [:])
88 AC_DEFINE_UNQUOTED(EINA_LOG_LEVEL_MAXIMUM, ${with_max_log_level}, [if set, logging is limited to this amount.])
89
90 with_dbusservicesdir=`pkg-config --variable=session_bus_services_dir dbus-1`
91 AC_ARG_WITH(dbusservicesdir,
92    [AC_HELP_STRING([--with-dbusservicesdir=PATH],
93       [Where to place dbus services files])],
94    [with_dbusservicesdir="${withval}"], [:])
95 AC_SUBST(with_dbusservicesdir)
96
97 with_desktopicondir="/usr/share/icons/default/small"
98 AC_ARG_WITH(desktopicondir,
99    [AC_HELP_STRING([--with-desktopicondir=PATH],
100       [Where to place desktop icon file. Default=/usr/share/icons/default/small/])],
101    [with_desktopicondir="${withval}"], [:])
102 AC_SUBST(with_desktopicondir)
103
104 with_desktopdir="/usr/share/applications"
105 AC_ARG_WITH(desktopdir,
106    [AC_HELP_STRING([--with-desktopdir=PATH],
107       [Where to place desktop files. Default=/usr/share/applications/])],
108    [with_desktopdir="${withval}"], [:])
109 AC_SUBST(with_desktopdir)
110
111 eval "eval BIN_DIR=$bindir"
112 AC_SUBST(BIN_DIR)
113
114 eval "eval DATA_DIR=$datadir"
115 AC_SUBST(DATA_DIR)
116
117 AC_CONFIG_FILES([ po/Makefile.in
118 Makefile
119 ])
120
121 AC_OUTPUT