mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2024-12-04 14:46:31 -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
|
AUTOMAKE_OPTIONS = 1.9 foreign
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
@ -9,8 +7,7 @@ dist_doc_DATA = COPYING README
|
|||||||
|
|
||||||
CLEANFILES = core *.core *~ .*~
|
CLEANFILES = core *.core *~ .*~
|
||||||
|
|
||||||
debug:
|
.PHONY: snapshot
|
||||||
$(MAKE) all CFLAGS="@DEBUG@"
|
|
||||||
|
|
||||||
profile:
|
snapshot:
|
||||||
$(MAKE) all CFLAGS="@PROFILE@"
|
${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 \
|
dist_examples_DATA = ezstream_mp3.xml ezstream_reencoding_example_mp3.xml \
|
||||||
ezstream_reencoding_example_theora.xml \
|
ezstream_reencoding_example_theora.xml \
|
||||||
ezstream_reencoding_example_vorbis.xml ezstream_vorbis.xml
|
ezstream_reencoding_example_vorbis.xml ezstream_vorbis.xml
|
||||||
|
|
||||||
|
CLEANFILES = core *.core *~ .*~
|
||||||
|
23
configure.in
23
configure.in
@ -18,27 +18,19 @@ AC_SUBST(EXAMPLES_DIR)
|
|||||||
|
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
DEBUG="-g"
|
|
||||||
if test -z "$GCC"; then
|
if test -z "$GCC"; then
|
||||||
XIPH_CPPFLAGS="-D_REENTRANT"
|
|
||||||
case $host in
|
case $host in
|
||||||
*-*-irix*)
|
*-irix*)
|
||||||
XIPH_CPPFLAGS="$XIPH_CPPFLAGS -w -signed"
|
XIPH_CPPFLAGS="-w -signed"
|
||||||
PROFILE="-p -g3 -O2 -signed -D_REENTRANT"
|
|
||||||
;;
|
;;
|
||||||
*-*-solaris*)
|
*-solaris*)
|
||||||
XIPH_CFLAGS="-xO4 -xcg92"
|
XIPH_CPPFLAGS="-v"
|
||||||
XIPH_CPPFLAGS="$XIPH_CPPFLAGS -v -w -fsimple -fast"
|
|
||||||
PROFILE="-xpg -g -Dsuncc"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
XIPH_CFLAGS="-O"
|
|
||||||
PROFILE="-g -p"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
XIPH_CPPFLAGS="-Wall -ffast-math -fsigned-char"
|
XIPH_CPPFLAGS="-Wall -Wwrite-strings -Wpointer-arith"
|
||||||
PROFILE="-pg -g"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -82,8 +74,7 @@ fi
|
|||||||
dnl CONFIGURE OPTIONS
|
dnl CONFIGURE OPTIONS
|
||||||
|
|
||||||
XIPH_PATH_SHOUT(, AC_MSG_ERROR([must have libshout installed!]))
|
XIPH_PATH_SHOUT(, AC_MSG_ERROR([must have libshout installed!]))
|
||||||
if test "$SHOUT_THREADSAFE" != "yes"
|
if test "$SHOUT_THREADSAFE" != "yes"; then
|
||||||
then
|
|
||||||
AC_MSG_ERROR([This libshout isn't threadsafe])
|
AC_MSG_ERROR([This libshout isn't threadsafe])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -113,8 +104,6 @@ AC_SUBST(XIPH_CPPFLAGS)
|
|||||||
AC_SUBST(XIPH_CFLAGS)
|
AC_SUBST(XIPH_CFLAGS)
|
||||||
AC_SUBST(XIPH_LIBS)
|
AC_SUBST(XIPH_LIBS)
|
||||||
AC_SUBST(LIBS)
|
AC_SUBST(LIBS)
|
||||||
AC_SUBST(DEBUG)
|
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
AC_SUBST(PROFILE)
|
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
## Process this with automake to create Makefile.in
|
AUTOMAKE_OPTIONS = 1.9 foreign
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign
|
|
||||||
|
|
||||||
bin_PROGRAMS = ezstream
|
bin_PROGRAMS = ezstream
|
||||||
|
|
||||||
@ -10,13 +8,7 @@ ezstream_LDADD = @LIBOBJS@ @XIPH_LIBS@
|
|||||||
AM_CFLAGS = @XIPH_CFLAGS@
|
AM_CFLAGS = @XIPH_CFLAGS@
|
||||||
AM_CPPFLAGS = @XIPH_CPPFLAGS@
|
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 *~ .*~
|
CLEANFILES = core *.core *~ .*~
|
||||||
|
|
||||||
debug:
|
|
||||||
$(MAKE) all CFLAGS="@DEBUG@"
|
|
||||||
|
|
||||||
profile:
|
|
||||||
$(MAKE) all CFLAGS="@PROFILE@"
|
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static EZCONFIG ezConfig;
|
static EZCONFIG ezConfig;
|
||||||
static char *blankString = "";
|
static const char *blankString = "";
|
||||||
|
|
||||||
void freeConfig(EZCONFIG *);
|
void freeConfig(EZCONFIG *);
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ getEZConfig(void)
|
|||||||
return (&ezConfig);
|
return (&ezConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
getFormatEncoder(const char *format)
|
getFormatEncoder(const char *format)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -64,7 +64,7 @@ getFormatEncoder(const char *format)
|
|||||||
return (blankString);
|
return (blankString);
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
const char *
|
||||||
getFormatDecoder(const char *match)
|
getFormatDecoder(const char *match)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -60,8 +60,8 @@ typedef struct tag_EZCONFIG {
|
|||||||
} EZCONFIG;
|
} EZCONFIG;
|
||||||
|
|
||||||
EZCONFIG * getEZConfig(void);
|
EZCONFIG * getEZConfig(void);
|
||||||
char * getFormatEncoder(const char *format);
|
const char * getFormatEncoder(const char *format);
|
||||||
char * getFormatDecoder(const char *match);
|
const char * getFormatDecoder(const char *match);
|
||||||
int parseConfig(const char *fileName);
|
int parseConfig(const char *fileName);
|
||||||
|
|
||||||
#endif /* __CONFIGFILE_H__ */
|
#endif /* __CONFIGFILE_H__ */
|
||||||
|
@ -90,7 +90,7 @@ int qFlag;
|
|||||||
int vFlag;
|
int vFlag;
|
||||||
|
|
||||||
EZCONFIG *pezConfig = NULL;
|
EZCONFIG *pezConfig = NULL;
|
||||||
static char *blankString = "";
|
static const char *blankString = "";
|
||||||
playlist_t *playlist = NULL;
|
playlist_t *playlist = NULL;
|
||||||
int playlistMode = 0;
|
int playlistMode = 0;
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ urlParse(const char *url, char **hostname, int *port, char **mountname)
|
|||||||
|
|
||||||
p2++;
|
p2++;
|
||||||
p3 = strchr(p2, '/');
|
p3 = strchr(p2, '/');
|
||||||
if (p3 == NULL || p3 - p2 >= sizeof(tmpPort))
|
if (p3 == NULL || p3 - p2 >= (int)sizeof(tmpPort))
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
strlcpy(tmpPort, p2, (p3 - p2) + 1);
|
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.
|
* let's just use the filename.
|
||||||
*/
|
*/
|
||||||
char *p1 = NULL;
|
char *p1 = NULL;
|
||||||
char *p2 = NULL;;
|
char *p2 = NULL;
|
||||||
char *filename_copy = NULL;
|
char *filename_copy = NULL;
|
||||||
|
|
||||||
filename_copy = xstrdup(fileName);
|
filename_copy = xstrdup(fileName);
|
||||||
@ -668,7 +668,7 @@ streamFile(shout_t *shout, const char *fileName)
|
|||||||
printf("%s: streamFile(): Error while reading '%s': %s\n",
|
printf("%s: streamFile(): Error while reading '%s': %s\n",
|
||||||
__progname, fileName, strerror(errno));
|
__progname, fileName, strerror(errno));
|
||||||
else
|
else
|
||||||
retval = 1;;
|
retval = 1;
|
||||||
|
|
||||||
if (popenFlag)
|
if (popenFlag)
|
||||||
pclose(filepstream);
|
pclose(filepstream);
|
||||||
@ -732,7 +732,7 @@ getProgname(const char *argv0)
|
|||||||
return ((char *)"ezstream");
|
return ((char *)"ezstream");
|
||||||
p = strrchr(argv0, '/');
|
p = strrchr(argv0, '/');
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
p = argv0;
|
p = (char *)argv0;
|
||||||
else
|
else
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
## Process this file with automake to produce Makefile.in
|
AUTOMAKE_OPTIONS = 1.9 foreign
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign
|
|
||||||
|
|
||||||
CLEANFILES = core *.core *~ .*~
|
|
||||||
|
|
||||||
EXTRA_DIST = ezstream.dsp ezstream.dsw ezstream.iss
|
EXTRA_DIST = ezstream.dsp ezstream.dsw ezstream.iss
|
||||||
|
|
||||||
|
CLEANFILES = core *.core *~ .*~
|
||||||
|
Loading…
Reference in New Issue
Block a user