Set locale based on LANG and LC_ALL environment variables set
[profile/ivi/lemolo.git] / configure.ac
1 AC_PREREQ([2.60])
2 AC_INIT([lemolo], [0.1.4])
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                 edbus
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                         ecore-x
54                         appcore-efl
55                         contacts-service2
56                         vconf
57                         capi-system-power
58                         aul
59                         appsvc
60                         notification
61                 ],
62                 [have_tizen="yes"],
63                 [have_tizen="no"])
64 fi
65
66 if test "$want_tizen" = "yes" -a "$have_tizen" = "no"; then
67    AC_MSG_ERROR([Want tizen, but not found])
68 elif test "$have_tizen" = "yes"; then
69      AC_DEFINE([HAVE_TIZEN], 1, [Tizen support])
70 fi
71
72 AM_CONDITIONAL([HAVE_TIZEN], [test "$have_tizen" = "yes"])
73
74 AC_ARG_ENABLE([notification],
75    AC_HELP_STRING([--enable-notification], [enable Tizen notification. @<:@default=auto@:>@]),
76    [want_notification="${enableval}"], [:])
77
78 if test "$have_tizen" = "yes" -a "$want_notification" = "yes"; then
79      AC_DEFINE([HAVE_NOTIFICATION], 1, [Notification support])
80 fi
81
82 AM_CONDITIONAL([HAVE_NOTIFICATION], [test "$have_tizen" = "yes"])
83
84 with_max_log_level="EINA_LOG_LEVEL_DBG"
85 AC_ARG_WITH(maximum-log-level,
86    [AC_HELP_STRING([--with-maximum-log-level=NUMBER],
87                    [limit log level, any call to EINA_LOG() with values greater than this will be compiled out, ignoring runtime settings, but saving function calls.])],
88    [with_max_log_level="${withval}"], [:])
89 AC_DEFINE_UNQUOTED(EINA_LOG_LEVEL_MAXIMUM, ${with_max_log_level}, [if set, logging is limited to this amount.])
90
91 with_dbusservicesdir=`pkg-config --variable=session_bus_services_dir dbus-1`
92 AC_ARG_WITH(dbusservicesdir,
93    [AC_HELP_STRING([--with-dbusservicesdir=PATH],
94       [Where to place dbus services files])],
95    [with_dbusservicesdir="${withval}"], [:])
96 AC_SUBST(with_dbusservicesdir)
97
98 with_desktopicondir="/usr/share/icons/default/small"
99 AC_ARG_WITH(desktopicondir,
100    [AC_HELP_STRING([--with-desktopicondir=PATH],
101       [Where to place desktop icon file. Default=/usr/share/icons/default/small/])],
102    [with_desktopicondir="${withval}"], [:])
103 AC_SUBST(with_desktopicondir)
104
105 with_desktopdir="/usr/share/applications"
106 AC_ARG_WITH(desktopdir,
107    [AC_HELP_STRING([--with-desktopdir=PATH],
108       [Where to place desktop files. Default=/usr/share/applications/])],
109    [with_desktopdir="${withval}"], [:])
110 AC_SUBST(with_desktopdir)
111
112 eval "eval BIN_DIR=$bindir"
113 AC_SUBST(BIN_DIR)
114
115 eval "eval DATA_DIR=$datadir"
116 AC_SUBST(DATA_DIR)
117
118 AC_CONFIG_FILES([ po/Makefile.in
119 Makefile
120 ])
121
122 AC_OUTPUT