diff --git a/Makefile.am b/Makefile.am index 40c87c8..f853a4e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 @@ dist_doc_DATA = COPYING README 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'` diff --git a/conf/Makefile.am b/conf/Makefile.am index 0a9fd79..57c31d1 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -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 *~ .*~ diff --git a/configure.in b/configure.in index 26485ac..3dac128 100644 --- a/configure.in +++ b/configure.in @@ -18,27 +18,19 @@ AC_SUBST(EXAMPLES_DIR) 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 @@ fi 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_CPPFLAGS) AC_SUBST(XIPH_CFLAGS) AC_SUBST(XIPH_LIBS) AC_SUBST(LIBS) -AC_SUBST(DEBUG) AC_SUBST(CFLAGS) -AC_SUBST(PROFILE) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index 96fa98f..9b2240d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 - -CLEANFILES = core *.core *~ .*~ - -debug: - $(MAKE) all CFLAGS="@DEBUG@" - -profile: - $(MAKE) all CFLAGS="@PROFILE@" +EXTRA_DIST = configfile.h ezsignals.h getopt.h playlist.h strlfctns.h \ + util.h +CLEANFILES = core *.core *~ .*~ diff --git a/src/configfile.c b/src/configfile.c index 8b5bd6c..6fc0586 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -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 @@ getEZConfig(void) return (&ezConfig); } -char * +const char * getFormatEncoder(const char *format) { int i; @@ -64,7 +64,7 @@ getFormatEncoder(const char *format) return (blankString); } -char* +const char * getFormatDecoder(const char *match) { int i; diff --git a/src/configfile.h b/src/configfile.h index 91315f9..45f5548 100644 --- a/src/configfile.h +++ b/src/configfile.h @@ -60,8 +60,8 @@ typedef struct tag_EZCONFIG { } 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__ */ diff --git a/src/ezstream.c b/src/ezstream.c index a0c1976..23b3677 100644 --- a/src/ezstream.c +++ b/src/ezstream.c @@ -89,10 +89,10 @@ char *__progname; 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 @@ urlParse(const char *url, char **hostname, int *port, char **mountname) 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 @@ processMetadata(shout_t *shout, const char *extension, const char *fileName) * 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 @@ streamFile(shout_t *shout, const char *fileName) 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 @@ getProgname(const char *argv0) return ((char *)"ezstream"); p = strrchr(argv0, '/'); if (p == NULL) - p = argv0; + p = (char *)argv0; else p++; diff --git a/win32/Makefile.am b/win32/Makefile.am index 8b7d8a9..c4eeaa1 100644 --- a/win32/Makefile.am +++ b/win32/Makefile.am @@ -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 *~ .*~