--- deliantra/server/configure.ac 2009/11/30 09:19:46 1.171 +++ deliantra/server/configure.ac 2016/11/18 04:44:13 1.191 @@ -1,9 +1,10 @@ -dnl Process this file with autoconf to produce a configure script. +dnl Process this file with autoconf to produce a configure script., -AC_INIT([deliantra-server], [2.91], [support@deliantra.net]) +AC_INIT([deliantra-server], [3.1], [support@deliantra.net]) +dnl AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR(utils) AC_CONFIG_SRCDIR([server/cfperl.xs]) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([silent-rules subdir-objects foreign no-dist-gzip dist-xz]) AM_CONFIG_HEADER(include/autoconf.h) AM_MAINTAINER_MODE @@ -30,10 +31,10 @@ 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 @@ -42,34 +43,31 @@ AC_PATH_PROG(PERL, perl5.10.1) if test -z "$PERL"; then - AC_PATH_PROG(PERL, perl5.10.0) + 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.10 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 5.2" \ + "common::sense 3.3" \ + "AnyEvent 7.0" \ "AnyEvent::AIO 0" \ "AnyEvent::BDB 0" \ "BDB 1.8" \ "Compress::LZF 3.41" \ - "Coro 5.13" \ + "Coro 6" \ "Coro::EV 0" \ - "Deliantra 1.24" \ + "Deliantra 2.0" \ "Digest::MD5 2.0" \ - "EV 3.41" \ - "Guard 0.5" \ - "IO::AIO 3.3" \ + "EV 4" \ + "Guard 1" \ + "IO::AIO 4" \ "JSON::XS 2.01" \ "AnyEvent::IRC 0.6" \ - "Pod::POM 0.17" \ + "Pod::POM 0.27" \ "Safe::Hole 0.10" \ "Storable 2.0" \ - "Time::HiRes 1.0" \ "URI 1.35" \ "YAML::XS 0.32" \ ; do @@ -93,13 +91,27 @@ AC_PROG_CXX AC_PROG_CPP -AC_CHECK_HEADER(tr1/unordered_map,[],[AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])]) +AX_CXX_COMPILE_STDCXX_11([noext], [mandatory]) + +AX_CHECK_COMPILE_FLAG(-Wno-unused-result,[CXXFLAGS="$CXXFLAGS -Wno-unused-result"]) +AX_CHECK_COMPILE_FLAG(-Wno-narrowing,[CXXFLAGS="$CXXFLAGS -Wno-narrowing"]) + +AC_CHECK_HEADER(unordered_map,[],[AC_MSG_ERROR([Your compiler must support C++11 headers.])]) 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) +AC_MSG_CHECKING(blitz++ >= 0.10) +if $PKG_CONFIG blitz --atleast-version 0.10; then + CXXFLAGS="$CXXFLAGS `$PKG_CONFIG blitz --cflags`" + LIBS="$LIBS `$PKG_CONFIG blitz --libs`" + AC_MSG_RESULT(ok) +else + AC_MSG_ERROR(no) +fi + +AC_MSG_CHECKING(glib >= 2.32) if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`" LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`" @@ -127,7 +139,7 @@ dnl fi AC_MSG_CHECKING(for $PERL suitability) -if $PERL -MExtUtils::Embed -e "use 5.10.0" >/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`" @@ -157,7 +169,7 @@ AC_MSG_ERROR([no, unable to link test program]) fi else - AC_MSG_ERROR([no working perl found, or perl not version >= 5.10]) + AC_MSG_ERROR([no working perl found, or perl not version >= 5.10.1]) fi AC_SUBST(PERLLIB) AC_SUBST(PERLFLAGS) @@ -213,8 +225,7 @@ AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE) AC_OUTPUT([Makefile - include/Makefile lib/Makefile pod/Makefile random_maps/Makefile socket/Makefile - server/Makefile utils/Makefile ext/Makefile doc/Makefile - common/Makefile utils/cfutil + include/Makefile lib/Makefile + utils/cfutil ])