ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/configure.ac
(Generate patch)

Comparing deliantra/server/configure.ac (file contents):
Revision 1.53 by pippijn, Mon Mar 5 19:54:10 2007 UTC vs.
Revision 1.77 by root, Sun Jun 10 02:51:45 2007 UTC

1dnl Process this file with autoconf to produce a configure script. 1dnl Process this file with autoconf to produce a configure script.
2 2
3AC_INIT([crossfire], [2.0+], [crossfire@schmorp.de]) 3AC_INIT([cfserver], [2.2], [crossfire@schmorp.de])
4AC_CONFIG_AUX_DIR(utils) 4AC_CONFIG_AUX_DIR(utils)
5AC_CONFIG_SRCDIR([server/main.C]) 5AC_CONFIG_SRCDIR([server/cfperl.xs])
6AM_INIT_AUTOMAKE 6AM_INIT_AUTOMAKE
7AM_CONFIG_HEADER(include/autoconf.h) 7AM_CONFIG_HEADER(include/autoconf.h)
8 8
9AM_MAINTAINER_MODE 9AM_MAINTAINER_MODE
10 10
11AC_PREFIX_DEFAULT(/usr/games/crossfire) 11AC_PREFIX_DEFAULT(/usr/games/crossfire)
12 12
13dnl Checks for programs. 13AC_PATH_PROG(GPERF, gperf)
14AC_LANG(C++) 14if test -z "$GPERF"; then
15AC_PROG_CXX 15 AC_MSG_ERROR([gperf, the GNU perfect hash generator, must be in your PATH, check the README])
16AC_PROG_LIBTOOL 16fi
17 17
18AC_PROG_CPP 18AC_PATH_PROG(RSYNC, rsync)
19if test -z "$RSYNC"; then
20 AC_MSG_ERROR([rsync must be in your PATH, check the README])
21fi
22
23AC_PATH_PROG(OPTIPNG, optipng)
24if test -z "$OPTIPNG"; then
25 AC_MSG_ERROR([optipng must be in your PATH, check the README])
26fi
27
28AC_PATH_PROG(PNGNQ, pngnq)
29if test -z "$PNGNQ"; then
30 AC_MSG_ERROR([png neuquant (pngnq) must be in your PATH, check the README])
31fi
32
33dnl AC_PATH_PROG(IDENTIFY, identify)
34dnl if test -z "$IDENTIFY"; then
35dnl AC_MSG_ERROR([ImageMagick 'identify' must be in your PATH, check the README])
36dnl fi
37
38AC_PATH_PROG(CONVERT, convert)
39if test -z "$CONVERT"; then
40 AC_MSG_ERROR([ImageMagick 'convert' must be in your PATH, check the README])
41fi
19 42
20AC_PATH_PROG(PERL, perl5.8) 43AC_PATH_PROG(PERL, perl5.8)
44if test -z "$PERL"; then
21AC_PATH_PROG(PERL, perl5) 45 AC_PATH_PROG(PERL, perl5)
46 if test -z "$PERL"; then
22AC_PATH_PROG(PERL, perl) 47 AC_PATH_PROG(PERL, perl)
48 if test -z "$PERL"; then
49 AC_MSG_ERROR([perl 5.8 or higher must be in your PATH, check the README])
50 fi
51 fi
52fi
23 53
24for module_vers in "Crossfire 0.97" "Coro 3.5" "Coro::Event 2.1" "Event 1.08" \ 54for module_vers in \
25 "IO::AIO 2.32" "BDB 0.1" "Storable 2.0" "Time::HiRes 1.0" "YAML::Syck 0.71" \ 55 "AnyEvent 2.52" \
26 "Digest::MD5 2.0" "Compress::LZF 1.71" "Safe::Hole 0.10" "Pod::POM 0.17"; do 56 "BDB 0.1" \
57 "Compress::LZF 1.8" \
58 "Coro 3.62" \
59 "Coro::Event 2.1" \
60 "Crossfire 0.99" \
61 "Digest::MD5 2.0" \
62 "Event 1.08" \
63 "IO::AIO 2.4" \
64 "JSON::XS 1.21" \
65 "Pod::POM 0.17" \
66 "Safe::Hole 0.10" \
67 "Storable 2.0" \
68 "Time::HiRes 1.0" \
69 "YAML::Syck 0.71" \
70; do
27 set -- $module_vers 71 set -- $module_vers
28 module=$1 72 module=$1
29 minvers=$2 73 minvers=$2
30 AC_MSG_CHECKING(for $module perl module version $minvers or higher) 74 AC_MSG_CHECKING(for $module perl module version $minvers or higher)
31 if $PERL -M$module -e0 >/dev/null 2>&1; then 75 if $PERL -M$module -e0 >/dev/null 2>&1; then
38 else 82 else
39 AC_MSG_ERROR([no, cannot load module $module]) 83 AC_MSG_ERROR([no, cannot load module $module])
40 fi 84 fi
41done 85done
42 86
87AC_LANG(C++)
88AC_PROG_CXX
89AC_PROG_CPP
90
91AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])])
92
93AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
94
95AC_MSG_CHECKING(glib >= 2.10)
96if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then
97 CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`"
98 LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`"
99 AC_MSG_RESULT(ok)
100else
101 AC_MSG_ERROR(no)
102fi
103
104dnl AC_MSG_CHECKING(libpng)
105dnl if $PKG_CONFIG libpng --exists; then
106dnl CXXFLAGS="$CXXFLAGS `$PKG_CONFIG libpng --cflags`"
107dnl LIBS="$LIBS `$PKG_CONFIG libpng --libs`"
108dnl AC_MSG_RESULT(ok)
109dnl else
110dnl AC_MSG_ERROR(no)
111dnl fi
112
43AC_MSG_CHECKING(for $PERL suitability) 113AC_MSG_CHECKING(for $PERL suitability)
44if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then 114if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then
45 save_CXXFLAGS="$CXXFLAGS" 115 save_CXXFLAGS="$CXXFLAGS"
46 save_LIBS="$LIBS" 116 save_LIBS="$LIBS"
47 xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" 117 xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`"
76AC_SUBST(PERLLIB) 146AC_SUBST(PERLLIB)
77AC_SUBST(PERLFLAGS) 147AC_SUBST(PERLFLAGS)
78AC_SUBST(PERLPRIVLIBEXP) 148AC_SUBST(PERLPRIVLIBEXP)
79AC_SUBST(PERL) 149AC_SUBST(PERL)
80 150
151AC_PROG_LIBTOOL
152
153AC_CHECK_HEADERS(execinfo.h)
154AC_CHECK_FUNCS(backtrace)
155
81dnl check for some other programs 156dnl check for some other programs
82AC_PATH_PROG(TAR, tar) 157AC_PATH_PROG(TAR, tar)
83AC_PATH_PROG(BASENAME, basename) 158AC_PATH_PROG(BASENAME, basename)
84 159
85AC_PATH_PROG(GPERF, gperf)
86if test -z "$GPERF"; then
87 AC_MSG_ERROR([we need gperf, the GNU perfect hash generator])
88fi
89
90AC_CHECK_LIB(nsl, main) 160AC_CHECK_LIB(nsl, main)
91AC_CHECK_LIB(socket, main) 161AC_CHECK_LIB(socket, main)
92 162
93dnl Checks for libraries. 163dnl Checks for libraries.
94AC_CHECK_LIB(m, main) 164AC_CHECK_LIB(m, main)
95 165
96AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])])
97
98AC_CHECK_SIZEOF(long) 166AC_CHECK_SIZEOF(long)
99AC_CHECK_SIZEOF(long long) 167AC_CHECK_SIZEOF(long long)
100 168
101AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 169AC_MSG_CHECKING(for tcp_info support)
102 170AC_TRY_LINK([
103AC_MSG_CHECKING(glib >= 2.10) 171#include <sys/types.h>
104if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then 172#include <sys/socket.h>
105 CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`" 173#include <netinet/in.h>
106 LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`" 174#include <netinet/tcp.h>
175],[
176 int fd;
177 struct tcp_info tcpi;
178 socklen_t len = sizeof (tcpi);
179 getsockopt (fd, IPPROTO_TCP, TCP_INFO, &tcpi, &len);
180 fd = 0
181 + tcpi.tcpi_rtt
182 + tcpi.tcpi_rttvar
183 + tcpi.tcpi_last_ack_recv
184 + tcpi.tcpi_last_data_sent
185 + tcpi.tcpi_unacked;
186],[
187 AC_DEFINE(HAVE_TCP_INFO, [1], [TCP_INFO info option supported])
188 AC_MSG_RESULT(yes)
189],[
107 AC_MSG_RESULT(ok) 190 AC_MSG_RESULT(no)
108else 191])
109 AC_MSG_ERROR(no)
110fi
111
112AC_MSG_CHECKING(libpng)
113if $PKG_CONFIG libpng --exists; then
114 CXXFLAGS="$CXXFLAGS `$PKG_CONFIG libpng --cflags`"
115 LIBS="$LIBS `$PKG_CONFIG libpng --libs`"
116 AC_MSG_RESULT(ok)
117else
118 AC_MSG_ERROR(no)
119fi
120 192
121AC_SUBST(pkgstatedir,$localstatedir/$PACKAGE) 193AC_SUBST(pkgstatedir,$localstatedir/$PACKAGE)
122AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE) 194AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE)
123 195
124AC_OUTPUT([Makefile 196AC_OUTPUT([Makefile
125 include/Makefile lib/Makefile pod/Makefile random_maps/Makefile socket/Makefile 197 include/Makefile lib/Makefile pod/Makefile random_maps/Makefile socket/Makefile
126 server/Makefile utils/Makefile ext/Makefile doc/Makefile 198 server/Makefile utils/Makefile ext/Makefile doc/Makefile
127 lib/checkarch.pl lib/collect.pl common/Makefile 199 common/Makefile utils/cfutil
128]) 200])
129 201

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines