source: trunk/configure.ac @ 14429

Last change on this file since 14429 was 14429, checked in by mikedld, 7 years ago

Increase BASE64 encoding size when using system libb64

Remove BASE64 reference testing as it's only libb64 now.
Improve the test to ignore \r and \n when comparing BASE-encoded
strings to not fail on system (unpatched) libb64.

File size: 19.7 KB
Line 
1dnl convention: -TR MAJOR MINOR MAINT STATUS - (each a single char)
2dnl STATUS: "X" for prerelease beta builds,
3dnl         "Z" for unsupported trunk builds,
4dnl         "0" for stable, supported releases
5dnl these should be the only two lines you need to change
6m4_define([user_agent_prefix],[2.84+])
7m4_define([peer_id_prefix],[-TR284Z-])
8
9AC_INIT([transmission],[user_agent_prefix],[http://trac.transmissionbt.com/newticket])
10AC_SUBST(USERAGENT_PREFIX,[user_agent_prefix])
11AC_SUBST(PEERID_PREFIX,[peer_id_prefix])
12
13m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
14
15AC_CONFIG_MACRO_DIR([m4])
16
17dnl AM_CONFIG_HEADER(config.h)
18AC_CONFIG_SRCDIR(libtransmission/transmission.h)
19AM_INIT_AUTOMAKE([1.9 tar-pax no-dist-gzip dist-xz])
20LT_INIT
21LT_LIB_M
22
23if test m4_substr(peer_id_prefix,6,1) = "0"; then
24  supported_build=yes
25  CPPFLAGS="$CPPFLAGS -DNDEBUG"
26else
27  supported_build=no
28  if test "x$GCC" = "xyes" ; then
29    CFLAGS="$CFLAGS -g -O0"
30    CXXFLAGS="$CXXFLAGS -g -O0"
31  fi
32fi
33AM_CONDITIONAL(TR_UNSTABLE, test "x$supported_build" = "xno")
34
35##
36##
37##   MANDATORY for everything
38##
39##
40CURL_MINIMUM=7.15.4
41AC_SUBST(CURL_MINIMUM)
42LIBEVENT_MINIMUM=2.0.10
43AC_SUBST(LIBEVENT_MINIMUM)
44OPENSSL_MINIMUM=0.9.4
45AC_SUBST(OPENSSL_MINIMUM)
46ZLIB_MINIMUM=1.2.3
47AC_SUBST(ZLIB_MINIMUM)
48
49##
50##
51##   MANDATORY for the GTK+ client
52##
53##
54
55GTK_MINIMUM=3.4.0
56AC_SUBST(GTK_MINIMUM)
57GLIB_MINIMUM=2.32.0
58AC_SUBST(GLIB_MINIMUM)
59GIO_MINIMUM=2.26.0
60AC_SUBST(GIO_MINIMUM)
61
62##
63##
64##   OPTIONAL for the GTK+ client
65##
66##
67
68# create the tray icon with AppIndicator
69LIBAPPINDICATOR_MINIMUM=0.4.90
70AC_SUBST(LIBAPPINDICATOR_MINIMUM)
71
72
73AC_PROG_CC
74AC_PROG_CXX
75AC_C_INLINE
76if test "x$GCC" = "xyes" ; then
77
78    CFLAGS="$CFLAGS -std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings -Winline -Wfloat-equal"
79
80    dnl figure out gcc version
81    AC_MSG_CHECKING([gcc version])
82    GCC_VERSION=`$CC -dumpversion`
83    GCC_MAJOR=`echo $GCC_VERSION | cut -d . -f1`
84    GCC_MINOR=`echo $GCC_VERSION | cut -d . -f2`
85    GCC_VERSION_NUM=`(expr $GCC_MAJOR "*" 100 + $GCC_MINOR) 2>/dev/null`
86
87    AC_MSG_RESULT($GCC_VERSION)
88    if test $GCC_VERSION_NUM -ge 304; then
89        dnl these were added in 3.4
90        CFLAGS="$CFLAGS -Wextra -Wdeclaration-after-statement -Winit-self"
91    fi
92    if test $GCC_VERSION_NUM -ge 403; then
93        dnl these were added in 4.3
94        CFLAGS="$CFLAGS -Wvariadic-macros"
95    fi
96fi
97
98AC_HEADER_STDC
99AC_HEADER_TIME
100
101AC_CHECK_HEADERS([stdbool.h])
102AC_CHECK_FUNCS([iconv_open pread pwrite lrintf strlcpy daemon dirname basename canonicalize_file_name strcasecmp localtime_r fallocate64 posix_fallocate memmem strsep strtold syslog valloc getpagesize posix_memalign statvfs htonll ntohll mkdtemp])
103AC_PROG_INSTALL
104AC_PROG_MAKE_SET
105ACX_PTHREAD
106
107if test "x$ac_cv_func_strtold" != "xyes" ; then
108    CPPFLAGS="$CPPFLAGS -Dstrtold=strtod"
109fi
110
111AC_SEARCH_LIBS(cos, [m])
112AC_SEARCH_LIBS([socket], [socket net])
113AC_SEARCH_LIBS([gethostbyname], [nsl bind])
114AC_SEARCH_LIBS([quotacursor_skipidtype], [quota])
115PKG_CHECK_MODULES(OPENSSL, [openssl >= $OPENSSL_MINIMUM], , [CHECK_SSL()])
116PKG_CHECK_MODULES(LIBCURL, [libcurl >= $CURL_MINIMUM])
117PKG_CHECK_MODULES(LIBEVENT, [libevent >= $LIBEVENT_MINIMUM])
118PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_MINIMUM])
119
120AC_SYS_LARGEFILE
121AC_CHECK_FUNCS([lseek64])
122
123AC_FUNC_GETMNTENT
124
125dnl ----------------------------------------------------------------------------
126dnl
127dnl posix_fadvise
128
129dnl can posix_fadvise be used
130AC_CHECK_DECLS(posix_fadvise, [], [], [
131#define _XOPEN_SOURCE 600
132#include <fcntl.h>])
133AC_CHECK_FUNCS([posix_fadvise])
134
135
136dnl ----------------------------------------------------------------------------
137dnl
138dnl file monitoring for the daemon
139
140AC_CHECK_HEADER([sys/inotify.h],
141                [AC_CHECK_FUNC([inotify_init],[have_inotify="yes"],[have_inotify="no"])],
142                [have_inotify="no"])
143AC_ARG_WITH([inotify],
144            [AS_HELP_STRING([--with-inotify],[Enable inotify support (default=auto)])],
145            [want_inotify=${withval}],
146            [want_inotify=${have_inotify}])
147if test "x$want_inotify" = "xyes" ; then
148    if test "x$have_inotify" = "xyes"; then
149      AC_DEFINE([WITH_INOTIFY],[1])
150    else
151      AC_MSG_ERROR("inotify not found!")
152    fi
153fi
154
155AC_CHECK_HEADER([sys/event.h],
156                [AC_CHECK_FUNC([kqueue],[have_kqueue="yes"],[have_kqueue="no"])],
157                [have_kqueue="no"])
158AC_ARG_WITH([kqueue],
159            [AS_HELP_STRING([--with-kqueue],[Enable kqueue support (default=auto)])],
160            [want_kqueue=${withval}],
161            [want_kqueue=${have_kqueue}])
162if test "x$want_kqueue" = "xyes" ; then
163    if test "x$have_kqueue" = "xyes"; then
164      AC_DEFINE([WITH_KQUEUE],[1])
165    else
166      AC_MSG_ERROR("kqueue not found!")
167    fi
168fi
169
170AC_CHECK_HEADERS([sys/statvfs.h \
171                  xfs/xfs.h])
172
173
174dnl ----------------------------------------------------------------------------
175dnl
176dnl file monitoring for the daemon
177
178# Check whether to enable systemd startup notification.
179# This requires libsystemd-daemon.
180AC_ARG_WITH([systemd-daemon], AS_HELP_STRING([--with-systemd-daemon],
181            [Add support for systemd startup notification (default is autodetected)]),
182            [USE_SYSTEMD_DAEMON=$withval], [USE_SYSTEMD_DAEMON=auto])
183AS_IF([test "x$USE_SYSTEMD_DAEMON" != "xno"], [
184    PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
185        [AC_DEFINE(USE_SYSTEMD_DAEMON,1,[Use systemd startup notification])],
186        [AS_IF([test "x$USE_SYSTEMD_DAEMON" = "xyes"],
187            [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd-daemon not found.])]
188        )]
189    )
190])
191
192
193dnl ----------------------------------------------------------------------------
194dnl
195dnl  dht
196
197DHT_CFLAGS="-I\$(top_srcdir)/third-party/dht"
198DHT_LIBS="\$(top_builddir)/third-party/dht/libdht.a"
199DHT_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/dht/libdht.a"
200build_bundled_dht="yes"
201AC_ARG_ENABLE([external-dht],
202              AS_HELP_STRING([--enable-external-dht],[Use system external-dht]),
203              [want_external_dht=${enableval}],
204              [want_external_dht=no])
205if test "x$want_external_dht" != "xno" ; then
206       dnl Would be lovely if it had pkgconfig
207       DHT_CFLAGS=""
208       DHT_LIBS="-ldht"
209       DHT_LIBS_QT="-ldht"
210       build_bundled_dht="no"
211fi
212
213AM_CONDITIONAL([BUILD_DHT],[test "x$build_bundled_dht" = "xyes"])
214AC_SUBST(DHT_CFLAGS)
215AC_SUBST(DHT_LIBS)
216AC_SUBST(DHT_LIBS_QT)
217
218
219dnl ----------------------------------------------------------------------------
220dnl
221dnl  libb64
222
223LIBB64_CFLAGS="-I\$(top_srcdir)/third-party/libb64"
224LIBB64_LIBS="\$(top_builddir)/third-party/libb64/libb64.a"
225LIBB64_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/libb64/libb64.a"
226build_bundled_b64="yes"
227AC_ARG_ENABLE([external-b64],
228              AS_HELP_STRING([--enable-external-b64],[Use system libb64]),
229              [want_external_b64=${enableval}],
230              [want_external_b64=no])
231if test "x$want_external_b64" != "xno" ; then
232    LIBB64_CFLAGS="-DUSE_SYSTEM_B64"
233    LIBB64_LIBS="-lb64"
234    LIBB64_LIBS_QT="-lb64"
235    build_bundled_b64="no"
236fi
237
238AM_CONDITIONAL([BUILD_B64],[test "x$build_bundled_b64" = "xyes"])
239AC_SUBST(LIBB64_CFLAGS)
240AC_SUBST(LIBB64_LIBS)
241AC_SUBST(LIBB64_LIBS_QT)
242
243
244dnl ----------------------------------------------------------------------------
245dnl
246dnl  utp
247
248AC_CHECK_LIB([rt],
249             [clock_gettime],
250             [libutp_extra_libs="-lrt"],
251             [libutp_extra_libs=""])
252
253AC_MSG_CHECKING([µTP])
254build_utp="no"
255
256ac_save_LIBS="$LIBS"
257LIBS="-lutp"
258AC_LINK_IFELSE(
259  [AC_LANG_PROGRAM([#include <libutp/utp.h>],
260                   [struct UTPFunctionTable func;])],
261  [have_utp="yes"],
262  [have_utp="no"]
263)
264LIBS="$ac_save_LIBS"
265
266if test "x$have_utp" = "xyes" -o "x$CXX" != "x"; then
267    want_utp_default="yes"
268else
269    want_utp_default="no"
270fi
271
272AC_ARG_ENABLE([utp],
273              AS_HELP_STRING([--enable-utp],[build µTP support]),
274              [want_utp=${enableval}],
275              [want_utp=${want_utp_default}])
276if test "x$want_utp" = "xyes"; then
277    if test "x$have_utp" = "xyes"; then
278        dnl Would be lovely if it had pkgconfig
279        LIBUTP_CFLAGS=""
280        LIBUTP_LIBS="-lutp $libutp_extra_libs"
281        LIBUTP_LIBS_QT="-lutp $libutp_extra_libs"
282        AC_DEFINE([WITH_UTP],[1])
283        build_utp="system"
284    elif test "x$CXX" != "x"; then
285        LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/"
286        LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a"
287        LIBUTP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/libutp/libutp.a"
288        if test "x$libutp_extra_libs" != "x" ; then
289            LIBUTP_LIBS="$LIBUTP_LIBS $libutp_extra_libs"
290            LIBUTP_LIBS_QT="$LIBUTP_LIBS_QT $libutp_extra_libs"
291        fi
292        AC_DEFINE([WITH_UTP],[1])
293        build_utp="yes"
294    else
295      AC_MSG_ERROR("Unable to build uTP support -- C++ compiler not found")
296    fi
297fi
298AC_SUBST(LIBUTP_CFLAGS)
299AC_SUBST(LIBUTP_LIBS)
300AC_SUBST(LIBUTP_LIBS_QT)
301AM_CONDITIONAL([BUILD_UTP],[test "x$build_utp" = "xyes"])
302AC_MSG_RESULT([$build_utp])
303
304
305dnl
306dnl  look for preinstalled miniupnpc...
307dnl
308
309ac_save_LIBS="$LIBS"
310LIBS="-lminiupnpc"
311AC_MSG_CHECKING([system miniupnpc library])
312
313dnl See if ANY version of miniupnpc is installed
314AC_LINK_IFELSE(
315  [AC_LANG_PROGRAM([#include <miniupnpc/miniupnpc.h>],
316                   [struct UPNPDev dev;])],
317  [upnp_version="unknown"],
318  [upnp_version="none"]
319)
320
321dnl Let's hope it's 1.7 or higher, since it provides
322dnl MINIUPNPC_API_VERSION and we won't have to figure
323dnl it out on our own
324if test "x$upnp_version" = "xunknown" ; then
325  AC_RUN_IFELSE(
326    [AC_LANG_PROGRAM(
327      [#include <stdlib.h>
328       #include <miniupnpc/miniupnpc.h>],
329      [#ifdef MINIUPNPC_API_VERSION
330       return EXIT_SUCCESS;
331       #else
332       return EXIT_FAILURE;
333       #endif]
334    )],
335    [upnp_version=">= 1.7"]
336  )
337fi
338
339dnl Or maybe it's miniupnp 1.6
340if test "x$upnp_version" = "xunknown" ; then
341  AC_LINK_IFELSE([AC_LANG_PROGRAM([[
342    #include <stdlib.h>
343    #include <errno.h>
344    #include <miniupnpc/miniupnpc.h>
345    #include <miniupnpc/upnpcommands.h>
346  ]], [[
347    struct UPNPDev * devlist;
348    struct UPNPUrls urls;
349    struct IGDdatas data;
350    char lanaddr[16];
351    char portStr[8];
352    char intPort[8];
353    char intClient[16];
354    upnpDiscover( 2000, NULL, NULL, 0, 0, &errno );
355    UPNP_GetValidIGD( devlist, &urls, &data, lanaddr, sizeof( lanaddr ) );
356    UPNP_GetSpecificPortMappingEntry( urls.controlURL, data.first.servicetype,
357                        portStr, "TCP", intClient, intPort, NULL, NULL, NULL );
358  ]])],[
359  AC_DEFINE(MINIUPNPC_API_VERSION, 8, [miniupnpc 1.6 has API version 8])
360  upnp_version="1.6"])
361fi
362
363dnl Or maybe it's miniupnp 1.5
364if test "x$upnp_version" = "xunknown" ; then
365  AC_LINK_IFELSE([AC_LANG_PROGRAM([[
366    #include <stdlib.h>
367    #include <miniupnpc/miniupnpc.h>
368    #include <miniupnpc/upnpcommands.h>
369  ]], [[
370    struct UPNPDev * devlist;
371    struct UPNPUrls urls;
372    struct IGDdatas data;
373    char lanaddr[16];
374    char portStr[8];
375    char intPort[8];
376    char intClient[16];
377    upnpDiscover( 2000, NULL, NULL, 0 );
378    UPNP_GetValidIGD( devlist, &urls, &data, lanaddr, sizeof( lanaddr ) );
379    UPNP_GetSpecificPortMappingEntry( urls.controlURL, data.first.servicetype,
380                        portStr, "TCP", intClient, intPort );
381  ]])],[
382  AC_DEFINE(MINIUPNPC_API_VERSION, 5, [miniupnpc 1.5 has API version 5])
383  upnp_version="1.5"])
384fi
385
386# ... and the results of our tests
387LIBS="$ac_save_LIBS"
388AC_MSG_RESULT([$upnp_version])
389AM_CONDITIONAL([BUILD_MINIUPNP],[test "x$upnp_version" = "xnone"])
390if test "x$upnp_version" = "xnone" ; then
391    LIBUPNP_CFLAGS="-I\$(top_srcdir)/third-party/"
392    LIBUPNP_LIBS="\$(top_builddir)/third-party/miniupnp/libminiupnp.a"
393    LIBUPNP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/miniupnp/libminiupnp.a"
394else
395    AC_DEFINE([SYSTEM_MINIUPNP])
396    LIBUPNP_CFLAGS=""
397    LIBUPNP_LIBS="-lminiupnpc"
398    LIBUPNP_LIBS_QT="-lminiupnpc"
399fi
400AC_SUBST(LIBUPNP_CFLAGS)
401AC_SUBST(LIBUPNP_LIBS)
402AC_SUBST(LIBUPNP_LIBS_QT)
403
404
405 
406
407dnl ----------------------------------------------------------------------------
408dnl
409dnl  Allow usage of system natpmp library
410
411LIBNATPMP_CFLAGS="-I\$(top_srcdir)/third-party/libnatpmp/"
412LIBNATPMP_LIBS="\$(top_builddir)/third-party/libnatpmp/libnatpmp.a"
413LIBNATPMP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/libnatpmp/libnatpmp.a"
414build_bundled_natpmp="yes"
415AC_ARG_ENABLE([external-natpmp],
416              AS_HELP_STRING([--enable-external-natpmp],[Use system external-natpmp]),
417              [want_external_natpmp=${enableval}],
418              [want_external_natpmp=no])
419if test "x$want_external_natpmp" != "xno" ; then
420        dnl Would be lovely if it had pkgconfig
421        LIBNATPMP_CFLAGS="" 
422        LIBNATPMP_LIBS="-lnatpmp"
423        LIBNATPMP_LIBS_QT="-lnatpmp"
424        build_bundled_natpmp="no"
425fi
426AM_CONDITIONAL([BUILD_NATPMP],[test "x$build_bundled_natpmp" = "xyes"])
427AC_SUBST(LIBNATPMP_CFLAGS)
428AC_SUBST(LIBNATPMP_LIBS)
429AC_SUBST(LIBNATPMP_LIBS_QT)
430
431
432dnl ----------------------------------------------------------------------------
433dnl
434dnl  detection for the GTK+ client
435
436AC_ARG_ENABLE([nls],
437              [AS_HELP_STRING([--enable-nls],[enable native language support])],,
438              [enable_nls=yes])
439PKG_CHECK_EXISTS([gtk+-3.0 >= $GTK_MINIMUM
440                  glib-2.0 >= $GLIB_MINIMUM
441                  gio-2.0 >= $GIO_MINIMUM,
442                  gmodule-2.0 >= $GLIB_MINIMUM
443                  gthread-2.0 >= $GLIB_MINIMUM],
444                 [have_gtk=yes],
445                 [have_gtk=no])
446AC_ARG_WITH([gtk], AS_HELP_STRING([--with-gtk],[with Gtk]),
447            [with_gtk=$withval],
448            [with_gtk=$have_gtk])
449AM_CONDITIONAL([BUILD_GTK],[test "x$with_gtk" = "xyes"])
450use_libappindicator=no
451if test "x$with_gtk" = "xyes" ; then
452
453    if test "x$enable_nls" = "xno" ; then
454        AC_MSG_ERROR("The gtk client cannot be built without nls support.  Try adding either --enable-nls or --without-gtk" )
455    fi
456
457    PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= $GTK_MINIMUM
458                              glib-2.0 >= $GLIB_MINIMUM
459                              gio-2.0 >= $GIO_MINIMUM,
460                              gmodule-2.0 >= $GLIB_MINIMUM
461                              gthread-2.0 >= $GLIB_MINIMUM])
462    PKG_CHECK_MODULES([LIBAPPINDICATOR],
463                      [appindicator3-0.1 >= $LIBAPPINDICATOR_MINIMUM],
464                      [have_libappindicator=yes],
465                      [have_libappindicator=no])
466    if test "x$have_libappindicator" = "xyes"; then
467        use_libappindicator=yes
468        AC_DEFINE([HAVE_LIBAPPINDICATOR], 1)
469    else
470        LIBAPPINDICATOR_CFLAGS=
471        LIBAPPINDICATOR_LIBS=
472    fi
473fi
474
475dnl This section is only used for internationalization.
476dnl If you don't need translations and this section gives you trouble --
477dnl such as if you're building for a headless system --
478dnl it's okay to tear this section out and re-build the configure script.
479dnl
480dnl Note to packagers: the bump to intltool 0.40 was made to fix
481dnl a "make check" failure on some systems.  if upgrading to 0.40 is
482dnl a problem and the old version was working fine for you,
483dnl it should be safe to re-edit 0.40 back down to 0.23
484
485use_nls=no
486if test "x$enable_nls" = "xyes" ; then
487    use_nls=yes
488    m4_ifdef([IT_PROG_INTLTOOL],
489             [IT_PROG_INTLTOOL([0.35.0],[no-xml])],
490             [AC_MSG_ERROR("--enable-nls requires intltool to be installed.")])
491    AC_CHECK_HEADERS([libintl.h])
492    GETTEXT_PACKAGE=transmission-gtk
493    AC_SUBST(GETTEXT_PACKAGE)
494    AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
495    AM_GLIB_GNU_GETTEXT
496    transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
497    AC_SUBST(transmissionlocaledir)
498fi
499AC_SUBST(INTLLIBS)
500
501
502dnl ----------------------------------------------------------------------------
503dnl
504dnl  platform-specific stuff.
505
506AC_CANONICAL_HOST
507have_darwin="no"
508have_msw="no"
509case $host_os in
510
511   *mingw32*)
512     have_msw="yes"
513     CXXFLAGS="$CXXFLAGS -mms-bitfields -mwin32 -mwindows"
514     CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -DWIN32_LEAN_AND_MEAN"
515     # CPPFLAGS="$CPPFLAGS -D__USE_MINGW_ANSI_STDIO=1 -D__STDC_FORMAT_MACROS=1"
516     LIBS="$LIBS -liphlpapi -lshell32 -lws2_32"
517     transmissionlocaledir="locale"
518     if test -z "$host_alias"; then
519       hostaliaswindres=
520     else
521       hostaliaswindres="$host_alias-windres";
522     fi
523     AC_CHECK_TOOL(WINDRES, windres)
524     ;;
525
526  *darwin*)
527    have_darwin="yes"
528    ;;
529
530esac
531
532AC_ARG_ENABLE([lightweight],
533              AS_HELP_STRING([--enable-lightweight],[optimize libtransmission for low-resource systems: smaller cache size, prefer unencrypted peer connections, etc.]),
534              [enable_lightweight=${enableval}],
535              [enable_lightweight="no"])
536if test "x$enable_lightweight" = "xyes" ; then
537  AC_DEFINE([TR_LIGHTWEIGHT],[1],[optimize libtransmission for low-resource systems])
538fi
539
540AC_ARG_ENABLE([cli],
541              [AS_HELP_STRING([--enable-cli],[build command-line client])],
542              [build_cli=${enableval}],
543              [build_cli="yes"])
544AM_CONDITIONAL([BUILD_CLI],[test "x$build_cli" = "xyes"])
545
546AC_ARG_ENABLE([mac],
547              [AS_HELP_STRING([--enable-mac],[build Mac client])],
548              [build_mac=${enableval}],
549              [build_mac=${have_darwin}])
550AM_CONDITIONAL([BUILD_MAC],[test "x$build_mac" = "xyes"])
551
552AC_ARG_ENABLE([daemon],
553              [AS_HELP_STRING([--enable-daemon],[build daemon])],
554              [build_daemon=${enableval}],
555              [build_daemon="yes"])
556AM_CONDITIONAL([BUILD_DAEMON],[test "x$build_daemon" = "xyes"])
557
558
559if test "x$build_mac" = "xyes" ; then
560   AC_DEFINE([BUILD_MAC_CLIENT], 1)
561    # Make sure the proper Mac SDK is installed
562    if test ! -d /Developer/SDKs/MacOSX10.5.sdk; then
563      cat << EOF
564You need to install the Mac OS X 10.5 SDK in order to build Transmission
565with --enable-mac:
566  Get your Xcode CD or package
567  Restart the install
568  When it gets to "Installation Type", select "Customize"
569  Select "Mac OS X 10.5 SDK" under "Cross Development"
570  Finish the install.
571EOF
572      exit 1
573    fi
574fi
575AM_CONDITIONAL(WIN32, test "x$have_msw" = "xyes")
576
577dnl ----------------------------------------------------------------------------
578dnl
579dnl  Generate the output
580
581AC_CONFIG_FILES([Makefile
582                 transmission-gtk.spec
583                 cli/Makefile
584                 daemon/Makefile
585                 extras/Makefile
586                 libtransmission/Makefile
587                 utils/Makefile
588                 third-party/Makefile
589                 third-party/dht/Makefile
590                 third-party/libb64/Makefile
591                 third-party/libutp/Makefile
592                 third-party/libnatpmp/Makefile
593                 third-party/miniupnp/Makefile
594                 macosx/Makefile
595                 gtk/Makefile
596                 gtk/icons/Makefile
597                 qt/config.pri
598                 web/Makefile
599                 web/images/Makefile
600                 web/style/Makefile
601                 web/style/jqueryui/Makefile
602                 web/style/jqueryui/images/Makefile
603                 web/style/transmission/Makefile
604                 web/style/transmission/images/Makefile
605                 web/style/transmission/images/buttons/Makefile
606                 web/javascript/Makefile
607                 web/javascript/jquery/Makefile
608                 po/Makefile.in])
609
610AC_OUTPUT
611
612echo "
613
614Configuration:
615
616   Source code location:                              ${srcdir}
617   Compiler:                                          ${CXX}
618
619   Build libtransmission:                             yes
620      * optimized for low-resource systems:           ${enable_lightweight}
621      * µTP enabled:                                  ${build_utp}
622
623   Build Command-Line client:                         ${build_cli}
624
625   Build GTK+ client:                                 ${with_gtk}
626      * libappindicator for an Ubuntu-style tray:     ${use_libappindicator}
627
628   Build Daemon:                                      ${build_daemon}
629
630   Build Mac client:                                  ${build_mac}
631
632"
Note: See TracBrowser for help on using the repository browser.