1 | dnl Process this file with autoconf to produce a configure script. |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | |
2 | |
3 | AC_REVISION($Id: configure.ac,v 1.2 2006/02/03 07:25:24 root Exp $) |
3 | AC_INIT([deliantra-server], [2.41], [support@deliantra.net]) |
4 | AC_INIT([crossfire], [1.8.0], [crossfire-devel@listserv.real-time.com]) |
|
|
5 | AC_CONFIG_AUX_DIR(utils) |
4 | AC_CONFIG_AUX_DIR(utils) |
6 | AC_CONFIG_SRCDIR([server/main.c]) |
5 | AC_CONFIG_SRCDIR([server/cfperl.xs]) |
7 | AM_INIT_AUTOMAKE |
6 | AM_INIT_AUTOMAKE |
8 | AM_CONFIG_HEADER(include/autoconf.h) |
7 | AM_CONFIG_HEADER(include/autoconf.h) |
9 | |
8 | |
10 | AM_MAINTAINER_MODE |
9 | AM_MAINTAINER_MODE |
11 | |
10 | |
12 | AC_PREFIX_DEFAULT(/usr/games/crossfire) |
11 | AC_PREFIX_DEFAULT(/usr/games/deliantra) |
13 | |
12 | |
14 | dnl we want a config.h file instead of -D options. |
13 | AC_PATH_PROG(GPERF, gperf) |
|
|
14 | if test -z "$GPERF"; then |
|
|
15 | AC_MSG_ERROR([gperf, the GNU perfect hash generator, must be in your PATH, check the README]) |
|
|
16 | fi |
15 | |
17 | |
16 | dnl Checks for programs. |
18 | AC_PATH_PROG(RSYNC, rsync) |
17 | AC_PROG_LIBTOOL |
19 | if test -z "$RSYNC"; then |
18 | AC_PROG_CC |
20 | AC_MSG_ERROR([rsync must be in your PATH, check the README]) |
|
|
21 | fi |
19 | |
22 | |
20 | case "$target" in |
23 | AC_PATH_PROG(OPTIPNG, optipng) |
21 | alpha-dec-osf*) |
24 | if test -z "$OPTIPNG"; then |
22 | # If we are not using gcc, we want the ansi version of cc. |
25 | AC_MSG_ERROR([optipng must be in your PATH, check the README]) |
|
|
26 | fi |
|
|
27 | |
|
|
28 | AC_PATH_PROG(PNGNQ, pngnq) |
|
|
29 | if test -z "$PNGNQ"; then |
|
|
30 | AC_MSG_ERROR([png neuquant (pngnq) must be in your PATH, check the README]) |
|
|
31 | fi |
|
|
32 | |
|
|
33 | dnl AC_PATH_PROG(IDENTIFY, identify) |
|
|
34 | dnl if test -z "$IDENTIFY"; then |
|
|
35 | dnl AC_MSG_ERROR([ImageMagick 'identify' must be in your PATH, check the README]) |
|
|
36 | dnl fi |
|
|
37 | |
|
|
38 | AC_PATH_PROG(CONVERT, convert) |
|
|
39 | if test -z "$CONVERT"; then |
|
|
40 | AC_MSG_ERROR([ImageMagick 'convert' must be in your PATH, check the README]) |
|
|
41 | fi |
|
|
42 | |
|
|
43 | AC_PATH_PROG(PERL, perl5.8) |
|
|
44 | if test -z "$PERL"; then |
|
|
45 | AC_PATH_PROG(PERL, perl5) |
23 | if test -z "$GCC"; then |
46 | if test -z "$PERL"; then |
24 | # CFLAGS="$CFLAGS -std1 -warnprotos" # Not yet ready for warnprotos... |
47 | AC_PATH_PROG(PERL, perl) |
25 | CFLAGS="$CFLAGS -std1" |
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 |
26 | fi |
51 | fi |
27 | ;; |
52 | fi |
28 | *) |
|
|
29 | ;; |
|
|
30 | esac |
|
|
31 | |
53 | |
|
|
54 | for module_vers in \ |
|
|
55 | "AnyEvent 2.6" \ |
|
|
56 | "BDB 1.43" \ |
|
|
57 | "Compress::LZF 1.8" \ |
|
|
58 | "Coro 4.37" \ |
|
|
59 | "Coro::EV 2.1" \ |
|
|
60 | "Deliantra 1.13" \ |
|
|
61 | "Digest::MD5 2.0" \ |
|
|
62 | "EV 2.0" \ |
|
|
63 | "IO::AIO 2.51" \ |
|
|
64 | "JSON::XS 2.01" \ |
|
|
65 | "Net::IRC3 0.5" \ |
|
|
66 | "Pod::POM 0.17" \ |
|
|
67 | "Safe::Hole 0.10" \ |
|
|
68 | "Storable 2.0" \ |
|
|
69 | "Time::HiRes 1.0" \ |
|
|
70 | "URI 1.35" \ |
|
|
71 | "YAML 0.66" \ |
|
|
72 | ; do |
|
|
73 | set -- $module_vers |
|
|
74 | module=$1 |
|
|
75 | minvers=$2 |
|
|
76 | AC_MSG_CHECKING(for $module perl module version $minvers or higher) |
|
|
77 | if $PERL -M$module -e0 >/dev/null 2>&1; then |
|
|
78 | version=`$PERL -M$module -e "print \\$$module::VERSION"` |
|
|
79 | if $PERL -M$module -e "\$$module::VERSION >= $minvers or die" >/dev/null 2>&1; then |
|
|
80 | AC_MSG_RESULT([ok, version $version]) |
|
|
81 | else |
|
|
82 | AC_MSG_ERROR([no, installed version is $version]) |
|
|
83 | fi |
|
|
84 | else |
|
|
85 | AC_MSG_ERROR([no, cannot load module $module]) |
|
|
86 | fi |
|
|
87 | done |
32 | |
88 | |
|
|
89 | AC_LANG(C++) |
|
|
90 | AC_PROG_CXX |
33 | AC_PROG_CPP |
91 | AC_PROG_CPP |
34 | AM_PROG_LEX |
|
|
35 | AC_PROG_AWK |
|
|
36 | |
92 | |
37 | AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc Use the dmalloc library if available, may prevent plugins from working], |
93 | AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])]) |
38 | use_dmalloc=yes, use_dmalloc=no) |
|
|
39 | |
94 | |
40 | AC_ARG_WITH(python, [ --with-python=dir Directory to look for python headers/library (default=standard system location) ], |
95 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
41 | PYTHON_HOME="$withval") |
|
|
42 | |
96 | |
43 | |
97 | AC_MSG_CHECKING(glib >= 2.10) |
44 | dnl check for some other programs |
98 | if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then |
45 | AC_PATH_PROG(LATEX, latex) |
99 | CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`" |
46 | AC_PATH_PROG(GZIP, gzip) |
100 | LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`" |
47 | AC_PATH_PROG(GUNZIP, gunzip) |
101 | AC_MSG_RESULT(ok) |
48 | AC_PATH_PROG(TAR, tar) |
|
|
49 | AC_PATH_PROG(PERL, perl) |
|
|
50 | AC_PATH_PROG(BASENAME, basename) |
|
|
51 | |
|
|
52 | if test -n "$GZIP" -a -z "$GUNZIP" ; then |
|
|
53 | echo "Found gzip, but not gunzip - setting GUNZIP to gzip -c"; |
|
|
54 | GUNZIP="$GZIP -c" |
|
|
55 | fi; |
|
|
56 | |
|
|
57 | if test -z "$COMPRESS" ; then |
|
|
58 | AC_PATH_PROG(COMPRESS, compress) |
|
|
59 | AC_PATH_PROG(UNCOMPRESS, uncompress) |
|
|
60 | fi |
|
|
61 | |
|
|
62 | AC_PATH_PROG(BZIP, bzip2) |
|
|
63 | AC_PATH_PROG(BUNZIP, bunzip2) |
|
|
64 | |
|
|
65 | if test -n "$BZIP" -a -z "$BUNZIP" ; then |
|
|
66 | echo "Found bzip2, but not bunzip2 - setting BUNZIP to bzip2 -c"; |
|
|
67 | BUNZIP="$BZIP -c" |
|
|
68 | fi; |
|
|
69 | |
|
|
70 | if test -z "$COMPRESS" -a -z "$GZIP" -a -z "$BZIP" ; then |
|
|
71 | echo "Unable to find either compress, bzip2, or gzip - hope you don't plan on compressing"; |
|
|
72 | echo "any files."; |
|
|
73 | fi; |
|
|
74 | |
|
|
75 | dnl nsl, socket may be needed for the X-windowing system, so check |
|
|
76 | dnl for them before before checking for X. |
|
|
77 | AC_CHECK_LIB(nsl, main) |
|
|
78 | AC_CHECK_LIB(socket, main) |
|
|
79 | |
|
|
80 | dnl Checks for libraries. |
|
|
81 | dnl Start of X11 libraries |
|
|
82 | AC_PATH_XTRA |
|
|
83 | |
|
|
84 | dnl Some of these checks are probably excessive. Unfortunately, on |
|
|
85 | dnl some systems, to link in Xaw, Xt you need SM, which needs ICE. |
|
|
86 | dnl the order of the checks below is important |
|
|
87 | OLD_LD_FLAGS="$LDFLAGS" |
|
|
88 | LDFLAGS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS" |
|
|
89 | |
|
|
90 | AC_CHECK_LIB(X11, main, AC_DEFINE(HAVE_LIBX11,[],[Define if libX11 is available]) X11LIBS="$X11LIBS -lX11") |
|
|
91 | |
|
|
92 | AC_CHECK_LIB(ICE, main, AC_DEFINE(HAVE_LIBICE,[],[Define if libICE is available]) X11LIBS="$X11LIBS -lICE") |
|
|
93 | |
|
|
94 | AC_CHECK_LIB(SM, main, AC_DEFINE(HAVE_LIBSM,[],[Define if libSM is available]) X11LIBS="$X11LIBS -lSM", , $X11LIBS) |
|
|
95 | |
|
|
96 | AC_CHECK_LIB(Xext, main, AC_DEFINE(HAVE_LIBXEXT,[],[Define if libEXT is available]) X11LIBS="$X11LIBS -lXext", , -lX11) |
|
|
97 | |
|
|
98 | AC_CHECK_LIB(Xt, main, AC_DEFINE(HAVE_LIBXT,[],[Define if libXT is available]) X11LIBS="$X11LIBS -lXt", , $X11LIBS) |
|
|
99 | |
|
|
100 | AC_CHECK_LIB(Xmu, main, AC_DEFINE(HAVE_LIBXMU,[],[Define if libXMU is available]) X11LIBS="$X11LIBS -lXmu", ,$X11LIBS) |
|
|
101 | |
|
|
102 | AC_CHECK_LIB(Xaw, main, AC_DEFINE(HAVE_LIBXAW,[],[Define if libXAW is available]) X11LIBS="-lXaw $X11LIBS", , $X11LIBS) |
|
|
103 | |
|
|
104 | LDFLAGS="$OLD_LD_FLAGS" |
|
|
105 | X11LIBS="$X_LIBS $X11LIBS" |
|
|
106 | |
|
|
107 | AC_CHECK_LIB(Xpm, main, AC_DEFINE(HAVE_LIBXPM,[],[Define if libXpm is available]) X11LIBS="$X11LIBS -lXpm", , $X11LIBS ) |
|
|
108 | |
|
|
109 | AC_CHECK_LIB(m, main) |
|
|
110 | |
|
|
111 | AC_CHECK_LIB(png, main, AC_DEFINE(HAVE_LIBPNG,[],[Define if libpng is available]) X11LIBS="$X11LIBS -lpng", , $X11LIBS ) |
|
|
112 | |
|
|
113 | dnl png has a dependency in some cases on libz - if we have it, can't really |
|
|
114 | dnl be harmful to link it in. |
|
|
115 | AC_CHECK_LIB(z, main, AC_DEFINE(HAVE_LIBZ,[],[Define if libz is available]) X11LIBS="$X11LIBS -lz", , $X11LIBS ) |
|
|
116 | |
|
|
117 | dnl Misc libraries. |
|
|
118 | AC_CHECK_LIB(crypt, main) |
|
|
119 | AC_CHECK_LIB(des, des_crypt) |
|
|
120 | |
|
|
121 | dnl Gros - Changed this to support some external programs that do not like dmalloc (like Python). |
|
|
122 | dnl If you really need to make some memory debugging, uncomment the dmalloc line and comment out the dmalloclp one. |
|
|
123 | |
|
|
124 | if eval "test x$use_dmalloc = xyes"; then |
|
|
125 | AC_CHECK_LIB(dmalloc, main) |
|
|
126 | else |
102 | else |
127 | AC_CHECK_LIB(dmalloclp, main) |
103 | AC_MSG_ERROR(no) |
128 | fi |
104 | fi |
129 | |
105 | |
130 | dnl Checks for header files. |
106 | dnl AC_MSG_CHECKING(libpng) |
131 | AC_HEADER_DIRENT |
107 | dnl if $PKG_CONFIG libpng --exists; then |
132 | AC_HEADER_STDC |
108 | dnl CXXFLAGS="$CXXFLAGS `$PKG_CONFIG libpng --cflags`" |
133 | AC_CHECK_HEADERS(fcntl.h limits.h malloc.h strings.h sys/file.h sys/ioctl.h sys/time.h time.h unistd.h stddef.h stdlib.h sys/ttycom.h sys/termios.h crypt.h arpa/inet.h des.h) |
109 | dnl LIBS="$LIBS `$PKG_CONFIG libpng --libs`" |
134 | |
|
|
135 | |
|
|
136 | dnl Checks for typedefs, structures, and compiler characteristics. |
|
|
137 | AC_C_CONST |
|
|
138 | AC_C_INLINE |
|
|
139 | AC_TYPE_PID_T |
|
|
140 | AC_TYPE_SIZE_T |
|
|
141 | AC_HEADER_TIME |
|
|
142 | AC_STRUCT_TM |
|
|
143 | AC_TYPE_UID_T |
|
|
144 | |
|
|
145 | AC_CHECK_SIZEOF(long) |
|
|
146 | AC_CHECK_SIZEOF(long long) |
|
|
147 | |
|
|
148 | dnl Checks for library functions. |
|
|
149 | AC_PROG_GCC_TRADITIONAL |
|
|
150 | AC_FUNC_MEMCMP |
|
|
151 | AC_FUNC_SETPGRP |
|
|
152 | AC_TYPE_SIGNAL |
|
|
153 | AC_FUNC_STRFTIME |
|
|
154 | AC_FUNC_VPRINTF |
|
|
155 | AC_CHECK_FUNCS(gettimeofday mkdir mktime rmdir select socket strcspn strerror strspn strstr strtol strcasecmp strncasecmp snprintf setsid srandom getdtablesize srand48 srand sysconf scandir) |
|
|
156 | |
|
|
157 | dnl alphasort can not be added to AC_CHECK_FUNCS because |
|
|
158 | AC_MSG_CHECKING(checking if alphasort is defined) |
|
|
159 | AC_TRY_COMPILE([#include <dirent.h>], [alphasort;], |
|
|
160 | ac_cv_func_alphasort=yes, ac_cv_func_alphasort=no) |
|
|
161 | if test "$ac_cv_func_alphasort" = yes; then |
|
|
162 | AC_DEFINE(HAVE_ALPHASORT, 1, [Define if you have the alphasort() function declaration.]) |
|
|
163 | AC_MSG_RESULT(yes) |
|
|
164 | else |
|
|
165 | AC_MSG_RESULT(no) |
110 | dnl AC_MSG_RESULT(ok) |
166 | fi |
111 | dnl else |
|
|
112 | dnl AC_MSG_ERROR(no) |
|
|
113 | dnl fi |
167 | |
114 | |
168 | |
|
|
169 | |
|
|
170 | AC_MSG_CHECKING(how many args gettimeofday uses) |
|
|
171 | AC_CACHE_VAL(ac_cv_gettimeofday_args, |
|
|
172 | [AC_TRY_COMPILE([#include <sys/time.h> |
|
|
173 | #include <unistd.h>], |
|
|
174 | [struct timeval tv; struct timezone tzp; |
|
|
175 | gettimeofday(&tv, &tzp);], |
|
|
176 | [ac_gettimeofday_args=2], |
|
|
177 | [AC_TRY_COMPILE([#include <sys/time.h> |
|
|
178 | #include <unistd.h>], |
|
|
179 | [struct timeval tv; |
|
|
180 | gettimeofday(&tv, NULL);], |
|
|
181 | [ac_gettimeofday_args=2], |
|
|
182 | [AC_TRY_COMPILE([#include <sys/time.h> |
|
|
183 | #include <unistd.h>], |
|
|
184 | [struct timeval tv; gettimeofday(&tv);], |
|
|
185 | [ac_gettimeofday_args=1], |
|
|
186 | [ac_gettimeofday_args=0])])]) |
|
|
187 | ac_cv_gettimeofday_args=$ac_gettimeofday_args]) |
|
|
188 | |
|
|
189 | ac_gettimeofday_args=$ac_cv_gettimeofday_args |
|
|
190 | if test $ac_gettimeofday_args = 1 ; then |
|
|
191 | AC_DEFINE(HAVE_GETTIMEOFDAY,[],[Define if gettimeofday is available]) |
|
|
192 | AC_MSG_RESULT(one argument) |
|
|
193 | elif test $ac_gettimeofday_args = 2 ; then |
|
|
194 | AC_DEFINE(HAVE_GETTIMEOFDAY,[],[Define if gettimeofday is available]) |
|
|
195 | AC_DEFINE(GETTIMEOFDAY_TWO_ARGS,[],[Define if gettimeofday takes two arguments]) |
|
|
196 | AC_MSG_RESULT(two arguments) |
|
|
197 | else |
|
|
198 | AC_MSG_RESULT(unknown) |
|
|
199 | fi |
|
|
200 | |
|
|
201 | AC_SUBST(x_includes) |
|
|
202 | AC_SUBST(x_libraries) |
|
|
203 | AC_SUBST(no_x) |
|
|
204 | AM_CONDITIONAL(HAVE_X,test "x$no_x" = "x") |
|
|
205 | AC_SUBST(X11LIBS) |
|
|
206 | AC_SUBST(PERL) |
|
|
207 | AC_SUBST(BASENAME) |
|
|
208 | |
|
|
209 | AC_SUBST(pkgstatedir,$localstatedir/$PACKAGE) |
|
|
210 | AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE) |
|
|
211 | |
|
|
212 | AC_DEFINE_UNQUOTED(COMPRESS,"${COMPRESS}",[Path to the compress binary]) |
|
|
213 | AC_DEFINE_UNQUOTED(UNCOMPRESS,"${UNCOMPRESS}",[Path to the uncompress binary]) |
|
|
214 | AC_DEFINE_UNQUOTED(GZIP,"${GZIP}",[Path to the gzip binary]) |
|
|
215 | AC_DEFINE_UNQUOTED(GUNZIP,"${GUNZIP}",[Path to the gunzip binary]) |
|
|
216 | AC_DEFINE_UNQUOTED(BZIP,"${BZIP}",[Path to the bzip binary]) |
|
|
217 | AC_DEFINE_UNQUOTED(BUNZIP,"${BUNZIP}",[Path to the bunzip binary]) |
|
|
218 | |
|
|
219 | if true; then |
|
|
220 | AC_PATH_PROG(PERL, perl5) |
|
|
221 | AC_PATH_PROG(PERL, perl) |
|
|
222 | |
|
|
223 | AC_MSG_CHECKING(for $PERL suitability) |
115 | AC_MSG_CHECKING(for $PERL suitability) |
224 | if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then |
116 | if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then |
225 | |
|
|
226 | save_CFLAGS="$CFLAGS" |
117 | save_CXXFLAGS="$CXXFLAGS" |
227 | save_LIBS="$LIBS" |
118 | save_LIBS="$LIBS" |
228 | CFLAGS="$CFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
119 | xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" |
|
|
120 | xPERLFLAGS="$xPERLFLAGS `$PERL -MEV::MakeMaker -e 'print +{&EV::MakeMaker::ev_args}->{INC}'`" |
|
|
121 | xPERLFLAGS="$xPERLFLAGS `$PERL -MCoro::MakeMaker -e 'print +{&Coro::MakeMaker::coro_args}->{INC}'`" |
|
|
122 | CXXFLAGS="$CXXFLAGS $xPERLFLAGS" |
229 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
123 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
230 | AC_TRY_LINK([ |
124 | AC_TRY_LINK([ |
231 | #include <EXTERN.h> |
125 | #include <EXTERN.h> |
232 | #include <perl.h> |
126 | #include <perl.h> |
233 | #include <XSUB.h> |
127 | #include <XSUB.h> |
|
|
128 | #include "EVAPI.h" |
234 | ],[ |
129 | ],[ |
235 | PerlInterpreter *perl = perl_alloc (); |
130 | PerlInterpreter *perl = perl_alloc (); |
236 | ],[perl_link=yes],[perl_link=no]) |
131 | ],[perl_link=yes],[perl_link=no]) |
237 | CXXFLAGS="$save_CFLAGS" |
132 | CXXFLAGS="$save_CXXFLAGS" |
238 | LIBS="$save_LIBS" |
133 | LIBS="$save_LIBS" |
239 | |
134 | |
240 | if test x$perl_link = xyes; then |
135 | if test x$perl_link = xyes; then |
241 | AC_MSG_RESULT(ok) |
136 | AC_MSG_RESULT(ok) |
242 | AC_DEFINE(ENABLE_PERL, 1, Define if you can embed a perl interpreter) |
137 | AC_DEFINE(ENABLE_PERL, 1, Define if you can embed a perl interpreter) |
243 | PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" |
138 | PERLFLAGS="$xPERLFLAGS" |
244 | PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" |
139 | PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" |
245 | PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" |
140 | PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" |
246 | PERL_PLUGIN=yes |
141 | CPPFLAGS="$CPPFLAGS $PERLFLAGS" |
247 | else |
|
|
248 | AC_MSG_ERROR([no, unable to link]) |
|
|
249 | fi |
|
|
250 | else |
142 | else |
251 | AC_MSG_ERROR([no working perl found, or perl not version >= 5.8]) |
143 | AC_MSG_ERROR([no, unable to link]) |
252 | fi |
144 | fi |
|
|
145 | else |
|
|
146 | AC_MSG_ERROR([no working perl found, or perl not version >= 5.8]) |
253 | fi |
147 | fi |
254 | AC_SUBST(PERLLIB) |
148 | AC_SUBST(PERLLIB) |
255 | AC_SUBST(PERLFLAGS) |
149 | AC_SUBST(PERLFLAGS) |
256 | AC_SUBST(PERLPRIVLIBEXP) |
150 | AC_SUBST(PERLPRIVLIBEXP) |
257 | AC_SUBST(PERL) |
151 | AC_SUBST(PERL) |
258 | AM_CONDITIONAL(PERL_PLUGIN,test "x$PERL_PLUGIN" != "x") |
|
|
259 | AC_SUBST(PERL_PLUGIN) |
|
|
260 | |
152 | |
|
|
153 | dnl AC_PROG_LIBTOOL |
|
|
154 | AC_PROG_RANLIB |
|
|
155 | |
|
|
156 | AC_CHECK_HEADERS(execinfo.h malloc.h) |
|
|
157 | AC_CHECK_FUNCS(backtrace) |
|
|
158 | |
|
|
159 | dnl check for some other programs |
|
|
160 | AC_PATH_PROG(TAR, tar) |
|
|
161 | AC_PATH_PROG(BASENAME, basename) |
|
|
162 | |
|
|
163 | AC_CHECK_LIB(nsl, main) |
|
|
164 | AC_CHECK_LIB(socket, main) |
|
|
165 | |
|
|
166 | dnl Checks for libraries. |
|
|
167 | AC_CHECK_LIB(m, main) |
|
|
168 | |
|
|
169 | AC_CHECK_SIZEOF(long) |
|
|
170 | AC_CHECK_SIZEOF(long long) |
|
|
171 | |
|
|
172 | AC_MSG_CHECKING(for tcp_info support) |
261 | AC_TRY_LINK([ |
173 | AC_TRY_LINK([ |
262 | #include <EXTERN.h> |
|
|
263 | #include <perl.h> |
174 | #include <sys/types.h> |
264 | #include <XSUB.h> |
175 | #include <sys/socket.h> |
|
|
176 | #include <netinet/in.h> |
|
|
177 | #include <netinet/tcp.h> |
265 | ],[ |
178 | ],[ |
266 | PerlInterpreter *perl = perl_alloc (); |
179 | int fd; |
267 | ],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
180 | struct tcp_info tcpi; |
268 | if test x$support_perl = xyes; then |
181 | socklen_t len = sizeof (tcpi); |
269 | support_frills=yes |
182 | getsockopt (fd, IPPROTO_TCP, TCP_INFO, &tcpi, &len); |
270 | fi |
183 | fd = 0 |
|
|
184 | + tcpi.tcpi_snd_mss |
|
|
185 | + tcpi.tcpi_rtt |
|
|
186 | + tcpi.tcpi_rttvar |
|
|
187 | + tcpi.tcpi_last_ack_recv |
|
|
188 | + tcpi.tcpi_last_data_sent |
|
|
189 | + tcpi.tcpi_unacked; |
|
|
190 | ],[ |
|
|
191 | AC_DEFINE(HAVE_TCP_INFO, [1], [TCP_INFO info option supported]) |
|
|
192 | AC_MSG_RESULT(yes) |
|
|
193 | ],[ |
|
|
194 | AC_MSG_RESULT(no) |
|
|
195 | ]) |
271 | |
196 | |
272 | ############################################# |
197 | AC_SUBST(pkgstatedir,$localstatedir/$PACKAGE) |
273 | # Plugin configuration |
198 | AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE) |
274 | AC_CHECK_LIB(dl, dlopen,[ cf_have_libdl=yes ]) |
|
|
275 | AM_CONDITIONAL(HAVE_LIBDL,test "x$cf_have_libdl" = "xyes") |
|
|
276 | |
|
|
277 | if test "x$cf_have_libdl" = "xyes" ; then |
|
|
278 | ############### |
|
|
279 | # Python plugin |
|
|
280 | CF_CHECK_PYTHON( |
|
|
281 | [PLUGIN_PYTHON="cfpython.la"], |
|
|
282 | [AC_MSG_NOTICE([No Python found. Python plugin will not be built.])] |
|
|
283 | ) |
|
|
284 | dnl *** Put other plugins configuration code here *** |
|
|
285 | else |
|
|
286 | AC_MSG_NOTICE([No dl library found. Plugins will not be supported.]) |
|
|
287 | fi |
|
|
288 | AM_CONDITIONAL(PYTHON_PLUGIN,test "x$PLUGIN_PYTHON" != "x") |
|
|
289 | AC_SUBST(PLUGIN_PYTHON) |
|
|
290 | |
199 | |
291 | AC_OUTPUT([Makefile |
200 | AC_OUTPUT([Makefile |
292 | crossedit/Makefile crossedit/doc/Makefile crossedit/include/Makefile |
201 | include/Makefile lib/Makefile pod/Makefile random_maps/Makefile socket/Makefile |
293 | crossedit/Cnv/Makefile crossedit/bitmaps/Makefile |
202 | server/Makefile utils/Makefile ext/Makefile doc/Makefile |
294 | doc/Makefile doc/Developers/Makefile doc/spell-docs/Makefile |
203 | common/Makefile utils/cfutil |
295 | doc/spoiler/Makefile doc/spoiler-html/Makefile |
204 | ]) |
296 | doc/playbook/Makefile doc/playbook-html/Makefile |
205 | |
297 | doc/scripts/Makefile |
|
|
298 | lib/Makefile random_maps/Makefile socket/Makefile server/Makefile |
|
|
299 | include/Makefile utils/Makefile lib/checkarch.pl |
|
|
300 | lib/collect.pl utils/add_throw.perl utils/crossloop.tmpl utils/crossloop.pl.tmpl |
|
|
301 | utils/metaserver.pl utils/crossloop.web utils/scores.pl utils/player_dl.pl |
|
|
302 | common/Makefile plugins/Makefile plugins/cfperl/Makefile plugins/cfpython/Makefile plugins/cfanim/Makefile devel/Makefile |
|
|
303 | ]) |
|
|