--- deliantra/server/configure.ac 2006/02/03 07:11:29 1.1 +++ deliantra/server/configure.ac 2006/03/15 15:35:45 1.4 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_REVISION($Id$) -AC_INIT([crossfire], [1.8.0], [crossfire-devel@listserv.real-time.com]) +AC_INIT([crossfire], [1.9.0], [crossfire-devel@listserv.real-time.com]) AC_CONFIG_AUX_DIR(utils) AC_CONFIG_SRCDIR([server/main.c]) AM_INIT_AUTOMAKE @@ -216,6 +216,46 @@ AC_DEFINE_UNQUOTED(BZIP,"${BZIP}",[Path to the bzip binary]) AC_DEFINE_UNQUOTED(BUNZIP,"${BUNZIP}",[Path to the bunzip binary]) +AC_PATH_PROG(PERL, perl5) +AC_PATH_PROG(PERL, perl) + +AC_MSG_CHECKING(for $PERL suitability) +if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then + + save_CFLAGS="$CFLAGS" + save_LIBS="$LIBS" + CFLAGS="$CFLAGS `$PERL -MExtUtils::Embed -e ccopts`" + LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" + AC_TRY_LINK([ +#include +#include +#include +],[ + PerlInterpreter *perl = perl_alloc (); +],[perl_link=yes],[perl_link=no]) + CXXFLAGS="$save_CFLAGS" + LIBS="$save_LIBS" + + 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="`$PERL -MExtUtils::Embed -e ccopts`" + PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" + PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" + PERL_PLUGIN=yes + else + AC_MSG_ERROR([no, unable to link]) + fi +else + AC_MSG_ERROR([no working perl found, or perl not version >= 5.8]) +fi +AC_SUBST(PERLLIB) +AC_SUBST(PERLFLAGS) +AC_SUBST(PERLPRIVLIBEXP) +AC_SUBST(PERL) +AM_CONDITIONAL(PERL_PLUGIN,test "x$PERL_PLUGIN" != "x") +AC_SUBST(PERL_PLUGIN) + ############################################# # Plugin configuration AC_CHECK_LIB(dl, dlopen,[ cf_have_libdl=yes ]) @@ -246,5 +286,10 @@ include/Makefile utils/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 plugins/Makefile plugins/cfpython/Makefile plugins/cfanim/Makefile devel/Makefile + common/Makefile plugins/Makefile plugins/cfpython/Makefile + plugins/cfpython/include/Makefile plugins/cfanim/Makefile + plugins/cfanim/include/Makefile + plugins/common/Makefile plugins/common/include/Makefile + devel/Makefile + plugins/cfperl/Makefile ])