Fix compile on linux when using SDL_INSTALL_ROOT. All linux builds

now actually honour up the include path provided by sdl-config.
This commit is contained in:
Couriersud 2010-12-26 23:50:09 +00:00
parent a9c6719620
commit e2686259a0
2 changed files with 16 additions and 5 deletions

View File

@ -347,12 +347,23 @@ endif
endif
ifndef SDL_INSTALL_ROOT
INCPATH += `sdl-config --cflags`
INCPATH += `sdl-config --cflags | sed 's:/SDL::'`
LIBS += -lm `sdl-config --libs`
else
INCPATH += -I$(SDL_INSTALL_ROOT)/include
CCOMFLAGS += -D_GNU_SOURCE=1
LIBS += -lm -L$(SDL_INSTALL_ROOT)/lib -Wl,-rpath,$(SDL_INSTALL_ROOT)/lib -lSDL
# The commented out statements document what sdl-config returns when build from svn.
# sdl-config --libs on ubuntu returns "-L/usr/lib -lSDL" which is not what we really
# want in a multi-version SDL environment. Should the svn sdl-config at some point
# return the same output, we need the commented out section again.
#INCPATH += -I$(SDL_INSTALL_ROOT)/include
#CCOMFLAGS += -D_GNU_SOURCE=1
#LIBS += -lm -L$(SDL_INSTALL_ROOT)/lib -Wl,-rpath,$(SDL_INSTALL_ROOT)/lib -lSDL
# FIXME: remove the directfb ref. later. This is just there for now to work around an issue with SDL1.3.
INCPATH += -I$(SDL_INSTALL_ROOT)/include/directfb
INCPATH += `$(SDL_INSTALL_ROOT)/bin/sdl-config --cflags | sed 's:/SDL::'`
LIBS += -lm `$(SDL_INSTALL_ROOT)/bin/sdl-config --libs`
endif
INCPATH += `pkg-config --cflags fontconfig`

View File

@ -15,7 +15,7 @@
#ifdef SDLMAME_UNIX
#ifndef SDLMAME_MACOSX
#include <SDL_ttf.h>
#include <SDL/SDL_ttf.h>
#include <fontconfig/fontconfig.h>
#endif
#ifdef SDLMAME_MACOSX