2008-11-04 02:09:51 +00:00
|
|
|
dnl convention: -TR MAJOR MINOR MAINT STATUS - (each a single char)
|
2009-01-11 16:58:14 +00:00
|
|
|
dnl STATUS: "X" for prerelease beta builds,
|
2008-11-04 02:09:51 +00:00
|
|
|
dnl "Z" for unsupported trunk builds,
|
|
|
|
dnl "0" for stable, supported releases
|
|
|
|
dnl these should be the only two lines you need to change
|
2009-08-19 00:59:54 +00:00
|
|
|
m4_define([user_agent_prefix],[1.74b1])
|
|
|
|
m4_define([peer_id_prefix],[-TR173X-])
|
2008-11-04 02:09:51 +00:00
|
|
|
|
2008-12-03 14:44:52 +00:00
|
|
|
AC_INIT([transmission],
|
|
|
|
[user_agent_prefix],
|
|
|
|
[http://trac.transmissionbt.com/newticket])
|
2008-11-04 02:28:22 +00:00
|
|
|
AC_SUBST(USERAGENT_PREFIX,[user_agent_prefix])
|
|
|
|
AC_SUBST(PEERID_PREFIX,[peer_id_prefix])
|
2008-08-15 19:31:59 +00:00
|
|
|
|
2008-10-09 20:11:32 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2008-08-15 19:31:59 +00:00
|
|
|
|
2007-07-28 04:10:09 +00:00
|
|
|
dnl AM_CONFIG_HEADER(config.h)
|
2007-07-18 23:04:26 +00:00
|
|
|
AC_CONFIG_SRCDIR(libtransmission/transmission.h)
|
2007-10-24 15:25:43 +00:00
|
|
|
AM_INIT_AUTOMAKE([1.9 tar-ustar])
|
2007-08-15 02:48:32 +00:00
|
|
|
AC_PROG_LIBTOOL
|
2007-07-18 23:04:26 +00:00
|
|
|
|
2009-01-17 23:12:35 +00:00
|
|
|
if test m4_substr(peer_id_prefix,6,1) = "0"; then
|
2009-01-16 21:29:49 +00:00
|
|
|
supported_build=yes
|
2009-02-19 17:12:41 +00:00
|
|
|
if test "x$GCC" = "xyes" ; then
|
2009-06-03 14:27:02 +00:00
|
|
|
CFLAGS="$CFLAGS -g -O3 "
|
|
|
|
CXXFLAGS="$CXXFLAGS -g -O3 "
|
2009-02-19 17:12:41 +00:00
|
|
|
fi
|
2009-01-17 23:12:35 +00:00
|
|
|
else
|
|
|
|
supported_build=no
|
2009-02-19 17:12:41 +00:00
|
|
|
if test "x$GCC" = "xyes" ; then
|
|
|
|
CFLAGS="$CFLAGS -g -O0"
|
|
|
|
CXXFLAGS="$CXXFLAGS -g -O0"
|
|
|
|
fi
|
2008-08-15 19:31:59 +00:00
|
|
|
fi
|
2009-01-16 21:29:49 +00:00
|
|
|
AM_CONDITIONAL(TR_UNSTABLE, test "x$supported_build" = "xno")
|
2008-08-15 19:31:59 +00:00
|
|
|
|
2008-04-24 12:02:15 +00:00
|
|
|
OPENSSL_MINIMUM=0.9.4
|
2008-10-15 16:58:53 +00:00
|
|
|
CURL_MINIMUM=7.16.3
|
2008-03-09 15:27:08 +00:00
|
|
|
GIO_MINIMUM=2.15.5
|
2007-07-19 03:36:29 +00:00
|
|
|
GLIB_MINIMUM=2.6.0
|
|
|
|
GTK_MINIMUM=2.6.0
|
2009-01-22 15:05:22 +00:00
|
|
|
LIBNOTIFY_MINIMUM=0.4.3
|
2008-04-13 02:56:26 +00:00
|
|
|
DBUS_GLIB_MINIMUM=0.70
|
2009-06-03 15:47:08 +00:00
|
|
|
LIBEVENT_MINIMUM=1.4.5
|
2008-05-19 11:55:16 +00:00
|
|
|
AC_SUBST(OPENSSL_MINIMUM)
|
2008-04-24 01:42:53 +00:00
|
|
|
AC_SUBST(CURL_MINIMUM)
|
2008-03-09 15:27:08 +00:00
|
|
|
AC_SUBST(GIO_MINIMUM)
|
2007-07-18 23:04:26 +00:00
|
|
|
AC_SUBST(GLIB_MINIMUM)
|
|
|
|
AC_SUBST(GTK_MINIMUM)
|
2008-02-24 15:42:31 +00:00
|
|
|
AC_SUBST(LIBNOTIFY_MINIMUM)
|
2008-04-13 02:56:26 +00:00
|
|
|
AC_SUBST(DBUS_GLIB_MINIMUM)
|
2009-06-03 15:47:08 +00:00
|
|
|
AC_SUBST(LIBEVENT_MINIUM)
|
2007-07-18 23:04:26 +00:00
|
|
|
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
2009-01-02 05:11:50 +00:00
|
|
|
AC_C_INLINE
|
2007-08-14 20:15:55 +00:00
|
|
|
if test "x$GCC" = "xyes" ; then
|
2009-01-23 18:46:09 +00:00
|
|
|
|
2009-02-19 17:12:41 +00:00
|
|
|
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"
|
2009-01-23 18:46:09 +00:00
|
|
|
|
|
|
|
dnl figure out gcc version
|
|
|
|
AC_MSG_CHECKING([gcc version])
|
|
|
|
GCC_VERSION=`$CC -dumpversion`
|
|
|
|
GCC_MAJOR=`echo $GCC_VERSION | cut -d . -f1`
|
|
|
|
GCC_MINOR=`echo $GCC_VERSION | cut -d . -f2`
|
|
|
|
GCC_VERSION_NUM=`(expr $GCC_MAJOR "*" 100 + $GCC_MINOR) 2>/dev/null`
|
|
|
|
|
|
|
|
AC_MSG_RESULT($GCC_VERSION)
|
|
|
|
if test $GCC_VERSION_NUM -ge 304; then
|
|
|
|
dnl these were added in 3.4
|
|
|
|
CFLAGS="$CFLAGS -Wextra -Wdeclaration-after-statement -Winit-self"
|
|
|
|
fi
|
2007-08-14 20:15:55 +00:00
|
|
|
fi
|
2008-08-15 19:31:59 +00:00
|
|
|
|
2007-07-18 23:04:26 +00:00
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_TIME
|
2008-11-12 03:59:30 +00:00
|
|
|
|
2009-08-09 18:04:33 +00:00
|
|
|
AC_CHECK_FUNCS([lrintf strlcpy daemon dirname basename strcasecmp localtime_r posix_fallocate memmem strtold])
|
2007-07-18 23:04:26 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
ACX_PTHREAD
|
|
|
|
|
2009-08-09 18:04:33 +00:00
|
|
|
if test "x$ac_cv_func_strtold" != "xyes" ; then
|
|
|
|
CPPFLAGS="$CPPFLAGS -Dstrtold=strtod"
|
|
|
|
fi
|
|
|
|
|
2009-07-09 17:57:31 +00:00
|
|
|
AC_SEARCH_LIBS(cos, [m])
|
2007-07-19 03:17:49 +00:00
|
|
|
AC_SEARCH_LIBS([socket], [socket net])
|
|
|
|
AC_SEARCH_LIBS([gethostbyname], [nsl bind])
|
2008-09-03 19:02:59 +00:00
|
|
|
PKG_CHECK_MODULES(OPENSSL, [openssl >= $OPENSSL_MINIMUM], , [CHECK_SSL()])
|
2008-04-24 12:02:15 +00:00
|
|
|
PKG_CHECK_MODULES(LIBCURL, [libcurl >= $CURL_MINIMUM])
|
2008-11-09 15:43:31 +00:00
|
|
|
AC_PATH_ZLIB
|
2007-07-18 23:04:26 +00:00
|
|
|
|
2007-10-29 14:44:00 +00:00
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
|
2009-01-25 23:33:10 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------------
|
|
|
|
dnl
|
|
|
|
dnl posix_fadvise
|
|
|
|
|
|
|
|
dnl can posix_fadvise be used
|
|
|
|
AC_CHECK_DECLS(posix_fadvise, [], [], [
|
|
|
|
#define _XOPEN_SOURCE 600
|
|
|
|
#include <fcntl.h>])
|
|
|
|
AC_CHECK_FUNCS([posix_fadvise])
|
|
|
|
|
|
|
|
|
2009-03-01 15:38:58 +00:00
|
|
|
dnl ----------------------------------------------------------------------------
|
|
|
|
dnl
|
|
|
|
dnl file monitoring for the daemon
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([sys/inotify.h],
|
|
|
|
[AC_CHECK_FUNC([inotify_init],[have_inotify="yes"],[have_inotify="no"])],
|
|
|
|
[have_inotify="no"])
|
|
|
|
AC_ARG_WITH([inotify],
|
|
|
|
[AS_HELP_STRING([--with-inotify],[Enable inotify support (default=auto)])],
|
|
|
|
[want_inotify=${enableval}],
|
|
|
|
[want_inotify=${have_inotify}])
|
|
|
|
if test "x$want_inotify" = "xyes" ; then
|
|
|
|
if test "x$have_inotify" = "xyes"; then
|
|
|
|
AC_DEFINE([WITH_INOTIFY],[1])
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR("inotify not found!")
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([sys/event.h],
|
|
|
|
[AC_CHECK_FUNC([kqueue],[have_kqueue="yes"],[have_kqueue="no"])],
|
|
|
|
[have_kqueue="no"])
|
|
|
|
AC_ARG_WITH([kqueue],
|
|
|
|
[AS_HELP_STRING([--with-kqueue],[Enable kqueue support (default=auto)])],
|
|
|
|
[want_kqueue=${enableval}],
|
|
|
|
[want_kqueue=${have_kqueue}])
|
|
|
|
if test "x$want_kqueue" = "xyes" ; then
|
|
|
|
if test "x$have_kqueue" = "xyes"; then
|
|
|
|
AC_DEFINE([WITH_KQUEUE],[1])
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR("kqueue not found!")
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2009-04-05 14:04:07 +00:00
|
|
|
AC_CHECK_HEADERS([xfs/xfs.h])
|
|
|
|
|
2009-03-01 15:38:58 +00:00
|
|
|
|
2007-10-27 21:29:41 +00:00
|
|
|
dnl ----------------------------------------------------------------------------
|
|
|
|
dnl
|
|
|
|
dnl va_copy
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([how to copy va_list])
|
|
|
|
AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; va_copy(ap1, ap2);],
|
|
|
|
AC_MSG_RESULT([va_copy]),
|
|
|
|
[ AH_TEMPLATE([va_copy], [define if va_copy is not available])
|
|
|
|
AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; __va_copy(ap1, ap2);],
|
|
|
|
[ AC_DEFINE([va_copy], [__va_copy])
|
|
|
|
AC_MSG_RESULT([__va_copy])],
|
|
|
|
[ AC_DEFINE([va_copy(dest,src)], [memcpy(&dest,&src,sizeof(va_list))])
|
|
|
|
AC_MSG_RESULT([memcpy])]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
|
2009-06-03 15:47:08 +00:00
|
|
|
|
2009-07-14 18:55:15 +00:00
|
|
|
dnl libevent likes to link against librt if possible
|
|
|
|
dnl for clock_gettime() and clock_settime()
|
|
|
|
dnl TODO(libevent2): this can probably be removed after
|
|
|
|
dnl we switch to libevent2, since it will have PKG_CONFIG
|
|
|
|
AC_CHECK_LIB([rt],
|
|
|
|
[clock_gettime],
|
|
|
|
[libevent_extra_libs="-lrt"],
|
|
|
|
[libevent_extra_libs=""])
|
|
|
|
|
2009-06-04 22:47:22 +00:00
|
|
|
dnl build our copy of libevent whether we use it or not,
|
|
|
|
dnl because "make dist" needs its Makefiles to exist, and
|
|
|
|
dnl AM_CONDITIONAL + AC_CONFIG_SUBDIRS don't seem to play nice
|
|
|
|
AC_CONFIG_SUBDIRS([third-party/libevent])
|
2009-06-05 13:45:21 +00:00
|
|
|
libevent_source=bundled
|
|
|
|
AC_CHECK_LIB([event],[evutil_vsnprintf],
|
|
|
|
[libevent_found=yes],
|
|
|
|
[libevent_found=no],
|
2009-07-14 18:55:15 +00:00
|
|
|
[$libevent_extra_libs])
|
2009-06-03 16:31:43 +00:00
|
|
|
AC_CHECK_HEADER([event-config.h],
|
2009-06-05 13:45:21 +00:00
|
|
|
[libevent_headers_found=yes],
|
|
|
|
[libevent_headers_found=no])
|
|
|
|
libevent_source=bundled
|
|
|
|
if test "x$libevent_found" = "xyes" ; then
|
|
|
|
if test "x$libevent_headers_found" = "xyes"; then
|
|
|
|
libevent_source=system
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "x$libevent_source" = "xbundled"; then
|
2009-06-10 15:53:23 +00:00
|
|
|
AC_MSG_WARN([using our own libevent from third-party/libevent/])
|
|
|
|
AC_MSG_WARN([if you are cross-compiling this is probably NOT what you want.])
|
2009-06-14 16:51:22 +00:00
|
|
|
LIBEVENT_CFLAGS="-I\$(top_srcdir)/third-party/libevent -I\$(top_builddir)/third-party/libevent"
|
2009-06-05 13:45:21 +00:00
|
|
|
LIBEVENT_LIBS="\$(top_builddir)/third-party/libevent/libevent.la"
|
|
|
|
else
|
2009-06-14 16:51:22 +00:00
|
|
|
LIBEVENT_CFLAGS=""
|
2009-07-14 18:55:15 +00:00
|
|
|
LIBEVENT_LIBS="-levent $libevent_extra_libs"
|
2009-06-05 13:45:21 +00:00
|
|
|
fi
|
2009-06-14 16:51:22 +00:00
|
|
|
AC_SUBST(LIBEVENT_CFLAGS)
|
2009-06-03 15:47:08 +00:00
|
|
|
AC_SUBST(LIBEVENT_LIBS)
|
2007-07-18 23:04:26 +00:00
|
|
|
|
|
|
|
|
2009-06-19 23:50:09 +00:00
|
|
|
dnl ----------------------------------------------------------------------------
|
|
|
|
dnl
|
|
|
|
dnl dht
|
|
|
|
|
2009-08-18 16:02:16 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE([dht],
|
|
|
|
AS_HELP_STRING([--disable-dht],[omit DHT support]),
|
|
|
|
[enable_dht=${enableval}],
|
|
|
|
[enable_dht=yes])
|
|
|
|
if test "x$enable_dht" = "xno" ; then
|
|
|
|
AC_DEFINE([WITHOUT_DHT], 1)
|
|
|
|
DHT_CFLAGS=""
|
|
|
|
DHT_LIBS=""
|
|
|
|
else
|
|
|
|
DHT_CFLAGS="-I\$(top_srcdir)/third-party/dht"
|
|
|
|
DHT_LIBS="\$(top_builddir)/third-party/dht/libdht.a"
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(DHT, test "x$enable_dht" = "xyes")
|
2009-06-19 23:50:09 +00:00
|
|
|
AC_SUBST(DHT_CFLAGS)
|
|
|
|
AC_SUBST(DHT_LIBS)
|
|
|
|
|
|
|
|
|
2007-07-18 23:04:26 +00:00
|
|
|
dnl ----------------------------------------------------------------------------
|
|
|
|
dnl
|
2007-07-19 14:06:50 +00:00
|
|
|
dnl detection for the GTK+ client
|
2007-07-18 23:04:26 +00:00
|
|
|
|
2008-01-13 17:29:50 +00:00
|
|
|
PKG_CHECK_MODULES(GTK,
|
|
|
|
[gtk+-2.0 >= $GTK_MINIMUM
|
|
|
|
glib-2.0 >= $GLIB_MINIMUM
|
|
|
|
gmodule-2.0 >= $GLIB_MINIMUM
|
|
|
|
gthread-2.0 >= $GLIB_MINIMUM],
|
|
|
|
[have_gtk=yes],
|
|
|
|
[have_gtk=no])
|
|
|
|
AC_ARG_ENABLE([gtk],
|
2008-12-16 21:56:13 +00:00
|
|
|
AS_HELP_STRING([--enable-gtk],[build gtk client]),
|
2008-01-13 17:29:50 +00:00
|
|
|
[want_gtk=${enableval}],
|
|
|
|
[want_gtk=${have_gtk}])
|
|
|
|
build_gtk=no
|
2008-05-08 17:12:57 +00:00
|
|
|
use_gio=no
|
|
|
|
use_libnotify=no
|
|
|
|
use_dbus_glib=no
|
2007-07-18 23:04:26 +00:00
|
|
|
if test "x$want_gtk" = "xyes" ; then
|
|
|
|
if test "x$have_gtk" = "xyes"; then
|
2008-01-13 17:29:50 +00:00
|
|
|
build_gtk=yes
|
2007-07-18 23:04:26 +00:00
|
|
|
else
|
|
|
|
AC_MSG_ERROR("GTK+ not found!")
|
|
|
|
fi
|
|
|
|
fi
|
2008-01-13 17:29:50 +00:00
|
|
|
AM_CONDITIONAL([BUILD_GTK],[test "x$build_gtk" = "xyes"])
|
2007-08-16 00:28:00 +00:00
|
|
|
AC_SUBST(GTK_LIBS)
|
|
|
|
AC_SUBST(GTK_CFLAGS)
|
2007-07-18 23:04:26 +00:00
|
|
|
|
2008-05-08 17:12:57 +00:00
|
|
|
if test "x$build_gtk" = "xyes"; then
|
2008-03-09 15:27:08 +00:00
|
|
|
|
2008-05-08 17:12:57 +00:00
|
|
|
PKG_CHECK_MODULES([GIO],
|
|
|
|
[gio-2.0 >= $GIO_MINIMUM],
|
|
|
|
[use_gio=yes],
|
|
|
|
[use_gio=no])
|
|
|
|
AC_SUBST(GIO_LIBS)
|
|
|
|
AC_SUBST(GIO_CFLAGS)
|
|
|
|
if test "x$use_gio" = "xyes"; then
|
|
|
|
AC_DEFINE([HAVE_GIO], 1)
|
2008-04-20 13:43:29 +00:00
|
|
|
fi
|
2008-02-24 15:42:31 +00:00
|
|
|
|
2008-05-08 17:12:57 +00:00
|
|
|
PKG_CHECK_MODULES([LIBNOTIFY],
|
|
|
|
[libnotify >= $LIBNOTIFY_MINIMUM],
|
|
|
|
[have_libnotify=yes],
|
|
|
|
[have_libnotify=no])
|
|
|
|
AC_ARG_ENABLE([libnotify],
|
|
|
|
AS_HELP_STRING([--enable-libnotify],[enable notifications]),,
|
|
|
|
[enable_libnotify=yes])
|
|
|
|
use_libnotify=no
|
|
|
|
if test "x$enable_libnotify" = "xyes" ; then
|
|
|
|
if test "x$have_libnotify" = "xyes"; then
|
|
|
|
use_libnotify=yes
|
|
|
|
AC_SUBST(LIBNOTIFY_LIBS)
|
|
|
|
AC_SUBST(LIBNOTIFY_CFLAGS)
|
|
|
|
AC_DEFINE([HAVE_LIBNOTIFY], 1)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES([DBUS_GLIB],
|
|
|
|
[dbus-glib-1 >= $DBUS_GLIB_MINIMUM],
|
|
|
|
[use_dbus_glib=yes],
|
|
|
|
[use_dbus_glib=no])
|
|
|
|
AC_SUBST(DBUS_GLIB_LIBS)
|
|
|
|
AC_SUBST(DBUS_GLIB_CFLAGS)
|
2008-08-17 12:39:37 +00:00
|
|
|
if test "x$use_dbus_glib" = "xyes"; then
|
|
|
|
AC_DEFINE([HAVE_DBUS_GLIB], 1)
|
|
|
|
fi
|
2008-08-17 12:39:26 +00:00
|
|
|
if test "x$use_dbus_glib" = "xyes"; then
|
|
|
|
AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool, no)
|
|
|
|
if test "x$DBUS_BINDING_TOOL" = xno; then
|
|
|
|
AC_MSG_WARN([Cannot find dbus-binding-tool])
|
|
|
|
use_dbus_glib="no (dbus-binding-tool not found)"
|
|
|
|
fi
|
|
|
|
fi
|
2008-04-13 02:56:26 +00:00
|
|
|
fi
|
|
|
|
|
2008-12-03 14:44:52 +00:00
|
|
|
AC_ARG_ENABLE([nls],
|
|
|
|
AS_HELP_STRING([--enable-nls],[enable native language support]),,
|
|
|
|
[enable_nls=yes])
|
|
|
|
|
2008-12-10 19:31:21 +00:00
|
|
|
if test "x$build_gtk" = "xyes" -a "x$enable_nls" = "xno" ; then
|
|
|
|
AC_MSG_ERROR("The gtk client cannot be built without nls support. Try adding either --enable-nls or --disable-gtk" )
|
|
|
|
fi
|
|
|
|
|
2009-06-23 14:15:23 +00:00
|
|
|
dnl This section is only used for internationalization.
|
|
|
|
dnl If you don't need translations and this section gives you trouble --
|
|
|
|
dnl such as if you're building for a headless system --
|
|
|
|
dnl it's okay to tear this section out and re-build the configure script.
|
2009-06-24 14:58:27 +00:00
|
|
|
dnl
|
|
|
|
dnl Note to packagers: the bump to intltool 0.40 was made to fix
|
|
|
|
dnl a "make check" failure on some systems. if upgrading to 0.40 is
|
|
|
|
dnl a problem and the old version was working fine for you,
|
|
|
|
dnl it should be safe to re-edit 0.40 back down to 0.23
|
|
|
|
|
2008-12-03 14:44:52 +00:00
|
|
|
use_nls=no
|
|
|
|
if test "x$enable_nls" = "xyes" ; then
|
|
|
|
use_nls=yes
|
2009-08-12 13:48:19 +00:00
|
|
|
IT_PROG_INTLTOOL([0.40.0],[no-xml])
|
2008-12-03 14:44:52 +00:00
|
|
|
AC_CHECK_HEADERS([libintl.h])
|
|
|
|
GETTEXT_PACKAGE=transmission
|
|
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
|
|
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
|
|
|
|
AM_GLIB_GNU_GETTEXT
|
|
|
|
transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
|
|
|
|
AC_SUBST(transmissionlocaledir)
|
|
|
|
fi
|
2008-01-13 17:29:50 +00:00
|
|
|
|
2007-07-18 23:04:26 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------------
|
|
|
|
dnl
|
|
|
|
dnl platform-specific stuff.
|
|
|
|
|
|
|
|
AC_CANONICAL_HOST
|
2008-01-13 17:29:50 +00:00
|
|
|
have_darwin="no"
|
|
|
|
have_msw="no"
|
2007-07-18 23:04:26 +00:00
|
|
|
case $host_os in
|
|
|
|
|
2009-08-09 18:04:33 +00:00
|
|
|
*mingw32*)
|
2008-01-13 17:29:50 +00:00
|
|
|
have_msw="yes"
|
2007-07-18 23:04:26 +00:00
|
|
|
CXXFLAGS="$CXXFLAGS -mms-bitfields -mwin32 -mwindows"
|
2008-09-05 14:32:24 +00:00
|
|
|
CPPFLAGS="$CPPFLAGS -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN"
|
2007-07-18 23:04:26 +00:00
|
|
|
LIBS="$LIBS -lshell32 -lws2_32"
|
|
|
|
transmissionlocaledir="locale"
|
|
|
|
if test -z "$host_alias"; then
|
|
|
|
hostaliaswindres=
|
|
|
|
else
|
|
|
|
hostaliaswindres="$host_alias-windres";
|
|
|
|
fi
|
2008-09-06 04:31:08 +00:00
|
|
|
AC_CHECK_TOOL(WINDRES, windres)
|
2007-07-18 23:04:26 +00:00
|
|
|
;;
|
|
|
|
|
2007-07-19 01:30:45 +00:00
|
|
|
*darwin*)
|
2008-01-13 17:29:50 +00:00
|
|
|
have_darwin="yes"
|
2009-07-17 12:38:52 +00:00
|
|
|
# Make sure the proper Mac SDK is installed
|
|
|
|
if test ! -d /Developer/SDKs/MacOSX10.5.sdk; then
|
2007-07-18 23:04:26 +00:00
|
|
|
cat << EOF
|
2009-07-17 12:38:52 +00:00
|
|
|
You need to install the Mac OS X 10.5 SDK in order to build Transmission:
|
2007-07-18 23:04:26 +00:00
|
|
|
Get your Xcode CD or package
|
|
|
|
Restart the install
|
|
|
|
When it gets to "Installation Type", select "Customize"
|
2009-07-17 12:38:52 +00:00
|
|
|
Select "Mac OS X 10.5 SDK" under "Cross Development"
|
2007-07-18 23:04:26 +00:00
|
|
|
Finish the install.
|
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
2008-01-13 17:29:50 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE([cli],
|
2008-12-16 21:56:13 +00:00
|
|
|
[AS_HELP_STRING([--enable-cli],[build command-line client])],
|
2008-01-13 17:29:50 +00:00
|
|
|
[build_cli=${enableval}],
|
|
|
|
[build_cli="yes"])
|
|
|
|
AM_CONDITIONAL([BUILD_CLI],[test "x$build_cli" = "xyes"])
|
|
|
|
|
2008-08-15 21:01:02 +00:00
|
|
|
AC_ARG_ENABLE([mac],
|
2009-07-17 12:36:40 +00:00
|
|
|
[AS_HELP_STRING([--enable-mac],[build Mac client])],
|
2008-08-15 21:01:02 +00:00
|
|
|
[build_mac=${enableval}],
|
|
|
|
[build_mac=${have_darwin}])
|
|
|
|
AM_CONDITIONAL([BUILD_MAC],[test "x$build_mac" = "xyes"])
|
2008-01-13 17:29:50 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE([daemon],
|
2008-12-16 21:56:13 +00:00
|
|
|
[AS_HELP_STRING([--enable-daemon],[build daemon])],
|
2008-01-13 17:29:50 +00:00
|
|
|
[build_daemon=${enableval}],
|
|
|
|
[build_daemon="yes"])
|
|
|
|
AM_CONDITIONAL([BUILD_DAEMON],[test "x$build_daemon" = "xyes"])
|
|
|
|
|
|
|
|
|
2008-02-17 01:23:58 +00:00
|
|
|
if test "x$have_darwin" = "xyes"; then
|
|
|
|
AC_DEFINE([HAVE_DARWIN], 1)
|
|
|
|
fi
|
|
|
|
if test "x$have_msw" = "xyes"; then
|
|
|
|
AC_DEFINE([HAVE_MSW], 1)
|
|
|
|
fi
|
2008-09-05 15:13:03 +00:00
|
|
|
AM_CONDITIONAL(WIN32, test "x$have_msw" = "xyes")
|
2007-07-18 23:04:26 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------------
|
|
|
|
dnl
|
|
|
|
dnl Generate the output
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
transmission.spec
|
|
|
|
cli/Makefile
|
|
|
|
daemon/Makefile
|
2008-05-21 14:31:43 +00:00
|
|
|
doc/Makefile
|
2007-07-18 23:04:26 +00:00
|
|
|
libtransmission/Makefile
|
2007-08-14 19:26:49 +00:00
|
|
|
third-party/Makefile
|
2007-11-06 16:02:50 +00:00
|
|
|
third-party/miniupnp/Makefile
|
2007-12-08 19:34:15 +00:00
|
|
|
third-party/libnatpmp/Makefile
|
2009-05-19 18:38:26 +00:00
|
|
|
third-party/dht/Makefile
|
2007-07-18 23:04:26 +00:00
|
|
|
macosx/Makefile
|
2007-11-01 19:14:40 +00:00
|
|
|
gtk/Makefile
|
2008-02-07 20:02:06 +00:00
|
|
|
gtk/icons/Makefile
|
2007-11-01 19:14:40 +00:00
|
|
|
po/Makefile.in])
|
2007-07-18 23:04:26 +00:00
|
|
|
|
2007-08-17 02:50:55 +00:00
|
|
|
ac_configure_args="$ac_configure_args --enable-static --disable-shared -q"
|
2007-07-18 23:04:26 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|
|
|
|
echo "
|
|
|
|
|
|
|
|
Configuration:
|
|
|
|
|
2009-06-03 16:31:43 +00:00
|
|
|
Source code location: ${srcdir}
|
|
|
|
Compiler: ${CXX}
|
|
|
|
System or bundled libevent: ${libevent_source}
|
2009-08-18 16:02:16 +00:00
|
|
|
DHT support: ${enable_dht}
|
2009-06-03 16:31:43 +00:00
|
|
|
|
2009-07-17 12:38:52 +00:00
|
|
|
Build Mac client: ${build_mac}
|
2009-06-03 16:31:43 +00:00
|
|
|
Build GTK+ client: ${build_gtk}
|
|
|
|
... with gio support: ${use_gio}
|
|
|
|
... with dbus-glib support: ${use_dbus_glib}
|
|
|
|
... with libnotify support: ${use_libnotify}
|
|
|
|
Build Command-Line client: ${build_cli}
|
|
|
|
Build Daemon: ${build_daemon}
|
2007-07-18 23:04:26 +00:00
|
|
|
|
|
|
|
"
|