mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2024-11-03 04:17:18 -05:00
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. git-svn-id: https://svn.xiph.org/trunk/ezstream@12562 0101bb08-14d6-0310-b084-bc0e0c8e3800
This commit is contained in:
parent
04e087fc11
commit
733c989d1b
@ -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'`
|
||||
|
@ -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 *~ .*~
|
||||
|
37
configure.in
37
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
|
||||
|
@ -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 *~ .*~
|
||||
|
@ -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;
|
||||
|
@ -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__ */
|
||||
|
@ -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++;
|
||||
|
||||
|
@ -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 *~ .*~
|
||||
|
Loading…
Reference in New Issue
Block a user