[xiph-cvs] cvs commit: theora/lib encoder_internal.h

Ralph Giles giles at xiph.org
Sun Mar 7 22:44:27 PST 2004



giles       04/03/08 01:44:27

  Modified:    .        autogen.sh configure.ac
               examples dump_video.c encoder_example.c player_example.c
                        splayer.c
               lib      encoder_internal.h
  Log:
  Moderize autotools macro syntax.
  
  We now use a 'config.h' in the autotools build for what good it does to
  shorten the compiler command lines. libtool still clutters things up,
  but warnings are a little more obvious now.
  
  This involves adding a new include to all the source files; the library
  is easy because everyone includes encoder_internal.h so we just put it
  there; watch this if you need any of the configure stuff in another
  header. The config.h include is added explicitly to each example source
  file.
  
  Also, correct reporting logic for when portaudio is not available.

Revision  Changes    Path
1.4       +3 -2      theora/autogen.sh

Index: autogen.sh
===================================================================
RCS file: /usr/local/cvsroot/theora/autogen.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- autogen.sh	19 Jun 2003 21:25:42 -0000	1.3
+++ autogen.sh	8 Mar 2004 06:44:26 -0000	1.4
@@ -71,10 +71,11 @@
   exit 1
 fi
 
+
 echo "  aclocal $ACLOCAL_FLAGS"
 aclocal $ACLOCAL_FLAGS
-#echo "  autoheader"
-#autoheader
+echo "  autoheader"
+autoheader
 echo "  libtoolize --automake"
 libtoolize --automake
 echo "  automake --add-missing $AUTOMAKE_FLAGS"

<p><p>1.2       +22 -6     theora/configure.ac

Index: configure.ac
===================================================================
RCS file: /usr/local/cvsroot/theora/configure.ac,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- configure.ac	8 Mar 2004 04:12:10 -0000	1.1
+++ configure.ac	8 Mar 2004 06:44:26 -0000	1.2
@@ -4,8 +4,10 @@
 dnl Initialization and Versioning
 dnl ------------------------------------------------
 
-AC_INIT(lib/dct.c)
-AM_INIT_AUTOMAKE(libtheora,0.0)
+AC_INIT(libtheora,[unreleased snapshot])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_SRCDIR([lib/dct.c])
+AM_INIT_AUTOMAKE
 
 dnl Library versioning
 
@@ -37,6 +39,7 @@
 dnl --------------------------------------------------
 
 AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
 
 dnl Set some target options
 
@@ -58,9 +61,17 @@
                 PROFILE="-W -pg -g -O2 -fno-inline-functions";;
         esac
 fi
-CFLAGS="$CFLAGS $cflags_save -D_REENTRANT"
+CFLAGS="$CFLAGS $cflags_save"
 LDFLAGS="$LDFLAGS $ldflags_save"
 
+dnl We like threads
+AH_VERBATIM([_REENTRANT],
+[/* define to mark the code thread-safe, and to
+   request thread-safe code from others. */
+#ifndef _REENTRANT
+#define _REENTRANT
+#endif])
+
 dnl --------------------------------------------------
 dnl Check for headers
 dnl --------------------------------------------------
@@ -106,7 +117,7 @@
   AC_CHECK_HEADER(portaudio.h, [HAVE_PORTAUDIO=yes])
   ],,[-lpthread]
 )
-if test "$HAVE_PORTAUDIO" = "no"; then
+if test "x$HAVE_PORTAUDIO" != xyes; then
   AC_MSG_WARN([portaudio not found -- not compiling splayer example])
 fi
 
@@ -128,5 +139,10 @@
 AC_SUBST(DEBUG)
 AC_SUBST(PROFILE)
 
-AC_OUTPUT(Makefile lib/Makefile include/Makefile include/theora/Makefile \
-	doc/Makefile examples/Makefile debian/Makefile)
+AC_CONFIG_FILES([
+  Makefile lib/Makefile
+  include/Makefile include/theora/Makefile
+  examples/Makefile doc/Makefile
+  debian/Makefile
+])
+AC_OUTPUT

<p><p>1.10      +5 -1      theora/examples/dump_video.c

Index: dump_video.c
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/dump_video.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- dump_video.c	22 Jan 2004 20:26:22 -0000	1.9
+++ dump_video.c	8 Mar 2004 06:44:26 -0000	1.10
@@ -11,13 +11,17 @@
  ********************************************************************
 
   function: example dumpvid application; dumps  Theora streams
-  last mod: $Id: dump_video.c,v 1.9 2004/01/22 20:26:22 tterribe Exp $
+  last mod: $Id: dump_video.c,v 1.10 2004/03/08 06:44:26 giles Exp $
 
  ********************************************************************/
 
 /* By Mauricio Piacentini (mauricio at xiph.org) */
 /*  simply dump decoded YUV data, for verification of theora bitstream */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #define _GNU_SOURCE
 #define _LARGEFILE_SOURCE
 #define _LARGEFILE64_SOURCE

<p><p>1.28      +5 -1      theora/examples/encoder_example.c

Index: encoder_example.c
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/encoder_example.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- encoder_example.c	7 Mar 2004 07:51:28 -0000	1.27
+++ encoder_example.c	8 Mar 2004 06:44:26 -0000	1.28
@@ -12,7 +12,7 @@
 
   function: example encoder application; makes an Ogg Theora/Vorbis
             file from YUV4MPEG2 and WAV input
-  last mod: $Id: encoder_example.c,v 1.27 2004/03/07 07:51:28 giles Exp $
+  last mod: $Id: encoder_example.c,v 1.28 2004/03/08 06:44:26 giles Exp $
 
  ********************************************************************/
 
@@ -21,6 +21,10 @@
 #define _LARGEFILE64_SOURCE
 #define _FILE_OFFSET_BITS 64
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #ifndef _REENTRANT
 # define _REENTRANT
 #endif

<p><p>1.29      +5 -1      theora/examples/player_example.c

Index: player_example.c
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/player_example.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- player_example.c	7 Mar 2004 07:51:28 -0000	1.28
+++ player_example.c	8 Mar 2004 06:44:26 -0000	1.29
@@ -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.28 2004/03/07 07:51:28 giles Exp $
+  last mod: $Id: player_example.c,v 1.29 2004/03/08 06:44:26 giles Exp $
 
  ********************************************************************/
 
@@ -30,6 +30,10 @@
 #define _LARGEFILE64_SOURCE
 #define _FILE_OFFSET_BITS 64
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #ifndef _REENTRANT
 # define _REENTRANT
 #endif

<p><p>1.8       +4 -0      theora/examples/splayer.c

Index: splayer.c
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/splayer.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- splayer.c	3 Oct 2003 12:40:16 -0000	1.7
+++ splayer.c	8 Mar 2004 06:44:26 -0000	1.8
@@ -25,6 +25,10 @@
 
  ********************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

<p><p>1.20      +5 -1      theora/lib/encoder_internal.h

Index: encoder_internal.h
===================================================================
RCS file: /usr/local/cvsroot/theora/lib/encoder_internal.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- encoder_internal.h	7 Mar 2004 02:27:04 -0000	1.19
+++ encoder_internal.h	8 Mar 2004 06:44:27 -0000	1.20
@@ -11,13 +11,17 @@
  ********************************************************************
 
   function:
-  last mod: $Id: encoder_internal.h,v 1.19 2004/03/07 02:27:04 giles Exp $
+  last mod: $Id: encoder_internal.h,v 1.20 2004/03/08 06:44:27 giles Exp $
 
  ********************************************************************/
 
 #ifndef ENCODER_INTERNAL_H
 #define ENCODER_INTERNAL_H
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <theora/theora.h>
 #include "huffman.h"
 

<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