--- deliantra/server/configure.ac 2006/02/03 07:11:29 1.1.1.1 +++ deliantra/server/configure.ac 2006/02/03 07:25:24 1.2 @@ -216,6 +216,59 @@ AC_DEFINE_UNQUOTED(BZIP,"${BZIP}",[Path to the bzip binary]) AC_DEFINE_UNQUOTED(BUNZIP,"${BUNZIP}",[Path to the bunzip binary]) +if true; then + 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 +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) + + AC_TRY_LINK([ +#include +#include +#include +],[ + PerlInterpreter *perl = perl_alloc (); +],[rxvt_perl_link=yes],[rxvt_perl_link=no]) +if test x$support_perl = xyes; then + support_frills=yes +fi + ############################################# # Plugin configuration AC_CHECK_LIB(dl, dlopen,[ cf_have_libdl=yes ]) @@ -246,5 +299,5 @@ 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/cfperl/Makefile plugins/cfpython/Makefile plugins/cfanim/Makefile devel/Makefile ])