From d5af01cef60230bfdd90dda14944075f896e2a93 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 31 May 2011 03:54:18 +0300 Subject: Allow use system guichan by automake switch --with-internalguichan=no. Cmake always using internal guichan. --- configure.ac | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 1295ce0a7..88952d80f 100755 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,7 @@ AC_PATH_PROG(CURL_CONFIG, curl-config) AC_CHECK_LIB([pthread], [pthread_create], , AC_MSG_ERROR([ *** Unable to find pthread library])) + if test -n "$SDL_CONFIG"; then LIBS="$LIBS `$SDL_CONFIG --libs`" CPPFLAGS="$CPPFLAGS `$SDL_CONFIG --cflags`" @@ -81,6 +82,7 @@ AC_MSG_ERROR([ *** Unable to find SDL_ttf library (http://www.libsdl.org/project AC_CHECK_LIB([SDL_mixer], [Mix_OpenAudio], , AC_MSG_ERROR([ *** Unable to find SDL_mixer library (http://www.libsdl.org/projects/SDL_mixer/)])) + AC_CHECK_LIB(SDL_gfx, rotozoomSurfaceXY, , AC_MSG_ERROR([ *** Unable to find SDL_gfx library (http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx)])) AC_CHECK_HEADERS(SDL_rotozoom.h, ,) @@ -115,8 +117,35 @@ else with_opengl=yes AC_CHECK_LIB([GL], [glBegin], , AC_MSG_ERROR([ *** Unable to find OpenGL library])) - AC_DEFINE(USE_OPENGL, 1, [Defines if Mana should have OpenGL support]) + AC_DEFINE(USE_OPENGL, 1, [Defines if ManaPlus should have OpenGL support]) +fi + +# Option to enable internal guichan +AC_ARG_WITH(internalguichan,[ --without-internalguichan don't use internal guichan ] ) +if test "x$with_internalguichan" == "xno"; then + with_internalguichan=no + + AC_CHECK_LIB([guichan], [gcnGuichanVersion], , + AC_MSG_ERROR([ *** Unable to find Guichan library (http://guichan.sf.net/)])) + AC_CHECK_HEADERS([guichan.hpp], , + AC_MSG_ERROR([ *** Guichan library found but cannot find headers (http://guichan.sf.net/)])) + + AC_CHECK_HEADERS([guichan/widgetlistener.hpp], , + AC_MSG_ERROR([ *** Guichan library version is found but version is < 0.8.0 (http://guichan.sf.net/)])) + + AC_CHECK_LIB([guichan_sdl], [gcnSDL], , + AC_MSG_ERROR([ *** Unable to find Guichan SDL library (http://guichan.sf.net/)])) + +# CPPFLAGS="-I/usr/include -I. -I.. $CPPFLAGS" +else + with_internalguichan=yes + + CPPFLAGS="$CPPFLAGS -I./guichan/include" + + AC_DEFINE(USE_INTERNALGUICHAN, 1, [Defines if ManaPlus should use internal guichan classes]) fi +AM_CONDITIONAL(USE_INTERNALGUICHAN, test x$with_internalguichan = xyes) + AC_CHECK_LIB(SDL_net, SDLNet_Init, , AC_MSG_ERROR([ *** Unable to find SDL_net library])) -- cgit v1.2.3-60-g2f50