diff --git a/Examples/MacOSX/mainc.c b/Examples/MacOSX/mainc.c
--- a/Examples/MacOSX/mainc.c
+++ b/Examples/MacOSX/mainc.c
@@ -22,7 +22,7 @@
 
 */
 
-#include <SDL.h>
+#include <SDL/SDL.h>
 #include <HsFFI.h>
 #ifdef __GLASGOW_HASKELL__
 #include "MainWrapper_stub.h"
diff --git a/Graphics/UI/SDL/Audio.hsc b/Graphics/UI/SDL/Audio.hsc
--- a/Graphics/UI/SDL/Audio.hsc
+++ b/Graphics/UI/SDL/Audio.hsc
@@ -1,4 +1,4 @@
-#include "SDL.h"
+#include "SDL/SDL.h"
 #ifdef main
 #undef main
 #endif
diff --git a/Graphics/UI/SDL/Events.hsc b/Graphics/UI/SDL/Events.hsc
--- a/Graphics/UI/SDL/Events.hsc
+++ b/Graphics/UI/SDL/Events.hsc
@@ -1,4 +1,4 @@
-#include "SDL.h"
+#include "SDL/SDL.h"
 #ifdef main
 #undef main
 #endif
diff --git a/Graphics/UI/SDL/General.hsc b/Graphics/UI/SDL/General.hsc
--- a/Graphics/UI/SDL/General.hsc
+++ b/Graphics/UI/SDL/General.hsc
@@ -1,4 +1,4 @@
-#include "SDL.h"
+#include "SDL/SDL.h"
 #ifdef main
 #undef main
 #endif
diff --git a/Graphics/UI/SDL/Joystick.hsc b/Graphics/UI/SDL/Joystick.hsc
--- a/Graphics/UI/SDL/Joystick.hsc
+++ b/Graphics/UI/SDL/Joystick.hsc
@@ -1,4 +1,4 @@
-#include "SDL.h"
+#include "SDL/SDL.h"
 #ifdef main
 #undef main
 #endif
diff --git a/Graphics/UI/SDL/Keysym.hsc b/Graphics/UI/SDL/Keysym.hsc
--- a/Graphics/UI/SDL/Keysym.hsc
+++ b/Graphics/UI/SDL/Keysym.hsc
@@ -1,4 +1,4 @@
-#include "SDL.h"
+#include "SDL/SDL.h"
 #ifdef main
 #undef main
 #endif
diff --git a/Graphics/UI/SDL/Rect.hsc b/Graphics/UI/SDL/Rect.hsc
--- a/Graphics/UI/SDL/Rect.hsc
+++ b/Graphics/UI/SDL/Rect.hsc
@@ -1,4 +1,4 @@
-#include "SDL.h"
+#include "SDL/SDL.h"
 #ifdef main
 #undef main
 #endif
diff --git a/Graphics/UI/SDL/Types.hsc b/Graphics/UI/SDL/Types.hsc
--- a/Graphics/UI/SDL/Types.hsc
+++ b/Graphics/UI/SDL/Types.hsc
@@ -1,4 +1,4 @@
-#include "SDL.h"
+#include "SDL/SDL.h"
 #ifdef main
 #undef main
 #endif
diff --git a/Graphics/UI/SDL/Version.hsc b/Graphics/UI/SDL/Version.hsc
--- a/Graphics/UI/SDL/Version.hsc
+++ b/Graphics/UI/SDL/Version.hsc
@@ -1,4 +1,4 @@
-#include "SDL.h"
+#include "SDL/SDL.h"
 #ifdef main
 #undef main
 #endif
diff --git a/Graphics/UI/SDL/Video.hsc b/Graphics/UI/SDL/Video.hsc
--- a/Graphics/UI/SDL/Video.hsc
+++ b/Graphics/UI/SDL/Video.hsc
@@ -76,7 +76,7 @@
     , mkFinalizedSurface
     ) where
 
-#include <SDL.h>
+#include <SDL/SDL.h>
 #ifdef main
 #undef main
 #endif
diff --git a/Graphics/UI/SDL/WindowManagement.hsc b/Graphics/UI/SDL/WindowManagement.hsc
--- a/Graphics/UI/SDL/WindowManagement.hsc
+++ b/Graphics/UI/SDL/WindowManagement.hsc
@@ -1,4 +1,4 @@
-#include "SDL.h"
+#include "SDL/SDL.h"
 #ifdef main
 #undef main
 #endif
diff --git a/SDL.cabal b/SDL.cabal
--- a/SDL.cabal
+++ b/SDL.cabal
@@ -1,6 +1,6 @@
 Cabal-Version:      >= 1.6
 Name:               SDL
-Version:            0.6.4
+Version:            0.6.5
 Maintainer:         Lemmih (lemmih@gmail.com)
 Author:             Lemmih (lemmih@gmail.com)
 Copyright:          2004-2010, Lemmih
@@ -45,7 +45,7 @@
    Graphics.UI.SDL.Utilities,
    Graphics.UI.SDL.Version,
    Graphics.UI.SDL.Joystick
-  Includes: SDL.h
+  Includes: SDL/SDL.h
   if ! os(darwin)
    Extra-Libraries: SDL
   Frameworks: AppKit
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -1720,15 +1720,15 @@
 fi
 
 if test "x$pthread" = "xno"; then
-  SDL_LIBS=`$SDL_CONFIG --libs | sed "s/-lpthread//"`
+  SDL_LIBS=`"$SDL_CONFIG" --libs | sed "s/-lpthread//"`
 else
-  SDL_LIBS=`$SDL_CONFIG --libs`
+  SDL_LIBS=`"$SDL_CONFIG" --libs`
 fi
 
-SDL_CFLAGS=`$SDL_CONFIG --cflags`
+SDL_CFLAGS=`"$SDL_CONFIG" --cflags`
 
 if test x`uname` = "xDarwin"; then
-	SDL_LIBS="`$SDL_CONFIG --prefix`/lib/libSDLmain.a `$SDL_CONFIG --prefix`/lib/libSDL.dylib -Wl,-framework,Cocoa"
+	SDL_LIBS="`"$SDL_CONFIG" --prefix`/lib/libSDLmain.a `"$SDL_CONFIG" --prefix`/lib/libSDL.dylib -Wl,-framework,Cocoa"
 fi
 
 
