~ubuntu-branches/ubuntu/lucid/transmission/lucid

« back to all changes in this revision

Viewing changes to .pc/dont_build_libevent.patch/configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda, Krzysztof Klimonda, Chris Coulson
  • Date: 2010-03-03 02:55:26 UTC
  • mfrom: (1.1.34 upstream) (2.1.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100303025526-qcjmpnlvk9jv3y5o
Tags: 1.92-0ubuntu1
[ Krzysztof Klimonda ]
* New upstream release (LP: #538034), rebased on debian testing.
  Remaining changes:
  - debian/control:
    + Added replaces & provides clutch (now included as part of transmission).
      Can be removed in lucid+1
    + Added liblaunchpad-integration-dev and lsb-release to Build-Depends
  - debian/rules:
    + create a po template during package build.
  - debian/patches/01_lpi.patch:
    + integrate transmission with launchpad
  - debian/patches/20_add_x-ubuntu-gettext-domain.diff:
    + add x-ubuntu-gettext-domain to .desktop file.
  - debian/transmission-daemon.default:
    - remove --auth from OPTIONS
  - debian/control, debian/rules:
    + build transmission gtk+ client with both gconf and libcanberra support.
  - debian/patches/dont_build_libevent.patch:
    + disable libevent in configure.ac and Makefile.am because we use autotools
      to regenerate build files.
  - lucid/debian/patches/updateminiupnpcstrings_double_escape_slash.patch:
    + Deleted as the bug is fixed upstream
* Fixes bugs:
  - Fix directory selection error in GTK+ 2.19 (LP: #518692)
  - Transmission "Set Location" - dialog doesn't disappear (LP: #529037)
  - The "Torrent Options" dialog's Torrent Priority row gets too much
    vertical stretch (LP: #527299)
  - "Open Folder" behavior can be confusing for single-file torrents
    (LP: #505861)
* Refreshed 99_autoreconf.patch

[ Chris Coulson ]
* debian/patches/disable_web_ui.patch:
  - Disable the web UI by default again (LP: #542194)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl convention: -TR MAJOR MINOR MAINT STATUS - (each a single char)
 
2
dnl STATUS: "X" for prerelease beta builds,
 
3
dnl         "Z" for unsupported trunk builds,
 
4
dnl         "0" for stable, supported releases
 
5
dnl these should be the only two lines you need to change
 
6
m4_define([user_agent_prefix],[1.92])
 
7
m4_define([peer_id_prefix],[-TR1920-])
 
8
 
 
9
AC_INIT([transmission],
 
10
        [user_agent_prefix],
 
11
        [http://trac.transmissionbt.com/newticket])
 
12
AC_SUBST(USERAGENT_PREFIX,[user_agent_prefix])
 
13
AC_SUBST(PEERID_PREFIX,[peer_id_prefix])
 
14
 
 
15
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
16
 
 
17
AC_CONFIG_MACRO_DIR([m4])
 
18
 
 
19
dnl AM_CONFIG_HEADER(config.h)
 
20
AC_CONFIG_SRCDIR(libtransmission/transmission.h)
 
21
AM_INIT_AUTOMAKE([1.9 tar-ustar])
 
22
AC_PROG_LIBTOOL
 
23
 
 
24
if test m4_substr(peer_id_prefix,6,1) = "0"; then
 
25
  supported_build=yes
 
26
  if test "x$GCC" = "xyes" ; then
 
27
    CFLAGS="$CFLAGS -g -O3 "
 
28
    CXXFLAGS="$CXXFLAGS -g -O3 "
 
29
  fi
 
30
  CPPFLAGS="$CPPFLAGS -DNDEBUG"
 
31
else
 
32
  supported_build=no
 
33
  if test "x$GCC" = "xyes" ; then
 
34
    CFLAGS="$CFLAGS -g -O0"
 
35
    CXXFLAGS="$CXXFLAGS -g -O0"
 
36
  fi
 
37
fi
 
38
AM_CONDITIONAL(TR_UNSTABLE, test "x$supported_build" = "xno")
 
39
 
 
40
##
 
41
##
 
42
##   MANDATORY for everything
 
43
##
 
44
##
 
45
CURL_MINIMUM=7.15.4
 
46
AC_SUBST(CURL_MINIMUM)
 
47
LIBEVENT_MINIMUM=1.4.5
 
48
AC_SUBST(LIBEVENT_MINIUM)
 
49
OPENSSL_MINIMUM=0.9.4
 
50
AC_SUBST(OPENSSL_MINIMUM)
 
51
 
 
52
##
 
53
##
 
54
##   MANDATORY for the GTK+ client
 
55
##
 
56
##
 
57
GLIB_MINIMUM=2.6.0
 
58
AC_SUBST(GLIB_MINIMUM)
 
59
GTK_MINIMUM=2.6.0
 
60
AC_SUBST(GTK_MINIMUM)
 
61
 
 
62
##
 
63
##
 
64
##   OPTIONAL for the GTK+ client
 
65
##
 
66
##
 
67
# play the XDG "download done" sound...
 
68
CANBERRA_MINIMUM=0.10
 
69
AC_SUBST(CANBERRA_MINIMUM)
 
70
# inhibit hibernation when a torrent is active...
 
71
DBUS_GLIB_MINIMUM=0.70
 
72
AC_SUBST(DBUS_GLIB_MINIMUM)
 
73
# register the GTK+ client as a magnet link handler...
 
74
GCONF2_MINIMUM=2.20.0
 
75
AC_SUBST(GCONF2_MINIMUM)
 
76
# implement "watch" directories to use new .torrent files...
 
77
GIO_MINIMUM=2.15.5
 
78
AC_SUBST(GIO_MINIMUM)
 
79
# pop up a "download done" notice...
 
80
LIBNOTIFY_MINIMUM=0.4.3
 
81
AC_SUBST(LIBNOTIFY_MINIMUM)
 
82
# create the tray icon with AppIndicator
 
83
LIBAPPINDICATOR_MINIMUM=0.0.11
 
84
  AC_SUBST(LIBAPPINDICATOR_MINIMUM)
 
85
 
 
86
 
 
87
AC_PROG_CC
 
88
AC_PROG_CXX
 
89
AC_C_INLINE
 
90
if test "x$GCC" = "xyes" ; then
 
91
 
 
92
    CFLAGS="$CFLAGS -std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings"
 
93
 
 
94
    dnl figure out gcc version
 
95
    AC_MSG_CHECKING([gcc version])
 
96
    GCC_VERSION=`$CC -dumpversion`
 
97
    GCC_MAJOR=`echo $GCC_VERSION | cut -d . -f1`
 
98
    GCC_MINOR=`echo $GCC_VERSION | cut -d . -f2`
 
99
    GCC_VERSION_NUM=`(expr $GCC_MAJOR "*" 100 + $GCC_MINOR) 2>/dev/null`
 
100
 
 
101
    AC_MSG_RESULT($GCC_VERSION)
 
102
    if test $GCC_VERSION_NUM -ge 304; then
 
103
        dnl these were added in 3.4
 
104
        CFLAGS="$CFLAGS -Wextra -Wdeclaration-after-statement -Winit-self"
 
105
    fi
 
106
fi
 
107
 
 
108
AC_HEADER_STDC
 
109
AC_HEADER_TIME
 
110
 
 
111
AC_CHECK_FUNCS([pread pwrite lrintf strlcpy daemon dirname basename strcasecmp localtime_r fallocate64 posix_fallocate memmem strtold syslog valloc getpagesize posix_memalign])
 
112
AC_PROG_INSTALL
 
113
AC_PROG_MAKE_SET
 
114
ACX_PTHREAD
 
115
 
 
116
if test "x$ac_cv_func_strtold" != "xyes" ; then
 
117
    CPPFLAGS="$CPPFLAGS -Dstrtold=strtod"
 
118
fi
 
119
 
 
120
AC_SEARCH_LIBS(cos, [m])
 
121
AC_SEARCH_LIBS([socket], [socket net])
 
122
AC_SEARCH_LIBS([gethostbyname], [nsl bind])
 
123
PKG_CHECK_MODULES(OPENSSL, [openssl >= $OPENSSL_MINIMUM], , [CHECK_SSL()])
 
124
PKG_CHECK_MODULES(LIBCURL, [libcurl >= $CURL_MINIMUM])
 
125
AC_PATH_ZLIB
 
126
 
 
127
AC_SYS_LARGEFILE
 
128
AC_CHECK_FUNCS([lseek64])
 
129
 
 
130
 
 
131
dnl ----------------------------------------------------------------------------
 
132
dnl
 
133
dnl posix_fadvise
 
134
 
 
135
dnl can posix_fadvise be used
 
136
AC_CHECK_DECLS(posix_fadvise, [], [], [
 
137
#define _XOPEN_SOURCE 600
 
138
#include <fcntl.h>])
 
139
AC_CHECK_FUNCS([posix_fadvise])
 
140
 
 
141
 
 
142
dnl ----------------------------------------------------------------------------
 
143
dnl
 
144
dnl file monitoring for the daemon
 
145
 
 
146
AC_CHECK_HEADER([sys/inotify.h], 
 
147
                [AC_CHECK_FUNC([inotify_init],[have_inotify="yes"],[have_inotify="no"])], 
 
148
                [have_inotify="no"]) 
 
149
AC_ARG_WITH([inotify], 
 
150
            [AS_HELP_STRING([--with-inotify],[Enable inotify support (default=auto)])], 
 
151
            [want_inotify=${withval}], 
 
152
            [want_inotify=${have_inotify}]) 
 
153
if test "x$want_inotify" = "xyes" ; then 
 
154
    if test "x$have_inotify" = "xyes"; then 
 
155
      AC_DEFINE([WITH_INOTIFY],[1]) 
 
156
    else 
 
157
      AC_MSG_ERROR("inotify not found!") 
 
158
    fi 
 
159
fi 
 
160
 
 
161
AC_CHECK_HEADER([sys/event.h], 
 
162
                [AC_CHECK_FUNC([kqueue],[have_kqueue="yes"],[have_kqueue="no"])], 
 
163
                [have_kqueue="no"]) 
 
164
AC_ARG_WITH([kqueue], 
 
165
            [AS_HELP_STRING([--with-kqueue],[Enable kqueue support (default=auto)])], 
 
166
            [want_kqueue=${withval}], 
 
167
            [want_kqueue=${have_kqueue}]) 
 
168
if test "x$want_kqueue" = "xyes" ; then 
 
169
    if test "x$have_kqueue" = "xyes"; then 
 
170
      AC_DEFINE([WITH_KQUEUE],[1]) 
 
171
    else 
 
172
      AC_MSG_ERROR("kqueue not found!") 
 
173
    fi 
 
174
fi 
 
175
 
 
176
AC_CHECK_HEADERS([xfs/xfs.h])
 
177
 
 
178
 
 
179
dnl ----------------------------------------------------------------------------
 
180
dnl
 
181
dnl va_copy
 
182
 
 
183
AC_MSG_CHECKING([how to copy va_list])
 
184
AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; va_copy(ap1, ap2);],
 
185
    AC_MSG_RESULT([va_copy]),
 
186
        [ AH_TEMPLATE([va_copy], [define if va_copy is not available])
 
187
        AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; __va_copy(ap1, ap2);],
 
188
        [ AC_DEFINE([va_copy], [__va_copy])
 
189
        AC_MSG_RESULT([__va_copy])],
 
190
        [ AC_DEFINE([va_copy(dest,src)], [memcpy(&dest,&src,sizeof(va_list))])
 
191
        AC_MSG_RESULT([memcpy])]
 
192
    )
 
193
])
 
194
 
 
195
 
 
196
dnl libevent likes to link against librt if possible
 
197
dnl for clock_gettime() and clock_settime()
 
198
dnl TODO(libevent2): this can probably be removed after
 
199
dnl we switch to libevent2, since it will have PKG_CONFIG
 
200
AC_CHECK_LIB([rt],
 
201
             [clock_gettime],
 
202
             [libevent_extra_libs="-lrt"],
 
203
             [libevent_extra_libs=""])
 
204
 
 
205
dnl build our copy of libevent whether we use it or not,
 
206
dnl because "make dist" needs its Makefiles to exist, and
 
207
dnl AM_CONDITIONAL + AC_CONFIG_SUBDIRS don't seem to play nice
 
208
AC_CONFIG_SUBDIRS([third-party/libevent])
 
209
libevent_source=bundled
 
210
AC_CHECK_LIB([event],[evutil_vsnprintf],
 
211
             [libevent_found=yes],
 
212
             [libevent_found=no],
 
213
             [$libevent_extra_libs])
 
214
AC_CHECK_HEADER([event-config.h],
 
215
                [libevent_headers_found=yes],
 
216
                [libevent_headers_found=no])
 
217
libevent_source=bundled
 
218
if test "x$libevent_found" = "xyes" ; then
 
219
    if test "x$libevent_headers_found" = "xyes"; then
 
220
        libevent_source=system
 
221
    fi
 
222
fi
 
223
if test "x$libevent_source" = "xbundled"; then
 
224
    AC_MSG_WARN([using our own libevent from third-party/libevent/])
 
225
    AC_MSG_WARN([if you are cross-compiling this is probably NOT what you want.])
 
226
    LIBEVENT_CFLAGS="-I\$(top_srcdir)/third-party/libevent -I\$(top_builddir)/third-party/libevent"
 
227
    LIBEVENT_LIBS="\$(top_builddir)/third-party/libevent/libevent.la"
 
228
else
 
229
    LIBEVENT_CFLAGS=""
 
230
    LIBEVENT_LIBS="-levent $libevent_extra_libs"
 
231
fi
 
232
AC_ARG_VAR([LIBEVENT_CFLAGS], [C compiler flags for LIBEVENT, overriding pkg-config])dnl
 
233
AC_ARG_VAR([LIBEVENT_LIBS], [linker flags for LIBEVENT, overriding pkg-config])dnl
 
234
 
 
235
 
 
236
 
 
237
dnl ----------------------------------------------------------------------------
 
238
dnl
 
239
dnl  dht
 
240
 
 
241
DHT_CFLAGS="-I\$(top_srcdir)/third-party/dht"
 
242
DHT_LIBS="\$(top_builddir)/third-party/dht/libdht.a"
 
243
AC_SUBST(DHT_CFLAGS)
 
244
AC_SUBST(DHT_LIBS)
 
245
 
 
246
 
 
247
dnl ----------------------------------------------------------------------------
 
248
dnl
 
249
dnl  detection for the GTK+ client
 
250
 
 
251
PKG_CHECK_MODULES(GTK,
 
252
                  [gtk+-2.0 >= $GTK_MINIMUM
 
253
                   glib-2.0 >= $GLIB_MINIMUM
 
254
                   gmodule-2.0 >= $GLIB_MINIMUM
 
255
                   gthread-2.0 >= $GLIB_MINIMUM],
 
256
                  [have_gtk=yes],
 
257
                  [have_gtk=no])
 
258
AC_ARG_ENABLE([gtk],
 
259
              AS_HELP_STRING([--enable-gtk],[build gtk client]),
 
260
              [want_gtk=${enableval}],
 
261
              [want_gtk=${have_gtk}])
 
262
build_gtk=no
 
263
use_gio=no
 
264
use_libappindicator=no
 
265
use_libnotify=no
 
266
use_dbus_glib=no
 
267
use_canberra=no
 
268
use_libgconf=no
 
269
if test "x$want_gtk" = "xyes" ; then
 
270
    if test "x$have_gtk" = "xyes"; then
 
271
      build_gtk=yes
 
272
    else
 
273
      AC_MSG_ERROR("GTK+ not found!")
 
274
    fi
 
275
fi
 
276
AM_CONDITIONAL([BUILD_GTK],[test "x$build_gtk" = "xyes"])
 
277
 
 
278
if test "x$build_gtk" = "xyes"; then
 
279
 
 
280
    PKG_CHECK_MODULES([LPI],
 
281
                      [launchpad-integration],
 
282
                      [use_lpi=yes],
 
283
                      [use_lpi=no])
 
284
    if test "x$use_lpi" = "xyes"; then
 
285
        AC_DEFINE([HAVE_LPI], 1)
 
286
    fi
 
287
        
 
288
    PKG_CHECK_MODULES([GIO],
 
289
                      [gio-2.0 >= $GIO_MINIMUM],
 
290
                      [use_gio=yes],
 
291
                      [use_gio=no])
 
292
    if test "x$use_gio" = "xyes"; then
 
293
        AC_DEFINE([HAVE_GIO], 1)
 
294
    fi
 
295
 
 
296
    PKG_CHECK_MODULES([LIBNOTIFY],
 
297
                      [libnotify >= $LIBNOTIFY_MINIMUM],
 
298
                      [have_libnotify=yes],
 
299
                      [have_libnotify=no])
 
300
    AC_ARG_ENABLE([libnotify], 
 
301
                  AS_HELP_STRING([--enable-libnotify],[enable notifications]),, 
 
302
                  [enable_libnotify=yes]) 
 
303
    use_libnotify=no
 
304
    if test "x$enable_libnotify" = "xyes" ; then
 
305
        if test "x$have_libnotify" = "xyes"; then
 
306
            use_libnotify=yes
 
307
            AC_DEFINE([HAVE_LIBNOTIFY], 1) 
 
308
        fi
 
309
    fi
 
310
 
 
311
    PKG_CHECK_MODULES([LIBAPPINDICATOR],
 
312
                      [appindicator-0.1 >= $LIBAPPINDICATOR_MINIMUM],
 
313
                      [have_libappindicator=yes],
 
314
                      [have_libappindicator=no])
 
315
 
 
316
    AC_ARG_ENABLE([libappindicator], 
 
317
                  AS_HELP_STRING([--enable-libappindicator],[enable AppIndicator support]),, 
 
318
                  [enable_libappindicator=yes])
 
319
    use_libappindicator=no
 
320
    if test "x$enable_libappindicator" = "xyes" ; then
 
321
        if test "x$have_libappindicator" = "xyes"; then
 
322
            use_libappindicator=yes
 
323
            AC_SUBST(LIBAPPINDICATOR_LIBS) 
 
324
            AC_SUBST(LIBAPPINDICATOR_CFLAGS) 
 
325
            AC_DEFINE([HAVE_LIBAPPINDICATOR], 1) 
 
326
        fi
 
327
    fi
 
328
 
 
329
    PKG_CHECK_MODULES([LIBCANBERRA],
 
330
                      [libcanberra-gtk >= $CANBERRA_MINIMUM],
 
331
                      [have_libcanberra=yes],
 
332
                      [have_libcanberra=no])
 
333
    AC_ARG_ENABLE([libcanberra], 
 
334
                  AS_HELP_STRING([--enable-libcanberra],[enable sounds]),, 
 
335
                  [enable_libcanberra=yes]) 
 
336
    if test "x$enable_libcanberra" = "xyes" ; then
 
337
        if test "x$have_libcanberra" = "xyes"; then
 
338
            use_canberra=yes
 
339
            AC_DEFINE([HAVE_LIBCANBERRA], 1) 
 
340
        fi
 
341
    fi
 
342
 
 
343
    PKG_CHECK_MODULES([LIBGCONF],
 
344
                      [gconf-2.0 >= $GCONF2_MINIMUM],
 
345
                      [have_libgconf=yes],
 
346
                      [have_libgconf=no])
 
347
    AC_ARG_ENABLE([gconf2], 
 
348
                  AS_HELP_STRING([--enable-libgconf],[enable GConf support]),, 
 
349
                  [enable_libgconf=yes]) 
 
350
    if test "x$enable_libgconf" = "xyes" ; then
 
351
        if test "x$have_libgconf" = "xyes"; then
 
352
            use_libgconf=yes
 
353
            AC_DEFINE([HAVE_LIBGCONF], 1) 
 
354
        fi
 
355
    fi
 
356
 
 
357
    PKG_CHECK_MODULES([DBUS_GLIB],
 
358
                      [dbus-glib-1 >= $DBUS_GLIB_MINIMUM],
 
359
                      [use_dbus_glib=yes],
 
360
                      [use_dbus_glib=no])
 
361
    if test "x$use_dbus_glib" = "xyes"; then
 
362
        AC_DEFINE([HAVE_DBUS_GLIB], 1)
 
363
    fi
 
364
    if test "x$use_dbus_glib" = "xyes"; then
 
365
        AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool, no)
 
366
        if test "x$DBUS_BINDING_TOOL" = xno; then
 
367
          AC_MSG_WARN([Cannot find dbus-binding-tool])
 
368
          use_dbus_glib="no (dbus-binding-tool not found)"
 
369
        fi
 
370
    fi
 
371
fi
 
372
 
 
373
AC_ARG_ENABLE([nls], 
 
374
              AS_HELP_STRING([--enable-nls],[enable native language support]),,
 
375
              [enable_nls=yes])
 
376
 
 
377
if test "x$build_gtk" = "xyes" -a  "x$enable_nls" = "xno" ; then
 
378
    AC_MSG_ERROR("The gtk client cannot be built without nls support.  Try adding either --enable-nls or --disable-gtk" )
 
379
fi
 
380
 
 
381
dnl This section is only used for internationalization.
 
382
dnl If you don't need translations and this section gives you trouble --
 
383
dnl such as if you're building for a headless system --
 
384
dnl it's okay to tear this section out and re-build the configure script.
 
385
dnl
 
386
dnl Note to packagers: the bump to intltool 0.40 was made to fix
 
387
dnl a "make check" failure on some systems.  if upgrading to 0.40 is
 
388
dnl a problem and the old version was working fine for you,
 
389
dnl it should be safe to re-edit 0.40 back down to 0.23
 
390
 
 
391
use_nls=no
 
392
if test "x$enable_nls" = "xyes" ; then
 
393
    use_nls=yes
 
394
    IT_PROG_INTLTOOL([0.40.0],[no-xml])
 
395
    AC_CHECK_HEADERS([libintl.h])
 
396
    GETTEXT_PACKAGE=transmission
 
397
    AC_SUBST(GETTEXT_PACKAGE)
 
398
    AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
 
399
    AM_GLIB_GNU_GETTEXT
 
400
    transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
 
401
    AC_SUBST(transmissionlocaledir)
 
402
fi
 
403
AC_SUBST(INTLLIBS)
 
404
 
 
405
 
 
406
dnl ----------------------------------------------------------------------------
 
407
dnl
 
408
dnl  platform-specific stuff.
 
409
 
 
410
AC_CANONICAL_HOST
 
411
have_darwin="no"
 
412
have_msw="no"
 
413
case $host_os in
 
414
 
 
415
   *mingw32*)
 
416
     have_msw="yes"
 
417
     CXXFLAGS="$CXXFLAGS -mms-bitfields -mwin32 -mwindows"
 
418
     CPPFLAGS="$CPPFLAGS -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN"
 
419
     LIBS="$LIBS -lshell32 -lws2_32"
 
420
     transmissionlocaledir="locale"
 
421
     if test -z "$host_alias"; then
 
422
       hostaliaswindres=
 
423
     else
 
424
       hostaliaswindres="$host_alias-windres";
 
425
     fi
 
426
     AC_CHECK_TOOL(WINDRES, windres)
 
427
     ;;
 
428
 
 
429
  *darwin*)
 
430
    have_darwin="yes"
 
431
    CFLAGS="-DMACOSX $CFLAGS"
 
432
    ;;
 
433
 
 
434
esac
 
435
 
 
436
AC_ARG_ENABLE([cli],
 
437
              [AS_HELP_STRING([--enable-cli],[build command-line client])],
 
438
              [build_cli=${enableval}],
 
439
              [build_cli="yes"])
 
440
AM_CONDITIONAL([BUILD_CLI],[test "x$build_cli" = "xyes"])
 
441
 
 
442
AC_ARG_ENABLE([mac],
 
443
              [AS_HELP_STRING([--enable-mac],[build Mac client])],
 
444
              [build_mac=${enableval}],
 
445
              [build_mac=${have_darwin}])
 
446
AM_CONDITIONAL([BUILD_MAC],[test "x$build_mac" = "xyes"])
 
447
 
 
448
AC_ARG_ENABLE([daemon],
 
449
              [AS_HELP_STRING([--enable-daemon],[build daemon])],
 
450
              [build_daemon=${enableval}],
 
451
              [build_daemon="yes"])
 
452
AM_CONDITIONAL([BUILD_DAEMON],[test "x$build_daemon" = "xyes"])
 
453
 
 
454
 
 
455
if test "x$build_mac" = "xyes" ; then
 
456
    # Make sure the proper Mac SDK is installed
 
457
    if test ! -d /Developer/SDKs/MacOSX10.5.sdk; then
 
458
      cat << EOF
 
459
You need to install the Mac OS X 10.5 SDK in order to build Transmission
 
460
with --enable-mac:
 
461
  Get your Xcode CD or package
 
462
  Restart the install
 
463
  When it gets to "Installation Type", select "Customize"
 
464
  Select "Mac OS X 10.5 SDK" under "Cross Development"
 
465
  Finish the install.
 
466
EOF
 
467
      exit 1
 
468
    fi
 
469
fi
 
470
if test "x$have_darwin" = "xyes"; then
 
471
    AC_DEFINE([HAVE_DARWIN], 1)
 
472
fi
 
473
if test "x$have_msw" = "xyes"; then
 
474
    AC_DEFINE([HAVE_MSW], 1)
 
475
fi
 
476
AM_CONDITIONAL(WIN32, test "x$have_msw" = "xyes")
 
477
 
 
478
dnl ----------------------------------------------------------------------------
 
479
dnl
 
480
dnl  Generate the output
 
481
 
 
482
AC_CONFIG_FILES([Makefile
 
483
                 transmission.spec
 
484
                 cli/Makefile
 
485
                 daemon/Makefile
 
486
                 doc/Makefile
 
487
                 libtransmission/Makefile
 
488
                 third-party/Makefile
 
489
                 third-party/miniupnp/Makefile
 
490
                 third-party/libnatpmp/Makefile
 
491
                 third-party/dht/Makefile
 
492
                 macosx/Makefile
 
493
                 gtk/Makefile
 
494
                 gtk/icons/Makefile
 
495
                 web/Makefile
 
496
                 web/images/Makefile
 
497
                 web/images/buttons/Makefile
 
498
                 web/images/graphics/Makefile
 
499
                 web/images/progress/Makefile
 
500
                 web/javascript/Makefile
 
501
                 web/javascript/jquery/Makefile
 
502
                 web/stylesheets/Makefile
 
503
                 po/Makefile.in])
 
504
 
 
505
ac_configure_args="$ac_configure_args --enable-static --disable-shared -q"
 
506
AC_OUTPUT
 
507
 
 
508
echo "
 
509
 
 
510
Configuration:
 
511
 
 
512
   Source code location:                                       ${srcdir}
 
513
   Compiler:                                                   ${CXX}
 
514
   System or bundled libevent:                                 ${libevent_source}
 
515
 
 
516
   Build Command-Line client:                                  ${build_cli}
 
517
 
 
518
   Build GTK+ client:                                          ${build_gtk}
 
519
      optional dbus support:                                   ${use_dbus_glib}
 
520
      optional gio for optional watchdir support:              ${use_gio}
 
521
      optional libnotify for 'download completed' popups:      ${use_libnotify}
 
522
      optional libcanberra for 'download completed' sounds:    ${use_canberra}
 
523
      optional libgconf to tell GNOME we handle magnet links:  ${use_libgconf}
 
524
      optional libappindicator for Ubuntu-style system tray:   ${use_libappindicator}
 
525
 
 
526
   Build Daemon:                                               ${build_daemon}
 
527
 
 
528
   Build Mac client:                                           ${build_mac}
 
529
 
 
530
"