source: trunk/configure.ac @ 2853

Last change on this file since 2853 was 2853, checked in by charles, 15 years ago

added mirek's slovakian translation. added mirek, Niels Provos, and TooMuchTime? to the `thanks' sectio of AUTHORS

File size: 6.0 KB
Line 
1AC_INIT([Transmission],[0.80+],[http://transmission.m0k.org/trac/newticket])
2PEERID_PREFIX="-TR080Z-"
3USERAGENT_PREFIX="0.80+"
4
5AC_PREREQ(2.54)
6dnl AM_CONFIG_HEADER(config.h)
7AC_CONFIG_SRCDIR(libtransmission/transmission.h)
8AM_INIT_AUTOMAKE(AC_PACKAGE_NAME,AC_PACKAGE_VERSION)
9AC_PROG_LIBTOOL
10
11GLIB_MINIMUM=2.6.0
12GTK_MINIMUM=2.6.0
13WX_MINIMUM=2.6.0
14AC_SUBST(GLIB_MINIMUM)
15AC_SUBST(GTK_MINIMUM)
16AC_SUBST(WX_MINIMUM)
17
18AC_PROG_CC
19AC_PROG_CXX
20if test "x$GCC" = "xyes" ; then
21    CFLAGS="-g -Wall -W -O3 -funroll-loops"
22    CXXFLAGS="-g -Wall -W -O3 -funroll-loops"
23fi
24AC_HEADER_STDC
25AC_HEADER_TIME
26AC_CHECK_FUNCS([lrintf strlcpy strlcat daemon dirname basename])
27AC_PROG_INSTALL
28AC_PROG_MAKE_SET
29AC_PROG_RANLIB
30ACX_PTHREAD
31
32dnl AC_PROG_INTLTOOL([0.23],[no-xml])
33GETTEXT_PACKAGE=transmission
34AC_SUBST(GETTEXT_PACKAGE)
35AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
36ALL_LINGUAS="bg es fi fr it pl ro ru sk sv"
37AM_GLIB_GNU_GETTEXT
38transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
39
40AC_CHECK_LIB([crypto],[CRYPTO_new_ex_data])
41AC_CHECK_LIB([ssl],[SSL_library_init])
42AC_SEARCH_LIBS([socket], [socket net])
43AC_SEARCH_LIBS([gethostbyname], [nsl bind])
44
45dnl ----------------------------------------------------------------------------
46dnl
47dnl  libevent fun
48
49AC_CONFIG_SUBDIRS([third-party/libevent])
50AC_MSG_NOTICE([invoking libevent's configure script])
51LIBEVENT_CPPFLAGS="-I\$(top_srcdir)/third-party/libevent"
52AC_SUBST(LIBEVENT_CPPFLAGS)
53
54
55dnl ----------------------------------------------------------------------------
56dnl
57dnl  detection for the GTK+ client
58
59have_gtk=yes
60PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= $GTK_MINIMUM
61                        glib-2.0 >= $GLIB_MINIMUM
62                        gmodule-2.0 >= $GLIB_MINIMUM
63                        gthread-2.0 >= $GLIB_MINIMUM],, [have_gtk=no])
64AC_ARG_WITH(gtk, AC_HELP_STRING([--with-gtk], [Build gtk client]),
65                 [want_gtk=$withval],
66                 [want_gtk=$have_gtk])
67use_gtk=no
68if test "x$want_gtk" = "xyes" ; then
69    if test "x$have_gtk" = "xyes"; then
70      use_gtk=yes
71    else
72      AC_MSG_ERROR("GTK+ not found!")
73    fi
74fi
75AM_CONDITIONAL([WITH_GTK],[test "x$use_gtk" = "xyes"])
76AC_SUBST(GTK_LIBS)
77AC_SUBST(GTK_CFLAGS)
78
79
80dnl ----------------------------------------------------------------------------
81dnl
82dnl  wxWidgets detection for the wxWidgets client
83
84
85AM_OPTIONS_WXCONFIG
86AM_PATH_WXCONFIG($WX_MINIMUM,[have_wx=yes],[have_wx=no])
87AC_ARG_WITH(wx, AC_HELP_STRING([--with-wx], [Build wxWidgets client]),
88                [want_wx=$withval],
89                [want_wx=$have_wx])
90use_wx=no
91if test "x$want_wx" = "xyes" ; then
92    if test "x$have_wx" = "xyes"; then
93      use_wx=yes
94    else
95      AC_MSG_ERROR("wxWidgets not found!")
96    fi
97fi
98AM_CONDITIONAL([HAVE_WX],[test "x$use_wx" = "xyes"])
99
100
101
102dnl ----------------------------------------------------------------------------
103dnl
104dnl  platform-specific stuff.
105
106AC_CANONICAL_HOST
107beos="no"
108darwin="no"
109msw="no"
110case $host_os in
111
112   *cygwin|*mingw32*)
113     msw="yes"
114     CXXFLAGS="$CXXFLAGS -mms-bitfields -mwin32 -mwindows"
115     CPPFLAGS="$CPPFLAGS -DWIN32 -DWIN32_LEAN_AND_MEAN"
116     LIBS="$LIBS -lshell32 -lws2_32"
117     transmissionlocaledir="locale"
118     if test -z "$host_alias"; then
119       hostaliaswindres=
120     else
121       hostaliaswindres="$host_alias-windres";
122     fi
123     AC_PATH_PROGS([WINDRES], [windres $hostaliaswindres $host_os-windres])
124     if test "x$WINDRES" = "x"; then
125       AC_MSG_ERROR([windres could not be found within your path.])
126     fi
127     AC_SUBST(WINDRES)
128     ;;
129
130  *beos*)
131    beos="yes"
132    RELEASE=`uname -r`
133    case $RELEASE in
134      6.*|5.0.4) # Zeta or R5 / BONE beta 7
135        ;;
136      5.0*)       # R5 / net_server
137        CPPFLAGS="$CPPFLAGS -DBEOS_NETSERVER"
138        ;;
139      *)
140        AC_MSG_ERROR("Unsupported BeOS version")
141        ;;
142    esac
143    GCCVER=`$CC -dumpversion`
144    case $GCCVER in
145      2.95.3*|3*|4*)
146        ;;
147      2.9*)
148        BEOS_OLDCC=yes
149        ;;
150      *)
151        AC_MSG_ERROR("Unsupported gcc version")
152        ;;
153    esac
154    ;;
155
156  *darwin*)
157    darwin="yes"
158    # Make sure the Universal SDK is installed
159    if test ! -d /Developer/SDKs/MacOSX10.4u.sdk; then
160      cat << EOF
161You need to install the Universal SDK in order to build Transmission:
162  Get your Xcode CD or package
163  Restart the install
164  When it gets to "Installation Type", select "Customize"
165  Select "Mac OS X 10.4 (Universal) SDK" under "Cross Development"
166  Finish the install.
167EOF
168      exit 1
169    fi
170    ;;
171
172esac
173AM_CONDITIONAL([HAVE_BEOS],[test "x$beos" = "xyes"])
174AM_CONDITIONAL([HAVE_DARWIN],[test "x$darwin" = "xyes"])
175AM_CONDITIONAL([HAVE_WINDOWS],[test "x$msw" = "xyes"])
176
177
178dnl ----------------------------------------------------------------------------
179dnl
180dnl  Version files
181
182
183dnl constraint: strlen(MAJOR MINOR MAINT BETA) must be 4
184dnl convention: BETA: "Z" for a beta, "0" for a stable
185SVN_REVISION=`svn info . | sed -ne "s/^Revision: \(.*\:\)\{0,1\}\(.*\)$/\2/p"`
186AC_SUBST(PEERID_PREFIX,[$PEERID_PREFIX])
187AC_SUBST(USERAGENT_PREFIX,[$USERAGENT_PREFIX])
188AC_SUBST(SVN_REVISION,[$SVN_REVISION])
189AC_SUBST(BUNDLE_VERSION,[$SVN_REVISION])
190AC_SUBST(VERSION_PACKAGE,$USERAGENT_PREFIX-r$SVN_REVISION)
191
192
193
194dnl ----------------------------------------------------------------------------
195dnl
196dnl  Generate the output
197
198AC_CONFIG_FILES([Makefile
199                 transmission.spec
200                 beos/Makefile
201                 cli/Makefile
202                 daemon/Makefile
203                 gtk/Makefile
204                 libtransmission/Makefile
205                 libtransmission/version.h
206                 third-party/Makefile
207                 macosx/Makefile
208                 wx/Makefile
209                 wx/images/Makefile])
210
211ac_configure_args="$ac_configure_args --enable-static --disable-shared -q"
212AC_OUTPUT
213
214echo "
215
216Configuration:
217
218        Source code location:    ${srcdir}
219        Compiler:                ${CXX}
220        Build libtransmission:   yes
221        Build Daemon:            yes
222        Build BeOS client:       ${beos}
223        Build GTK+ client:       ${use_gtk}
224        Build OS X client:       ${darwin}
225        Build wxWidgets client:  ${use_wx}
226
227"
Note: See TracBrowser for help on using the repository browser.