~ubuntu-branches/ubuntu/quantal/nautilus-sendto/quantal

« back to all changes in this revision

Viewing changes to .pc/use-gio-for-default-mailer.patch/configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2011-07-27 23:43:01 UTC
  • Revision ID: james.westby@ubuntu.com-20110727234301-krhefa9ee45638qk
Tags: 3.0.0-1ubuntu3
* Fix LP: #757976 - Attachment paths are mangled when sending via Thunderbird.
  Thunderbird doesn't properyly unescape the attachment URI's specified
  on the command line, so just send the unescaped filenames rather than
  converting them to file:/// URI's
  - add debian/patches/no-uris-for-thunderbird.patch
  - update debian/patches/series 
* Use GIO for the default mailer check rather than the deprecated gconf, to
  ensure we pick up the correct preffered mail client
  - add debian/patches/use-gio-for-default-mailer.patch
  - update debian/patches/series
  - update debian/rules to run autoreconf

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_PREREQ(2.52)
 
2
 
 
3
AC_INIT(nautilus-sendto, 3.0.0, http://www.gnome.org)
 
4
AM_CONFIG_HEADER(config.h)
 
5
 
 
6
AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip check-news])
 
7
 
 
8
# Enable silent build when available (Automake 1.11)
 
9
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
10
 
 
11
AM_MAINTAINER_MODE
 
12
 
 
13
AM_DISABLE_STATIC
 
14
AC_PROG_CC
 
15
AM_PROG_LIBTOOL
 
16
AC_PROG_INSTALL
 
17
AC_PROG_MAKE_SET
 
18
GLIB_GSETTINGS
 
19
 
 
20
dnl gtk-doc checks
 
21
GTK_DOC_CHECK(1.9)
 
22
 
 
23
GNOME_COMMON_INIT
 
24
GNOME_DEBUG_CHECK
 
25
GNOME_COMPILE_WARNINGS([maximum])
 
26
GNOME_CXX_WARNINGS
 
27
GNOME_MAINTAINER_MODE_DEFINES
 
28
 
 
29
ERROR_CFLAGS="-Wall -Wextra -Werror -Wno_missing_field_initializers -Wno_unused_parameter"
 
30
 
 
31
dnl --------------------------------------------------
 
32
 
 
33
GLIB_REQUIRED=2.25.9
 
34
GTHREAD_REQUIRED=2.6.0
 
35
GTK_REQUIRED=2.90.3
 
36
EBOOK_REQUIRED=1.5.3
 
37
NAUTILUS_EXTENSION=2.31.3
 
38
DBUS_REQUIRED=1.0
 
39
DBUS_GLIB_REQUIRED=0.60
 
40
GUPNP_REQUIRED=0.13
 
41
 
 
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)
 
50
 
 
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)
 
58
 
 
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)
 
63
 
 
64
dnl Get nautilus extensions directory
 
65
dnl ---------------------------------
 
66
 
 
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`
 
73
fi
 
74
 
 
75
AC_MSG_NOTICE([installing nautilus plugin in ${ac_with_nautilusdir}])
 
76
AC_SUBST([NAUTILUS_EXTENSION_DIR],[${ac_with_nautilusdir}])
 
77
 
 
78
# The full list of plugins
 
79
allowed_plugins="evolution gajim nautilus-burn pidgin removable-devices upnp"
 
80
 
 
81
plugin_error_or_ignore()
 
82
{
 
83
        if test "${error_on_bad_plugin}" = "1" ; then
 
84
                AC_MSG_ERROR([$1])
 
85
        else
 
86
                AC_MSG_WARN([$1 (disabling plugin)])
 
87
        fi
 
88
}
 
89
 
 
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])
 
93
 
 
94
used_plugins=""
 
95
used_plugins2=""
 
96
 
 
97
if test "x${with_plugins}" = "xautodetect" ; then
 
98
        # Default to all plugins and just ignore them if they won't compile
 
99
        with_plugins="all"
 
100
        error_on_bad_plugin="0"
 
101
else
 
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"
 
105
fi
 
106
 
 
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
 
111
                        all)
 
112
                                # List all plugins as being used
 
113
                                used_plugins=${allowed_plugins}
 
114
                        ;;
 
115
                        autodetect)
 
116
                                # List all plugins as being used
 
117
                                used_plugins=${allowed_plugins}
 
118
                        ;;
 
119
                        ${allowed_plugin}) used_plugins="${used_plugins} ${wanted_plugin}";; # List the plugin
 
120
                        *) ;;
 
121
                esac
 
122
        done
 
123
done
 
124
 
 
125
# Check for plugin-specific requirements and error if necessary
 
126
for plugin in ${used_plugins}; do
 
127
        add_plugin="1"
 
128
 
 
129
        case ${plugin} in
 
130
                evolution)
 
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"
 
135
                                add_plugin="0"
 
136
                        else
 
137
                                saved_CPPFLAGS="$CPPFLAGS"
 
138
                                CPPFLAGS="$CPPFLAGS $NST_EBOOK_CFLAGS"
 
139
                                AC_CHECK_TYPES([EContactPhotoType], , , [#include <libebook/e-contact.h>])
 
140
                                CPPFLAGS="$saved_CPPFLAGS"
 
141
                        fi
 
142
                ;;
 
143
                gajim)
 
144
                        AC_ARG_WITH(gajim,
 
145
                                    [AS_HELP_STRING(--with-gajim,[Path to Gajim install prefix])],
 
146
                                    [GAJIM_PATH="$withval"],[GAJIM_PATH="$prefix"])
 
147
 
 
148
                        GAJIM_SHARE_DIR="$GAJIM_PATH"/share/gajim
 
149
 
 
150
                        PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED,
 
151
                                          [
 
152
                                           AC_SUBST(DBUS_CFLAGS)
 
153
                                           AC_SUBST(DBUS_LIBS)
 
154
                                           enable_gajim=yes
 
155
                                           AC_DEFINE_UNQUOTED(GAJIM_SHARE_DIR, "$GAJIM_SHARE_DIR", [path to gajim share dir])
 
156
                                           ],
 
157
                                           [
 
158
                                            enable_gajim=no
 
159
                                            ]
 
160
                                           )
 
161
                        if test "${enable_gajim}" != "yes" ; then
 
162
                                plugin_error_or_ignore "you need gajim and dbus-glib installed for the gajim plugin"
 
163
                                add_plugin="0"
 
164
                        fi
 
165
                ;;
 
166
                nautilus-burn)
 
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"
 
171
                                add_plugin="0"
 
172
                        fi
 
173
                ;;
 
174
                pidgin)
 
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"
 
179
                                add_plugin="0"
 
180
                        fi
 
181
                ;;
 
182
                removable-devices)
 
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"
 
187
                                add_plugin="0"
 
188
                        fi
 
189
                ;;
 
190
                upnp)
 
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"
 
195
                                add_plugin="0"
 
196
                        fi
 
197
                ;;
 
198
        esac
 
199
 
 
200
        # Add the specified plugin
 
201
        if test "${add_plugin}" = "1" ; then
 
202
                used_plugins2="${used_plugins2} ${plugin}"
 
203
        fi
 
204
done
 
205
 
 
206
ALL_PLUGINS=$allowed_plugins
 
207
PLUGINS=$used_plugins2
 
208
 
 
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])
 
212
fi
 
213
 
 
214
AC_MSG_CHECKING([which plugins to compile])
 
215
AC_MSG_RESULT([$PLUGINS])
 
216
 
 
217
AC_SUBST([ALL_PLUGINS])
 
218
AC_SUBST([PLUGINS])
 
219
 
 
220
dnl For the pidgin plugin
 
221
AM_CONDITIONAL(HAVE_PIDGIN, test "x$enable_pidgin" = "xyes")
 
222
 
 
223
dnl For the GIO based plugins
 
224
enable_nst_common=no
 
225
if test "x$enable_burn" = "xyes" -o "x$enable_removable" = "xyes"; then
 
226
        enable_nst_common=yes
 
227
fi
 
228
AM_CONDITIONAL(HAVE_GIO, test "x$enable_nst_common" = "xyes")
 
229
 
 
230
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
 
231
AC_SUBST(GLIB_GENMARSHAL)
 
232
 
 
233
IT_PROG_INTLTOOL([0.35.0])
 
234
 
 
235
GETTEXT_PACKAGE=nautilus-sendto
 
236
AC_SUBST(GETTEXT_PACKAGE)
 
237
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [GetText Package])
 
238
 
 
239
AM_GLIB_GNU_GETTEXT
 
240
 
 
241
AC_OUTPUT([
 
242
Makefile
 
243
src/Makefile
 
244
src/nautilus-sendto.pc
 
245
src/plugins/Makefile
 
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
 
252
docs/Makefile
 
253
docs/nautilus-sendto/Makefile
 
254
docs/nautilus-sendto/version.xml
 
255
po/Makefile.in
 
256
])
 
257
 
 
258
echo "-------------------------------------------------------"
 
259
echo "                                                       "
 
260
 
 
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
 
265
                                ${plugin})
 
266
                                        AC_MSG_NOTICE([** ${allowed_plugin} plugin enabled])
 
267
                                        continue 2
 
268
                                ;;
 
269
                                *);;
 
270
                        esac
 
271
                done
 
272
                AC_MSG_NOTICE([   ${allowed_plugin} plugin disabled])
 
273
        done
 
274
else
 
275
        AC_MSG_NOTICE([   No nautilus-sendto plugins enabled])
 
276
fi
 
277
 
 
278
echo "                                                       "
 
279
echo "-------------------------------------------------------"