~ubuntu-branches/ubuntu/natty/gvfs/natty

« back to all changes in this revision

Viewing changes to .pc/debian-changes-1.7.3-0ubuntu1/configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-03-22 11:11:57 UTC
  • Revision ID: james.westby@ubuntu.com-20110322111157-tn8edztqci0xr9hk
Correctly update using merge-upstream otherwise the diff will be reverted
in the diff.gz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
AC_INIT(client/gdaemonvfs.h)
2
 
 
3
 
AM_INIT_AUTOMAKE(gvfs, 1.7.3)
4
 
AM_CONFIG_HEADER(config.h)
5
 
 
6
 
AM_SANITY_CHECK
7
 
 
8
 
AC_C_CONST
9
 
AC_ISC_POSIX
10
 
AC_PROG_CC
11
 
AC_PROG_CPP
12
 
AC_PROG_INSTALL
13
 
AC_PROG_LN_S
14
 
AC_PROG_MAKE_SET
15
 
AM_DISABLE_STATIC
16
 
AM_PROG_LIBTOOL
17
 
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
18
 
AC_PATH_PROG(GIO_QUERYMODULES, gio-querymodules, no)
19
 
AM_PROG_CC_C_O
20
 
AC_PROG_SED
21
 
 
22
 
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
23
 
 
24
 
AC_TYPE_PID_T
25
 
AC_TYPE_SIGNAL
26
 
AC_TYPE_SIZE_T
27
 
AC_TYPE_UID_T
28
 
 
29
 
GLIB_GSETTINGS
30
 
 
31
 
AH_VERBATIM([_GNU_SOURCE],
32
 
[/* Enable GNU extensions on systems that have them.  */
33
 
#ifndef _GNU_SOURCE
34
 
#  define _GNU_SOURCE
35
 
#endif])
36
 
        
37
 
saved_CFLAGS=$CFLAGS
38
 
AC_CHECK_MEMBERS([struct stat.st_mtimensec, struct stat.st_mtim.tv_nsec, struct stat.st_atimensec, struct stat.st_atim.tv_nsec, struct stat.st_ctimensec, struct stat.st_ctim.tv_nsec])
39
 
CFLAGS=$saved_CFLAGS
40
 
 
41
 
LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
42
 
AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
43
 
                        
44
 
GTK_DOC_CHECK
45
 
DISTCHECK_CONFIGURE_FLAGS="--enable-gtk-doc"
46
 
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
47
 
 
48
 
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.27.4 gthread-2.0 gobject-2.0 gmodule-no-export-2.0 gio-unix-2.0 gio-2.0 )
49
 
 
50
 
PKG_CHECK_MODULES(DBUS, dbus-1)
51
 
 
52
 
AC_ARG_WITH(dbus_service_dir,
53
 
                AS_HELP_STRING([--with-dbus-service-dir=PATH],[choose directory for dbus service files, [default=PREFIX/share/dbus-1/services]]),
54
 
            with_dbus_service_dir="$withval", with_dbus_service_dir=$datadir/dbus-1/services)
55
 
DBUS_SERVICE_DIR=$with_dbus_service_dir
56
 
AC_SUBST(DBUS_SERVICE_DIR)
57
 
 
58
 
giomodulesdir=$libdir/gio/modules
59
 
AC_SUBST(giomodulesdir)
60
 
 
61
 
dnl ****************************
62
 
dnl *** Checks for intltool  ***
63
 
dnl ****************************
64
 
 
65
 
IT_PROG_INTLTOOL([0.35.0])
66
 
GETTEXT_PACKAGE=gvfs
67
 
 
68
 
AC_SUBST([GETTEXT_PACKAGE])
69
 
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gettext domain name])
70
 
AM_GLIB_GNU_GETTEXT
71
 
 
72
 
dnl ****************************
73
 
dnl *** Checks for gettext   ***
74
 
dnl ****************************
75
 
 
76
 
dnl *** disabled by now, using intltool ***
77
 
dnl *** we'll revert when glib-gettexttize will be able
78
 
dnl *** to manage [enconding: UTF-8] in POTIFILES.in
79
 
 
80
 
dnl GETTEXT_PACKAGE=gvfs
81
 
dnl AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext domain name])
82
 
dnl AC_SUBST(GETTEXT_PACKAGE)
83
 
 
84
 
dnl ALL_LINGUAS=""
85
 
 
86
 
dnl AM_GLIB_GNU_GETTEXT
87
 
 
88
 
dnl LIBS="$LIBS $INTLLIBS"
89
 
 
90
 
dnl AM_GLIB_DEFINE_LOCALEDIR(GVFS_LOCALEDIR)
91
 
 
92
 
dnl ****************************
93
 
dnl *** Checks for ssh stuff ***
94
 
dnl ****************************
95
 
 
96
 
AC_PATH_PROG(SSH_PROGRAM, ssh, "ssh")
97
 
 
98
 
dnl ****************************
99
 
dnl *** Checks for pty stuff ***
100
 
dnl ****************************
101
 
 
102
 
AC_CHECK_HEADERS(sys/un.h stropts.h termios.h utmp.h sys/uio.h sys/param.h)
103
 
 
104
 
# Check for PTY handling functions.
105
 
AC_CHECK_FUNCS(getpt posix_openpt grantpt unlockpt ptsname ptsname_r)
106
 
 
107
 
# Pull in the right libraries for various functions which might not be
108
 
# bundled into an exploded libc.
109
 
AC_CHECK_FUNC(socketpair,[have_socketpair=1],AC_CHECK_LIB(socket,socketpair,[have_socketpair=1; LIBS="$LIBS -lsocket"]))
110
 
if test x$have_socketpair = x1 ; then
111
 
        AC_DEFINE(HAVE_SOCKETPAIR,1,[Define if you have the socketpair function.])
112
 
fi
113
 
 
114
 
AC_SEARCH_LIBS(login_tty, util, [AC_DEFINE([HAVE_LOGIN_TTY],[],[Whether login_tty is available])])
115
 
 
116
 
dnl **************************************************
117
 
dnl *** Check if we should build with http backend ***
118
 
dnl **************************************************
119
 
AC_ARG_ENABLE(http, AS_HELP_STRING([--disable-http],[build without http/dav backend]))
120
 
msg_http=no
121
 
HTTP_CFLAGS=
122
 
HTTP_LIBS=
123
 
 
124
 
if test "x$enable_http" != "xno"; then
125
 
  PKG_CHECK_EXISTS(libsoup-gnome-2.4 >= 2.26.0, msg_http=yes)
126
 
 
127
 
  if test "x$msg_http" = "xyes"; then
128
 
    PKG_CHECK_MODULES(HTTP, libsoup-gnome-2.4 libxml-2.0)
129
 
    AC_DEFINE(HAVE_HTTP, 1, [Define to 1 if http/dav is going to be built])
130
 
  fi
131
 
fi
132
 
 
133
 
AC_SUBST(HTTP_CFLAGS)
134
 
AC_SUBST(HTTP_LIBS)
135
 
AM_CONDITIONAL(HAVE_HTTP, [test "$msg_http" = "yes"])
136
 
 
137
 
dnl **************************************************
138
 
dnl *** Check if we should build with DNS-SD backend ***
139
 
dnl **************************************************
140
 
AM_CONDITIONAL(HAVE_AVAHI, false)
141
 
                          
142
 
AC_ARG_ENABLE(avahi, AS_HELP_STRING([--disable-avahi],[build without avahi support]))
143
 
msg_avahi=no
144
 
if test "x$enable_avahi" != "xno"; then
145
 
        PKG_CHECK_MODULES(AVAHI, avahi-glib >= 0.6 avahi-client >= 0.6,
146
 
                        [AM_CONDITIONAL(HAVE_AVAHI, true)
147
 
                        AC_DEFINE(HAVE_AVAHI, [], [Set if we can use avahi])]
148
 
                        msg_avahi=yes,
149
 
                        [AM_CONDITIONAL(HAVE_AVAHI, false)])
150
 
        AC_SUBST(AVAHI_CFLAGS)
151
 
        AC_SUBST(AVAHI_LIBS)
152
 
fi
153
 
 
154
 
dnl ************************
155
 
dnl *** Check for libXML ***
156
 
dnl ************************
157
 
PKG_CHECK_MODULES(LIBXML, libxml-2.0,
158
 
        [AM_CONDITIONAL(HAVE_LIBXML, true)
159
 
        AC_DEFINE(HAVE_LIBXML, [], [Set if we have libxml])]
160
 
        msg_libxml=yes,
161
 
        [AM_CONDITIONAL(HAVE_LIBXML, false)])
162
 
 
163
 
dnl *************************
164
 
dnl *** Check for libudev ***
165
 
dnl *************************
166
 
AC_ARG_ENABLE(udev, AS_HELP_STRING([--disable-udev],[build without libudev]))
167
 
msg_udev=no
168
 
UDEV_CFLAGS=
169
 
UDEV_LIBS=
170
 
 
171
 
if test "x$enable_udev" != "xno"; then
172
 
  PKG_CHECK_EXISTS(libudev >= 138, msg_udev=yes)
173
 
 
174
 
  if test "x$msg_udev" = "xyes"; then
175
 
    PKG_CHECK_MODULES(UDEV, libudev)
176
 
    AC_DEFINE(HAVE_LIBUDEV, 1, [Define to 1 if libudev availible])
177
 
  fi
178
 
fi
179
 
 
180
 
dnl **********************
181
 
dnl *** Check for FUSE ***
182
 
dnl **********************
183
 
AC_ARG_ENABLE(fuse, AS_HELP_STRING([--disable-fuse],[build without FUSE support]))
184
 
msg_fuse=no
185
 
FUSE_LIBS=
186
 
FUSE_CFLAGS=
187
 
 
188
 
if test "x$enable_fuse" != "xno"; then
189
 
  PKG_CHECK_EXISTS(fuse, msg_fuse=yes)
190
 
 
191
 
  if test "x$msg_fuse" = "xyes"; then
192
 
    PKG_CHECK_MODULES(FUSE, fuse >= 2.8.0)
193
 
    AC_DEFINE(HAVE_FUSE, 1, [Define to 1 if FUSE is available])
194
 
  fi
195
 
fi
196
 
 
197
 
AM_CONDITIONAL(USE_FUSE, [test "$msg_fuse" = "yes"])
198
 
 
199
 
dnl ********************************************
200
 
dnl *** Check for expat (for obexftp and gdu ***
201
 
dnl ********************************************
202
 
 
203
 
dnl Make sure we have expat
204
 
AC_CHECK_LIB(expat, XML_ParserCreate_MM,
205
 
             [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
206
 
             have_expat=false)
207
 
if test "x$have_expat" = "xtrue"; then
208
 
  EXPAT_CFLAGS=""
209
 
  EXPAT_LIBS="-lexpat"
210
 
  AC_DEFINE(HAVE_EXPAT,, [Define to 1 if you have expat available])
211
 
fi
212
 
AC_SUBST(EXPAT_CFLAGS)
213
 
AC_SUBST(EXPAT_LIBS)
214
 
 
215
 
dnl ************************************
216
 
dnl *** Check for gnome-disk-utility ***
217
 
dnl ************************************
218
 
 
219
 
AC_ARG_ENABLE(gdu, AS_HELP_STRING([--disable-gdu],[build without GDU volume monitor]))
220
 
msg_gdu=no
221
 
GDU_LIBS=
222
 
GDU_CFLAGS=
223
 
GDU_REQUIRED=2.29.0
224
 
 
225
 
if test "x$enable_gdu" != "xno"; then
226
 
  PKG_CHECK_EXISTS([gdu >= $GDU_REQUIRED], msg_gdu=yes)
227
 
 
228
 
  if test "x$msg_gdu" = "xyes"; then
229
 
    PKG_CHECK_MODULES([GDU],[gdu >= $GDU_REQUIRED])
230
 
    AC_DEFINE(HAVE_GDU, 1, [Define to 1 if gnome-disk-utility is available])
231
 
  fi
232
 
fi
233
 
 
234
 
AM_CONDITIONAL(USE_GDU, [test "$msg_gdu" = "yes"])
235
 
 
236
 
dnl **********************
237
 
dnl *** Check for HAL ***
238
 
dnl **********************
239
 
AC_ARG_ENABLE(hal, AS_HELP_STRING([--disable-hal],[build without HAL support]))
240
 
msg_hal=no
241
 
have_hal_fast_init=no
242
 
HAL_LIBS=
243
 
HAL_CFLAGS=
244
 
HAL_REQUIRED=0.5.10
245
 
 
246
 
if test "x$enable_hal" != "xno" && test "x$msg_gdu" = "xno"; then
247
 
  PKG_CHECK_EXISTS([hal >= $HAL_REQUIRED], msg_hal=yes)
248
 
 
249
 
  if test "x$msg_hal" = "xyes"; then
250
 
    PKG_CHECK_MODULES([HAL],[hal >= $HAL_REQUIRED])
251
 
    AC_DEFINE(HAVE_HAL, 1, [Define to 1 if HAL is available])
252
 
    save_libs="$LIBS"
253
 
    LIBS="$HAL_LIBS"
254
 
    AC_CHECK_LIB(hal, libhal_get_all_devices_with_properties, have_hal_fast_init=yes)
255
 
    if test "x$have_hal_fast_init" = "xyes"; then
256
 
      AC_DEFINE(HAVE_HAL_FAST_INIT, 1, [Define to 1 if libhal_get_all_devices_with_properties is available])
257
 
    fi
258
 
    LIBS="$save_libs"
259
 
  fi
260
 
fi
261
 
 
262
 
AM_CONDITIONAL(USE_HAL, [test "$msg_hal" = "yes"])
263
 
 
264
 
dnl **********************
265
 
dnl *** Check for gudev ***
266
 
dnl **********************
267
 
AC_ARG_ENABLE(gudev, AS_HELP_STRING([--disable-gudev],[build without gudev support]))
268
 
msg_gudev=no
269
 
GUDEV_REQUIRED=001
270
 
 
271
 
if test "x$enable_gudev" != "xno"; then
272
 
  PKG_CHECK_EXISTS([gudev-1.0 >= $GUDEV_REQUIRED], msg_gudev=yes)
273
 
 
274
 
  if test "x$msg_gudev" = "xyes"; then
275
 
    PKG_CHECK_MODULES(GUDEV, [gudev-1.0 >= $GUDEV_REQUIRED])
276
 
    AC_DEFINE(HAVE_GUDEV, 1, [Define to 1 if gudev is available])
277
 
  fi
278
 
fi
279
 
AM_CONDITIONAL(USE_GUDEV, [test "$msg_gudev" = "yes"])
280
 
 
281
 
if test "x$msg_gudev" = "xyes"; then
282
 
  msg_hotplug_backend="gudev"
283
 
else 
284
 
  if test "x$msg_hal" = "xyes"; then
285
 
    msg_hotplug_backend="hal"
286
 
  else
287
 
    msg_hotplug_backend="none"
288
 
  fi
289
 
fi
290
 
 
291
 
dnl **************************************************
292
 
dnl *** Check if we should build with CDDA backend ***
293
 
dnl **************************************************
294
 
AC_ARG_ENABLE(cdda, AS_HELP_STRING([--disable-cdda],[build without CDDA backend]))
295
 
msg_cdda=no
296
 
CDDA_LIBS=
297
 
CDDA_CFLAGS=
298
 
 
299
 
if test "x$enable_cdda" != "xno" -a \( "x$msg_hal" = "xyes" -o "x$msg_gudev" = "xyes" \); then
300
 
  PKG_CHECK_EXISTS(libcdio_paranoia >= 0.78.2, msg_cdda=yes)
301
 
 
302
 
  if test "x$msg_cdda" = "xyes"; then
303
 
    PKG_CHECK_MODULES(CDDA, libcdio_paranoia)
304
 
    AC_DEFINE(HAVE_CDDA, 1, [Define to 1 if CDDA is going to be built])
305
 
  fi
306
 
fi
307
 
 
308
 
AM_CONDITIONAL(USE_CDDA, [test "$msg_cdda" = "yes"])
309
 
 
310
 
dnl *************************************************
311
 
dnl *** Check if we should build with AFC backend ***
312
 
dnl *************************************************
313
 
AC_ARG_ENABLE(afc, AS_HELP_STRING([--disable-afc],[build without AFC backend]))
314
 
msg_afc=no
315
 
AFC_LIBS=
316
 
AFC_CFLAGS=
317
 
 
318
 
if test "x$enable_afc" != "xno" ; then
319
 
  PKG_CHECK_EXISTS(libimobiledevice-1.0 >= 1.1.0 libplist >= 0.15, msg_afc=yes)
320
 
 
321
 
  if test "x$msg_afc" = "xyes"; then
322
 
    PKG_CHECK_MODULES(AFC, libimobiledevice-1.0 libplist)
323
 
    AC_DEFINE(HAVE_AFC, 1, [Define to 1 if AFC is going to be built])
324
 
  fi
325
 
fi
326
 
 
327
 
AC_SUBST(AFC_LIBS)
328
 
AC_SUBST(AFC_CFLAGS)
329
 
 
330
 
AM_CONDITIONAL(USE_AFC, [test "$msg_afc" = "yes"])
331
 
 
332
 
dnl *****************************************************
333
 
dnl *** Check if we should build with obexftp backend ***
334
 
dnl *****************************************************
335
 
AC_ARG_ENABLE(obexftp, AS_HELP_STRING([--disable-obexftp],[build without ObexFTP backend]))
336
 
msg_obexftp=no
337
 
OBEXFTP_LIBS=
338
 
OBEXFTP_CFLAGS=
339
 
 
340
 
if test "x$enable_obexftp" != "xno";  then
341
 
  PKG_CHECK_EXISTS(dbus-glib-1 bluez >= 4.0, msg_obexftp=yes)
342
 
 
343
 
  if test "x$msg_obexftp" = "xyes" -a "x$have_expat" = "xtrue"; then
344
 
    PKG_CHECK_MODULES(OBEXFTP, dbus-glib-1 bluez >= 4.0)
345
 
    AC_SUBST(OBEXFTP_LIBS)
346
 
    AC_SUBST(OBEXFTP_CFLAGS)
347
 
 
348
 
    msg_obexftp=yes
349
 
    AC_DEFINE(HAVE_OBEXFTP, 1, [Define to 1 if ObexFTP is going to be built])
350
 
  else
351
 
    msg_obexftp=no
352
 
  fi
353
 
fi
354
 
 
355
 
AM_CONDITIONAL(USE_OBEXFTP, [test "$msg_obexftp" = "yes"])
356
 
 
357
 
dnl *************************
358
 
dnl *** Check for gphoto2 ***
359
 
dnl *************************
360
 
AC_ARG_ENABLE(gphoto2, AS_HELP_STRING([--disable-gphoto2],[build without gphoto2 support]))
361
 
msg_gphoto2=no
362
 
GPHOTO2_LIBS=
363
 
GPHOTO2_CFLAGS=
364
 
 
365
 
if test "x$enable_gphoto2" != "xno" -a \( "x$msg_hal" = "xyes" -o "x$msg_gudev" = "xyes" \); then
366
 
  PKG_CHECK_EXISTS(libgphoto2, msg_gphoto2=yes)
367
 
 
368
 
  # Need OS tweaks in hal volume monitor backend
369
 
  case "$host" in
370
 
    *-linux* | *-freebsd* | *-kfreebsd*-gnu)
371
 
      use_gphoto2=yes
372
 
      ;;
373
 
    *)
374
 
      use_gphoto2=no
375
 
      ;;
376
 
  esac
377
 
 
378
 
  if test "x$msg_gphoto2" = "xyes"; then
379
 
    if test "x$use_gphoto2" = "xyes"; then
380
 
      PKG_CHECK_MODULES(GPHOTO2, libgphoto2 >= 2.4.0)
381
 
      AC_DEFINE(HAVE_GPHOTO2, 1, [Define to 1 if gphoto2 is available])
382
 
    else
383
 
      AC_MSG_WARN([Not building with gphoto2 support. Need OS tweaks in hal volume monitor.])
384
 
      msg_gphoto2=no
385
 
    fi
386
 
  fi
387
 
fi
388
 
 
389
 
AM_CONDITIONAL(USE_GPHOTO2, [test "$msg_gphoto2" = "yes"])
390
 
 
391
 
dnl *******************************
392
 
dnl *** Check for GNOME Keyring ***
393
 
dnl *******************************
394
 
AC_ARG_ENABLE(keyring, AS_HELP_STRING([--disable-keyring],[build without GNOME Keyring support]))
395
 
msg_keyring=no
396
 
KEYRING_LIBS=
397
 
KEYRING_CFLAGS=
398
 
 
399
 
if test "x$enable_keyring" != "xno"; then
400
 
  PKG_CHECK_EXISTS(gnome-keyring-1, msg_keyring=yes)
401
 
 
402
 
  if test "x$msg_keyring" = "xyes"; then
403
 
    PKG_CHECK_MODULES(KEYRING, gnome-keyring-1)
404
 
    AC_DEFINE(HAVE_KEYRING, 1, [Define to 1 if GNOME Keyring is available])
405
 
  fi
406
 
fi
407
 
 
408
 
AM_CONDITIONAL(USE_KEYRING, [test "$msg_keyring" = "yes"])
409
 
 
410
 
dnl ==========================================================================
411
 
dnl Samba 3.0
412
 
 
413
 
AC_ARG_ENABLE(samba, AS_HELP_STRING([--disable-samba],[build without samba support]))
414
 
msg_samba="no"
415
 
if test "x$enable_samba" != "xno"; then
416
 
  AC_ARG_WITH(samba-includes, AS_HELP_STRING([--with-samba-includes=PREFIX],[Location of samba includes.]),
417
 
              with_samba_includes="$withval", with_samba_includes="/usr/include")
418
 
  have_samba_includes="no"
419
 
  if test "x${with_samba_includes}" != "xno"; then
420
 
        CPPFLAGS_save="$CPPFLAGS"
421
 
 
422
 
        CPPFLAGS="$CPPFLAGS -I$with_samba_includes"
423
 
        AC_CHECK_HEADER(libsmbclient.h, [ samba_includes="yes" ])
424
 
        CPPFLAGS="$CPPFLAGS_save"
425
 
        
426
 
        if test "x{samba_includes}" != "xno" -a "x${samba_includes}" != "x"; then
427
 
                have_samba_includes="yes"
428
 
                if test "${with_samba_includes}" != "/usr/include" ; then
429
 
                        SAMBA_CFLAGS="-I$with_samba_includes"
430
 
                else
431
 
                        SAMBA_CFLAGS=""
432
 
                fi
433
 
                
434
 
                CPPFLAGS="$CPPFLAGS -I$with_samba_includes"
435
 
                AC_CHECK_MEMBER(SMBCCTX.flags,
436
 
                                [AC_DEFINE(HAVE_SAMBA_FLAGS,, [Defined if flags available in SMBCCTXT])],,
437
 
                                [#include <libsmbclient.h>])
438
 
                AC_CHECK_MEMBER(SMBCCTX.close,
439
 
                                [AC_DEFINE(HAVE_SAMBA_OLD_CLOSE, , [Defined if old close is available in SMBCCTXT])],,
440
 
                                [#include <libsmbclient.h>])
441
 
                CPPFLAGS="$CPPFLAGS_save"
442
 
        else
443
 
                SAMBA_CFLAGS=""
444
 
        fi
445
 
  fi
446
 
  AC_ARG_WITH(samba-libs, AS_HELP_STRING([--with-samba-libs=PREFIX],[Location of Samba libs.]),
447
 
              with_samba_libs="$withval", with_samba_libs="/usr/lib")
448
 
  if test "x${with_samba_libs}" != "xno" -a "x${have_samba_includes}" != "xno"; then
449
 
        LDFLAGS_save="$LDFLAGS"
450
 
        
451
 
        LDFLAGS="$LDFLAGS -L$with_samba_libs"
452
 
        AC_CHECK_LIB(smbclient, smbc_option_get,samba_libs="yes", samba_libs="no")
453
 
        LDFLAGS="$LDFLAGS_save"
454
 
        if test "x${samba_libs}" != "xno"; then
455
 
                AC_DEFINE(HAVE_SAMBA,, [Define to 1 if you have the samba 3.0 libraries])
456
 
                msg_samba="yes"
457
 
                if test x$with_samba_libs != x/usr/lib; then
458
 
                        SAMBA_LIBS="-L$with_samba_libs -lsmbclient"
459
 
                else
460
 
                        SAMBA_LIBS="-lsmbclient"
461
 
                fi
462
 
                AC_CHECK_LIB(smbclient, smbc_getFunctionStatVFS, 
463
 
                        AC_DEFINE(HAVE_SAMBA_STAT_VFS, , [Define to 1 if smbclient supports smbc_stat_fn]))
464
 
        else
465
 
                AC_CHECK_LIB(smbclient, smbc_new_context,samba_old_libs="yes", samba_old_libs="no")
466
 
                if test "x${samba_old_libs}" != "xno"; then
467
 
                   msg_samba="Too old, need at least samba 3.0.22"
468
 
                fi
469
 
                SAMBA_CFLAGS=""
470
 
                SAMBA_LIBS=""
471
 
        fi
472
 
  fi
473
 
  AC_MSG_CHECKING(for Samba 3.0 libraries)
474
 
  AC_MSG_RESULT($msg_samba)
475
 
fi
476
 
AM_CONDITIONAL(HAVE_SAMBA, test "$msg_samba" = "yes")
477
 
AC_SUBST(SAMBA_CFLAGS)
478
 
AC_SUBST(SAMBA_LIBS)
479
 
 
480
 
dnl ==========================================================================
481
 
 
482
 
dnl ****************************
483
 
dnl *** Check for libarchive ***
484
 
dnl ****************************
485
 
 
486
 
AC_ARG_ENABLE(archive, AS_HELP_STRING([--disable-archive],[build without archive support]))
487
 
msg_archive="no"
488
 
if test "x$enable_archive" != "xno"; then
489
 
  AC_ARG_WITH(archive-includes, AS_HELP_STRING([--with-archive-includes=PREFIX],[Location of archive includes.]),
490
 
              with_archive_includes="$withval", with_archive_includes="/usr/include")
491
 
  have_archive_includes="no"
492
 
  if test "x${with_archive_includes}" != "xno"; then
493
 
        CPPFLAGS_save="$CPPFLAGS"
494
 
 
495
 
        CPPFLAGS="$CPPFLAGS -I$with_archive_includes"
496
 
        AC_CHECK_HEADER(archive.h, [ archive_includes="yes" ])
497
 
        CPPFLAGS="$CPPFLAGS_save"
498
 
        
499
 
        if test "x{archive_includes}" != "xno" -a "x${archive_includes}" != "x"; then
500
 
                have_archive_includes="yes"
501
 
                if test "${with_archive_includes}" != "/usr/include" ; then
502
 
                        ARCHIVE_CFLAGS="-I$with_archive_includes"
503
 
                else
504
 
                        ARCHIVE_CFLAGS=""
505
 
                fi
506
 
        else
507
 
                ARCHIVE_CFLAGS=""
508
 
        fi
509
 
  fi
510
 
  AC_ARG_WITH(archive-libs, AS_HELP_STRING ([--with-archive-libs=PREFIX],[Location of Archive libs.]),
511
 
              with_archive_libs="$withval", with_archive_libs="/usr/lib")
512
 
  if test "x${with_archive_libs}" != "xno" -a "x${have_archive_includes}" != "xno"; then
513
 
        LDFLAGS_save="$LDFLAGS"
514
 
        
515
 
        LDFLAGS="$LDFLAGS -L$with_archive_libs"
516
 
        AC_CHECK_LIB(archive, archive_entry_filetype, archive_libs="yes", archive_libs="no")
517
 
        LDFLAGS="$LDFLAGS_save"
518
 
        if test "x${archive_libs}" != "xno"; then
519
 
                AC_DEFINE(HAVE_ARCHIVE,, [Define to 1 if you have the libarchive library])
520
 
                msg_archive="yes"
521
 
                if test x$with_archive_libs != x/usr/lib; then
522
 
                        ARCHIVE_LIBS="-L$with_archive_libs -larchive"
523
 
                else
524
 
                        ARCHIVE_LIBS="-larchive"
525
 
                fi
526
 
        else
527
 
                AC_CHECK_LIB(archive, archive_entry_filetype, archive_old_libs="yes", archive_old_libs="no")
528
 
                if test "x${archive_old_libs}" != "xno"; then
529
 
                   msg_archive="Too old, need at least archive 3.0.22"
530
 
                fi
531
 
                ARCHIVE_CFLAGS=""
532
 
                ARCHIVE_LIBS=""
533
 
        fi
534
 
  fi
535
 
  AC_MSG_CHECKING(for Archive 3.libraries)
536
 
  AC_MSG_RESULT($msg_archive)
537
 
fi
538
 
AM_CONDITIONAL(HAVE_ARCHIVE, test "$msg_archive" = "yes")
539
 
AC_SUBST(ARCHIVE_CFLAGS)
540
 
AC_SUBST(ARCHIVE_LIBS)
541
 
 
542
 
dnl Install bash-completion file?
543
 
AC_ARG_ENABLE([bash-completion],
544
 
              AC_HELP_STRING([--disable-bash-completion],
545
 
                             [build without bash-completion support]),
546
 
              msg_bash_completion=$enableval,
547
 
              msg_bash_completion=yes)
548
 
if test "x$enable_bash_completion" != "xno"; then
549
 
  msg_bash_completion=yes
550
 
fi
551
 
AM_CONDITIONAL(ENABLE_BASHCOMP, test "$msg_bash_completion" = "yes")
552
 
 
553
 
AC_ARG_WITH([bash-completion-dir],
554
 
            AC_HELP_STRING([--with-bash-completion-dir=PATH],
555
 
                           [choose directory for bash-completion file (default=SYSCONFDIR/profile.d)]),
556
 
            with_bashcomp_dir=$withval,
557
 
            with_bashcomp_dir=$sysconfdir/profile.d)
558
 
BASHCOMP_DIR=$with_bashcomp_dir
559
 
AC_SUBST(BASHCOMP_DIR)
560
 
 
561
 
dnl ==========================================================================
562
 
        
563
 
dnl Globally define_GNU_SOURCE and therefore enable the GNU extensions
564
 
AC_DEFINE(_GNU_SOURCE, 1, [Enable GNU Extensions])
565
 
 
566
 
dnl ==========================================================================
567
 
        
568
 
AC_DEFINE(_FILE_OFFSET_BITS, 64, [Enable LFS])
569
 
                       
570
 
dnl ==========================================================================
571
 
 
572
 
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
573
 
 
574
 
dnl ==========================================================================
575
 
dnl Look for various fs info getters
576
 
 
577
 
AC_CHECK_HEADERS([sys/statfs.h sys/statvfs.h sys/vfs.h sys/mount.h sys/param.h])
578
 
AC_CHECK_FUNCS(statvfs statfs)
579
 
AC_CHECK_MEMBERS([struct statfs.f_fstypename, struct statfs.f_bavail],,, [#include <sys/types.h>
580
 
#include <sys/stat.h>
581
 
#include <unistd.h>
582
 
#ifdef HAVE_SYS_STATFS_H
583
 
#include <sys/statfs.h>
584
 
#endif
585
 
#ifdef HAVE_SYS_PARAM_H
586
 
#include <sys/param.h>
587
 
#endif
588
 
#ifdef HAVE_SYS_MOUNT_H
589
 
#include <sys/mount.h>
590
 
#endif])
591
 
# struct statvfs.f_basetype is available on Solaris but not for Linux. 
592
 
AC_CHECK_MEMBERS([struct statvfs.f_basetype],,, [#include <sys/statvfs.h>])
593
 
 
594
 
dnl
595
 
dnl if statfs() takes 2 arguments (Posix) or 4 (Solaris)
596
 
dnl
597
 
if test "$ac_cv_func_statfs" = yes ; then
598
 
  AC_MSG_CHECKING([number of arguments to statfs()])
599
 
  AC_TRY_COMPILE([#include <unistd.h>
600
 
  #ifdef HAVE_SYS_PARAM_H
601
 
  #include <sys/param.h>
602
 
  #endif
603
 
  #ifdef HAVE_SYS_VFS_H
604
 
  #include <sys/vfs.h>
605
 
  #endif
606
 
  #ifdef HAVE_SYS_MOUNT_H
607
 
  #include <sys/mount.h>
608
 
  #endif
609
 
  #ifdef HAVE_SYS_STATFS_H
610
 
  #include <sys/statfs.h>
611
 
  #endif], [struct statfs st;
612
 
  statfs(NULL, &st);],[
613
 
    AC_MSG_RESULT([2])
614
 
    AC_DEFINE(STATFS_ARGS, 2, [Number of arguments to statfs()])],[
615
 
    AC_TRY_COMPILE([#include <unistd.h>
616
 
  #ifdef HAVE_SYS_PARAM_H
617
 
  #include <sys/param.h>
618
 
  #endif
619
 
  #ifdef HAVE_SYS_VFS_H
620
 
  #include <sys/vfs.h>
621
 
  #endif
622
 
  #ifdef HAVE_SYS_MOUNT_H
623
 
  #include <sys/mount.h>
624
 
  #endif
625
 
  #ifdef HAVE_SYS_STATFS_H
626
 
  #include <sys/statfs.h>
627
 
  #endif], [struct statfs st;
628
 
  statfs(NULL, &st, sizeof (st), 0);],[
629
 
      AC_MSG_RESULT([4])
630
 
      AC_DEFINE(STATFS_ARGS, 4, [Number of arguments to statfs()])],[
631
 
      AC_MSG_RESULT(unknown)
632
 
      AC_MSG_ERROR([unable to determine number of arguments to statfs()])])])
633
 
fi
634
 
 
635
 
dnl ==========================================================================
636
 
dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
637
 
 
638
 
AC_ARG_ENABLE(more-warnings,
639
 
AS_HELP_STRING([--enable-more-warnings],[Maximum compiler warnings]),
640
 
set_more_warnings="$enableval",[
641
 
if test -f $srcdir/CVSVERSION; then
642
 
        is_cvs_version=true
643
 
        set_more_warnings=yes
644
 
else
645
 
        set_more_warnings=no
646
 
fi
647
 
])
648
 
AC_MSG_CHECKING(for more warnings, including -Werror)
649
 
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
650
 
        AC_MSG_RESULT(yes)
651
 
        CFLAGS="\
652
 
        -Wall \
653
 
        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
654
 
        -Wnested-externs -Wpointer-arith \
655
 
        -Wcast-align -Wsign-compare \
656
 
        $CFLAGS"
657
 
 
658
 
        for option in -Wno-strict-aliasing -Wno-sign-compare -Wtype-limits; do
659
 
                SAVE_CFLAGS="$CFLAGS"
660
 
                CFLAGS="$CFLAGS $option"
661
 
                AC_MSG_CHECKING([whether gcc understands $option])
662
 
                AC_TRY_COMPILE([], [],
663
 
                        has_option=yes,
664
 
                        has_option=no,)
665
 
                if test $has_option = no; then
666
 
                        CFLAGS="$SAVE_CFLAGS"
667
 
                fi
668
 
                AC_MSG_RESULT($has_option)
669
 
                unset has_option
670
 
                unset SAVE_CFLAGS
671
 
        done
672
 
        unset option
673
 
else
674
 
        AC_MSG_RESULT(no)
675
 
fi
676
 
 
677
 
AC_OUTPUT([
678
 
Makefile
679
 
common/Makefile
680
 
client/Makefile
681
 
metadata/Makefile
682
 
daemon/trashlib/Makefile
683
 
daemon/Makefile
684
 
monitor/Makefile
685
 
monitor/proxy/Makefile
686
 
monitor/hal/Makefile
687
 
monitor/gdu/Makefile
688
 
monitor/gphoto2/Makefile
689
 
monitor/afc/Makefile
690
 
programs/Makefile
691
 
test/Makefile
692
 
po/Makefile.in
693
 
])
694
 
 
695
 
echo 
696
 
echo "gvfs configuration summary:"
697
 
echo "
698
 
        gio module directory : $giomodulesdir
699
 
 
700
 
        hotplug backend:              $msg_hotplug_backend
701
 
 
702
 
        FTP/HTTP/WebDAV support       $msg_http
703
 
        ObexFTP support               $msg_obexftp
704
 
        Samba support:                $msg_samba
705
 
        FUSE support:                 $msg_fuse
706
 
        CDDA support:                 $msg_cdda
707
 
        Gphoto2 support:              $msg_gphoto2
708
 
        archive support:              $msg_archive
709
 
        AFC support:                  $msg_afc
710
 
        DNS-SD support:               $msg_avahi
711
 
        Build HAL volume monitor:     $msg_hal (with fast init path: $have_hal_fast_init)
712
 
        Build GDU volume monitor:     $msg_gdu
713
 
        GNOME Keyring support:        $msg_keyring
714
 
        Bash-completion support:      $msg_bash_completion
715
 
"
716
 
 
717
 
# The gudev gphoto monitor needs a recent libgphoto; point to the required patch if the version is too old
718
 
if test "x$msg_gudev" = "xyes"; then
719
 
  PKG_CHECK_EXISTS(libgphoto2 >= 2.4.7,, msg_gphoto_patch=yes)
720
 
  if test "x$msg_gphoto_patch" = "xyes"; then
721
 
    AC_MSG_WARN([You are using a libgphoto2 version earlier than 2.4.7. To work with gudev, you must apply the patch in http://sourceforge.net/tracker/?func=detail&aid=2801117&group_id=8874&atid=308874])
722
 
  fi
723
 
fi
724