From 75cbb9774e14975d42874e2f0b9d192f1face411 Mon Sep 17 00:00:00 2001 From: Laurent Carlier Date: Sat, 18 Jun 2011 14:55:14 +0000 Subject: [PATCH] [GB.SDL] * BUG: Use pkg-config to properly detect dependencies. git-svn-id: svn://localhost/gambas/trunk@3892 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.sdl/configure.ac | 39 +++++++++++++++++++++++---------------- gb.sdl/src/SDL_h.h | 6 +++--- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/gb.sdl/configure.ac b/gb.sdl/configure.ac index 73b032550..ca7543dac 100644 --- a/gb.sdl/configure.ac +++ b/gb.sdl/configure.ac @@ -8,26 +8,33 @@ AC_PROG_LIBTOOL GB_CHECK_XWINDOW dnl TODO: add a version test in GB_COMPONENT! -GB_PATH_SDL([1.2.8], [], [touch DISABLED]) +dnl GB_PATH_SDL([1.2.8], [], [touch DISABLED]) dnl check Xcursor support -AC_CHECK_LIB(Xcursor, XcursorLibraryLoadCursor, - [echo -n - LDFLAGS="$LDFLAGS -lXcursor"], - [AC_MSG_WARN([libXcursor not found. Check 'config.log' for more details.]) - touch DISABLED], - $X_LIBS) +dnl AC_CHECK_LIB(Xcursor, XcursorLibraryLoadCursor, +dnl [echo -n +dnl LDFLAGS="$LDFLAGS -lXcursor"], +dnl [AC_MSG_WARN([libXcursor not found. Check 'config.log' for more details.]) +dnl touch DISABLED], +dnl $X_LIBS) dnl check for SDL libs -GB_COMPONENT( - sdl, - SDL, - [SDL], - [src], - [GB_FIND(SDL_opengl.h SDL.h SDL_ttf.h, `sdl-config --prefix`, include/SDL)], - [GB_FIND(libSDL_ttf.$SHLIBEXT libGLEW.$SHLIBEXT, /usr /usr/X11R6 /usr/local `sdl-config --prefix`, lib)], - [$X_LIBS -lSDL_ttf -lGLEW], - [$SDL_CFLAGS]) +dnl GB_COMPONENT( +dnl sdl, +dnl SDL, +dnl [SDL], +dnl [src], +dnl [GB_FIND(SDL_opengl.h SDL.h SDL_ttf.h, `sdl-config --prefix`, include/SDL)], +dnl [GB_FIND(libSDL_ttf.$SHLIBEXT libGLEW.$SHLIBEXT, /usr /usr/X11R6 /usr/local `sdl-config --prefix`, lib)], +dnl [$X_LIBS -lSDL_ttf -lGLEW], +dnl [$SDL_CFLAGS]) + +GB_COMPONENT_PKG_CONFIG( + sdl, + SDL, + [SDL], + [src], + sdl "> 1.2.8" SDL_ttf glew xcursor) AC_OUTPUT( \ Makefile \ diff --git a/gb.sdl/src/SDL_h.h b/gb.sdl/src/SDL_h.h index 0c8b90bdd..012a2c0cd 100644 --- a/gb.sdl/src/SDL_h.h +++ b/gb.sdl/src/SDL_h.h @@ -24,9 +24,9 @@ #ifndef __SDL_H_H #define __SDL_H_H -#include -#include "SDL.h" -#include "SDL_syswm.h" +#include +#include +#include #include #include "SDLapp.h"