mosesdecoder/m4/ax_xmlrpc_c.m4
bhaddow 904133fcb7 Merge in the multiple models branch. These changes allow the moses server
to support multiple translation, language and generation models within the
same process. The main design change is the introduction of a TranslationSystem
object to manage the models, which have been moved out of StaticData.
The changes should have no effect on existing systems.


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3394 1f5c12ca-751b-0410-a591-d2e778427230
2010-08-10 13:12:00 +00:00

53 lines
1.4 KiB
Plaintext

AC_DEFUN([AX_XMLRPC_C], [
AC_MSG_CHECKING(for XMLRPC-C)
AC_ARG_WITH(xmlrpc-c,
[ --with-xmlrpc-c=PATH Enable XMLRPC-C support. Setting the PATH to yes will search for xmlrpc-c-config on the shell PATH,],
[
if test "$withval" = "no"; then
AC_MSG_RESULT(no)
else
if test "$withval" = "yes"; then
xmlrpc_cc_prg="xmlrpc-c-config"
else
xmlrpc_cc_prg="$withval"
fi
if eval $xmlrpc_cc_prg --version 2>/dev/null >/dev/null; then
XMLRPC_C_CPPFLAGS=`$xmlrpc_cc_prg --cflags c++2 abyss-server`
XMLRPC_C_LIBS=`$xmlrpc_cc_prg c++2 abyss-server --libs`
CXXFLAGS_SAVED=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $XMLRPC_C_CPPFLAGS"
LIBS_SAVED=$LIBS
LIBS="$LIBS $XMLRPC_C_LIBS"
AC_TRY_LINK(
[ #include <xmlrpc-c/server.h>
],[ xmlrpc_registry_new(NULL); ],
[
AC_MSG_RESULT(ok)
], [
AC_MSG_RESULT(failed)
AC_MSG_ERROR(Could not compile XMLRPC-C test.)
])
dnl AC_DEFINE(HAVE_XMLRPC_C, 1, Support for XMLRPC-C.)
have_xmlrpc_c=yes
AC_SUBST(XMLRPC_C_LIBS)
AC_SUBST(XMLRPC_C_CPPFLAGS)
LIBS=$LIBS_SAVED
CXXFLAGS=$CXXFLAGS_SAVED
else
AC_MSG_RESULT(failed)
AC_MSG_ERROR(Could not compile XMLRPC-C test.)
fi
fi
],[
AC_MSG_RESULT(ignored)
])
])