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([deliantra-server], [2.78], [support@deliantra.net]) |
3 | AC_INIT([deliantra-server], [3.1], [support@deliantra.net]) |
|
|
4 | dnl AC_CONFIG_MACRO_DIR([m4]) |
4 | AC_CONFIG_AUX_DIR(utils) |
5 | AC_CONFIG_AUX_DIR(utils) |
5 | AC_CONFIG_SRCDIR([server/cfperl.xs]) |
6 | AC_CONFIG_SRCDIR([server/cfperl.xs]) |
6 | AM_INIT_AUTOMAKE |
7 | AM_INIT_AUTOMAKE |
7 | AM_CONFIG_HEADER(include/autoconf.h) |
8 | AM_CONFIG_HEADER(include/autoconf.h) |
8 | |
9 | |
… | |
… | |
28 | AC_PATH_PROG(PNGNQ, pngnq) |
29 | AC_PATH_PROG(PNGNQ, pngnq) |
29 | if test -z "$PNGNQ"; then |
30 | if test -z "$PNGNQ"; then |
30 | AC_MSG_ERROR([png neuquant (pngnq) must be in your PATH, check the README]) |
31 | AC_MSG_ERROR([png neuquant (pngnq) must be in your PATH, check the README]) |
31 | fi |
32 | fi |
32 | |
33 | |
33 | dnl AC_PATH_PROG(IDENTIFY, identify) |
34 | AC_PATH_PROG(IDENTIFY, identify) |
34 | dnl if test -z "$IDENTIFY"; then |
35 | if test -z "$IDENTIFY"; then |
35 | dnl AC_MSG_ERROR([ImageMagick 'identify' must be in your PATH, check the README]) |
36 | AC_MSG_ERROR([ImageMagick 'identify' must be in your PATH, check the README]) |
36 | dnl fi |
37 | fi |
37 | |
38 | |
38 | AC_PATH_PROG(CONVERT, convert) |
39 | AC_PATH_PROG(CONVERT, convert) |
39 | if test -z "$CONVERT"; then |
40 | if test -z "$CONVERT"; then |
40 | AC_MSG_ERROR([ImageMagick 'convert' must be in your PATH, check the README]) |
41 | AC_MSG_ERROR([ImageMagick 'convert' must be in your PATH, check the README]) |
41 | fi |
42 | fi |
42 | |
43 | |
43 | AC_PATH_PROG(PERL, perl5.10.1) |
44 | AC_PATH_PROG(PERL, perl5.10.1) |
44 | if test -z "$PERL"; then |
45 | if test -z "$PERL"; then |
45 | AC_PATH_PROG(PERL, perl5.10.0) |
46 | AC_PATH_PROG(PERL, perl) |
46 | if test -z "$PERL"; then |
47 | if test -z "$PERL"; then |
47 | AC_PATH_PROG(PERL, perl) |
|
|
48 | if test -z "$PERL"; then |
|
|
49 | AC_MSG_ERROR([perl 5.10 or higher must be in your PATH, check the README]) |
48 | AC_MSG_ERROR([perl 5.10.1 or higher must be in your PATH, check the README]) |
50 | fi |
|
|
51 | fi |
49 | fi |
52 | fi |
50 | fi |
53 | |
51 | |
54 | for module_vers in \ |
52 | for module_vers in \ |
|
|
53 | "common::sense 3.3" \ |
55 | "AnyEvent 4.22" \ |
54 | "AnyEvent 7.0" \ |
56 | "AnyEvent::AIO 0" \ |
55 | "AnyEvent::AIO 0" \ |
57 | "AnyEvent::BDB 0" \ |
56 | "AnyEvent::BDB 0" \ |
58 | "BDB 1.8" \ |
57 | "BDB 1.8" \ |
59 | "Compress::LZF 3.41" \ |
58 | "Compress::LZF 3.41" \ |
60 | "Coro 5.13" \ |
59 | "Coro 6" \ |
61 | "Coro::EV 0" \ |
60 | "Coro::EV 0" \ |
62 | "Deliantra 1.13" \ |
61 | "Deliantra 2.0" \ |
63 | "Digest::MD5 2.0" \ |
62 | "Digest::MD5 2.0" \ |
64 | "EV 3.41" \ |
63 | "EV 4" \ |
65 | "Guard 0.5" \ |
64 | "Guard 1" \ |
66 | "IO::AIO 3.1" \ |
65 | "IO::AIO 4" \ |
67 | "JSON::XS 2.01" \ |
66 | "JSON::XS 2.01" \ |
68 | "AnyEvent::IRC 0.6" \ |
67 | "AnyEvent::IRC 0.6" \ |
69 | "Pod::POM 0.17" \ |
68 | "Pod::POM 0.27" \ |
70 | "Safe::Hole 0.10" \ |
69 | "Safe::Hole 0.10" \ |
71 | "Storable 2.0" \ |
70 | "Storable 2.0" \ |
72 | "Time::HiRes 1.0" \ |
|
|
73 | "URI 1.35" \ |
71 | "URI 1.35" \ |
74 | "YAML 0.66" \ |
72 | "YAML::XS 0.32" \ |
75 | ; do |
73 | ; do |
76 | set -- $module_vers |
74 | set -- $module_vers |
77 | module=$1 |
75 | module=$1 |
78 | minvers=$2 |
76 | minvers=$2 |
79 | AC_MSG_CHECKING(for $module perl module version $minvers or higher) |
77 | AC_MSG_CHECKING(for $module perl module version $minvers or higher) |
… | |
… | |
91 | |
89 | |
92 | AC_LANG(C++) |
90 | AC_LANG(C++) |
93 | AC_PROG_CXX |
91 | AC_PROG_CXX |
94 | AC_PROG_CPP |
92 | AC_PROG_CPP |
95 | |
93 | |
|
|
94 | AX_CXX_COMPILE_STDCXX_11([noext], [mandatory]) |
|
|
95 | |
96 | AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])]) |
96 | AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])]) |
97 | |
97 | |
98 | AC_CHECK_HEADER(pthread.h,[],[AC_MSG_ERROR([POSIX thread support is required.])]) |
98 | AC_CHECK_HEADER(pthread.h,[],[AC_MSG_ERROR([POSIX thread support is required.])]) |
99 | |
99 | |
100 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
100 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
|
|
101 | |
|
|
102 | AC_MSG_CHECKING(blitz++ >= 0.9) |
|
|
103 | if $PKG_CONFIG blitz --atleast-version 0.9; then |
|
|
104 | CXXFLAGS="$CXXFLAGS `$PKG_CONFIG blitz --cflags`" |
|
|
105 | LIBS="$LIBS `$PKG_CONFIG blitz --libs`" |
|
|
106 | AC_MSG_RESULT(ok) |
|
|
107 | else |
|
|
108 | AC_MSG_ERROR(no) |
|
|
109 | fi |
101 | |
110 | |
102 | AC_MSG_CHECKING(glib >= 2.10) |
111 | AC_MSG_CHECKING(glib >= 2.10) |
103 | if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then |
112 | if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then |
104 | CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`" |
113 | CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`" |
105 | LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`" |
114 | LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`" |
… | |
… | |
125 | dnl else |
134 | dnl else |
126 | dnl AC_MSG_ERROR(no) |
135 | dnl AC_MSG_ERROR(no) |
127 | dnl fi |
136 | dnl fi |
128 | |
137 | |
129 | AC_MSG_CHECKING(for $PERL suitability) |
138 | AC_MSG_CHECKING(for $PERL suitability) |
130 | if $PERL -MExtUtils::Embed -e "use 5.10.0" >/dev/null 2>&1; then |
139 | if $PERL -MExtUtils::Embed -e "use 5.10.1" >/dev/null 2>&1; then |
131 | save_CXXFLAGS="$CXXFLAGS" |
140 | save_CXXFLAGS="$CXXFLAGS" |
132 | save_LIBS="$LIBS" |
141 | save_LIBS="$LIBS" |
133 | xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" |
142 | xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" |
134 | xPERLFLAGS="$xPERLFLAGS `$PERL -MEV::MakeMaker -e 'print +{&EV::MakeMaker::ev_args}->{INC}'`" |
143 | xPERLFLAGS="$xPERLFLAGS `$PERL -MEV::MakeMaker -e 'print +{&EV::MakeMaker::ev_args}->{INC}'`" |
135 | xPERLFLAGS="$xPERLFLAGS `$PERL -MCoro::MakeMaker -e 'print +{&Coro::MakeMaker::coro_args}->{INC}'`" |
144 | xPERLFLAGS="$xPERLFLAGS `$PERL -MCoro::MakeMaker -e 'print +{&Coro::MakeMaker::coro_args}->{INC}'`" |
… | |
… | |
155 | CPPFLAGS="$CPPFLAGS $PERLFLAGS" |
164 | CPPFLAGS="$CPPFLAGS $PERLFLAGS" |
156 | else |
165 | else |
157 | AC_MSG_ERROR([no, unable to link test program]) |
166 | AC_MSG_ERROR([no, unable to link test program]) |
158 | fi |
167 | fi |
159 | else |
168 | else |
160 | AC_MSG_ERROR([no working perl found, or perl not version >= 5.10]) |
169 | AC_MSG_ERROR([no working perl found, or perl not version >= 5.10.1]) |
161 | fi |
170 | fi |
162 | AC_SUBST(PERLLIB) |
171 | AC_SUBST(PERLLIB) |
163 | AC_SUBST(PERLFLAGS) |
172 | AC_SUBST(PERLFLAGS) |
164 | AC_SUBST(PERLPRIVLIBEXP) |
173 | AC_SUBST(PERLPRIVLIBEXP) |
165 | AC_SUBST(PERL) |
174 | AC_SUBST(PERL) |