From 963b677142f6f986e4ed7b0ccc3836c3e0b19d43 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 25 Mar 2008 18:43:48 +0000 Subject: [PATCH] Added support for detecting glib for the C backend --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index b639b5b..265aa29 100644 --- a/configure.ac +++ b/configure.ac @@ -80,6 +80,11 @@ PKG_CHECK_MODULES(CPPCSP2,cppcsp2-2.0 >= 2.0.4,, cppcsp_available=false ) +PKG_CHECK_MODULES(GLIB,glib-2.0 >= 2.4.0,, + AC_MSG_WARN([Glib not available; you will not be able to compile output from the C backend on this machine: ] $GLIB_PKG_ERRORS) + ccsp_kroc_available=false +) + #Must remember to switch the language to C++ before checking the C++ headers: AC_LANG(C++) CPPFLAGS="$CPPCSP2_CFLAGS" @@ -154,7 +159,11 @@ AC_SUBST(C_INT_SIZE) common_cflags="-Wall -ggdb3 -Isupport -fno-strict-aliasing" +CCSP_CFLAGS="`kroc --cflags` `kroc --ccincpath`" +CCSP_LIBS="`kroc --cclibpath` -lccsp -lpthread -ldl -lm" + TOCK_CFLAGS="$gnu89_inline $CPPFLAGS $CFLAGS $common_cflags $CCSP_CFLAGS" +# FIXME: -ldl is only necessary on some platforms for CCSP TOCK_CLDFLAGS="$LDFLAGS $CCSP_LIBS" TOCK_CXXFLAGS="$CPPFLAGS $CXXFLAGS $common_cflags $CPPCSP2_CFLAGS"