3
AC_INIT(nautilus-sendto, 3.0.0, http://www.gnome.org)
4
AM_CONFIG_HEADER(config.h)
6
AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip check-news])
8
# Enable silent build when available (Automake 1.11)
9
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
25
GNOME_COMPILE_WARNINGS([maximum])
27
GNOME_MAINTAINER_MODE_DEFINES
29
ERROR_CFLAGS="-Wall -Wextra -Werror -Wno_missing_field_initializers -Wno_unused_parameter"
31
dnl --------------------------------------------------
34
GTHREAD_REQUIRED=2.6.0
37
NAUTILUS_EXTENSION=2.31.3
39
DBUS_GLIB_REQUIRED=0.60
42
AC_SUBST(GLIB_REQUIRED)
43
AC_SUBST(GTHREAD_REQUIRED)
44
AC_SUBST(GTK_REQUIRED)
45
AC_SUBST(EBOOK_REQUIRED)
46
AC_SUBST(NAUTILUS_EXTENSION)
47
AC_SUBST(BLUETOOTH_REQUIRED)
48
AC_SUBST(DBUS_REQUIRED)
49
AC_SUBST(GUPNP_REQUIRED)
51
PKG_CHECK_MODULES(NAUTILUS_SENDTO,\
52
glib-2.0 >= $GLIB_REQUIRED \
53
gthread-2.0 >= $GTHREAD_REQUIRED \
54
gmodule-2.0 >= $GLIB_REQUIRED \
55
gtk+-3.0 >= $GTK_REQUIRED)
56
AC_SUBST(NAUTILUS_SENDTO_CFLAGS)
57
AC_SUBST(NAUTILUS_SENDTO_LIBS)
59
PKG_CHECK_MODULES(NAUTILUS_EXT_SENDTO,\
60
libnautilus-extension >= $NAUTILUS_EXTENSION)
61
AC_SUBST(NAUTILUS_EXT_SENDTO_CFLAGS)
62
AC_SUBST(NAUTILUS_EXT_SENDTO_LIBS)
64
dnl Get nautilus extensions directory
65
dnl ---------------------------------
67
AC_ARG_WITH(nautilusdir,
68
AS_HELP_STRING([--with-nautilusdir=DIR],[Installation path for Nautilus extension @<:@auto@:>@]),
69
[ac_with_nautilusdir=$withval],
70
[ac_with_nautilusdir=""])
71
if test "${ac_with_nautilusdir}" = ""; then
72
ac_with_nautilusdir=`pkg-config --variable=extensiondir libnautilus-extension`
75
AC_MSG_NOTICE([installing nautilus plugin in ${ac_with_nautilusdir}])
76
AC_SUBST([NAUTILUS_EXTENSION_DIR],[${ac_with_nautilusdir}])
78
# The full list of plugins
79
allowed_plugins="evolution gajim nautilus-burn pidgin removable-devices upnp"
81
plugin_error_or_ignore()
83
if test "${error_on_bad_plugin}" = "1" ; then
86
AC_MSG_WARN([$1 (disabling plugin)])
90
AC_ARG_WITH([plugins],
91
[AS_HELP_STRING([--with-plugins],[Which nautilus-sendto plugins to compile (default: auto; "all", "autodetect" are valid)])],
92
[], [with_plugins=autodetect])
97
if test "x${with_plugins}" = "xautodetect" ; then
98
# Default to all plugins and just ignore them if they won't compile
100
error_on_bad_plugin="0"
102
# Clean up the plugin list and error if a plugin won't compile
103
with_plugins=`echo ,"${with_plugins}", | sed -e 's/[[ ,]][[ ,]]*/ /g' -e 's/,$//'`
104
error_on_bad_plugin="1"
107
# Iterate through the wanted plugins and weed out bad ones (or error)
108
for wanted_plugin in ${with_plugins}; do
109
for allowed_plugin in ${allowed_plugins}; do
110
case ${wanted_plugin} in
112
# List all plugins as being used
113
used_plugins=${allowed_plugins}
116
# List all plugins as being used
117
used_plugins=${allowed_plugins}
119
${allowed_plugin}) used_plugins="${used_plugins} ${wanted_plugin}";; # List the plugin
125
# Check for plugin-specific requirements and error if necessary
126
for plugin in ${used_plugins}; do
131
PKG_CHECK_MODULES(NST_EBOOK, libebook-1.2 >= $EBOOK_REQUIRED,
132
enable_evolution=yes, enable_evolution=no)
133
if test "${enable_evolution}" != "yes" ; then
134
plugin_error_or_ignore "you need libebook from evolution-data-server to build the Evolution plugin"
137
saved_CPPFLAGS="$CPPFLAGS"
138
CPPFLAGS="$CPPFLAGS $NST_EBOOK_CFLAGS"
139
AC_CHECK_TYPES([EContactPhotoType], , , [#include <libebook/e-contact.h>])
140
CPPFLAGS="$saved_CPPFLAGS"
145
[AS_HELP_STRING(--with-gajim,[Path to Gajim install prefix])],
146
[GAJIM_PATH="$withval"],[GAJIM_PATH="$prefix"])
148
GAJIM_SHARE_DIR="$GAJIM_PATH"/share/gajim
150
PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED,
152
AC_SUBST(DBUS_CFLAGS)
155
AC_DEFINE_UNQUOTED(GAJIM_SHARE_DIR, "$GAJIM_SHARE_DIR", [path to gajim share dir])
161
if test "${enable_gajim}" != "yes" ; then
162
plugin_error_or_ignore "you need gajim and dbus-glib installed for the gajim plugin"
167
PKG_CHECK_MODULES(GIO, gio-2.0,
168
enable_burn=yes, enable_burn=no)
169
if test "${enable_burn}" != "yes" ; then
170
plugin_error_or_ignore "you need gio installed for the nautilus-burn plugin"
175
PKG_CHECK_MODULES(PIDGIN, dbus-glib-1 >= $DBUS_GLIB_REQUIRED,
176
enable_pidgin=yes, enable_pidgin=no)
177
if test "${enable_pidgin}" != "yes" ; then
178
plugin_error_or_ignore "you need dbus-glib to build the pidgin plugin"
183
PKG_CHECK_MODULES(GIO, gio-2.0,
184
enable_removable=yes, enable_removable=no)
185
if test "${enable_removable}" != "yes" ; then
186
plugin_error_or_ignore "you need gio-2.0 to build the removable-devices plugin"
191
PKG_CHECK_MODULES(UPNP, gupnp-1.0 >= $GUPNP_REQUIRED,
192
enable_upnp=yes, enable_upnp=no)
193
if test "${enable_upnp}" != "yes" ; then
194
plugin_error_or_ignore "you need gupnp installed for the upnp plugin"
200
# Add the specified plugin
201
if test "${add_plugin}" = "1" ; then
202
used_plugins2="${used_plugins2} ${plugin}"
206
ALL_PLUGINS=$allowed_plugins
207
PLUGINS=$used_plugins2
209
dnl Error out if no plugins will be built
210
if test -z "${PLUGINS}" ; then
211
AC_MSG_ERROR([No plugins will be built, and nautilus-sendto requires at least one])
214
AC_MSG_CHECKING([which plugins to compile])
215
AC_MSG_RESULT([$PLUGINS])
217
AC_SUBST([ALL_PLUGINS])
220
dnl For the pidgin plugin
221
AM_CONDITIONAL(HAVE_PIDGIN, test "x$enable_pidgin" = "xyes")
223
dnl For the GIO based plugins
225
if test "x$enable_burn" = "xyes" -o "x$enable_removable" = "xyes"; then
226
enable_nst_common=yes
228
AM_CONDITIONAL(HAVE_GIO, test "x$enable_nst_common" = "xyes")
230
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
231
AC_SUBST(GLIB_GENMARSHAL)
233
IT_PROG_INTLTOOL([0.35.0])
235
GETTEXT_PACKAGE=nautilus-sendto
236
AC_SUBST(GETTEXT_PACKAGE)
237
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [GetText Package])
244
src/nautilus-sendto.pc
246
src/plugins/evolution/Makefile
247
src/plugins/gajim/Makefile
248
src/plugins/nautilus-burn/Makefile
249
src/plugins/pidgin/Makefile
250
src/plugins/removable-devices/Makefile
251
src/plugins/upnp/Makefile
253
docs/nautilus-sendto/Makefile
254
docs/nautilus-sendto/version.xml
258
echo "-------------------------------------------------------"
261
if test "x${PLUGINS}" != "x" ; then
262
for allowed_plugin in ${ALL_PLUGINS}; do
263
for plugin in ${PLUGINS}; do
264
case ${allowed_plugin} in
266
AC_MSG_NOTICE([** ${allowed_plugin} plugin enabled])
272
AC_MSG_NOTICE([ ${allowed_plugin} plugin disabled])
275
AC_MSG_NOTICE([ No nautilus-sendto plugins enabled])
279
echo "-------------------------------------------------------"