summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 10bb3c8a9224c27ac1593e8fe4f67b9ab113f70d (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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
AC_PREREQ(2.52)

m4_define(gnomebt_version_major, 2)
m4_define(gnomebt_version_minor, 30)
m4_define(gnomebt_version_micro, 0)

AC_INIT([gnome-bluetooth],
        [gnomebt_version_major.gnomebt_version_minor.gnomebt_version_micro],
        [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-bluetooth])

AC_CONFIG_SRCDIR([applet/main.c])
AC_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE([1.8 dist-bzip2 no-dist-gzip check-news])

# Before making a release, the GNOMEBT_LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
#   been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
#   change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A
GNOMEBT_LT_VERSION=8:0:0
AC_SUBST(GNOMEBT_LT_VERSION)

AM_MAINTAINER_MODE

# Support silent build rules, requires at least automake-1.11. Disable
# by either passing --disable-silent-rules to configure or passing V=1
# to make
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

AC_LANG_C
AC_PROG_CC
AC_PROG_INSTALL

dnl Initialize libtool
AM_DISABLE_STATIC
AM_PROG_LIBTOOL

GETTEXT_PACKAGE=gnome-bluetooth2
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
					[The name of the gettext domain])

AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.35.0])
GLIB_GSETTINGS

AC_PATH_PROG([XMLLINT],[xmllint])

dnl gtk-doc checks
GTK_DOC_CHECK(1.9)

AC_DEFINE_UNQUOTED(LOCALEDIR, "${prefix}/share/locale", [Directory for the localization files])

AC_ARG_ENABLE(desktop-update, AC_HELP_STRING([--disable-desktop-update],
					[Disable desktop database update]))
if (test "$enable_desktop_update" != no); then
	AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, [update-desktop-database])
fi
AM_CONDITIONAL([DESKTOP_UPDATE], [test -n "$UPDATE_DESKTOP_DATABASE"])

AC_ARG_ENABLE(icon-update, AC_HELP_STRING([--disable-icon-update],
					[Disable icon cache update]))
if (test "$enable_icon_update" != no); then
	AC_PATH_PROG(UPDATE_ICON_CACHE, [gtk-update-icon-cache])
fi
AM_CONDITIONAL([ICON_UPDATE], [test -n "$UPDATE_ICON_CACHE"])

GTK_REQUIRED=2.19.1
GLIB_REQUIRED=2.25.7
DBUS_GLIB_REQUIRED=0.74
NOTIFY_REQUIRED=0.4.3
NAUTILUS_SENDTO_REQUIRED=2.28.0.1

dnl Requires for the properties window
PANELS_DIR="${libdir}/control-center-1/panels"
AC_SUBST(PANELS_DIR)

PKG_CHECK_MODULES(PROPS,
		  dbus-glib-1 >= $DBUS_GLIB_REQUIRED
		  glib-2.0 >= $GLIB_REQUIRED
		  gtk+-3.0
		  libgnome-control-center)

dnl Requires for the applet
PKG_CHECK_MODULES(APPLET,
		  dbus-glib-1 >= $DBUS_GLIB_REQUIRED
		  gmodule-export-2.0
		  glib-2.0 >= $GLIB_REQUIRED
		  gtk+-3.0 >= $GTK_REQUIRED
		  libnotify >= $NOTIFY_REQUIRED)

dnl Requires for the sendto app
PKG_CHECK_MODULES(SENDTO,
		  dbus-glib-1 >= $DBUS_GLIB_REQUIRED
		  gtk+-3.0
		  gio-2.0)

dnl nautilus-sendto plugin
AC_ARG_ENABLE(nautilus-sendto,
              AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
                             [build nautilus-sendto plugin]), ,
                             enable_nst=yes)

if test "x$enable_nst" != "xno"; then
   PKG_CHECK_MODULES(NST,
   [
      nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
   ], have_nst="yes", have_nst="no")
else
   have_nst=no
fi

if test "x$enable_nst" = "xyes" -a "x$have_nst" != "xyes"; then
   AC_MSG_ERROR([Couldn't find nautilus-sendto dependencies.])
fi

AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")

dnl Requires for the wizard dialogue
PKG_CHECK_MODULES(WIZARD,
		  dbus-glib-1 >= $DBUS_GLIB_REQUIRED
		  gmodule-export-2.0
		  gtk+-3.0)

dnl Requires for the input helper
PKG_CHECK_MODULES(INPUT,
		  xi
		  x11
		  gtk+-3.0)

dnl Requires for the public library
PKG_CHECK_MODULES(LIBGNOMEBT,
		  dbus-glib-1 >= $DBUS_GLIB_REQUIRED
		  gtk+-3.0)

dnl Requires for the private library
PKG_CHECK_MODULES(COMMON,
		  dbus-glib-1 >= $DBUS_GLIB_REQUIRED
		  gmodule-2.0
		  gtk+-3.0)

dnl Requires for the geoclue plugin
PKG_CHECK_MODULES(GEOCLUE,
		  gconf-2.0
		  dbus-glib-1)

dnl Requires for the plugins
PKG_CHECK_MODULES(PLUGINS,
		  gtk+-3.0)

dnl Requires for the moblin interface
AC_ARG_ENABLE(moblin,
              AS_HELP_STRING([--enable-moblin=@<:@no/yes/auto@:>@],
                             [build moblin interface]), ,
                             enable_moblin=auto)

if test "x$enable_moblin" != "xno"; then
   PKG_CHECK_MODULES(MOBLIN,
   [
      dbus-glib-1,
      gtk+-3.0,
      mx-gtk-1.0
      moblin-panel
   ], have_moblin="yes", have_moblin="no")

   THEME_DIR="${datadir}/${PACKAGE}/theme"
   AS_AC_EXPAND(THEME_DIR, $THEME_DIR)
   AC_DEFINE_UNQUOTED([THEME_DIR], "$THEME_DIR", [Carrick theme directory])

   PANEL_DIR=$($PKG_CONFIG moblin-panel --variable=moblin_panel_panels_dir)
   AC_SUBST(PANEL_DIR)

   AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
else
   have_moblin=no
fi

if test "x$enable_moblin" = "xyes" -a "x$have_moblin" != "xyes"; then
   AC_MSG_ERROR([Couldn't find Moblin dependencies.])
fi
AM_CONDITIONAL(WITH_MOBLIN, test "x$have_moblin" = "xyes")

DBUS_BINDING_TOOL="dbus-binding-tool"
AC_SUBST(DBUS_BINDING_TOOL)

GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)

GOBJECT_INTROSPECTION_CHECK([0.6.3])

GNOME_COMMON_INIT
GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])
GNOME_CXX_WARNINGS
GNOME_MAINTAINER_MODE_DEFINES

GNOME_DOC_INIT

AC_OUTPUT(Makefile
	  gnome-bluetooth-1.0.pc
	  icons/Makefile
	  lib/Makefile
	  lib/plugins/Makefile
	  applet/Makefile
	  applet/bluetooth-applet.desktop.in
	  properties/Makefile
	  properties/bluetooth-properties.desktop.in
	  wizard/Makefile
	  sendto/Makefile
	  moblin/Makefile
	  moblin/bluetooth-panel.desktop.in
          moblin/org.moblin.UX.Shell.Panels.bluetooth.service
	  moblin/theme/Makefile
	  moblin/moblin-copy-n-paste/Makefile
	  moblin/moblin-icons/Makefile
	  docs/Makefile
	  docs/reference/Makefile
	  docs/reference/libgnome-bluetooth/Makefile
	  docs/reference/libgnome-bluetooth/version.xml
	  po/Makefile.in
	  help/Makefile
)

echo "
Configure summary:

	Compiler....................:  ${CC}
	Compiler Flags..............:  ${CFLAGS}
	Prefix......................:  ${prefix}
	Moblin interface............:  ${have_moblin}
	nautilus-sendto plugin......:  ${have_nst}
	Documentation...............:  ${enable_gtk_doc}
	GObject-Introspection.......:  ${found_introspection}
"