--- deliantra/server/configure.ac 2008/01/20 10:25:16 1.113 +++ deliantra/server/configure.ac 2011/04/22 02:03:10 1.180 @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([deliantra-server], [2.4], [support@deliantra.net]) +AC_INIT([deliantra-server], [3.0], [support@deliantra.net]) AC_CONFIG_AUX_DIR(utils) AC_CONFIG_SRCDIR([server/cfperl.xs]) AM_INIT_AUTOMAKE @@ -30,45 +30,46 @@ AC_MSG_ERROR([png neuquant (pngnq) must be in your PATH, check the README]) fi -dnl AC_PATH_PROG(IDENTIFY, identify) -dnl if test -z "$IDENTIFY"; then -dnl AC_MSG_ERROR([ImageMagick 'identify' must be in your PATH, check the README]) -dnl fi +AC_PATH_PROG(IDENTIFY, identify) +if test -z "$IDENTIFY"; then + AC_MSG_ERROR([ImageMagick 'identify' must be in your PATH, check the README]) +fi AC_PATH_PROG(CONVERT, convert) if test -z "$CONVERT"; then AC_MSG_ERROR([ImageMagick 'convert' must be in your PATH, check the README]) fi -AC_PATH_PROG(PERL, perl5.8) +AC_PATH_PROG(PERL, perl5.10.1) if test -z "$PERL"; then - AC_PATH_PROG(PERL, perl5) + AC_PATH_PROG(PERL, perl) if test -z "$PERL"; then - AC_PATH_PROG(PERL, perl) - if test -z "$PERL"; then - AC_MSG_ERROR([perl 5.8 or higher must be in your PATH, check the README]) - fi + AC_MSG_ERROR([perl 5.10.1 or higher must be in your PATH, check the README]) fi fi for module_vers in \ - "AnyEvent 2.6" \ - "BDB 1.43" \ - "Compress::LZF 1.8" \ - "Coro 4.37" \ - "Coro::EV 2.1" \ - "Deliantra 1.13" \ + "common::sense 3.3" \ + "AnyEvent 5.2" \ + "AnyEvent::AIO 0" \ + "AnyEvent::BDB 0" \ + "BDB 1.8" \ + "Compress::LZF 3.41" \ + "Coro 5.372" \ + "Coro::EV 0" \ + "Deliantra 1.24" \ "Digest::MD5 2.0" \ - "EV 2.0" \ - "IO::AIO 2.51" \ + "EV 4.00" \ + "Guard 0.5" \ + "IO::AIO 3.3" \ "JSON::XS 2.01" \ - "Net::IRC3 0.5" \ - "Pod::POM 0.17" \ + "AnyEvent::IRC 0.6" \ + "Pod::POM 0.27" \ "Safe::Hole 0.10" \ "Storable 2.0" \ "Time::HiRes 1.0" \ "URI 1.35" \ - "YAML 0.66" \ + "YAML::XS 0.32" \ ; do set -- $module_vers module=$1 @@ -92,6 +93,8 @@ AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])]) +AC_CHECK_HEADER(pthread.h,[],[AC_MSG_ERROR([POSIX thread support is required.])]) + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_MSG_CHECKING(glib >= 2.10) @@ -103,6 +106,15 @@ AC_MSG_ERROR(no) fi +AC_MSG_CHECKING(gthread >= 0.0) +if $PKG_CONFIG gthread-2.0 --atleast-version 0.0; then + CXXFLAGS="$CXXFLAGS `$PKG_CONFIG gthread-2.0 --cflags`" + LIBS="$LIBS `$PKG_CONFIG gthread-2.0 --libs`" + AC_MSG_RESULT(ok) +else + AC_MSG_ERROR(no) +fi + dnl AC_MSG_CHECKING(libpng) dnl if $PKG_CONFIG libpng --exists; then dnl CXXFLAGS="$CXXFLAGS `$PKG_CONFIG libpng --cflags`" @@ -113,7 +125,7 @@ dnl fi AC_MSG_CHECKING(for $PERL suitability) -if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then +if $PERL -MExtUtils::Embed -e "use 5.10.1" >/dev/null 2>&1; then save_CXXFLAGS="$CXXFLAGS" save_LIBS="$LIBS" xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" @@ -126,6 +138,7 @@ #include #include #include "EVAPI.h" +#include "CoroAPI.h" ],[ PerlInterpreter *perl = perl_alloc (); ],[perl_link=yes],[perl_link=no]) @@ -134,16 +147,15 @@ if test x$perl_link = xyes; then AC_MSG_RESULT(ok) - AC_DEFINE(ENABLE_PERL, 1, Define if you can embed a perl interpreter) PERLFLAGS="$xPERLFLAGS" PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" CPPFLAGS="$CPPFLAGS $PERLFLAGS" else - AC_MSG_ERROR([no, unable to link]) + AC_MSG_ERROR([no, unable to link test program]) fi else - AC_MSG_ERROR([no working perl found, or perl not version >= 5.8]) + AC_MSG_ERROR([no working perl found, or perl not version >= 5.10.1]) fi AC_SUBST(PERLLIB) AC_SUBST(PERLFLAGS) @@ -160,8 +172,9 @@ AC_PATH_PROG(TAR, tar) AC_PATH_PROG(BASENAME, basename) -AC_CHECK_LIB(nsl, main) -AC_CHECK_LIB(socket, main) +AC_CHECK_LIB(nsl, gethostbyname) +AC_CHECK_LIB(socket, connect) +AC_CHECK_LIB(pthread, pthread_create) dnl Checks for libraries. AC_CHECK_LIB(m, main)