Use eina for logging (part 1)
[mokosuite2:libmokosuite.git] / configure.ac
1 AC_INIT([libmokosuite], [1.0.99], [daniele.athome@gmail.com], [libmokosuite])
2 AC_CONFIG_SRCDIR(Makefile.am)
3 AC_CONFIG_HEADERS(config.h)
4 AC_CONFIG_MACRO_DIR([m4])
5
6 AM_INIT_AUTOMAKE
7
8 AC_ISC_POSIX
9 AC_GNU_SOURCE
10 AC_PROG_CC
11 AC_PROG_LIBTOOL
12 AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4")
13
14 dnl Vala for D-Bus servers
15 AC_PATH_PROG(VALAC, valac, valac)
16
17 dnl Intl for gettext
18 IT_PROG_INTLTOOL([0.35.0])
19
20 if test "x$localedir" == x
21 then
22     localedir='${datadir}/locale'
23     AC_SUBST(localedir)
24     AM_GLIB_DEFINE_LOCALEDIR([localedir])
25 fi
26
27 AM_GLIB_GNU_GETTEXT
28 GETTEXT_PACKAGE="mokosuite"
29 AC_SUBST(GETTEXT_PACKAGE)
30 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Name of the gettext message domain])
31
32 dnl Dependencies
33 ELEMENTARY_REQUIRED=0.0.0
34 EDJE_REQUIRED=0.0.0
35 ECORE_REQUIRED=0.0.0
36 EDBUS_REQUIRED=0.5.0
37 EFREET_REQUIRED=0.5.0
38 EINA_REQUIRED=0.5.0
39 GLIB_REQUIRED=2.18.0
40 DBUS_REQUIRED=1.1.1
41 DBUS_GLIB_REQUIRED=0.74
42 SQLITE3_REQUIRED=3.0
43 EGGDBUS_REQUIRED=0.5
44 PHONEUTILS_REQUIRED=0.1
45 FSO_REQUIRED=0.2
46
47 PKG_CHECK_MODULES(GLIB,
48   glib-2.0 >= $GLIB_REQUIRED
49   gobject-2.0 >= $GLIB_REQUIRED
50 )
51
52 PKG_CHECK_MODULES(DBUS,
53   dbus-1 >= $DBUS_REQUIRED
54   dbus-glib-1 >= $DBUS_GLIB_REQUIRED
55 )
56
57 PKG_CHECK_MODULES(ELEMENTARY,
58   elementary >= $ELEMENTARY_REQUIRED
59 )
60
61 PKG_CHECK_MODULES(EDJE,
62   edje >= $EDJE_REQUIRED
63 )
64
65 PKG_CHECK_MODULES(ECORE,
66   ecore >= $ECORE_REQUIRED
67   ecore-x >= $ECORE_REQUIRED
68   ecore-evas >= $ECORE_REQUIRED
69   ecore-input >= $ECORE_REQUIRED
70   eet >= $ECORE_REQUIRED
71 )
72
73 PKG_CHECK_MODULES(EINA, eina >= $EINA_REQUIRED)
74
75 PKG_CHECK_MODULES(EFREET, efreet >= $EFREET_REQUIRED)
76
77 PKG_CHECK_MODULES(FSO, libfreesmartphone-glib >= $FSO_REQUIRED)
78
79 PKG_CHECK_MODULES(ALSA, alsa)
80
81 PKG_CHECK_MODULES(SQLITE, sqlite3 >= $SQLITE3_REQUIRED)
82
83 PKG_CHECK_MODULES(EGGDBUS, eggdbus-1 >= $EGGDBUS_REQUIRED)
84
85 PKG_CHECK_MODULES(X11, x11)
86
87 PKG_CHECK_MODULES(PHONEUTILS, libphone-utils)
88
89 dnl edje_cc for edj files
90 AC_ARG_WITH(edje-cc,
91 [  --with-edje-cc=PATH  specify a specific path to edje_cc],
92 [
93   v=$withval;
94   edje_cc=$v
95   echo "  Enlightenment edje_cc explicitly set to "$edje_cc;
96 ],[
97   edje_cc=$(pkg-config --variable=prefix edje)/bin/edje_cc
98 ])
99
100 dnl Settings storage
101 AC_ARG_ENABLE(settings_config,
102     AC_HELP_STRING([--enable-settings-config], [Enable mokosuite.conf usage as settings storage (default: BerkeleyDB storage)]),
103     enable_settings_config=$enableval,
104     enable_settings_config=no)
105
106 if test "x$enable_settings_config" != "xno"; then
107     AC_DEFINE(SETTINGSDB_CFG, 1, [Define to enable mokosuite.conf usage as settings storage])
108 fi
109
110 AM_CONDITIONAL(ENABLE_SETTINGS_CONFIG, test "x$enable_settings_config" = "xyes")
111
112 dnl Contacts storage
113 AC_ARG_ENABLE(contactsdb_sqlite,
114     AC_HELP_STRING([--enable-contactsdb-sqlite], [Enable SQLite usage for contacts database (default: BerkeleyDB storage)]),
115     enable_contactsdb_sqlite=$enableval,
116     enable_contactsdb_sqlite=no)
117
118 if test "x$enable_contactsdb_sqlite" != "xno"; then
119     AC_DEFINE(CONTACTSDB_SQLITE, 1, [Define to enable SQLite usage for contacts database])
120 fi
121
122 AM_CONDITIONAL(ENABLE_CONTACTSDB_SQLITE, test "x$enable_contactsdb_sqlite" = "xyes")
123
124 AC_ARG_ENABLE(debug,
125     AC_HELP_STRING([--enable-debug], [Enable debug build (default: disabled)]),
126     enable_debug=$enableval,
127     enable_debug=no)
128
129 if test "x$enable_debug" != "xno"; then
130     AC_DEFINE(DEBUG, 1, [Define to enable debug build])
131 fi
132
133 AC_OUTPUT([
134 Makefile
135 po/Makefile.in
136
137 ui/Makefile
138 ui/mokosuite-ui.pc
139
140 pim/Makefile
141 pim/mokosuite-pim.pc
142
143 utils/Makefile
144 utils/mokosuite-utils.pc
145 ])