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.43], [support@deliantra.net]) |
3 | AC_INIT([deliantra-server], [2.80], [support@deliantra.net]) |
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 | |
… | |
… | |
38 | AC_PATH_PROG(CONVERT, convert) |
38 | AC_PATH_PROG(CONVERT, convert) |
39 | if test -z "$CONVERT"; then |
39 | if test -z "$CONVERT"; then |
40 | AC_MSG_ERROR([ImageMagick 'convert' must be in your PATH, check the README]) |
40 | AC_MSG_ERROR([ImageMagick 'convert' must be in your PATH, check the README]) |
41 | fi |
41 | fi |
42 | |
42 | |
43 | AC_PATH_PROG(PERL, perl5.10.0) |
43 | AC_PATH_PROG(PERL, perl5.10.1) |
44 | if test -z "$PERL"; then |
44 | if test -z "$PERL"; then |
45 | AC_PATH_PROG(PERL, perl5.8.8) |
45 | AC_PATH_PROG(PERL, perl5.10.0) |
46 | if test -z "$PERL"; then |
46 | if test -z "$PERL"; then |
47 | AC_PATH_PROG(PERL, perl) |
47 | AC_PATH_PROG(PERL, perl) |
48 | if test -z "$PERL"; then |
48 | if test -z "$PERL"; then |
49 | AC_MSG_ERROR([perl 5.8 or higher must be in your PATH, check the README]) |
49 | AC_MSG_ERROR([perl 5.10 or higher must be in your PATH, check the README]) |
50 | fi |
50 | fi |
51 | fi |
51 | fi |
52 | fi |
52 | fi |
53 | |
53 | |
54 | for module_vers in \ |
54 | for module_vers in \ |
55 | "AnyEvent 2.9" \ |
55 | "AnyEvent 4.22" \ |
|
|
56 | "AnyEvent::AIO 0" \ |
|
|
57 | "AnyEvent::BDB 0" \ |
56 | "BDB 1.43" \ |
58 | "BDB 1.8" \ |
57 | "Compress::LZF 1.8" \ |
59 | "Compress::LZF 3.41" \ |
58 | "Coro 4.50" \ |
60 | "Coro 5.13" \ |
59 | "Coro::EV 2.1" \ |
61 | "Coro::EV 0" \ |
60 | "Deliantra 1.13" \ |
62 | "Deliantra 1.24" \ |
61 | "Digest::MD5 2.0" \ |
63 | "Digest::MD5 2.0" \ |
62 | "EV 3.2" \ |
64 | "EV 3.41" \ |
|
|
65 | "Guard 0.5" \ |
63 | "IO::AIO 2.51" \ |
66 | "IO::AIO 3.25" \ |
64 | "JSON::XS 2.01" \ |
67 | "JSON::XS 2.01" \ |
65 | "Net::IRC3 0.5" \ |
68 | "AnyEvent::IRC 0.6" \ |
66 | "Pod::POM 0.17" \ |
69 | "Pod::POM 0.17" \ |
67 | "Safe::Hole 0.10" \ |
70 | "Safe::Hole 0.10" \ |
68 | "Storable 2.0" \ |
71 | "Storable 2.0" \ |
69 | "Time::HiRes 1.0" \ |
72 | "Time::HiRes 1.0" \ |
70 | "URI 1.35" \ |
73 | "URI 1.35" \ |
71 | "YAML 0.66" \ |
74 | "YAML::XS 0.32" \ |
72 | ; do |
75 | ; do |
73 | set -- $module_vers |
76 | set -- $module_vers |
74 | module=$1 |
77 | module=$1 |
75 | minvers=$2 |
78 | minvers=$2 |
76 | AC_MSG_CHECKING(for $module perl module version $minvers or higher) |
79 | AC_MSG_CHECKING(for $module perl module version $minvers or higher) |
… | |
… | |
103 | AC_MSG_RESULT(ok) |
106 | AC_MSG_RESULT(ok) |
104 | else |
107 | else |
105 | AC_MSG_ERROR(no) |
108 | AC_MSG_ERROR(no) |
106 | fi |
109 | fi |
107 | |
110 | |
|
|
111 | AC_MSG_CHECKING(gthread >= 0.0) |
|
|
112 | if $PKG_CONFIG gthread-2.0 --atleast-version 0.0; then |
|
|
113 | CXXFLAGS="$CXXFLAGS `$PKG_CONFIG gthread-2.0 --cflags`" |
|
|
114 | LIBS="$LIBS `$PKG_CONFIG gthread-2.0 --libs`" |
|
|
115 | AC_MSG_RESULT(ok) |
|
|
116 | else |
|
|
117 | AC_MSG_ERROR(no) |
|
|
118 | fi |
|
|
119 | |
108 | dnl AC_MSG_CHECKING(libpng) |
120 | dnl AC_MSG_CHECKING(libpng) |
109 | dnl if $PKG_CONFIG libpng --exists; then |
121 | dnl if $PKG_CONFIG libpng --exists; then |
110 | dnl CXXFLAGS="$CXXFLAGS `$PKG_CONFIG libpng --cflags`" |
122 | dnl CXXFLAGS="$CXXFLAGS `$PKG_CONFIG libpng --cflags`" |
111 | dnl LIBS="$LIBS `$PKG_CONFIG libpng --libs`" |
123 | dnl LIBS="$LIBS `$PKG_CONFIG libpng --libs`" |
112 | dnl AC_MSG_RESULT(ok) |
124 | dnl AC_MSG_RESULT(ok) |
113 | dnl else |
125 | dnl else |
114 | dnl AC_MSG_ERROR(no) |
126 | dnl AC_MSG_ERROR(no) |
115 | dnl fi |
127 | dnl fi |
116 | |
128 | |
117 | AC_MSG_CHECKING(for $PERL suitability) |
129 | AC_MSG_CHECKING(for $PERL suitability) |
118 | if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then |
130 | if $PERL -MExtUtils::Embed -e "use 5.10.0" >/dev/null 2>&1; then |
119 | save_CXXFLAGS="$CXXFLAGS" |
131 | save_CXXFLAGS="$CXXFLAGS" |
120 | save_LIBS="$LIBS" |
132 | save_LIBS="$LIBS" |
121 | xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" |
133 | xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" |
122 | xPERLFLAGS="$xPERLFLAGS `$PERL -MEV::MakeMaker -e 'print +{&EV::MakeMaker::ev_args}->{INC}'`" |
134 | xPERLFLAGS="$xPERLFLAGS `$PERL -MEV::MakeMaker -e 'print +{&EV::MakeMaker::ev_args}->{INC}'`" |
123 | xPERLFLAGS="$xPERLFLAGS `$PERL -MCoro::MakeMaker -e 'print +{&Coro::MakeMaker::coro_args}->{INC}'`" |
135 | xPERLFLAGS="$xPERLFLAGS `$PERL -MCoro::MakeMaker -e 'print +{&Coro::MakeMaker::coro_args}->{INC}'`" |
… | |
… | |
126 | AC_TRY_LINK([ |
138 | AC_TRY_LINK([ |
127 | #include <EXTERN.h> |
139 | #include <EXTERN.h> |
128 | #include <perl.h> |
140 | #include <perl.h> |
129 | #include <XSUB.h> |
141 | #include <XSUB.h> |
130 | #include "EVAPI.h" |
142 | #include "EVAPI.h" |
|
|
143 | #include "CoroAPI.h" |
131 | ],[ |
144 | ],[ |
132 | PerlInterpreter *perl = perl_alloc (); |
145 | PerlInterpreter *perl = perl_alloc (); |
133 | ],[perl_link=yes],[perl_link=no]) |
146 | ],[perl_link=yes],[perl_link=no]) |
134 | CXXFLAGS="$save_CXXFLAGS" |
147 | CXXFLAGS="$save_CXXFLAGS" |
135 | LIBS="$save_LIBS" |
148 | LIBS="$save_LIBS" |
136 | |
149 | |
137 | if test x$perl_link = xyes; then |
150 | if test x$perl_link = xyes; then |
138 | AC_MSG_RESULT(ok) |
151 | AC_MSG_RESULT(ok) |
139 | AC_DEFINE(ENABLE_PERL, 1, Define if you can embed a perl interpreter) |
|
|
140 | PERLFLAGS="$xPERLFLAGS" |
152 | PERLFLAGS="$xPERLFLAGS" |
141 | PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" |
153 | PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" |
142 | PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" |
154 | PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" |
143 | CPPFLAGS="$CPPFLAGS $PERLFLAGS" |
155 | CPPFLAGS="$CPPFLAGS $PERLFLAGS" |
144 | else |
156 | else |
145 | AC_MSG_ERROR([no, unable to link]) |
157 | AC_MSG_ERROR([no, unable to link test program]) |
146 | fi |
158 | fi |
147 | else |
159 | else |
148 | AC_MSG_ERROR([no working perl found, or perl not version >= 5.8]) |
160 | AC_MSG_ERROR([no working perl found, or perl not version >= 5.10]) |
149 | fi |
161 | fi |
150 | AC_SUBST(PERLLIB) |
162 | AC_SUBST(PERLLIB) |
151 | AC_SUBST(PERLFLAGS) |
163 | AC_SUBST(PERLFLAGS) |
152 | AC_SUBST(PERLPRIVLIBEXP) |
164 | AC_SUBST(PERLPRIVLIBEXP) |
153 | AC_SUBST(PERL) |
165 | AC_SUBST(PERL) |