[xiph-cvs] cvs commit: theora/examples Makefile.am player_example.c splayer.c

Ralph Giles giles at xiph.org
Thu Jun 12 03:39:38 PDT 2003



giles       03/06/12 06:39:38

  Modified:    examples Makefile.am player_example.c splayer.c
  Log:
  Use the proper header path to SDL.h and use SDL_CFLAGS to add it to the
  search path.
  
  The helper sdl-config script assumes you will use #include <SDL.h> and
  puts an include path including the SDL/ directory into the CFLAGS. On
  linux we were ignorning the output of sdl-config and including
  <SDL/SDL.h> on the assumption that would work from one of the default
  include paths (/usr/include or /usr/local/include). This is needed to
  support platforms like macosx where this isn't generally true and also
  qualifies as a code simplification since we were doing the right thing
  on windows anyway.
  
  Unfortunately the way $(SDL_CFLAGS) gets added to the compiler line is a
  complete hack. This patch adds it to the global CFLAGS for everything in
  the examples directory, when of course encoder_example and dump_video do
  not require it. I shouldn't do any harm, but is conceptually wrong.
  
  Current versions of automake support target-specific _CFLAGS lines, but
  that doesn't work in automake 1.4, so it's either this or require
  at least version 1.6.

Revision  Changes    Path
1.11      +1 -0      theora/examples/Makefile.am

Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/Makefile.am,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Makefile.am	12 Jun 2003 10:29:45 -0000	1.10
+++ Makefile.am	12 Jun 2003 10:39:38 -0000	1.11
@@ -18,6 +18,7 @@
 
 noinst_PROGRAMS = encoder_example dump_video $(player_example) $(splayer)
 
+CFLAGS = $(SDL_CFLAGS)
 LDFLAGS = -all-static 
 LDADD = ../lib/libtheora.la -logg -lm
 

<p><p>1.24      +2 -2      theora/examples/player_example.c

Index: player_example.c
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/player_example.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- player_example.c	10 Jun 2003 01:31:32 -0000	1.23
+++ player_example.c	12 Jun 2003 10:39:38 -0000	1.24
@@ -12,7 +12,7 @@
 
   function: example SDL player application; plays Ogg Theora files (with
             optional Vorbis audio second stream)
-  last mod: $Id: player_example.c,v 1.23 2003/06/10 01:31:32 tterribe Exp $
+  last mod: $Id: player_example.c,v 1.24 2003/06/12 10:39:38 giles Exp $
 
  ********************************************************************/
 
@@ -43,7 +43,7 @@
 #include <signal.h>
 #include "theora/theora.h"
 #include "vorbis/codec.h"
-#include <SDL/SDL.h>
+#include <SDL.h>
 
 /* yes, this makes us OSS-specific for now. None of SDL, libao, libao2
    give us any way to determine hardware timing, and since the

<p><p>1.4       +2 -5      theora/examples/splayer.c

Index: splayer.c
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/splayer.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- splayer.c	11 Jun 2003 02:24:29 -0000	1.3
+++ splayer.c	12 Jun 2003 10:39:38 -0000	1.4
@@ -34,16 +34,13 @@
 #include "theora/theora.h"
 #include "vorbis/codec.h"
 
-
 #ifdef WIN32
 #include <windows.h>
 #include <io.h>
-#include "SDL.h"
-#else
-#include "SDL/SDL.h"
 #endif
 
-#include "portaudio.h"
+#include <portaudio.h>
+#include <SDL.h>
 
 /*for portaudio  */
 #define FRAMES_PER_BUFFER (256)

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list