From c96a2e557f0a9322c9369a06041e894cc2f11e93 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 18 Jan 2010 14:27:41 +0000 Subject: Make use of libartefact. Not yet tested... --- server/configure.in | 67 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 13 deletions(-) (limited to 'server/configure.in') diff --git a/server/configure.in b/server/configure.in index cd5b937..23a7172 100644 --- a/server/configure.in +++ b/server/configure.in @@ -17,15 +17,17 @@ if test x$with_debug == xyes; then fi dnl ====================== -dnl Compile without pentominos support +dnl Compile with artefact support dnl ====================== -AC_ARG_WITH(pentominos, - [ --with-pentominos build with pentominos support (default=yes)], +AC_ARG_WITH(artefact, + [ --with-artefact build with artefact support (default=yes)], [], - [with_pentominos=yes]) -if test x$with_pentominos == xno; then - AC_MSG_WARN([*** Building without pentominos support!]) - AC_DEFINE_UNQUOTED(WITHOUT_PENTOMINOS, , [The project is configured not to use pentomimos]) + [with_artefact=yes]) +if test x$with_artefact == xyes; then + PKG_CHECK_MODULES(ATF, libartefact >= 0.0.2) +else + AC_MSG_WARN([*** Building without artefact support!]) + AC_DEFINE_UNQUOTED(WITHOUT_ARTEFACT, , [The project is configured not to use artefact]) fi dnl ====================== @@ -150,13 +152,52 @@ PKG_CHECK_MODULES(HTTPD, libmicrohttpd >= 0.4.4) dnl ====================== dnl Check for eXpat library dnl ====================== +tmp_CXXFLAGS="$CXXFLAGS" +tmp_CPPFLAGS="$CPPFLAGS" +tmp_CFLAGS="$CFLAGS" +tmp_LDFLAGS="$LDFLAGS" +tmp_LIBS="$LIBS" +CXXFLAGS="" +CPPFLAGS="" +CFLAGS="" +LDFLAGS="" +LIBS="" AC_CHECK_HEADER(expat.h, , AC_MSG_ERROR([*** eXpat header file not found!])) -AC_CHECK_LIB(expat, XML_ParserCreate, , AC_MSG_ERROR([*** eXpat library not found!])) - -AC_SUBST(CFLAGS) -AC_SUBST(CPPFLAGS) -AC_SUBST(CXXFLAGS) -AC_SUBST(LDFLAGS) +AC_CHECK_LIB(expat, XML_ParserCreate, , AC_MSG_ERROR([*** eXpat library not found!])) +EXPAT_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS" +EXPAT_LIBS="$LDFLAGS $LIBS" +CXXFLAGS="$tmp_CXXFLAGS" +CPPFLAGS="$tmp_CPPFLAGS" +CFLAGS="$tmp_CFLAGS" +LDFLAGS="$tmp_LDFLAGS" +LIBS="$tmp_LIBS" +AC_SUBST(EXPAT_CFLAGS) +AC_SUBST(EXPAT_LIBS) + +dnl ====================== +dnl Check for the pthread library +dnl ====================== +tmp_CXXFLAGS="$CXXFLAGS" +tmp_CPPFLAGS="$CPPFLAGS" +tmp_CFLAGS="$CFLAGS" +tmp_LDFLAGS="$LDFLAGS" +tmp_LIBS="$LIBS" +CXXFLAGS="" +CPPFLAGS="" +CFLAGS="" +LDFLAGS="" +LIBS="" +AC_CHECK_HEADER(pthread.h, , AC_MSG_ERROR([*** pthread header file not found!])) +AC_CHECK_LIB(pthread, pthread_mutex_init, , AC_MSG_ERROR([*** pthread library not found!])) +PTHREAD_CFLAGS="$CXXFLAGS $CPPFLAGS $CFLAGS" +PTHREAD_LIBS="$LDFLAGS $LIBS" +CXXFLAGS="$tmp_CXXFLAGS" +CPPFLAGS="$tmp_CPPFLAGS" +CFLAGS="$tmp_CFLAGS" +LDFLAGS="$tmp_LDFLAGS" +LIBS="$tmp_LIBS" +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_LIBS) AC_OUTPUT( Makefile -- cgit v1.2.3