--- deliantra/server/configure.ac 2006/08/13 17:47:24 1.12 +++ deliantra/server/configure.ac 2006/09/08 02:45:15 1.22 @@ -13,8 +13,8 @@ dnl we want a config.h file instead of -D options. dnl Checks for programs. -AC_PROG_CXX AC_LANG(C++) +AC_PROG_CXX AC_PROG_LIBTOOL case "$target" in @@ -37,8 +37,7 @@ AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc Use the dmalloc library if available, may prevent plugins from working], use_dmalloc=yes, use_dmalloc=no) -AC_ARG_WITH(python, [ --with-python=dir Directory to look for python headers/library (default=standard system location) ], - PYTHON_HOME="$withval") +dnl AC_ARG_WITH(python, [ --with-python=dir Directory to look for python headers/library (default=standard system location) ], PYTHON_HOME="$withval") dnl check for some other programs @@ -169,6 +168,17 @@ AC_MSG_RESULT(unknown) fi +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + +AC_MSG_CHECKING(glib >= 2.10) +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`" + AC_MSG_RESULT(ok) +else + AC_MSG_ERROR(no) +fi + AC_SUBST(x_includes) AC_SUBST(x_libraries) AC_SUBST(no_x) @@ -193,7 +203,7 @@ AC_MSG_CHECKING(for $PERL suitability) if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then - save_CFLAGS="$CFLAGS" + save_CXXFLAGS="$CXXFLAGS" save_LIBS="$LIBS" CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts` `$PERL -MEvent::MakeMaker -e 'print +{&Event::MakeMaker::event_args}->{INC}'`" LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" @@ -214,7 +224,7 @@ 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 + CPPFLAGS="$CPPFLAGS $PERLFLAGS" else AC_MSG_ERROR([no, unable to link]) fi @@ -225,40 +235,11 @@ 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 ]) -AM_CONDITIONAL(HAVE_LIBDL,test "x$cf_have_libdl" = "xyes") - -if test "x$cf_have_libdl" = "xyes" ; then - ############### - # Python plugin - CF_CHECK_PYTHON( - [PLUGIN_PYTHON="cfpython.la"], - [AC_MSG_NOTICE([No Python found. Python plugin will not be built.])] - ) - dnl *** Put other plugins configuration code here *** -else - AC_MSG_NOTICE([No dl library found. Plugins will not be supported.]) -fi -AM_CONDITIONAL(PYTHON_PLUGIN,test "x$PLUGIN_PYTHON" != "x") -AC_SUBST(PLUGIN_PYTHON) AC_OUTPUT([Makefile - doc/Makefile doc/Developers/Makefile doc/spell-docs/Makefile - doc/spoiler/Makefile doc/spoiler-html/Makefile - doc/playbook/Makefile doc/playbook-html/Makefile - doc/scripts/Makefile - lib/Makefile random_maps/Makefile socket/Makefile server/Makefile - 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/cfpython/include/Makefile - plugins/common/Makefile plugins/common/include/Makefile - devel/Makefile - plugins/cfperl/Makefile - ]) + include/Makefile lib/Makefile pod/Makefile random_maps/Makefile socket/Makefile + server/Makefile src/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 +])