--- deliantra/server/configure.ac 2007/01/24 16:29:10 1.42 +++ deliantra/server/configure.ac 2007/03/05 19:11:12 1.51 @@ -33,6 +33,25 @@ AC_PATH_PROG(PERL, perl5) AC_PATH_PROG(PERL, perl) +for module_vers in "Crossfire 0.97" "Coro 3.5" "Coro::Event 2.1" "Event 1.08" \ + "IO::AIO 2.32" "BDB 0.1" "Storable 2.0" "Time::HiRes 1.0" "YAML::Syck 0.71" \ + "Digest::MD5 2.0" "Compress::LZF 1.71" "Safe::Hole 0.10" "Pod::POM 0.17"; do + set -- $module_vers + module=$1 + minvers=$2 + AC_MSG_CHECKING(for $module perl module version $minvers or higher) + if $PERL -M$module -e0 >/dev/null 2>&1; then + version=`$PERL -M$module -e "print \\$$module::VERSION"` + if $PERL -M$module=$minvers -e0 >/dev/null 2>&1; then + AC_MSG_RESULT([ok, version $version]) + else + AC_MSG_ERROR([no, installed version is $version]) + fi + else + AC_MSG_ERROR([no, cannot load module $module]) + fi +done + AC_MSG_CHECKING(for $PERL suitability) if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then save_CXXFLAGS="$CXXFLAGS" @@ -71,29 +90,7 @@ AC_SUBST(PERLPRIVLIBEXP) AC_SUBST(PERL) -for module_vers in "Coro 3.5" "Coro::Event 2.1" "Event 1.08" \ - "IO::AIO 2.32" "Storable 2.0" "Time::HiRes 1.0" "YAML::Syck 0.71" \ - "Digest::MD5 2.0" "Compress::LZF 1.7" "Safe::Hole 0.10"; do - set -- $module_vers - module=$1 - minvers=$2 - AC_MSG_CHECKING(for $module perl module version $minvers or higher) - if $PERL -M$module -e0 >/dev/null 2>&1; then - version=`$PERL -M$module -e "print \\$$module::VERSION"` - if $PERL -M$module=$minvers -e0 >/dev/null 2>&1; then - AC_MSG_RESULT([ok, version $version]) - else - AC_MSG_ERROR([no, installed version is $version]) - fi - else - AC_MSG_ERROR([no, cannot load module $module]) - fi -done - dnl check for some other programs -AC_PATH_PROG(LATEX, latex) -AC_PATH_PROG(GZIP, gzip) -AC_PATH_PROG(BZIP, bzip2) AC_PATH_PROG(TAR, tar) AC_PATH_PROG(BASENAME, basename) @@ -102,14 +99,6 @@ AC_MSG_ERROR([we need gperf, the GNU perfect hash generator]) fi -GUNZIP="$GZIP -c" -BUNZIP="$BZIP -c" - -if test -z "$COMPRESS" -a -z "$GZIP" -a -z "$BZIP" ; then - echo "Unable to find either compress, bzip2, or gzip - hope you don't plan on compressing"; - echo "any files."; -fi; - AC_CHECK_LIB(nsl, main) AC_CHECK_LIB(socket, main) @@ -150,18 +139,9 @@ AC_SUBST(pkgstatedir,$localstatedir/$PACKAGE) AC_SUBST(pkgconfdir,$sysconfdir/$PACKAGE) -AC_DEFINE_UNQUOTED(COMPRESS,"${COMPRESS}",[Path to the compress binary]) -AC_DEFINE_UNQUOTED(UNCOMPRESS,"${UNCOMPRESS}",[Path to the uncompress binary]) -AC_DEFINE_UNQUOTED(GZIP,"${GZIP}",[Path to the gzip binary]) -AC_DEFINE_UNQUOTED(GUNZIP,"${GUNZIP}",[Path to the gunzip binary]) -AC_DEFINE_UNQUOTED(BZIP,"${BZIP}",[Path to the bzip binary]) -AC_DEFINE_UNQUOTED(BUNZIP,"${BUNZIP}",[Path to the bunzip binary]) - AC_OUTPUT([Makefile include/Makefile lib/Makefile pod/Makefile random_maps/Makefile socket/Makefile - server/Makefile src/Makefile utils/Makefile ext/Makefile - lib/checkarch.pl lib/collect.pl utils/add_throw.perl - utils/crossloop.tmpl utils/crossloop.pl.tmpl utils/metaserver.pl - utils/crossloop.web utils/scores.pl utils/player_dl.pl common/Makefile + server/Makefile utils/Makefile ext/Makefile + lib/checkarch.pl lib/collect.pl common/Makefile ])