summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 346d9d855499566341804caf84b38bb4f4922558 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
AC_INIT(meego-facebook-plugins, 1.1)
AM_INIT_AUTOMAKE([foreign -Wno-portability tar-ustar])
AM_CONFIG_HEADER(config.h)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

AC_PROG_CC
AC_PROG_LIBTOOL

IT_PROG_INTLTOOL([0.40], [no-xml])
GETTEXT_PACKAGE=facebook-plugins
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The name of the gettext package.])
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT

PKG_CHECK_MODULES(BISHO_MODULE,
                  bisho
                  mx-gtk-1.0
                  gnome-keyring-1
                  libsocialweb-keystore
                  rest-0.6 >= 0.6.4
                  libsoup-gnome-2.4
                  json-glib-1.0
                  gconf-2.0 >= 1.2.0
                  webkit-1.0)

AM_GCONF_SOURCE_2

AC_MSG_CHECKING([Bisho modules dir])
AC_ARG_WITH([bisho-modules-dir],
            [AC_HELP_STRING([--with-bisho-modules-dir],
                            [directory to install bisho modules])],
                            [], [with_bisho_modules_dir=""])
if test -z "$with_bisho_modules_dir"; then
  BISHO_MODULES_DIR=`$PKG_CONFIG --variable=modulesdir bisho`
else
  BISHO_MODULES_DIR="$with_bisho_modules_dir"
fi

if test "x$BISHO_MODULES_DIR" = "x"; then
    AC_MSG_ERROR([could not determine modulesdir])
else
    AC_MSG_RESULT([$BISHO_MODULES_DIR])
fi
AC_SUBST(BISHO_MODULES_DIR)

INTLTOOL_SOCIALWEB_KEYS='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
AC_SUBST(INTLTOOL_SOCIALWEB_KEYS)

PKG_CHECK_MODULES(LIBSOCIALWEB_MODULE,
                  gconf-2.0
                  rest-0.6
                  rest-extras-0.6
                  gnome-keyring-1
                  json-glib-1.0
                  libsocialweb-module
                  libsocialweb-keyfob
                  libsocialweb-keystore)

AC_MSG_CHECKING([libsocialweb services dir])
AC_ARG_WITH([libsocialweb-services-dir],
            [AC_HELP_STRING([--with-libsocialweb-services-dir],
                            [directory to install libsocialweb services])],
                            [], [with_libsocialweb_services_dir=""])
if test -z "$with_libsocialweb_services_dir"; then
  servicesdir=`$PKG_CONFIG --variable=servicesdir libsocialweb-module`
else
  servicesdir="$with_libsocialweb_services_dir"
fi

if test "x$servicesdir" = "x"; then
    AC_MSG_ERROR([could not determine libsocialweb services dir])
else
    AC_MSG_RESULT([$servicesdir])
fi
AC_SUBST(servicesdir)

AC_MSG_CHECKING([libsocialweb services datadir])
AC_ARG_WITH([libsocialweb-services-datadir],
            [AC_HELP_STRING([--with-libsocialweb-services-datadir],
                            [directory to install libsocialweb services data])],
                            [], [with_libsocialweb_services_datadir=""])
if test -z "$with_libsocialweb_services_datadir"; then
  servicesdatadir=`$PKG_CONFIG --variable=servicesdatadir libsocialweb-module`
else
  servicesdatadir="$with_libsocialweb_services_datadir"
fi

if test "x$servicesdatadir" = "x"; then
    AC_MSG_ERROR([could not determine libsocialweb services data dir])
else
    AC_MSG_RESULT([$servicesdatadir])
fi
AC_SUBST(servicesdatadir)

PKG_CHECK_MODULES(UTIL,
                  glib-2.0
                  gnome-keyring-1
                  rest-0.6
                  json-glib-1.0)

PKG_CHECK_MODULES(REST,
                  rest-0.6
                  json-glib-1.0)

AC_ARG_ENABLE(telepathy,
              [AS_HELP_STRING([--enable-telepathy],
                              [Enable Telepathy integration])],
              enable_telepathy=$enableval,
              enable_telepathy=no)

if test "x$enable_telepathy" = "xyes"; then
    PKG_CHECK_MODULES(AUTH_OBSERVER,
                      libsocialweb-keystore
                      telepathy-glib)

    PKG_CHECK_MODULES(MISSION_CONTROL_MODULE,
                      mission-control-plugins
                      libsocialweb-client
                      gconf-2.0 >= 1.2.0)

    AC_MSG_CHECKING([Mission Control plugins dir])
    MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
    if test "x$MISSION_CONTROL_PLUGINS_DIR" = "x"; then
        AC_MSG_ERROR([could not determine plugindir])
    else
        AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
    fi
    AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)

    AC_DEFINE(ENABLE_TELEPATHY, 1, [Define if Telepathy support is enabled])
fi

AM_CONDITIONAL(ENABLE_TELEPATHY, test "x$enable_telepathy" = "xyes")

AC_CONFIG_FILES(Makefile
                po/Makefile.in
                bisho/Makefile
                libsocialweb/Makefile
                libsocialweb/tests/Makefile
                rest/Makefile
                util/Makefile
                tools/Makefile
                auth-observer/Makefile
                mission-control/Makefile)

AC_OUTPUT