--- deliantra/server/configure.ac 2006/02/03 07:11:29 1.1 +++ deliantra/server/configure.ac 2006/08/13 17:22:24 1.11 @@ -1,9 +1,8 @@ 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.1], [crossfire-devel@listserv.real-time.com]) AC_CONFIG_AUX_DIR(utils) -AC_CONFIG_SRCDIR([server/main.c]) +AC_CONFIG_SRCDIR([server/main.C]) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(include/autoconf.h) @@ -216,6 +215,47 @@ 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` `$PERL -MEvent::MakeMaker -e 'print +{&Event::MakeMaker::event_args}->{INC}'`" + LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" + AC_TRY_LINK([ +#include +#include +#include +#include "EventAPI.h" +],[ + 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` `$PERL -MEvent::MakeMaker -e 'print +{&Event::MakeMaker::event_args}->{INC}'`" + 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 ]) @@ -236,8 +276,6 @@ AC_SUBST(PLUGIN_PYTHON) AC_OUTPUT([Makefile - crossedit/Makefile crossedit/doc/Makefile crossedit/include/Makefile - crossedit/Cnv/Makefile crossedit/bitmaps/Makefile doc/Makefile doc/Developers/Makefile doc/spell-docs/Makefile doc/spoiler/Makefile doc/spoiler-html/Makefile doc/playbook/Makefile doc/playbook-html/Makefile @@ -246,5 +284,9 @@ 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/common/Makefile plugins/common/include/Makefile + devel/Makefile + plugins/cfperl/Makefile ])