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_INIT([cfserver], [2.1], [crossfire@schmorp.de]) |
3 | AC_INIT([cfserver], [2.2], [crossfire@schmorp.de]) |
4 | AC_CONFIG_AUX_DIR(utils) |
4 | AC_CONFIG_AUX_DIR(utils) |
5 | AC_CONFIG_SRCDIR([server/cfperl.xs]) |
5 | AC_CONFIG_SRCDIR([server/cfperl.xs]) |
6 | AM_INIT_AUTOMAKE |
6 | AM_INIT_AUTOMAKE |
7 | AM_CONFIG_HEADER(include/autoconf.h) |
7 | AM_CONFIG_HEADER(include/autoconf.h) |
8 | |
8 | |
… | |
… | |
23 | AC_PATH_PROG(OPTIPNG, optipng) |
23 | AC_PATH_PROG(OPTIPNG, optipng) |
24 | if test -z "$OPTIPNG"; then |
24 | if test -z "$OPTIPNG"; then |
25 | AC_MSG_ERROR([optipng must be in your PATH, check the README]) |
25 | AC_MSG_ERROR([optipng must be in your PATH, check the README]) |
26 | fi |
26 | fi |
27 | |
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 | |
28 | AC_PATH_PROG(IDENTIFY, identify) |
33 | AC_PATH_PROG(IDENTIFY, identify) |
29 | if test -z "$IDENTIFY"; then |
34 | if test -z "$IDENTIFY"; then |
30 | AC_MSG_ERROR([ImageMagick 'identify' must be in your PATH, check the README]) |
35 | AC_MSG_ERROR([ImageMagick 'identify' must be in your PATH, check the README]) |
31 | fi |
36 | fi |
32 | |
37 | |
… | |
… | |
44 | AC_MSG_ERROR([perl 5.8 or higher must be in your PATH, check the README]) |
49 | AC_MSG_ERROR([perl 5.8 or higher must be in your PATH, check the README]) |
45 | fi |
50 | fi |
46 | fi |
51 | fi |
47 | fi |
52 | fi |
48 | |
53 | |
49 | for module_vers in "Image::Size 2.992" "Crossfire 0.97" "Coro 3.5" "Coro::Event 2.1" "Event 1.08" \ |
54 | for module_vers in \ |
50 | "IO::AIO 2.32" "BDB 0.1" "Storable 2.0" "Time::HiRes 1.0" "YAML::Syck 0.71" \ |
55 | "AnyEvent 2.52" \ |
51 | "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.32" \ |
|
|
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 |
52 | set -- $module_vers |
71 | set -- $module_vers |
53 | module=$1 |
72 | module=$1 |
54 | minvers=$2 |
73 | minvers=$2 |
55 | AC_MSG_CHECKING(for $module perl module version $minvers or higher) |
74 | AC_MSG_CHECKING(for $module perl module version $minvers or higher) |
56 | if $PERL -M$module -e0 >/dev/null 2>&1; then |
75 | if $PERL -M$module -e0 >/dev/null 2>&1; then |
… | |
… | |
66 | done |
85 | done |
67 | |
86 | |
68 | AC_LANG(C++) |
87 | AC_LANG(C++) |
69 | AC_PROG_CXX |
88 | AC_PROG_CXX |
70 | AC_PROG_CPP |
89 | AC_PROG_CPP |
|
|
90 | |
|
|
91 | AC_CHECK_HEADERS(execinfo.h) |
|
|
92 | AC_CHECK_FUNCS(backtrace) |
71 | |
93 | |
72 | AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])]) |
94 | AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])]) |
73 | |
95 | |
74 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
96 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
75 | |
97 | |
… | |
… | |
148 | AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE) |
170 | AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE) |
149 | |
171 | |
150 | AC_OUTPUT([Makefile |
172 | AC_OUTPUT([Makefile |
151 | include/Makefile lib/Makefile pod/Makefile random_maps/Makefile socket/Makefile |
173 | include/Makefile lib/Makefile pod/Makefile random_maps/Makefile socket/Makefile |
152 | server/Makefile utils/Makefile ext/Makefile doc/Makefile |
174 | server/Makefile utils/Makefile ext/Makefile doc/Makefile |
153 | lib/checkarch.pl lib/collect.pl common/Makefile utils/cfutil |
175 | common/Makefile utils/cfutil |
154 | ]) |
176 | ]) |
155 | |
177 | |