Set also the call state when changing the device mode (NB#160319)
[hildon-application-manager:kalfa-ham.git] / configure.ac
1 # configure.ac for hildon-application-manager
2
3 AC_INIT(hildon-application-manager, 2.2.60~unreleased)
4 AC_CONFIG_SRCDIR([src/main.cc])
5 AM_INIT_AUTOMAKE
6
7 AC_PROG_CC
8 AC_PROG_CXX
9 AC_PROG_INSTALL
10 AC_PROG_LIBTOOL
11
12 AC_LANG_CPLUSPLUS
13
14 AC_CHECK_HEADER(apt-pkg/configuration.h)
15
16 AC_ARG_ENABLE([maemo-launcher],
17               [AS_HELP_STRING([--enable-maemo-launcher],
18                               [build with maemo-launcher support])],
19                               [case "${enableval}" in
20                                yes) maemo_launcher=true ;;
21                                no)  maemo_launcher=false ;;
22                                *) AC_MSG_ERROR([bad value ${enableval} for --enable-maemo-launcher]) ;;
23                                esac], [maemo_launcher=false])
24
25 if test x$ac_cv_header_apt_pkg_configuration_h != xyes; then
26   AC_ERROR([libapt-pkg not found.])
27 fi
28
29 AC_MSG_CHECKING(apt_set_index_trust_level_for_package_hook)
30 AC_EGREP_HEADER(apt_set_index_trust_level_for_package_hook,
31                 apt-pkg/acquire-item.h,
32                 AC_MSG_RESULT(yes)
33                 AC_DEFINE(HAVE_APT_TRUST_HOOK),
34                 AC_MSG_RESULT(no))
35
36 PKG_CHECK_MODULES(HAM_DEPS, glib-2.0 gtk+-2.0 hildon-1 hildon-fm-2 libosso
37                             conic gconf-2.0 gnome-vfs-2.0 mce hal
38                             libhildondesktop-1)
39 AC_SUBST(HAM_DEPS_CFLAGS)
40 AC_SUBST(HAM_DEPS_LIBS)
41
42 MAEMO_LAUNCHER_PACKAGE=""
43 if test "x$maemo_launcher" = "xtrue"; then
44   MAEMO_LAUNCHER_PACKAGE="maemo-launcher-app"
45   PKG_CHECK_MODULES(LAUNCHER_DEPS, $MAEMO_LAUNCHER_PACKAGE)
46 else
47   LAUNCHER_DEPS_CFLAGS=""
48   LAUNCHER_DEPS_LIBS=""
49 fi
50
51 AC_SUBST(LAUNCHER_DEPS_CFLAGS)
52 AC_SUBST(LAUNCHER_DEPS_LIBS)
53
54 saved_CXXFLAGS="$CXXFLAGS"
55 saved_LDFLAGS="$LDFLAGS"
56 CXXFLAGS="$CXXFLAGS $HAM_DEPS_CFLAGS"
57 LDFLAGS="$LDFLAGS $HAM_DEPS_LIBS"
58
59 AC_CHECK_FUNCS(g_string_append_vprintf)
60
61 CXXFLAGS="$saved_CXXFLAGS"
62 LDFLAGS="$saved_LDFLAGS"
63
64 PKG_CHECK_MODULES(AW_DEPS, glib-2.0)
65 AC_SUBST(AW_DEPS_CFLAGS)
66 AC_SUBST(AW_DEPS_LIBS)
67
68 NOTIFIER_PKGS="libosso libhildondesktop-1 gconf-2.0 dbus-1 libcurl alarm conic"
69
70 PKG_CHECK_MODULES(NOTIFIER_DEPS, $NOTIFIER_PKGS)
71 AC_SUBST(NOTIFIER_DEPS_LIBS)
72 AC_SUBST(NOTIFIER_DEPS_CFLAGS)
73
74 hildonstatusmenudesktopentrydir=`pkg-config libhildondesktop-1 --variable=hildonstatusmenudesktopentrydir`
75 AC_SUBST(hildonstatusmenudesktopentrydir)
76
77 hildondesktoplibdir=`pkg-config libhildondesktop-1 --variable=hildondesktoplibdir`
78 AC_SUBST(hildondesktoplibdir)
79
80 # Debian architecture
81 #
82 DEB_HOST_ARCH=`dpkg-architecture -qDEB_HOST_ARCH`
83 AC_DEFINE_UNQUOTED(DEB_HOST_ARCH, "$DEB_HOST_ARCH", [Debian architecture])
84
85 AC_CONFIG_FILES([Makefile
86                  src/Makefile
87                  statusbar/Makefile
88                  utils/Makefile
89                  catpo/Makefile])
90 AC_OUTPUT