summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-31 03:54:18 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-31 04:12:55 +0300
commitd5af01cef60230bfdd90dda14944075f896e2a93 (patch)
tree27fc5eebad5cdb39d72da324edf9907a6547ee40 /configure.ac
parentbd17bd98bb85bc146958fed07f48dcea55a969a5 (diff)
downloadmanaverse-d5af01cef60230bfdd90dda14944075f896e2a93.tar.gz
manaverse-d5af01cef60230bfdd90dda14944075f896e2a93.tar.bz2
manaverse-d5af01cef60230bfdd90dda14944075f896e2a93.tar.xz
manaverse-d5af01cef60230bfdd90dda14944075f896e2a93.zip
Allow use system guichan by automake switch --with-internalguichan=no.
Cmake always using internal guichan.
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac31
1 files changed, 30 insertions, 1 deletions
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]))