[vlc-devel] [PATCH] use SDL.h instead of SDL/SDL.h

Nathan Phillip Brink ohnobinki at ohnopublishing.net
Sat Mar 6 02:26:04 CET 2010


Fix #include <SDL/SDL.h> to be #includes <SDL.h> as the FAQ on http://libsdl.org/ declares this is the most portable method.

http://www.libsdl.org/faq.php?action=listentries&category=2#19

As sdl-config --cflags returns an include directive (-I) with ``SDL'' postfixed, VLC should respect this. This would fix a compile issue on my strange setup, which I prefer not to go into detail about ;-). I hope that libsdl's documentation and behavior is enough to warrant acceptance of this patch.

-- 
ohnobinki

Look out for missing apostrophes!
-------------- next part --------------
>From 51c97f2225377007da5bb79fcee674ece150b872 Mon Sep 17 00:00:00 2001
From: Nathan Phillip Brink <ohnobinki at ohnopublishing.net>
Date: Fri, 5 Mar 2010 19:58:52 -0500
Subject: [PATCH] Fix #include <SDL/SDL.h> to be #includes <SDL.h> as the FAQ on http://libsdl.org/ declares this is the most portable method.

---
 configure.ac               |    8 ++++----
 modules/audio_output/sdl.c |    2 +-
 modules/codec/sdl_image.c  |    2 +-
 modules/video_output/sdl.c |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index e100440..9dab26a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3448,8 +3448,8 @@ then
         SDL_PATH="${with_sdl_config_path}:${PATH}"
       fi ])
   AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
-  SDL_HEADER="SDL/SDL.h"
-  SDL_IMAGE="SDL/SDL_image.h"
+  SDL_HEADER="SDL.h"
+  SDL_IMAGE="SDL_image.h"
 
   if test "${SDL_CONFIG}" != "no";  then
      PKG_CHECK_MODULES(SDL, [sdl >= 1.2.10], [
@@ -3457,12 +3457,12 @@ then
         if test "${SYS}" != "darwin"; then
           VLC_ADD_PLUGIN([vout_sdl aout_sdl])
         fi
-        VLC_ADD_CFLAGS([vout_sdl aout_sdl sdl_image],[`${SDL_CONFIG} --cflags | sed 's,SDL,,'`])
+        VLC_ADD_CFLAGS([vout_sdl aout_sdl sdl_image],[`${SDL_CONFIG} --cflags`])
         VLC_ADD_LIBS([vout_sdl aout_sdl sdl_image],[`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`])
 
         # SDL_image
         AS_IF([ test "${enable_sdl_image}" != "no"],[
-          AC_CHECK_HEADERS("SDL/SDL_image.h", [
+          AC_CHECK_HEADERS("SDL_image.h", [
             VLC_ADD_PLUGIN([sdl_image])
             AC_CHECK_LIB(png, png_set_rows, [VLC_ADD_LIBS([sdl_image],[-lpng -lz])],[],[-lz])
             AC_CHECK_LIB(jpeg, jpeg_start_decompress, [VLC_ADD_LIBS([sdl_image],[-ljpeg])])
diff --git a/modules/audio_output/sdl.c b/modules/audio_output/sdl.c
index 16ddb82..89bbfb1 100644
--- a/modules/audio_output/sdl.c
+++ b/modules/audio_output/sdl.c
@@ -37,7 +37,7 @@
 #include <vlc_plugin.h>
 #include <vlc_aout.h>
 
-#include <SDL/SDL.h>
+#include <SDL.h>
 
 #define FRAME_SIZE 2048
 
diff --git a/modules/codec/sdl_image.c b/modules/codec/sdl_image.c
index 4a9f5d2..bd28da7 100644
--- a/modules/codec/sdl_image.c
+++ b/modules/codec/sdl_image.c
@@ -33,7 +33,7 @@
 #include <vlc_plugin.h>
 #include <vlc_codec.h>
 
-#include <SDL/SDL_image.h>
+#include <SDL_image.h>
 
 /*****************************************************************************
  * decoder_sys_t : sdl decoder descriptor
diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c
index c1c9f01..579a8cd 100644
--- a/modules/video_output/sdl.c
+++ b/modules/video_output/sdl.c
@@ -38,7 +38,7 @@
 
 #include <assert.h>
 
-#include <SDL/SDL.h>
+#include <SDL.h>
 
 /*****************************************************************************
  * Module descriptor
-- 
1.6.4.4



More information about the vlc-devel mailing list