[xiph-commits] r12562 - in trunk/ezstream: . conf src win32

moritz at svn.xiph.org moritz at svn.xiph.org
Sun Feb 25 06:00:21 PST 2007


Author: moritz
Date: 2007-02-25 06:00:15 -0800 (Sun, 25 Feb 2007)
New Revision: 12562

Modified:
   trunk/ezstream/Makefile.am
   trunk/ezstream/conf/Makefile.am
   trunk/ezstream/configure.in
   trunk/ezstream/src/Makefile.am
   trunk/ezstream/src/configfile.c
   trunk/ezstream/src/configfile.h
   trunk/ezstream/src/ezstream.c
   trunk/ezstream/win32/Makefile.am
Log:
Various cleanups and auto-fu tweaks.
 * Make Makefile.am files look alike as much as possible.
 * Remove debug: target and don't mess with the users DEBUG environment
   variable: Autoconf checks for -g and automatically adds it to CFLAGS, which
   is overridden by the user's $DEBUG. If the user didn't specify one, "make
   install" will strip the resulting binaries and leave the debugging symbols
   intact otherwise.
 * Remove profile: target, as it is quite pointless in Ezstream. Also, the user
   can add profiling flags via the $DEBUG variable as well.
 * Remove -ffast-math and -fsigned-char from gcc, and enable two additional
   warnings instead.
 * Unconfuse Solaris compiler flags (unfortunately, the configure script still
   fails in the libshout check with some obscure linker error): Do not force
   -x04 and -fast optimizations, let the user decide (it doesn't matter for
   Ezstream anyways.) Remove -xgc92, which is deprecated and actually makes
   the resulting binary run slower on SPARC. Also remove -fsimple, which does
   not help and has the potential of causing trouble, and don't enable verbose
   warnings just to disable them afterwards with -w. Leave only -v for verbose
   warnings.
 * Const'ify getFormat*() functions and blankString, and squelch a few const-
   related warnings.
 * Squelch a signedness warning and fix two ;; syntax errors.
 * Add a snapshot target to Makefile.am that creates a tarball of the form
   ezstream-snapshot-YYYYMMDD.tar.gz.


Modified: trunk/ezstream/Makefile.am
===================================================================
--- trunk/ezstream/Makefile.am	2007-02-25 11:18:23 UTC (rev 12561)
+++ trunk/ezstream/Makefile.am	2007-02-25 14:00:15 UTC (rev 12562)
@@ -1,5 +1,3 @@
-## Process this file with automake to produce Makefile.in
-
 AUTOMAKE_OPTIONS = 1.9 foreign
 ACLOCAL_AMFLAGS = -I m4
 
@@ -9,8 +7,7 @@
 
 CLEANFILES =	core *.core *~ .*~
 
-debug:
-	$(MAKE) all CFLAGS="@DEBUG@"
+.PHONY:		snapshot
 
-profile:
-	$(MAKE) all CFLAGS="@PROFILE@"
+snapshot:
+	${MAKE} dist distdir=${PACKAGE}-snapshot-`date +'%Y%m%d'`

Modified: trunk/ezstream/conf/Makefile.am
===================================================================
--- trunk/ezstream/conf/Makefile.am	2007-02-25 11:18:23 UTC (rev 12561)
+++ trunk/ezstream/conf/Makefile.am	2007-02-25 14:00:15 UTC (rev 12562)
@@ -1,10 +1,8 @@
-## Process this file with automake to produce Makefile.in
+AUTOMAKE_OPTIONS = 1.9 foreign
 
-AUTOMAKE_OPTIONS = foreign
-
-CLEANFILES = core *.core *~ .*~
-
-examplesdir = @EXAMPLES_DIR@
+examplesdir =	@EXAMPLES_DIR@
 dist_examples_DATA = ezstream_mp3.xml ezstream_reencoding_example_mp3.xml \
-		     ezstream_reencoding_example_theora.xml \
-		     ezstream_reencoding_example_vorbis.xml ezstream_vorbis.xml
+		ezstream_reencoding_example_theora.xml \
+		ezstream_reencoding_example_vorbis.xml ezstream_vorbis.xml
+
+CLEANFILES =	core *.core *~ .*~

Modified: trunk/ezstream/configure.in
===================================================================
--- trunk/ezstream/configure.in	2007-02-25 11:18:23 UTC (rev 12561)
+++ trunk/ezstream/configure.in	2007-02-25 14:00:15 UTC (rev 12562)
@@ -18,27 +18,19 @@
 
 AC_CANONICAL_HOST
 
-DEBUG="-g"
 if test -z "$GCC"; then
-    XIPH_CPPFLAGS="-D_REENTRANT"
-    case $host in 
-        *-*-irix*)
-                XIPH_CPPFLAGS="$XIPH_CPPFLAGS -w -signed"
-                PROFILE="-p -g3 -O2 -signed -D_REENTRANT"
-                ;;
-        *-*-solaris*)
-                XIPH_CFLAGS="-xO4 -xcg92"
-                XIPH_CPPFLAGS="$XIPH_CPPFLAGS -v -w -fsimple -fast"
-                PROFILE="-xpg -g -Dsuncc"
-                ;;
-        *)
-                XIPH_CFLAGS="-O"
-                PROFILE="-g -p"
-                ;;
-    esac
+	case $host in 
+	*-irix*)
+		XIPH_CPPFLAGS="-w -signed"
+		;;
+	*-solaris*)
+		XIPH_CPPFLAGS="-v"
+		;;
+	*)
+		;;
+	esac
 else
-    XIPH_CPPFLAGS="-Wall -ffast-math -fsigned-char"
-    PROFILE="-pg -g"
+	XIPH_CPPFLAGS="-Wall -Wwrite-strings -Wpointer-arith"
 fi
 
 
@@ -82,9 +74,8 @@
 dnl CONFIGURE OPTIONS
 
 XIPH_PATH_SHOUT(, AC_MSG_ERROR([must have libshout installed!]))
-if test "$SHOUT_THREADSAFE" != "yes"
-then
-  AC_MSG_ERROR([This libshout isn't threadsafe])
+if test "$SHOUT_THREADSAFE" != "yes"; then
+	AC_MSG_ERROR([This libshout isn't threadsafe])
 fi 
 
 XIPH_PATH_XML
@@ -113,8 +104,6 @@
 AC_SUBST(XIPH_CFLAGS)
 AC_SUBST(XIPH_LIBS)
 AC_SUBST(LIBS)
-AC_SUBST(DEBUG)
 AC_SUBST(CFLAGS)
-AC_SUBST(PROFILE)
 
 AC_OUTPUT

Modified: trunk/ezstream/src/Makefile.am
===================================================================
--- trunk/ezstream/src/Makefile.am	2007-02-25 11:18:23 UTC (rev 12561)
+++ trunk/ezstream/src/Makefile.am	2007-02-25 14:00:15 UTC (rev 12562)
@@ -1,22 +1,14 @@
-## Process this with automake to create Makefile.in
+AUTOMAKE_OPTIONS = 1.9 foreign
 
-AUTOMAKE_OPTIONS = foreign
+bin_PROGRAMS =	ezstream
 
-bin_PROGRAMS = ezstream
-
 ezstream_SOURCES = ezstream.c configfile.c playlist.c util.c
 ezstream_LDADD = @LIBOBJS@ @XIPH_LIBS@
     
-AM_CFLAGS = @XIPH_CFLAGS@
-AM_CPPFLAGS = @XIPH_CPPFLAGS@
+AM_CFLAGS =	@XIPH_CFLAGS@
+AM_CPPFLAGS =	@XIPH_CPPFLAGS@
 
-EXTRA_DIST = ezsignals.h getopt.h strlfctns.h configfile.h playlist.h util.h
+EXTRA_DIST =	configfile.h ezsignals.h getopt.h playlist.h strlfctns.h \
+		util.h
 
-CLEANFILES = core *.core *~ .*~
-
-debug:
-	$(MAKE) all CFLAGS="@DEBUG@"
-
-profile:
-	$(MAKE) all CFLAGS="@PROFILE@"
-
+CLEANFILES =	core *.core *~ .*~

Modified: trunk/ezstream/src/configfile.c
===================================================================
--- trunk/ezstream/src/configfile.c	2007-02-25 11:18:23 UTC (rev 12561)
+++ trunk/ezstream/src/configfile.c	2007-02-25 14:00:15 UTC (rev 12562)
@@ -34,8 +34,8 @@
 # define PATH_MAX	256
 #endif
 
-static EZCONFIG	 ezConfig;
-static char	*blankString = "";
+static EZCONFIG		 ezConfig;
+static const char	*blankString = "";
 
 void	freeConfig(EZCONFIG *);
 
@@ -45,7 +45,7 @@
 	return (&ezConfig);
 }
 
-char *
+const char *
 getFormatEncoder(const char *format)
 {
 	int	i;
@@ -64,7 +64,7 @@
 	return (blankString);
 }
 
-char*
+const char *
 getFormatDecoder(const char *match)
 {
 	int	i;

Modified: trunk/ezstream/src/configfile.h
===================================================================
--- trunk/ezstream/src/configfile.h	2007-02-25 11:18:23 UTC (rev 12561)
+++ trunk/ezstream/src/configfile.h	2007-02-25 14:00:15 UTC (rev 12562)
@@ -60,8 +60,8 @@
 } EZCONFIG;
 
 EZCONFIG *	getEZConfig(void);
-char *		getFormatEncoder(const char *format);
-char *		getFormatDecoder(const char *match);
+const char *	getFormatEncoder(const char *format);
+const char *	getFormatDecoder(const char *match);
 int		parseConfig(const char *fileName);
 
 #endif /* __CONFIGFILE_H__ */

Modified: trunk/ezstream/src/ezstream.c
===================================================================
--- trunk/ezstream/src/ezstream.c	2007-02-25 11:18:23 UTC (rev 12561)
+++ trunk/ezstream/src/ezstream.c	2007-02-25 14:00:15 UTC (rev 12562)
@@ -89,10 +89,10 @@
 int		 qFlag;
 int		 vFlag;
 
-EZCONFIG	*pezConfig = NULL;
-static char	*blankString = "";
-playlist_t	*playlist = NULL;
-int		 playlistMode = 0;
+EZCONFIG		*pezConfig = NULL;
+static const char	*blankString = "";
+playlist_t		*playlist = NULL;
+int			 playlistMode = 0;
 
 #ifdef HAVE_SIGNALS
 volatile sig_atomic_t	rereadPlaylist = 0;
@@ -197,7 +197,7 @@
 
 	p2++;
 	p3 = strchr(p2, '/');
-	if (p3 == NULL || p3 - p2 >= sizeof(tmpPort))
+	if (p3 == NULL || p3 - p2 >= (int)sizeof(tmpPort))
 		return (0);
 
 	strlcpy(tmpPort, p2, (p3 - p2) + 1);
@@ -432,7 +432,7 @@
 		 * let's just use the filename.
 		 */
 		char	*p1 = NULL;
-		char	*p2 = NULL;;
+		char	*p2 = NULL;
 		char	*filename_copy = NULL;
 
 		filename_copy = xstrdup(fileName);
@@ -668,7 +668,7 @@
 		printf("%s: streamFile(): Error while reading '%s': %s\n",
 		       __progname, fileName, strerror(errno));
 	else
-		retval = 1;;
+		retval = 1;
 
 	if (popenFlag)
 		pclose(filepstream);
@@ -732,7 +732,7 @@
 		return ((char *)"ezstream");
 	p = strrchr(argv0, '/');
 	if (p == NULL)
-		p = argv0;
+		p = (char *)argv0;
 	else
 		p++;
 

Modified: trunk/ezstream/win32/Makefile.am
===================================================================
--- trunk/ezstream/win32/Makefile.am	2007-02-25 11:18:23 UTC (rev 12561)
+++ trunk/ezstream/win32/Makefile.am	2007-02-25 14:00:15 UTC (rev 12562)
@@ -1,7 +1,5 @@
-## Process this file with automake to produce Makefile.in
+AUTOMAKE_OPTIONS = 1.9 foreign
 
-AUTOMAKE_OPTIONS = foreign
+EXTRA_DIST =	ezstream.dsp ezstream.dsw ezstream.iss
 
-CLEANFILES = core *.core *~ .*~
-
-EXTRA_DIST = ezstream.dsp  ezstream.dsw ezstream.iss
+CLEANFILES =	core *.core *~ .*~



More information about the commits mailing list