ezstream-0.5.6/0000755000175000017500000000000011257756745012501 5ustar tootstootsezstream-0.5.6/m4/0000755000175000017500000000000011257756745013021 5ustar tootstootsezstream-0.5.6/m4/libvorbis.m40000644000175000017500000002402611246572713015247 0ustar tootstootsdnl $Id: libvorbis.m4 16373 2009-08-01 13:46:39Z moritz $ dnl # Check for working installations of libvorbis, libvorbisfile and dnl # libvorbisenc. dnl # Provides appropriate --with configuration options, fills the dnl # VORBIS_CFLAGS, VORBIS_CPPFLAGS, VORBIS_LDFLAGS, LIBVORBIS_LIBS, dnl # LIBVORBISENC_LIBS and LIBVORBISFILE_LIBS variables accordingly. dnl # Copyright (c) 2008, 2009 Moritz Grimm dnl # dnl # Permission to use, copy, modify, and distribute this software for any dnl # purpose with or without fee is hereby granted, provided that the above dnl # copyright notice and this permission notice appear in all copies. dnl # dnl # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES dnl # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF dnl # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR dnl # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES dnl # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN dnl # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF dnl # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dnl # Each of these macros supply VORBIS_CFLAGS, VORBIS_CPPFLAGS and dnl # VORBIS_LDFLAGS. dnl # For LIBVORBIS_LIBS: dnl # AX_CHECK_LIBVORBIS([VORBISLIBS-VERSION], [ACTION-IF-FOUND], dnl # [ACTION-IF-NOT-FOUND]) dnl # For LIBVORBISENC_LIBS: dnl # AX_CHECK_LIBVORBISENC([VORBISLIBS-VERSION], [ACTION-IF-FOUND], dnl # [ACTION-IF-NOT-FOUND]) dnl # For LIBVORBISFILE_LIBS: dnl # AX_CHECK_LIBVORBISFILE([VORBISLIBS-VERSION], [ACTION-IF-FOUND], dnl # [ACTION-IF-NOT-FOUND]) AC_DEFUN([_AX_CHECK_VORBIS_OPTS], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if test -z "${PKG_CONFIG}"; then AC_MSG_ERROR([The pkg-config utility is required.], [1]) fi AC_ARG_VAR([VORBIS_CFLAGS], [C compiler flags for the Vorbis libraries]) AC_ARG_VAR([VORBIS_CPPFLAGS], [C preprocessor flags for the Vorbis libraries]) AC_ARG_VAR([VORBIS_LDFLAGS], [linker flags for the Vorbis libraries]) have_libvorbis_includes="" have_libvorbis_libs="" want_libvorbis="auto" AC_ARG_WITH([libvorbis], [AS_HELP_STRING([--with-libvorbis=PFX], [prefix where the Vorbis library header files and library are installed (default: autodetect)])], [ case "${withval}" in yes) want_libvorbis="yes" ;; no) want_libvorbis="no" ;; *) have_libvorbis_prefix="${withval}" want_libvorbis="yes" ;; esac ] ) AC_ARG_WITH([libvorbis-includes], [AS_HELP_STRING([--with-libvorbis-includes=DIR], [directory where Vorbis library header files are installed (optional)]) ], [ case "${withval}" in yes|no) ;; *) have_libvorbis_includes="${withval}" ;; esac ] ) AC_ARG_WITH([libvorbis-libs], [AS_HELP_STRING([--with-libvorbis-libs=DIR], [directory where the Vorbis libraries are installed (optional)]) ], [ case "${withval}" in yes|no) ;; *) have_libvorbis_libs="${withval}" ;; esac ] ) AC_CACHE_VAL([local_cv_have_lib_libvorbis_opts], [ ax_check_libvorbis_vorbis_pc="no" PKG_CHECK_EXISTS([vorbis], [ax_check_libvorbis_vorbis_pc=yes]) if test -z "${VORBIS_CFLAGS}" \ -a x"${ax_check_libvorbis_vorbis_pc}" = "xyes"; then VORBIS_CFLAGS="`${PKG_CONFIG} --cflags-only-other vorbis`" fi if test -n "${VORBIS_CPPFLAGS}"; then if test -n "${have_libvorbis_includes}"; then VORBIS_CPPFLAGS="${VORBIS_CPPFLAGS} -I${have_libvorbis_includes}" fi else if test -n "${have_libvorbis_includes}"; then VORBIS_CPPFLAGS="-I${have_libvorbis_includes}" else if test x"${want_libvorbis}" = "xauto" \ -a x"${ax_check_libvorbis_vorbis_pc}" = "xyes"; then VORBIS_CPPFLAGS="`${PKG_CONFIG} --cflags-only-I vorbis`" elif test -n "${have_libvorbis_prefix}"; then VORBIS_CPPFLAGS="-I${have_libvorbis_prefix}/include" fi fi fi if test -n "${VORBIS_LDFLAGS}"; then if test -n "${have_libvorbis_libs}"; then VORBIS_LDFLAGS="-L${have_libvorbis_libs} ${VORBIS_LDFLAGS}" fi else if test -n "${have_libvorbis_libs}"; then VORBIS_LDFLAGS="-L${have_libvorbis_libs}" else if test x"${want_libvorbis}" = "xauto" \ -a x"${ax_check_libvorbis_vorbis_pc}" = "xyes"; then VORBIS_LDFLAGS=" \ `${PKG_CONFIG} --libs-only-L vorbis` \ `${PKG_CONFIG} --libs-only-other vorbis` \ " elif test -n "${have_libvorbis_prefix}"; then VORBIS_LDFLAGS="-L${have_libvorbis_prefix}/lib" fi fi fi local_cv_have_lib_libvorbis_opts=yes ]) ]) AC_DEFUN([AX_CHECK_LIBVORBIS], [ AC_REQUIRE([_AX_CHECK_VORBIS_OPTS]) AC_ARG_VAR([LIBVORBIS_LIBS], [libraries to use for libvorbis]) AC_CACHE_VAL([local_cv_have_lib_libvorbis], [ local_cv_have_lib_libvorbis=no if test x"${want_libvorbis}" != "xno"; then # want_libvorbis != no if test -z "${PKG_CONFIG}"; then AC_MSG_ERROR([The pkg-config utility is required.], [1]) fi dnl ####### BEGIN CHECK ###### PKG_CHECK_EXISTS([vorbis $1], [ dnl ########################## libvorbis_libs_autodetect=no if test -z "${LIBVORBIS_LIBS}"; then LIBVORBIS_LIBS="`${PKG_CONFIG} --libs-only-l vorbis`" libvorbis_libs_autodetect=yes fi ax_check_libvorbis_save_CFLAGS="${CFLAGS}" ax_check_libvorbis_save_CPPFLAGS="${CPPFLAGS}" ax_check_libvorbis_save_LDFLAGS="${LDFLAGS}" ax_check_libvorbis_save_LIBS="${LIBS}" AC_LANG_PUSH([C]) CFLAGS="${CFLAGS} ${VORBIS_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${VORBIS_CPPFLAGS}" LDFLAGS="${LDFLAGS} ${VORBIS_LDFLAGS}" LIBS="${LIBVORBIS_LIBS} ${LIBS}" AC_CHECK_HEADER([vorbis/codec.h], [ AC_MSG_CHECKING([if libvorbis works]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #include ]], [[ vorbis_info_init(NULL); ]] )], [ AC_MSG_RESULT([yes]) local_cv_have_lib_libvorbis=yes ], [ AC_MSG_RESULT([no]) ] ) AC_CHECK_TYPE([struct ovectl_ratemanage_arg], [], [AC_MSG_ERROR([These Vorbis libraries are too old, please upgrade.], [1])], [ #include #include #include #include ] ) ]) CFLAGS="${ax_check_libvorbis_save_CFLAGS}" CPPFLAGS="${ax_check_libvorbis_save_CPPFLAGS}" LDFLAGS="${ax_check_libvorbis_save_LDFLAGS}" LIBS="${ax_check_libvorbis_save_LIBS}" AC_LANG_POP([C]) dnl ####### END CHECK ######## ], []) dnl ########################## fi # want_libvorbis != no ]) AC_MSG_CHECKING([for libvorbis $1]) if test x"${local_cv_have_lib_libvorbis}" = "xyes"; then AC_MSG_RESULT([yes]) : $2 else AC_MSG_RESULT([no]) : $3 fi ]) AC_DEFUN([AX_CHECK_LIBVORBISFILE], [ AC_REQUIRE([_AX_CHECK_VORBIS_OPTS]) AC_ARG_VAR([LIBVORBISFILE_LIBS], [libraries to use for libvorbisfile]) AC_CACHE_VAL([local_cv_have_lib_libvorbisfile], [ local_cv_have_lib_libvorbisfile=no if test x"${want_libvorbis}" != "xno"; then # want_libvorbis != no if test -z "${PKG_CONFIG}"; then AC_MSG_ERROR([The pkg-config utility is required.], [1]) fi dnl ####### BEGIN CHECK ###### PKG_CHECK_EXISTS([vorbisfile $1], [ dnl ########################## libvorbisfile_libs_autodetect=no if test -z "${LIBVORBISFILE_LIBS}"; then LIBVORBISFILE_LIBS="`${PKG_CONFIG} --libs-only-l vorbisfile`" libvorbisfile_libs_autodetect=yes fi ax_check_libvorbisfile_save_CFLAGS="${CFLAGS}" ax_check_libvorbisfile_save_CPPFLAGS="${CPPFLAGS}" ax_check_libvorbisfile_save_LDFLAGS="${LDFLAGS}" ax_check_libvorbisfile_save_LIBS="${LIBS}" AC_LANG_PUSH([C]) CFLAGS="${CFLAGS} ${VORBIS_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${VORBIS_CPPFLAGS}" LDFLAGS="${LDFLAGS} ${VORBIS_LDFLAGS}" LIBS="${LIBVORBISFILE_LIBS} ${LIBS}" AC_CHECK_HEADER([vorbis/vorbisfile.h], [ AC_MSG_CHECKING([if libvorbisfile works]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[ ov_open(NULL, NULL, NULL, 0); ]] )], [ AC_MSG_RESULT([yes]) local_cv_have_lib_libvorbisfile=yes ], [ AC_MSG_RESULT([no]) ] ) ]) CFLAGS="${ax_check_libvorbisfile_save_CFLAGS}" CPPFLAGS="${ax_check_libvorbisfile_save_CPPFLAGS}" LDFLAGS="${ax_check_libvorbisfile_save_LDFLAGS}" LIBS="${ax_check_libvorbisfile_save_LIBS}" AC_LANG_POP([C]) dnl ####### END CHECK ######## ], []) dnl ########################## fi # want_libvorbis != no ]) AC_MSG_CHECKING([for libvorbisfile $1]) if test x"${local_cv_have_lib_libvorbisfile}" = "xyes"; then AC_MSG_RESULT([yes]) : $2 else AC_MSG_RESULT([no]) : $3 fi ]) AC_DEFUN([AX_CHECK_LIBVORBISENC], [ AC_REQUIRE([_AX_CHECK_VORBIS_OPTS]) AC_ARG_VAR([LIBVORBISENC_LIBS], [libraries to use for libvorbisenc]) AC_CACHE_VAL([local_cv_have_lib_libvorbisenc], [ local_cv_have_lib_libvorbisenc=no if test x"${want_libvorbis}" != "xno"; then # want_libvorbis != no if test -z "${PKG_CONFIG}"; then AC_MSG_ERROR([The pkg-config utility is required.], [1]) fi dnl ####### BEGIN CHECK ###### PKG_CHECK_EXISTS([vorbisenc $1], [ dnl ########################## libvorbisenc_libs_autodetect=no if test -z "${LIBVORBISENC_LIBS}"; then LIBVORBISENC_LIBS="`${PKG_CONFIG} --libs-only-l vorbisenc`" libvorbisenc_libs_autodetect=yes fi ax_check_libvorbisenc_save_CFLAGS="${CFLAGS}" ax_check_libvorbisenc_save_CPPFLAGS="${CPPFLAGS}" ax_check_libvorbisenc_save_LDFLAGS="${LDFLAGS}" ax_check_libvorbisenc_save_LIBS="${LIBS}" AC_LANG_PUSH([C]) CFLAGS="${CFLAGS} ${VORBIS_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${VORBIS_CPPFLAGS}" LDFLAGS="${LDFLAGS} ${VORBIS_LDFLAGS}" LIBS="${LIBVORBISENC_LIBS} ${LIBS}" AC_CHECK_HEADER([vorbis/vorbisenc.h], [ AC_MSG_CHECKING([if libvorbisenc works]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #include #include ]], [[ vorbis_encode_init(NULL, 0, 0, 0, 0, 0); ]] )], [ AC_MSG_RESULT([yes]) local_cv_have_lib_libvorbisenc=yes ], [ AC_MSG_RESULT([no]) ] ) ]) CFLAGS="${ax_check_libvorbisenc_save_CFLAGS}" CPPFLAGS="${ax_check_libvorbisenc_save_CPPFLAGS}" LDFLAGS="${ax_check_libvorbisenc_save_LDFLAGS}" LIBS="${ax_check_libvorbisenc_save_LIBS}" AC_LANG_POP([C]) dnl ####### END CHECK ######## ], []) dnl ########################## fi # want_libvorbis != no ]) AC_MSG_CHECKING([for libvorbisenc $1]) if test x"${local_cv_have_lib_libvorbisenc}" = "xyes"; then AC_MSG_RESULT([yes]) : $2 else AC_MSG_RESULT([no]) : $3 fi ]) ezstream-0.5.6/m4/vacopy.m40000644000175000017500000000401711246572713014553 0ustar tootstootsdnl # $Id: vacopy.m4 16149 2009-06-21 14:21:32Z moritz $ dnl # Check for means to copy variable argument lists. After this check, dnl # va_copy will at least be defined to something working. dnl # This requires stdarg.h, which is assumed to exist. dnl # Copyright (c) 2008 Moritz Grimm dnl # dnl # Permission to use, copy, modify, and distribute this software for any dnl # purpose with or without fee is hereby granted, provided that the above dnl # copyright notice and this permission notice appear in all copies. dnl # dnl # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES dnl # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF dnl # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR dnl # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES dnl # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN dnl # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF dnl # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dnl # AX_FUNC_VA_COPY AC_DEFUN([AX_FUNC_VA_COPY], [ AC_MSG_CHECKING([for means to copy variable argument lists]) AC_CACHE_VAL([local_ac_cv_func_va_copy], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include ]], [[ va_list ap, ap2; va_copy(ap2, ap); ]])], [local_ac_cv_func_va_copy=va_copy], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include ]], [[ va_list ap, ap2; __va_copy(ap2, ap); ]])], [local_ac_cv_func_va_copy=__va_copy], [local_ac_cv_func_va_copy=memcpy] )] ) ]) AH_TEMPLATE([va_copy], [Define vararg lists copy function if necessary.]) case "${local_ac_cv_func_va_copy}" in va_copy) AC_MSG_RESULT([va_copy]) ;; __va_copy) AC_MSG_RESULT([__va_copy]) AC_DEFINE([va_copy], [__va_copy]) ;; memcpy) AC_MSG_RESULT([memcpy]) AC_DEFINE([va_copy(dst, src)], [memcpy(&(dst), &(src), sizeof(va_list))]) ;; *) dnl Cannot happen unless the cache value is corrupt. ;; esac ]) ezstream-0.5.6/m4/Makefile.am0000644000175000017500000000021411246572713015037 0ustar tootstootsAUTOMAKE_OPTIONS = 1.9 foreign CLEANFILES = core *.core *~ .*~ # Distribute required .m4 files via EXTRA_DIST in the parent Makefile.am. ezstream-0.5.6/m4/Makefile.in0000644000175000017500000002257711246573336015072 0ustar tootstoots# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = m4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ccflags.m4 \ $(top_srcdir)/m4/libshout.m4 $(top_srcdir)/m4/libvorbis.m4 \ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/progname.m4 \ $(top_srcdir)/m4/taglib.m4 $(top_srcdir)/m4/tree.m4 \ $(top_srcdir)/m4/vacopy.m4 $(top_srcdir)/m4/vars.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPAT_INCLUDES = @COMPAT_INCLUDES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXAMPLES_DIR = @EXAMPLES_DIR@ EXEEXT = @EXEEXT@ EZ_CFLAGS = @EZ_CFLAGS@ EZ_CPPFLAGS = @EZ_CPPFLAGS@ EZ_LDFLAGS = @EZ_LDFLAGS@ EZ_LIBS = @EZ_LIBS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHOUT_CFLAGS = @LIBSHOUT_CFLAGS@ LIBSHOUT_CPPFLAGS = @LIBSHOUT_CPPFLAGS@ LIBSHOUT_LDFLAGS = @LIBSHOUT_LDFLAGS@ LIBSHOUT_LIBS = @LIBSHOUT_LIBS@ LIBVORBISFILE_LIBS = @LIBVORBISFILE_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ TAGLIB_CPPFLAGS = @TAGLIB_CPPFLAGS@ TAGLIB_C_LIBS = @TAGLIB_C_LIBS@ TAGLIB_LDFLAGS = @TAGLIB_LDFLAGS@ VERSION = @VERSION@ VORBIS_CFLAGS = @VORBIS_CFLAGS@ VORBIS_CPPFLAGS = @VORBIS_CPPFLAGS@ VORBIS_LDFLAGS = @VORBIS_LDFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9 foreign CLEANFILES = core *.core *~ .*~ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign m4/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign m4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # Distribute required .m4 files via EXTRA_DIST in the parent Makefile.am. # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ezstream-0.5.6/m4/tree.m40000644000175000017500000000343111246572713014210 0ustar tootstootsdnl # $Id: tree.m4 16149 2009-06-21 14:21:32Z moritz $ dnl # Check for sys/tree.h and if it is recent enough by looking at a certain dnl # macro. Defines HAVE_SYS_TREE_H if all conditions are met. dnl # Copyright (c) 2008 Moritz Grimm dnl # dnl # Permission to use, copy, modify, and distribute this software for any dnl # purpose with or without fee is hereby granted, provided that the above dnl # copyright notice and this permission notice appear in all copies. dnl # dnl # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES dnl # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF dnl # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR dnl # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES dnl # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN dnl # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF dnl # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dnl # AX_HEADER_TREE([REQUIRED-MACRO], [ACTION-IF-FOUND], dnl # [ACTION-IF-NOT-FOUND]) AC_DEFUN([AX_HEADER_TREE], [ if test x"$1" = "x"; then _tree_macro="RB_INIT" else _tree_macro=$1 fi AC_MSG_CHECKING([for ${_tree_macro} in sys/tree.h]) AC_CACHE_VAL([local_cv_header_sys_tree_h], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #if !defined(${_tree_macro}) # error Required tree macro missing #endif /* !${_tree_macro} */ ]], [[]])], [local_cv_header_sys_tree_h=yes], [local_cv_header_sys_tree_h=no]) ]) if test x"${local_cv_header_sys_tree_h}" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_SYS_TREE_H], [1], [Define to 1 if you have a sufficiently recent header.]) : $2 else AC_MSG_RESULT([no]) : $3 fi ]) ezstream-0.5.6/m4/ccflags.m40000644000175000017500000000577411246572713014667 0ustar tootstootsdnl # $Id: ccflags.m4 16373 2009-08-01 13:46:39Z moritz $ dnl # * Check if the compiler understands a certain flag or not. dnl # Inspiration for this came from watching TagLib configure. dnl # * Check for the CFLAG required to turn warnings into errors. dnl # Copyright (c) 2008 Moritz Grimm dnl # dnl # Permission to use, copy, modify, and distribute this software for any dnl # purpose with or without fee is hereby granted, provided that the above dnl # copyright notice and this permission notice appear in all copies. dnl # dnl # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES dnl # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF dnl # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR dnl # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES dnl # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN dnl # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF dnl # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dnl # AX_CHECK_CFLAG(CFLAG, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl # AX_CHECK_CXXFLAG(CXXFLAG, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) AC_DEFUN([AX_CHECK_CFLAG], [ AC_MSG_CHECKING([if ${CC} understands -$1]) _cv_sufx_=$(echo $1 | sed 'y|-+,= |_p___|') AC_CACHE_VAL([local_cv_prog_cc_${_cv_sufx_}], [ AC_LANG_PUSH([C]) save_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} -$1" AC_TRY_LINK([], [], [eval "local_cv_prog_cc_${_cv_sufx_}=yes"], [eval "local_cv_prog_cc_${_cv_sufx_}=no"]) CFLAGS="${save_CFLAGS}" AC_LANG_POP([C]) ]) eval "_cache_val_=\${local_cv_prog_cc_${_cv_sufx_}}" if test x"${_cache_val_}" = "xyes"; then AC_MSG_RESULT([yes]) : $2 else AC_MSG_RESULT([no]) : $3 fi ]) AC_DEFUN([AX_CHECK_CXXFLAG], [ AC_MSG_CHECKING([if ${CXX} understands -$1]) _cv_sufx_=$(echo $1 | sed 'y|-+,= |_p___|') AC_CACHE_VAL([local_cv_prog_cxx_${_cv_sufx_}], [ AC_LANG_PUSH([C++]) save_CXXFLAGS="${CXXFLAGS}" CXXFLAGS="${CXXFLAGS} -$1" AC_TRY_LINK([], [], [eval "local_cv_prog_cxx_${_cv_sufx_}=yes"], [eval "local_cv_prog_cxx_${_cv_sufx_}=no"]) CXXFLAGS="${save_CXXFLAGS}" AC_LANG_POP([C++]) ]) eval "_cache_val_=\${local_cv_prog_cxx_${_cv_sufx_}}" if test x"${_cache_val_}" = "xyes"; then AC_MSG_RESULT([yes]) : $2 else AC_MSG_RESULT([no]) : $3 fi ]) AC_DEFUN([AX_CHECK_ERROR_FLAG], [ AC_CACHE_VAL([local_cv_prog_cc_error_flag], [ AC_MSG_CHECKING([if ${CC} supports an error flag]) AC_LANG_PUSH([C]) save_CFLAGS="${CFLAGS}" local_cv_prog_cc_error_flag="-Werror" # GCC CFLAGS="${save_CFLAGS} ${local_cv_prog_cc_error_flag}" AC_TRY_LINK([], [], [], [ local_cv_prog_cc_error_flag="-errwarn" # Sun C CFLAGS="${save_CFLAGS} ${local_cv_prog_cc_error_flag}" AC_TRY_LINK([], [], [], [ local_cv_prog_cc_error_flag=no] )] ) CFLAGS="${save_CFLAGS}" AC_LANG_POP([C]) if test x"${local_cv_prog_cc_error_flag}" != "xno"; then AC_MSG_RESULT([yes (${local_cv_prog_cc_error_flag})]) : $2 else AC_MSG_RESULT([no]) : $3 fi ]) ]) ezstream-0.5.6/m4/vars.m40000644000175000017500000000345511246572713014232 0ustar tootstootsdnl # $Id: vars.m4 16149 2009-06-21 14:21:32Z moritz $ dnl # Append or prepend items to a variable, but keep the items in the dnl # variable unique. dnl # Re-implemented from scratch after seeing XIPH_VAR_[PRE,AP]PEND, written dnl # by Karl Heyes of the Icecast project, in action. The end result turned dnl # out to be quite similar ... dnl # Copyright (c) 2008, 2009 Moritz Grimm dnl # dnl # Permission to use, copy, modify, and distribute this software for any dnl # purpose with or without fee is hereby granted, provided that the above dnl # copyright notice and this permission notice appear in all copies. dnl # dnl # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES dnl # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF dnl # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR dnl # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES dnl # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN dnl # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF dnl # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dnl # AX_UNIQVAR_APPEND([VARIABLE], [ITEM-LIST]) dnl # AX_UNIQVAR_PREPEND([VARIABLE], [ITEM-LIST]) AC_DEFUN([AX_UNIQVAR_APPEND], [ AC_REQUIRE([AC_PROG_FGREP]) for arg in $2 do if `echo " ${$1} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${$1}"; then $1="${arg}" else $1="${$1} ${arg}" fi fi done ]) AC_DEFUN([AX_UNIQVAR_PREPEND], [ AC_REQUIRE([AC_PROG_FGREP]) _prepend_args="" for arg in $2 do _prepend_args="${arg} ${_prepend_args}" done for arg in ${_prepend_args} do if `echo " ${$1} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${$1}"; then $1="${arg}" else $1="${arg} ${$1}" fi fi done ]) ezstream-0.5.6/m4/taglib.m40000644000175000017500000002010011246572713014503 0ustar tootstootsdnl # $Id: taglib.m4 16382 2009-08-01 16:32:14Z moritz $ dnl # Check for working installations of TagLib and its C-wrapper library, dnl # libtag_c. dnl # Provides appropriate --with configuration options, fills the dnl # TAGLIB_CFLAGS, TAGLIB_CPPFLAGS, TAGLIB_LDFLAGS, TAGLIB_LIBS and dnl # TAGLIB_C_LIBS variables accordingly. dnl # Copyright (c) 2008, 2009 Moritz Grimm dnl # dnl # Permission to use, copy, modify, and distribute this software for any dnl # purpose with or without fee is hereby granted, provided that the above dnl # copyright notice and this permission notice appear in all copies. dnl # dnl # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES dnl # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF dnl # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR dnl # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES dnl # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN dnl # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF dnl # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dnl # Both check functions provide TAGLIB_CPPFLAGS and TAGLIB_LDFLAGS. dnl # For TAGLIB_LIBS: dnl # AX_CHECK_TAGLIB([TAGLIB-VERSION], [ACTION-IF-FOUND], dnl # [ACTION-IF-NOT-FOUND]) dnl # For TAGLIB_C_LIBS: dnl # AX_CHECK_TAGLIB_C([TAGLIB-VERSION], [ACTION-IF-FOUND], dnl # [ACTION-IF-NOT-FOUND]) AC_DEFUN([_AX_CHECK_TAGLIB_OPTS], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if test -z "${PKG_CONFIG}"; then AC_MSG_ERROR([The pkg-config utility is required.], [1]) fi AC_ARG_VAR([TAGLIB_CFLAGS], [C compiler flags for TagLib]) AC_ARG_VAR([TAGLIB_CPPFLAGS], [C preprocessor flags for TagLib]) AC_ARG_VAR([TAGLIB_LDFLAGS], [linker flags for TagLib]) have_taglib_includes="" have_taglib_libs="" want_taglib="auto" AC_ARG_WITH([taglib], [AS_HELP_STRING([--with-taglib=PFX], [prefix where the TagLib header files and library are installed (default: autodetect)])], [ case "${withval}" in yes) want_taglib="yes" ;; no) want_taglib="no" ;; *) have_taglib_prefix="${withval}" want_taglib="yes" ;; esac ] ) AC_ARG_WITH([taglib-includes], [AS_HELP_STRING([--with-taglib-includes=DIR], [directory where TagLib header files are installed (optional)]) ], [ case "${withval}" in yes|no) ;; *) have_taglib_includes="${withval}" ;; esac ] ) AC_ARG_WITH([taglib-libs], [AS_HELP_STRING([--with-taglib-libs=DIR], [directory where TagLib is installed (optional)]) ], [ case "${withval}" in yes|no) ;; *) have_taglib_libs="${withval}" ;; esac ] ) AC_CACHE_VAL([local_cv_have_lib_taglib_opts], [ ax_check_taglib_taglib_pc="no" PKG_CHECK_EXISTS([taglib], [ax_check_taglib_taglib_pc=yes]) if test -z "${TAGLIB_CFLAGS}" \ -a x"${ax_check_taglib_taglib_pc}" = "xyes"; then TAGLIB_CFLAGS="`${PKG_CONFIG} --cflags-only-other taglib`" fi if test -n "${TAGLIB_CPPFLAGS}"; then if test -n "${have_taglib_includes}"; then TAGLIB_CPPFLAGS="${TAGLIB_CPPFLAGS} -I${have_taglib_includes}" fi else if test -n "${have_taglib_includes}"; then TAGLIB_CPPFLAGS="-I${have_taglib_includes}" else if test x"${want_taglib}" = "xauto" \ -a x"${ax_check_taglib_taglib_pc}" = "xyes"; then TAGLIB_CPPFLAGS="`${PKG_CONFIG} --cflags-only-I taglib`" elif test -n "${have_taglib_prefix}"; then TAGLIB_CPPFLAGS="-I${have_taglib_prefix}/include/taglib" fi fi fi if test -n "${TAGLIB_LDFLAGS}"; then if test -n "${have_taglib_libs}"; then TAGLIB_LDFLAGS="-L${have_taglib_libs} ${TAGLIB_LDFLAGS}" fi else if test -n "${have_taglib_libs}"; then TAGLIB_LDFLAGS="-L${have_taglib_libs}" else if test x"${want_taglib}" = "xauto" \ -a x"${ax_check_taglib_taglib_pc}" = "xyes"; then TAGLIB_LDFLAGS=" \ `${PKG_CONFIG} --libs-only-L taglib` \ `${PKG_CONFIG} --libs-only-other taglib` \ " elif test -n "${have_taglib_prefix}"; then TAGLIB_LDFLAGS="-L${have_taglib_prefix}/lib" fi fi fi local_cv_have_lib_taglib_opts=yes ]) ]) AC_DEFUN([AX_CHECK_TAGLIB], [ AC_REQUIRE([_AX_CHECK_TAGLIB_OPTS]) AC_ARG_VAR([TAGLIB_LIBS], [libraries to use for TagLib]) AC_CACHE_VAL([local_cv_have_lib_taglib], [ local_cv_have_lib_taglib=no if test x"${want_taglib}" != "xno"; then # want_taglib != no if test -z "${PKG_CONFIG}"; then AC_MSG_ERROR([The pkg-config utility is required.], [1]) fi dnl ####### BEGIN CHECK ###### PKG_CHECK_EXISTS([taglib $1], [ dnl ########################## libtag_libs_autodetected=no if test -z "${TAGLIB_LIBS}"; then TAGLIB_LIBS="`${PKG_CONFIG} --libs-only-l taglib`" libtag_libs_autodetected=yes fi ax_check_taglib_save_CXXFLAGS="${CXXFLAGS}" ax_check_taglib_save_CPPFLAGS="${CPPFLAGS}" ax_check_taglib_save_LDFLAGS="${LDFLAGS}" ax_check_taglib_save_LIBS="${LIBS}" AC_LANG_PUSH([C++]) CXXFLAGS="${CXXFLAGS} ${TAGLIB_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${TAGLIB_CPPFLAGS}" LDFLAGS="${LDFLAGS} ${TAGLIB_LDFLAGS}" LIBS="${TAGLIB_LIBS} ${LIBS}" AC_CHECK_HEADER([tag.h], [ AC_MSG_CHECKING([if TagLib works]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[ TagLib::FileRef f(static_cast(NULL)); ]] )], [ AC_MSG_RESULT([yes]) local_cv_have_lib_taglib=yes ], [ AC_MSG_RESULT([no]) LIBS="${LIBS} -lstdc++ -lz" TAGLIB_LIBS="${TAGLIB_LIBS} -lstdc++ -lz" AC_MSG_CHECKING([if TagLib works with -lstdc++ -lz]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[ TagLib::FileRef f(static_cast(NULL)); ]] )], [ AC_MSG_RESULT([yes]) local_cv_have_lib_taglib=yes ], [ AC_MSG_RESULT([no]) ] ) ] ) ]) CXXFLAGS="${ax_check_taglib_save_CXXFLAGS}" CPPFLAGS="${ax_check_taglib_save_CPPFLAGS}" LDFLAGS="${ax_check_taglib_save_LDFLAGS}" LIBS="${ax_check_taglib_save_LIBS}" AC_LANG_POP([C++]) dnl ####### END CHECK ######## ], []) dnl ########################## fi # want_taglib != no ]) AC_MSG_CHECKING([for TagLib]) if test x"${local_cv_have_lib_taglib}" = "xyes"; then AC_MSG_RESULT([yes]) : $2 else AC_MSG_RESULT([no]) : $3 fi ]) AC_DEFUN([AX_CHECK_TAGLIB_C], [ AC_REQUIRE([_AX_CHECK_TAGLIB_OPTS]) AC_ARG_VAR([TAGLIB_C_LIBS], [libraries to use for the TagLib C wrapper]) AC_CACHE_VAL([local_cv_have_lib_taglib_c], [ local_cv_have_lib_taglib_c=no if test x"${want_taglib}" != "xno"; then # want_taglib != no if test -z "${PKG_CONFIG}"; then AC_MSG_ERROR([The pkg-config utility is required.], [1]) fi dnl ####### BEGIN CHECK ###### PKG_CHECK_EXISTS([taglib_c $1], [ dnl ########################## if test -z "${TAGLIB_C_LIBS}"; then TAGLIB_C_LIBS="-ltag_c" fi ax_check_taglib_c_save_CFLAGS="${CFLAGS}" ax_check_taglib_c_save_CPPFLAGS="${CPPFLAGS}" ax_check_taglib_c_save_LDFLAGS="${LDFLAGS}" ax_check_taglib_c_save_LIBS="${LIBS}" AC_LANG_PUSH([C]) CFLAGS="${CFLAGS} ${TAGLIB_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${TAGLIB_CPPFLAGS}" LDFLAGS="${LDFLAGS} ${TAGLIB_LDFLAGS}" LIBS="${TAGLIB_C_LIBS} ${LIBS}" AC_CHECK_HEADER([tag_c.h], [ AC_MSG_CHECKING([if libtag_c works]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include ]], [[ taglib_set_string_management_enabled(0); ]] )], [ AC_MSG_RESULT([yes]) local_cv_have_lib_taglib_c=yes ], [ AC_MSG_RESULT([no]) LIBS="${LIBS} -ltag -lstdc++ -lz" TAGLIB_C_LIBS="${TAGLIB_C_LIBS} -ltag -lstdc++ -lz" AC_MSG_CHECKING([if libtag_c works with -ltag -lstdc++ -lz]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include ]], [[ taglib_set_string_management_enabled(0); ]] )], [ AC_MSG_RESULT([yes]) local_cv_have_lib_taglib_c=yes ], [ AC_MSG_RESULT([no]) ] ) ] ) ]) CFLAGS="${ax_check_taglib_c_save_CFLAGS}" CPPFLAGS="${ax_check_taglib_c_save_CPPFLAGS}" LDFLAGS="${ax_check_taglib_c_save_LDFLAGS}" LIBS="${ax_check_taglib_c_save_LIBS}" AC_LANG_POP([C]) dnl ####### END CHECK ######## ], []) dnl ########################## fi # want_taglib != no ]) AC_MSG_CHECKING([for libtag_c]) if test x"${local_cv_have_lib_taglib_c}" = "xyes"; then AC_MSG_RESULT([yes]) : $2 else AC_MSG_RESULT([no]) : $3 fi ]) ezstream-0.5.6/m4/progname.m40000644000175000017500000000331011246572713015055 0ustar tootstootsdnl # $Id: progname.m4 16149 2009-06-21 14:21:32Z moritz $ dnl # Check whether libc defines __progname. Defines HAVE___PROGNAME, if dnl # applicable. This check is heavily inspired by the one in OpenNTPd dnl # (portable.) dnl # Copyright (c) 2008 Moritz Grimm dnl # dnl # Permission to use, copy, modify, and distribute this software for any dnl # purpose with or without fee is hereby granted, provided that the above dnl # copyright notice and this permission notice appear in all copies. dnl # dnl # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES dnl # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF dnl # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR dnl # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES dnl # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN dnl # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF dnl # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dnl # AX_CHECK___PROGNAME([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) AC_DEFUN([AX_CHECK___PROGNAME], [ AC_MSG_CHECKING([whether libc defines __progname]) AC_CACHE_VAL([local_cv_libc_defines___progname], [ AC_LANG_PUSH([C]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include ]], [[ extern char *__progname; printf("%s", __progname); ]])], [local_cv_libc_defines___progname=yes], [local_cv_libc_defines___progname=no] ) AC_LANG_POP([C]) ]) if test x"${local_cv_libc_defines___progname}" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([HAVE___PROGNAME], [1], [Define whether libc defines __progname.]) : $1 else AC_MSG_RESULT([no]) : $2 fi ]) ezstream-0.5.6/m4/libxml2.m40000644000175000017500000001404511246572713014625 0ustar tootstootsdnl # $Id: libxml2.m4 16378 2009-08-01 16:01:44Z moritz $ dnl # Check for a working installation of libxml (version 2.) dnl # Provides appropriate --with configuration options, fills the dnl # LIBXML2_CFLAGS, LIBXML2_CPPFLAGS, LIBXML2_LDFLAGS and LIBXML2_LIBS dnl # variables accordingly. dnl # Copyright (c) 2008, 2009 Moritz Grimm dnl # dnl # Permission to use, copy, modify, and distribute this software for any dnl # purpose with or without fee is hereby granted, provided that the above dnl # copyright notice and this permission notice appear in all copies. dnl # dnl # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES dnl # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF dnl # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR dnl # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES dnl # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN dnl # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF dnl # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dnl # For LIBXML2_CFLAGS, LIBXML2_CPPFLAGS, LIBXML2_LDFLAGS and LIBXML2_LIBS: dnl # AX_CHECK_LIBXML2([LIBXML2-VERSION], [ACTION-IF-FOUND], dnl # [ACTION-IF-NOT-FOUND]) AC_DEFUN([_AX_CHECK_LIBXML2_OPTS], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if test -z "${PKG_CONFIG}"; then AC_MSG_ERROR([The pkg-config utility is required.], [1]) fi AC_ARG_VAR([LIBXML2_CFLAGS], [C compiler flags for libxml2]) AC_ARG_VAR([LIBXML2_CPPFLAGS], [C preprocessor flags for libxml2]) AC_ARG_VAR([LIBXML2_LDFLAGS], [linker flags for libxml2]) have_libxml2_includes="" have_libxml2_libs="" want_libxml2="auto" AC_ARG_WITH([libxml2], [AS_HELP_STRING([--with-libxml2=PFX], [prefix where the libxml2 header files and library are installed (default: autodetect)])], [ case "${withval}" in yes) want_libxml2="yes" ;; no) want_libxml2="no" ;; *) have_libxml2_prefix="${withval}" want_libxml2="yes" ;; esac ] ) AC_ARG_WITH([libxml2-includes], [AS_HELP_STRING([--with-libxml2-includes=DIR], [directory where libxml2 header files are installed (optional)]) ], [ case "${withval}" in yes|no) ;; *) have_libxml2_includes="${withval}" ;; esac ] ) AC_ARG_WITH([libxml2-libs], [AS_HELP_STRING([--with-libxml2-libs=DIR], [directory where libxml2 is installed (optional)]) ], [ case "${withval}" in yes|no) ;; *) have_libxml2_libs="${withval}" ;; esac ] ) AC_CACHE_VAL([local_cv_have_lib_libxml2_opts], [ ax_check_libxml2_xml2_pc="no" PKG_CHECK_EXISTS([libxml-2.0], [ax_check_libxml2_xml2_pc=yes]) if test -z "${LIBXML2_CFLAGS}" \ -a x"${ax_check_libxml2_xml2_pc}" = "xyes"; then LIBXML2_CFLAGS="`${PKG_CONFIG} --cflags-only-other libxml-2.0`" fi if test -n "${LIBXML2_CPPFLAGS}"; then if test -n "${have_libxml2_includes}"; then LIBXML2_CPPFLAGS="${LIBXML2_CPPFLAGS} -I${have_libxml2_includes}" fi else if test -n "${have_libxml2_includes}"; then LIBXML2_CPPFLAGS="-I${have_libxml2_includes}" else if test x"${want_libxml2}" = "xauto" \ -a x"${ax_check_libxml2_xml2_pc}" = "xyes"; then LIBXML2_CPPFLAGS="`${PKG_CONFIG} --cflags-only-I libxml-2.0`" elif test -n "${have_libxml2_prefix}"; then LIBXML2_CPPFLAGS="-I${have_libxml2_prefix}/include" fi fi fi if test -n "${LIBXML2_LDFLAGS}"; then if test -n "${have_libxml2_libs}"; then LIBXML2_LDFLAGS="-L${have_libxml2_libs} ${LIBXML2_LDFLAGS}" fi else if test -n "${have_libxml2_libs}"; then LIBXML2_LDFLAGS="-L${have_libxml2_libs}" else if test x"${want_libxml2}" = "xauto" \ -a x"${ax_check_libxml2_xml2_pc}" = "xyes"; then LIBXML2_LDFLAGS=" \ `${PKG_CONFIG} --libs-only-L libxml-2.0` \ `${PKG_CONFIG} --libs-only-other libxml-2.0` \ " elif test -n "${have_libxml2_prefix}"; then LIBXML2_LDFLAGS="-L${have_libxml2_prefix}/lib" fi fi fi local_cv_have_lib_libxml2_opts=yes ]) ]) AC_DEFUN([AX_CHECK_LIBXML2], [ AC_REQUIRE([_AX_CHECK_LIBXML2_OPTS]) AC_ARG_VAR([LIBXML2_LIBS], [libraries to use for libxml2]) AC_CACHE_VAL([local_cv_have_lib_libxml2], [ local_cv_have_lib_libxml2=no if test x"${want_libxml2}" != "xno"; then # want_libxml2 != no if test -z "${PKG_CONFIG}"; then AC_MSG_ERROR([The pkg-config utility is required.], [1]) fi dnl ####### BEGIN CHECK ###### PKG_CHECK_EXISTS([libxml-2.0 $1], [ dnl ########################## libxml2_libs_autodetect=no if test -z "${LIBXML2_LIBS}"; then LIBXML2_LIBS="`${PKG_CONFIG} --libs-only-l libxml-2.0`" libxml2_libs_autodetect=yes fi ax_check_libxml2_save_CFLAGS="${CFLAGS}" ax_check_libxml2_save_CPPFLAGS="${CPPFLAGS}" ax_check_libxml2_save_LDFLAGS="${LDFLAGS}" ax_check_libxml2_save_LIBS="${LIBS}" AC_LANG_PUSH([C]) CFLAGS="${CFLAGS} ${LIBXML2_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${LIBXML2_CPPFLAGS}" LDFLAGS="${LDFLAGS} ${LIBXML2_LDFLAGS}" LIBS="${LIBXML2_LIBS} ${LIBS}" AC_CHECK_HEADER([libxml/parser.h], [ AC_MSG_CHECKING([if libxml2 works]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[ xmlParseFile(NULL); ]])], [ AC_MSG_RESULT([yes]) local_cv_have_lib_libxml2=yes ], [ AC_MSG_RESULT([no]) if test x"${libxml2_libs_autodetect}" = "xyes"; then LIBXML2_LIBS="`${PKG_CONFIG} --static --libs-only-l libxml-2.0`" LIBS="${LIBXML2_LIBS} ${ax_check_libxml2_save_LIBS}" AC_MSG_CHECKING([if libxml2 works with explicit dependencies]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[ xmlParseFile(NULL); ]])], [ AC_MSG_RESULT([yes]) local_cv_have_lib_libxml2=yes ], [ AC_MSG_RESULT([no]) ] ) fi ] ) ]) CFLAGS="${ax_check_libxml2_save_CFLAGS}" CPPFLAGS="${ax_check_libxml2_save_CPPFLAGS}" LDFLAGS="${ax_check_libxml2_save_LDFLAGS}" LIBS="${ax_check_libxml2_save_LIBS}" AC_LANG_POP([C]) dnl ####### END CHECK ######## ], []) dnl ########################## fi # want_libxml2 != no ]) AC_MSG_CHECKING([for libxml2 $1]) if test x"${local_cv_have_lib_libxml2}" = "xyes"; then AC_MSG_RESULT([yes]) : $2 else AC_MSG_RESULT([no]) : $3 fi ]) ezstream-0.5.6/m4/libshout.m40000644000175000017500000001464011246572713015106 0ustar tootstootsdnl # $Id: libshout.m4 16380 2009-08-01 16:08:45Z moritz $ dnl # Check for a working installation of libshout. dnl # Provides appropriate --with configuration options, fills the dnl # LIBSHOUT_CFLAGS, LIBSHOUT_CPPFLAGS, LIBSHOUT_LDFLAGS and LIBSHOUT_LIBS dnl # variables accordingly. dnl # Copyright (c) 2009 Moritz Grimm dnl # dnl # Permission to use, copy, modify, and distribute this software for any dnl # purpose with or without fee is hereby granted, provided that the above dnl # copyright notice and this permission notice appear in all copies. dnl # dnl # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES dnl # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF dnl # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR dnl # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES dnl # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN dnl # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF dnl # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dnl # For LIBSHOUT_CFLAGS, LIBSHOUT_CPPFLAGS, LIBSHOUT_LDFLAGS and dnl # LIBSHOUT_LIBS: dnl # AX_CHECK_LIBSHOUT([LIBSHOUT-VERSION], [ACTION-IF-FOUND], dnl # [ACTION-IF-NOT-FOUND]) AC_DEFUN([_AX_CHECK_LIBSHOUT_OPTS], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if test -z "${PKG_CONFIG}"; then AC_MSG_ERROR([The pkg-config utility is required.], [1]) fi AC_ARG_VAR([LIBSHOUT_CFLAGS], [C compiler flags for libshout]) AC_ARG_VAR([LIBSHOUT_CPPFLAGS], [C preprocessor flags for libshout]) AC_ARG_VAR([LIBSHOUT_LDFLAGS], [linker flags for libshout]) have_libshout_includes="" have_libshout_libs="" want_libshout="auto" AC_ARG_WITH([libshout], [AS_HELP_STRING([--with-libshout=PFX], [prefix where the libshout header files and library are installed (default: autodetect)])], [ case "${withval}" in yes) want_libshout="yes" ;; no) want_libshout="no" ;; *) have_libshout_prefix="${withval}" want_libshout="yes" ;; esac ] ) AC_ARG_WITH([libshout-includes], [AS_HELP_STRING([--with-libshout-includes=DIR], [directory where libshout header files are installed (optional)]) ], [ case "${withval}" in yes|no) ;; *) have_libshout_includes="${withval}" ;; esac ] ) AC_ARG_WITH([libshout-libs], [AS_HELP_STRING([--with-libshout-libs=DIR], [directory where libshout is installed (optional)]) ], [ case "${withval}" in yes|no) ;; *) have_libshout_libs="${withval}" ;; esac ] ) AC_CACHE_VAL([local_cv_have_lib_libshout_opts], [ ax_check_libshout_shout_pc="no" PKG_CHECK_EXISTS([shout], [ax_check_libshout_shout_pc=yes]) if test -z "${LIBSHOUT_CFLAGS}" \ -a x"${ax_check_libshout_shout_pc}" = "xyes"; then LIBSHOUT_CFLAGS="`${PKG_CONFIG} --cflags-only-other shout`" fi if test -n "${LIBSHOUT_CPPFLAGS}"; then if test -n "${have_libshout_includes}"; then LIBSHOUT_CPPFLAGS="${LIBSHOUT_CPPFLAGS} -I${have_libshout_includes}" fi else if test -n "${have_libshout_includes}"; then LIBSHOUT_CPPFLAGS="-I${have_libshout_includes}" else if test x"${want_libshout}" = "xauto" \ -a x"${ax_check_libshout_shout_pc}" = "xyes"; then LIBSHOUT_CPPFLAGS="`${PKG_CONFIG} --cflags-only-I shout`" elif test -n "${have_libshout_prefix}"; then LIBSHOUT_CPPFLAGS="-I${have_libshout_prefix}/include" fi fi fi if test -n "${LIBSHOUT_LDFLAGS}"; then if test -n "${have_libshout_libs}"; then LIBSHOUT_LDFLAGS="-L${have_libshout_libs} ${LIBSHOUT_LDFLAGS}" fi else if test -n "${have_libshout_libs}"; then LIBSHOUT_LDFLAGS="-L${have_libshout_libs}" else if test x"${want_libshout}" = "xauto" \ -a x"${ax_check_libshout_shout_pc}" = "xyes"; then LIBSHOUT_LDFLAGS=" \ `${PKG_CONFIG} --libs-only-L shout` \ `${PKG_CONFIG} --libs-only-other shout` \ " elif test -n "${have_libshout_prefix}"; then LIBSHOUT_LDFLAGS="-L${have_libshout_prefix}/lib" fi fi fi local_cv_have_lib_libshout_opts=yes ]) ]) AC_DEFUN([AX_CHECK_LIBSHOUT], [ AC_REQUIRE([_AX_CHECK_LIBSHOUT_OPTS]) AC_REQUIRE([AC_PROG_FGREP]) AC_ARG_VAR([LIBSHOUT_LIBS], [libraries to use for libshout]) AC_CACHE_VAL([local_cv_have_lib_libshout], [ local_cv_have_lib_libshout=no if test x"${want_libshout}" != "xno"; then # want_libshout != no if test -z "${PKG_CONFIG}"; then AC_MSG_ERROR([The pkg-config utility is required.], [1]) fi if test -n "$1" -a x"${ax_check_libshout_shout_pc}" = "xyes"; then PKG_CHECK_EXISTS([shout $1], [], [AC_MSG_ERROR([libshout version $1 is required.], [1])] ) fi libshout_libs_autodetect=no if test -z "${LIBSHOUT_LIBS}" \ -a x"${ax_check_libshout_shout_pc}" = "xyes"; then LIBSHOUT_LIBS="`${PKG_CONFIG} --libs-only-l shout`" libshout_libs_autodetect=yes fi # If libshout required libm, make sure that it is listed at the end: if test x"${libshout_libs_autodetect}" = x"yes"; then if test -n "`echo ${LIBSHOUT_LIBS} | ${FGREP} -e ' -lm'`"; then xt_shout_TEMP="`echo ${LIBSHOUT_LIBS} | sed -e 's, -lm,,g'`" LIBSHOUT_LIBS="${xt_shout_TEMP} -lm" fi fi ax_check_libshout_save_CFLAGS="${CFLAGS}" ax_check_libshout_save_CPPFLAGS="${CPPFLAGS}" ax_check_libshout_save_LDFLAGS="${LDFLAGS}" ax_check_libshout_save_LIBS="${LIBS}" AC_LANG_PUSH([C]) CFLAGS="${CFLAGS} ${LIBSHOUT_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${LIBSHOUT_CPPFLAGS}" LDFLAGS="${LDFLAGS} ${LIBSHOUT_LDFLAGS}" LIBS="${LIBSHOUT_LIBS} ${LIBS}" AC_CHECK_HEADER([shout/shout.h], [ AC_MSG_CHECKING([if libshout works]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include ]], [[ shout_new(); ]] )], [ AC_MSG_RESULT([yes]) local_cv_have_lib_libshout=yes ], [ AC_MSG_RESULT([no]) if test x"${libshout_libs_autodetect}" = "xyes"; then LIBSHOUT_LIBS="`${PKG_CONFIG} --static --libs-only-l shout`" LIBS="${LIBSHOUT_LIBS} ${ax_check_libshout_save_LIBS}" AC_MSG_CHECKING([if libshout works with explicit dependencies]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include ]], [[ shout_new(); ]])], [ AC_MSG_RESULT([yes]) local_cv_have_lib_libshout=yes ], [ AC_MSG_RESULT([no]) ] ) fi ] ) ]) CFLAGS="${ax_check_libshout_save_CFLAGS}" CPPFLAGS="${ax_check_libshout_save_CPPFLAGS}" LDFLAGS="${ax_check_libshout_save_LDFLAGS}" LIBS="${ax_check_libshout_save_LIBS}" AC_LANG_POP([C]) fi # want_libshout != no ]) AC_MSG_CHECKING([for libshout $1]) if test x"${local_cv_have_lib_libshout}" = "xyes"; then AC_MSG_RESULT([yes]) : $2 else AC_MSG_RESULT([no]) : $3 fi ]) ezstream-0.5.6/doc/0000755000175000017500000000000011257756745013246 5ustar tootstootsezstream-0.5.6/doc/Makefile.am0000644000175000017500000000063211246572743015273 0ustar tootstootsAUTOMAKE_OPTIONS = 1.9 foreign man_MANS = ezstream.1 ezstream-file.sh.1 do_subst = sed \ -e 's|!!EXAMPLES_DIR!!|@EXAMPLES_DIR@|g' .PHONY: $(man_MANS) ezstream.1: ezstream.1.in Makefile $(do_subst) < $(builddir)/ezstream.1.in > ezstream.1 ezstream-file.sh.1: ezstream-file.sh.1.in Makefile $(do_subst) < $(builddir)/ezstream-file.sh.1.in > ezstream-file.sh.1 CLEANFILES = *~ *.core core $(man_MANS) ezstream-0.5.6/doc/Makefile.in0000644000175000017500000002736311246573336015315 0ustar tootstoots# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/ezstream-file.sh.1.in.in $(srcdir)/ezstream.1.in.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ccflags.m4 \ $(top_srcdir)/m4/libshout.m4 $(top_srcdir)/m4/libvorbis.m4 \ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/progname.m4 \ $(top_srcdir)/m4/taglib.m4 $(top_srcdir)/m4/tree.m4 \ $(top_srcdir)/m4/vacopy.m4 $(top_srcdir)/m4/vars.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = ezstream-file.sh.1.in ezstream.1.in SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPAT_INCLUDES = @COMPAT_INCLUDES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXAMPLES_DIR = @EXAMPLES_DIR@ EXEEXT = @EXEEXT@ EZ_CFLAGS = @EZ_CFLAGS@ EZ_CPPFLAGS = @EZ_CPPFLAGS@ EZ_LDFLAGS = @EZ_LDFLAGS@ EZ_LIBS = @EZ_LIBS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHOUT_CFLAGS = @LIBSHOUT_CFLAGS@ LIBSHOUT_CPPFLAGS = @LIBSHOUT_CPPFLAGS@ LIBSHOUT_LDFLAGS = @LIBSHOUT_LDFLAGS@ LIBSHOUT_LIBS = @LIBSHOUT_LIBS@ LIBVORBISFILE_LIBS = @LIBVORBISFILE_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ TAGLIB_CPPFLAGS = @TAGLIB_CPPFLAGS@ TAGLIB_C_LIBS = @TAGLIB_C_LIBS@ TAGLIB_LDFLAGS = @TAGLIB_LDFLAGS@ VERSION = @VERSION@ VORBIS_CFLAGS = @VORBIS_CFLAGS@ VORBIS_CPPFLAGS = @VORBIS_CPPFLAGS@ VORBIS_LDFLAGS = @VORBIS_LDFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9 foreign man_MANS = ezstream.1 ezstream-file.sh.1 do_subst = sed \ -e 's|!!EXAMPLES_DIR!!|@EXAMPLES_DIR@|g' CLEANFILES = *~ *.core core $(man_MANS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ezstream-file.sh.1.in: $(top_builddir)/config.status $(srcdir)/ezstream-file.sh.1.in.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ezstream.1.in: $(top_builddir)/config.status $(srcdir)/ezstream.1.in.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $$i; then file=$$i; \ else file=$(srcdir)/$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-man1 install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-man uninstall-man1 .PHONY: $(man_MANS) ezstream.1: ezstream.1.in Makefile $(do_subst) < $(builddir)/ezstream.1.in > ezstream.1 ezstream-file.sh.1: ezstream-file.sh.1.in Makefile $(do_subst) < $(builddir)/ezstream-file.sh.1.in > ezstream-file.sh.1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ezstream-0.5.6/doc/ezstream.1.in.in0000644000175000017500000004272611246572743016177 0ustar tootstoots.\" $Id: ezstream.1.in.in 16537 2009-08-30 21:55:24Z moritz $ .\" .\" Copyright (c) 2007, 2009 Moritz Grimm .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License version 2 as .\" published by the Free Software Foundation. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA .\" .Dd @BUILD_DATE@ .Dt EZSTREAM 1 .Os @PACKAGE_NAME@ @PACKAGE_VERSION@ .Sh NAME .Nm ezstream .Nd source client for Icecast with external de-/encoder support .Sh SYNOPSIS .Nm .Bk -words .Op Fl hnqVv .Fl c Ar configfile .Ek .Nm .Bk -words .Fl s .Op Ar playlist .Ek .Sh DESCRIPTION The .Nm utility is a source client for the Icecast media streaming server. In its basic mode of operation, it streams media files and data from standard input .Qq as-is \(em such as Ogg Vorbis, Ogg Theora and MP3 \(em to a server. It can also use various external decoders and encoders to re-encode from one format to another, and stream the result. The only requirement is that the external programs support writing to or reading from standard input, and can be used from the command line. .Ss Command line parameters .Bl -tag -width Ds .It Fl c Ar configfile Use the XML configuration in .Ar configfile . .It Fl h Print a summary of available command line parameters with short descriptions and exit. .It Fl n Normalize metadata strings by removing excess whitespaces. .It Fl q Be more quiet. Suppress the output that external programs send to standard error. .It Fl s Op Ar playlist Run .Nm as a line-based shuffling utility. If no .Ar playlist argument is given, a list of media file names is read from standard input instead of an input file. After successfully reading the entire list, it is shuffled and printed to standard output, and .Nm will exit. .It Fl V Print the .Nm version number and exit. .It Fl v Produce more verbose output from .Nm . Use twice for even more verbose output. .El .Pp When the .Fl q and .Fl v parameters are provided simultaneously, an additional line of information about the currently streamed file \(em playlist position, approximate playing time and bit rate \(em is displayed. .Ss Runtime control On POSIX systems, .Nm offers limited runtime control via signals. By sending a signal to the ezstream process, e.g. with the .Xr kill 1 utility, a certain action will be triggered. .Bl -tag -width -Ds .It Cd SIGHUP Rereads the playlist file after the track that is currently streamed. If the playlist is not to be shuffled, .Nm attempts to find the previously streamed file and continue with the one following it, or restarts from the beginning of the list otherwise. .It Cd SIGUSR1 Skips the currently playing track and moves on to the next in playlist mode, or restarts the current track when streaming a single file. .It Cd SIGUSR2 Triggers rereading of metadata for the stream by running the program or script specified in .Li \& .Pq see below. This is the only meaningful signal when streaming from standard input. .El .Pp .Sh CONFIGURATION FILE SYNTAX The .Nm utility uses a simple XML configuration file format. It has a tree-like structure and is made up of .Em XML elements . Of all the possible XML features, only regular elements that contain text or other elements, and comments, appear in an .Nm configuration file. .Pp Each element in the configuration file consists of a .Em start tag , its content and an .Em end tag . For example: .Pp .Dl \&playlist.m3u<\&/filename\&> .Dl \&<\&!-- XML comments look like this. --\&> .Sh XML CONFIGURATION In this section, each available element is listed and described. Note that for this purpose, elements are introduced in their short, i.e. empty form. In the configuration file, they need to be used as .Em start tag + content + end tag , like in the introductory example shown above. .Ss Root element .Bl -tag -width -Ds .It Sy \& .Pq Mandatory. The configuration file's root element. It contains all other configuration elements. .El .Ss Global configuration elements Each of the global configuration elements have the .Li \& element as their parent. .Bl -tag -width -Ds .It Sy \& .Pq Mandatory. Specifies the location and mount point of the Icecast server, to which the stream will be sent. The content must be of the form .Pa http://server:port/mountpoint For example: .Pp .Dl \&http://example.com:8000/stream.ogg\& .It Sy \& .Pq Optional. Sets the source username for authentication with the Icecast server. The default user .Po usually .Dq Li source .Pc is used if this element is not provided. .It Sy \& .Pq Mandatory. Sets the source password for authentication with the Icecast server. .It Sy \& .Pq Mandatory. This element has two different meanings, depending on whether re-encoding is enabled or not. It specifies the .Em output format of the stream if re-encoding is enabled. Otherwise, it specifies the .Em input format of .Sy all input files. Recognized and supported values for output stream formats are .Sy VORBIS , .Sy MP3 and .Sy THEORA . Other values will be ignored and cause .Nm to simply pass through the data, which may or may not work. .It Sy \& .Pq Mandatory. Set the path and name of a single media file, a playlist, the name of an external program .Pq see below , or the keyword .Pa stdin for streaming from standard input. Playlists are recognized by their filename extension and end with either .Em .m3u or .Em .txt . .Pp A playlist consists of filenames, one entry per line. Comments in playlists are introduced by a .Sq Li # sign at the beginning of a line and ignored by .Nm . .It Sy \& .Pq Optional. Set to .Sy 1 .Pq one to indicate that the file in .Li \& is actually an executable program or script. If set to .Sy 0 .Pq zero , .Li \& content is assumed to be a media file, playlist file or the keyword .Pa stdin .Pq the default . .Pp See the .Sy SCRIPTING section for details on how the playlist program must behave. .It Sy \& .Pq Optional. Set to .Sy 1 .Pq one to randomly shuffle the entries of the playlist specified in .Li \& . Files are played sequentially if set to .Sy 0 .Pq zero or when the .Li \& element is absent. This option will be ignored if .Li \& is set to 1 .Pq one. .It Sy \& .Pq Optional. Set the path and name of an executable program or script that should be used by .Nm to set the metadata of the stream. The program is automatically queried when a new track is streamed, or whenever the .Sy SIGUSR2 signal is received. .Pp If the .Li \& element is present in the configuration, no attempts will be made to read metadata from files that are being streamed. If this behavior is not desired, it should be removed or commented out in the configuration file. .Pp See the .Sy SCRIPTING section for details on how the metadata program must behave. .It Sy \& .Pq Optional. Set the format of the string that should be used for the .Sq Li @M@ placeholder when setting metadata with an external program or script via .Li \& . .Pp See the .Sy METADATA section for details on how metadata is handled by .Nm . .It Sy \& Set to .Sy 1 .Pq one in order to stream the content of .Li \& only once, and to .Sy 0 .Pq zero for continuous streaming .Pq the default . .It Sy \& Set how many attempts should be made to reconnect to the Icecast server in case the connection is interrupted. The default is to try indefinitely, which is equal to setting this configuration option to .Sy 0 .Pq zero . .It Sy \& .Pq Optional. Set the name of the broadcast. Informational only. .It Sy \& .Pq Optional. Set the URL of the web site associated with the broadcast. Informational only. .It Sy \& .Pq Optional. Set the genre of the broadcast. Informational only, used for YP. .It Sy \& .Pq Optional. Set the description of the broadcast. Informational only, used for YP. .It Sy \& .Pq Optional. Set the bit rate of the broadcast. This setting is also purely informational and only used for YP. The value is set by the user and not .Nm , and should match the bit rate of the stream. .It Sy \& .Pq Optional. Set the quality setting of an Ogg Vorbis broadcast. Informational only and needs to be set by the user, used for YP. .It Sy \& .Pq Optional. Set the number of audio channels in the broadcast, e.g. .Sy 1 .Pq one for mono or .Sy 2 for stereo. Informational only and needs to be set by the user, used for YP. .It Sy \& .Pq Optional. Set the sample rate of the broadcast. Informational only and needs to be set by the user, used for YP. .It Sy \& .Pq Optional. Set to .Sy 1 .Pq one if the broadcast may be listed in a public YP directory. If set to .Sy 0 .Pq zero , the Icecast server will not submit this stream to a YP directory, which is also the default if the .Li \& element is absent. .It Sy \& .Pq Optional. Element that contains child elements, which specify if and how re-encoding should be done. .El .Ss Re-encoding settings Each of the re-encoding configuration elements have the .Li \& element as their parent. .Bl -tag -width -Ds .It Sy \& Set to .Sy 1 .Pq one to enable re-encoding. If set to .Sy 0 .Pq zero , no re-encoding will be done, which is also the default if the .Li \& element is absent. .It Sy \& Element that contains child elements, which specify how to decode and encode a certain media file format for streaming. Each format is described by a separate .Li \& element. .El .Ss Decoder/Encoder settings Each of the decoder/encoder configuration elements have the .Li \& element as their parent. .Bl -tag -width -Ds .It Sy \& This element is used by .Nm to find the appropriate encoder for the output stream format specified in the .Li \& element inside the global configuration. For consistency reasons, it is recommended that this element is always supplied, even for currently unsupported output formats, with content such as .Sy VORBIS , .Sy MP3 , .Sy THEORA , .Sy FLAC , et cetera. .It Sy \& Set the filename extension used to identify a given media file format. This allows .Nm to find the appropriate decoder for a given file. Should be set to .Em .mp3 for MP3, .Em .flac for FLAC, .Em .ogg for Ogg Vorbis, and so on. .It Sy \& Set the command to decode the specified media file format to raw data and send it to standard output. During runtime, the placeholder .Sq Li @T@ is replaced with the name of the media file, as it is specified in the .Li \& element or contained in a playlist file. It should always be enclosed in quotes, to prevent problems with filenames that contain whitespaces. .Pp Metadata placeholders can be used in the .Li \& element as well, for combined de-/encoder programs that produce data that can be streamed. See the .Sy METADATA section for details on how metadata is handled by .Nm . .Pp For example, to decode Ogg Vorbis files using the .Cm oggdec utility: .Pp .Dl \&oggdec -R -o - \&"@T@\&"\& .It Sy \& Set the command to encode raw data, received from standard input, to the specified stream format. .Pp Metadata placeholders can be used in the .Li \& element. For details about using metadata in .Nm , see below in the .Sy METADATA section. .Pp For example, to encode an Ogg Vorbis stream using the quality setting 1.5 with the .Cm oggenc utility: .Pp .Dl \&oggenc -r -q 1.5 -t \&"@M@\&" -\& .El .Sh SCRIPTING The .Nm utility provides hooks for externally controlled playlist and metadata management. This is done by running external programs or scripts that need to behave in ways explained here. .Ss Common Rules .Bl -dash -compact .It The program must be an executable file. .It The program must write one line to standard output and exit. .It The program must not require arbitrary command line options to function. A wrapper script must be used if there is no other way. .El .Ss Playlist Programs .Bl -dash -compact .It The program must return only filenames, with one filename per execution. .It The program should not return an empty line unless .Nm is supposed to know that the end of the playlist has been reached. This is significant when the .Li \& option is enabled. .El .Ss Metadata Programs .Bl -dash -compact .It The program must not return anything (just a newline character is okay) if it is called by .Nm with a command line parameter that the program does not support. .It When called without command line parameters, the program should return a complete string that should be used for metadata. .It When called with the command line parameter .Qq Li artist , the program should return only the artist information of the metadata. .Pq Optional. .It When called with the command line parameter .Qq Li title , the program should return only the title information of the metadata. .Pq Optional. .It The supplied metadata must be encoded in UTF-8. .El .Sh METADATA The main tool for handling metadata with .Nm is placeholders in decoder and encoder commands that are replaced with real content during runtime. The tricky part is that one of the placeholders has to be handled differently, depending on where the metadata comes from. This section will explain each possible scenario. .Ss Metadata Placeholders .Bl -tag -width -Ds .It Sy @T@ Replaced with the media file name. Required in .Li \& and is available in .Li \& . .It Sy @M@ Replaced with a metadata string. See below for a detailed explanation. Available in .Li \& and .Li \& . .It Sy @a@ Replaced with the artist information. Available in .Li \& , .Li \& and .Li \& . .It Sy @t@ Replaced with the title information. Available in .Li \& , .Li \& and .Li \& . .It Sy @s@ Replaced with the string returned by .Li \& when called without any command line parameters. Available only in .Li \& . .El .Ss The @M@ Placeholder While all other placeholders are simply replaced with whatever data they are associated with, .Sq Li @M@ is context-sensitive. The logic used by .Nm is the following: .Bd -literal -offset indent If ('@M@ is present') If ('\&' AND '\&') Replace with format string result. Else If (NOT '\&' AND '@t@ is present') Replace with empty string. else Replace with generated metadata string. Endif Endif Endif .Ed .Pp The generated metadata string for .Sq Li @M@ is of the format .Dq Em Artist - Title , if both artist and title information is available. If one of the two is missing, the available one is displayed without a leading or trailing dash, e.g. just .Dq Em Artist . If neither artist nor title are available, the name of the media file \(em without its file extension \(em is used. .Ss Metadata Caveats It is possible to generate strange results with odd combinations of placeholders, external metadata programs and updates during runtime via .Sy SIGUSR2 . If things start to become just confusing, simplify. .Pp Metadata updates during runtime are done with a relatively broken feature of libshout. Additional metadata information that is already present in the stream sent via .Nm is usually destroyed and replaced with the new data. It is not possible to properly discern between artist and title information, which means that anything set with the .Sy SIGUSR2 feature will continue to end up entirely in the .Qq Em Title field of a stream. .Pp Of all possible Ogg-based streams, only Ogg Vorbis can have its metadata manipulated by Icecast. Any attempt of .Nm to update other Ogg metadata is actually a no-op. .Pp While .Nm tries to do its best with relaying metadata accurately to Icecast, and subsequently the listeners, different codesets and locales can pose a problem. Especially when streaming MP3 files, it may help to explicitly set a codeset to work with via the .Ev LC_CTYPE environment variable, as .Nm assumes ID3v1 tags to be in the user's current locale. Note that, even though support for different locales is provided by .Nm , Icecast itself and the listening clients also have a say in the matter. The only way to ensure consistent results with metadata in non-Ogg streams is to use the characters available in the ISO-8859-1 codeset. .Pp External encoders may put additional, and possibly artificial, restrictions on valid characters in metadata. .Sh FILES .Bl -tag -width "!!EXAMPLES_DIR!!" -compact .It Pa !!EXAMPLES_DIR!! Directory containing example configuration files for various uses of .Nm , as well as example playlist and metadata scripts. .El .Sh SEE ALSO .Xr ezstream-file.sh 1 .Sh AUTHORS .Nm was written by: .Pp .An Ed Zaleski Aq oddsock@oddsock.org .An Moritz Grimm Aq mdgrimm@gmx.net .Pp This manual was written by Moritz Grimm. ezstream-0.5.6/doc/ezstream-file.sh.1.in.in0000644000175000017500000000566211246572743017523 0ustar tootstoots.\" $Id: ezstream-file.sh.1.in.in 16533 2009-08-30 19:38:48Z moritz $ .\" .\" Copyright (c) 2009 Moritz Grimm .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd @BUILD_DATE@ .Dt EZSTREAM-FILE.SH 1 .Os @PACKAGE_NAME@ @PACKAGE_VERSION@ .Sh NAME .Nm ezstream-file.sh .Nd script to stream files from the command line .Sh SYNOPSIS .Nm .Bk -words .Op Fl hnqVv .Op Fl T Ar cfg_template .Op Ar .Ek .Sh DESCRIPTION The .Nm script uses an .Nm ezstream configuration file template to stream a list of files given on the command line, or via standard input. In other words, filenames are written to a temporary playlist, and a template-based configuration is generated to stream them. .Pp The path to a configuration template must be provided, either by using the .Fl T command line argument, or the .Dv EZSTREAM_TEMPLATE environment variable. .Pp The configuration template must be a valid playlist configuration, and contain the follwing configuration statement: .Bd -literal -offset indent \&%FILENAME%\& .Ed .Pp If no input files are specified, the list of files to be streamed are read from standard input. .Pp Lastly, the .Dv EZSTREAM environment variable allows to specify an alternate .Nm ezstream binary. .Ss Command line parameters .Bl -tag -width Ds .It Fl h Print a summary of available command line parameters with short descriptions and exit. .It Fl n .Po Passed to .Nm ezstream . .Pc Normalize metadata strings by removing excess whitespaces. .It Fl q .Po Passed to .Nm ezstream . .Pc Be more quiet. Suppress the output that external programs send to standard error. .It Fl T Ar cfg_template Use the configuration in .Ar cfg_template , overriding the default set in the .Dv EZSTREAM_TEMPLATE environment variable. .It Fl V Print the .Nm version number and exit. .It Fl v .Po Passed to .Nm ezstream . .Pc Produce more verbose output from .Nm ezstream . Use twice for even more verbose output. .El .Sh FILES .Bl -tag -width "!!EXAMPLES_DIR!!" -compact .It Pa !!EXAMPLES_DIR!! Directory containing example configuration files for various uses of .Nm ezstream , as well as example playlist and metadata scripts. .El .Sh SEE ALSO .Xr ezstream 1 .Sh AUTHORS .An -nosplit The .Nm script and this manual were written by .An Moritz Grimm Aq mdgrimm@gmx.net . ezstream-0.5.6/src/0000755000175000017500000000000011257756745013270 5ustar tootstootsezstream-0.5.6/src/strtonum.c0000644000175000017500000000404311246572734015320 0ustar tootstoots/* $Id: strtonum.c 15798 2009-03-18 20:24:35Z moritz $ */ /* $OpenBSD: strtonum.c,v 1.6 2004/08/03 19:38:01 millert Exp $ */ /* * Copyright (c) 2004 Ted Unangst and Todd Miller * All rights reserved. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "ezstream.h" #include #include #include #include "strfctns.h" #define INVALID 1 #define TOOSMALL 2 #define TOOLARGE 3 #if !defined(LLONG_MIN) || !defined(LLONG_MAX) # undef LLONG_MIN # undef LLONG_MAX # define LLONG_MIN LONG_LONG_MIN # define LLONG_MAX LONG_LONG_MAX #endif long long local_strtonum(const char *numstr, long long minval, long long maxval, const char **errstrp) { long long ll = 0; char *ep; int error = 0; struct errval { const char *errstr; int err; } ev[4] = { { NULL, 0 }, { "invalid", EINVAL }, { "too small", ERANGE }, { "too large", ERANGE }, }; ev[0].err = errno; errno = 0; if (minval > maxval) error = INVALID; else { ll = strtoll(numstr, &ep, 10); if (numstr == ep || *ep != '\0') error = INVALID; else if ((ll == LLONG_MIN && errno == ERANGE) || ll < minval) error = TOOSMALL; else if ((ll == LLONG_MAX && errno == ERANGE) || ll > maxval) error = TOOLARGE; } if (errstrp != NULL) *errstrp = ev[error].errstr; errno = ev[error].err; if (error) ll = 0; return (ll); } ezstream-0.5.6/src/xalloc.c0000644000175000017500000004346711246572734014724 0ustar tootstoots/* $Id: xalloc.c 15794 2009-03-18 09:10:28Z moritz $ */ /* * Copyright (C) 2007 Moritz Grimm * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "ezstream.h" #include "xalloc.h" #ifndef SIZE_T_MAX # define SIZE_T_MAX ((size_t)-1) #endif #ifndef va_copy # define va_copy(d, s) (d) = (s) #endif #define XALLOC_DBGLVL_MAX 2 #if defined(XALLOC_DEBUG) && defined(XALLOC_SILENT) # undef XALLOC_SILENT #endif /* XALLOC_DEBUG && XALLOC_SILENT */ #ifdef XALLOC_DEBUG # include int _memory_cmp(void *, void *); struct memory { RB_ENTRY(memory) entry; void *ptr; unsigned int id; size_t size; const char *allocated_by; unsigned int allocated_in_line; const char *reallocated_by; unsigned int reallocated_in_line; const char *freed_by; unsigned int freed_in_line; }; RB_HEAD(memory_tree, memory) memory_tree_head = RB_INITIALIZER(&memory_tree_head); RB_PROTOTYPE(memory_tree, memory, entry, _memory_cmp) void _memory_free(struct memory **); #endif /* XALLOC_DEBUG */ void _xalloc_warn(const char *, ...); void _xalloc_error(int, const char *, ...); void _xalloc_fatal(const char *, ...); void _xalloc_debug_printf(unsigned int, const char *, ...); #ifdef XALLOC_WITH_XASPRINTF int _xalloc_vasprintf(char **, const char *, va_list, size_t *); #endif /* XALLOC_WITH_XASPRINTF */ static unsigned int debug_level = 0; static FILE *debug_output = NULL; #ifdef XALLOC_DEBUG static unsigned int xalloc_next_id = 0; #endif static int xalloc_initialized = 0; static size_t xalloc_allocated; static size_t xalloc_total; static size_t xalloc_peak; static size_t xalloc_freed; static void * (*real_malloc)(size_t) = NULL; static void * (*real_calloc)(size_t, size_t) = NULL; static void * (*real_realloc)(void *, size_t) = NULL; static void (*real_free)(void *) = NULL; static const char *unknown_file = ""; #ifdef XALLOC_DEBUG RB_GENERATE(memory_tree, memory, entry, _memory_cmp) int _memory_cmp(void *arg_a, void *arg_b) { struct memory *a = (struct memory *)arg_a; struct memory *b = (struct memory *)arg_b; if (a->ptr < b->ptr) return (-1); else if (a->ptr > b->ptr) return (1); return (0); } void _memory_free(struct memory **mem_p) { struct memory *mem = *mem_p; if (mem->allocated_by != NULL) mem->allocated_by = NULL; if (mem->reallocated_by != NULL) mem->reallocated_by = NULL; if (mem->freed_by != NULL) mem->freed_by = NULL; real_free(mem); *mem_p = NULL; } #endif /* XALLOC_DEBUG */ void _xalloc_warn(const char *fmt, ...) { va_list ap; if (debug_output == NULL) debug_output = XALLOC_DEFAULT_OUTPUT; va_start(ap, fmt); #ifndef XALLOC_SILENT vfprintf(debug_output, fmt, ap); fflush(debug_output); #endif /* !XALLOC_SILENT */ va_end(ap); } void _xalloc_error(int errnum, const char *fmt, ...) { va_list ap; if (debug_output == NULL) debug_output = XALLOC_DEFAULT_OUTPUT; va_start(ap, fmt); #ifndef XALLOC_SILENT vfprintf(debug_output, fmt, ap); if (errnum > 0) fprintf(debug_output, ": %s\n", strerror(errnum)); fflush(debug_output); #endif /* !XALLOC_SILENT */ va_end(ap); exit(1); } void _xalloc_fatal(const char *fmt, ...) { va_list ap; if (debug_output == NULL) debug_output = XALLOC_DEFAULT_OUTPUT; va_start(ap, fmt); #ifndef XALLOC_SILENT vfprintf(debug_output, fmt, ap); fflush(debug_output); #endif /* !XALLOC_SILENT */ va_end(ap); abort(); } void _xalloc_debug_printf(unsigned int level, const char *fmt, ...) { va_list ap; if (level > debug_level) return; va_start(ap, fmt); #ifdef XALLOC_DEBUG vfprintf(debug_output, fmt, ap); fflush(debug_output); #endif /* XALLOC_DEBUG */ va_end(ap); } #ifdef XALLOC_WITH_XASPRINTF int _xalloc_vasprintf(char **str_p, const char *fmt, va_list ap, size_t *strsiz) { int ret = -1; va_list ap_local; *str_p = NULL; #ifndef WIN32 # ifndef HAVE_BROKEN_VSNPRINTF /* MODERN UNIX */ va_copy(ap_local, ap); *strsiz = vsnprintf(NULL, (size_t)0, fmt, ap_local) + 1; va_end(ap_local); # ifdef HAVE_ASPRINTF if ((ret = vasprintf(str_p, fmt, ap)) == -1) *str_p = NULL; # else if ((*str_p = real_calloc(*strsiz, sizeof(char))) == NULL) return (-1); ret = vsnprintf(*str_p, *strsiz, fmt, ap); # endif /* HAVE_ASPRINTF */ # else /* ANCIENT UNIX */ { char *buf = NULL; *strsiz = 4; for (;;) { char *tbuf; int pret; if ((tbuf = real_realloc(buf, *strsiz)) == NULL) { real_free(buf); return (-1); } buf = tbuf; va_copy(ap_local, ap); pret = vsnprintf(buf, *strsiz, fmt, ap_local); va_end(ap_local); if (pret > 0 && pret < (int)*strsiz) break; if ((int)(*strsiz *= 2) < 0) { real_free(buf); return (-1); } } ret = vsnprintf(buf, *strsiz, fmt, ap); *str_p = buf; } # endif /* !HAVE_BROKEN_VSNPRINTF */ #else /* WINDOWS */ va_copy(ap_local, ap); *strsiz = _vscprintf(fmt, ap_local) + 1; va_end(ap_local); if ((*str_p = real_calloc(*strsiz, sizeof(char))) == NULL) return (-1); ret = _vsnprintf(*str_p, *strsiz, fmt, ap); #endif /* !WIN32 */ return (ret); } #endif /* XALLOC_WITH_XASPRINTF */ void xalloc_initialize_debug(unsigned int level, FILE *output) { if (xalloc_initialized) _xalloc_fatal("XALLOC: xalloc_initialize(): Xalloc library already initialized\n"); if ((debug_level = level) > XALLOC_DBGLVL_MAX) debug_level = XALLOC_DBGLVL_MAX; if (output == NULL) debug_output = XALLOC_DEFAULT_OUTPUT; else debug_output = output; real_malloc = malloc; real_calloc = calloc; real_realloc = realloc; real_free = free; xalloc_allocated = 0; xalloc_total = 0; xalloc_peak = 0; xalloc_freed = 0; xalloc_initialized = 1; } void xalloc_set_functions(void *(*malloc_func)(size_t), void *(*calloc_func)(size_t, size_t), void *(*realloc_func)(void *, size_t), void (*free_func)(void *)) { if (!xalloc_initialized) _xalloc_fatal("XALLOC: xalloc_set_functions(): Xalloc library not initialized\n"); if (malloc_func == NULL || calloc_func == NULL || realloc_func == NULL) _xalloc_fatal("XALLOC: xalloc_set_functions(): Bad argument(s)\n"); real_malloc = malloc_func; real_calloc = calloc_func; real_realloc = realloc_func; real_free = free_func; } void xalloc_shutdown(void) { if (!xalloc_initialized) _xalloc_fatal("XALLOC: xalloc_shutdown(): Xalloc library not initialized\n"); #ifdef XALLOC_DEBUG if (debug_level > 0) { struct memory *mem, *mem_next; size_t leaked_bytes = 0; for (mem = RB_MIN(memory_tree, &memory_tree_head); mem != NULL; mem = mem_next) { mem_next = RB_NEXT(memory_tree, &memory_tree_head, mem); RB_REMOVE(memory_tree, &memory_tree_head, mem); if (mem->freed_by == NULL) { _xalloc_debug_printf(1, "XALLOC: MEMORY LEAK (%p:%u): allocated in %s:%u, ", mem->ptr, mem->id, mem->allocated_by, mem->allocated_in_line); if (mem->reallocated_by != NULL) _xalloc_debug_printf(1, "last reallocated in %s:%u, ", mem->reallocated_by, mem->reallocated_in_line); _xalloc_debug_printf(1, "leaks %lu bytes\n", (unsigned long)mem->size); leaked_bytes += mem->size; real_free(mem->ptr); } _memory_free(&mem); } if (leaked_bytes != xalloc_allocated) _xalloc_fatal("XALLOC: Internal error: xalloc_shutdown(): leaked_bytes(%lu) != xalloc_allocated(%lu)\n", (unsigned long)leaked_bytes, (unsigned long)xalloc_allocated); _xalloc_debug_printf(1, "XALLOC: STATS: leaked: %lu bytes, peak allocation: %lu bytes (freed/total: %lu/%lu bytes)\n", (unsigned long)xalloc_allocated, (unsigned long)xalloc_peak, (unsigned long)xalloc_freed, (unsigned long)xalloc_total); } #endif /* XALLOC_DEBUG */ xalloc_initialized = 0; } void * xmalloc_c(size_t size, const char *file, unsigned int line) { void *ret; if (!xalloc_initialized) _xalloc_fatal("XALLOC: xmalloc(): Xalloc library not initialized\n"); if (size == 0) _xalloc_fatal("XALLOC: xmalloc(): %s:%u: Zero size\n", file ? file : unknown_file, line); if ((ret = real_malloc(size)) == NULL) _xalloc_error(errno, "XALLOC: xmalloc(): %s:%u: Allocating %lu bytes", file ? file : unknown_file, line, (unsigned long)(size)); #ifdef XALLOC_DEBUG if (debug_level > 0) { struct memory *mem, *mem_exists; if ((mem = real_calloc(1, sizeof(struct memory))) == NULL) _xalloc_error(errno, "XALLOC: Internal error"); mem->ptr = ret; mem->size = size; if (file) mem->allocated_by = file; else mem->allocated_by = unknown_file; mem->allocated_in_line = line; mem->id = ++xalloc_next_id; if ((mem_exists = RB_INSERT(memory_tree, &memory_tree_head, mem)) != NULL) { /* Freed pointer is being reused: */ if (mem_exists->id != 0) _xalloc_fatal("XALLOC: Internal error: Assertion (mem_exists->id == 0) in %s:%u failed!\n", __FILE__, __LINE__); RB_REMOVE(memory_tree, &memory_tree_head, mem_exists); _memory_free(&mem_exists); RB_INSERT(memory_tree, &memory_tree_head, mem); } xalloc_allocated += size; xalloc_total += size; if (xalloc_allocated > xalloc_peak) xalloc_peak = xalloc_allocated; } #endif /* XALLOC_DEBUG */ return (ret); } void * xcalloc_c(size_t nmemb, size_t size, int may_fail, const char *file, unsigned int line) { void *ret; if (!xalloc_initialized) _xalloc_fatal("XALLOC: xcalloc(): Xalloc library not initialized\n"); if (nmemb == 0 || size == 0) _xalloc_fatal("XALLOC: xcalloc(): %s:%u: Zero size\n", file ? file : unknown_file, line); if (SIZE_T_MAX / nmemb < size) _xalloc_fatal("XALLOC: xcalloc(): %s:%u: Integer overflow (nmemb * size > SIZE_T_MAX)\n", file ? file : unknown_file, line); if ((ret = real_calloc(nmemb, size)) == NULL && may_fail == 0) _xalloc_error(errno, "XALLOC: xcalloc(): %s:%u: Allocating %lu bytes", file ? file : unknown_file, line, (unsigned long)(nmemb * size)); #ifdef XALLOC_DEBUG if (ret != NULL && debug_level > 0) { struct memory *mem, *mem_exists; if ((mem = real_calloc(1, sizeof(struct memory))) == NULL) _xalloc_error(errno, "XALLOC: Internal error"); mem->ptr = ret; mem->size = nmemb * size; if (file) mem->allocated_by = file; else mem->allocated_by = unknown_file; mem->allocated_in_line = line; mem->id = ++xalloc_next_id; if ((mem_exists = RB_INSERT(memory_tree, &memory_tree_head, mem)) != NULL) { /* Freed pointer is being reused: */ if (mem_exists->id != 0) _xalloc_fatal("XALLOC: Internal error: Assertion (mem_exists->id == 0) in %s:%u failed!\n", __FILE__, __LINE__); RB_REMOVE(memory_tree, &memory_tree_head, mem_exists); _memory_free(&mem_exists); RB_INSERT(memory_tree, &memory_tree_head, mem); } xalloc_allocated += nmemb * size; xalloc_total += nmemb * size; if (xalloc_allocated > xalloc_peak) xalloc_peak = xalloc_allocated; } #endif /* XALLOC_DEBUG */ return (ret); } void * xrealloc_c(void *ptr, size_t nmemb, size_t size, const char *file, unsigned int line) { void *ret; size_t nsiz = nmemb * size; #ifdef XALLOC_DEBUG struct memory *mem = NULL; #endif /* XALLOC_DEBUG */ if (!xalloc_initialized) _xalloc_fatal("XALLOC: xrealloc(): Xalloc library not initialized\n"); if (nmemb == 0 || size == 0) _xalloc_fatal("XALLOC: xrealloc(): %s:%u: Zero size\n", file ? file : unknown_file, line); if (SIZE_T_MAX / nmemb < size) _xalloc_fatal("XALLOC: xrealloc(): %s:%u: Integer overflow (nmemb * size > SIZE_T_MAX)\n", file ? file : unknown_file, line); if (ptr == NULL) { ret = real_malloc(nsiz); #ifdef XALLOC_DEBUG if (debug_level > 0) { if ((mem = real_calloc(1, sizeof(struct memory))) == NULL) _xalloc_error(errno, "XALLOC: Internal error"); mem->ptr = ret; mem->id = ++xalloc_next_id; if (file) mem->allocated_by = file; else mem->allocated_by = unknown_file; mem->allocated_in_line = line; } #endif /* XALLOC_DEBUG */ } else { #ifdef XALLOC_DEBUG struct memory find_mem; if (debug_level > 0) { find_mem.ptr = ptr; if ((mem = RB_FIND(memory_tree, &memory_tree_head, &find_mem)) == NULL) _xalloc_fatal("XALLOC: xrealloc(): %s:%u: Junk pointer %p not accounted for\n", file ? file : unknown_file, line, ptr); RB_REMOVE(memory_tree, &memory_tree_head, mem); } #endif /* XALLOC_DEBUG */ ret = real_realloc(ptr, nsiz); #ifdef XALLOC_DEBUG if (debug_level > 0) { mem->ptr = ret; if (file) mem->reallocated_by = file; else mem->reallocated_by = unknown_file; mem->reallocated_in_line = line; } #endif /* XALLOC_DEBUG */ } if (ret == NULL) _xalloc_error(errno, "XALLOC: xrealloc(): %s:%u: (Re)allocating %lu bytes", file ? file : unknown_file, line, (unsigned long)(nmemb * size)); #ifdef XALLOC_DEBUG if (debug_level > 0) { struct memory *mem_exists; ssize_t diff = (ssize_t)(nsiz - mem->size); xalloc_allocated += diff; if (diff < 0) xalloc_freed += -diff; else xalloc_total += diff; if (xalloc_allocated > xalloc_peak) xalloc_peak = xalloc_allocated; mem->size = nsiz; if ((mem_exists = RB_INSERT(memory_tree, &memory_tree_head, mem)) != NULL) { /* Freed pointer is being reused: */ if (mem_exists->id != 0) _xalloc_fatal("XALLOC: Internal error: Assertion (mem_exists->id == 0) in %s:%u failed!\n", __FILE__, __LINE__); RB_REMOVE(memory_tree, &memory_tree_head, mem_exists); _memory_free(&mem_exists); RB_INSERT(memory_tree, &memory_tree_head, mem); } } #endif /* XALLOC_DEBUG */ return (ret); } char * xstrdup_c(const char *str, const char *file, unsigned int line) { size_t len; char *nstr; if (!xalloc_initialized) _xalloc_fatal("XALLOC: xstrdup(): Xalloc library not initialized\n"); len = strlen(str) + 1; if ((nstr = xcalloc_c(len, sizeof(char), 0, file, line)) == NULL) _xalloc_error(errno, "XALLOC: xstrdup(): %s:%u: Allocating %lu bytes: %s\n", file ? file : unknown_file, line, (unsigned long)(len)); memcpy(nstr, str, len); return (nstr); } void xfree_c(void **ptr_p, const char *file, unsigned int line) { if (!xalloc_initialized) _xalloc_fatal("XALLOC: xfree(): Xalloc library not initialized\n"); if (ptr_p == NULL) _xalloc_fatal("XALLOC: xfree(): Bad argument(s)\n"); if (*ptr_p == NULL) { _xalloc_warn("XALLOC: xfree(): Warning: %s:%u: Freeing NULL pointer\n", file ? file : unknown_file, line); return; } #ifdef XALLOC_DEBUG if (debug_level > 0) { struct memory *mem = NULL, find_mem; find_mem.ptr = *ptr_p; if ((mem = RB_FIND(memory_tree, &memory_tree_head, &find_mem)) == NULL) _xalloc_fatal("XALLOC: xfree(): %s:%u: Junk pointer %p not accounted for\n", file ? file : unknown_file, line, *ptr_p); if (mem->freed_by != NULL && mem->id == 0) { _xalloc_debug_printf(2, "XALLOC: DOUBLE FREE of pointer %p in %s:%u: allocated in %s:%u, ", mem->ptr, file ? file : unknown_file, line, mem->allocated_by, mem->allocated_in_line); if (mem->reallocated_by != NULL) _xalloc_debug_printf(2, "last reallocated in %s:%u, ", mem->reallocated_by, mem->reallocated_in_line); _xalloc_debug_printf(2, "already freed in %s:%u\n", mem->freed_by, mem->freed_in_line); abort(); } xalloc_freed += mem->size; xalloc_allocated -= mem->size; mem->id = 0; mem->size = 0; if (debug_level > 1) { if (file) mem->freed_by = file; else mem->freed_by = unknown_file; mem->freed_in_line = line; } else { RB_REMOVE(memory_tree, &memory_tree_head, mem); _memory_free(&mem); } } #endif /* XALLOC_DEBUG */ real_free(*ptr_p); #ifdef XALLOC_DEBUG if (debug_level <= 1) #endif /* XALLOC_DEBUG */ { *ptr_p = NULL; } } #ifdef XALLOC_WITH_XASPRINTF int xasprintf_c(const char *file, unsigned int line, char **str_p, const char *fmt, ...) { int ret; va_list ap; size_t strsiz = 0; if (!xalloc_initialized) _xalloc_fatal("XALLOC: xasprintf(): Xalloc library not initialized\n"); if (str_p == NULL || fmt == NULL) _xalloc_fatal("XALLOC: xasprintf(): Bad argument(s)\n"); va_start(ap, fmt); ret = _xalloc_vasprintf(str_p, fmt, ap, &strsiz); va_end(ap); if (ret == -1) _xalloc_error(errno, "XALLOC: xasprintf(): %s:%u: Allocating %lu bytes", file ? file : unknown_file, line, strsiz); # ifdef XALLOC_DEBUG if (debug_level > 0) { struct memory *mem, *mem_exists; if ((mem = real_calloc(1, sizeof(struct memory))) == NULL) _xalloc_error(errno, "XALLOC: Internal error"); mem->ptr = *str_p; mem->size = strsiz; if (file) mem->allocated_by = file; else mem->allocated_by = unknown_file; mem->allocated_in_line = line; mem->id = ++xalloc_next_id; if ((mem_exists = RB_INSERT(memory_tree, &memory_tree_head, mem)) != NULL) { /* Freed pointer is being reused: */ if (mem_exists->id != 0) _xalloc_fatal("XALLOC: Internal error: Assertion (mem_exists->id == 0) in %s:%u failed!\n", __FILE__, __LINE__); RB_REMOVE(memory_tree, &memory_tree_head, mem_exists); _memory_free(&mem_exists); RB_INSERT(memory_tree, &memory_tree_head, mem); } xalloc_allocated += strsiz; xalloc_total += strsiz; if (xalloc_allocated > xalloc_peak) xalloc_peak = xalloc_allocated; } # endif /* XALLOC_DEBUG */ return (ret); } #endif /* XALLOC_WITH_XASPRINTF */ ezstream-0.5.6/src/xalloc.h0000644000175000017500000001041411246572734014713 0ustar tootstoots/* $Id: xalloc.h 15794 2009-03-18 09:10:28Z moritz $ */ /* * libxalloc - Portable memory allocation wrapper library, with extensive * error checking, debugging facilities and hooks for 3rd party * memory allocation functions. * This library also detects and prevents double-free errors, * and ensures that out-of-memory issues always cause the * application to exit. * * Copyright (C) 2007 Moritz Grimm * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef __XALLOC_H__ #define __XALLOC_H__ /* * Define XALLOC_DEBUG to compile the debugging features. Doing so will make * this library more expensive in every case, but not change its (visible) * behavior unless the debugging level is set > 0. The debugging levels are: * 0: disable debugging * 1: enable most debugging features * 2: additionally enable double-free checking * (Warning: This requires libxalloc to keep track of all allocations * and frees, which means that memory usage may increase a lot * over time!) * * Define XALLOC_SILENT to suppress all messages, which makes libxalloc * abort() and exit() silently. * * Define XALLOC_WITH_XASPRINTF to expose the xasprintf() interface. Doing * so will require libxalloc to be compiled with a compiler that supports C99 * variadic macros, and work only on systems with vasprintf() or vsnprintf(), * and MS Windows. Note that doing so constitutes an incompatible ABI change! * * Note that none of the x*_c() functions should be used directly, unless it * is ensured that /file/ is a const char * to a real string constant. */ /* #define XALLOC_DEBUG 1 */ /* #define XALLOC_SILENT 1 */ /* #define XALLOC_WITH_XASPRINTF 1 */ /* The default output stream for messages: */ #define XALLOC_DEFAULT_OUTPUT stderr /* * Library initialization and shutdown. */ #define xalloc_initialize() \ xalloc_initialize_debug(0, NULL) void xalloc_initialize_debug(unsigned int /* level */, FILE * /* output stream */); void xalloc_set_functions(void *(*)(size_t) /* malloc function */, void *(*)(size_t, size_t) /* calloc function */, void *(*)(void *, size_t) /* realloc function */, void (*)(void *) /* free function */); /* Memory leak checks happen during shutdown! */ void xalloc_shutdown(void); /* * Memory management functions. * Note that xrealloc() has calloc() semantics, to detect and prevent integer * overflows. */ #define xmalloc(s) \ xmalloc_c(s, __FILE__, __LINE__) void * xmalloc_c(size_t /* size */, const char * /* file */, unsigned int /* line */); #define xcalloc(n, s) \ xcalloc_c(n, s, 0, __FILE__, __LINE__) void * xcalloc_c(size_t /* nmemb */, size_t /* size */, int /* may fail */, const char * /* file */, unsigned int /* line */); #define xrealloc(p, n, s) \ xrealloc_c(p, n, s, __FILE__, __LINE__) void * xrealloc_c(void *, size_t /* nmemb */, size_t /* size */, const char * /* file */, unsigned int /* line */); #define xstrdup(s) \ xstrdup_c(s, __FILE__, __LINE__) char * xstrdup_c(const char *, const char * /* file */, unsigned int /* line */); #define xfree(p) \ xfree_c((void *)&(p), __FILE__, __LINE__) void xfree_c(void **, const char * /* file */, unsigned int /* line */); #ifdef XALLOC_WITH_XASPRINTF # define xasprintf(s, f, ...) \ xasprintf_c(__FILE__, __LINE__, s, f, __VA_ARGS__) int xasprintf_c(const char * /* file */, unsigned int /* line */, char ** /* string pointer */, const char * /* format */, ...); #endif /* XALLOC_WITH_XASPRINTF */ #endif /* __XALLOC_H__ */ ezstream-0.5.6/src/playlist.c0000644000175000017500000002456511246572734015301 0ustar tootstoots/* $Id: playlist.c 16536 2009-08-30 21:46:15Z moritz $ */ /* * Copyright (c) 2007, 2009 Moritz Grimm * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "ezstream.h" #include "playlist.h" #include "xalloc.h" /* Usually defined in . */ #ifndef S_IEXEC # define S_IEXEC S_IXUSR #endif /* !S_IEXEC */ extern char *__progname; struct playlist { char *filename; char **list; size_t size; size_t num; size_t index; int program; char *prog_track; }; playlist_t * playlist_create(const char *); int playlist_add(playlist_t *, const char *); unsigned int playlist_random(void); const char * playlist_run_program(playlist_t *); playlist_t * playlist_create(const char *filename) { playlist_t *pl; pl = xcalloc(1UL, sizeof(playlist_t)); pl->filename = xstrdup(filename); return (pl); } int playlist_add(playlist_t *pl, const char *entry) { size_t num; if (pl == NULL || entry == NULL) { printf("%s: playlist_add(): Internal error: Bad arguments\n", __progname); exit(1); } num = pl->num + 1; if (pl->size == 0) { pl->list = xcalloc(2UL, sizeof(char *)); pl->size = 2 * sizeof(char *); } if (pl->size / sizeof(char *) <= num) { size_t i; pl->list = xrealloc(pl->list, 2UL, pl->size); pl->size = 2 * pl->size; for (i = num; i < pl->size / sizeof(char *); i++) pl->list[i] = NULL; } pl->list[num - 1] = xstrdup(entry); pl->num = num; return (1); } unsigned int playlist_random(void) { unsigned int ret = 0; #ifdef HAVE_ARC4RANDOM ret = arc4random(); #elif HAVE_RANDOM ret = (unsigned int)random(); #else ret = (unsigned int)rand(); #endif return (ret); } void playlist_init(void) { #ifdef HAVE_RANDOM # ifdef HAVE_SRANDOMDEV srandomdev(); # else srandom((unsigned int)time(NULL)); # endif /* HAVE_SRANDOMDEV */ #else srand((unsigned int)time(NULL)); #endif /* HAVE_RANDOM */ } void playlist_shutdown(void) {} playlist_t * playlist_read(const char *filename) { playlist_t *pl; unsigned long line; FILE *filep; char buf[PATH_MAX]; if (filename != NULL) { pl = playlist_create(filename); if ((filep = fopen(filename, "r")) == NULL) { printf("%s: %s: %s\n", __progname, filename, strerror(errno)); playlist_free(&pl); return (NULL); } } else { pl = playlist_create("stdin"); if ((filep = fdopen(STDIN_FILENO, "r")) == NULL) { printf("%s: stdin: %s\n", __progname, strerror(errno)); playlist_free(&pl); return (NULL); } } line = 0; while (fgets(buf, (int)sizeof(buf), filep) != NULL) { line++; if (strlen(buf) == sizeof(buf) - 1) { char skip_buf[2]; printf("%s[%lu]: File or path name too long\n", pl->filename, line); /* Discard any excess chars in that line. */ while (fgets(skip_buf, (int)sizeof(skip_buf), filep) != NULL) { if (skip_buf[0] == '\n') break; } continue; } /* * fgets() would happily fill a buffer with * { '\0', ..., '\n', '\0' }. Also skip lines that begin with * a '#', which is considered a comment. */ if (buf[0] == '\0' || buf[0] == '#') continue; /* Trim any trailing newlines and carriage returns. */ buf[strcspn(buf, "\n")] = '\0'; buf[strcspn(buf, "\r")] = '\0'; /* Skip lines that are empty after the trimming. */ if (buf[0] == '\0') continue; /* We got one. */ if (!playlist_add(pl, buf)) { fclose(filep); playlist_free(&pl); return (NULL); } } if (ferror(filep)) { printf("%s: playlist_read(): Error while reading %s: %s\n", __progname, pl->filename, strerror(errno)); fclose(filep); playlist_free(&pl); return (NULL); } fclose(filep); return (pl); } playlist_t * playlist_program(const char *filename) { playlist_t *pl; #ifdef HAVE_STAT struct stat st; #else FILE *filep; #endif pl = playlist_create(filename); pl->program = 1; #ifdef HAVE_STAT if (stat(filename, &st) == -1) { printf("%s: %s: %s\n", __progname, filename, strerror(errno)); playlist_free(&pl); return (NULL); } if (st.st_mode & (S_IWGRP | S_IWOTH)) { printf("%s: Error: %s is group and/or world writeable\n", __progname, filename); playlist_free(&pl); return (NULL); } if (!(st.st_mode & (S_IEXEC | S_IXGRP | S_IXOTH))) { printf("%s: %s: Not an executable program\n", __progname, filename); playlist_free(&pl); return (NULL); } #else if ((filep = fopen(filename, "r")) == NULL) { printf("%s: %s: %s\n", __progname, filename, strerror(errno)); playlist_free(&pl); return (NULL); } fclose(filep); #endif /* HAVE_STAT */ return (pl); } void playlist_free(playlist_t **pl_p) { size_t i; playlist_t *pl; if (pl_p == NULL || (pl = *pl_p) == NULL) return; if (pl->filename != NULL) { xfree(pl->filename); pl->filename = NULL; } if (pl->list != NULL) { if (pl->size > 0) { for (i = 0; i < pl->size / sizeof(char *); i++) { if (pl->list[i] != NULL) { xfree(pl->list[i]); pl->list[i] = NULL; } else break; } } xfree(pl->list); } if (pl->prog_track != NULL) { xfree(pl->prog_track); pl->prog_track = NULL; } xfree(*pl_p); } const char * playlist_get_next(playlist_t *pl) { if (pl == NULL) { printf("%s: playlist_get_next(): Internal error: NULL argument\n", __progname); exit(1); } if (pl->program) return (playlist_run_program(pl)); if (pl->num == 0) return (NULL); return ((const char *)pl->list[pl->index++]); } const char * playlist_peek_next(playlist_t *pl) { if (pl == NULL) { printf("%s: playlist_peek_next(): Internal error: NULL argument\n", __progname); exit(1); } if (pl->program || pl->num == 0) return (NULL); return ((const char *)pl->list[pl->index]); } void playlist_skip_next(playlist_t *pl) { if (pl == NULL) { printf("%s: playlist_skip_next(): Internal error: NULL argument\n", __progname); exit(1); } if (pl->program || pl->num == 0) return; if (pl->list[pl->index] != NULL) pl->index++; } unsigned long playlist_get_num_items(playlist_t *pl) { if (pl == NULL) { printf("%s: playlist_get_position(): Internal error: NULL argument\n", __progname); exit(1); } if (pl->program) return (0); return ((unsigned long)pl->num); } unsigned long playlist_get_position(playlist_t *pl) { if (pl == NULL) { printf("%s: playlist_get_position(): Internal error: NULL argument\n", __progname); exit(1); } if (pl->program) return (0); return ((unsigned long)pl->index); } int playlist_set_position(playlist_t *pl, unsigned long idx) { if (pl == NULL) { printf("%s: playlist_set_position(): Internal error: NULL argument\n", __progname); exit(1); } if (pl->program || idx > pl->num - 1) return (0); pl->index = (size_t)idx; return (1); } int playlist_goto_entry(playlist_t *pl, const char *entry) { unsigned long i; if (pl == NULL || entry == NULL) { printf("%s: playlist_goto_entry(): Internal error: Bad arguments\n", __progname); exit(1); } if (pl->program) return (0); for (i = 0; i < pl->num; i++) { if (strcmp(pl->list[i], entry) == 0) { pl->index = (size_t)i; return (1); } } return (0); } void playlist_rewind(playlist_t *pl) { if (pl == NULL) { printf("%s: playlist_rewind(): Internal error: NULL argument\n", __progname); exit(1); } if (pl->program) return; pl->index = 0; } int playlist_reread(playlist_t **plist) { playlist_t *new_pl, *pl; if (plist == NULL || *plist == NULL) { printf("%s: playlist_reread(): Internal error: NULL argument\n", __progname); exit(1); } pl = *plist; if (pl->program) return (0); if ((new_pl = playlist_read(pl->filename)) == NULL) return (0); playlist_free(&pl); *plist = new_pl; return (1); } /* * Yet another implementation of the "Knuth Shuffle": */ void playlist_shuffle(playlist_t *pl) { size_t d, i, range; char *temp; if (pl == NULL) { printf("%s: playlist_shuffle(): Internal error: NULL argument\n", __progname); exit(1); } if (pl->program || pl->num < 2) return; for (i = 0; i < pl->num; i++) { range = pl->num - i; /* * Only accept a random number if it is smaller than the * largest multiple of our range. This reduces PRNG bias. */ do { d = (unsigned long)playlist_random(); } while (d > RAND_MAX - (RAND_MAX % range)); /* * The range starts at the item we want to shuffle, excluding * already shuffled items. */ d = i + (d % range); temp = pl->list[d]; pl->list[d] = pl->list[i]; pl->list[i] = temp; } } const char * playlist_run_program(playlist_t *pl) { FILE *filep; char buf[PATH_MAX]; if (pl == NULL) { printf("%s: playlist_run_program(): Internal error: NULL argument\n", __progname); exit(1); } if (!pl->program) return (NULL); fflush(NULL); errno = 0; if ((filep = popen(pl->filename, "r")) == NULL) { printf("%s: playlist_run_program(): Error while executing '%s'", __progname, pl->filename); /* popen() does not set errno reliably ... */ if (errno) printf(": %s\n", strerror(errno)); else printf("\n"); return (NULL); } if (fgets(buf, (int)sizeof(buf), filep) == NULL) { int errnum = errno; pclose(filep); if (ferror(filep)) { printf("%s: Error while reading output from program '%s': %s\n", __progname, pl->filename, strerror(errnum)); exit(1); } /* No output (end of playlist.) */ return (NULL); } pclose(filep); if (strlen(buf) == sizeof(buf) - 1) { printf("%s: Output from program '%s' too long\n", __progname, pl->filename); return (NULL); } buf[strcspn(buf, "\n")] = '\0'; buf[strcspn(buf, "\r")] = '\0'; if (buf[0] == '\0') /* Empty line (end of playlist.) */ return (NULL); if (pl->prog_track != NULL) xfree(pl->prog_track); pl->prog_track = xstrdup(buf); return ((const char *)pl->prog_track); } ezstream-0.5.6/src/playlist.h0000644000175000017500000000705411246572734015300 0ustar tootstoots/* $Id: playlist.h 15788 2009-03-17 18:20:58Z moritz $ */ /* * Copyright (c) 2007 Moritz Grimm * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef __PLAYLIST_H__ #define __PLAYLIST_H__ typedef struct playlist playlist_t; /* * Initialize the playlist routines. Should be called before any of the other * playlist functions. */ void playlist_init(void); /* * Clean up for clean shutdowns. No-op at the moment. */ void playlist_shutdown(void); /* * Read a playlist file (in .M3U format), and return a new playlist handler * on success, or NULL on failure. */ playlist_t * playlist_read(const char * /* filename */); /* * For each call to playlist_get_next(), the specified program is run. This * program is supposed to print one line to standard output, containing the * path and filename of a media file. */ playlist_t * playlist_program(const char * /* program name */); /* * Free all memory used by a playlist handler that was created with * playlist_read(). */ void playlist_free(playlist_t **); /* * Get the next item in the playlist. Returns a NUL-terminated string of a * playlist entry, or NULL if the end of the list has been reached. */ const char * playlist_get_next(playlist_t *); /* * The functions below work on playlist handlers obtained with playlist_read() * and are no-ops (i.e. return failure) for playlists from playlist_program(). */ /* * Get the next item in the playlist without moving on to the following entry. * Returns a NUL-terminated string of the next playlist entry, or NULL if the * currently playing song is the last one in the list. */ const char * playlist_peek_next(playlist_t *); /* * Skip the playlist item that would be played next. */ void playlist_skip_next(playlist_t *); /* * Get the number of items in the playlist. */ unsigned long playlist_get_num_items(playlist_t *); /* * Get the current position in the playlist. */ unsigned long playlist_get_position(playlist_t *); /* * Set a position in the playlist. Returns 1 on success, and 0 on failure. */ int playlist_set_position(playlist_t *, unsigned long /* index */); /* * Search for a given entry in the playlist and reposition to it. Returns 1 on * success and 0 on failure. A subsequent call to playlist_get_next() will * return this list item again. */ int playlist_goto_entry(playlist_t *, const char * /* name */); /* * Rewind the playlist to the beginning, so that it can be replayed. Does * not reread the playlist file. */ void playlist_rewind(playlist_t *); /* * Reread the playlist file and rewind to the beginning. Equivalent to calling * playlist_free() and playlist_read(). Entries will no longer be shuffled * after calling this function. * Returns 1 on success, and 0 on error. */ int playlist_reread(playlist_t **); /* * Shuffle the entries of the playlist randomly. */ void playlist_shuffle(playlist_t *); #endif /* __PLAYLIST_H__ */ ezstream-0.5.6/src/configfile.c0000644000175000017500000006047211246572734015542 0ustar tootstoots/* $Id: configfile.c 16319 2009-07-22 20:19:38Z moritz $ */ /* * ezstream - source client for Icecast with external en-/decoder support * Copyright (C) 2003, 2004, 2005, 2006 Ed Zaleski * Copyright (C) 2007, 2009 Moritz Grimm * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "ezstream.h" #include "configfile.h" #include "strfctns.h" #include "util.h" #include "xalloc.h" extern char *__progname; static EZCONFIG ezConfig; static const char *blankString = ""; unsigned int checkDecoderLine(const char *, const char *, long); unsigned int checkEncoderLine(const char *, const char *, long); unsigned int checkFormatLine(const char *, const char *, long); EZCONFIG * getEZConfig(void) { return (&ezConfig); } const char * getFormatEncoder(const char *format) { int i; for (i = 0; i < ezConfig.numEncoderDecoders; i++) { if (ezConfig.encoderDecoders[i] != NULL && ezConfig.encoderDecoders[i]->format != NULL && strcmp(ezConfig.encoderDecoders[i]->format, format) == 0) { if (ezConfig.encoderDecoders[i]->encoder != NULL) return (ezConfig.encoderDecoders[i]->encoder); else return (blankString); } } return (blankString); } const char * getFormatDecoder(const char *match) { int i; for (i = 0; i < ezConfig.numEncoderDecoders; i++) { if (ezConfig.encoderDecoders[i] != NULL && ezConfig.encoderDecoders[i]->match != NULL && strcmp(ezConfig.encoderDecoders[i]->match, match) == 0) { if (ezConfig.encoderDecoders[i]->decoder != NULL) return (ezConfig.encoderDecoders[i]->decoder); else return (blankString); } } return (blankString); } int parseConfig(const char *fileName) { xmlDocPtr doc; xmlNodePtr cur; char *ls_xmlContentPtr; int program_set, reconnect_set, shuffle_set, streamOnce_set, svrinfopublic_set; unsigned int config_error; xmlLineNumbersDefault(1); if ((doc = xmlParseFile(fileName)) == NULL) { printf("%s: Parse error (not well-formed XML.)\n", fileName); return (0); } cur = xmlDocGetRootElement(doc); if (cur == NULL) { printf("%s: Parse error (empty XML document.)\n", fileName); xmlFreeDoc(doc); return (0); } memset(&ezConfig, '\000', sizeof(ezConfig)); config_error = 0; program_set = 0; reconnect_set = 0; shuffle_set = 0; streamOnce_set = 0; svrinfopublic_set = 0; for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) { if (!xmlStrcmp(cur->name, (const xmlChar *)"url")) { if (ezConfig.URL != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.URL = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"sourceuser")) { if (ezConfig.username != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.username = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"sourcepassword")) { if (ezConfig.password != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.password = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"format")) { if (ezConfig.format != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { char *p; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.format = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); for (p = ezConfig.format; *p != '\0'; p++) *p = toupper((int)*p); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"filename")) { if (ezConfig.fileName != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (strlen(ls_xmlContentPtr) > PATH_MAX - 1) { printf("%s[%ld]: Error: Path or filename in is too long\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } ezConfig.fileName = UTF8toCHAR(ls_xmlContentPtr, ICONV_REPLACE); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"metadata_progname")) { if (ezConfig.metadataProgram != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (strlen(ls_xmlContentPtr) > PATH_MAX - 1) { printf("%s[%ld]: Error: Path or filename in is too long\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } ezConfig.metadataProgram = UTF8toCHAR(ls_xmlContentPtr, ICONV_REPLACE); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"metadata_format")) { if (ezConfig.metadataFormat != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { unsigned int ret; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.metadataFormat = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); if ((ret = checkFormatLine(ezConfig.metadataFormat, fileName, xmlGetLineNo(cur))) > 0) { config_error += ret; continue; } } } if (!xmlStrcmp(cur->name, (const xmlChar *)"playlist_program")) { if (program_set) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { const char *errstr; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.fileNameIsProgram = (int)strtonum(ls_xmlContentPtr, 0LL, 1LL, &errstr); if (errstr) { printf("%s[%ld]: Error: may only contain 1 or 0\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } xmlFree(ls_xmlContentPtr); program_set = 1; } } if (!xmlStrcmp(cur->name, (const xmlChar *)"shuffle")) { if (shuffle_set) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { const char *errstr; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.shuffle = (int)strtonum(ls_xmlContentPtr, 0LL, 1LL, &errstr); if (errstr) { printf("%s[%ld]: Error: may only contain 1 or 0\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } xmlFree(ls_xmlContentPtr); shuffle_set = 1; } } if (!xmlStrcmp(cur->name, (const xmlChar *)"stream_once")) { if (streamOnce_set) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { const char *errstr; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.streamOnce = (int)strtonum(ls_xmlContentPtr, 0LL, 1LL, &errstr); if (errstr) { printf("%s[%ld]: Error: may only contain 1 or 0\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } xmlFree(ls_xmlContentPtr); streamOnce_set = 1; } } if (!xmlStrcmp(cur->name, (const xmlChar *)"reconnect_tries")) { if (reconnect_set) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { const char *errstr; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.reconnectAttempts = (unsigned int)strtonum(ls_xmlContentPtr, 0LL, (long long)UINT_MAX, &errstr); if (errstr) { printf("%s[%ld]: Error: In : '%s' is %s\n", fileName, xmlGetLineNo(cur), ls_xmlContentPtr, errstr); config_error++; continue; } xmlFree(ls_xmlContentPtr); reconnect_set = 1; } } if (!xmlStrcmp(cur->name, (const xmlChar *)"svrinfoname")) { if (ezConfig.serverName != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.serverName = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"svrinfourl")) { if (ezConfig.serverURL != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.serverURL = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"svrinfogenre")) { if (ezConfig.serverGenre != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.serverGenre = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"svrinfodescription")) { if (ezConfig.serverDescription != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.serverDescription = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"svrinfobitrate")) { if (ezConfig.serverBitrate != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.serverBitrate = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"svrinfochannels")) { if (ezConfig.serverChannels != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.serverChannels = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"svrinfosamplerate")) { if (ezConfig.serverSamplerate != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.serverSamplerate = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"svrinfoquality")) { if (ezConfig.serverQuality != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.serverQuality = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); } } if (!xmlStrcmp(cur->name, (const xmlChar *)"svrinfopublic")) { if (svrinfopublic_set) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur->xmlChildrenNode != NULL) { const char *errstr; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); ezConfig.serverPublic = (int)strtonum(ls_xmlContentPtr, 0LL, 1LL, &errstr); if (errstr) { printf("%s[%ld]: Error: may only contain 1 or 0\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } xmlFree(ls_xmlContentPtr); svrinfopublic_set = 1; } } if (!xmlStrcmp(cur->name, (const xmlChar *)"reencode")) { xmlNodePtr cur2; int enable_set; enable_set = 0; for (cur2 = cur->xmlChildrenNode; cur2 != NULL; cur2 = cur2->next) { if (!xmlStrcmp(cur2->name, (const xmlChar *)"enable")) { if (enable_set) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } if (cur2->xmlChildrenNode != NULL) { const char *errstr; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur2->xmlChildrenNode, 1); ezConfig.reencode = (int)strtonum(ls_xmlContentPtr, 0LL, 1LL, &errstr); if (errstr) { printf("%s[%ld]: Error: may only contain 1 or 0\n", fileName, xmlGetLineNo(cur)); config_error++; continue; } xmlFree(ls_xmlContentPtr); enable_set = 1; } } if (!xmlStrcmp(cur2->name, (const xmlChar *)"encdec")) { xmlNodePtr cur3; FORMAT_ENCDEC *pformatEncDec; pformatEncDec = xcalloc(1UL, sizeof(FORMAT_ENCDEC)); for (cur3 = cur2->xmlChildrenNode; cur3 != NULL; cur3 = cur3->next) { if (!xmlStrcmp(cur3->name, (const xmlChar *)"format")) { if (pformatEncDec->format != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur3)); config_error++; continue; } if (cur3->xmlChildrenNode != NULL) { char *p; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1); pformatEncDec->format = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); for (p = pformatEncDec->format; *p != '\0'; p++) *p = toupper((int)*p); } } if (!xmlStrcmp(cur3->name, (const xmlChar *)"match")) { if (pformatEncDec->match != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur3)); config_error++; continue; } if (cur3->xmlChildrenNode != NULL) { char *p; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1); pformatEncDec->match = xstrdup(ls_xmlContentPtr); xmlFree(ls_xmlContentPtr); for (p = pformatEncDec->match; *p != '\0'; p++) *p = tolower((int)*p); } } if (!xmlStrcmp(cur3->name, (const xmlChar *)"decode")) { if (pformatEncDec->decoder != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur3)); config_error++; continue; } if (cur3->xmlChildrenNode != NULL) { unsigned int ret; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1); pformatEncDec->decoder = UTF8toCHAR(ls_xmlContentPtr, ICONV_REPLACE); xmlFree(ls_xmlContentPtr); if ((ret = checkDecoderLine(pformatEncDec->decoder, fileName, xmlGetLineNo(cur3))) > 0) { config_error += ret; continue; } } } if (!xmlStrcmp(cur3->name, (const xmlChar *)"encode")) { if (pformatEncDec->encoder != NULL) { printf("%s[%ld]: Error: Cannot have multiple elements\n", fileName, xmlGetLineNo(cur3)); config_error++; continue; } if (cur3->xmlChildrenNode != NULL) { unsigned int ret; ls_xmlContentPtr = (char *)xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1); pformatEncDec->encoder = UTF8toCHAR(ls_xmlContentPtr, ICONV_REPLACE); xmlFree(ls_xmlContentPtr); if ((ret = checkEncoderLine(pformatEncDec->encoder, fileName, xmlGetLineNo(cur3))) > 0) { config_error += ret; continue; } } } } ezConfig.encoderDecoders[ezConfig.numEncoderDecoders] = pformatEncDec; ezConfig.numEncoderDecoders++; } } } } xmlFreeDoc(doc); if (config_error == 0) return (1); freeConfig(&ezConfig); printf("%s: %u configuration error(s) in %s\n", __progname, config_error, fileName); return (0); } void freeConfig(EZCONFIG *cfg) { unsigned int i; if (cfg == NULL) return; if (cfg->URL != NULL) xfree(cfg->URL); if (cfg->password != NULL) xfree(cfg->password); if (cfg->format != NULL) xfree(cfg->format); if (cfg->fileName != NULL) xfree(cfg->fileName); if (cfg->metadataProgram != NULL) xfree(cfg->metadataProgram); if (cfg->metadataFormat != NULL) xfree(cfg->metadataFormat); if (cfg->serverName != NULL) xfree(cfg->serverName); if (cfg->serverURL != NULL) xfree(cfg->serverURL); if (cfg->serverGenre != NULL) xfree(cfg->serverGenre); if (cfg->serverDescription != NULL) xfree(cfg->serverDescription); if (cfg->serverBitrate != NULL) xfree(cfg->serverBitrate); if (cfg->serverChannels != NULL) xfree(cfg->serverChannels); if (cfg->serverSamplerate != NULL) xfree(cfg->serverSamplerate); if (cfg->serverQuality != NULL) xfree(cfg->serverQuality); if (cfg->encoderDecoders != NULL) { for (i = 0; i < MAX_FORMAT_ENCDEC; i++) { if (cfg->encoderDecoders[i] != NULL) { if (cfg->encoderDecoders[i]->format != NULL) xfree(cfg->encoderDecoders[i]->format); if (cfg->encoderDecoders[i]->match != NULL) xfree(cfg->encoderDecoders[i]->match); if (cfg->encoderDecoders[i]->encoder != NULL) xfree(cfg->encoderDecoders[i]->encoder); if (cfg->encoderDecoders[i]->decoder != NULL) xfree(cfg->encoderDecoders[i]->decoder); xfree(cfg->encoderDecoders[i]); } } } memset(cfg, 0, sizeof(EZCONFIG)); } unsigned int checkDecoderLine(const char *str, const char *file, long line) { unsigned int errors; char *p; int have_track = 0; errors = 0; if ((p = strstr(str, STRING_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: `%s' placeholder not allowed in decoder command\n", file, line, STRING_PLACEHOLDER); errors++; } if ((p = strstr(str, TRACK_PLACEHOLDER)) != NULL) { p += strlen(TRACK_PLACEHOLDER); if ((p = strstr(p, TRACK_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: Multiple `%s' placeholders in decoder command\n", file, line, TRACK_PLACEHOLDER); errors++; } else have_track = 1; } if ((p = strstr(str, METADATA_PLACEHOLDER)) != NULL) { p += strlen(METADATA_PLACEHOLDER); if ((p = strstr(p, METADATA_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: Multiple `%s' placeholders in decoder command\n", file, line, METADATA_PLACEHOLDER); errors++; } } if ((p = strstr(str, ARTIST_PLACEHOLDER)) != NULL) { p += strlen(ARTIST_PLACEHOLDER); if ((p = strstr(p, ARTIST_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: Multiple `%s' placeholders in decoder command\n", file, line, ARTIST_PLACEHOLDER); errors++; } } if ((p = strstr(str, TITLE_PLACEHOLDER)) != NULL) { p += strlen(TITLE_PLACEHOLDER); if ((p = strstr(p, TITLE_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: Multiple `%s' placeholders in decoder command\n", file, line, TITLE_PLACEHOLDER); errors++; } } if (!have_track) { printf("%s[%ld]: Error: The decoder command requires the '%s' track placeholder\n", file, line, TRACK_PLACEHOLDER); errors++; } return (errors); } unsigned int checkEncoderLine(const char *str, const char *file, long line) { unsigned int errors; char *p; errors = 0; if ((p = strstr(str, TRACK_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: `%s' placeholder not allowed in encoder command\n", file, line, TRACK_PLACEHOLDER); errors++; } if ((p = strstr(str, STRING_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: `%s' placeholder not allowed in encoder command\n", file, line, STRING_PLACEHOLDER); errors++; } if ((p = strstr(str, METADATA_PLACEHOLDER)) != NULL) { p += strlen(METADATA_PLACEHOLDER); if ((p = strstr(p, METADATA_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: Multiple `%s' placeholders in encoder command\n", file, line, METADATA_PLACEHOLDER); errors++; } } if ((p = strstr(str, ARTIST_PLACEHOLDER)) != NULL) { p += strlen(ARTIST_PLACEHOLDER); if ((p = strstr(p, ARTIST_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: Multiple `%s' placeholders in encoder command\n", file, line, ARTIST_PLACEHOLDER); errors++; } } if ((p = strstr(str, TITLE_PLACEHOLDER)) != NULL) { p += strlen(TITLE_PLACEHOLDER); if ((p = strstr(p, TITLE_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: Multiple `%s' placeholders in encoder command\n", file, line, TITLE_PLACEHOLDER); errors++; } } return (errors); } unsigned int checkFormatLine(const char *str, const char *file, long line) { unsigned int errors; char *p; errors = 0; if ((p = strstr(str, METADATA_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: `%s' placeholder not allowed in \n", file, line, METADATA_PLACEHOLDER); errors++; } if ((p = strstr(str, TRACK_PLACEHOLDER)) != NULL) { p += strlen(TRACK_PLACEHOLDER); if ((p = strstr(p, TRACK_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: Multiple `%s' placeholders in \n", file, line, TRACK_PLACEHOLDER); errors++; } } if ((p = strstr(str, STRING_PLACEHOLDER)) != NULL) { p += strlen(STRING_PLACEHOLDER); if ((p = strstr(p, STRING_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: Multiple `%s' placeholders in \n", file, line, STRING_PLACEHOLDER); errors++; } } if ((p = strstr(str, ARTIST_PLACEHOLDER)) != NULL) { p += strlen(ARTIST_PLACEHOLDER); if ((p = strstr(p, ARTIST_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: Multiple `%s' placeholders in \n", file, line, ARTIST_PLACEHOLDER); errors++; } } if ((p = strstr(str, TITLE_PLACEHOLDER)) != NULL) { p += strlen(TITLE_PLACEHOLDER); if ((p = strstr(p, TITLE_PLACEHOLDER)) != NULL) { printf("%s[%ld]: Error: Multiple `%s' placeholders in \n", file, line, TITLE_PLACEHOLDER); errors++; } } return (errors); } ezstream-0.5.6/src/configfile.h0000644000175000017500000000427211246572734015543 0ustar tootstoots/* $Id: configfile.h 16319 2009-07-22 20:19:38Z moritz $ */ /* * ezstream - source client for Icecast with external en-/decoder support * Copyright (C) 2003, 2004, 2005, 2006 Ed Zaleski * Copyright (C) 2007 Moritz Grimm * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __CONFIGFILE_H__ #define __CONFIGFILE_H__ #include #define MP3_FORMAT "MP3" #define VORBIS_FORMAT "VORBIS" #define THEORA_FORMAT "THEORA" #define MAX_FORMAT_ENCDEC 15 #define TRACK_PLACEHOLDER "@T@" #define METADATA_PLACEHOLDER "@M@" #define ARTIST_PLACEHOLDER "@a@" #define TITLE_PLACEHOLDER "@t@" #define STRING_PLACEHOLDER "@s@" typedef struct tag_FORMAT_ENCDEC { char *format; char *match; char *encoder; char *decoder; } FORMAT_ENCDEC; typedef struct tag_EZCONFIG { char *URL; char *username; char *password; char *format; char *fileName; char *metadataProgram; char *metadataFormat; char *serverName; char *serverURL; char *serverGenre; char *serverDescription; char *serverBitrate; char *serverChannels; char *serverSamplerate; char *serverQuality; int serverPublic; int reencode; FORMAT_ENCDEC *encoderDecoders[MAX_FORMAT_ENCDEC]; int numEncoderDecoders; int shuffle; int fileNameIsProgram; int streamOnce; unsigned int reconnectAttempts; } EZCONFIG; EZCONFIG * getEZConfig(void); const char * getFormatEncoder(const char *format); const char * getFormatDecoder(const char *match); int parseConfig(const char *fileName); void freeConfig(EZCONFIG *); #endif /* __CONFIGFILE_H__ */ ezstream-0.5.6/src/metadata.c0000644000175000017500000003726011246572734015214 0ustar tootstoots/* $Id: metadata.c 15797 2009-03-18 20:15:24Z moritz $ */ /* * Copyright (c) 2007, 2009 Moritz Grimm * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "ezstream.h" #ifdef HAVE_TAGLIB # include #endif /* HAVE_TAGLIB */ #ifdef HAVE_VORBISFILE # include #endif /* HAVE_VORBISFILE */ #include #include "metadata.h" #include "strfctns.h" #include "util.h" #include "xalloc.h" /* Usually defined in . */ #ifndef S_IEXEC # define S_IEXEC S_IXUSR #endif /* !S_IEXEC */ extern char *__progname; extern int vFlag; static const char *blankString = ""; struct metadata { char *filename; char *string; char *artist; char *title; int songLen; int normalize; int program; }; struct ID3Tag { char tag[3]; char trackName[30]; char artistName[30]; char albumName[30]; char year[4]; char comment[30]; char genre; }; metadata_t * metadata_create(const char *); void metadata_use_taglib(metadata_t *, FILE **); void metadata_use_self(metadata_t *, FILE **); void metadata_clean_md(metadata_t *); void metadata_get_extension(char *, size_t, const char *); char * metadata_get_name(const char *); void metadata_process_md(metadata_t *); void metadata_normalize_string(char **); metadata_t * metadata_create(const char *filename) { metadata_t *md; md = xcalloc(1UL, sizeof(metadata_t)); md->filename = xstrdup(filename); md->songLen = -1; return (md); } void metadata_use_taglib(metadata_t *md, FILE **filep) #ifdef HAVE_TAGLIB { TagLib_File *tf; TagLib_Tag *tt; const TagLib_AudioProperties *ta; char *str; if (md == NULL || md->filename == NULL) { printf("%s: metadata_use_taglib(): Internal error: Bad arguments\n", __progname); abort(); } if (filep != NULL) fclose(*filep); metadata_clean_md(md); taglib_set_string_management_enabled(0); #ifdef HAVE_ICONV taglib_set_strings_unicode(1); #else taglib_set_strings_unicode(0); #endif /* HAVE_ICONV */ if (md->string != NULL) { xfree(md->string); md->string = NULL; } if ((tf = taglib_file_new(md->filename)) == NULL) { md->string = metadata_get_name(md->filename); return; } tt = taglib_file_tag(tf); ta = taglib_file_audioproperties(tf); str = taglib_tag_artist(tt); if (str != NULL) { if (strlen(str) > 0) md->artist = xstrdup(str); free(str); } str = taglib_tag_title(tt); if (str != NULL) { if (strlen(str) > 0) md->title = xstrdup(str); free(str); } md->songLen = taglib_audioproperties_length(ta); taglib_file_free(tf); } #else { (void)md; (void)filep; printf("%s: Internal error: metadata_use_taglib() called without TagLib support\n", __progname); abort(); } #endif /* HAVE_TAGLIB */ void metadata_use_self(metadata_t *md, FILE **filep) #ifdef HAVE_TAGLIB { (void)md; (void)filep; printf("%s: Internal error: metadata_use_self() called with TagLib support\n", __progname); abort(); } #else { char extension[25]; struct ID3Tag id3tag; if (md == NULL || filep == NULL || *filep == NULL || md->filename == NULL) { printf("%s: metadata_use_self(): Internal error: Bad arguments\n", __progname); abort(); } metadata_clean_md(md); metadata_get_extension(extension, sizeof(extension), md->filename); if (strcmp(extension, ".mp3") == 0) { memset(&id3tag, 0, sizeof(id3tag)); fseek(*filep, -128L, SEEK_END); fread(&id3tag, 1UL, sizeof(struct ID3Tag), *filep); if (memcmp(id3tag.tag, "TAG", 3UL) == 0) { if (strlen(id3tag.artistName) > 0) md->artist = CHARtoUTF8(id3tag.artistName, ICONV_REPLACE); if (strlen(id3tag.trackName) > 0) md->title = CHARtoUTF8(id3tag.trackName, ICONV_REPLACE); } #ifdef HAVE_VORBISFILE } else if (strcmp(extension, ".ogg") == 0) { OggVorbis_File vf; int ret; if ((ret = ov_open(*filep, &vf, NULL, 0L)) != 0) { switch (ret) { case OV_EREAD: printf("%s: ov_open(): %s: Media read error\n", __progname, md->filename); break; case OV_ENOTVORBIS: printf("%s: ov_open(): %s: Invalid Vorbis bitstream\n", __progname, md->filename); break; case OV_EVERSION: printf("%s: ov_open(): %s: Vorbis version mismatch\n", __progname, md->filename); break; case OV_EBADHEADER: printf("%s: ov_open(): %s: Invalid Vorbis bitstream header\n", __progname, md->filename); break; case OV_EFAULT: printf("%s: Fatal: Internal libvorbisfile fault\n", __progname); abort(); default: printf("%s: ov_open(): %s: ov_read() returned unknown error\n", __progname, md->filename); break; } } else { char **ptr; for (ptr = ov_comment(&vf, -1)->user_comments; *ptr != NULL; ptr++) { if (md->artist == NULL && strncasecmp(*ptr, "ARTIST", strlen("ARTIST")) == 0) { if (strlen(*ptr + strlen("ARTIST=")) > 0) md->artist = xstrdup(*ptr + strlen("ARTIST=")); } if (md->title == NULL && strncasecmp(*ptr, "TITLE", strlen("TITLE")) == 0) { if (strlen(*ptr + strlen("TITLE=")) > 0) md->title = xstrdup(*ptr + strlen("TITLE=")); } } ov_clear(&vf); *filep = NULL; } #endif /* HAVE_VORBISFILE */ } if (*filep != NULL) fclose(*filep); if (md->artist == NULL && md->title == NULL) md->string = metadata_get_name(md->filename); } #endif /* HAVE_TAGLIB */ void metadata_clean_md(metadata_t *md) { if (md == NULL) { printf("%s: Internal error: metadata_clean_md(): NULL argument\n", __progname); abort(); } if (md->string != NULL) { xfree(md->string); md->string = NULL; } if (md->artist != NULL) { xfree(md->artist); md->artist = NULL; } if (md->title != NULL) { xfree(md->title); md->title = NULL; } } void metadata_get_extension(char *buf, size_t siz, const char *filename) { char *p; if (buf == NULL || siz == 0 || filename == NULL) { printf("%s: metadata_get_extension(): Internal error: Bad arguments\n", __progname); abort(); } if ((p = strrchr(filename, '.')) != NULL) strlcpy(buf, p, siz); else buf[0] = '\0'; for (p = buf; *p != '\0'; p++) *p = tolower((int)*p); } char * metadata_get_name(const char *file) { char *filename = xstrdup(file); char *p1, *p2, *name; if (file == NULL) { printf("%s: metadata_get_name(): Internal error: Bad arguments\n", __progname); abort(); } if ((p1 = local_basename(filename)) == NULL) { printf("%s: Internal error: basename() failed with '%s'\n", __progname, filename); exit(1); } if ((p2 = strrchr(p1, '.')) != NULL) *p2 = '\0'; if (strlen(p1) == 0) name = xstrdup("[unknown]"); else name = CHARtoUTF8(p1, ICONV_REPLACE); xfree(filename); return (name); } void metadata_process_md(metadata_t *md) { if (md == NULL) { printf("%s: metadata_process_md(): Internal error: Bad arguments\n", __progname); abort(); } if (md->string == NULL) md->string = metadata_assemble_string(md); if (md->normalize) { metadata_normalize_string(&md->string); metadata_normalize_string(&md->artist); metadata_normalize_string(&md->title); } } void metadata_normalize_string(char **s) { char *str, *cp, *tmpstr, *tp; int is_space; if (s == NULL || (str = *s) == NULL || strlen(str) == 0) return; tmpstr = xcalloc(strlen(str) + 1, sizeof(char)); tp = tmpstr; is_space = 1; for (cp = str; *cp != '\0'; cp++) { if (*cp == ' ') { if (!is_space && strlen(tmpstr) > 0 && tmpstr[strlen(tmpstr) - 1] != ' ') *tp++ = ' '; is_space = 1; } else { *tp++ = *cp; is_space = 0; } } if (strlen(tmpstr) > 0 && tmpstr[strlen(tmpstr) - 1] == ' ') tmpstr[strlen(tmpstr) - 1] = '\0'; xfree(str); *s = xrealloc(tmpstr, strlen(tmpstr) + 1, sizeof (char)); } metadata_t * metadata_file(const char *filename, int normalize) { metadata_t *md; if (filename == NULL || strlen(filename) == 0) { printf("%s: metadata_file(): Internal error: Bad arguments\n", __progname); abort(); } md = metadata_create(filename); if (!metadata_file_update(md)) { metadata_free(&md); return (NULL); } md->normalize = normalize; return (md); } metadata_t * metadata_program(const char *program, int normalize) { metadata_t *md; #ifdef HAVE_STAT struct stat st; #else FILE *filep; #endif if (program == NULL || strlen(program) == 0) { printf("%s: metadata_program(): Internal error: Bad arguments\n", __progname); abort(); } md = metadata_create(program); md->program = 1; md->string = xstrdup(""); #ifdef HAVE_STAT if (stat(program, &st) == -1) { printf("%s: %s: %s\n", __progname, program, strerror(errno)); metadata_free(&md); return (NULL); } if (st.st_mode & (S_IWGRP | S_IWOTH)) { printf("%s: Error: %s is group and/or world writeable\n", __progname, program); metadata_free(&md); return (NULL); } if (!(st.st_mode & (S_IEXEC | S_IXGRP | S_IXOTH))) { printf("%s: %s: Not an executable program\n", __progname, program); metadata_free(&md); return (NULL); } #else if ((filep = fopen(program, "r")) == NULL) { printf("%s: %s: %s\n", __progname, program, strerror(errno)); metadata_free(&md); return (NULL); } fclose(filep); #endif /* HAVE_STAT */ md->normalize = normalize; return (md); } void metadata_free(metadata_t **md_p) { metadata_t *md; if (md_p == NULL || (md = *md_p) == NULL) return; if (md->filename != NULL) { xfree(md->filename); md->filename = NULL; } metadata_clean_md(md); xfree(*md_p); *md_p = NULL; } int metadata_file_update(metadata_t *md) { FILE *filep; if (md == NULL) { printf("%s: metadata_file_update(): Internal error: NULL argument\n", __progname); abort(); } if (md->program) { printf("%s: metadata_file_update(): Internal error: Called with program handle\n", __progname); abort(); } if ((filep = fopen(md->filename, "rb")) == NULL) { printf("%s: %s: %s\n", __progname, md->filename, strerror(errno)); return (0); } #ifdef HAVE_TAGLIB metadata_use_taglib(md, &filep); #else metadata_use_self(md, &filep); #endif /* HAVE_TAGLIB */ metadata_process_md(md); return (1); } int metadata_program_update(metadata_t *md, enum metadata_request md_req) { FILE *filep; char buf[METADATA_MAX + 1]; char command[PATH_MAX + sizeof(" artist")]; if (md == NULL) { printf("%s: metadata_program_update(): Internal error: NULL argument\n", __progname); abort(); } if (!md->program) { printf("%s: metadata_program_update(): Internal error: Received file handle\n", __progname); abort(); } switch (md_req) { case METADATA_ALL: metadata_clean_md(md); if (!metadata_program_update(md, METADATA_STRING) || !metadata_program_update(md, METADATA_ARTIST) || !metadata_program_update(md, METADATA_TITLE)) return (0); else return (1); case METADATA_STRING: strlcpy(command, md->filename, sizeof(command)); if (md->string != NULL) { xfree(md->string); md->string = NULL; } break; case METADATA_ARTIST: snprintf(command, sizeof(command), "%s artist", md->filename); if (md->artist != NULL) { xfree(md->artist); md->artist = NULL; } break; case METADATA_TITLE: snprintf(command, sizeof(command), "%s title", md->filename); if (md->title != NULL) { xfree(md->title); md->title = NULL; } break; default: printf("%s: metadata_program_update(): Internal error: Unknown md_req\n", __progname); abort(); } fflush(NULL); errno = 0; if (vFlag > 1) printf("%s: Running command `%s`\n", __progname, command); if ((filep = popen(command, "r")) == NULL) { printf("%s: playlist_run_program(): Error while executing '%s'", __progname, command); /* popen() does not set errno reliably ... */ if (errno) printf(": %s\n", strerror(errno)); else printf("\n"); return (0); } if (fgets(buf, (int)sizeof(buf), filep) == NULL) { if (ferror(filep)) printf("%s: Error while reading output from program '%s': %s\n", __progname, md->filename, strerror(errno)); pclose(filep); printf("%s: FATAL: External program '%s' not (or no longer) usable.\n", __progname, md->filename); exit(1); } pclose(filep); if (strlen(buf) == sizeof(buf) - 1) printf("%s: Warning: Metadata string received via '%s' is too long and has been truncated\n", __progname, command); buf[strcspn(buf, "\n")] = '\0'; buf[strcspn(buf, "\r")] = '\0'; switch (md_req) { case METADATA_STRING: if (strlen(buf) == 0) { printf("%s: Warning: Empty metadata string received from '%s'\n", __progname, md->filename); md->string = xstrdup(""); } else md->string = xstrdup(buf); break; case METADATA_ARTIST: if (strlen(buf) > 0) md->artist = xstrdup(buf); break; case METADATA_TITLE: if (strlen(buf) > 0) md->title = xstrdup(buf); break; case METADATA_ALL: default: printf("%s: metadata_program_update(): Internal error: METADATA_ALL in code unreachable by METADATA_ALL\n", __progname); abort(); } if (md->normalize) { metadata_normalize_string(&md->string); metadata_normalize_string(&md->artist); metadata_normalize_string(&md->title); } return (1); } const char * metadata_get_string(metadata_t *md) { if (md == NULL) { printf("%s: metadata_get_string(): Internal error: Bad arguments\n", __progname); abort(); } if (md->string == NULL) { printf("%s: metadata_get_string(): Internal error: md->string cannot be NULL\n", __progname); abort(); } return (md->string); } const char * metadata_get_artist(metadata_t *md) { if (md == NULL) { printf("%s: metadata_get_artist(): Internal error: Bad arguments\n", __progname); abort(); } if (md->artist == NULL) return (blankString); else return (md->artist); } const char * metadata_get_title(metadata_t *md) { if (md == NULL) { printf("%s: metadata_get_title(): Internal error: Bad arguments\n", __progname); abort(); } if (md->title == NULL) return (blankString); else return (md->title); } const char * metadata_get_filename(metadata_t *md) { if (md == NULL) { printf("%s: metadata_get_filename(): Internal error: Bad arguments\n", __progname); abort(); } if (md->filename == NULL) /* Should never happen: */ return (blankString); else return (md->filename); } int metadata_get_length(metadata_t *md) { if (md == NULL) { printf("%s: metadata_get_length(): Internal error: Bad arguments\n", __progname); abort(); } return (md->songLen); } char * metadata_assemble_string(metadata_t *md) { size_t len; char *str; if (md == NULL) { printf("%s: metadata_assemble_string(): Internal error: Bad arguments\n", __progname); abort(); } if (md->artist == NULL && md->title == NULL && md->program == 0) return (metadata_get_name(md->filename)); len = 0; if (md->artist != NULL) len += strlen(md->artist); if (md->title != NULL) { if (len > 0) len += strlen(" - "); len += strlen(md->title); } len++; str = xcalloc(len, sizeof(char)); if (md->artist != NULL) strlcpy(str, md->artist, len); if (md->title != NULL) { if (md->artist != NULL) strlcat(str, " - ", len); strlcat(str, md->title, len); } return (str); } ezstream-0.5.6/src/metadata.h0000644000175000017500000000774011246572734015221 0ustar tootstoots/* $Id: metadata.h 15788 2009-03-17 18:20:58Z moritz $ */ /* * Copyright (c) 2007 Moritz Grimm * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef __METADATA_H__ #define __METADATA_H__ #define METADATA_MAX 1023 enum metadata_request { METADATA_ALL = 0, METADATA_STRING, METADATA_ARTIST, METADATA_TITLE }; typedef struct metadata metadata_t; /* * Read the metadata of a media file and return a new metadata handle on * success, or NULL on failure. The returned handle is "branded" for reading * metadata from media files. */ metadata_t * metadata_file(const char * /* filename */, int /* normalize strings */); /* * Create a metadata handle that is "branded" for acquiring metadata from an * external program. The handle is returned on success, or NULL on failure. * The program is NOT YET being queried, use metadata_program_update() for * that. Also, the program (or script) needs to follow these rules: * * - Print one line to standard output and exit. * - Accept no command line parameter and return a complete metadata string * (for metadata_get_string()). The program *should* always return * something in this case (e.g. something based on the filename in case no * metadata is available.) * - Accept the command line parameter "artist" and return only the artist * metadata, or an empty string if no artist information is available. * - Accept the command line parameter "title" and return only the song title * metadata, or an empty string if no artist information is available. * - Return at most METADATA_MAX characters, or the result will be truncated. */ metadata_t * metadata_program(const char * /* program name */, int /* normalize strings */); /* * Free all memory used by a metadata handle that has been created with * metadata_file() or metadata_program(). */ void metadata_free(metadata_t **); /* * Update/read the metadata for the given handle. Returns 1 on success, and 0 * on failure. */ int metadata_file_update(metadata_t *); /* * Update/read the specified metadata for the given program-handle. Returns 1 * on success, and 0 on failure. */ int metadata_program_update(metadata_t *, enum metadata_request); /* * Returns a pointer to a metadata string ``artist - title'', or just * ``artist'' or ``title'' if one of the two is not available. If neither * are present, it returns the filename without the extension. An empty string * is returned for metadata_program() handles that didn't supply any generic * information. */ const char * metadata_get_string(metadata_t *); /* * Returns a pointer to the artist string, which may be empty. */ const char * metadata_get_artist(metadata_t *); /* * Returns a pointer to the title string, which may be empty. */ const char * metadata_get_title(metadata_t *); /* * Returns a pointer to the filename used in the metadata handle. */ const char * metadata_get_filename(metadata_t *); /* * Returns the length of the song, in seconds, or -1 if the information is not * available. */ int metadata_get_length(metadata_t *); /* * Allocates and returns a meaningful string based on a metadata handle's * content. The result is what metadata_get_string() defaults to if an external * program is not used. */ char * metadata_assemble_string(metadata_t *); #endif /* __METADATA_H__ */ ezstream-0.5.6/src/strlcat.c0000644000175000017500000000347211246572734015106 0ustar tootstoots/* $Id: strlcat.c 15788 2009-03-17 18:20:58Z moritz $ */ /* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */ /* * Copyright (c) 1998 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_SYS_TYPES_H # include #endif #include #include "strfctns.h" /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters * will be copied. Always NUL terminates (unless siz <= strlen(dst)). * Returns strlen(src) + MIN(siz, strlen(initial dst)). * If retval >= siz, truncation occurred. */ size_t local_strlcat(char *dst, const char *src, size_t siz) { char *d = dst; const char *s = src; size_t n = siz; size_t dlen; /* Find the end of dst and adjust bytes left but don't go past end */ while (n-- != 0 && *d != '\0') d++; dlen = d - dst; n = siz - dlen; if (n == 0) return(dlen + strlen(s)); while (*s != '\0') { if (n != 1) { *d++ = *s; n--; } s++; } *d = '\0'; return(dlen + (s - src)); /* count does not include NUL */ } ezstream-0.5.6/src/strlcpy.c0000644000175000017500000000330011246572734015120 0ustar tootstoots/* $Id: strlcpy.c 15788 2009-03-17 18:20:58Z moritz $ */ /* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */ /* * Copyright (c) 1998 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_SYS_TYPES_H # include #endif #include #include "strfctns.h" /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). * Returns strlen(src); if retval >= siz, truncation occurred. */ size_t local_strlcpy(char *dst, const char *src, size_t siz) { char *d = dst; const char *s = src; size_t n = siz; /* Copy as many bytes as will fit */ if (n != 0) { while (--n != 0) { if ((*d++ = *s++) == '\0') break; } } /* Not enough room in dst, add NUL and traverse rest of src */ if (n == 0) { if (siz != 0) *d = '\0'; /* NUL-terminate dst */ while (*s++) ; } return(s - src - 1); /* count does not include NUL */ } ezstream-0.5.6/src/compat.c0000644000175000017500000000472311246572734014715 0ustar tootstoots/* $Id: compat.c 15798 2009-03-18 20:24:35Z moritz $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "ezstream.h" #if defined(HAVE_LIBGEN_H) && !defined(__linux__) # include #endif /* HAVE_LIBGEN_H && !__linux__ */ #ifndef PATH_SEPARATORS # define PATH_SEPARATORS "/" #endif /* !PATH_SEPARATORS */ const char *path_separators = PATH_SEPARATORS; char * local_basename(const char *); static inline int is_separator(int); static inline int is_separator(int c) { const char *cp; for (cp = path_separators; '\0' != *cp; cp++) { if (*cp == c) return (1); } return (0); } /* * Modified basename() implementation from OpenBSD, based on: * $OpenBSD: src/lib/libc/gen/basename.c,v 1.14 2005/08/08 08:05:33 espie Exp $ */ /* * Copyright (c) 1997, 2004 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ char * local_basename(const char *path) { #ifdef HAVE_BASENAME return (basename(path)); #else /* HAVE_BASENAME */ static char bname[PATH_MAX]; size_t len; const char *startp, *endp; if (path == NULL || *path == '\0') { bname[0] = '.'; bname[1] = '\0'; return (bname); } /* Strip any trailing path separators */ endp = path + strlen(path) - 1; while (endp > path && is_separator(*endp)) endp--; /* * All path separators become a single one; pick the first in the * list as the default. */ if (endp == path && is_separator(*endp)) { bname[0] = path_separators[0]; bname[1] = '\0'; return (bname); } /* Find the start of the base */ startp = endp; while (startp > path && !is_separator(*(startp - 1))) startp--; len = endp - startp + 1; if (len >= sizeof(bname)) { errno = ENAMETOOLONG; return (NULL); } memcpy(bname, startp, len); bname[len] = '\0'; return (bname); #endif /* HAVE_BASENAME */ } ezstream-0.5.6/src/getopt.c0000644000175000017500000002274611246572734014741 0ustar tootstoots/* $Id: getopt.c 15794 2009-03-18 09:10:28Z moritz $ */ /* $OpenBSD: getopt_long.c,v 1.23 2007/10/31 12:34:57 chl Exp $ */ /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ /* * Copyright (c) 2002 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Sponsored in part by the Defense Advanced Research Projects * Agency (DARPA) and Air Force Research Laboratory, Air Force * Materiel Command, USAF, under agreement number F39502-99-1-0512. */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Dieter Baron and Thomas Klausner. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "ezstream.h" int local_getopt(int, char * const *, const char *); #ifndef HAVE_GETOPT int opterr = 1; /* if error message should be printed */ int optind = 1; /* index into parent argv vector */ int optopt = '?'; /* character checked for validity */ int optreset; /* reset getopt */ char *optarg; /* argument associated with option */ #define PRINT_ERROR ((opterr) && (*options != ':')) #define FLAG_PERMUTE 0x01 /* permute non-options to the end of argv */ #define FLAG_ALLARGS 0x02 /* treat non-options as args to option "-1" */ #define FLAG_LONGONLY 0x04 /* operate as getopt_long_only */ /* return values */ #define BADCH (int)'?' #define BADARG ((*options == ':') ? (int)':' : (int)'?') #define INORDER (int)1 #define EMSG "" static int getopt_internal(int, char * const *, const char *, int); static int gcd(int, int); static void permute_args(int, int, int, char * const *); static char *place = EMSG; /* option letter processing */ /* XXX: set optreset to 1 rather than these two */ static int nonopt_start = -1; /* first non option argument (for permute) */ static int nonopt_end = -1; /* first option after non options (for permute) */ /* Error messages */ static const char recargchar[] = "option requires an argument -- %c\n"; static const char illoptchar[] = "unknown option -- %c\n"; /* * Compute the greatest common divisor of a and b. */ static int gcd(int a, int b) { int c; c = a % b; while (c != 0) { a = b; b = c; c = a % b; } return (b); } /* * Exchange the block from nonopt_start to nonopt_end with the block * from nonopt_end to opt_end (keeping the same order of arguments * in each block). */ static void permute_args(int panonopt_start, int panonopt_end, int opt_end, char * const *nargv) { int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; char *swap; /* * compute lengths of blocks and number and size of cycles */ nnonopts = panonopt_end - panonopt_start; nopts = opt_end - panonopt_end; ncycle = gcd(nnonopts, nopts); cyclelen = (opt_end - panonopt_start) / ncycle; for (i = 0; i < ncycle; i++) { cstart = panonopt_end+i; pos = cstart; for (j = 0; j < cyclelen; j++) { if (pos >= panonopt_end) pos -= nnonopts; else pos += nopts; swap = nargv[pos]; /* LINTED const cast */ ((char **) nargv)[pos] = nargv[cstart]; /* LINTED const cast */ ((char **)nargv)[cstart] = swap; } } } /* * getopt_internal -- * Parse argc/argv argument vector. Called by user level routines. */ static int getopt_internal(int nargc, char * const *nargv, const char *options, int flags) { char *oli; /* option letter list index */ int optchar; static int posixly_correct = -1; if (options == NULL) return (-1); /* * Disable GNU extensions if POSIXLY_CORRECT is set or options * string begins with a '+'. */ if (posixly_correct == -1) posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); if (posixly_correct || *options == '+') flags &= ~FLAG_PERMUTE; else if (*options == '-') flags |= FLAG_ALLARGS; if (*options == '+' || *options == '-') options++; /* * XXX Some GNU programs (like cvs) set optind to 0 instead of * XXX using optreset. Work around this braindamage. */ if (optind == 0) optind = optreset = 1; optarg = NULL; if (optreset) nonopt_start = nonopt_end = -1; start: if (optreset || !*place) { /* update scanning pointer */ optreset = 0; if (optind >= nargc) { /* end of argument vector */ place = EMSG; if (nonopt_end != -1) { /* do permutation, if we have to */ permute_args(nonopt_start, nonopt_end, optind, nargv); optind -= nonopt_end - nonopt_start; } else if (nonopt_start != -1) { /* * If we skipped non-options, set optind * to the first of them. */ optind = nonopt_start; } nonopt_start = nonopt_end = -1; return (-1); } if (*(place = nargv[optind]) != '-' || (place[1] == '\0' && strchr(options, '-') == NULL)) { place = EMSG; /* found non-option */ if (flags & FLAG_ALLARGS) { /* * GNU extension: * return non-option as argument to option 1 */ optarg = nargv[optind++]; return (INORDER); } if (!(flags & FLAG_PERMUTE)) { /* * If no permutation wanted, stop parsing * at first non-option. */ return (-1); } /* do permutation */ if (nonopt_start == -1) nonopt_start = optind; else if (nonopt_end != -1) { permute_args(nonopt_start, nonopt_end, optind, nargv); nonopt_start = optind - (nonopt_end - nonopt_start); nonopt_end = -1; } optind++; /* process next argument */ goto start; } if (nonopt_start != -1 && nonopt_end == -1) nonopt_end = optind; /* * If we have "-" do nothing, if "--" we are done. */ if (place[1] != '\0' && *++place == '-' && place[1] == '\0') { optind++; place = EMSG; /* * We found an option (--), so if we skipped * non-options, we have to permute. */ if (nonopt_end != -1) { permute_args(nonopt_start, nonopt_end, optind, nargv); optind -= nonopt_end - nonopt_start; } nonopt_start = nonopt_end = -1; return (-1); } } if ((optchar = (int)*place++) == (int)':' || (optchar == (int)'-' && *place != '\0') || (oli = strchr(options, optchar)) == NULL) { /* * If the user specified "-" and '-' isn't listed in * options, return -1 (non-option) as per POSIX. * Otherwise, it is an unknown option character (or ':'). */ if (optchar == (int)'-' && *place == '\0') return (-1); if (!*place) ++optind; if (PRINT_ERROR) fprintf(stderr, illoptchar, optchar); optopt = optchar; return (BADCH); } if (*++oli != ':') { /* doesn't take argument */ if (!*place) ++optind; } else { /* takes (optional) argument */ optarg = NULL; if (*place) /* no white space */ optarg = place; else if (oli[1] != ':') { /* arg not optional */ if (++optind >= nargc) { /* no arg */ place = EMSG; if (PRINT_ERROR) fprintf(stderr, recargchar, optchar); optopt = optchar; return (BADARG); } else optarg = nargv[optind]; } place = EMSG; ++optind; } /* dump back option letter */ return (optchar); } #endif /* !HAVE_GETOPT */ /* * getopt -- * Parse argc/argv argument vector. * * [eventually this will replace the BSD getopt] */ int local_getopt(int nargc, char * const *nargv, const char *options) { #ifdef HAVE_GETOPT return (getopt(nargc, nargv, options)); #else /* HAVE_GETOPT */ /* * We don't pass FLAG_PERMUTE to getopt_internal() since * the BSD getopt(3) (unlike GNU) has never done this. * * Furthermore, since many privileged programs call getopt() * before dropping privileges it makes sense to keep things * as simple (and bug-free) as possible. */ return (getopt_internal(nargc, nargv, options, 0)); #endif /* HAVE_GETOPT */ } ezstream-0.5.6/src/ezstream.c0000644000175000017500000010177111246572734015265 0ustar tootstoots/* $Id: ezstream.c 16537 2009-08-30 21:55:24Z moritz $ */ /* * ezstream - source client for Icecast with external en-/decoder support * Copyright (C) 2003, 2004, 2005, 2006 Ed Zaleski * Copyright (C) 2007, 2009 Moritz Grimm * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "ezstream.h" #ifdef HAVE_SIGNAL_H # include #endif #include #include "configfile.h" #include "metadata.h" #include "playlist.h" #include "strfctns.h" #include "util.h" #include "xalloc.h" #define STREAM_DONE 0 #define STREAM_CONT 1 #define STREAM_SKIP 2 #define STREAM_SERVERR 3 #define STREAM_UPDMDATA 4 #ifdef HAVE___PROGNAME extern char *__progname; #else char *__progname; #endif /* HAVE___PROGNAME */ int nFlag; int qFlag; int sFlag; int vFlag; int metadataFromProgram; EZCONFIG *pezConfig = NULL; playlist_t *playlist = NULL; int playlistMode = 0; unsigned int resource_errors = 0; #ifdef HAVE_SIGNALS const int ezstream_signals[] = { SIGTERM, SIGINT, SIGHUP, SIGUSR1, SIGUSR2 }; volatile sig_atomic_t rereadPlaylist = 0; volatile sig_atomic_t rereadPlaylist_notify = 0; volatile sig_atomic_t skipTrack = 0; volatile sig_atomic_t queryMetadata = 0; volatile sig_atomic_t quit = 0; #else int rereadPlaylist = 0; int rereadPlaylist_notify = 0; int skipTrack = 0; int queryMetadata = 0; int quit = 0; #endif /* HAVE_SIGNALS */ typedef struct tag_ID3Tag { char tag[3]; char trackName[30]; char artistName[30]; char albumName[30]; char year[3]; char comment[30]; char genre; } ID3Tag; int urlParse(const char *, char **, unsigned short *, char **); void replaceString(const char *, char *, size_t, const char *, const char *); char * buildCommandString(const char *, const char *, metadata_t *); char * getMetadataString(const char *, metadata_t *); metadata_t * getMetadata(const char *); int setMetadata(shout_t *, metadata_t *, char **); FILE * openResource(shout_t *, const char *, int *, metadata_t **, int *, long *); int reconnectServer(shout_t *, int); const char * getTimeString(long); int sendStream(shout_t *, FILE *, const char *, int, const char *, struct timeval *); int streamFile(shout_t *, const char *); int streamPlaylist(shout_t *, const char *); char * getProgname(const char *); void usage(void); void usageHelp(void); int ez_shutdown(int); #ifdef HAVE_SIGNALS void sig_handler(int); # ifndef SIG_IGN # define SIG_IGN (void (*)(int))1 # endif /* !SIG_IGN */ void sig_handler(int sig) { switch (sig) { case SIGTERM: case SIGINT: quit = 1; break; case SIGHUP: rereadPlaylist = 1; rereadPlaylist_notify = 1; break; case SIGUSR1: skipTrack = 1; break; case SIGUSR2: queryMetadata = 1; break; default: break; } } #endif /* HAVE_SIGNALS */ int urlParse(const char *url, char **hostname, unsigned short *port, char **mountname) { const char *p1, *p2, *p3; char tmpPort[6] = ""; size_t hostsiz, mountsiz; const char *errstr; if (hostname == NULL || port == NULL || mountname == NULL) { printf("%s: urlParse(): Internal error: Bad arguments\n", __progname); exit(1); } if (strncmp(url, "http://", strlen("http://")) != 0) { printf("%s: Error: Invalid : Not an HTTP address\n", __progname); return (0); } p1 = url + strlen("http://"); p2 = strchr(p1, ':'); if (p2 == NULL) { printf("%s: Error: Invalid : Missing port\n", __progname); return (0); } hostsiz = (p2 - p1) + 1; *hostname = xmalloc(hostsiz); strlcpy(*hostname, p1, hostsiz); p2++; p3 = strchr(p2, '/'); if (p3 == NULL || p3 - p2 >= (int)sizeof(tmpPort)) { printf("%s: Error: Invalid : Missing mountpoint or too long port number\n", __progname); xfree(*hostname); return (0); } strlcpy(tmpPort, p2, (p3 - p2) + 1UL); *port = (unsigned short)strtonum(tmpPort, 1LL, (long long)USHRT_MAX, &errstr); if (errstr) { printf("%s: Error: Invalid : Port '%s' is %s\n", __progname, tmpPort, errstr); xfree(*hostname); return (0); } mountsiz = strlen(p3) + 1; *mountname = xmalloc(mountsiz); strlcpy(*mountname, p3, mountsiz); return (1); } void replaceString(const char *source, char *dest, size_t size, const char *from, const char *to) { const char *p1 = source; const char *p2; p2 = strstr(p1, from); if (p2 != NULL) { if ((unsigned int)(p2 - p1) >= size) { printf("%s: replaceString(): Internal error: p2 - p1 >= size\n", __progname); abort(); } strncat(dest, p1, (size_t)(p2 - p1)); strlcat(dest, to, size); p1 = p2 + strlen(from); } strlcat(dest, p1, size); } char * buildCommandString(const char *extension, const char *fileName, metadata_t *mdata) { char *commandString = NULL; size_t commandStringLen = 0; char *encoder = NULL; char *decoder = NULL; char *newDecoder = NULL; size_t newDecoderLen = 0; char *newEncoder = NULL; size_t newEncoderLen = 0; char *localTitle = UTF8toCHAR(metadata_get_title(mdata), ICONV_REPLACE); char *localArtist = UTF8toCHAR(metadata_get_artist(mdata), ICONV_REPLACE); char *localMetaString = UTF8toCHAR(metadata_get_string(mdata), ICONV_REPLACE); decoder = xstrdup(getFormatDecoder(extension)); if (strlen(decoder) == 0) { printf("%s: Unknown extension '%s', cannot decode '%s'\n", __progname, extension, fileName); xfree(localTitle); xfree(localArtist); xfree(localMetaString); xfree(decoder); return (NULL); } newDecoderLen = strlen(decoder) + strlen(fileName) + 1; newDecoder = xcalloc(newDecoderLen, sizeof(char)); replaceString(decoder, newDecoder, newDecoderLen, TRACK_PLACEHOLDER, fileName); if (strstr(decoder, ARTIST_PLACEHOLDER) != NULL) { size_t tmpLen = strlen(newDecoder) + strlen(localArtist) + 1; char *tmpStr = xcalloc(tmpLen, sizeof(char)); replaceString(newDecoder, tmpStr, tmpLen, ARTIST_PLACEHOLDER, localArtist); xfree(newDecoder); newDecoder = tmpStr; } if (strstr(decoder, TITLE_PLACEHOLDER) != NULL) { size_t tmpLen = strlen(newDecoder) + strlen(localTitle) + 1; char *tmpStr = xcalloc(tmpLen, sizeof(char)); replaceString(newDecoder, tmpStr, tmpLen, TITLE_PLACEHOLDER, localTitle); xfree(newDecoder); newDecoder = tmpStr; } /* * if meta * if (prog && format) * metatoformat * else * if (!prog && title) * emptymeta * else * replacemeta */ if (strstr(decoder, METADATA_PLACEHOLDER) != NULL) { if (metadataFromProgram && pezConfig->metadataFormat != NULL) { char *mdataString = getMetadataString(pezConfig->metadataFormat, mdata); size_t tmpLen = strlen(newDecoder) + strlen(mdataString) + 1; char *tmpStr = xcalloc(tmpLen, sizeof(char)); replaceString(newDecoder, tmpStr, tmpLen, METADATA_PLACEHOLDER, mdataString); xfree(newDecoder); xfree(mdataString); newDecoder = tmpStr; } else { if (!metadataFromProgram && strstr(decoder, TITLE_PLACEHOLDER) != NULL) { size_t tmpLen = strlen(newDecoder) + 1; char *tmpStr = xcalloc(tmpLen, sizeof(char)); replaceString(newDecoder, tmpStr, tmpLen, METADATA_PLACEHOLDER, ""); xfree(newDecoder); newDecoder = tmpStr; } else { size_t tmpLen = strlen(newDecoder) + strlen(localMetaString) + 1; char *tmpStr = xcalloc(tmpLen, sizeof(char)); replaceString(newDecoder, tmpStr, tmpLen, METADATA_PLACEHOLDER, localMetaString); xfree(newDecoder); newDecoder = tmpStr; } } } encoder = xstrdup(getFormatEncoder(pezConfig->format)); if (strlen(encoder) == 0) { if (vFlag) printf("%s: Passing through%s%s data from the decoder\n", __progname, (strcmp(pezConfig->format, THEORA_FORMAT) != 0) ? " (unsupported) " : " ", pezConfig->format); commandStringLen = strlen(newDecoder) + 1; commandString = xcalloc(commandStringLen, sizeof(char)); strlcpy(commandString, newDecoder, commandStringLen); xfree(localTitle); xfree(localArtist); xfree(localMetaString); xfree(decoder); xfree(encoder); xfree(newDecoder); return (commandString); } newEncoderLen = strlen(encoder) + strlen(localArtist) + 1; newEncoder = xcalloc(newEncoderLen, sizeof(char)); replaceString(encoder, newEncoder, newEncoderLen, ARTIST_PLACEHOLDER, localArtist); if (strstr(encoder, TITLE_PLACEHOLDER) != NULL) { size_t tmpLen = strlen(newEncoder) + strlen(localTitle) + 1; char *tmpStr = xcalloc(tmpLen, sizeof(char)); replaceString(newEncoder, tmpStr, tmpLen, TITLE_PLACEHOLDER, localTitle); xfree(newEncoder); newEncoder = tmpStr; } if (strstr(encoder, METADATA_PLACEHOLDER) != NULL) { if (metadataFromProgram && pezConfig->metadataFormat != NULL) { char *mdataString = getMetadataString(pezConfig->metadataFormat, mdata); size_t tmpLen = strlen(newEncoder) + strlen(mdataString) + 1; char *tmpStr = xcalloc(tmpLen, sizeof(char)); replaceString(newEncoder, tmpStr, tmpLen, METADATA_PLACEHOLDER, mdataString); xfree(newEncoder); xfree(mdataString); newEncoder = tmpStr; } else { if (!metadataFromProgram && strstr(encoder, TITLE_PLACEHOLDER) != NULL) { size_t tmpLen = strlen(newEncoder) + 1; char *tmpStr = xcalloc(tmpLen, sizeof(char)); replaceString(newEncoder, tmpStr, tmpLen, METADATA_PLACEHOLDER, ""); xfree(newEncoder); newEncoder = tmpStr; } else { size_t tmpLen = strlen(newEncoder) + strlen(localMetaString) + 1; char *tmpStr = xcalloc(tmpLen, sizeof(char)); replaceString(newEncoder, tmpStr, tmpLen, METADATA_PLACEHOLDER, localMetaString); xfree(newEncoder); newEncoder = tmpStr; } } } commandStringLen = strlen(newDecoder) + strlen(" | ") + strlen(newEncoder) + 1; commandString = xcalloc(commandStringLen, sizeof(char)); snprintf(commandString, commandStringLen, "%s | %s", newDecoder, newEncoder); xfree(localTitle); xfree(localArtist); xfree(localMetaString); xfree(decoder); xfree(encoder); xfree(newDecoder); xfree(newEncoder); return (commandString); } char * getMetadataString(const char *format, metadata_t *mdata) { char *tmp, *str; size_t len; if (mdata == NULL) { printf("%s: getMetadataString(): Internal error: NULL metadata_t\n", __progname); abort(); } if (format == NULL) return (NULL); str = xstrdup(format); if (strstr(format, ARTIST_PLACEHOLDER) != NULL) { len = strlen(str) + strlen(metadata_get_artist(mdata)) + 1; tmp = xcalloc(len, sizeof(char)); replaceString(str, tmp, len, ARTIST_PLACEHOLDER, metadata_get_artist(mdata)); xfree(str); str = tmp; } if (strstr(format, TITLE_PLACEHOLDER) != NULL) { len = strlen(str) + strlen(metadata_get_title(mdata)) + 1; tmp = xcalloc(len, sizeof(char)); replaceString(str, tmp, len, TITLE_PLACEHOLDER, metadata_get_title(mdata)); xfree(str); str = tmp; } if (strstr(format, STRING_PLACEHOLDER) != NULL) { len = strlen(str) + strlen(metadata_get_string(mdata)) + 1; tmp = xcalloc(len, sizeof(char)); replaceString(str, tmp, len, STRING_PLACEHOLDER, metadata_get_string(mdata)); xfree(str); str = tmp; } if (strstr(format, TRACK_PLACEHOLDER) != NULL) { len = strlen(str) + strlen(metadata_get_filename(mdata)) + 1; tmp = xcalloc(len, sizeof(char)); replaceString(str, tmp, len, TRACK_PLACEHOLDER, metadata_get_filename(mdata)); xfree(str); str = tmp; } return (str); } metadata_t * getMetadata(const char *fileName) { metadata_t *mdata; if (metadataFromProgram) { if ((mdata = metadata_program(fileName, nFlag)) == NULL) return (NULL); if (!metadata_program_update(mdata, METADATA_ALL)) { metadata_free(&mdata); return (NULL); } } else { if ((mdata = metadata_file(fileName, nFlag)) == NULL) return (NULL); if (!metadata_file_update(mdata)) { metadata_free(&mdata); return (NULL); } } return (mdata); } int setMetadata(shout_t *shout, metadata_t *mdata, char **mdata_copy) { shout_metadata_t *shout_mdata = NULL; char *songInfo; const char *artist, *title; int ret = SHOUTERR_SUCCESS; if (shout == NULL) { printf("%s: setMetadata(): Internal error: NULL shout_t\n", __progname); abort(); } if (mdata == NULL) return 1; if ((shout_mdata = shout_metadata_new()) == NULL) { printf("%s: shout_metadata_new(): %s\n", __progname, strerror(ENOMEM)); exit(1); } artist = metadata_get_artist(mdata); title = metadata_get_title(mdata); /* * We can do this, because we know how libshout works. This adds * "charset=UTF-8" to the HTTP metadata update request and has the * desired effect of letting newer-than-2.3.1 versions of Icecast know * which encoding we're using. */ if (shout_metadata_add(shout_mdata, "charset", "UTF-8") != SHOUTERR_SUCCESS) { /* Assume SHOUTERR_MALLOC */ printf("%s: shout_metadata_add(): %s\n", __progname, strerror(ENOMEM)); exit(1); } if ((songInfo = getMetadataString(pezConfig->metadataFormat, mdata)) == NULL) { if (artist[0] == '\0' && title[0] == '\0') songInfo = xstrdup(metadata_get_string(mdata)); else songInfo = metadata_assemble_string(mdata); if (artist[0] != '\0' && title[0] != '\0') { if (shout_metadata_add(shout_mdata, "artist", artist) != SHOUTERR_SUCCESS) { printf("%s: shout_metadata_add(): %s\n", __progname, strerror(ENOMEM)); exit(1); } if (shout_metadata_add(shout_mdata, "title", title) != SHOUTERR_SUCCESS) { printf("%s: shout_metadata_add(): %s\n", __progname, strerror(ENOMEM)); exit(1); } } else { if (shout_metadata_add(shout_mdata, "song", songInfo) != SHOUTERR_SUCCESS) { printf("%s: shout_metadata_add(): %s\n", __progname, strerror(ENOMEM)); exit(1); } } } else if (shout_metadata_add(shout_mdata, "song", songInfo) != SHOUTERR_SUCCESS) { printf("%s: shout_metadata_add(): %s\n", __progname, strerror(ENOMEM)); exit(1); } if ((ret = shout_set_metadata(shout, shout_mdata)) != SHOUTERR_SUCCESS) printf("%s: shout_set_metadata(): %s\n", __progname, shout_get_error(shout)); shout_metadata_free(shout_mdata); if (ret == SHOUTERR_SUCCESS) { if (mdata_copy != NULL && *mdata_copy == NULL) *mdata_copy = xstrdup(songInfo); } xfree(songInfo); return (ret); } FILE * openResource(shout_t *shout, const char *fileName, int *popenFlag, metadata_t **mdata_p, int *isStdin, long *songLen) { FILE *filep = NULL; char extension[25]; char *p = NULL; char *pCommandString = NULL; metadata_t *mdata; if (mdata_p != NULL) *mdata_p = NULL; if (songLen != NULL) *songLen = 0; if (strcmp(fileName, "stdin") == 0) { if (metadataFromProgram) { if ((mdata = getMetadata(pezConfig->metadataProgram)) == NULL) return (NULL); if (setMetadata(shout, mdata, NULL) != SHOUTERR_SUCCESS) { metadata_free(&mdata); return (NULL); } if (mdata_p != NULL) *mdata_p = mdata; else metadata_free(&mdata); } if (isStdin != NULL) *isStdin = 1; #ifdef WIN32 _setmode(_fileno(stdin), _O_BINARY); #endif filep = stdin; return (filep); } if (isStdin != NULL) *isStdin = 0; extension[0] = '\0'; p = strrchr(fileName, '.'); if (p != NULL) strlcpy(extension, p, sizeof(extension)); for (p = extension; *p != '\0'; p++) *p = tolower((int)*p); if (strlen(extension) == 0) { printf("%s: Error: Cannot determine file type of '%s'\n", __progname, fileName); return (filep); } if (metadataFromProgram) { if ((mdata = getMetadata(pezConfig->metadataProgram)) == NULL) return (NULL); } else { if ((mdata = getMetadata(fileName)) == NULL) return (NULL); } if (songLen != NULL) *songLen = metadata_get_length(mdata); *popenFlag = 0; if (pezConfig->reencode) { int stderr_fd = -1; pCommandString = buildCommandString(extension, fileName, mdata); if (mdata_p != NULL) *mdata_p = mdata; else metadata_free(&mdata); if (vFlag > 1) printf("%s: Running command `%s`\n", __progname, pCommandString); if (qFlag) { int fd; stderr_fd = dup(fileno(stderr)); if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1) { printf("%s: Cannot open %s for redirecting STDERR output: %s\n", __progname, _PATH_DEVNULL, strerror(errno)); exit(1); } dup2(fd, fileno(stderr)); if (fd > 2) close(fd); } fflush(NULL); errno = 0; if ((filep = popen(pCommandString, "r")) == NULL) { printf("%s: popen(): Error while executing '%s'", __progname, pCommandString); /* popen() does not set errno reliably ... */ if (errno) printf(": %s\n", strerror(errno)); else printf("\n"); } else { *popenFlag = 1; #ifdef WIN32 _setmode(_fileno(filep), _O_BINARY ); #endif } xfree(pCommandString); if (qFlag) dup2(stderr_fd, fileno(stderr)); if (stderr_fd > 2) close(stderr_fd); return (filep); } if (mdata_p != NULL) *mdata_p = mdata; else metadata_free(&mdata); if ((filep = fopen(fileName, "rb")) == NULL) printf("%s: %s: %s\n", __progname, fileName, strerror(errno)); return (filep); } int reconnectServer(shout_t *shout, int closeConn) { unsigned int i; int close_conn = closeConn; printf("%s: Connection to %s lost\n", __progname, pezConfig->URL); i = 0; while (++i) { printf("%s: Attempting reconnection #", __progname); if (pezConfig->reconnectAttempts > 0) printf("%u/%u: ", i, pezConfig->reconnectAttempts); else printf("%u: ", i); if (close_conn == 0) close_conn = 1; else shout_close(shout); if (shout_open(shout) == SHOUTERR_SUCCESS) { printf("OK\n%s: Reconnect to %s successful\n", __progname, pezConfig->URL); return (1); } printf("FAILED: %s\n", shout_get_error(shout)); if (pezConfig->reconnectAttempts > 0 && i >= pezConfig->reconnectAttempts) break; printf("%s: Waiting 5s for %s to come back ...\n", __progname, pezConfig->URL); if (quit) return (0); else sleep(5); }; printf("%s: Giving up\n", __progname); return (0); } const char * getTimeString(long seconds) { static char str[20]; long secs, mins, hours; if (seconds < 0) return (NULL); secs = seconds; hours = secs / 3600; secs %= 3600; mins = secs / 60; secs %= 60; snprintf(str, sizeof(str), "%ldh%02ldm%02lds", hours, mins, secs); return ((const char *)str); } int sendStream(shout_t *shout, FILE *filepstream, const char *fileName, int isStdin, const char *songLenStr, struct timeval *tv) { unsigned char buff[4096]; size_t bytes_read, total, oldTotal; int ret; double kbps = -1.0; struct timeval timeStamp, *startTime = tv; if (startTime == NULL) { printf("%s: sendStream(): Internal error: startTime is NULL\n", __progname); abort(); } timeStamp.tv_sec = startTime->tv_sec; timeStamp.tv_usec = startTime->tv_usec; total = oldTotal = 0; ret = STREAM_DONE; while ((bytes_read = fread(buff, 1UL, sizeof(buff), filepstream)) > 0) { if (shout_get_connected(shout) != SHOUTERR_CONNECTED && reconnectServer(shout, 0) == 0) { ret = STREAM_SERVERR; break; } shout_sync(shout); if (shout_send(shout, buff, bytes_read) != SHOUTERR_SUCCESS) { printf("%s: shout_send(): %s\n", __progname, shout_get_error(shout)); if (reconnectServer(shout, 1)) break; else { ret = STREAM_SERVERR; break; } } if (quit) break; if (rereadPlaylist_notify) { rereadPlaylist_notify = 0; if (!pezConfig->fileNameIsProgram) printf("%s: SIGHUP signal received, will reread playlist after this file\n", __progname); } if (skipTrack) { skipTrack = 0; ret = STREAM_SKIP; break; } if (queryMetadata) { queryMetadata = 0; if (metadataFromProgram) { ret = STREAM_UPDMDATA; break; } } total += bytes_read; if (qFlag && vFlag) { struct timeval tval; double oldTime, newTime; if (!isStdin && playlistMode) { if (pezConfig->fileNameIsProgram) { char *tmp = xstrdup(pezConfig->fileName); printf(" [%s]", local_basename(tmp)); xfree(tmp); } else printf(" [%4lu/%-4lu]", playlist_get_position(playlist), playlist_get_num_items(playlist)); } oldTime = (double)timeStamp.tv_sec + (double)timeStamp.tv_usec / 1000000.0; ez_gettimeofday((void *)&tval); newTime = (double)tval.tv_sec + (double)tval.tv_usec / 1000000.0; if (songLenStr == NULL) printf(" [ %s]", getTimeString(tval.tv_sec - startTime->tv_sec)); else printf(" [ %s/%s]", getTimeString(tval.tv_sec - startTime->tv_sec), songLenStr); if (newTime - oldTime >= 1.0) { kbps = (((double)(total - oldTotal) / (newTime - oldTime)) * 8.0) / 1000.0; timeStamp.tv_sec = tval.tv_sec; timeStamp.tv_usec = tval.tv_usec; oldTotal = total; } if (kbps < 0) printf(" "); else printf(" [%8.2f kbps]", kbps); printf(" \r"); fflush(stdout); } } if (ferror(filepstream)) { if (errno == EINTR) { clearerr(filepstream); ret = STREAM_CONT; } else if (errno == EBADF && isStdin) printf("%s: No (more) data available on standard input\n", __progname); else printf("%s: sendStream(): Error while reading '%s': %s\n", __progname, fileName, strerror(errno)); } return (ret); } int streamFile(shout_t *shout, const char *fileName) { FILE *filepstream = NULL; int popenFlag = 0; char *songLenStr = NULL; int isStdin = 0; int ret, retval = 0; long songLen; metadata_t *mdata; struct timeval startTime; if ((filepstream = openResource(shout, fileName, &popenFlag, &mdata, &isStdin, &songLen)) == NULL) { if (++resource_errors > 100) { printf("%s: Too many errors -- giving up.\n", __progname); return (0); } /* Continue with next resource on failure: */ return (1); } resource_errors = 0; if (mdata != NULL) { char *tmp, *metaData; tmp = metadata_assemble_string(mdata); if ((metaData = UTF8toCHAR(tmp, ICONV_REPLACE)) == NULL) metaData = xstrdup("(unknown title)"); xfree(tmp); printf("%s: Streaming ``%s''", __progname, metaData); if (vFlag) printf(" (file: %s)\n", fileName); else printf("\n"); xfree(metaData); /* MP3 streams are special, so set the metadata explicitly: */ if (strcmp(pezConfig->format, MP3_FORMAT) == 0) setMetadata(shout, mdata, NULL); metadata_free(&mdata); } else if (isStdin) printf("%s: Streaming from standard input\n", __progname); if (songLen > 0) songLenStr = xstrdup(getTimeString(songLen)); ez_gettimeofday((void *)&startTime); do { ret = sendStream(shout, filepstream, fileName, isStdin, songLenStr, &startTime); if (quit) break; if (ret != STREAM_DONE) { if ((skipTrack && rereadPlaylist) || (skipTrack && queryMetadata)) { skipTrack = 0; ret = STREAM_CONT; } if (queryMetadata && rereadPlaylist) { queryMetadata = 0; ret = STREAM_CONT; } if (ret == STREAM_SKIP || skipTrack) { skipTrack = 0; if (!isStdin && vFlag) printf("%s: SIGUSR1 signal received, skipping current track\n", __progname); retval = 1; ret = STREAM_DONE; } if (ret == STREAM_UPDMDATA || queryMetadata) { queryMetadata = 0; if (metadataFromProgram) { char *mdataStr = NULL; metadata_t *prog_mdata; if (vFlag > 1) printf("%s: Querying '%s' for fresh metadata\n", __progname, pezConfig->metadataProgram); if ((prog_mdata = getMetadata(pezConfig->metadataProgram)) == NULL) { retval = 0; ret = STREAM_DONE; continue; } if (setMetadata(shout, prog_mdata, &mdataStr) != SHOUTERR_SUCCESS) { retval = 0; ret = STREAM_DONE; continue; } metadata_free(&prog_mdata); printf("%s: New metadata: ``%s''\n", __progname, mdataStr); xfree(mdataStr); } } if (ret == STREAM_SERVERR) { retval = 0; ret = STREAM_DONE; } } else retval = 1; } while (ret != STREAM_DONE); if (popenFlag) pclose(filepstream); else fclose(filepstream); if (songLenStr != NULL) xfree(songLenStr); return (retval); } int streamPlaylist(shout_t *shout, const char *fileName) { const char *song; char lastSong[PATH_MAX]; if (playlist == NULL) { if (pezConfig->fileNameIsProgram) { if ((playlist = playlist_program(fileName)) == NULL) return (0); } else { if ((playlist = playlist_read(fileName)) == NULL) return (0); if (vFlag && playlist_get_num_items(playlist) == 0) printf("%s: Warning: Playlist '%s' is empty\n", __progname, fileName); } } else { /* * XXX: This preserves traditional behavior, however, * rereading the playlist after each walkthrough seems a * bit more logical. */ playlist_rewind(playlist); } if (!pezConfig->fileNameIsProgram && pezConfig->shuffle) playlist_shuffle(playlist); while ((song = playlist_get_next(playlist)) != NULL) { strlcpy(lastSong, song, sizeof(lastSong)); if (!streamFile(shout, song)) return (0); if (quit) break; if (rereadPlaylist) { rereadPlaylist = rereadPlaylist_notify = 0; if (pezConfig->fileNameIsProgram) continue; printf("%s: Rereading playlist\n", __progname); if (!playlist_reread(&playlist)) return (0); if (pezConfig->shuffle) playlist_shuffle(playlist); else { playlist_goto_entry(playlist, lastSong); playlist_skip_next(playlist); } continue; } } return (1); } /* * Borrowed from OpenNTPd-portable's compat-openbsd/bsd-misc.c. * Does not use xalloc on purpose, as the 9 bytes of memory that don't get * cleaned up in the end really don't matter. */ char * getProgname(const char *argv0) { #ifdef HAVE___PROGNAME (void)argv0; return (strdup(__progname)); #else char *p; if (argv0 == NULL) return ((char *)"ezstream"); p = strrchr(argv0, path_separators[0]); if (p == NULL) p = (char *)argv0; else p++; return (strdup(p)); #endif /* HAVE___PROGNAME */ } int ez_shutdown(int exitval) { shout_shutdown(); playlist_shutdown(); freeConfig(pezConfig); xalloc_shutdown(); return (exitval); } void usage(void) { printf("usage: %s [-hnqVv] -c configfile\n", __progname); printf(" %s -s [playlist]\n", __progname); } void usageHelp(void) { printf("\n"); printf(" -c configfile use XML configuration in configfile (mandatory)\n"); printf(" -h display this additional help and exit\n"); printf(" -n normalize metadata strings\n"); printf(" -q suppress STDERR output from external en-/decoders\n"); printf(" -s [playlist] read lines from playlist (or STDIN), shuffle and print them to\n"); printf(" STDOUT, then exit\n"); printf(" -V print the version number and exit\n"); printf(" -v verbose output (use twice for more effect)\n"); printf("\n"); printf("See the ezstream(1) manual for detailed information.\n"); } int main(int argc, char *argv[]) { int c; char *configFile = NULL; char *host = NULL; unsigned short port = 0; char *mount = NULL; shout_t *shout; extern char *optarg; extern int optind; #ifdef HAVE_SIGNALS struct sigaction act; unsigned int i; #endif #ifdef XALLOC_DEBUG xalloc_initialize_debug(2, NULL); #else xalloc_initialize(); #endif /* XALLOC_DEBUG */ playlist_init(); shout_init(); __progname = getProgname(argv[0]); pezConfig = getEZConfig(); nFlag = 0; qFlag = 0; vFlag = 0; while ((c = local_getopt(argc, argv, "c:hnqsVv")) != -1) { switch (c) { case 'c': if (configFile != NULL) { printf("Error: multiple -c arguments given\n"); usage(); return (ez_shutdown(2)); } configFile = xstrdup(optarg); break; case 'h': usage(); usageHelp(); return (ez_shutdown(0)); case 'n': nFlag = 1; break; case 'q': qFlag = 1; break; case 's': sFlag = 1; break; case 'V': printf("%s\n", PACKAGE_STRING); return (ez_shutdown(0)); case 'v': vFlag++; break; case '?': usage(); return (ez_shutdown(2)); default: break; } } argc -= optind; argv += optind; if (sFlag) { playlist_t *pl; const char *entry; switch (argc) { case 0: pl = playlist_read(NULL); if (pl == NULL) return (ez_shutdown(1)); break; case 1: pl = playlist_read(argv[0]); if (pl == NULL) return (ez_shutdown(1)); break; default: printf("Error: Too many arguments.\n"); return (ez_shutdown(2)); } playlist_shuffle(pl); while ((entry = playlist_get_next(pl)) != NULL) printf("%s\n", entry); playlist_free(&pl); return (ez_shutdown(0)); } if (configFile == NULL) { printf("You must supply a config file with the -c argument.\n"); usage(); return (ez_shutdown(2)); } else { /* * Attempt to open configFile here for a more meaningful error * message. Where possible, do it with stat() and check for * safe config file permissions. */ #ifdef HAVE_STAT struct stat st; if (stat(configFile, &st) == -1) { printf("%s: %s\n", configFile, strerror(errno)); usage(); return (ez_shutdown(2)); } if (vFlag && (st.st_mode & (S_IRGRP | S_IROTH))) printf("%s: Warning: %s is group and/or world readable\n", __progname, configFile); if (st.st_mode & (S_IWGRP | S_IWOTH)) { printf("%s: Error: %s is group and/or world writeable\n", __progname, configFile); return (ez_shutdown(2)); } #else FILE *tmp; if ((tmp = fopen(configFile, "r")) == NULL) { printf("%s: %s\n", configFile, strerror(errno)); usage(); return (ez_shutdown(2)); } fclose(tmp); #endif /* HAVE_STAT */ } if (!parseConfig(configFile)) return (ez_shutdown(2)); if (pezConfig->URL == NULL) { printf("%s: Error: Missing \n", configFile); return (ez_shutdown(2)); } if (!urlParse(pezConfig->URL, &host, &port, &mount)) { printf("Must be of the form ``http://server:port/mountpoint''\n"); return (ez_shutdown(2)); } if (strlen(host) == 0) { printf("%s: Error: Invalid : Missing server:\n", configFile); printf("Must be of the form ``http://server:port/mountpoint''\n"); return (ez_shutdown(2)); } if (strlen(mount) == 0) { printf("%s: Error: Invalid : Missing mountpoint:\n", configFile); printf("Must be of the form ``http://server:port/mountpoint''\n"); return (ez_shutdown(2)); } if (pezConfig->password == NULL) { printf("%s: Error: Missing \n", configFile); return (ez_shutdown(2)); } if (pezConfig->fileName == NULL) { printf("%s: Error: Missing \n", configFile); return (ez_shutdown(2)); } if (pezConfig->format == NULL) { printf("%s: Warning: Missing :\n", configFile); printf("Specify a stream format of either MP3, VORBIS or THEORA\n"); } xfree(configFile); if ((shout = stream_setup(host, port, mount)) == NULL) return (ez_shutdown(1)); if (pezConfig->metadataProgram != NULL) metadataFromProgram = 1; else metadataFromProgram = 0; #ifdef HAVE_SIGNALS memset(&act, 0, sizeof(act)); act.sa_handler = sig_handler; # ifdef SA_RESTART act.sa_flags = SA_RESTART; # endif for (i = 0; i < sizeof(ezstream_signals) / sizeof(int); i++) { if (sigaction(ezstream_signals[i], &act, NULL) == -1) { printf("%s: sigaction(): %s\n", __progname, strerror(errno)); return (ez_shutdown(1)); } } /* * Ignore SIGPIPE, which has been seen to give a long-running ezstream * process trouble. EOF and/or EPIPE are also easier to handle. */ act.sa_handler = SIG_IGN; if (sigaction(SIGPIPE, &act, NULL) == -1) { printf("%s: sigaction(): %s\n", __progname, strerror(errno)); return (ez_shutdown(1)); } #endif /* HAVE_SIGNALS */ if (shout_open(shout) == SHOUTERR_SUCCESS) { int ret; printf("%s: Connected to http://%s:%hu%s\n", __progname, host, port, mount); if (pezConfig->fileNameIsProgram || strrcasecmp(pezConfig->fileName, ".m3u") == 0 || strrcasecmp(pezConfig->fileName, ".txt") == 0) playlistMode = 1; else playlistMode = 0; if (vFlag && pezConfig->fileNameIsProgram) printf("%s: Using program '%s' to get filenames for streaming\n", __progname, pezConfig->fileName); ret = 1; do { if (playlistMode) { ret = streamPlaylist(shout, pezConfig->fileName); } else { ret = streamFile(shout, pezConfig->fileName); } if (quit) break; if (pezConfig->streamOnce) break; } while (ret); shout_close(shout); } else printf("%s: Connection to http://%s:%hu%s failed: %s\n", __progname, host, port, mount, shout_get_error(shout)); if (quit) printf("\r%s: SIGINT or SIGTERM received\n", __progname); if (vFlag) printf("%s: Exiting ...\n", __progname); xfree(host); xfree(mount); playlist_free(&playlist); return (ez_shutdown(0)); } ezstream-0.5.6/src/ezstream.h0000644000175000017500000000606711246572734015274 0ustar tootstoots/* $Id: ezstream.h 16536 2009-08-30 21:46:15Z moritz $ */ /* * Copyright (c) 2007, 2009 Moritz Grimm * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef __COMPAT_H__ #define __COMPAT_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_SYS_TYPES_H # include #endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_SYS_TIME_H # include #else /* HAVE_SYS_TIME_H */ # include #endif /* HAVE_SYS_TIME_H */ #ifdef HAVE_SYS_STAT_H # include #endif /* HAVE_SYS_STAT_H */ #include #include #include #include #ifdef HAVE_PATHS_H # include #endif /* HAVE_PATHS_H */ #include #include #include #include #ifdef HAVE_UNISTD_H # include #endif #ifndef STDIN_FILENO # define STDIN_FILENO 0 #endif /* !STDIN_FILENO */ #ifndef _PATH_DEVNULL # ifdef WIN32 # define _PATH_DEVNULL "nul" # else /* WIN32 */ # define _PATH_DEVNULL "/dev/null" # endif /* WIN32 */ #endif /* !_PATH_DEVNULL */ #ifndef PATH_MAX # define PATH_MAX 256 #endif /* !PATH_MAX */ #if !defined(HAVE_PCLOSE) && defined(HAVE__PCLOSE) # define pclose _pclose #endif /* !HAVE_PCLOSE && HAVE__PCLOSE */ #if !defined(HAVE_POPEN) && defined(HAVE__POPEN) # define popen _popen #endif /* !HAVE_POPEN && HAVE__POPEN */ #if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF) # define snprintf _snprintf #endif /* !HAVE_SNPRINTF && HAVE__SNPRINTF */ #if !defined(HAVE_STAT) && defined(HAVE__STAT) # define stat _stat #endif /* !HAVE_STAT && HAVE__STAT */ #if !defined(HAVE_STRNCASECMP) && defined(HAVE_STRNICMP) # define strncasecmp strnicmp #endif /* !HAVE_STRNCASECMP && HAVE_STRNICMP */ #if !defined(HAVE_STRTOLL) && defined(HAVE__STRTOI64) # define strtoll _strtoi64 #endif /* !HAVE_STRTOLL && HAVE__STRTOI64 */ #ifndef S_IRGRP # define S_IRGRP 0 # define S_IWGRP 0 # define S_IXGRP 0 #endif /* !S_IRGRP */ #ifndef S_IROTH # define S_IROTH 0 # define S_IWOTH 0 # define S_IXOTH 0 #endif /* !S_IROTH */ #ifdef WIN32 # include # define sleep(a) Sleep((a) * 1000) #endif /* WIN32 */ /* * For compat.c and getopt.c: */ extern int opterr; extern int optind; extern int optopt; extern int optreset; extern char *optarg; extern int local_getopt(int, char * const *, const char *); extern const char *path_separators; extern char * local_basename(const char *); #endif /* __COMPAT_H__ */ ezstream-0.5.6/src/Makefile.am0000644000175000017500000000077211246572734015322 0ustar tootstootsAUTOMAKE_OPTIONS = 1.9 foreign bin_PROGRAMS = ezstream bin_SCRIPTS = ezstream-file.sh ezstream_SOURCES = \ compat.c \ configfile.c \ ezstream.c \ getopt.c \ metadata.c \ playlist.c \ util.c \ xalloc.c ezstream_LDADD = @LIBOBJS@ @EZ_LIBS@ INCLUDES = @COMPAT_INCLUDES@ AM_CFLAGS = @EZ_CFLAGS@ AM_CPPFLAGS = @EZ_CPPFLAGS@ AM_LDFLAGS = @EZ_LDFLAGS@ EXTRA_DIST = \ configfile.h \ ezstream.h \ metadata.h \ playlist.h \ strfctns.h \ util.h \ xalloc.h CLEANFILES = core *.core *~ .*~ ezstream-0.5.6/src/Makefile.in0000644000175000017500000004115511246573337015333 0ustar tootstoots# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ezstream$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(srcdir)/ezstream-file.sh.in strlcat.c \ strlcpy.c strtonum.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ccflags.m4 \ $(top_srcdir)/m4/libshout.m4 $(top_srcdir)/m4/libvorbis.m4 \ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/progname.m4 \ $(top_srcdir)/m4/taglib.m4 $(top_srcdir)/m4/tree.m4 \ $(top_srcdir)/m4/vacopy.m4 $(top_srcdir)/m4/vars.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = ezstream-file.sh am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_ezstream_OBJECTS = compat.$(OBJEXT) configfile.$(OBJEXT) \ ezstream.$(OBJEXT) getopt.$(OBJEXT) metadata.$(OBJEXT) \ playlist.$(OBJEXT) util.$(OBJEXT) xalloc.$(OBJEXT) ezstream_OBJECTS = $(am_ezstream_OBJECTS) ezstream_DEPENDENCIES = @LIBOBJS@ binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(ezstream_SOURCES) DIST_SOURCES = $(ezstream_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPAT_INCLUDES = @COMPAT_INCLUDES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXAMPLES_DIR = @EXAMPLES_DIR@ EXEEXT = @EXEEXT@ EZ_CFLAGS = @EZ_CFLAGS@ EZ_CPPFLAGS = @EZ_CPPFLAGS@ EZ_LDFLAGS = @EZ_LDFLAGS@ EZ_LIBS = @EZ_LIBS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHOUT_CFLAGS = @LIBSHOUT_CFLAGS@ LIBSHOUT_CPPFLAGS = @LIBSHOUT_CPPFLAGS@ LIBSHOUT_LDFLAGS = @LIBSHOUT_LDFLAGS@ LIBSHOUT_LIBS = @LIBSHOUT_LIBS@ LIBVORBISFILE_LIBS = @LIBVORBISFILE_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ TAGLIB_CPPFLAGS = @TAGLIB_CPPFLAGS@ TAGLIB_C_LIBS = @TAGLIB_C_LIBS@ TAGLIB_LDFLAGS = @TAGLIB_LDFLAGS@ VERSION = @VERSION@ VORBIS_CFLAGS = @VORBIS_CFLAGS@ VORBIS_CPPFLAGS = @VORBIS_CPPFLAGS@ VORBIS_LDFLAGS = @VORBIS_LDFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9 foreign bin_SCRIPTS = ezstream-file.sh ezstream_SOURCES = \ compat.c \ configfile.c \ ezstream.c \ getopt.c \ metadata.c \ playlist.c \ util.c \ xalloc.c ezstream_LDADD = @LIBOBJS@ @EZ_LIBS@ INCLUDES = @COMPAT_INCLUDES@ AM_CFLAGS = @EZ_CFLAGS@ AM_CPPFLAGS = @EZ_CPPFLAGS@ AM_LDFLAGS = @EZ_LDFLAGS@ EXTRA_DIST = \ configfile.h \ ezstream.h \ metadata.h \ playlist.h \ strfctns.h \ util.h \ xalloc.h CLEANFILES = core *.core *~ .*~ all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 ezstream-file.sh: $(top_builddir)/config.status $(srcdir)/ezstream-file.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ezstream$(EXEEXT): $(ezstream_OBJECTS) $(ezstream_DEPENDENCIES) @rm -f ezstream$(EXEEXT) $(LINK) $(ezstream_OBJECTS) $(ezstream_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strlcat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strlcpy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtonum.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ezstream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/metadata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/playlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) config.h installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-binSCRIPTS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-hdr distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ezstream-0.5.6/src/config.h.in0000644000175000017500000001265411246573053015306 0ustar tootstoots/* src/config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if you have the `arc4random' function. */ #undef HAVE_ARC4RANDOM /* Define to 1 if you have the `basename' function. */ #undef HAVE_BASENAME /* Define to 1 if you have the `getopt' function. */ #undef HAVE_GETOPT /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBGEN_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO /* Define to 1 if you have the header file. */ #undef HAVE_PATHS_H /* Define to 1 if you have the `pclose' function. */ #undef HAVE_PCLOSE /* Define to 1 if you have the `popen' function. */ #undef HAVE_POPEN /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* Define to 1 if we have BSD signals. */ #undef HAVE_SIGNALS /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the `srandomdev' function. */ #undef HAVE_SRANDOMDEV /* Define to 1 if you have the `stat' function. */ #undef HAVE_STAT /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlcat' function. */ #undef HAVE_STRLCAT /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strnicmp' function. */ #undef HAVE_STRNICMP /* Define to 1 if you have the `strtoll' function. */ #undef HAVE_STRTOLL /* Define to 1 if you have the `strtonum' function. */ #undef HAVE_STRTONUM /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have a sufficiently recent header. */ #undef HAVE_SYS_TREE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the libtag_c library. */ #undef HAVE_TAGLIB /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the libvorbisfile library. */ #undef HAVE_VORBISFILE /* Define to 1 if you have the `_pclose' function. */ #undef HAVE__PCLOSE /* Define to 1 if you have the `_popen' function. */ #undef HAVE__POPEN /* Define to 1 if you have the `_snprintf' function. */ #undef HAVE__SNPRINTF /* Define to 1 if you have the `_stat' function. */ #undef HAVE__STAT /* Define to 1 if you have the `_strtoi64' function. */ #undef HAVE__STRTOI64 /* Define whether libc defines __progname. */ #undef HAVE___PROGNAME /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define whether to build with XALLOC debugging */ #undef XALLOC_DEBUG /* Define to 1 if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Enable extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define vararg lists copy function if necessary. */ #undef va_copy /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ #undef volatile ezstream-0.5.6/src/util.c0000644000175000017500000002436711246572734014415 0ustar tootstoots/* $Id: util.c 16319 2009-07-22 20:19:38Z moritz $ */ /* * ezstream - source client for Icecast with external en-/decoder support * Copyright (C) 2003, 2004, 2005, 2006 Ed Zaleski * Copyright (C) 2007, 2009 Moritz Grimm * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* * This file contains utility functions, as well as a few other unexciting * but verbose functions outsourced from ezstream.c to make it more readable. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "ezstream.h" #ifdef HAVE_LANGINFO_H # include #endif #ifdef HAVE_LOCALE_H # include #endif #ifdef HAVE_ICONV # include #endif #include #include "util.h" #include "configfile.h" #include "xalloc.h" #ifndef BUFSIZ # define BUFSIZ 1024 #endif extern EZCONFIG *pezConfig; extern char *__progname; char * iconvert(const char *, const char *, const char *, int); int strrcmp(const char *s, const char *sub) { size_t slen = strlen(s); size_t sublen = strlen(sub); if (sublen > slen) return (1); return (memcmp(s + slen - sublen, sub, sublen)); } int strrcasecmp(const char *s, const char *sub) { char *s_cpy = xstrdup(s); char *sub_cpy = xstrdup(sub); char *p; int ret; for (p = s_cpy; *p != '\0'; p++) *p = tolower((int)*p); for (p = sub_cpy; *p != '\0'; p++) *p = tolower((int)*p); ret = strrcmp(s_cpy, sub_cpy); xfree(s_cpy); xfree(sub_cpy); return (ret); } shout_t * stream_setup(const char *host, unsigned short port, const char *mount) { shout_t *shout = NULL; if ((shout = shout_new()) == NULL) { printf("%s: shout_new(): %s", __progname, strerror(ENOMEM)); return (NULL); } if (shout_set_host(shout, host) != SHOUTERR_SUCCESS) { printf("%s: shout_set_host(): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (shout_set_protocol(shout, SHOUT_PROTOCOL_HTTP) != SHOUTERR_SUCCESS) { printf("%s: shout_set_protocol(): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (shout_set_port(shout, port) != SHOUTERR_SUCCESS) { printf("%s: shout_set_port: %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (shout_set_password(shout, pezConfig->password) != SHOUTERR_SUCCESS) { printf("%s: shout_set_password(): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (shout_set_mount(shout, mount) != SHOUTERR_SUCCESS) { printf("%s: shout_set_mount(): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (shout_set_user(shout, "source") != SHOUTERR_SUCCESS) { printf("%s: shout_set_user(): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (!strcmp(pezConfig->format, MP3_FORMAT) && shout_set_format(shout, SHOUT_FORMAT_MP3) != SHOUTERR_SUCCESS) { printf("%s: shout_set_format(MP3): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if ((!strcmp(pezConfig->format, VORBIS_FORMAT) || !strcmp(pezConfig->format, THEORA_FORMAT)) && shout_set_format(shout, SHOUT_FORMAT_OGG) != SHOUTERR_SUCCESS) { printf("%s: shout_set_format(OGG): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (pezConfig->username && shout_set_user(shout, pezConfig->username) != SHOUTERR_SUCCESS) { printf("%s: shout_set_user(): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (pezConfig->serverName && shout_set_name(shout, pezConfig->serverName) != SHOUTERR_SUCCESS) { printf("%s: shout_set_name(): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (pezConfig->serverURL && shout_set_url(shout, pezConfig->serverURL) != SHOUTERR_SUCCESS) { printf("%s: shout_set_url(): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (pezConfig->serverGenre && shout_set_genre(shout, pezConfig->serverGenre) != SHOUTERR_SUCCESS) { printf("%s: shout_set_genre(): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (pezConfig->serverDescription && shout_set_description(shout, pezConfig->serverDescription) != SHOUTERR_SUCCESS) { printf("%s: shout_set_description(): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (pezConfig->serverBitrate && shout_set_audio_info(shout, SHOUT_AI_BITRATE, pezConfig->serverBitrate) != SHOUTERR_SUCCESS) { printf("%s: shout_set_audio_info(AI_BITRATE): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (pezConfig->serverChannels && shout_set_audio_info(shout, SHOUT_AI_CHANNELS, pezConfig->serverChannels) != SHOUTERR_SUCCESS) { printf("%s: shout_set_audio_info(AI_CHANNELS): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (pezConfig->serverSamplerate && shout_set_audio_info(shout, SHOUT_AI_SAMPLERATE, pezConfig->serverSamplerate) != SHOUTERR_SUCCESS) { printf("%s: shout_set_audio_info(AI_SAMPLERATE): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (pezConfig->serverQuality && shout_set_audio_info(shout, SHOUT_AI_QUALITY, pezConfig->serverQuality) != SHOUTERR_SUCCESS) { printf("%s: shout_set_audio_info(AI_QUALITY): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } if (shout_set_public(shout, (unsigned int)pezConfig->serverPublic) != SHOUTERR_SUCCESS) { printf("%s: shout_set_public(): %s\n", __progname, shout_get_error(shout)); shout_free(shout); return (NULL); } return (shout); } char * CHARtoUTF8(const char *in_str, int mode) { #ifndef WIN32 char *codeset; # if defined(HAVE_NL_LANGINFO) && defined(HAVE_SETLOCALE) && defined(CODESET) setlocale(LC_CTYPE, ""); codeset = nl_langinfo((nl_item)CODESET); setlocale(LC_CTYPE, "C"); # else codeset = (char *)""; # endif /* HAVE_NL_LANGINFO && HAVE_SETLOCALE && CODESET */ #else char codeset[24]; snprintf(codeset, sizeof(codeset), "CP%u", GetACP()); #endif /* !WIN32 */ return (iconvert(in_str, codeset, "UTF-8", mode)); } char * UTF8toCHAR(const char *in_str, int mode) { #ifndef WIN32 char *codeset; # if defined(HAVE_NL_LANGINFO) && defined(HAVE_SETLOCALE) && defined(CODESET) setlocale(LC_CTYPE, ""); codeset = nl_langinfo((nl_item)CODESET); setlocale(LC_CTYPE, "C"); # else codeset = (char *)""; # endif /* HAVE_NL_LANGINFO && HAVE_SETLOCALE && CODESET */ #else char codeset[24]; snprintf(codeset, sizeof(codeset), "CP%u", GetACP()); #endif /* !WIN32 */ return (iconvert(in_str, "UTF-8", codeset, mode)); } char * iconvert(const char *in_str, const char *from, const char *to, int mode) { #ifdef HAVE_ICONV iconv_t cd; ICONV_CONST char *input, *ip; size_t input_len; char *output; size_t output_size; char buf[BUFSIZ], *bp; size_t bufavail; size_t out_pos; char *tocode; if (NULL == in_str) return (xstrdup("")); switch (mode) { size_t siz; case ICONV_TRANSLIT: siz = strlen(to) + strlen("//TRANSLIT") + 1; tocode = xcalloc(siz, sizeof(char)); snprintf(tocode, siz, "%s//TRANSLIT", to); break; case ICONV_IGNORE: siz = strlen(to) + strlen("//IGNORE") + 1; tocode = xcalloc(siz, sizeof(char)); snprintf(tocode, siz, "%s//IGNORE", to); break; case ICONV_REPLACE: /* FALLTHROUGH */ default: tocode = xstrdup(to); break; } if ((cd = iconv_open(tocode, from)) == (iconv_t)-1 && (cd = iconv_open("", from)) == (iconv_t)-1 && (cd = iconv_open(tocode, "")) == (iconv_t)-1) { xfree(tocode); printf("%s: iconv_open(): %s\n", __progname, strerror(errno)); return (xstrdup(in_str)); } ip = input = (ICONV_CONST char *)in_str; input_len = strlen(input); output_size = 1; output = xcalloc(output_size, sizeof(char)); out_pos = 0; output[out_pos] = '\0'; while (input_len > 0) { char *op; size_t count; buf[0] = '\0'; bp = buf; bufavail = sizeof(buf) - 1; if (iconv(cd, &ip, &input_len, &bp, &bufavail) == (size_t)-1 && errno != E2BIG) { *bp++ = '?'; ip++; input_len--; bufavail--; } *bp = '\0'; count = sizeof(buf) - bufavail - 1; output_size += count; op = output = xrealloc(output, output_size, sizeof(char)); op += out_pos; memcpy(op, buf, count); out_pos += count; op += count; *op = '\0'; } if (iconv_close(cd) == -1) { printf("%s: iconv_close(): %s\n", __progname, strerror(errno)); xfree(output); xfree(tocode); return (xstrdup(in_str)); } xfree(tocode); return (output); #else (void)from; (void)to; (void)mode; if (NULL == in_str) return (xstrdup("")); return (xstrdup(in_str)); #endif /* HAVE_ICONV */ } int ez_gettimeofday(void *tp_arg) { struct timeval *tp = (struct timeval *)tp_arg; int ret = -1; #ifdef HAVE_GETTIMEOFDAY ret = gettimeofday(tp, NULL); #else /* HAVE_GETTIMEOFDAY */ # ifdef WIN32 /* * Idea for this way of implementing gettimeofday()-like functionality * on Windows taken from cURL, (C) 1998 - 2007 Daniel Steinberg, et al. * http://curl.haxx.se/docs/copyright.html */ SYSTEMTIME st; struct tm tm; GetLocalTime(&st); tm.tm_sec = st.wSecond; tm.tm_min = st.wMinute; tm.tm_hour = st.wHour; tm.tm_mday = st.wDay; tm.tm_mon = st.wMonth - 1; tm.tm_year = st.wYear - 1900; tm.tm_isdst = -1; tp->tv_sec = (long)mktime(&tm); tp->tv_usec = st.wMilliseconds * 1000; ret = 0; # else /* WIN32 */ /* Fallback to time(): */ tp->tv_sec = (long)time(NULL); tp->tv_usec = 0; ret = 0; # endif /* WIN32 */ #endif /* HAVE_GETTIMEOFDAY */ return (ret); } ezstream-0.5.6/src/util.h0000644000175000017500000000254011246572734014407 0ustar tootstoots/* $Id: util.h 15788 2009-03-17 18:20:58Z moritz $ */ /* * ezstream - source client for Icecast with external en-/decoder support * Copyright (C) 2003, 2004, 2005, 2006 Ed Zaleski * Copyright (C) 2007 Moritz Grimm * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __UTIL_H__ #define __UTIL_H__ #include #define ICONV_REPLACE 0 #define ICONV_TRANSLIT 1 #define ICONV_IGNORE 2 int strrcmp(const char *, const char *); int strrcasecmp(const char *, const char *); shout_t * stream_setup(const char *, unsigned short, const char *); char * CHARtoUTF8(const char *, int); char * UTF8toCHAR(const char *, int); int ez_gettimeofday(void *); #endif /* __UTIL_H__ */ ezstream-0.5.6/src/ezstream-file.sh.in0000644000175000017500000000676711246572734017010 0ustar tootstoots#!/bin/sh # ezstream-file.sh # Convenience/wrapper script that uses ezstream to stream one or more files # given on the command line. # Copyright (c) 2009 Moritz Grimm # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. _myname="$(basename $0)" _filename_placeholder="%FILENAME%" _opt_string="hnqT:Vv" print_usage() { echo "usage: ${_myname} [-hnqVv] [-T cfg_template] [file ...]" >&2 } print_usage_help() { cat << __EOT >&2 -h print this help and exit -n [ezstream] normalize metadata strings -q [ezstream] suppress STDERR output from external en-/decoders -T template run ezstream using template for configuration -V print the version number and exit -v [ezstream] verbose output (use twice for more effect) The configuration template must contain the configuration statement ${_filename_placeholder} See the ezstream-file.sh(1) manual for detailed information. __EOT } _normalize="" _quiet="" _verbose="" _cfg_template="${EZSTREAM_TEMPLATE}" _args=`getopt ${_opt_string} $*` if [ $? -ne 0 ]; then print_usage exit 2 fi set -- ${_args} while [ $# -ge 0 ] do case "$1" in -h) print_usage print_usage_help exit 0 ;; -n) _normalize="-n"; shift ;; -q) _quiet="-q"; shift ;; -T) _cfg_template="$2"; shift; shift ;; -V) echo "${_myname} @PACKAGE_VERSION@" exit 0 ;; -v) if [ -z "${_verbose}" ]; then _verbose="-v" else _verbose="${_verbose}v" fi shift ;; --) shift; break ;; esac done if [ -z "${_cfg_template}" ]; then echo "${_myname}: No configuration template supplied." >&2 echo "Use -T or the EZSTREAM_TEMPLATE environment variable." >&2 exit 2 fi if [ ! -e "${_cfg_template}" ]; then echo "${_myname}: Configuration template ${_cfg_template} does not exist." >&2 exit 2 fi if [ -z "$(grep ${_filename_placeholder} ${_cfg_template})" ]; then echo "${_myname}: ${_cfg_template} lacks the ${_filename_placeholder} placeholder." >&2 exit 2 fi test -n "${EZSTREAM}" || EZSTREAM="$(which ezstream)" if [ -z "${EZSTREAM}" ]; then echo "${_myname}: Cannot find ezstream." >&2 exit 2 fi _temp_dir="`mktemp -t -d _ezstream.XXXXXXXXXX`" if [ $? -ne 0 ]; then echo "${_myname}: Unable to create temporary directory." >&2 exit 1 fi trap 'rm -rf ${_temp_dir}' 0 trap 'rm -rf ${_temp_dir}; exit 1' 2 15 _cfg="${_temp_dir}/config.xml" _playlist="${_temp_dir}/playlist.txt" touch "${_cfg}" || exit 1 chmod 0600 "${_cfg}" || exit 1 sed -e "s,${_filename_placeholder},${_playlist},g" \ < "${_cfg_template}" \ > "${_cfg}" if [ $? -ne 0 ]; then echo "${_myname}: Unable to create configuration." >&2 exit 1 fi if [ -n "$1" ]; then for _file in $* do echo "${_file}" >> "${_playlist}" done else while read _file do echo "${_file}" >> "${_playlist}" done fi ${EZSTREAM} ${_normalize} ${_quiet} ${_verbose} -c "${_cfg}" exit $? ezstream-0.5.6/src/strfctns.h0000644000175000017500000000105111246572734015274 0ustar tootstoots/* $Id: strfctns.h 15788 2009-03-17 18:20:58Z moritz $ */ #ifndef __STRLFCTNS_H__ #define __STRLFCTNS_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifndef HAVE_STRLCAT # define strlcat local_strlcat #endif size_t local_strlcat(char *, const char *, size_t); #ifndef HAVE_STRLCPY # define strlcpy local_strlcpy #endif size_t local_strlcpy(char *, const char *, size_t); #ifndef HAVE_STRTONUM # define strtonum local_strtonum #endif long long local_strtonum(const char *, long long, long long, const char **); #endif /* __STRLFCTNS_H__ */ ezstream-0.5.6/NEWS0000644000175000017500000002721311246572750013173 0ustar tootstootsChanges in 0.5.6, released on 2009-08-31: * ezstream-file.sh: - [NEW] Add and install ezstream-file.sh, a new convenience shell script that generates configuration and playlist from a template and command line, respectively. (Bourne shell and POSIX utilities required.) See ezstream-file.sh(1) for details. * src/ezstream.c: - [MISC] Be more tolerant towards faulty playlists and similar issues. Failure to open a resource (e.g. a media file) is no longer fatal and operation will continue until 100 subsequent errors. Based on an idea from dhorton. (Ticket #1585) - [NEW] New command line option -s: Make ezstream function as a line- based shuffling utility. * src/playlist.c: - [MISC] Consider no output from a playlist program to be equivalent to an empty line, indicating that the end of the playlist is reached. - [FIX] Do not complain when receiving an empty line from a playlist program. * examples/: - [NEW] Add a real-world example playlist script with logging feature. Changes in 0.5.5, released on 2009-08-01: * win32/config.h: - [FIX] Re-enable TagLib support in MSVC build. Found by Roman Donchenko. (Ticket #1535) * various: - [NEW] New optional configuration option, to change the username used in authentication with Icecast. Suggested by Akos Veres. - [MISC] Further improvements and minor fixes in the build system. Changes in 0.5.4, released on 2009-03-28: * compat/sys/tree.*: - [MISC] Update the tree macros to a newer version. The manual, shipped for reference, now has a more friendly 2-clause BSD license. * various: - [FIX] Add a missing metadata charset conversion, and add charset conversions for filenames. From Roman Donchenko. - [FIX] Fix build on MinGW. From Roman Donchenko. - [MISC] Overhaul and modernize the build system. Ezstream is now expected to build "out of the box" on more systems without configuration tweaks. - [FIX] Adjust the build system to better handle optional dependencies. It is now possible to choose between TagLib and libvorbis for reading Ogg Vorbis metadata, or no Vorbis metadata support at all. (Ticket #1398) - [MISC] Miscellaneous code maintenance and a bit of cleaning up. Changes in 0.5.3, released on 2007-12-01: * src/ezstream.c: - [FIX] Prevent (very) long-running ezstream processes from dying without error message by ignoring SIGPIPE where available. Changes in 0.5.2, released on 2007-11-04: * src/ezstream.c: - [FIX] Fix a crash that occurs when streaming from standard input without using a script or program that supplies metadata information. (Ticket #1247) - [FIX] Similar to the fix for #1247, properly initialize another variable. The result is a cosmetic fix for the "real-time" status line when streaming from standard input. - [MISC] Provide a useful error message when there's no more data to read from standard input instead of talking about scary, bad file descriptors. - [MISC] Further prettify the output to make more sense when streaming from standard input. * src/xalloc.c: - [FIX] A rare, possible crash has been fixed in an error path. * examples/*: - [NEW] Add an example configuration for streaming from standard input. - [MISC] Improve reencoding examples to make them more easily usable with fewer changes. - [MISC] Reenconding example files have been renamed. Changes in 0.5.1, released on 2007-09-16: * src/playlist.c: - [FIX] Fix a segmentation fault in playlist_*_next() when trying to access empty playlists. (Ticket #1240) * src/ezstream.c: - [MISC] Issue a warning in verbose mode when dealing with an empty playlist file. This also makes it more obvious what is going on when a user makes ezstream spin on an empty playlist with set to 0. Changes in 0.5.0, released on 2007-08-31: * src/ezstream.c: - [FIX] The special case of streaming MP3 files without reencoding had been lost, causing such streams to have no metadata. This has been fixed. (Ticket #1225) - [MISC] Handle SIGINT and SIGTERM to perform a clean shutdown. * various: - [NEW] A new convenience feature has been added, to allow automatic normalization of metadata strings. Useful if the majority of files come from a broken encoder/tagging program. Disabled by default, this feature can be enabled with the new `-n' command line parameter. - [NEW] Enable Unicode support in TagLib and convert metadata strings to the current locale (LC_CTYPE) before displaying them on the console. Unsupported characters are displayed as '?', which does not affect the actual metadata. This feature requires iconv() via libc, if available, or GNU libiconv. - [NEW] Support gettimeofday() functionality on all platforms, including Windows. The "real-time status line" when using the -q and -v parameters is now complete everywhere. - [MISC] Add new --enable-debug configuration option to the configure script, which enables (also new) memory debugging features. (Not interesting for non-developers.) - [MISC] Various small code cleanups. * The Windows build of ezstream now supports reading metadata from files with TagLib. Changes in 0.4.3, released on 2007-07-24: * src/ezstream.c: - [FIX] Plug the file descriptor leak, partially fixed in version 0.4.1, for good - it affected more than just the -q use case. Changes in 0.4.2, released on 2007-07-17: * src/ezstream.c: - [FIX] Make work with playlists, too. Problem found by Geoff Shang . Changes in 0.4.1, released on 2007-07-15: * src/ezstream.c: - [FIX] Plug a file descriptor leak when using the -q parameter. * Documentation: - [FIX] Minor spelling/consistency fixes. Changes in 0.4.0, released on 2007-03-11: * src/util.*: - [FIX] The xfree() function did not work as intended due to a programming error. Found, and fix suggested, by Karl Heyes. * src/playlist.*: - [FIX] An error compareable to the one about xfree() in src/util.* has been fixed. - [MISC] Refuse to execute a group- or world-writeable playlist script or program. * src/compat.c: - [ADD] Implement a basename() function for Windows that behaves like the ones used on Unix systems. * win32/: - [MISC] Remove the rather ugly HTML version of the man page from the distribution, and provide a much better PDF version instead. * various: - [ADD] Allow ezstream to use TagLib for reading metadata from media files. TagLib (libtag_c) is now an optional dependency. - [ADD] When built with TagLib support, include the song length in the "real-time" information line, if available. - [ADD] New configuration option, which causes metadata to be read from the output of an external program or script. - [ADD] New runtime control via the SIGUSR2 signal, which triggers reading of fresh metadata information from (metadata is always read at song changes.) - [ADD] New configuration option, to customize metadata strings when used with the new feature. - [ADD] New '@a@' and '@t@' placeholders for separate artist and title metadata in de-/encoder commands. Changes in 0.3.0, released on 2007-03-05: * The original author, Ed Zaleski, hands over ezstream maintainership to Moritz Grimm. * New features: - Playlist shuffling support, enabled via the new configuration option. - Playlist scripting support: Indicate that the executable in should be run each time to get a new media filename to stream, by setting the new configuration option to 1. - New configuration option, which makes ezstream play a media file or playlist once and then exit. - New option to restrict the number of reconnection attempts to a server in case the connection goes down. - Add feature to skip the currently streaming track, done by sending the SIGUSR1 signal to the ezstream process. - New command line option `-q': Suppress standard error output from external de-/encoders. - New command line option `-v': Produce more verbose output. - New "real-time" status display of the stream when both -q and -v are given on the command line. - Thorough configuration file checks with helpful error messages. - The @M@ metadata placeholder is now supported in . - Playlists may now have the '.txt' filename extension in addition to '.m3u'. * Fixes: - At least one stack and one heap overflow have been fixed. - Several memory leaks have been fixed. - Strict checking of the configuration file prevents unexpected behavior and adds another safeguard to prevent crashes. - Fixed and more portable signal handling. * Miscellaneous, user-visible changes: - Improved documentation. Ezstream now has a comprehensive man page and the README file has been rewritten. - Consistency improvements in the configuration examples. The examples are now also installed. - The and configuration elements, as well as filename extension matching to detect playlists in the element, are now case insensitive. - Various improvements in the build system and portability fixes. - Consistent and more helpful messages from ezstream. By default, ezstream no longer clutters the screen with lots of output (some information that used to be available needs to be enabled with the new `-v' command line parameter.) - Tweaked metadata string generation: no more lone " - " dashes at the beginning or end of the string. - New command line option `-V': Print the version number and exit. Changes in 0.2.1, released on 2005-12-14: * src/ezstream.c: - [FIX] Prevent a heap overflow with large ID3v1 tags. - [FIX] Use pclose() on FILE* handles that were opened with popen(). Changes in 0.2.0, released on 2005-01-05: * various: - [MISC] Clean up and improve example configuration files, and add more examples. * src/ezstream.c: - [FIX] Fix reencoding support on Windows. - [ADD] Attempt to reconnect to a server if the connection goes down during streaming. Changes in 0.1.3, released on 2004-12-22: * various: - [ADD] Add support for streaming Ogg Theora. - [ADD] Add reencoding support via external de-/encoders. - [ADD] Support passing through unknown media types. Changes in 0.1.2, released on 2004-04-21: * src/ezstream.c: - [ADD] Add feature to reread the playlist after the currently streaming track, done by sending the SIGHUP signal to the ezstream process. Changes is 0.1.1, released on 2004-02-02: * src/ezstream.c: - [FIX] Set read mode to binary for stdin on WIN32. * win32/ezstream.dsp: - [MISC] Add libxml to project file. 2004-01-30: * Initial import of ezstream 0.1.0 into Xiph.org SVN. * Ezstream 0.1.0 released. ezstream-0.5.6/aclocal.m40000644000175000017500000024251411246573051014332 0ustar tootstoots# generated automatically by aclocal 1.10.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.61],, [m4_warning([this file was generated for autoconf 2.61. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 4 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [# Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR # iconv.m4 serial AM6 (gettext-0.17) dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_TRY_RUN([ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) # lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) # lib-link.m4 serial 13 (gettext-0.17) dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ(2.54) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Autoconf >= 2.61 supports dots in --with options. define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` LIB[]NAME[]_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) # lib-prefix.m4 serial 5 (gettext-0.15) dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing dnl the basename of the libdir, either "lib" or "lib64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. The current dnl practice is that on a system supporting 32-bit and 64-bit instruction dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit dnl libraries go under $prefix/lib. We determine the compiler's default dnl mode by looking at the compiler's library search path. If at least dnl of its elements ends in /lib64 or points to a directory whose absolute dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the dnl default, namely "lib". acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES m4_include([m4/ccflags.m4]) m4_include([m4/libshout.m4]) m4_include([m4/libvorbis.m4]) m4_include([m4/libxml2.m4]) m4_include([m4/progname.m4]) m4_include([m4/taglib.m4]) m4_include([m4/tree.m4]) m4_include([m4/vacopy.m4]) m4_include([m4/vars.m4]) ezstream-0.5.6/win32/0000755000175000017500000000000011257756745013443 5ustar tootstootsezstream-0.5.6/win32/taglib.vcproj0000644000175000017500000003200111246572742016115 0ustar tootstoots ezstream-0.5.6/win32/shout/0000755000175000017500000000000011257756745014605 5ustar tootstootsezstream-0.5.6/win32/shout/shout.h0000644000175000017500000001554411246572740016116 0ustar tootstoots/* shout.h * * API for libshout, the streaming library for icecast * * Copyright (C) 2002-2003 the Icecast team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __LIBSHOUT_SHOUT_H__ #define __LIBSHOUT_SHOUT_H__ #define VERSION "2.2.2" #define LIBSHOUT_MAJOR 2 #define LIBSHOUT_MINOR 2 #define LIBSHOUT_MICRO 2 #include #ifdef WIN32 #include #endif #define SHOUTERR_SUCCESS (0) #define SHOUTERR_INSANE (-1) #define SHOUTERR_NOCONNECT (-2) #define SHOUTERR_NOLOGIN (-3) #define SHOUTERR_SOCKET (-4) #define SHOUTERR_MALLOC (-5) #define SHOUTERR_METADATA (-6) #define SHOUTERR_CONNECTED (-7) #define SHOUTERR_UNCONNECTED (-8) #define SHOUTERR_UNSUPPORTED (-9) #define SHOUTERR_BUSY (-10) #define SHOUT_FORMAT_OGG (0) #define SHOUT_FORMAT_MP3 (1) /* backward-compatibility alias */ #define SHOUT_FORMAT_VORBIS SHOUT_FORMAT_OGG #define SHOUT_PROTOCOL_HTTP (0) #define SHOUT_PROTOCOL_XAUDIOCAST (1) #define SHOUT_PROTOCOL_ICY (2) #define SHOUT_AI_BITRATE "bitrate" #define SHOUT_AI_SAMPLERATE "samplerate" #define SHOUT_AI_CHANNELS "channels" #define SHOUT_AI_QUALITY "quality" typedef struct shout shout_t; typedef struct _util_dict shout_metadata_t; #ifdef __cplusplus extern "C" { #endif /* initializes the shout library. Must be called before anything else */ void shout_init(void); /* shuts down the shout library, deallocating any global storage. Don't call * anything afterwards */ void shout_shutdown(void); /* returns a static version string. Non-null parameters will be set to the * value of the library major, minor, and patch levels, respectively */ const char *shout_version(int *major, int *minor, int *patch); /* Allocates and sets up a new shout_t. Returns NULL if it can't get enough * memory. The returns shout_t must be disposed of with shout_free. */ shout_t *shout_new(void); /* Free all memory allocated by a shout_t */ void shout_free(shout_t *self); /* Returns a statically allocated string describing the last shout error * to occur. Only valid until the next libshout call on this shout_t */ const char *shout_get_error(shout_t *self); /* Return the error code (e.g. SHOUTERR_SOCKET) for this shout instance */ int shout_get_errno(shout_t *self); /* returns SHOUTERR_CONNECTED or SHOUTERR_UNCONNECTED */ int shout_get_connected(shout_t *self); /* Parameter manipulation functions. libshout makes copies of all parameters, * the caller may free its copies after giving them to libshout. May return * SHOUTERR_MALLOC */ int shout_set_host(shout_t *self, const char *host); const char *shout_get_host(shout_t *self); int shout_set_port(shout_t *self, unsigned short port); unsigned short shout_get_port(shout_t *self); int shout_set_password(shout_t *, const char *password); const char *shout_get_password(shout_t *self); int shout_set_mount(shout_t *self, const char *mount); const char *shout_get_mount(shout_t *self); int shout_set_name(shout_t *self, const char *name); const char *shout_get_name(shout_t *self); int shout_set_url(shout_t *self, const char *url); const char *shout_get_url(shout_t *self); int shout_set_genre(shout_t *self, const char *genre); const char *shout_get_genre(shout_t *self); int shout_set_user(shout_t *self, const char *username); const char *shout_get_user(shout_t *self); int shout_set_agent(shout_t *self, const char *username); const char *shout_get_agent(shout_t *self); int shout_set_description(shout_t *self, const char *description); const char *shout_get_description(shout_t *self); int shout_set_dumpfile(shout_t *self, const char *dumpfile); const char *shout_get_dumpfile(shout_t *self); int shout_set_audio_info(shout_t *self, const char *name, const char *value); const char *shout_get_audio_info(shout_t *self, const char *name); int shout_set_public(shout_t *self, unsigned int make_public); unsigned int shout_get_public(shout_t *self); /* takes a SHOUT_FORMAT_xxxx argument */ int shout_set_format(shout_t *self, unsigned int format); unsigned int shout_get_format(shout_t *self); /* takes a SHOUT_PROTOCOL_xxxxx argument */ int shout_set_protocol(shout_t *self, unsigned int protocol); unsigned int shout_get_protocol(shout_t *self); /* Instructs libshout to use nonblocking I/O. Must be called before * shout_open (no switching back and forth midstream at the moment). */ int shout_set_nonblocking(shout_t* self, unsigned int nonblocking); unsigned int shout_get_nonblocking(shout_t *self); /* Opens a connection to the server. All parameters must already be set */ int shout_open(shout_t *self); /* Closes a connection to the server */ int shout_close(shout_t *self); /* Send data to the server, parsing it for format specific timing info */ int shout_send(shout_t *self, const unsigned char *data, size_t len); /* Send unparsed data to the server. Do not use this unless you know * what you are doing. * Returns the number of bytes written, or < 0 on error. */ ssize_t shout_send_raw(shout_t *self, const unsigned char *data, size_t len); /* return the number of bytes currently on the write queue (only makes sense in * nonblocking mode). */ ssize_t shout_queuelen(shout_t *self); /* Puts caller to sleep until it is time to send more data to the server */ void shout_sync(shout_t *self); /* Amount of time in ms caller should wait before sending again */ int shout_delay(shout_t *self); /* Sets MP3 metadata. * Returns: * SHOUTERR_SUCCESS * SHOUTERR_UNSUPPORTED if format isn't MP3 * SHOUTERR_MALLOC * SHOUTERR_INSANE * SHOUTERR_NOCONNECT * SHOUTERR_SOCKET */ int shout_set_metadata(shout_t *self, shout_metadata_t *metadata); /* Allocates a new metadata structure. Must be freed by shout_metadata_free. */ shout_metadata_t *shout_metadata_new(void); /* Free resources allocated by shout_metadata_t */ void shout_metadata_free(shout_metadata_t *self); /* Add a parameter to the metadata structure. * Returns: * SHOUTERR_SUCCESS on success * SHOUTERR_INSANE if self isn't a valid shout_metadata_t* or name is null * SHOUTERR_MALLOC if memory can't be allocated */ int shout_metadata_add(shout_metadata_t *self, const char *name, const char *value); #ifdef __cplusplus } #endif /* --- Compiled features --- */ #define SHOUT_THREADSAFE 0 #endif /* __LIBSHOUT_SHOUT_H__ */ ezstream-0.5.6/win32/shout/Makefile.am0000644000175000017500000000012411246572740016623 0ustar tootstootsAUTOMAKE_OPTIONS = 1.9 foreign EXTRA_DIST = shout.h CLEANFILES = *~ core *.core ezstream-0.5.6/win32/shout/Makefile.in0000644000175000017500000002254011246573337016645 0ustar tootstoots# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = win32/shout DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ccflags.m4 \ $(top_srcdir)/m4/libshout.m4 $(top_srcdir)/m4/libvorbis.m4 \ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/progname.m4 \ $(top_srcdir)/m4/taglib.m4 $(top_srcdir)/m4/tree.m4 \ $(top_srcdir)/m4/vacopy.m4 $(top_srcdir)/m4/vars.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPAT_INCLUDES = @COMPAT_INCLUDES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXAMPLES_DIR = @EXAMPLES_DIR@ EXEEXT = @EXEEXT@ EZ_CFLAGS = @EZ_CFLAGS@ EZ_CPPFLAGS = @EZ_CPPFLAGS@ EZ_LDFLAGS = @EZ_LDFLAGS@ EZ_LIBS = @EZ_LIBS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHOUT_CFLAGS = @LIBSHOUT_CFLAGS@ LIBSHOUT_CPPFLAGS = @LIBSHOUT_CPPFLAGS@ LIBSHOUT_LDFLAGS = @LIBSHOUT_LDFLAGS@ LIBSHOUT_LIBS = @LIBSHOUT_LIBS@ LIBVORBISFILE_LIBS = @LIBVORBISFILE_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ TAGLIB_CPPFLAGS = @TAGLIB_CPPFLAGS@ TAGLIB_C_LIBS = @TAGLIB_C_LIBS@ TAGLIB_LDFLAGS = @TAGLIB_LDFLAGS@ VERSION = @VERSION@ VORBIS_CFLAGS = @VORBIS_CFLAGS@ VORBIS_CPPFLAGS = @VORBIS_CPPFLAGS@ VORBIS_LDFLAGS = @VORBIS_LDFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9 foreign EXTRA_DIST = shout.h CLEANFILES = *~ core *.core all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign win32/shout/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign win32/shout/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ezstream-0.5.6/win32/libtheora.vcproj0000644000175000017500000002446411246572742016642 0ustar tootstoots ezstream-0.5.6/win32/libspeex.vcproj0000644000175000017500000001761611246572742016505 0ustar tootstoots ezstream-0.5.6/win32/libvorbis.vcproj0000644000175000017500000002300411246572742016651 0ustar tootstoots ezstream-0.5.6/win32/ezstream.vcproj0000644000175000017500000001430411246572742016513 0ustar tootstoots ezstream-0.5.6/win32/compat.h0000644000175000017500000000060611246572742015070 0ustar tootstoots#ifndef __WIN32_COMPAT_H__ #define __WIN32_COMPAT_H__ /* #define WIN32_LEAN_AND_MEAN */ #include #include #include #include #define inline __inline #define va_copy(dst, src) memcpy(&(dst), &(src), sizeof(va_list)) #define PATH_SEPARATORS "\\/" #ifndef ssize_t # define ssize_t long #endif /* !ssize_t */ #endif /* __WIN32_COMPAT_H__ */ ezstream-0.5.6/win32/config.h0000644000175000017500000000064011246572742015050 0ustar tootstoots#ifndef __WIN32_CONFIG_H__ #define __WIN32_CONFIG_H__ #define PACKAGE_STRING "ezstream 0.5.6" #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_LOCALE_H 1 #define HAVE_STAT 1 #define HAVE__PCLOSE 1 #define HAVE__POPEN 1 #define HAVE__SNPRINTF 1 #define HAVE__STRTOI64 1 #define HAVE_ICONV 1 #define HAVE_TAGLIB 1 #define ICONV_CONST #include #endif /* __WIN32_CONFIG_H__ */ ezstream-0.5.6/win32/Makefile.am0000644000175000017500000000112411246572742015464 0ustar tootstootsAUTOMAKE_OPTIONS = 1.9 foreign SUBDIRS = shout EXTRA_DIST = \ README.win32 config.h compat.h \ ezstream.sln ezstream.vcproj \ libflac.vcproj libogg.vcproj libshout.vcproj libspeex.vcproj \ libtheora.vcproj libvorbis.vcproj libvorbisfile.vcproj libz.vcproj \ taglib.vcproj taglib_c.vcproj \ tfile.cpp CLEANFILES = core *.core *~ .*~ ezstream.1.pdf do_subst = sed -e 's,!!EXAMPLES_DIR!!,${PACKAGE_TARNAME}-${PACKAGE_VERSION}-win32/examples,g' .PHONY: regen-win32 regen-win32: Makefile $(do_subst) < $(top_srcdir)/doc/ezstream.1.in | nroff -Tps -mandoc - | ps2pdf - ezstream.1.pdf ezstream-0.5.6/win32/Makefile.in0000644000175000017500000003652511246573337015513 0ustar tootstoots# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = win32 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ccflags.m4 \ $(top_srcdir)/m4/libshout.m4 $(top_srcdir)/m4/libvorbis.m4 \ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/progname.m4 \ $(top_srcdir)/m4/taglib.m4 $(top_srcdir)/m4/tree.m4 \ $(top_srcdir)/m4/vacopy.m4 $(top_srcdir)/m4/vars.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPAT_INCLUDES = @COMPAT_INCLUDES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXAMPLES_DIR = @EXAMPLES_DIR@ EXEEXT = @EXEEXT@ EZ_CFLAGS = @EZ_CFLAGS@ EZ_CPPFLAGS = @EZ_CPPFLAGS@ EZ_LDFLAGS = @EZ_LDFLAGS@ EZ_LIBS = @EZ_LIBS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHOUT_CFLAGS = @LIBSHOUT_CFLAGS@ LIBSHOUT_CPPFLAGS = @LIBSHOUT_CPPFLAGS@ LIBSHOUT_LDFLAGS = @LIBSHOUT_LDFLAGS@ LIBSHOUT_LIBS = @LIBSHOUT_LIBS@ LIBVORBISFILE_LIBS = @LIBVORBISFILE_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ TAGLIB_CPPFLAGS = @TAGLIB_CPPFLAGS@ TAGLIB_C_LIBS = @TAGLIB_C_LIBS@ TAGLIB_LDFLAGS = @TAGLIB_LDFLAGS@ VERSION = @VERSION@ VORBIS_CFLAGS = @VORBIS_CFLAGS@ VORBIS_CPPFLAGS = @VORBIS_CPPFLAGS@ VORBIS_LDFLAGS = @VORBIS_LDFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9 foreign SUBDIRS = shout EXTRA_DIST = \ README.win32 config.h compat.h \ ezstream.sln ezstream.vcproj \ libflac.vcproj libogg.vcproj libshout.vcproj libspeex.vcproj \ libtheora.vcproj libvorbis.vcproj libvorbisfile.vcproj libz.vcproj \ taglib.vcproj taglib_c.vcproj \ tfile.cpp CLEANFILES = core *.core *~ .*~ ezstream.1.pdf do_subst = sed -e 's,!!EXAMPLES_DIR!!,${PACKAGE_TARNAME}-${PACKAGE_VERSION}-win32/examples,g' all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign win32/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign win32/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive distclean distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am .PHONY: regen-win32 regen-win32: Makefile $(do_subst) < $(top_srcdir)/doc/ezstream.1.in | nroff -Tps -mandoc - | ps2pdf - ezstream.1.pdf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ezstream-0.5.6/win32/taglib_c.vcproj0000644000175000017500000001143611246572742016430 0ustar tootstoots ezstream-0.5.6/win32/README.win320000644000175000017500000000660211246572742015257 0ustar tootstootsREADME.win32 - Information about the binary Ezstream distribution for Windows ============================================================================= 1. .ZIP Archive Contents ------------------------ | File | Description | +======================================================================+ | \COPYING.txt | License for using, modifying and | | | distributing Ezstream. | +-----------------------+----------------------------------------------+ | \README.txt | This file. | +-----------------------+----------------------------------------------+ | \ezstream.1.pdf | The ezstream manual in PDF format. | +-----------------------+----------------------------------------------+ | \ezstream.exe | The ezstream executable file. | +-----------------------+----------------------------------------------+ | \ezstream-X.Y.Z.zip | The ezstream source distribution, from which | | | ezstream.exe was built. | +-----------------------+----------------------------------------------+ | \examples\*.xml | Ezstream example configuration files. | +-----------------------+----------------------------------------------+ | \examples\*.sh | Example playlist and metadata scripts, for | | | demonstrational purposes (these are shell | | | scripts.) | +-----------------------+----------------------------------------------+ 2. Installation --------------- As of version 0.3.0, ezstream no longer comes with an installer. If you have a previous version of ezstream installed, you might want to simply uninstall it. The ezstream.exe file can be run from any location. To install it, simply copy it to a location of your choosing. To make it available anywhere on the system, add the installation folder to your PATH environment variable. If it doesn't start, e.g. running > ezstream.exe -h does not show the command line help, the Microsoft Visual C++ 2008 runtime libraries are missing. Download and install vcredist_x86.exe, which can be easily found on www.microsoft.com via http://www.google.com/search?q=vc+2008+redist 3. Limited functionality ------------------------ A few useful features are missing in the Windows version of ezstream: * Runtime control via signals is not possible. * Some useful external utilities (encoders, decoders) may not be available on Windows. 4. Source code -------------- Ezstream uses: * zlib (http://www.zlib.net/, BSD-like license) * libiconv (http://www.gnu.org/software/libiconv/, LGPL) * libxml2 (http://xmlsoft.org/, BSD-like license) * libogg, libvorbis, libvorbisfile (http://www.vorbis.com/, BSD-like license) * libFLAC (http://flac.sourceforge.net/, BSD-like license) * libtheora (http://www.theora.org/, BSD-like license) * libshout (http://www.icecast.org, LGPL) * TagLib (http://ktown.kde.org/~wheeler/taglib.html, LGPL) These libraries are statically linked into the ezstream.exe file. Ezstream itself is licensed under the GPL version 2 (see COPYING.txt for details.) 5. Support ---------- For information on how to report issues with ezstream, please visit the ezstream home page at http://www.icecast.org/ezstream.php ezstream-0.5.6/win32/libz.vcproj0000644000175000017500000001264311246572742015625 0ustar tootstoots ezstream-0.5.6/win32/libflac.vcproj0000644000175000017500000002155611246572742016264 0ustar tootstoots ezstream-0.5.6/win32/ezstream.sln0000644000175000017500000001571511246572742016013 0ustar tootstoots Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ezstream", "ezstream.vcproj", "{43809192-0B8F-4AFE-85E6-C54E265CFB75}" ProjectSection(ProjectDependencies) = postProject {0A70BF55-FCF6-4DD8-A455-8233666A60E1} = {0A70BF55-FCF6-4DD8-A455-8233666A60E1} {1ACB165E-8C63-4B44-A4EB-791EFA8FA0A5} = {1ACB165E-8C63-4B44-A4EB-791EFA8FA0A5} {29A3AE75-E9A8-4A43-BADB-A4EF0972BD5B} = {29A3AE75-E9A8-4A43-BADB-A4EF0972BD5B} {8FB7BDB7-B66C-4D45-A03D-2FD46AAB1B08} = {8FB7BDB7-B66C-4D45-A03D-2FD46AAB1B08} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg", "libogg.vcproj", "{60A624C8-EEFF-4083-A02E-1A4F6B56CE4F}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvorbis", "libvorbis.vcproj", "{5CC6CF7F-35F8-41D4-AB87-F8173EFF390D}" ProjectSection(ProjectDependencies) = postProject {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F} = {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvorbisfile", "libvorbisfile.vcproj", "{8FB7BDB7-B66C-4D45-A03D-2FD46AAB1B08}" ProjectSection(ProjectDependencies) = postProject {5CC6CF7F-35F8-41D4-AB87-F8173EFF390D} = {5CC6CF7F-35F8-41D4-AB87-F8173EFF390D} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libflac", "libflac.vcproj", "{3B517561-45A7-4189-B149-6EA03369255D}" ProjectSection(ProjectDependencies) = postProject {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F} = {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtheora", "libtheora.vcproj", "{140F1A87-BAE3-4DBD-9221-D0918A63646F}" ProjectSection(ProjectDependencies) = postProject {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F} = {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspeex", "libspeex.vcproj", "{6EC28559-BD88-4C63-AD91-A406FED1B363}" ProjectSection(ProjectDependencies) = postProject {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F} = {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libshout", "libshout.vcproj", "{29A3AE75-E9A8-4A43-BADB-A4EF0972BD5B}" ProjectSection(ProjectDependencies) = postProject {6EC28559-BD88-4C63-AD91-A406FED1B363} = {6EC28559-BD88-4C63-AD91-A406FED1B363} {3B517561-45A7-4189-B149-6EA03369255D} = {3B517561-45A7-4189-B149-6EA03369255D} {5CC6CF7F-35F8-41D4-AB87-F8173EFF390D} = {5CC6CF7F-35F8-41D4-AB87-F8173EFF390D} {140F1A87-BAE3-4DBD-9221-D0918A63646F} = {140F1A87-BAE3-4DBD-9221-D0918A63646F} {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F} = {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libz", "libz.vcproj", "{1ACB165E-8C63-4B44-A4EB-791EFA8FA0A5}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "taglib", "taglib.vcproj", "{B1A6316C-A73A-4B34-A428-E967A698CA37}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "taglib_c", "taglib_c.vcproj", "{0A70BF55-FCF6-4DD8-A455-8233666A60E1}" ProjectSection(ProjectDependencies) = postProject {B1A6316C-A73A-4B34-A428-E967A698CA37} = {B1A6316C-A73A-4B34-A428-E967A698CA37} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {43809192-0B8F-4AFE-85E6-C54E265CFB75}.Debug|Win32.ActiveCfg = Debug|Win32 {43809192-0B8F-4AFE-85E6-C54E265CFB75}.Debug|Win32.Build.0 = Debug|Win32 {43809192-0B8F-4AFE-85E6-C54E265CFB75}.Release|Win32.ActiveCfg = Release|Win32 {43809192-0B8F-4AFE-85E6-C54E265CFB75}.Release|Win32.Build.0 = Release|Win32 {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F}.Debug|Win32.ActiveCfg = Debug|Win32 {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F}.Debug|Win32.Build.0 = Debug|Win32 {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F}.Release|Win32.ActiveCfg = Release|Win32 {60A624C8-EEFF-4083-A02E-1A4F6B56CE4F}.Release|Win32.Build.0 = Release|Win32 {5CC6CF7F-35F8-41D4-AB87-F8173EFF390D}.Debug|Win32.ActiveCfg = Debug|Win32 {5CC6CF7F-35F8-41D4-AB87-F8173EFF390D}.Debug|Win32.Build.0 = Debug|Win32 {5CC6CF7F-35F8-41D4-AB87-F8173EFF390D}.Release|Win32.ActiveCfg = Release|Win32 {5CC6CF7F-35F8-41D4-AB87-F8173EFF390D}.Release|Win32.Build.0 = Release|Win32 {8FB7BDB7-B66C-4D45-A03D-2FD46AAB1B08}.Debug|Win32.ActiveCfg = Debug|Win32 {8FB7BDB7-B66C-4D45-A03D-2FD46AAB1B08}.Debug|Win32.Build.0 = Debug|Win32 {8FB7BDB7-B66C-4D45-A03D-2FD46AAB1B08}.Release|Win32.ActiveCfg = Release|Win32 {8FB7BDB7-B66C-4D45-A03D-2FD46AAB1B08}.Release|Win32.Build.0 = Release|Win32 {3B517561-45A7-4189-B149-6EA03369255D}.Debug|Win32.ActiveCfg = Debug|Win32 {3B517561-45A7-4189-B149-6EA03369255D}.Debug|Win32.Build.0 = Debug|Win32 {3B517561-45A7-4189-B149-6EA03369255D}.Release|Win32.ActiveCfg = Release|Win32 {3B517561-45A7-4189-B149-6EA03369255D}.Release|Win32.Build.0 = Release|Win32 {140F1A87-BAE3-4DBD-9221-D0918A63646F}.Debug|Win32.ActiveCfg = Debug|Win32 {140F1A87-BAE3-4DBD-9221-D0918A63646F}.Debug|Win32.Build.0 = Debug|Win32 {140F1A87-BAE3-4DBD-9221-D0918A63646F}.Release|Win32.ActiveCfg = Release|Win32 {140F1A87-BAE3-4DBD-9221-D0918A63646F}.Release|Win32.Build.0 = Release|Win32 {6EC28559-BD88-4C63-AD91-A406FED1B363}.Debug|Win32.ActiveCfg = Debug|Win32 {6EC28559-BD88-4C63-AD91-A406FED1B363}.Debug|Win32.Build.0 = Debug|Win32 {6EC28559-BD88-4C63-AD91-A406FED1B363}.Release|Win32.ActiveCfg = Release|Win32 {6EC28559-BD88-4C63-AD91-A406FED1B363}.Release|Win32.Build.0 = Release|Win32 {29A3AE75-E9A8-4A43-BADB-A4EF0972BD5B}.Debug|Win32.ActiveCfg = Debug|Win32 {29A3AE75-E9A8-4A43-BADB-A4EF0972BD5B}.Debug|Win32.Build.0 = Debug|Win32 {29A3AE75-E9A8-4A43-BADB-A4EF0972BD5B}.Release|Win32.ActiveCfg = Release|Win32 {29A3AE75-E9A8-4A43-BADB-A4EF0972BD5B}.Release|Win32.Build.0 = Release|Win32 {1ACB165E-8C63-4B44-A4EB-791EFA8FA0A5}.Debug|Win32.ActiveCfg = Debug|Win32 {1ACB165E-8C63-4B44-A4EB-791EFA8FA0A5}.Debug|Win32.Build.0 = Debug|Win32 {1ACB165E-8C63-4B44-A4EB-791EFA8FA0A5}.Release|Win32.ActiveCfg = Release|Win32 {1ACB165E-8C63-4B44-A4EB-791EFA8FA0A5}.Release|Win32.Build.0 = Release|Win32 {B1A6316C-A73A-4B34-A428-E967A698CA37}.Debug|Win32.ActiveCfg = Debug|Win32 {B1A6316C-A73A-4B34-A428-E967A698CA37}.Debug|Win32.Build.0 = Debug|Win32 {B1A6316C-A73A-4B34-A428-E967A698CA37}.Release|Win32.ActiveCfg = Release|Win32 {B1A6316C-A73A-4B34-A428-E967A698CA37}.Release|Win32.Build.0 = Release|Win32 {0A70BF55-FCF6-4DD8-A455-8233666A60E1}.Debug|Win32.ActiveCfg = Debug|Win32 {0A70BF55-FCF6-4DD8-A455-8233666A60E1}.Debug|Win32.Build.0 = Debug|Win32 {0A70BF55-FCF6-4DD8-A455-8233666A60E1}.Release|Win32.ActiveCfg = Release|Win32 {0A70BF55-FCF6-4DD8-A455-8233666A60E1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ezstream-0.5.6/win32/libvorbisfile.vcproj0000644000175000017500000001066511246572742017522 0ustar tootstoots ezstream-0.5.6/win32/libshout.vcproj0000644000175000017500000001512411246572742016513 0ustar tootstoots ezstream-0.5.6/win32/tfile.cpp0000644000175000017500000003135111246572742015244 0ustar tootstoots/*************************************************************************** copyright : (C) 2002, 2003 by Scott Wheeler email : wheeler@kde.org ***************************************************************************/ /*************************************************************************** * This library is free software; you can redistribute it and/or modify * * it under the terms of the GNU Lesser General Public License version * * 2.1 as published by the Free Software Foundation. * * * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * * USA * ***************************************************************************/ #include "tfile.h" #include "tstring.h" #include "tdebug.h" #ifdef WIN32 # include # define ftruncate _chsize #endif /* WIN32 */ #include #include #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #if !defined(R_OK) || !defined(W_OK) # undef R_OK # undef W_OK # define R_OK 4 # define W_OK 2 #endif /* !R_OK || !W_OK */ using namespace TagLib; class File::FilePrivate { public: FilePrivate(const char *fileName) : file(0), name(fileName), readOnly(true), valid(true), size(0) {} ~FilePrivate() { free((void *)name); } FILE *file; const char *name; bool readOnly; bool valid; ulong size; static const uint bufferSize = 1024; }; //////////////////////////////////////////////////////////////////////////////// // public members //////////////////////////////////////////////////////////////////////////////// File::File(const char *file) { d = new FilePrivate(::strdup(file)); d->readOnly = !isWritable(file); d->file = fopen(file, d->readOnly ? "r" : "r+"); if(!d->file) debug("Could not open file " + String(file)); } File::~File() { if(d->file) fclose(d->file); delete d; } const char *File::name() const { return d->name; } ByteVector File::readBlock(ulong length) { if(!d->file) { debug("File::readBlock() -- Invalid File"); return ByteVector::null; } if(length > FilePrivate::bufferSize && length > ulong(File::length())) { length = File::length(); } ByteVector v(static_cast(length)); const int count = fread(v.data(), sizeof(char), length, d->file); v.resize(count); return v; } void File::writeBlock(const ByteVector &data) { if(!d->file) return; if(d->readOnly) { debug("File::writeBlock() -- attempted to write to a file that is not writable"); return; } fwrite(data.data(), sizeof(char), data.size(), d->file); } long File::find(const ByteVector &pattern, long fromOffset, const ByteVector &before) { if(!d->file || pattern.size() > d->bufferSize) return -1; // The position in the file that the current buffer starts at. long bufferOffset = fromOffset; ByteVector buffer; // These variables are used to keep track of a partial match that happens at // the end of a buffer. int previousPartialMatch = -1; int beforePreviousPartialMatch = -1; // Save the location of the current read pointer. We will restore the // position using seek() before all returns. long originalPosition = tell(); // Start the search at the offset. seek(fromOffset); // This loop is the crux of the find method. There are three cases that we // want to account for: // // (1) The previously searched buffer contained a partial match of the search // pattern and we want to see if the next one starts with the remainder of // that pattern. // // (2) The search pattern is wholly contained within the current buffer. // // (3) The current buffer ends with a partial match of the pattern. We will // note this for use in the next itteration, where we will check for the rest // of the pattern. // // All three of these are done in two steps. First we check for the pattern // and do things appropriately if a match (or partial match) is found. We // then check for "before". The order is important because it gives priority // to "real" matches. for(buffer = readBlock(d->bufferSize); buffer.size() > 0; buffer = readBlock(d->bufferSize)) { // (1) previous partial match if(previousPartialMatch >= 0 && int(d->bufferSize) > previousPartialMatch) { const int patternOffset = (d->bufferSize - previousPartialMatch); if(buffer.containsAt(pattern, 0, patternOffset)) { seek(originalPosition); return bufferOffset - d->bufferSize + previousPartialMatch; } } if(!before.isNull() && beforePreviousPartialMatch >= 0 && int(d->bufferSize) > beforePreviousPartialMatch) { const int beforeOffset = (d->bufferSize - beforePreviousPartialMatch); if(buffer.containsAt(before, 0, beforeOffset)) { seek(originalPosition); return -1; } } // (2) pattern contained in current buffer long location = buffer.find(pattern); if(location >= 0) { seek(originalPosition); return bufferOffset + location; } if(!before.isNull() && buffer.find(before) >= 0) { seek(originalPosition); return -1; } // (3) partial match previousPartialMatch = buffer.endsWithPartialMatch(pattern); if(!before.isNull()) beforePreviousPartialMatch = buffer.endsWithPartialMatch(before); bufferOffset += d->bufferSize; } // Since we hit the end of the file, reset the status before continuing. clear(); seek(originalPosition); return -1; } long File::rfind(const ByteVector &pattern, long fromOffset, const ByteVector &before) { if(!d->file || pattern.size() > d->bufferSize) return -1; // The position in the file that the current buffer starts at. ByteVector buffer; // These variables are used to keep track of a partial match that happens at // the end of a buffer. /* int previousPartialMatch = -1; int beforePreviousPartialMatch = -1; */ // Save the location of the current read pointer. We will restore the // position using seek() before all returns. long originalPosition = tell(); // Start the search at the offset. long bufferOffset; if(fromOffset == 0) { seek(-1 * int(d->bufferSize), End); bufferOffset = tell(); } else { seek(fromOffset + -1 * int(d->bufferSize), Beginning); bufferOffset = tell(); } // See the notes in find() for an explanation of this algorithm. for(buffer = readBlock(d->bufferSize); buffer.size() > 0; buffer = readBlock(d->bufferSize)) { // TODO: (1) previous partial match // (2) pattern contained in current buffer long location = buffer.rfind(pattern); if(location >= 0) { seek(originalPosition); return bufferOffset + location; } if(!before.isNull() && buffer.find(before) >= 0) { seek(originalPosition); return -1; } // TODO: (3) partial match bufferOffset -= d->bufferSize; seek(bufferOffset); } // Since we hit the end of the file, reset the status before continuing. clear(); seek(originalPosition); return -1; } void File::insert(const ByteVector &data, ulong start, ulong replace) { if(!d->file) return; if(data.size() == replace) { seek(start); writeBlock(data); return; } else if(data.size() < replace) { seek(start); writeBlock(data); removeBlock(start + data.size(), replace - data.size()); return; } // Woohoo! Faster (about 20%) than id3lib at last. I had to get hardcore // and avoid TagLib's high level API for rendering just copying parts of // the file that don't contain tag data. // // Now I'll explain the steps in this ugliness: // First, make sure that we're working with a buffer that is longer than // the *differnce* in the tag sizes. We want to avoid overwriting parts // that aren't yet in memory, so this is necessary. ulong bufferLength = bufferSize(); while(data.size() - replace > bufferLength) bufferLength += bufferSize(); // Set where to start the reading and writing. long readPosition = start + replace; long writePosition = start; ByteVector buffer; ByteVector aboutToOverwrite(static_cast(bufferLength)); // This is basically a special case of the loop below. Here we're just // doing the same steps as below, but since we aren't using the same buffer // size -- instead we're using the tag size -- this has to be handled as a // special case. We're also using File::writeBlock() just for the tag. // That's a bit slower than using char *'s so, we're only doing it here. seek(readPosition); int bytesRead = fread(aboutToOverwrite.data(), sizeof(char), bufferLength, d->file); readPosition += bufferLength; seek(writePosition); writeBlock(data); writePosition += data.size(); buffer = aboutToOverwrite; // Ok, here's the main loop. We want to loop until the read fails, which // means that we hit the end of the file. while(bytesRead != 0) { // Seek to the current read position and read the data that we're about // to overwrite. Appropriately increment the readPosition. seek(readPosition); bytesRead = fread(aboutToOverwrite.data(), sizeof(char), bufferLength, d->file); aboutToOverwrite.resize(bytesRead); readPosition += bufferLength; // Check to see if we just read the last block. We need to call clear() // if we did so that the last write succeeds. if(ulong(bytesRead) < bufferLength) clear(); // Seek to the write position and write our buffer. Increment the // writePosition. seek(writePosition); fwrite(buffer.data(), sizeof(char), bufferLength, d->file); writePosition += bufferLength; // Make the current buffer the data that we read in the beginning. buffer = aboutToOverwrite; // Again, we need this for the last write. We don't want to write garbage // at the end of our file, so we need to set the buffer size to the amount // that we actually read. bufferLength = bytesRead; } } void File::removeBlock(ulong start, ulong length) { if(!d->file) return; ulong bufferLength = bufferSize(); long readPosition = start + length; long writePosition = start; ByteVector buffer(static_cast(bufferLength)); ulong bytesRead = true; while(bytesRead != 0) { seek(readPosition); bytesRead = fread(buffer.data(), sizeof(char), bufferLength, d->file); buffer.resize(bytesRead); readPosition += bytesRead; // Check to see if we just read the last block. We need to call clear() // if we did so that the last write succeeds. if(bytesRead < bufferLength) clear(); seek(writePosition); fwrite(buffer.data(), sizeof(char), bytesRead, d->file); writePosition += bytesRead; } truncate(writePosition); } bool File::readOnly() const { return d->readOnly; } bool File::isReadable(const char *file) { return access(file, R_OK) == 0; } bool File::isOpen() const { return d->file; } bool File::isValid() const { return d->file && d->valid; } void File::seek(long offset, Position p) { if(!d->file) { debug("File::seek() -- trying to seek in a file that isn't opened."); return; } switch(p) { case Beginning: fseek(d->file, offset, SEEK_SET); break; case Current: fseek(d->file, offset, SEEK_CUR); break; case End: fseek(d->file, offset, SEEK_END); break; } } void File::clear() { clearerr(d->file); } long File::tell() const { return ftell(d->file); } long File::length() { // Do some caching in case we do multiple calls. if(d->size > 0) return d->size; if(!d->file) return 0; long curpos = tell(); seek(0, End); long endpos = tell(); seek(curpos, Beginning); d->size = endpos; return endpos; } bool File::isWritable(const char *file) { return access(file, W_OK) == 0; } //////////////////////////////////////////////////////////////////////////////// // protected members //////////////////////////////////////////////////////////////////////////////// void File::setValid(bool valid) { d->valid = valid; } void File::truncate(long length) { ftruncate(fileno(d->file), length); } TagLib::uint File::bufferSize() { return FilePrivate::bufferSize; } ezstream-0.5.6/win32/libogg.vcproj0000644000175000017500000001060411246572742016123 0ustar tootstoots ezstream-0.5.6/README0000644000175000017500000001705611246572750013360 0ustar tootstootsezstream README --------------------------------------- ABOUT EZSTREAM :::::::::::::::: Ezstream is a command line source client for Icecast media streaming servers. It began as the successor of the old "shout" utility, and has since gained a lot of useful features. In its basic mode of operation, it streams media files or data from standard input without re-encoding and thus requires only very little CPU resources. It can also use various external decoders and encoders to re-encode from one format to another, and stream the result to an Icecast server. With re- encoding enabled, ezstream is a very flexible source client. Supported media formats for streaming are MP3, Ogg Vorbis and Ogg Theora. Ezstream natively supports metadata in MP3 (ID3v1 only) and Ogg Vorbis, or many more formats when it is built with the TagLib option. Ezstream is free software and licensed under the GNU General Public License. See the COPYING file for details. PREREQUISITES ::::::::::::::: Ezstream depends on: * libshout 2.2.x (http://www.icecast.org/) * libxml 2.x (http://xmlsoft.org/) Ezstream optionally uses: - For reading metadata from Ogg Vorbis files: * TagLib 1.x (1.4 or newer recommended, will be used via the libtag_c wrapper) (http://developer.kde.org/~wheeler/taglib.html) OR: * libvorbis 1.x (http://www.vorbis.com) Using TagLib is recommended, as it allows ezstream to read metadata from many additional media file types. - For basic non-ASCII charset support in metadata and filenames: * Libiconv, if iconv() is not available in the system libc. (http://www.gnu.org/software/libiconv/) INSTALLATION :::::::::::::: The ezstream software uses the GNU auto-tools to configure, build and install on a variety of systems. Aside from the standard autoconf options of the configure script, a couple of additional options are available: --enable-examplesdir=DIR example configuration files installation directory (default: DATADIR/examples/ezstream) --enable-debug enable memory debugging (default: no) --with-libshout=PFX prefix where the libshout header files and library are installed (default: autodetect) --with-libshout-includes=DIR directory where libshout header files are installed (optional) --with-libshout-libs=DIR directory where libshout is installed (optional) --with-libxml2=PFX prefix where the libxml2 header files and library are installed (default: autodetect) --with-libxml2-includes=DIR directory where libxml2 header files are installed (optional) --with-libxml2-libs=DIR directory where libxml2 is installed (optional) --with-taglib=PFX prefix where the TagLib header files and library are installed (default: autodetect) --with-taglib-includes=DIR directory where TagLib header files are installed (optional) --with-taglib-libs=DIR directory where TagLib is installed (optional) --with-libvorbis=PFX prefix where the Vorbis library header files and library are installed (default: autodetect) --with-libvorbis-includes=DIR directory where Vorbis library header files are installed (optional) --with-libvorbis-libs=DIR directory where the Vorbis libraries are installed (optional) --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir The compilation and installation process then boils down to the usual $ ./configure --help | less # Skim over the available options $ ./configure [options] && make && [sudo] make install # Configure, build and install # [as root] the software If this procedure is unfamiliar to you, please consult the INSTALL file for more detailed instructions. On systems where the libshout installation does not include the required shout.pc file for pkg-config(1), the non-standard ``shout-config'' utility is available. However, the ezstream build system does not support the latter. If this is an issue, configure ezstream with $ ./configure \ LIBSHOUT_CPPFLAGS="$(shout-config --cppflags)" \ LIBSHOUT_CFLAGS="$(shout-config --cflags-only)" \ LIBSHOUT_LIBS="$(shout-config --libs)" When the configuration keeps failing despite having all dependencies installed, take note of the more verbose error messages in config.log. If necessary, it is possible to further customize many build flags through environment variables. See the "influential environment variables" list in the --help output. USAGE ::::::: Once ezstream is successfully installed, type "man ezstream" (without quotes) on the command line for a comprehensive manual. This distribution package also comes with example configuration files that can be used as a guide to configure ezstream. Note that all by itself, ezstream is not particularly useful. It requires a running Icecast server to stream to, which then relays the stream to many listeners. If this comes as a surprise, browse to http://www.icecast.org/ for a lot more information, resources, and other source clients. EXTERNAL DECODERS/ENCODERS :::::::::::::::::::::::::::: Ezstream should be able to work with any media decoder and encoder that fulfills the following requirements: 1. It needs to be executable on the command line and not require a graphical display to function. 2.1. A decoder needs to be capable of sending RAW data to standard output. 2.2. An encoder needs to be capable of reading RAW data from standard input. 2.3. A combined de-/encoder needs to be capable of sending media data that can be streamed to standard output. Media formats that ezstream does not support directly are passed through unaltered. Whether they work or not depends on the level of support offered by the version of libshout ezstream is linked with. The following incomplete list of programs shows a few that are known to work. These are also used in the example configuration files: * MP3 - Decoder: madplay (http://mad.sf.net/) - Encoder: lame (http://lame.sf.net/) * Ogg Vorbis: - Decoder: oggdec - Encoder: oggenc Both utilities are in the vorbis-tools package (http://www.vorbis.com/). * FLAC: - Decoder: flac (http://flac.sf.net/) - Encoder: (None. Not supported by libshout at the time of writing, and thus cannot be used by ezstream.) * Ogg Theora: - Decoder/Encoder: ffmpeg2theora (http://v2v.cc/~j/ffmpeg2theora/) OPERATING SYSTEM SPECIFIC NOTES ::::::::::::::::::::::::::::::::: * Ezstream and SunPRO cc/c99 on Solaris: Ezstream may not build with SunPRO cc/c99 "out of the box" if a threaded libshout was built with gcc. This known issue results in the following error message from the linker: ld: fatal: option -h and building a dynamic executable are incompatible This is related to gcc and GNU ld using different compiler/linker flags, related to POSIX threads, than the SunPRO compilers. These are being passed on to ezstream, where cc or c99 ultimately chokes on them. Ezstream compiles with both cc/c99 and gcc if libshout was built with Sun's compiler. If libshout was built with gcc, compile ezstream with gcc as well. ezstream-0.5.6/configure0000755000175000017500000114764711246573335014422 0ustar tootstoots#! /bin/sh # From configure.in Id: configure.in 16529 2009-08-30 12:49:06Z moritz . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for ezstream 0.5.6. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='ezstream' PACKAGE_TARNAME='ezstream' PACKAGE_VERSION='0.5.6' PACKAGE_STRING='ezstream 0.5.6' PACKAGE_BUGREPORT='https://trac.xiph.org/newticket?component=ezstream' ac_unique_file="src/ezstream.c" ac_config_libobj_dir=src # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP GREP EGREP FGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os BUILD_DATE EXAMPLES_DIR COMPAT_INCLUDES PKG_CONFIG LIBSHOUT_CFLAGS LIBSHOUT_CPPFLAGS LIBSHOUT_LDFLAGS LIBSHOUT_LIBS LIBXML2_CFLAGS LIBXML2_CPPFLAGS LIBXML2_LDFLAGS LIBXML2_LIBS TAGLIB_CFLAGS TAGLIB_CPPFLAGS TAGLIB_LDFLAGS TAGLIB_C_LIBS VORBIS_CFLAGS VORBIS_CPPFLAGS VORBIS_LDFLAGS LIBVORBISFILE_LIBS LIBICONV LTLIBICONV LIBOBJS EZ_CPPFLAGS EZ_CFLAGS EZ_LDFLAGS EZ_LIBS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG LIBSHOUT_CFLAGS LIBSHOUT_CPPFLAGS LIBSHOUT_LDFLAGS LIBSHOUT_LIBS LIBXML2_CFLAGS LIBXML2_CPPFLAGS LIBXML2_LDFLAGS LIBXML2_LIBS TAGLIB_CFLAGS TAGLIB_CPPFLAGS TAGLIB_LDFLAGS TAGLIB_C_LIBS VORBIS_CFLAGS VORBIS_CPPFLAGS VORBIS_LDFLAGS LIBVORBISFILE_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures ezstream 0.5.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/ezstream] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of ezstream 0.5.6:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-examplesdir=DIR examples installation directory (default: DATADIR/examples/ezstream) --enable-debug enable memory debugging (default: no) --disable-rpath do not hardcode runtime library paths Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-libshout=PFX prefix where the libshout header files and library are installed (default: autodetect) --with-libshout-includes=DIR directory where libshout header files are installed (optional) --with-libshout-libs=DIR directory where libshout is installed (optional) --with-libxml2=PFX prefix where the libxml2 header files and library are installed (default: autodetect) --with-libxml2-includes=DIR directory where libxml2 header files are installed (optional) --with-libxml2-libs=DIR directory where libxml2 is installed (optional) --with-taglib=PFX prefix where the TagLib header files and library are installed (default: autodetect) --with-taglib-includes=DIR directory where TagLib header files are installed (optional) --with-taglib-libs=DIR directory where TagLib is installed (optional) --with-libvorbis=PFX prefix where the Vorbis library header files and library are installed (default: autodetect) --with-libvorbis-includes=DIR directory where Vorbis library header files are installed (optional) --with-libvorbis-libs=DIR directory where the Vorbis libraries are installed (optional) --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility LIBSHOUT_CFLAGS C compiler flags for libshout LIBSHOUT_CPPFLAGS C preprocessor flags for libshout LIBSHOUT_LDFLAGS linker flags for libshout LIBSHOUT_LIBS libraries to use for libshout LIBXML2_CFLAGS C compiler flags for libxml2 LIBXML2_CPPFLAGS C preprocessor flags for libxml2 LIBXML2_LDFLAGS linker flags for libxml2 LIBXML2_LIBS libraries to use for libxml2 TAGLIB_CFLAGS C compiler flags for TagLib TAGLIB_CPPFLAGS C preprocessor flags for TagLib TAGLIB_LDFLAGS linker flags for TagLib TAGLIB_C_LIBS libraries to use for the TagLib C wrapper VORBIS_CFLAGS C compiler flags for the Vorbis libraries VORBIS_CPPFLAGS C preprocessor flags for the Vorbis libraries VORBIS_LDFLAGS linker flags for the Vorbis libraries LIBVORBISFILE_LIBS libraries to use for libvorbisfile Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF ezstream configure 0.5.6 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by ezstream $as_me 0.5.6, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5 echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.10' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='ezstream' VERSION='0.5.6' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers src/config.h" { echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 _ACEOF DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for AIX" >&5 echo $ECHO_N "checking for AIX... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef _AIX yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f conftest* { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_minix_config_h+set}" = set; then { echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking minix/config.h usability" >&5 echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking minix/config.h presence" >&5 echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------------------------- ## ## Report this to https://trac.xiph.org/newticket?component=ezstream ## ## ----------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_minix_config_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } fi if test $ac_cv_header_minix_config_h = yes; then MINIX=yes else MINIX= fi if test "$MINIX" = yes; then cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_1_SOURCE 2 _ACEOF cat >>confdefs.h <<\_ACEOF #define _MINIX 1 _ACEOF fi { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_safe_to_define___extensions__=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && cat >>confdefs.h <<\_ACEOF #define __EXTENSIONS__ 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _TANDEM_SOURCE 1 _ACEOF case $ac_cv_prog_cc_stdc in no) ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; *) { echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 echo $ECHO_N "checking for $CC option to accept ISO C99... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c99+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -c99 -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c99=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 else ac_cv_prog_cc_stdc=no fi fi ;; esac { echo "$as_me:$LINENO: checking for $CC option to accept ISO Standard C" >&5 echo $ECHO_N "checking for $CC option to accept ISO Standard C... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi case $ac_cv_prog_cc_stdc in no) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; '') { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; *) { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6; } ;; esac { echo "$as_me:$LINENO: checking for fgrep" >&5 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6; } if test "${ac_cv_path_FGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else # Extract the first word of "fgrep" to use in msg output if test -z "$FGREP"; then set dummy fgrep; ac_prog_name=$2 if test "${ac_cv_path_FGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS fi FGREP="$ac_cv_path_FGREP" if test -z "$FGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_FGREP=$FGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 echo "${ECHO_T}$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac BUILD_DATE=$(date '+%B %d, %Y') EXAMPLES_DIR="\$(datadir)/examples/${PACKAGE_TARNAME}" # Check whether --enable-examplesdir was given. if test "${enable_examplesdir+set}" = set; then enableval=$enable_examplesdir; case "$enableval" in yes) ;; no) { { echo "$as_me:$LINENO: error: Must have an install directory for the examples." >&5 echo "$as_me: error: Must have an install directory for the examples." >&2;} { (exit 1); exit 1; }; } ;; *) EXAMPLES_DIR="$enableval" ;; esac fi ez_enable_debug=no # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; case "$enableval" in no) ;; *) ez_enable_debug=yes ;; esac fi { echo "$as_me:$LINENO: checking whether to enable debugging" >&5 echo $ECHO_N "checking whether to enable debugging... $ECHO_C" >&6; } if test x"${ez_enable_debug}" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define XALLOC_DEBUG 1 _ACEOF fi { echo "$as_me:$LINENO: result: $ez_enable_debug" >&5 echo "${ECHO_T}$ez_enable_debug" >&6; } EZ_CFLAGS="" EZ_CPPFLAGS="" EZ_LDFLAGS="" EZ_LIBS="" if test -n "${GCC}"; then for _flag in fstack-protector fstrict-aliasing Wall W Wstrict-aliasing \ Wwrite-strings Wpointer-arith Wshadow Wconversion Wcast-qual \ Wcast-align Wbounded Wmissing-declarations Wmissing-prototypes \ Wstrict-prototypes do { echo "$as_me:$LINENO: checking if ${CC} understands -${_flag}" >&5 echo $ECHO_N "checking if ${CC} understands -${_flag}... $ECHO_C" >&6; } _cv_sufx_=$(echo ${_flag} | sed 'y|-+,= |_p___|') if { as_var=local_cv_prog_cc_${_cv_sufx_}; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu save_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} -${_flag}" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "local_cv_prog_cc_${_cv_sufx_}=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "local_cv_prog_cc_${_cv_sufx_}=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="${save_CFLAGS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi eval "_cache_val_=\${local_cv_prog_cc_${_cv_sufx_}}" if test x"${_cache_val_}" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : for arg in -${_flag} do if `echo " ${EZ_CFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CFLAGS}"; then EZ_CFLAGS="${arg}" else EZ_CFLAGS="${EZ_CFLAGS} ${arg}" fi fi done else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } : fi done { echo "$as_me:$LINENO: checking if ${CC} understands -Wformat=2" >&5 echo $ECHO_N "checking if ${CC} understands -Wformat=2... $ECHO_C" >&6; } _cv_sufx_=$(echo Wformat=2 | sed 'y|-+,= |_p___|') if { as_var=local_cv_prog_cc_${_cv_sufx_}; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu save_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} -Wformat=2" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "local_cv_prog_cc_${_cv_sufx_}=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "local_cv_prog_cc_${_cv_sufx_}=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="${save_CFLAGS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi eval "_cache_val_=\${local_cv_prog_cc_${_cv_sufx_}}" if test x"${_cache_val_}" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : for arg in -Wformat=2 do if `echo " ${EZ_CFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CFLAGS}"; then EZ_CFLAGS="${arg}" else EZ_CFLAGS="${EZ_CFLAGS} ${arg}" fi fi done else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } : { echo "$as_me:$LINENO: checking if ${CC} understands -Wformat" >&5 echo $ECHO_N "checking if ${CC} understands -Wformat... $ECHO_C" >&6; } _cv_sufx_=$(echo Wformat | sed 'y|-+,= |_p___|') if { as_var=local_cv_prog_cc_${_cv_sufx_}; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu save_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} -Wformat" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "local_cv_prog_cc_${_cv_sufx_}=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "local_cv_prog_cc_${_cv_sufx_}=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="${save_CFLAGS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi eval "_cache_val_=\${local_cv_prog_cc_${_cv_sufx_}}" if test x"${_cache_val_}" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : for arg in -Wformat do if `echo " ${EZ_CFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CFLAGS}"; then EZ_CFLAGS="${arg}" else EZ_CFLAGS="${EZ_CFLAGS} ${arg}" fi fi done else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } : fi fi else case "${host}" in *-irix*) EZ_CFLAGS="-fullwarn" ;; *-solaris*) EZ_CFLAGS="-v" ;; *) ;; esac fi { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking for working volatile" >&5 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; } if test "${ac_cv_c_volatile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { volatile int x; int * volatile y = (int *) 0; return !x && !y; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_volatile=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_volatile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 echo "${ECHO_T}$ac_cv_c_volatile" >&6; } if test $ac_cv_c_volatile = no; then cat >>confdefs.h <<\_ACEOF #define volatile _ACEOF fi for ac_header in \ sys/time.h signal.h langinfo.h libgen.h locale.h paths.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_SYS_TYPES_H # include #endif #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done COMPAT_INCLUDES="" if test x"${ez_enable_debug}" = "xyes"; then if test x"RB_FOREACH" = "x"; then _tree_macro="RB_INIT" else _tree_macro=RB_FOREACH fi { echo "$as_me:$LINENO: checking for ${_tree_macro} in sys/tree.h" >&5 echo $ECHO_N "checking for ${_tree_macro} in sys/tree.h... $ECHO_C" >&6; } if test "${local_cv_header_sys_tree_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if !defined(${_tree_macro}) # error Required tree macro missing #endif /* !${_tree_macro} */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then local_cv_header_sys_tree_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 local_cv_header_sys_tree_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test x"${local_cv_header_sys_tree_h}" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_TREE_H 1 _ACEOF : else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } : COMPAT_INCLUDES="-I\$(top_srcdir)/compat" fi fi { echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef size_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef ssize_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } if test $ac_cv_type_ssize_t = yes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi { echo "$as_me:$LINENO: checking for basename in -lgen" >&5 echo $ECHO_N "checking for basename in -lgen... $ECHO_C" >&6; } if test "${ac_cv_lib_gen_basename+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgen $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char basename (); int main () { return basename (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_gen_basename=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gen_basename=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_basename" >&5 echo "${ECHO_T}$ac_cv_lib_gen_basename" >&6; } if test $ac_cv_lib_gen_basename = yes; then _prepend_args="" for arg in -lgen do _prepend_args="${arg} ${_prepend_args}" done for arg in ${_prepend_args} do if `echo " ${EZ_LIBS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_LIBS}"; then EZ_LIBS="${arg}" else EZ_LIBS="${arg} ${EZ_LIBS}" fi fi done fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } PKG_CONFIG="" fi fi if test -z "${PKG_CONFIG}"; then { { echo "$as_me:$LINENO: error: The pkg-config utility is required." >&5 echo "$as_me: error: The pkg-config utility is required." >&2;} { (exit 1); exit 1; }; } fi have_libshout_includes="" have_libshout_libs="" want_libshout="auto" # Check whether --with-libshout was given. if test "${with_libshout+set}" = set; then withval=$with_libshout; case "${withval}" in yes) want_libshout="yes" ;; no) want_libshout="no" ;; *) have_libshout_prefix="${withval}" want_libshout="yes" ;; esac fi # Check whether --with-libshout-includes was given. if test "${with_libshout_includes+set}" = set; then withval=$with_libshout_includes; case "${withval}" in yes|no) ;; *) have_libshout_includes="${withval}" ;; esac fi # Check whether --with-libshout-libs was given. if test "${with_libshout_libs+set}" = set; then withval=$with_libshout_libs; case "${withval}" in yes|no) ;; *) have_libshout_libs="${withval}" ;; esac fi if test "${local_cv_have_lib_libshout_opts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ax_check_libshout_shout_pc="no" if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"shout\"") >&5 ($PKG_CONFIG --exists --print-errors "shout") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then ax_check_libshout_shout_pc=yes fi if test -z "${LIBSHOUT_CFLAGS}" \ -a x"${ax_check_libshout_shout_pc}" = "xyes"; then LIBSHOUT_CFLAGS="`${PKG_CONFIG} --cflags-only-other shout`" fi if test -n "${LIBSHOUT_CPPFLAGS}"; then if test -n "${have_libshout_includes}"; then LIBSHOUT_CPPFLAGS="${LIBSHOUT_CPPFLAGS} -I${have_libshout_includes}" fi else if test -n "${have_libshout_includes}"; then LIBSHOUT_CPPFLAGS="-I${have_libshout_includes}" else if test x"${want_libshout}" = "xauto" \ -a x"${ax_check_libshout_shout_pc}" = "xyes"; then LIBSHOUT_CPPFLAGS="`${PKG_CONFIG} --cflags-only-I shout`" elif test -n "${have_libshout_prefix}"; then LIBSHOUT_CPPFLAGS="-I${have_libshout_prefix}/include" fi fi fi if test -n "${LIBSHOUT_LDFLAGS}"; then if test -n "${have_libshout_libs}"; then LIBSHOUT_LDFLAGS="-L${have_libshout_libs} ${LIBSHOUT_LDFLAGS}" fi else if test -n "${have_libshout_libs}"; then LIBSHOUT_LDFLAGS="-L${have_libshout_libs}" else if test x"${want_libshout}" = "xauto" \ -a x"${ax_check_libshout_shout_pc}" = "xyes"; then LIBSHOUT_LDFLAGS=" \ `${PKG_CONFIG} --libs-only-L shout` \ `${PKG_CONFIG} --libs-only-other shout` \ " elif test -n "${have_libshout_prefix}"; then LIBSHOUT_LDFLAGS="-L${have_libshout_prefix}/lib" fi fi fi local_cv_have_lib_libshout_opts=yes fi if test "${local_cv_have_lib_libshout+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else local_cv_have_lib_libshout=no if test x"${want_libshout}" != "xno"; then # want_libshout != no if test -z "${PKG_CONFIG}"; then { { echo "$as_me:$LINENO: error: The pkg-config utility is required." >&5 echo "$as_me: error: The pkg-config utility is required." >&2;} { (exit 1); exit 1; }; } fi if test -n "" -a x"${ax_check_libshout_shout_pc}" = "xyes"; then if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"shout \"") >&5 ($PKG_CONFIG --exists --print-errors "shout ") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : else { { echo "$as_me:$LINENO: error: libshout version is required." >&5 echo "$as_me: error: libshout version is required." >&2;} { (exit 1); exit 1; }; } fi fi libshout_libs_autodetect=no if test -z "${LIBSHOUT_LIBS}" \ -a x"${ax_check_libshout_shout_pc}" = "xyes"; then LIBSHOUT_LIBS="`${PKG_CONFIG} --libs-only-l shout`" libshout_libs_autodetect=yes fi # If libshout required libm, make sure that it is listed at the end: if test x"${libshout_libs_autodetect}" = x"yes"; then if test -n "`echo ${LIBSHOUT_LIBS} | ${FGREP} -e ' -lm'`"; then xt_shout_TEMP="`echo ${LIBSHOUT_LIBS} | sed -e 's, -lm,,g'`" LIBSHOUT_LIBS="${xt_shout_TEMP} -lm" fi fi ax_check_libshout_save_CFLAGS="${CFLAGS}" ax_check_libshout_save_CPPFLAGS="${CPPFLAGS}" ax_check_libshout_save_LDFLAGS="${LDFLAGS}" ax_check_libshout_save_LIBS="${LIBS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="${CFLAGS} ${LIBSHOUT_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${LIBSHOUT_CPPFLAGS}" LDFLAGS="${LDFLAGS} ${LIBSHOUT_LDFLAGS}" LIBS="${LIBSHOUT_LIBS} ${LIBS}" if test "${ac_cv_header_shout_shout_h+set}" = set; then { echo "$as_me:$LINENO: checking for shout/shout.h" >&5 echo $ECHO_N "checking for shout/shout.h... $ECHO_C" >&6; } if test "${ac_cv_header_shout_shout_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_shout_shout_h" >&5 echo "${ECHO_T}$ac_cv_header_shout_shout_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking shout/shout.h usability" >&5 echo $ECHO_N "checking shout/shout.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking shout/shout.h presence" >&5 echo $ECHO_N "checking shout/shout.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: shout/shout.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: shout/shout.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: shout/shout.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: shout/shout.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: shout/shout.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: shout/shout.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: shout/shout.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: shout/shout.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: shout/shout.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: shout/shout.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: shout/shout.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: shout/shout.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: shout/shout.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: shout/shout.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: shout/shout.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: shout/shout.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------------------------- ## ## Report this to https://trac.xiph.org/newticket?component=ezstream ## ## ----------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for shout/shout.h" >&5 echo $ECHO_N "checking for shout/shout.h... $ECHO_C" >&6; } if test "${ac_cv_header_shout_shout_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_shout_shout_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_shout_shout_h" >&5 echo "${ECHO_T}$ac_cv_header_shout_shout_h" >&6; } fi if test $ac_cv_header_shout_shout_h = yes; then { echo "$as_me:$LINENO: checking if libshout works" >&5 echo $ECHO_N "checking if libshout works... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { shout_new(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } local_cv_have_lib_libshout=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } if test x"${libshout_libs_autodetect}" = "xyes"; then LIBSHOUT_LIBS="`${PKG_CONFIG} --static --libs-only-l shout`" LIBS="${LIBSHOUT_LIBS} ${ax_check_libshout_save_LIBS}" { echo "$as_me:$LINENO: checking if libshout works with explicit dependencies" >&5 echo $ECHO_N "checking if libshout works with explicit dependencies... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { shout_new(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } local_cv_have_lib_libshout=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="${ax_check_libshout_save_CFLAGS}" CPPFLAGS="${ax_check_libshout_save_CPPFLAGS}" LDFLAGS="${ax_check_libshout_save_LDFLAGS}" LIBS="${ax_check_libshout_save_LIBS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # want_libshout != no fi { echo "$as_me:$LINENO: checking for libshout " >&5 echo $ECHO_N "checking for libshout ... $ECHO_C" >&6; } if test x"${local_cv_have_lib_libshout}" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } : { { echo "$as_me:$LINENO: error: libshout 2.2.x is required." >&5 echo "$as_me: error: libshout 2.2.x is required." >&2;} { (exit 1); exit 1; }; } fi for arg in ${LIBSHOUT_CPPFLAGS} do if `echo " ${EZ_CPPFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CPPFLAGS}"; then EZ_CPPFLAGS="${arg}" else EZ_CPPFLAGS="${EZ_CPPFLAGS} ${arg}" fi fi done for arg in ${LIBSHOUT_CFLAGS} do if `echo " ${EZ_CFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CFLAGS}"; then EZ_CFLAGS="${arg}" else EZ_CFLAGS="${EZ_CFLAGS} ${arg}" fi fi done for arg in ${LIBSHOUT_LDFLAGS} do if `echo " ${EZ_LDFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_LDFLAGS}"; then EZ_LDFLAGS="${arg}" else EZ_LDFLAGS="${EZ_LDFLAGS} ${arg}" fi fi done _prepend_args="" for arg in ${LIBSHOUT_LIBS} do _prepend_args="${arg} ${_prepend_args}" done for arg in ${_prepend_args} do if `echo " ${EZ_LIBS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_LIBS}"; then EZ_LIBS="${arg}" else EZ_LIBS="${arg} ${EZ_LIBS}" fi fi done if test -z "${PKG_CONFIG}"; then { { echo "$as_me:$LINENO: error: The pkg-config utility is required." >&5 echo "$as_me: error: The pkg-config utility is required." >&2;} { (exit 1); exit 1; }; } fi have_libxml2_includes="" have_libxml2_libs="" want_libxml2="auto" # Check whether --with-libxml2 was given. if test "${with_libxml2+set}" = set; then withval=$with_libxml2; case "${withval}" in yes) want_libxml2="yes" ;; no) want_libxml2="no" ;; *) have_libxml2_prefix="${withval}" want_libxml2="yes" ;; esac fi # Check whether --with-libxml2-includes was given. if test "${with_libxml2_includes+set}" = set; then withval=$with_libxml2_includes; case "${withval}" in yes|no) ;; *) have_libxml2_includes="${withval}" ;; esac fi # Check whether --with-libxml2-libs was given. if test "${with_libxml2_libs+set}" = set; then withval=$with_libxml2_libs; case "${withval}" in yes|no) ;; *) have_libxml2_libs="${withval}" ;; esac fi if test "${local_cv_have_lib_libxml2_opts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ax_check_libxml2_xml2_pc="no" if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then ax_check_libxml2_xml2_pc=yes fi if test -z "${LIBXML2_CFLAGS}" \ -a x"${ax_check_libxml2_xml2_pc}" = "xyes"; then LIBXML2_CFLAGS="`${PKG_CONFIG} --cflags-only-other libxml-2.0`" fi if test -n "${LIBXML2_CPPFLAGS}"; then if test -n "${have_libxml2_includes}"; then LIBXML2_CPPFLAGS="${LIBXML2_CPPFLAGS} -I${have_libxml2_includes}" fi else if test -n "${have_libxml2_includes}"; then LIBXML2_CPPFLAGS="-I${have_libxml2_includes}" else if test x"${want_libxml2}" = "xauto" \ -a x"${ax_check_libxml2_xml2_pc}" = "xyes"; then LIBXML2_CPPFLAGS="`${PKG_CONFIG} --cflags-only-I libxml-2.0`" elif test -n "${have_libxml2_prefix}"; then LIBXML2_CPPFLAGS="-I${have_libxml2_prefix}/include" fi fi fi if test -n "${LIBXML2_LDFLAGS}"; then if test -n "${have_libxml2_libs}"; then LIBXML2_LDFLAGS="-L${have_libxml2_libs} ${LIBXML2_LDFLAGS}" fi else if test -n "${have_libxml2_libs}"; then LIBXML2_LDFLAGS="-L${have_libxml2_libs}" else if test x"${want_libxml2}" = "xauto" \ -a x"${ax_check_libxml2_xml2_pc}" = "xyes"; then LIBXML2_LDFLAGS=" \ `${PKG_CONFIG} --libs-only-L libxml-2.0` \ `${PKG_CONFIG} --libs-only-other libxml-2.0` \ " elif test -n "${have_libxml2_prefix}"; then LIBXML2_LDFLAGS="-L${have_libxml2_prefix}/lib" fi fi fi local_cv_have_lib_libxml2_opts=yes fi if test "${local_cv_have_lib_libxml2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else local_cv_have_lib_libxml2=no if test x"${want_libxml2}" != "xno"; then # want_libxml2 != no if test -z "${PKG_CONFIG}"; then { { echo "$as_me:$LINENO: error: The pkg-config utility is required." >&5 echo "$as_me: error: The pkg-config utility is required." >&2;} { (exit 1); exit 1; }; } fi if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 \"") >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0 ") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then libxml2_libs_autodetect=no if test -z "${LIBXML2_LIBS}"; then LIBXML2_LIBS="`${PKG_CONFIG} --libs-only-l libxml-2.0`" libxml2_libs_autodetect=yes fi ax_check_libxml2_save_CFLAGS="${CFLAGS}" ax_check_libxml2_save_CPPFLAGS="${CPPFLAGS}" ax_check_libxml2_save_LDFLAGS="${LDFLAGS}" ax_check_libxml2_save_LIBS="${LIBS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="${CFLAGS} ${LIBXML2_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${LIBXML2_CPPFLAGS}" LDFLAGS="${LDFLAGS} ${LIBXML2_LDFLAGS}" LIBS="${LIBXML2_LIBS} ${LIBS}" if test "${ac_cv_header_libxml_parser_h+set}" = set; then { echo "$as_me:$LINENO: checking for libxml/parser.h" >&5 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6; } if test "${ac_cv_header_libxml_parser_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5 echo $ECHO_N "checking libxml/parser.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5 echo $ECHO_N "checking libxml/parser.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: libxml/parser.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: libxml/parser.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: libxml/parser.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: libxml/parser.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------------------------- ## ## Report this to https://trac.xiph.org/newticket?component=ezstream ## ## ----------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for libxml/parser.h" >&5 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6; } if test "${ac_cv_header_libxml_parser_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_libxml_parser_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6; } fi if test $ac_cv_header_libxml_parser_h = yes; then { echo "$as_me:$LINENO: checking if libxml2 works" >&5 echo $ECHO_N "checking if libxml2 works... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { xmlParseFile(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } local_cv_have_lib_libxml2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } if test x"${libxml2_libs_autodetect}" = "xyes"; then LIBXML2_LIBS="`${PKG_CONFIG} --static --libs-only-l libxml-2.0`" LIBS="${LIBXML2_LIBS} ${ax_check_libxml2_save_LIBS}" { echo "$as_me:$LINENO: checking if libxml2 works with explicit dependencies" >&5 echo $ECHO_N "checking if libxml2 works with explicit dependencies... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { xmlParseFile(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } local_cv_have_lib_libxml2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="${ax_check_libxml2_save_CFLAGS}" CPPFLAGS="${ax_check_libxml2_save_CPPFLAGS}" LDFLAGS="${ax_check_libxml2_save_LDFLAGS}" LIBS="${ax_check_libxml2_save_LIBS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi fi # want_libxml2 != no fi { echo "$as_me:$LINENO: checking for libxml2 " >&5 echo $ECHO_N "checking for libxml2 ... $ECHO_C" >&6; } if test x"${local_cv_have_lib_libxml2}" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } : { { echo "$as_me:$LINENO: error: libxml 2.x is required." >&5 echo "$as_me: error: libxml 2.x is required." >&2;} { (exit 1); exit 1; }; } fi for arg in ${LIBXML2_CPPFLAGS} do if `echo " ${EZ_CPPFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CPPFLAGS}"; then EZ_CPPFLAGS="${arg}" else EZ_CPPFLAGS="${EZ_CPPFLAGS} ${arg}" fi fi done for arg in ${LIBXML2_CFLAGS} do if `echo " ${EZ_CFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CFLAGS}"; then EZ_CFLAGS="${arg}" else EZ_CFLAGS="${EZ_CFLAGS} ${arg}" fi fi done for arg in ${LIBXML2_LDFLAGS} do if `echo " ${EZ_LDFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_LDFLAGS}"; then EZ_LDFLAGS="${arg}" else EZ_LDFLAGS="${EZ_LDFLAGS} ${arg}" fi fi done _prepend_args="" for arg in ${LIBXML2_LIBS} do _prepend_args="${arg} ${_prepend_args}" done for arg in ${_prepend_args} do if `echo " ${EZ_LIBS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_LIBS}"; then EZ_LIBS="${arg}" else EZ_LIBS="${arg} ${EZ_LIBS}" fi fi done use_metadata="No" if test -z "${PKG_CONFIG}"; then { { echo "$as_me:$LINENO: error: The pkg-config utility is required." >&5 echo "$as_me: error: The pkg-config utility is required." >&2;} { (exit 1); exit 1; }; } fi have_taglib_includes="" have_taglib_libs="" want_taglib="auto" # Check whether --with-taglib was given. if test "${with_taglib+set}" = set; then withval=$with_taglib; case "${withval}" in yes) want_taglib="yes" ;; no) want_taglib="no" ;; *) have_taglib_prefix="${withval}" want_taglib="yes" ;; esac fi # Check whether --with-taglib-includes was given. if test "${with_taglib_includes+set}" = set; then withval=$with_taglib_includes; case "${withval}" in yes|no) ;; *) have_taglib_includes="${withval}" ;; esac fi # Check whether --with-taglib-libs was given. if test "${with_taglib_libs+set}" = set; then withval=$with_taglib_libs; case "${withval}" in yes|no) ;; *) have_taglib_libs="${withval}" ;; esac fi if test "${local_cv_have_lib_taglib_opts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ax_check_taglib_taglib_pc="no" if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"taglib\"") >&5 ($PKG_CONFIG --exists --print-errors "taglib") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then ax_check_taglib_taglib_pc=yes fi if test -z "${TAGLIB_CFLAGS}" \ -a x"${ax_check_taglib_taglib_pc}" = "xyes"; then TAGLIB_CFLAGS="`${PKG_CONFIG} --cflags-only-other taglib`" fi if test -n "${TAGLIB_CPPFLAGS}"; then if test -n "${have_taglib_includes}"; then TAGLIB_CPPFLAGS="${TAGLIB_CPPFLAGS} -I${have_taglib_includes}" fi else if test -n "${have_taglib_includes}"; then TAGLIB_CPPFLAGS="-I${have_taglib_includes}" else if test x"${want_taglib}" = "xauto" \ -a x"${ax_check_taglib_taglib_pc}" = "xyes"; then TAGLIB_CPPFLAGS="`${PKG_CONFIG} --cflags-only-I taglib`" elif test -n "${have_taglib_prefix}"; then TAGLIB_CPPFLAGS="-I${have_taglib_prefix}/include/taglib" fi fi fi if test -n "${TAGLIB_LDFLAGS}"; then if test -n "${have_taglib_libs}"; then TAGLIB_LDFLAGS="-L${have_taglib_libs} ${TAGLIB_LDFLAGS}" fi else if test -n "${have_taglib_libs}"; then TAGLIB_LDFLAGS="-L${have_taglib_libs}" else if test x"${want_taglib}" = "xauto" \ -a x"${ax_check_taglib_taglib_pc}" = "xyes"; then TAGLIB_LDFLAGS=" \ `${PKG_CONFIG} --libs-only-L taglib` \ `${PKG_CONFIG} --libs-only-other taglib` \ " elif test -n "${have_taglib_prefix}"; then TAGLIB_LDFLAGS="-L${have_taglib_prefix}/lib" fi fi fi local_cv_have_lib_taglib_opts=yes fi if test -z "${PKG_CONFIG}"; then { { echo "$as_me:$LINENO: error: The pkg-config utility is required." >&5 echo "$as_me: error: The pkg-config utility is required." >&2;} { (exit 1); exit 1; }; } fi have_libvorbis_includes="" have_libvorbis_libs="" want_libvorbis="auto" # Check whether --with-libvorbis was given. if test "${with_libvorbis+set}" = set; then withval=$with_libvorbis; case "${withval}" in yes) want_libvorbis="yes" ;; no) want_libvorbis="no" ;; *) have_libvorbis_prefix="${withval}" want_libvorbis="yes" ;; esac fi # Check whether --with-libvorbis-includes was given. if test "${with_libvorbis_includes+set}" = set; then withval=$with_libvorbis_includes; case "${withval}" in yes|no) ;; *) have_libvorbis_includes="${withval}" ;; esac fi # Check whether --with-libvorbis-libs was given. if test "${with_libvorbis_libs+set}" = set; then withval=$with_libvorbis_libs; case "${withval}" in yes|no) ;; *) have_libvorbis_libs="${withval}" ;; esac fi if test "${local_cv_have_lib_libvorbis_opts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ax_check_libvorbis_vorbis_pc="no" if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"vorbis\"") >&5 ($PKG_CONFIG --exists --print-errors "vorbis") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then ax_check_libvorbis_vorbis_pc=yes fi if test -z "${VORBIS_CFLAGS}" \ -a x"${ax_check_libvorbis_vorbis_pc}" = "xyes"; then VORBIS_CFLAGS="`${PKG_CONFIG} --cflags-only-other vorbis`" fi if test -n "${VORBIS_CPPFLAGS}"; then if test -n "${have_libvorbis_includes}"; then VORBIS_CPPFLAGS="${VORBIS_CPPFLAGS} -I${have_libvorbis_includes}" fi else if test -n "${have_libvorbis_includes}"; then VORBIS_CPPFLAGS="-I${have_libvorbis_includes}" else if test x"${want_libvorbis}" = "xauto" \ -a x"${ax_check_libvorbis_vorbis_pc}" = "xyes"; then VORBIS_CPPFLAGS="`${PKG_CONFIG} --cflags-only-I vorbis`" elif test -n "${have_libvorbis_prefix}"; then VORBIS_CPPFLAGS="-I${have_libvorbis_prefix}/include" fi fi fi if test -n "${VORBIS_LDFLAGS}"; then if test -n "${have_libvorbis_libs}"; then VORBIS_LDFLAGS="-L${have_libvorbis_libs} ${VORBIS_LDFLAGS}" fi else if test -n "${have_libvorbis_libs}"; then VORBIS_LDFLAGS="-L${have_libvorbis_libs}" else if test x"${want_libvorbis}" = "xauto" \ -a x"${ax_check_libvorbis_vorbis_pc}" = "xyes"; then VORBIS_LDFLAGS=" \ `${PKG_CONFIG} --libs-only-L vorbis` \ `${PKG_CONFIG} --libs-only-other vorbis` \ " elif test -n "${have_libvorbis_prefix}"; then VORBIS_LDFLAGS="-L${have_libvorbis_prefix}/lib" fi fi fi local_cv_have_lib_libvorbis_opts=yes fi if test "${local_cv_have_lib_taglib_c+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else local_cv_have_lib_taglib_c=no if test x"${want_taglib}" != "xno"; then # want_taglib != no if test -z "${PKG_CONFIG}"; then { { echo "$as_me:$LINENO: error: The pkg-config utility is required." >&5 echo "$as_me: error: The pkg-config utility is required." >&2;} { (exit 1); exit 1; }; } fi if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"taglib_c \"") >&5 ($PKG_CONFIG --exists --print-errors "taglib_c ") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test -z "${TAGLIB_C_LIBS}"; then TAGLIB_C_LIBS="-ltag_c" fi ax_check_taglib_c_save_CFLAGS="${CFLAGS}" ax_check_taglib_c_save_CPPFLAGS="${CPPFLAGS}" ax_check_taglib_c_save_LDFLAGS="${LDFLAGS}" ax_check_taglib_c_save_LIBS="${LIBS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="${CFLAGS} ${TAGLIB_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${TAGLIB_CPPFLAGS}" LDFLAGS="${LDFLAGS} ${TAGLIB_LDFLAGS}" LIBS="${TAGLIB_C_LIBS} ${LIBS}" if test "${ac_cv_header_tag_c_h+set}" = set; then { echo "$as_me:$LINENO: checking for tag_c.h" >&5 echo $ECHO_N "checking for tag_c.h... $ECHO_C" >&6; } if test "${ac_cv_header_tag_c_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_tag_c_h" >&5 echo "${ECHO_T}$ac_cv_header_tag_c_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking tag_c.h usability" >&5 echo $ECHO_N "checking tag_c.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking tag_c.h presence" >&5 echo $ECHO_N "checking tag_c.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: tag_c.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: tag_c.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: tag_c.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: tag_c.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: tag_c.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: tag_c.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: tag_c.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: tag_c.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: tag_c.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: tag_c.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: tag_c.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: tag_c.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: tag_c.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: tag_c.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: tag_c.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: tag_c.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------------------------- ## ## Report this to https://trac.xiph.org/newticket?component=ezstream ## ## ----------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for tag_c.h" >&5 echo $ECHO_N "checking for tag_c.h... $ECHO_C" >&6; } if test "${ac_cv_header_tag_c_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_tag_c_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_tag_c_h" >&5 echo "${ECHO_T}$ac_cv_header_tag_c_h" >&6; } fi if test $ac_cv_header_tag_c_h = yes; then { echo "$as_me:$LINENO: checking if libtag_c works" >&5 echo $ECHO_N "checking if libtag_c works... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { taglib_set_string_management_enabled(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } local_cv_have_lib_taglib_c=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } LIBS="${LIBS} -ltag -lstdc++ -lz" TAGLIB_C_LIBS="${TAGLIB_C_LIBS} -ltag -lstdc++ -lz" { echo "$as_me:$LINENO: checking if libtag_c works with -ltag -lstdc++ -lz" >&5 echo $ECHO_N "checking if libtag_c works with -ltag -lstdc++ -lz... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { taglib_set_string_management_enabled(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } local_cv_have_lib_taglib_c=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="${ax_check_taglib_c_save_CFLAGS}" CPPFLAGS="${ax_check_taglib_c_save_CPPFLAGS}" LDFLAGS="${ax_check_taglib_c_save_LDFLAGS}" LIBS="${ax_check_taglib_c_save_LIBS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi fi # want_taglib != no fi { echo "$as_me:$LINENO: checking for libtag_c" >&5 echo $ECHO_N "checking for libtag_c... $ECHO_C" >&6; } if test x"${local_cv_have_lib_taglib_c}" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : cat >>confdefs.h <<\_ACEOF #define HAVE_TAGLIB 1 _ACEOF for arg in ${TAGLIB_CFLAGS} do if `echo " ${EZ_CFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CFLAGS}"; then EZ_CFLAGS="${arg}" else EZ_CFLAGS="${EZ_CFLAGS} ${arg}" fi fi done for arg in ${TAGLIB_CPPFLAGS} do if `echo " ${EZ_CPPFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CPPFLAGS}"; then EZ_CPPFLAGS="${arg}" else EZ_CPPFLAGS="${EZ_CPPFLAGS} ${arg}" fi fi done for arg in ${TAGLIB_LDFLAGS} do if `echo " ${EZ_LDFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_LDFLAGS}"; then EZ_LDFLAGS="${arg}" else EZ_LDFLAGS="${EZ_LDFLAGS} ${arg}" fi fi done _prepend_args="" for arg in ${TAGLIB_C_LIBS} do _prepend_args="${arg} ${_prepend_args}" done for arg in ${_prepend_args} do if `echo " ${EZ_LIBS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_LIBS}"; then EZ_LIBS="${arg}" else EZ_LIBS="${arg} ${EZ_LIBS}" fi fi done use_metadata="TagLib" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } : if test "${local_cv_have_lib_libvorbisfile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else local_cv_have_lib_libvorbisfile=no if test x"${want_libvorbis}" != "xno"; then # want_libvorbis != no if test -z "${PKG_CONFIG}"; then { { echo "$as_me:$LINENO: error: The pkg-config utility is required." >&5 echo "$as_me: error: The pkg-config utility is required." >&2;} { (exit 1); exit 1; }; } fi if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"vorbisfile \"") >&5 ($PKG_CONFIG --exists --print-errors "vorbisfile ") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then libvorbisfile_libs_autodetect=no if test -z "${LIBVORBISFILE_LIBS}"; then LIBVORBISFILE_LIBS="`${PKG_CONFIG} --libs-only-l vorbisfile`" libvorbisfile_libs_autodetect=yes fi ax_check_libvorbisfile_save_CFLAGS="${CFLAGS}" ax_check_libvorbisfile_save_CPPFLAGS="${CPPFLAGS}" ax_check_libvorbisfile_save_LDFLAGS="${LDFLAGS}" ax_check_libvorbisfile_save_LIBS="${LIBS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="${CFLAGS} ${VORBIS_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${VORBIS_CPPFLAGS}" LDFLAGS="${LDFLAGS} ${VORBIS_LDFLAGS}" LIBS="${LIBVORBISFILE_LIBS} ${LIBS}" if test "${ac_cv_header_vorbis_vorbisfile_h+set}" = set; then { echo "$as_me:$LINENO: checking for vorbis/vorbisfile.h" >&5 echo $ECHO_N "checking for vorbis/vorbisfile.h... $ECHO_C" >&6; } if test "${ac_cv_header_vorbis_vorbisfile_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_vorbis_vorbisfile_h" >&5 echo "${ECHO_T}$ac_cv_header_vorbis_vorbisfile_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking vorbis/vorbisfile.h usability" >&5 echo $ECHO_N "checking vorbis/vorbisfile.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking vorbis/vorbisfile.h presence" >&5 echo $ECHO_N "checking vorbis/vorbisfile.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: vorbis/vorbisfile.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: vorbis/vorbisfile.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: vorbis/vorbisfile.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: vorbis/vorbisfile.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: vorbis/vorbisfile.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: vorbis/vorbisfile.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: vorbis/vorbisfile.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: vorbis/vorbisfile.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: vorbis/vorbisfile.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: vorbis/vorbisfile.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: vorbis/vorbisfile.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: vorbis/vorbisfile.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: vorbis/vorbisfile.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: vorbis/vorbisfile.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: vorbis/vorbisfile.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: vorbis/vorbisfile.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------------------------------- ## ## Report this to https://trac.xiph.org/newticket?component=ezstream ## ## ----------------------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for vorbis/vorbisfile.h" >&5 echo $ECHO_N "checking for vorbis/vorbisfile.h... $ECHO_C" >&6; } if test "${ac_cv_header_vorbis_vorbisfile_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_vorbis_vorbisfile_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_vorbis_vorbisfile_h" >&5 echo "${ECHO_T}$ac_cv_header_vorbis_vorbisfile_h" >&6; } fi if test $ac_cv_header_vorbis_vorbisfile_h = yes; then { echo "$as_me:$LINENO: checking if libvorbisfile works" >&5 echo $ECHO_N "checking if libvorbisfile works... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { ov_open(NULL, NULL, NULL, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } local_cv_have_lib_libvorbisfile=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="${ax_check_libvorbisfile_save_CFLAGS}" CPPFLAGS="${ax_check_libvorbisfile_save_CPPFLAGS}" LDFLAGS="${ax_check_libvorbisfile_save_LDFLAGS}" LIBS="${ax_check_libvorbisfile_save_LIBS}" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi fi # want_libvorbis != no fi { echo "$as_me:$LINENO: checking for libvorbisfile " >&5 echo $ECHO_N "checking for libvorbisfile ... $ECHO_C" >&6; } if test x"${local_cv_have_lib_libvorbisfile}" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : cat >>confdefs.h <<\_ACEOF #define HAVE_VORBISFILE 1 _ACEOF for arg in ${VORBIS_CPPFLAGS} do if `echo " ${EZ_CPPFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CPPFLAGS}"; then EZ_CPPFLAGS="${arg}" else EZ_CPPFLAGS="${EZ_CPPFLAGS} ${arg}" fi fi done for arg in ${VORBIS_CFLAGS} do if `echo " ${EZ_CFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CFLAGS}"; then EZ_CFLAGS="${arg}" else EZ_CFLAGS="${EZ_CFLAGS} ${arg}" fi fi done for arg in ${VORBIS_LDFLAGS} do if `echo " ${EZ_LDFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_LDFLAGS}"; then EZ_LDFLAGS="${arg}" else EZ_LDFLAGS="${EZ_LDFLAGS} ${arg}" fi fi done _prepend_args="" for arg in ${LIBVORBISFILE_LIBS} do _prepend_args="${arg} ${_prepend_args}" done for arg in ${_prepend_args} do if `echo " ${EZ_LIBS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_LIBS}"; then EZ_LIBS="${arg}" else EZ_LIBS="${arg} ${EZ_LIBS}" fi fi done use_metadata="libvorbis" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } : fi fi # Not using AM_ICONV to check for iconv(), with or without libiconv(), # is not a viable option. Something in the past went horribly wrong; # the whole topic is extremely complex and not worth rewriting. # Instead, work around the buggy no-op that is --with-libiconv-prefix, # and at least try to find it in --prefix. Thankfully, it is and will # remain optional in ezstream. INCICONV="" LDICONV="" LIBICONV="" LTLIBICONV="" EZ_LIBICONV="" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${acl_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } if test "${acl_cv_rpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 echo "${ECHO_T}$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` LIBICONV_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 echo "${ECHO_T}$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { echo "$as_me:$LINENO: checking for working iconv" >&5 echo $ECHO_N "checking for working iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_func_iconv_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 echo "${ECHO_T}$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF fi if test "$am_cv_lib_iconv" = yes; then { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $LIBICONV" >&5 echo "${ECHO_T}$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { echo "$as_me:$LINENO: checking for iconv declaration" >&5 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then am_cv_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- }$am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi if test x"${am_cv_func_iconv}" != "xyes"; then unset am_cv_func_iconv unset am_cv_lib_iconv if test x"${prefix}" = "xNONE"; then libiconv_prefix="/usr/local" else libiconv_prefix="${prefix}" fi { echo "$as_me:$LINENO: Looking for libiconv in ${libiconv_prefix} ..." >&5 echo "$as_me: Looking for libiconv in ${libiconv_prefix} ..." >&6;} libiconv_save_CPPFLAGS="${CPPFLAGS}" libiconv_save_LDFLAGS="${LDFLAGS}" libiconv_save_LIBS="${LIBS}" CPPFLAGS="${CPPFLAGS} -I${libiconv_prefix}/include" LDFLAGS="${LDFLAGS} -L${libiconv_prefix}/lib" LIBS="-liconv" am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 echo "${ECHO_T}$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { echo "$as_me:$LINENO: checking for working iconv" >&5 echo $ECHO_N "checking for working iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_func_iconv_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 echo "${ECHO_T}$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF fi if test "$am_cv_lib_iconv" = yes; then { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $LIBICONV" >&5 echo "${ECHO_T}$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { echo "$as_me:$LINENO: checking for iconv declaration" >&5 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then am_cv_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- }$am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi if test x"${am_cv_func_iconv}" = "xyes"; then INCICONV="-I${libiconv_prefix}/include" LDICONV="-L${libiconv_prefix}/lib" LIBICONV="-liconv" fi CPPFLAGS="${libiconv_save_CPPFLAGS}" LDFLAGS="${libiconv_save_LDFLAGS}" LIBS="${libiconv_save_LIBS}" fi if test -n "${LTLIBICONV}"; then EZ_LIBICONV="${LTLIBICONV}" else EZ_LIBICONV="${LIBICONV}" fi for arg in $INCICONV do if `echo " ${EZ_CPPFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_CPPFLAGS}"; then EZ_CPPFLAGS="${arg}" else EZ_CPPFLAGS="${EZ_CPPFLAGS} ${arg}" fi fi done for arg in $LDICONV do if `echo " ${EZ_LDFLAGS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_LDFLAGS}"; then EZ_LDFLAGS="${arg}" else EZ_LDFLAGS="${EZ_LDFLAGS} ${arg}" fi fi done _prepend_args="" for arg in $EZ_LIBICONV do _prepend_args="${arg} ${_prepend_args}" done for arg in ${_prepend_args} do if `echo " ${EZ_LIBS} x" | ${FGREP} -v -e " ${arg} " > /dev/null`; then if test -z "${EZ_LIBS}"; then EZ_LIBS="${arg}" else EZ_LIBS="${arg} ${EZ_LIBS}" fi fi done use_iconv="No" if test x"${am_cv_func_iconv}" = "xyes"; then use_iconv="Yes" fi for ac_func in \ arc4random \ basename \ getopt \ gettimeofday \ nl_langinfo \ pclose \ _pclose \ popen \ _popen \ random \ setlocale \ snprintf \ _snprintf \ srandomdev \ stat \ _stat \ strncasecmp \ strnicmp \ strtoll \ _strtoi64 \ do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in \ strlcat \ strlcpy \ strtonum \ do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done { echo "$as_me:$LINENO: checking for means to copy variable argument lists" >&5 echo $ECHO_N "checking for means to copy variable argument lists... $ECHO_C" >&6; } if test "${local_ac_cv_func_va_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { va_list ap, ap2; va_copy(ap2, ap); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then local_ac_cv_func_va_copy=va_copy else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { va_list ap, ap2; __va_copy(ap2, ap); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then local_ac_cv_func_va_copy=__va_copy else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 local_ac_cv_func_va_copy=memcpy fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi case "${local_ac_cv_func_va_copy}" in va_copy) { echo "$as_me:$LINENO: result: va_copy" >&5 echo "${ECHO_T}va_copy" >&6; } ;; __va_copy) { echo "$as_me:$LINENO: result: __va_copy" >&5 echo "${ECHO_T}__va_copy" >&6; } cat >>confdefs.h <<\_ACEOF #define va_copy __va_copy _ACEOF ;; memcpy) { echo "$as_me:$LINENO: result: memcpy" >&5 echo "${ECHO_T}memcpy" >&6; } cat >>confdefs.h <<\_ACEOF #define va_copy(dst, src) memcpy(&(dst), &(src), sizeof(va_list)) _ACEOF ;; *) ;; esac for ac_func in sigaction do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_SIGNALS 1 _ACEOF fi done { echo "$as_me:$LINENO: checking whether libc defines __progname" >&5 echo $ECHO_N "checking whether libc defines __progname... $ECHO_C" >&6; } if test "${local_cv_libc_defines___progname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { extern char *__progname; printf("%s", __progname); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then local_cv_libc_defines___progname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 local_cv_libc_defines___progname=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi if test x"${local_cv_libc_defines___progname}" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE___PROGNAME 1 _ACEOF : else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } : fi ac_config_files="$ac_config_files Makefile build-aux/Makefile compat/Makefile compat/sys/Makefile doc/Makefile doc/ezstream-file.sh.1.in doc/ezstream.1.in examples/Makefile m4/Makefile src/Makefile src/ezstream-file.sh win32/Makefile win32/shout/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by ezstream $as_me 0.5.6, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ezstream config.status 0.5.6 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "build-aux/Makefile") CONFIG_FILES="$CONFIG_FILES build-aux/Makefile" ;; "compat/Makefile") CONFIG_FILES="$CONFIG_FILES compat/Makefile" ;; "compat/sys/Makefile") CONFIG_FILES="$CONFIG_FILES compat/sys/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/ezstream-file.sh.1.in") CONFIG_FILES="$CONFIG_FILES doc/ezstream-file.sh.1.in" ;; "doc/ezstream.1.in") CONFIG_FILES="$CONFIG_FILES doc/ezstream.1.in" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/ezstream-file.sh") CONFIG_FILES="$CONFIG_FILES src/ezstream-file.sh" ;; "win32/Makefile") CONFIG_FILES="$CONFIG_FILES win32/Makefile" ;; "win32/shout/Makefile") CONFIG_FILES="$CONFIG_FILES win32/shout/Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim MAINT!$MAINT$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim FGREP!$FGREP$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim BUILD_DATE!$BUILD_DATE$ac_delim EXAMPLES_DIR!$EXAMPLES_DIR$ac_delim COMPAT_INCLUDES!$COMPAT_INCLUDES$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim LIBSHOUT_CFLAGS!$LIBSHOUT_CFLAGS$ac_delim LIBSHOUT_CPPFLAGS!$LIBSHOUT_CPPFLAGS$ac_delim LIBSHOUT_LDFLAGS!$LIBSHOUT_LDFLAGS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF LIBSHOUT_LIBS!$LIBSHOUT_LIBS$ac_delim LIBXML2_CFLAGS!$LIBXML2_CFLAGS$ac_delim LIBXML2_CPPFLAGS!$LIBXML2_CPPFLAGS$ac_delim LIBXML2_LDFLAGS!$LIBXML2_LDFLAGS$ac_delim LIBXML2_LIBS!$LIBXML2_LIBS$ac_delim TAGLIB_CFLAGS!$TAGLIB_CFLAGS$ac_delim TAGLIB_CPPFLAGS!$TAGLIB_CPPFLAGS$ac_delim TAGLIB_LDFLAGS!$TAGLIB_LDFLAGS$ac_delim TAGLIB_C_LIBS!$TAGLIB_C_LIBS$ac_delim VORBIS_CFLAGS!$VORBIS_CFLAGS$ac_delim VORBIS_CPPFLAGS!$VORBIS_CPPFLAGS$ac_delim VORBIS_LDFLAGS!$VORBIS_LDFLAGS$ac_delim LIBVORBISFILE_LIBS!$LIBVORBISFILE_LIBS$ac_delim LIBICONV!$LIBICONV$ac_delim LTLIBICONV!$LTLIBICONV$ac_delim LIBOBJS!$LIBOBJS$ac_delim EZ_CPPFLAGS!$EZ_CPPFLAGS$ac_delim EZ_CFLAGS!$EZ_CFLAGS$ac_delim EZ_LDFLAGS!$EZ_LDFLAGS$ac_delim EZ_LIBS!$EZ_LIBS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_arg=$ac_file _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi cat << __EOT ${PACKAGE_STRING} has been configured successfully. Configuration: Ogg Vorbis metadata support ... : ${use_metadata} Charset conversion support .... : ${use_iconv} Prefix ........................ : ${prefix} __EOT ezstream-0.5.6/configure.in0000644000175000017500000001621311246572750015003 0ustar tootstootsdnl ########### dnl ## SETUP ########################################################### dnl ########### AC_INIT([ezstream], [0.5.6], [https://trac.xiph.org/newticket?component=ezstream]) AC_REVISION([$Id: configure.in 16529 2009-08-30 12:49:06Z moritz $]) AC_PREREQ([2.61]) AC_CONFIG_SRCDIR([src/ezstream.c]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_LIBOBJ_DIR([src]) AM_MAINTAINER_MODE AC_USE_SYSTEM_EXTENSIONS AC_PROG_CC_STDC AC_PROG_FGREP AC_CANONICAL_HOST BUILD_DATE=$(date '+%B %d, %Y') AC_SUBST([BUILD_DATE]) EXAMPLES_DIR="\$(datadir)/examples/${PACKAGE_TARNAME}" AC_ARG_ENABLE([examplesdir], [AS_HELP_STRING([--enable-examplesdir=DIR], [examples installation directory (default: DATADIR/examples/ezstream)])], [case "$enableval" in yes) ;; no) AC_MSG_ERROR([Must have an install directory for the examples.]) ;; *) EXAMPLES_DIR="$enableval" ;; esac], []) AC_SUBST([EXAMPLES_DIR]) ez_enable_debug=no AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [enable memory debugging (default: no)])], [case "$enableval" in no) ;; *) ez_enable_debug=yes ;; esac], []) AC_MSG_CHECKING([whether to enable debugging]) if test x"${ez_enable_debug}" = "xyes"; then AC_DEFINE([XALLOC_DEBUG], [1], [Define whether to build with XALLOC debugging]) fi AC_MSG_RESULT([$ez_enable_debug]) EZ_CFLAGS="" EZ_CPPFLAGS="" EZ_LDFLAGS="" EZ_LIBS="" dnl ############## dnl ## COMPILER ######################################################## dnl ############## if test -n "${GCC}"; then for _flag in fstack-protector fstrict-aliasing Wall W Wstrict-aliasing \ Wwrite-strings Wpointer-arith Wshadow Wconversion Wcast-qual \ Wcast-align Wbounded Wmissing-declarations Wmissing-prototypes \ Wstrict-prototypes do AX_CHECK_CFLAG([${_flag}], [AX_UNIQVAR_APPEND([EZ_CFLAGS], [-${_flag}])], []) done AX_CHECK_CFLAG([Wformat=2], [AX_UNIQVAR_APPEND([EZ_CFLAGS], [-Wformat=2])], [ AX_CHECK_CFLAG([Wformat], [AX_UNIQVAR_APPEND([EZ_CFLAGS], [-Wformat])], []) ]) else case "${host}" in *-irix*) EZ_CFLAGS="-fullwarn" ;; *-solaris*) EZ_CFLAGS="-v" ;; *) ;; esac fi AC_C_CONST AC_C_VOLATILE dnl ############# dnl ## HEADERS ######################################################### dnl ############# AC_CHECK_HEADERS([ \ sys/time.h signal.h langinfo.h libgen.h locale.h paths.h \ ], [], [], [ #ifdef HAVE_SYS_TYPES_H # include #endif ]) COMPAT_INCLUDES="" if test x"${ez_enable_debug}" = "xyes"; then AX_HEADER_TREE([RB_FOREACH], [], [ COMPAT_INCLUDES="-I\$(top_srcdir)/compat" ]) fi AC_SUBST([COMPAT_INCLUDES]) dnl ########### dnl ## TYPES ########################################################### dnl ########### AC_TYPE_SIZE_T AC_TYPE_SSIZE_T dnl ############### dnl ## LIBRARIES ####################################################### dnl ############### AC_CHECK_LIB([gen], [basename], [ AX_UNIQVAR_PREPEND([EZ_LIBS], [-lgen]) ]) AX_CHECK_LIBSHOUT([], [], [AC_MSG_ERROR([libshout 2.2.x is required.], [1])]) AX_UNIQVAR_APPEND([EZ_CPPFLAGS], [${LIBSHOUT_CPPFLAGS}]) AX_UNIQVAR_APPEND([EZ_CFLAGS], [${LIBSHOUT_CFLAGS}]) AX_UNIQVAR_APPEND([EZ_LDFLAGS], [${LIBSHOUT_LDFLAGS}]) AX_UNIQVAR_PREPEND([EZ_LIBS], [${LIBSHOUT_LIBS}]) AX_CHECK_LIBXML2([], [], [AC_MSG_ERROR([libxml 2.x is required.], [1])]) AX_UNIQVAR_APPEND([EZ_CPPFLAGS], [${LIBXML2_CPPFLAGS}]) AX_UNIQVAR_APPEND([EZ_CFLAGS], [${LIBXML2_CFLAGS}]) AX_UNIQVAR_APPEND([EZ_LDFLAGS], [${LIBXML2_LDFLAGS}]) AX_UNIQVAR_PREPEND([EZ_LIBS], [${LIBXML2_LIBS}]) use_metadata="No" AX_CHECK_TAGLIB_C([], [ AC_DEFINE([HAVE_TAGLIB], [1], [Define to 1 if you have the libtag_c library.] ) AX_UNIQVAR_APPEND([EZ_CFLAGS], [${TAGLIB_CFLAGS}]) AX_UNIQVAR_APPEND([EZ_CPPFLAGS], [${TAGLIB_CPPFLAGS}]) AX_UNIQVAR_APPEND([EZ_LDFLAGS], [${TAGLIB_LDFLAGS}]) AX_UNIQVAR_PREPEND([EZ_LIBS], [${TAGLIB_C_LIBS}]) use_metadata="TagLib" ], [ AX_CHECK_LIBVORBISFILE([], [ AC_DEFINE([HAVE_VORBISFILE], [1], [Define to 1 if you have the libvorbisfile library.]) AX_UNIQVAR_APPEND([EZ_CPPFLAGS], [${VORBIS_CPPFLAGS}]) AX_UNIQVAR_APPEND([EZ_CFLAGS], [${VORBIS_CFLAGS}]) AX_UNIQVAR_APPEND([EZ_LDFLAGS], [${VORBIS_LDFLAGS}]) AX_UNIQVAR_PREPEND([EZ_LIBS], [${LIBVORBISFILE_LIBS}]) use_metadata="libvorbis" ], []) ]) # Not using AM_ICONV to check for iconv(), with or without libiconv(), # is not a viable option. Something in the past went horribly wrong; # the whole topic is extremely complex and not worth rewriting. # Instead, work around the buggy no-op that is --with-libiconv-prefix, # and at least try to find it in --prefix. Thankfully, it is and will # remain optional in ezstream. INCICONV="" LDICONV="" LIBICONV="" LTLIBICONV="" EZ_LIBICONV="" AM_ICONV if test x"${am_cv_func_iconv}" != "xyes"; then unset am_cv_func_iconv unset am_cv_lib_iconv if test x"${prefix}" = "xNONE"; then libiconv_prefix="/usr/local" else libiconv_prefix="${prefix}" fi AC_MSG_NOTICE([Looking for libiconv in ${libiconv_prefix} ...]) libiconv_save_CPPFLAGS="${CPPFLAGS}" libiconv_save_LDFLAGS="${LDFLAGS}" libiconv_save_LIBS="${LIBS}" CPPFLAGS="${CPPFLAGS} -I${libiconv_prefix}/include" LDFLAGS="${LDFLAGS} -L${libiconv_prefix}/lib" LIBS="-liconv" AM_ICONV if test x"${am_cv_func_iconv}" = "xyes"; then INCICONV="-I${libiconv_prefix}/include" LDICONV="-L${libiconv_prefix}/lib" LIBICONV="-liconv" fi CPPFLAGS="${libiconv_save_CPPFLAGS}" LDFLAGS="${libiconv_save_LDFLAGS}" LIBS="${libiconv_save_LIBS}" fi if test -n "${LTLIBICONV}"; then EZ_LIBICONV="${LTLIBICONV}" else EZ_LIBICONV="${LIBICONV}" fi AX_UNIQVAR_APPEND([EZ_CPPFLAGS], [$INCICONV]) AX_UNIQVAR_APPEND([EZ_LDFLAGS], [$LDICONV]) AX_UNIQVAR_PREPEND([EZ_LIBS], [$EZ_LIBICONV]) use_iconv="No" if test x"${am_cv_func_iconv}" = "xyes"; then use_iconv="Yes" fi dnl ####################### dnl ## FUNCTIONS / MACROS ############################################## dnl ####################### AC_CHECK_FUNCS([ \ arc4random \ basename \ getopt \ gettimeofday \ nl_langinfo \ pclose \ _pclose \ popen \ _popen \ random \ setlocale \ snprintf \ _snprintf \ srandomdev \ stat \ _stat \ strncasecmp \ strnicmp \ strtoll \ _strtoi64 \ ]) AC_REPLACE_FUNCS([ \ strlcat \ strlcpy \ strtonum \ ]) AX_FUNC_VA_COPY AC_CHECK_FUNCS([sigaction], [ AC_DEFINE([HAVE_SIGNALS], [1], [Define to 1 if we have BSD signals.]) ], [], [ #ifdef HAVE_SIGNAL_H # include #endif ]) dnl ################## dnl ## MISCELLANEOUS ################################################### dnl ################## AX_CHECK___PROGNAME dnl ############ dnl ## OUTPUT ########################################################## dnl ############ AC_SUBST([EZ_CPPFLAGS]) AC_SUBST([EZ_CFLAGS]) AC_SUBST([EZ_LDFLAGS]) AC_SUBST([EZ_LIBS]) AC_CONFIG_FILES([ Makefile build-aux/Makefile compat/Makefile compat/sys/Makefile doc/Makefile doc/ezstream-file.sh.1.in doc/ezstream.1.in examples/Makefile m4/Makefile src/Makefile src/ezstream-file.sh win32/Makefile win32/shout/Makefile ]) AC_OUTPUT cat << __EOT ${PACKAGE_STRING} has been configured successfully. Configuration: Ogg Vorbis metadata support ... : ${use_metadata} Charset conversion support .... : ${use_iconv} Prefix ........................ : ${prefix} __EOT ezstream-0.5.6/autogen.sh0000755000175000017500000000176011246572750014474 0ustar tootstoots#!/bin/sh PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin" _ac_version="2.61" _am_version="1.10" if [ ! -f "./`basename $0`" ]; then echo "Please chdir into `basename $0`'s directory first." exit 1 fi USE_LIBTOOL="$(grep AC_PROG_LIBTOOL ./configure.* 2> /dev/null)" EXTRA= if [ -d m4 ]; then EXTRA="-I m4" fi if [ -d /usr/local/share/aclocal ]; then EXTRA="${EXTRA} -I /usr/local/share/aclocal" fi AUTOCONF_VERSION="${_ac_version}" AUTOMAKE_VERSION="${_am_version}" \ aclocal ${EXTRA} || exit 1 AUTOCONF_VERSION="${_ac_version}" AUTOMAKE_VERSION="${_am_version}" \ autoconf || exit 1 AUTOCONF_VERSION="${_ac_version}" AUTOMAKE_VERSION="${_am_version}" \ autoheader || exit 1 if [ -n "${USE_LIBTOOL}" ]; then AUTOCONF_VERSION="${_ac_version}" AUTOMAKE_VERSION="${_am_version}" \ libtoolize --automake -c -f || exit 1 fi AUTOCONF_VERSION="${_ac_version}" AUTOMAKE_VERSION="${_am_version}" \ automake -a -c || exit 1 rm -r autom4te.cache exit 0 ezstream-0.5.6/compat/0000755000175000017500000000000011257756745013764 5ustar tootstootsezstream-0.5.6/compat/sys/0000755000175000017500000000000011257756774014604 5ustar tootstootsezstream-0.5.6/compat/sys/Makefile.am0000644000175000017500000000013211246572716016622 0ustar tootstootsAUTOMAKE_OPTIONS = 1.9 foreign EXTRA_DIST = tree.h tree.3 CLEANFILES = *~ *.core core ezstream-0.5.6/compat/sys/Makefile.in0000644000175000017500000002254311246573336016644 0ustar tootstoots# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = compat/sys DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ccflags.m4 \ $(top_srcdir)/m4/libshout.m4 $(top_srcdir)/m4/libvorbis.m4 \ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/progname.m4 \ $(top_srcdir)/m4/taglib.m4 $(top_srcdir)/m4/tree.m4 \ $(top_srcdir)/m4/vacopy.m4 $(top_srcdir)/m4/vars.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPAT_INCLUDES = @COMPAT_INCLUDES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXAMPLES_DIR = @EXAMPLES_DIR@ EXEEXT = @EXEEXT@ EZ_CFLAGS = @EZ_CFLAGS@ EZ_CPPFLAGS = @EZ_CPPFLAGS@ EZ_LDFLAGS = @EZ_LDFLAGS@ EZ_LIBS = @EZ_LIBS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHOUT_CFLAGS = @LIBSHOUT_CFLAGS@ LIBSHOUT_CPPFLAGS = @LIBSHOUT_CPPFLAGS@ LIBSHOUT_LDFLAGS = @LIBSHOUT_LDFLAGS@ LIBSHOUT_LIBS = @LIBSHOUT_LIBS@ LIBVORBISFILE_LIBS = @LIBVORBISFILE_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ TAGLIB_CPPFLAGS = @TAGLIB_CPPFLAGS@ TAGLIB_C_LIBS = @TAGLIB_C_LIBS@ TAGLIB_LDFLAGS = @TAGLIB_LDFLAGS@ VERSION = @VERSION@ VORBIS_CFLAGS = @VORBIS_CFLAGS@ VORBIS_CPPFLAGS = @VORBIS_CPPFLAGS@ VORBIS_LDFLAGS = @VORBIS_LDFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9 foreign EXTRA_DIST = tree.h tree.3 CLEANFILES = *~ *.core core all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign compat/sys/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign compat/sys/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ezstream-0.5.6/compat/sys/tree.h0000644000175000017500000006034111246572716015706 0ustar tootstoots/* $OpenBSD: tree.h,v 1.11 2008/05/11 22:19:09 millert Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SYS_TREE_H_ #define _SYS_TREE_H_ /* * This file defines data structures for different types of trees: * splay trees and red-black trees. * * A splay tree is a self-organizing data structure. Every operation * on the tree causes a splay to happen. The splay moves the requested * node to the root of the tree and partly rebalances it. * * This has the benefit that request locality causes faster lookups as * the requested nodes move to the top of the tree. On the other hand, * every lookup causes memory writes. * * The Balance Theorem bounds the total access time for m operations * and n inserts on an initially empty tree as O((m + n)lg n). The * amortized cost for a sequence of m accesses to a splay tree is O(lg n); * * A red-black tree is a binary search tree with the node color as an * extra attribute. It fulfills a set of conditions: * - every search path from the root to a leaf consists of the * same number of black nodes, * - each red node (except for the root) has a black parent, * - each leaf node is black. * * Every operation on a red-black tree is bounded as O(lg n). * The maximum height of a red-black tree is 2lg (n+1). */ #define SPLAY_HEAD(name, type) \ struct name { \ struct type *sph_root; /* root of the tree */ \ } #define SPLAY_INITIALIZER(root) \ { NULL } #define SPLAY_INIT(root) do { \ (root)->sph_root = NULL; \ } while (0) #define SPLAY_ENTRY(type) \ struct { \ struct type *spe_left; /* left element */ \ struct type *spe_right; /* right element */ \ } #define SPLAY_LEFT(elm, field) (elm)->field.spe_left #define SPLAY_RIGHT(elm, field) (elm)->field.spe_right #define SPLAY_ROOT(head) (head)->sph_root #define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) /* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ #define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ (head)->sph_root = tmp; \ } while (0) #define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ SPLAY_LEFT(tmp, field) = (head)->sph_root; \ (head)->sph_root = tmp; \ } while (0) #define SPLAY_LINKLEFT(head, tmp, field) do { \ SPLAY_LEFT(tmp, field) = (head)->sph_root; \ tmp = (head)->sph_root; \ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ } while (0) #define SPLAY_LINKRIGHT(head, tmp, field) do { \ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ tmp = (head)->sph_root; \ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ } while (0) #define SPLAY_ASSEMBLE(head, node, left, right, field) do { \ SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ } while (0) /* Generates prototypes and inline functions */ #define SPLAY_PROTOTYPE(name, type, field, cmp) \ void name##_SPLAY(struct name *, struct type *); \ void name##_SPLAY_MINMAX(struct name *, int); \ struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ \ /* Finds the node with the same key as elm */ \ static __inline struct type * \ name##_SPLAY_FIND(struct name *head, struct type *elm) \ { \ if (SPLAY_EMPTY(head)) \ return(NULL); \ name##_SPLAY(head, elm); \ if ((cmp)(elm, (head)->sph_root) == 0) \ return (head->sph_root); \ return (NULL); \ } \ \ static __inline struct type * \ name##_SPLAY_NEXT(struct name *head, struct type *elm) \ { \ name##_SPLAY(head, elm); \ if (SPLAY_RIGHT(elm, field) != NULL) { \ elm = SPLAY_RIGHT(elm, field); \ while (SPLAY_LEFT(elm, field) != NULL) { \ elm = SPLAY_LEFT(elm, field); \ } \ } else \ elm = NULL; \ return (elm); \ } \ \ static __inline struct type * \ name##_SPLAY_MIN_MAX(struct name *head, int val) \ { \ name##_SPLAY_MINMAX(head, val); \ return (SPLAY_ROOT(head)); \ } /* Main splay operation. * Moves node close to the key of elm to top */ #define SPLAY_GENERATE(name, type, field, cmp) \ struct type * \ name##_SPLAY_INSERT(struct name *head, struct type *elm) \ { \ if (SPLAY_EMPTY(head)) { \ SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ } else { \ int __comp; \ name##_SPLAY(head, elm); \ __comp = (cmp)(elm, (head)->sph_root); \ if(__comp < 0) { \ SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\ SPLAY_RIGHT(elm, field) = (head)->sph_root; \ SPLAY_LEFT((head)->sph_root, field) = NULL; \ } else if (__comp > 0) { \ SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\ SPLAY_LEFT(elm, field) = (head)->sph_root; \ SPLAY_RIGHT((head)->sph_root, field) = NULL; \ } else \ return ((head)->sph_root); \ } \ (head)->sph_root = (elm); \ return (NULL); \ } \ \ struct type * \ name##_SPLAY_REMOVE(struct name *head, struct type *elm) \ { \ struct type *__tmp; \ if (SPLAY_EMPTY(head)) \ return (NULL); \ name##_SPLAY(head, elm); \ if ((cmp)(elm, (head)->sph_root) == 0) { \ if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\ } else { \ __tmp = SPLAY_RIGHT((head)->sph_root, field); \ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\ name##_SPLAY(head, elm); \ SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ } \ return (elm); \ } \ return (NULL); \ } \ \ void \ name##_SPLAY(struct name *head, struct type *elm) \ { \ struct type __node, *__left, *__right, *__tmp; \ int __comp; \ \ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ __left = __right = &__node; \ \ while ((__comp = (cmp)(elm, (head)->sph_root))) { \ if (__comp < 0) { \ __tmp = SPLAY_LEFT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if ((cmp)(elm, __tmp) < 0){ \ SPLAY_ROTATE_RIGHT(head, __tmp, field); \ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKLEFT(head, __right, field); \ } else if (__comp > 0) { \ __tmp = SPLAY_RIGHT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if ((cmp)(elm, __tmp) > 0){ \ SPLAY_ROTATE_LEFT(head, __tmp, field); \ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKRIGHT(head, __left, field); \ } \ } \ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ } \ \ /* Splay with either the minimum or the maximum element \ * Used to find minimum or maximum element in tree. \ */ \ void name##_SPLAY_MINMAX(struct name *head, int __comp) \ { \ struct type __node, *__left, *__right, *__tmp; \ \ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ __left = __right = &__node; \ \ while (1) { \ if (__comp < 0) { \ __tmp = SPLAY_LEFT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if (__comp < 0){ \ SPLAY_ROTATE_RIGHT(head, __tmp, field); \ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKLEFT(head, __right, field); \ } else if (__comp > 0) { \ __tmp = SPLAY_RIGHT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if (__comp > 0) { \ SPLAY_ROTATE_LEFT(head, __tmp, field); \ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKRIGHT(head, __left, field); \ } \ } \ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ } #define SPLAY_NEGINF -1 #define SPLAY_INF 1 #define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) #define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) #define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) #define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) #define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \ : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) #define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \ : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) #define SPLAY_FOREACH(x, name, head) \ for ((x) = SPLAY_MIN(name, head); \ (x) != NULL; \ (x) = SPLAY_NEXT(name, head, x)) /* Macros that define a red-black tree */ #define RB_HEAD(name, type) \ struct name { \ struct type *rbh_root; /* root of the tree */ \ } #define RB_INITIALIZER(root) \ { NULL } #define RB_INIT(root) do { \ (root)->rbh_root = NULL; \ } while (0) #define RB_BLACK 0 #define RB_RED 1 #define RB_ENTRY(type) \ struct { \ struct type *rbe_left; /* left element */ \ struct type *rbe_right; /* right element */ \ struct type *rbe_parent; /* parent element */ \ int rbe_color; /* node color */ \ } #define RB_LEFT(elm, field) (elm)->field.rbe_left #define RB_RIGHT(elm, field) (elm)->field.rbe_right #define RB_PARENT(elm, field) (elm)->field.rbe_parent #define RB_COLOR(elm, field) (elm)->field.rbe_color #define RB_ROOT(head) (head)->rbh_root #define RB_EMPTY(head) (RB_ROOT(head) == NULL) #define RB_SET(elm, parent, field) do { \ RB_PARENT(elm, field) = parent; \ RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ RB_COLOR(elm, field) = RB_RED; \ } while (0) #define RB_SET_BLACKRED(black, red, field) do { \ RB_COLOR(black, field) = RB_BLACK; \ RB_COLOR(red, field) = RB_RED; \ } while (0) #ifndef RB_AUGMENT #define RB_AUGMENT(x) #endif #define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ (tmp) = RB_RIGHT(elm, field); \ if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field))) { \ RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ } \ RB_AUGMENT(elm); \ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ else \ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ } else \ (head)->rbh_root = (tmp); \ RB_LEFT(tmp, field) = (elm); \ RB_PARENT(elm, field) = (tmp); \ RB_AUGMENT(tmp); \ if ((RB_PARENT(tmp, field))) \ RB_AUGMENT(RB_PARENT(tmp, field)); \ } while (0) #define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ (tmp) = RB_LEFT(elm, field); \ if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field))) { \ RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ } \ RB_AUGMENT(elm); \ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ else \ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ } else \ (head)->rbh_root = (tmp); \ RB_RIGHT(tmp, field) = (elm); \ RB_PARENT(elm, field) = (tmp); \ RB_AUGMENT(tmp); \ if ((RB_PARENT(tmp, field))) \ RB_AUGMENT(RB_PARENT(tmp, field)); \ } while (0) /* Generates prototypes and inline functions */ #define RB_PROTOTYPE(name, type, field, cmp) \ RB_PROTOTYPE_INTERNAL(name, type, field, cmp,) #define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __attribute__((__unused__)) static) #define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\ attr struct type *name##_RB_REMOVE(struct name *, struct type *); \ attr struct type *name##_RB_INSERT(struct name *, struct type *); \ attr struct type *name##_RB_FIND(struct name *, struct type *); \ attr struct type *name##_RB_NFIND(struct name *, struct type *); \ attr struct type *name##_RB_NEXT(struct type *); \ attr struct type *name##_RB_PREV(struct type *); \ attr struct type *name##_RB_MINMAX(struct name *, int); \ \ /* Main rb operation. * Moves node close to the key of elm to top */ #define RB_GENERATE(name, type, field, cmp) \ RB_GENERATE_INTERNAL(name, type, field, cmp,) #define RB_GENERATE_STATIC(name, type, field, cmp) \ RB_GENERATE_INTERNAL(name, type, field, cmp, __attribute__((__unused__)) static) #define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ attr void \ name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ { \ struct type *parent, *gparent, *tmp; \ while ((parent = RB_PARENT(elm, field)) && \ RB_COLOR(parent, field) == RB_RED) { \ gparent = RB_PARENT(parent, field); \ if (parent == RB_LEFT(gparent, field)) { \ tmp = RB_RIGHT(gparent, field); \ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ RB_COLOR(tmp, field) = RB_BLACK; \ RB_SET_BLACKRED(parent, gparent, field);\ elm = gparent; \ continue; \ } \ if (RB_RIGHT(parent, field) == elm) { \ RB_ROTATE_LEFT(head, parent, tmp, field);\ tmp = parent; \ parent = elm; \ elm = tmp; \ } \ RB_SET_BLACKRED(parent, gparent, field); \ RB_ROTATE_RIGHT(head, gparent, tmp, field); \ } else { \ tmp = RB_LEFT(gparent, field); \ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ RB_COLOR(tmp, field) = RB_BLACK; \ RB_SET_BLACKRED(parent, gparent, field);\ elm = gparent; \ continue; \ } \ if (RB_LEFT(parent, field) == elm) { \ RB_ROTATE_RIGHT(head, parent, tmp, field);\ tmp = parent; \ parent = elm; \ elm = tmp; \ } \ RB_SET_BLACKRED(parent, gparent, field); \ RB_ROTATE_LEFT(head, gparent, tmp, field); \ } \ } \ RB_COLOR(head->rbh_root, field) = RB_BLACK; \ } \ \ attr void \ name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \ { \ struct type *tmp; \ while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ elm != RB_ROOT(head)) { \ if (RB_LEFT(parent, field) == elm) { \ tmp = RB_RIGHT(parent, field); \ if (RB_COLOR(tmp, field) == RB_RED) { \ RB_SET_BLACKRED(tmp, parent, field); \ RB_ROTATE_LEFT(head, parent, tmp, field);\ tmp = RB_RIGHT(parent, field); \ } \ if ((RB_LEFT(tmp, field) == NULL || \ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ (RB_RIGHT(tmp, field) == NULL || \ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ RB_COLOR(tmp, field) = RB_RED; \ elm = parent; \ parent = RB_PARENT(elm, field); \ } else { \ if (RB_RIGHT(tmp, field) == NULL || \ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\ struct type *oleft; \ if ((oleft = RB_LEFT(tmp, field)))\ RB_COLOR(oleft, field) = RB_BLACK;\ RB_COLOR(tmp, field) = RB_RED; \ RB_ROTATE_RIGHT(head, tmp, oleft, field);\ tmp = RB_RIGHT(parent, field); \ } \ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ RB_COLOR(parent, field) = RB_BLACK; \ if (RB_RIGHT(tmp, field)) \ RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\ RB_ROTATE_LEFT(head, parent, tmp, field);\ elm = RB_ROOT(head); \ break; \ } \ } else { \ tmp = RB_LEFT(parent, field); \ if (RB_COLOR(tmp, field) == RB_RED) { \ RB_SET_BLACKRED(tmp, parent, field); \ RB_ROTATE_RIGHT(head, parent, tmp, field);\ tmp = RB_LEFT(parent, field); \ } \ if ((RB_LEFT(tmp, field) == NULL || \ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ (RB_RIGHT(tmp, field) == NULL || \ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ RB_COLOR(tmp, field) = RB_RED; \ elm = parent; \ parent = RB_PARENT(elm, field); \ } else { \ if (RB_LEFT(tmp, field) == NULL || \ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\ struct type *oright; \ if ((oright = RB_RIGHT(tmp, field)))\ RB_COLOR(oright, field) = RB_BLACK;\ RB_COLOR(tmp, field) = RB_RED; \ RB_ROTATE_LEFT(head, tmp, oright, field);\ tmp = RB_LEFT(parent, field); \ } \ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ RB_COLOR(parent, field) = RB_BLACK; \ if (RB_LEFT(tmp, field)) \ RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\ RB_ROTATE_RIGHT(head, parent, tmp, field);\ elm = RB_ROOT(head); \ break; \ } \ } \ } \ if (elm) \ RB_COLOR(elm, field) = RB_BLACK; \ } \ \ attr struct type * \ name##_RB_REMOVE(struct name *head, struct type *elm) \ { \ struct type *child, *parent, *old = elm; \ int color; \ if (RB_LEFT(elm, field) == NULL) \ child = RB_RIGHT(elm, field); \ else if (RB_RIGHT(elm, field) == NULL) \ child = RB_LEFT(elm, field); \ else { \ struct type *left; \ elm = RB_RIGHT(elm, field); \ while ((left = RB_LEFT(elm, field))) \ elm = left; \ child = RB_RIGHT(elm, field); \ parent = RB_PARENT(elm, field); \ color = RB_COLOR(elm, field); \ if (child) \ RB_PARENT(child, field) = parent; \ if (parent) { \ if (RB_LEFT(parent, field) == elm) \ RB_LEFT(parent, field) = child; \ else \ RB_RIGHT(parent, field) = child; \ RB_AUGMENT(parent); \ } else \ RB_ROOT(head) = child; \ if (RB_PARENT(elm, field) == old) \ parent = elm; \ (elm)->field = (old)->field; \ if (RB_PARENT(old, field)) { \ if (RB_LEFT(RB_PARENT(old, field), field) == old)\ RB_LEFT(RB_PARENT(old, field), field) = elm;\ else \ RB_RIGHT(RB_PARENT(old, field), field) = elm;\ RB_AUGMENT(RB_PARENT(old, field)); \ } else \ RB_ROOT(head) = elm; \ RB_PARENT(RB_LEFT(old, field), field) = elm; \ if (RB_RIGHT(old, field)) \ RB_PARENT(RB_RIGHT(old, field), field) = elm; \ if (parent) { \ left = parent; \ do { \ RB_AUGMENT(left); \ } while ((left = RB_PARENT(left, field))); \ } \ goto color; \ } \ parent = RB_PARENT(elm, field); \ color = RB_COLOR(elm, field); \ if (child) \ RB_PARENT(child, field) = parent; \ if (parent) { \ if (RB_LEFT(parent, field) == elm) \ RB_LEFT(parent, field) = child; \ else \ RB_RIGHT(parent, field) = child; \ RB_AUGMENT(parent); \ } else \ RB_ROOT(head) = child; \ color: \ if (color == RB_BLACK) \ name##_RB_REMOVE_COLOR(head, parent, child); \ return (old); \ } \ \ /* Inserts a node into the RB tree */ \ attr struct type * \ name##_RB_INSERT(struct name *head, struct type *elm) \ { \ struct type *tmp; \ struct type *parent = NULL; \ int comp = 0; \ tmp = RB_ROOT(head); \ while (tmp) { \ parent = tmp; \ comp = (cmp)(elm, parent); \ if (comp < 0) \ tmp = RB_LEFT(tmp, field); \ else if (comp > 0) \ tmp = RB_RIGHT(tmp, field); \ else \ return (tmp); \ } \ RB_SET(elm, parent, field); \ if (parent != NULL) { \ if (comp < 0) \ RB_LEFT(parent, field) = elm; \ else \ RB_RIGHT(parent, field) = elm; \ RB_AUGMENT(parent); \ } else \ RB_ROOT(head) = elm; \ name##_RB_INSERT_COLOR(head, elm); \ return (NULL); \ } \ \ /* Finds the node with the same key as elm */ \ attr struct type * \ name##_RB_FIND(struct name *head, struct type *elm) \ { \ struct type *tmp = RB_ROOT(head); \ int comp; \ while (tmp) { \ comp = cmp(elm, tmp); \ if (comp < 0) \ tmp = RB_LEFT(tmp, field); \ else if (comp > 0) \ tmp = RB_RIGHT(tmp, field); \ else \ return (tmp); \ } \ return (NULL); \ } \ \ /* Finds the first node greater than or equal to the search key */ \ attr struct type * \ name##_RB_NFIND(struct name *head, struct type *elm) \ { \ struct type *tmp = RB_ROOT(head); \ struct type *res = NULL; \ int comp; \ while (tmp) { \ comp = cmp(elm, tmp); \ if (comp < 0) { \ res = tmp; \ tmp = RB_LEFT(tmp, field); \ } \ else if (comp > 0) \ tmp = RB_RIGHT(tmp, field); \ else \ return (tmp); \ } \ return (res); \ } \ \ /* ARGSUSED */ \ attr struct type * \ name##_RB_NEXT(struct type *elm) \ { \ if (RB_RIGHT(elm, field)) { \ elm = RB_RIGHT(elm, field); \ while (RB_LEFT(elm, field)) \ elm = RB_LEFT(elm, field); \ } else { \ if (RB_PARENT(elm, field) && \ (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ elm = RB_PARENT(elm, field); \ else { \ while (RB_PARENT(elm, field) && \ (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\ elm = RB_PARENT(elm, field); \ elm = RB_PARENT(elm, field); \ } \ } \ return (elm); \ } \ \ /* ARGSUSED */ \ attr struct type * \ name##_RB_PREV(struct type *elm) \ { \ if (RB_LEFT(elm, field)) { \ elm = RB_LEFT(elm, field); \ while (RB_RIGHT(elm, field)) \ elm = RB_RIGHT(elm, field); \ } else { \ if (RB_PARENT(elm, field) && \ (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ elm = RB_PARENT(elm, field); \ else { \ while (RB_PARENT(elm, field) && \ (elm == RB_LEFT(RB_PARENT(elm, field), field)))\ elm = RB_PARENT(elm, field); \ elm = RB_PARENT(elm, field); \ } \ } \ return (elm); \ } \ \ attr struct type * \ name##_RB_MINMAX(struct name *head, int val) \ { \ struct type *tmp = RB_ROOT(head); \ struct type *parent = NULL; \ while (tmp) { \ parent = tmp; \ if (val < 0) \ tmp = RB_LEFT(tmp, field); \ else \ tmp = RB_RIGHT(tmp, field); \ } \ return (parent); \ } #define RB_NEGINF -1 #define RB_INF 1 #define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) #define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) #define RB_FIND(name, x, y) name##_RB_FIND(x, y) #define RB_NFIND(name, x, y) name##_RB_NFIND(x, y) #define RB_NEXT(name, x, y) name##_RB_NEXT(y) #define RB_PREV(name, x, y) name##_RB_PREV(y) #define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) #define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) #define RB_FOREACH(x, name, head) \ for ((x) = RB_MIN(name, head); \ (x) != NULL; \ (x) = name##_RB_NEXT(x)) #define RB_FOREACH_REVERSE(x, name, head) \ for ((x) = RB_MAX(name, head); \ (x) != NULL; \ (x) = name##_RB_PREV(x)) #endif /* _SYS_TREE_H_ */ ezstream-0.5.6/compat/Makefile.am0000644000175000017500000000011611246572716016006 0ustar tootstootsAUTOMAKE_OPTIONS = 1.9 foreign SUBDIRS = sys CLEANFILES = *~ *.core core ezstream-0.5.6/compat/Makefile.in0000644000175000017500000003552511246573336016032 0ustar tootstoots# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = compat DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ccflags.m4 \ $(top_srcdir)/m4/libshout.m4 $(top_srcdir)/m4/libvorbis.m4 \ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/progname.m4 \ $(top_srcdir)/m4/taglib.m4 $(top_srcdir)/m4/tree.m4 \ $(top_srcdir)/m4/vacopy.m4 $(top_srcdir)/m4/vars.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPAT_INCLUDES = @COMPAT_INCLUDES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXAMPLES_DIR = @EXAMPLES_DIR@ EXEEXT = @EXEEXT@ EZ_CFLAGS = @EZ_CFLAGS@ EZ_CPPFLAGS = @EZ_CPPFLAGS@ EZ_LDFLAGS = @EZ_LDFLAGS@ EZ_LIBS = @EZ_LIBS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHOUT_CFLAGS = @LIBSHOUT_CFLAGS@ LIBSHOUT_CPPFLAGS = @LIBSHOUT_CPPFLAGS@ LIBSHOUT_LDFLAGS = @LIBSHOUT_LDFLAGS@ LIBSHOUT_LIBS = @LIBSHOUT_LIBS@ LIBVORBISFILE_LIBS = @LIBVORBISFILE_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ TAGLIB_CPPFLAGS = @TAGLIB_CPPFLAGS@ TAGLIB_C_LIBS = @TAGLIB_C_LIBS@ TAGLIB_LDFLAGS = @TAGLIB_LDFLAGS@ VERSION = @VERSION@ VORBIS_CFLAGS = @VORBIS_CFLAGS@ VORBIS_CPPFLAGS = @VORBIS_CPPFLAGS@ VORBIS_LDFLAGS = @VORBIS_LDFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9 foreign SUBDIRS = sys CLEANFILES = *~ *.core core all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign compat/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign compat/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive distclean distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ezstream-0.5.6/Makefile.am0000644000175000017500000000075311246572750014530 0ustar tootstootsAUTOMAKE_OPTIONS = 1.9 foreign ACLOCAL_AMFLAGS = -I m4 SUBDIRS = build-aux compat doc examples m4 src win32 dist_doc_DATA = COPYING NEWS README EXTRA_DIST = \ autogen.sh \ m4/ccflags.m4 m4/libshout.m4 m4/libvorbis.m4 m4/libxml2.m4 \ m4/progname.m4 m4/taglib.m4 m4/tree.m4 m4/vacopy.m4 m4/vars.m4 CLEANFILES = core *.core *~ .*~ .PHONY: regen-win32 snapshot regen-win32: cd win32; ${MAKE} regen-win32 snapshot: ${MAKE} distcheck distdir=${PACKAGE}-snapshot-`date +'%Y%m%d'` ezstream-0.5.6/Makefile.in0000644000175000017500000005157511246573336014552 0ustar tootstoots# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/configure COPYING ChangeLog INSTALL NEWS ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ccflags.m4 \ $(top_srcdir)/m4/libshout.m4 $(top_srcdir)/m4/libvorbis.m4 \ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/progname.m4 \ $(top_srcdir)/m4/taglib.m4 $(top_srcdir)/m4/tree.m4 \ $(top_srcdir)/m4/vacopy.m4 $(top_srcdir)/m4/vars.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(docdir)" dist_docDATA_INSTALL = $(INSTALL_DATA) DATA = $(dist_doc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPAT_INCLUDES = @COMPAT_INCLUDES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXAMPLES_DIR = @EXAMPLES_DIR@ EXEEXT = @EXEEXT@ EZ_CFLAGS = @EZ_CFLAGS@ EZ_CPPFLAGS = @EZ_CPPFLAGS@ EZ_LDFLAGS = @EZ_LDFLAGS@ EZ_LIBS = @EZ_LIBS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHOUT_CFLAGS = @LIBSHOUT_CFLAGS@ LIBSHOUT_CPPFLAGS = @LIBSHOUT_CPPFLAGS@ LIBSHOUT_LDFLAGS = @LIBSHOUT_LDFLAGS@ LIBSHOUT_LIBS = @LIBSHOUT_LIBS@ LIBVORBISFILE_LIBS = @LIBVORBISFILE_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ TAGLIB_CPPFLAGS = @TAGLIB_CPPFLAGS@ TAGLIB_C_LIBS = @TAGLIB_C_LIBS@ TAGLIB_LDFLAGS = @TAGLIB_LDFLAGS@ VERSION = @VERSION@ VORBIS_CFLAGS = @VORBIS_CFLAGS@ VORBIS_CPPFLAGS = @VORBIS_CPPFLAGS@ VORBIS_LDFLAGS = @VORBIS_LDFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9 foreign ACLOCAL_AMFLAGS = -I m4 SUBDIRS = build-aux compat doc examples m4 src win32 dist_doc_DATA = COPYING NEWS README EXTRA_DIST = \ autogen.sh \ m4/ccflags.m4 m4/libshout.m4 m4/libvorbis.m4 m4/libxml2.m4 \ m4/progname.m4 m4/taglib.m4 m4/tree.m4 m4/vacopy.m4 m4/vars.m4 CLEANFILES = core *.core *~ .*~ all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) install-dist_docDATA: $(dist_doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(dist_doc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ done uninstall-dist_docDATA: @$(NORMAL_UNINSTALL) @list='$(dist_doc_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ rm -f "$(DESTDIR)$(docdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dist_docDATA install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-dist_docDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_docDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-dist_docDATA .PHONY: regen-win32 snapshot regen-win32: cd win32; ${MAKE} regen-win32 snapshot: ${MAKE} distcheck distdir=${PACKAGE}-snapshot-`date +'%Y%m%d'` # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ezstream-0.5.6/build-aux/0000755000175000017500000000000011257756745014373 5ustar tootstootsezstream-0.5.6/build-aux/depcomp0000755000175000017500000004271311246573054015743 0ustar tootstoots#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2007-03-29.01 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: ezstream-0.5.6/build-aux/config.guess0000755000175000017500000013061111246573054016701 0ustar tootstoots#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-11-15' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#endif' | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ezstream-0.5.6/build-aux/config.rpath0000755000175000017500000003744411246572735016710 0ustar tootstoots#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2006 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux*) case $cc_basename in icc* | ecc*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; sco3.2v5*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) wl='-Wl,' ;; sysv4*MP*) ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; interix3*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | kfreebsd*-gnu | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. libname_spec='lib$name' case "$host_os" in aix3*) ;; aix4* | aix5*) ;; amigaos*) ;; beos*) ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) shrext=.dylib ;; dgux*) ;; freebsd1*) ;; kfreebsd*-gnu) ;; freebsd* | dragonfly*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac ;; interix3*) ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux*) ;; knetbsd*-gnu) ;; netbsd*) ;; newsos6) ;; nto-qnx*) ;; openbsd*) ;; os2*) libname_spec='$name' shrext=.dll ;; osf3* | osf4* | osf5*) ;; solaris*) ;; sunos4*) ;; sysv4 | sysv4.3*) ;; sysv4*MP*) ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) ;; uts4*) ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: ezstream-0.5.6/build-aux/config.sub0000755000175000017500000010175611246573054016354 0ustar tootstoots#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-09-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ezstream-0.5.6/build-aux/missing0000755000175000017500000002557711246573054015776 0ustar tootstoots#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: ezstream-0.5.6/build-aux/Makefile.am0000644000175000017500000000013511246572735016417 0ustar tootstootsAUTOMAKE_OPTIONS = 1.9 foreign EXTRA_DIST = config.rpath CLEANFILES = core *.core *~ .*~ ezstream-0.5.6/build-aux/Makefile.in0000644000175000017500000002264611246573337016442 0ustar tootstoots# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = build-aux DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in config.guess \ config.rpath config.sub depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ccflags.m4 \ $(top_srcdir)/m4/libshout.m4 $(top_srcdir)/m4/libvorbis.m4 \ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/progname.m4 \ $(top_srcdir)/m4/taglib.m4 $(top_srcdir)/m4/tree.m4 \ $(top_srcdir)/m4/vacopy.m4 $(top_srcdir)/m4/vars.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPAT_INCLUDES = @COMPAT_INCLUDES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXAMPLES_DIR = @EXAMPLES_DIR@ EXEEXT = @EXEEXT@ EZ_CFLAGS = @EZ_CFLAGS@ EZ_CPPFLAGS = @EZ_CPPFLAGS@ EZ_LDFLAGS = @EZ_LDFLAGS@ EZ_LIBS = @EZ_LIBS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHOUT_CFLAGS = @LIBSHOUT_CFLAGS@ LIBSHOUT_CPPFLAGS = @LIBSHOUT_CPPFLAGS@ LIBSHOUT_LDFLAGS = @LIBSHOUT_LDFLAGS@ LIBSHOUT_LIBS = @LIBSHOUT_LIBS@ LIBVORBISFILE_LIBS = @LIBVORBISFILE_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ TAGLIB_CPPFLAGS = @TAGLIB_CPPFLAGS@ TAGLIB_C_LIBS = @TAGLIB_C_LIBS@ TAGLIB_LDFLAGS = @TAGLIB_LDFLAGS@ VERSION = @VERSION@ VORBIS_CFLAGS = @VORBIS_CFLAGS@ VORBIS_CPPFLAGS = @VORBIS_CPPFLAGS@ VORBIS_LDFLAGS = @VORBIS_LDFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9 foreign EXTRA_DIST = config.rpath CLEANFILES = core *.core *~ .*~ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign build-aux/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign build-aux/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ezstream-0.5.6/INSTALL0000644000175000017500000002266411246572750013532 0ustar tootstoots ------------------- Ezstream uses the GNU auto-tools to build and install on a variety of systems. This file contains detailed instructions about a standard GNU software package installation, from autoconf-2.61. ------------------- Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. ezstream-0.5.6/examples/0000755000175000017500000000000011257756745014317 5ustar tootstootsezstream-0.5.6/examples/ezstream_reencode_vorbis.xml0000644000175000017500000000733511246572750022121 0ustar tootstoots http://localhost:8000/vorbis.ogg hackme VORBIS playlist.m3u 1 0 My Stream http://www.oddsock.org RockNRoll This is a stream description 88 1.5 2 44100 1 1 FLAC .flac flac -s -d --force-raw-format --sign=signed --endian=little -o - "@T@" MP3 .mp3 madplay -b 16 -R 44100 -S -o raw:- "@T@" lame --preset cbr 128 -r -s 44.1 --bitwidth 16 - - VORBIS .ogg oggdec -R -b 16 -e 0 -s 1 -o - "@T@" oggenc -r -B 16 -C 2 -R 44100 --raw-endianness 0 -q 1.5 -t "@M@" - ezstream-0.5.6/examples/ezstream_stdin_vorbis.xml0000644000175000017500000000272611246572750021455 0ustar tootstoots http://localhost:8000/vorbis.ogg hackme VORBIS stdin 1 My Stream http://www.oddsock.org RockNRoll This is a stream description 96 2.0 2 44100 1 ezstream-0.5.6/examples/playlist-logger.sh0000755000175000017500000000661611246572750017773 0ustar tootstoots#!/bin/sh # Example playlist script, by Moritz Grimm # Public Domain where available. Anywhere else: all possible permissions # are granted and all warranties whatsoever are disclaimed. Use at your # own risk. # # The script plays a simple playlist, but also logs when and which new # song is queued. Because it writes the entire playlist each time it is # run, the script will probably not perform well with huge (500+kB) # playlist files. # # Before using it, the configuration variables below should be adjusted # appropriately. # # When using this script in multiple instances of ezstream, use # different STATE_DIR locations or rename the script to a unique name. ######################### ## BEGIN CONFIGURATION ####################################################### ######################### # STATE_DIR # Directory where this script keeps state. The directory should only be # writeable by the user and nobody else (therefore, /tmp is not # suitable.) STATE_DIR="." # PLAYLIST # The playlist that should be played by this script. PLAYLIST="playlist.txt" # LOGFILE (optional) # File to log song changes to. If not set, logging to file is disabled # (and this script can be replaced by $PLAYLIST.) LOGFILE="ezstream.log" # REPEAT (optional) # Set to 1 to repeat the playlist indefinitely, set to 0 or leave commented # out to allow ezstream to determine what to do at end-of-playlist. #REPEAT=1 ####################### ## END CONFIGURATION ######################################################### ####################### _myname="$(basename $0)" # Check configuration above: if [ -z "${STATE_DIR}" -o ! -d "${STATE_DIR}" ]; then echo "${_myname}: STATE_DIR is not configured, does not exist or is not a directory." >&2 exit 1 fi if [ -z "${PLAYLIST}" -o ! -e "${PLAYLIST}" ]; then echo "${_myname}: PLAYLIST is not configured or does not exist." >&2 exit 1 fi test -n "${REPEAT}" || REPEAT=0 # Set up helper files: _state="${STATE_DIR}/${_myname}.state" _playlist="`mktemp "${STATE_DIR}/${_myname}.XXXXXXXXXX"`" if [ $? -ne 0 ]; then echo "${_myname}: Unable to create temporary file." >&2 exit 1 fi trap 'rm -f ${_playlist}' 0 trap 'rm -f ${_playlist}; exit 1' 2 15 # Strip comments and empty lines from PLAYLIST, to support .m3u: sed -e 's,#.*,,g' < ${PLAYLIST} | grep -v '^[[:space:]]*$' >> ${_playlist} if [ $? -ne 0 ]; then echo "${_myname}: Unable to prepare playlist." >&2 exit 1 fi # Create state file, if it does not exist: test -f "${_state}" || touch "${_state}" if [ $? -ne 0 ]; then echo "${_myname}: Unable to create state file." >&2 exit 1 fi # Read current track no. from state file: read _track_no < "${_state}" if [ -z "${_track_no}" ]; then _track_no=1 fi # Count number of tracks in the playlist: _num_tracks="$(wc -l < ${_playlist})" if [ ${_num_tracks} -eq 0 ]; then # Nothing to do, really. exit 0 fi # Handle the end-of-playlist case: if [ ${_track_no} -gt ${_num_tracks} ]; then if [ ${REPEAT} -ne 1 ]; then # We're done. # Output an empty line to indicate end-of-playlist: echo rm -f "${_state}" exit 0 fi _track_no=1 fi # Get the current track from the playlist: _track="$(head -n ${_track_no} ${_playlist} | tail -n 1)" # Output: echo "${_track}" test -z "${LOGFILE}" || \ echo "$(date '+%b %d %H:%M:%S') playlist=\"${PLAYLIST}\" no=${_track_no} track=\"${_track}\"" \ >> "${LOGFILE}" # Increment track number and store: : $((_track_no += 1)) echo "${_track_no}" > "${_state}" exit 0 ezstream-0.5.6/examples/ezstream-file_template.xml0000644000175000017500000000363611246572750021501 0ustar tootstoots http://localhost:8000/vorbis.ogg hackme VORBIS %FILENAME% My Stream http://www.oddsock.org RockNRoll This is a stream description 88 1.5 2 44100 1 FLAC .flac flac -s -d --force-raw-format --sign=signed --endian=little -o - "@T@" MP3 .mp3 madplay -b 16 -R 44100 -S -o raw:- "@T@" lame --preset cbr 128 -r -s 44.1 --bitwidth 16 - - VORBIS .ogg oggdec -R -b 16 -e 0 -s 1 -o - "@T@" oggenc -r -B 16 -C 2 -R 44100 --raw-endianness 0 -q 1.5 -t "@M@" - ezstream-0.5.6/examples/meta.sh0000755000175000017500000000034711246572750015576 0ustar tootstoots#!/bin/sh # Minimalist example metadata script that has the behavior required by # ezstream. test -z "${1}" && echo "Ezstream presents" test x"${1}" = "xartist" && echo "Great Artist" test x"${1}" = "xtitle" && echo "Great Song" ezstream-0.5.6/examples/ezstream_reencode_mp3.xml0000644000175000017500000000716111246572750021311 0ustar tootstoots http://localhost:8000/stream hackme MP3 playlist.pl 1 My Stream http://www.oddsock.org RockNRoll This is a stream description 128 2 44100 0 1 FLAC .flac flac -s -d --force-raw-format --sign=signed --endian=little -o - "@T@" MP3 .mp3 madplay -b 16 -R 44100 -S -o raw:- "@T@" lame --preset cbr 128 -r -s 44.1 --bitwidth 16 - - VORBIS .ogg oggdec -R -b 16 -e 0 -s 1 -o - "@T@" oggenc -r -B 16 -C 2 -R 44100 --raw-endianness 0 -q 1.5 -t "@M@" - ezstream-0.5.6/examples/Makefile.am0000644000175000017500000000060311246572750016340 0ustar tootstootsAUTOMAKE_OPTIONS = 1.9 foreign examplesdir = @EXAMPLES_DIR@ dist_examples_DATA = \ ezstream-file_template.xml \ ezstream_mp3.xml ezstream_reencode_mp3.xml \ ezstream_reencode_theora.xml ezstream_reencode_vorbis.xml \ ezstream_stdin_vorbis.xml ezstream_vorbis.xml \ ezstream_metadata.xml dist_examples_SCRIPTS = meta.sh play.sh playlist-logger.sh CLEANFILES = core *.core *~ .*~ ezstream-0.5.6/examples/Makefile.in0000644000175000017500000002767611246573336016375 0ustar tootstoots# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples DIST_COMMON = $(dist_examples_DATA) $(dist_examples_SCRIPTS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ccflags.m4 \ $(top_srcdir)/m4/libshout.m4 $(top_srcdir)/m4/libvorbis.m4 \ $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/progname.m4 \ $(top_srcdir)/m4/taglib.m4 $(top_srcdir)/m4/tree.m4 \ $(top_srcdir)/m4/vacopy.m4 $(top_srcdir)/m4/vars.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(examplesdir)" \ "$(DESTDIR)$(examplesdir)" dist_examplesSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(dist_examples_SCRIPTS) SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; dist_examplesDATA_INSTALL = $(INSTALL_DATA) DATA = $(dist_examples_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPAT_INCLUDES = @COMPAT_INCLUDES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXAMPLES_DIR = @EXAMPLES_DIR@ EXEEXT = @EXEEXT@ EZ_CFLAGS = @EZ_CFLAGS@ EZ_CPPFLAGS = @EZ_CPPFLAGS@ EZ_LDFLAGS = @EZ_LDFLAGS@ EZ_LIBS = @EZ_LIBS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHOUT_CFLAGS = @LIBSHOUT_CFLAGS@ LIBSHOUT_CPPFLAGS = @LIBSHOUT_CPPFLAGS@ LIBSHOUT_LDFLAGS = @LIBSHOUT_LDFLAGS@ LIBSHOUT_LIBS = @LIBSHOUT_LIBS@ LIBVORBISFILE_LIBS = @LIBVORBISFILE_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAGLIB_CFLAGS = @TAGLIB_CFLAGS@ TAGLIB_CPPFLAGS = @TAGLIB_CPPFLAGS@ TAGLIB_C_LIBS = @TAGLIB_C_LIBS@ TAGLIB_LDFLAGS = @TAGLIB_LDFLAGS@ VERSION = @VERSION@ VORBIS_CFLAGS = @VORBIS_CFLAGS@ VORBIS_CPPFLAGS = @VORBIS_CPPFLAGS@ VORBIS_LDFLAGS = @VORBIS_LDFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9 foreign examplesdir = @EXAMPLES_DIR@ dist_examples_DATA = \ ezstream-file_template.xml \ ezstream_mp3.xml ezstream_reencode_mp3.xml \ ezstream_reencode_theora.xml ezstream_reencode_vorbis.xml \ ezstream_stdin_vorbis.xml ezstream_vorbis.xml \ ezstream_metadata.xml dist_examples_SCRIPTS = meta.sh play.sh playlist-logger.sh CLEANFILES = core *.core *~ .*~ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-dist_examplesSCRIPTS: $(dist_examples_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(dist_examples_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(dist_examplesSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(examplesdir)/$$f'"; \ $(dist_examplesSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(examplesdir)/$$f"; \ else :; fi; \ done uninstall-dist_examplesSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(dist_examples_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(examplesdir)/$$f'"; \ rm -f "$(DESTDIR)$(examplesdir)/$$f"; \ done install-dist_examplesDATA: $(dist_examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(dist_examples_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(dist_examplesDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(examplesdir)/$$f'"; \ $(dist_examplesDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(examplesdir)/$$f"; \ done uninstall-dist_examplesDATA: @$(NORMAL_UNINSTALL) @list='$(dist_examples_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(examplesdir)/$$f'"; \ rm -f "$(DESTDIR)$(examplesdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(examplesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dist_examplesDATA \ install-dist_examplesSCRIPTS install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_examplesDATA \ uninstall-dist_examplesSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_examplesDATA install-dist_examplesSCRIPTS \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-dist_examplesDATA \ uninstall-dist_examplesSCRIPTS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ezstream-0.5.6/examples/ezstream_metadata.xml0000644000175000017500000000333111246572750020521 0ustar tootstoots http://localhost:8000/vorbis.ogg hackme VORBIS play.sh 1 meta.sh @s@: @a@ - @t@ My Stream http://www.oddsock.org RockNRoll This is a stream description 96 2.0 2 44100 1 ezstream-0.5.6/examples/ezstream_reencode_theora.xml0000644000175000017500000000640111246572750022070 0ustar tootstoots http://localhost:8000/theora.ogg hackme THEORA playlist.m3u My Stream http://www.oddsock.org Documentary This is a stream description 200 2 44100 1 THEORA .avi ffmpeg2theora -x 192 -y 128 -a 0 -v 4 --title "@M@" -o - "@T@" THEORA .mpg ffmpeg2theora -x 192 -y 128 -a 0 -v 4 --title "@M@" -o - "@T@" ezstream-0.5.6/examples/ezstream_mp3.xml0000644000175000017500000000274311246572750017446 0ustar tootstoots http://localhost:8000/stream hackme MP3 playlist.m3u 1 My Stream http://www.oddsock.org RockNRoll This is a stream description 128 2 44100 0 ezstream-0.5.6/examples/ezstream_vorbis.xml0000644000175000017500000000276611246572750020260 0ustar tootstoots http://localhost:8000/vorbis.ogg hackme VORBIS playlist.m3u 0 My Stream http://www.oddsock.org RockNRoll This is a stream description 96 2.0 2 44100 1 ezstream-0.5.6/examples/play.sh0000755000175000017500000000020411246572750015605 0ustar tootstoots#!/bin/sh # Minimalist example playlist script that has the behavior required by # ezstream. echo "Great_Artist_-_Great_Song.ogg" ezstream-0.5.6/ChangeLog0000644000175000017500000016604211246572771014255 0ustar tootstoots2009-08-30 21:55 moritz * [r16537] NEWS, doc/ezstream.1.in.in, src/ezstream.c: Teach ezstream a different mode of operation, as a one-shot line shuffling tool. 2009-08-30 21:46 moritz * [r16536] src/ezstream.h, src/playlist.c: Support reading playlists from standard input. 2009-08-30 20:34 moritz * [r16535] examples/Makefile.am, examples/ezstream-file_template.xml: Add an example template configuration for ezstream-file.sh(1). 2009-08-30 19:41 moritz * [r16534] src/ezstream-file.sh.in: Move the verbose error check where it belongs. 2009-08-30 19:38 moritz * [r16533] COPYING, doc/ezstream-file.sh.1.in.in, doc/ezstream.1.in.in: Some licensing blah-blah and RCS IDs. 2009-08-30 18:28 moritz * [r16532] NEWS: Merge two related changes into one bullet point, and set release date to tomorrow. 2009-08-30 18:23 moritz * [r16531] src/ezstream-file.sh.in: Do not quote $EZSTREAM, which breaks paths with whitespace but allows to smuggle in default command line arguments. 2009-08-30 18:22 moritz * [r16530] doc/ezstream-file.sh.1.in.in: Tweak. 2009-08-30 12:49 moritz * [r16529] NEWS, configure.in, doc/Makefile.am, doc/ezstream-file.sh.1.in.in, doc/ezstream.1.in, doc/ezstream.1.in.in, src/Makefile.am, src/ezstream-file.sh.in: Add new wrapper/convenience script ezstream-file.sh -- generates ezstreams on- the-fly. 2009-08-29 09:37 moritz * [r16528] src/ezstream.c: Remove pointless and (at this point) irritating warning message. 2009-08-29 09:36 moritz * [r16527] NEWS, src/ezstream.c: The original reason to abort ezstream when running into problems opening a media file was to prevent a very verbose infinite loop (e.g. when accidentially playing an outdated playlist.) Bring that back by aborting after 100 subsequent errors. 2009-08-29 09:14 moritz * [r16526] NEWS, src/playlist.c: ... also fix ezstream in this regard: No need to complain when receiving such an empty line, and not receiving any output should not be a fatal error. Consider the latter to be "end-of-playlist", too. 2009-08-29 09:12 moritz * [r16525] examples/playlist-logger.sh: Listen to my own documentation: the end-of-playlist case is indicated by an empty line. But ... 2009-08-28 15:55 moritz * [r16523] NEWS, examples/Makefile.am, examples/meta.sh, examples/play.sh, examples/playlist-logger.sh: Add a more fancy playlist script. 2009-08-22 10:03 moritz * [r16497] NEWS, src/ezstream.c: #1585: Continue when openResource() fails. 2009-08-01 18:44 moritz * [r16388] configure.in, win32/config.h: Post-release version bump. 2009-08-01 16:36 moritz * [r16383] ChangeLog: Sync. 2009-08-01 16:32 moritz * [r16382] m4/taglib.m4: Fix copy+paste'o. 2009-08-01 16:15 moritz * [r16381] README: Almost everyone chooses the pkg-config(1) way and installs shout.pc. Document how to configure ezstream on differently enabled systems. ... heh, PC talk is so deliciously nasty. 2009-08-01 16:08 moritz * [r16380] m4/libshout.m4: Give it a chance to link statically. 2009-08-01 16:08 moritz * [r16379] m4/taglib.m4: Check for taglib_c in the libtag_c test. 2009-08-01 16:01 moritz * [r16378] m4/libxml2.m4: Don't use AC_RUN_IFELSE (breaks cross-compiles.) 2009-08-01 15:28 moritz * [r16377] m4/libshout.m4: Do not rely on a succesful pkg-config(1) check for libshout2, as there are still some systems where only shout-config gets installed (NetBSD for example.) 2009-08-01 15:26 moritz * [r16376] autogen.sh: Fix for non-libtool project. 2009-08-01 13:52 moritz * [r16375] autogen.sh: Update to what I use everywhere else now. 2009-08-01 13:50 moritz * [r16374] NEWS: Today is (the real) release day. 2009-08-01 13:46 moritz * [r16373] m4/ccflags.m4, m4/libshout.m4, m4/libvorbis.m4, m4/libxml2.m4, m4/taglib.m4: Update m4 macros to latest version. 2009-08-01 10:54 moritz * [r16372] win32/Makefile.am, win32/tfile.cpp: Add and redistribute tfile.cpp, which I needed to modify in order to build Taglib 1.4 on Windows. This should also satisfy the LGPL. 2009-08-01 10:51 moritz * [r16371] win32/Makefile.am: Distribute taglib project files. 2009-08-01 10:49 moritz * [r16370] win32/ezstream.sln, win32/ezstream.vcproj, win32/taglib.vcproj, win32/taglib_c.vcproj: Downgrade the Taglib project files to v1.4 -- this actually works now, so hook it up to ezstream. 2009-08-01 09:04 moritz * [r16369] win32/taglib.vcproj, win32/taglib_c.vcproj: Make these look like the other project files; maybe it helps with the linking issue (to be tested later.) 2009-07-26 10:52 moritz * [r16337] configure.in: Whitespace removal for consistency with other projects. 2009-07-22 20:19 moritz * [r16319] NEWS, doc/ezstream.1.in, examples/ezstream_mp3.xml, examples/ezstream_vorbis.xml, src/configfile.c, src/configfile.h, src/util.c: Akos Veres suggested that ezstream should be able to set the login username, and I concur. 2009-07-17 22:52 moritz * [r16296] win32/ezstream.sln: Remove taglib projects again. I failed to build a taglib that can be coerced into linking statically with ezstream. *sigh* ... hours of frustrating trial and error for nothing. Without a bright idea real soon, the next release -- whose sole purpose is to fix TagLib support on Windows -- will require tag.dll and tag_c.dll to be shipped and installed as well. 2009-07-12 22:05 moritz * [r16268] win32/taglib.vcproj, win32/taglib_c.vcproj: EOL style. 2009-07-12 22:03 moritz * [r16267] win32/ezstream.sln, win32/taglib.vcproj, win32/taglib_c.vcproj: This still doesn't work right, but commit to avoid losing work. 2009-07-12 16:40 moritz * [r16266] NEWS: Actually, no ... *grr*. 2009-07-12 16:27 moritz * [r16265] ChangeLog: Sync. 2009-07-12 16:24 moritz * [r16264] NEWS: Today is release day. 2009-06-21 14:35 moritz * [r16150] src/configfile.h: Actually, we agreed on GPLv2 only ... 2009-06-21 14:21 moritz * [r16149] NEWS, README, configure.in, m4/ccflags.m4, m4/libshout.m4, m4/libvorbis.m4, m4/libxml2.m4, m4/progname.m4, m4/taglib.m4, m4/tree.m4, m4/vacopy.m4, m4/vars.m4: Update m4 macros, allowing for more easy control over the build process among other things. Fix a silly bug in --enable-debug while there. 2009-06-21 14:08 moritz * [r16148] m4/libogg.m4: No need for this, a direct dependency check on libogg is not being done. 2009-04-21 16:51 moritz * [r15943] NEWS: Update. 2009-04-21 16:47 moritz * [r15942] win32/config.h: Build with TagLib support. (Ticket #1535) 2009-03-28 22:58 moritz * [r15888] win32/compat.h: Add missing newline at end of file. 2009-03-28 22:58 moritz * [r15887] win32/config.h: Post-release version bump here, too. 2009-03-28 22:56 moritz * [r15886] configure.in: Post-release version bump. 2009-03-28 18:47 moritz * [r15881] ChangeLog: Sync. 2009-03-28 18:33 moritz * [r15880] NEWS: If everything goes to plan, then today is release day. 2009-03-28 15:40 moritz * [r15876] win32/README.win32: vcredist is now a requirement, and mention FLAC. 2009-03-28 13:38 moritz * [r15875] examples/ezstream_reencode_mp3.xml, examples/ezstream_reencode_vorbis.xml: Remove -x argument to lame. This makes the examples work for me by default again, with a more recent lame version. 2009-03-28 11:14 moritz * [r15874] m4/vars.m4: AX_UNIQVAR_PREPEND needs to reverse its arguments before prepending. 2009-03-19 08:14 moritz * [r15799] configure.in: Autoconf/M4 chokes on CRLF line endings in configure.in/.ac, so enforce LF on configure.in. Found out the hard way by Roman Donchenko. 2009-03-18 20:24 moritz * [r15798] configure.in, src/compat.c, src/ezstream.h, src/strtonum.c, win32/compat.h, win32/config.h: Finish up the modifications to the Windows build. In case anything remains to be done, it'll be nits. 2009-03-18 20:15 moritz * [r15797] src/metadata.c: Mh... compiling before commit would've helped. 2009-03-18 19:57 moritz * [r15796] src/metadata.c: Make metadata_get_name() return UTF8, which is what the rest of ezstream now expects. From Roman Donchenko. 2009-03-18 19:55 moritz * [r15795] configure.in, src/compat.c, src/ezstream.c, src/ezstream.h, win32/ezstream.vcproj: Repair some fallout from previous commits, and work more on Win32 builds. 2009-03-18 09:10 moritz * [r15794] configure.in, src/Makefile.am, src/compat.c, src/compat.h, src/configfile.c, src/ezstream.c, src/ezstream.h, src/getopt.c, src/metadata.c, src/playlist.c, src/util.c, src/xalloc.c, src/xalloc.h, win32/compat.h: Work towards cleaner portability goo, and remove some ununsed code while there. 2009-03-17 22:25 moritz * [r15793] configure.in, win32/Makefile.am, win32/shout: Adjust auto-fu to handle the changed win32/ stuff. 2009-03-17 22:18 moritz * [r15792] win32/compat.h, win32/config.h, win32/ezstream.sln, win32/ezstream.vcproj, win32/libflac.vcproj, win32/libogg.vcproj, win32/libshout.vcproj, win32/libspeex.vcproj, win32/libtheora.vcproj, win32/libvorbis.vcproj, win32/libvorbisfile.vcproj, win32/libz.vcproj, win32/shout, win32/shout/Makefile.am, win32/shout/shout.h: After having lost the previous build environment some time ago, I had to start over completely. What a chore ... Anyways, commit this to make it easier to get back to a MSVC build, in case this happens again. 2009-03-17 18:56 moritz * [r15791] NEWS: Write complete sentences. 2009-03-17 18:32 moritz * [r15790] configure.in, doc/Makefile.am, doc/ezstream.1.in: Set the manual date to the build date. 2009-03-17 18:29 moritz * [r15789] COPYING, src/compat.h, src/configfile.c, src/ezstream.c, src/metadata.c, src/playlist.c, src/util.c: Bump copyright year where applicable. 2009-03-17 18:20 moritz * [r15788] COPYING, ChangeLog, INSTALL, Makefile.am, NEWS, README, autogen.sh, build-aux/Makefile.am, build-aux/config.rpath, compat/Makefile.am, compat/sys/Makefile.am, compat/sys/tree.3, compat/sys/tree.h, configure.in, doc/Makefile.am, doc/ezstream.1.in, examples/Makefile.am, examples/ezstream_metadata.xml, examples/ezstream_mp3.xml, examples/ezstream_reencode_mp3.xml, examples/ezstream_reencode_theora.xml, examples/ezstream_reencode_vorbis.xml, examples/ezstream_stdin_vorbis.xml, examples/ezstream_vorbis.xml, examples/meta.sh, examples/play.sh, m4/Makefile.am, m4/ccflags.m4, m4/libogg.m4, m4/libshout.m4, m4/libvorbis.m4, m4/libxml2.m4, m4/progname.m4, m4/taglib.m4, m4/tree.m4, m4/vacopy.m4, m4/vars.m4, mkcl.sh, src/Makefile.am, src/compat.c, src/compat.h, src/configfile.c, src/configfile.h, src/ezstream.c, src/getopt.c, src/metadata.c, src/metadata.h, src/playlist.c, src/playlist.h, src/strfctns.h, src/strlcat.c, src/strlcpy.c, src/strtonum.c, src/util.c, src/util.h, src/xalloc.c, src/xalloc.h, win32/Makefile.am, win32/README.win32, win32/config.h, win32/ezstream.sln, win32/ezstream.vcproj: Native EOL-style, and Id tags in a couple of places. 2009-03-17 18:07 moritz * [r15787] README: Consistent formatting. 2009-03-17 18:03 moritz * [r15786] NEWS: Mention the miscellaneous stuff I also did. 2009-03-16 22:59 moritz * [r15782] Makefile.am, NEWS, README, configure.in, m4/libvorbis.m4, m4/taglib.m4, src/metadata.c: #1398: Make optional components optional. (For real.) 2009-03-16 20:39 moritz * [r15781] src/compat.c: It's stupid to put my own copyright on a file where I didn't really write the code. Luckily, I had the proper copyright statement in there already, so moving it fixes things. 2009-03-16 20:22 moritz * [r15780] src/configfile.c, src/ezstream.c, src/metadata.c, src/playlist.c, src/util.c: Squelch another bunch of warnings after checking that what's happening is what's wanted. 2009-03-16 20:12 moritz * [r15779] configure.in, src/Makefile.am, src/compat.h, src/ezstream.c, src/getopt.c, src/getopt.h: Use a wrapper around getopt() for portability. This uses the system getopt() whenever possible, and otherwise uses a stripped down, single options only, BSD getopt() (which is smaller and doesn't come with ifdef-stuff-in-features.h.) 2009-03-16 19:51 moritz * [r15778] src/util.c: Guarantee that iconvert() never returns NULL. This is a clumsy, but effective way to prevent NULL dereferences after the recent character conversion changes in other parts of ezstream. 2009-03-16 00:40 moritz * [r15777] configure.in, m4/taglib.m4: Unbreak the TagLib checks. 2009-03-16 00:08 moritz * [r15776] Makefile.am, NEWS, README, autogen.sh, build-aux/Makefile.am, compat/Makefile.am, compat/sys/Makefile.am, configure.in, doc/Makefile.am, examples/Makefile.am, m4/Makefile.am, m4/ccflags.m4, m4/libogg.m4, m4/libshout.m4, m4/libvorbis.m4, m4/libxml2.m4, m4/progname.m4, m4/taglib.m4, m4/tree.m4, m4/vacopy.m4, m4/vars.m4, m4/xiph_compiler.m4, m4/xiph_xml2.m4, src/Makefile.am, win32/Makefile.am: Overhaul the ezstream build system, using my own library of autoconf macros. There are a few benefits to this, but the main reason is consistency and me completely understanding what's going on. Regressions are not expected, but wouldn't surprise either ... this needs lots of testing. 2009-03-15 17:18 moritz * [r15775] src/configfile.c, src/ezstream.c, src/metadata.c, src/playlist.c, src/util.c, src/util.h: Assorted type fixes, unshadowing of variables, etc. 2009-03-15 13:15 moritz * [r15774] m4/Makefile.am, m4/shout.m4: "pkg-config --libs shout" has produced correct results for a long time now, making a custom shout.m4 obsolete. 2009-03-15 13:13 moritz * [r15773] m4/iconv.m4: Remove iconv.m4, it comes with gettext (i.e. gettext-devel) packages. 2009-03-15 13:12 moritz * [r15772] m4/Makefile.am, m4/ogg.m4, m4/vorbis.m4: Remove ogg.m4 and vorbis.m4; the ones installed by libogg/-vorbis are fine. 2009-03-15 11:15 moritz * [r15771] NEWS: Update. 2009-03-15 11:05 moritz * [r15770] src/configfile.c, src/ezstream.c: Perform more charset conversions where necessary. This should fix the handling of files with non-ASCII filenames, as well as some more cases related to metadata. From Roman Donchenko , with some minor fixes by myself. 2009-03-15 11:00 moritz * [r15769] src/compat.h: Fixes for MinGW. From Roman Donchenko . 2009-03-15 10:59 moritz * [r15768] src/util.h: Add missing include for shout_t. From Roman Donchenko . 2009-03-15 10:55 moritz * [r15767] NEWS, compat/sys/tree.3, compat/sys/tree.h: Update tree macros. The manual now actually has an acceptable license. 2007-12-01 21:43 moritz * [r14260] configure.in, win32/config.h: Post-release version bump. 2007-12-01 21:21 moritz * [r14257] ChangeLog: Sync. 2007-12-01 21:13 moritz * [r14256] NEWS: It has been very quiet after 0.5.2, so get this minor bugfix release out the door today. 2007-12-01 16:02 moritz * [r14255] NEWS, src/ezstream.c: Ignore SIGPIPE, which turned out to be the cause for silent deaths of long- running ezstream processes. 2007-11-04 14:34 moritz * [r14101] configure.in, win32/config.h: Post-release version bump. 2007-11-04 13:52 moritz * [r14097] ChangeLog: Sync. 2007-11-04 13:50 moritz * [r14096] NEWS: Today is release day, finally. 2007-11-04 13:43 moritz * [r14095] NEWS: Sync. 2007-11-04 13:40 moritz * [r14094] examples/Makefile.am, examples/ezstream_reencode_mp3.xml, examples/ezstream_reencode_theora.xml, examples/ezstream_reencode_vorbis.xml, examples/ezstream_reencoding_example_mp3.xml, examples/ezstream_reencoding_example_theora.xml, examples/ezstream_reencoding_example_vorbis.xml, examples/ezstream_stdin_vorbis.xml: * Add new configuration example for streaming from standard input. * Rename reencoding examples to shorter and less redundant filenames. 2007-11-04 13:09 moritz * [r14093] examples/ezstream_reencoding_example_mp3.xml, examples/ezstream_reencoding_example_theora.xml, examples/ezstream_reencoding_example_vorbis.xml: Improve the reencoding examples; more usable defaults and add more options to create a more well-defined stream of raw samples. 2007-10-18 07:39 moritz * [r14010] NEWS: Sync. 2007-10-18 07:39 moritz * [r14009] src/ezstream.c: Improve output messages some more when dealing with standard input. 2007-10-18 06:38 moritz * [r14008] src/xalloc.c: Wow, now how did that one creep in an remain undetected for so long? 2007-10-16 14:51 moritz * [r14000] NEWS: Update. 2007-10-16 14:51 moritz * [r13999] src/ezstream.c: This needs changin' as well. 2007-10-16 14:46 moritz * [r13998] src/ezstream.c: Fix use of yet another uninitialized-if-streaming-from-stdin variable. This prevents bogus output in the "real-time" status line. 2007-10-16 14:44 moritz * [r13997] src/ezstream.c: Return a proper error message when there's no more data to read from standard input. 2007-10-16 14:28 moritz * [r13996] src/ezstream.c: Ticket #1247: Don't dereference uninitialized junk pointers; this fixes a crash when streaming standard input without also using a metadata program (d'oh.) 2007-09-16 12:50 moritz * [r13840] NEWS: Post-release tweak: Add Ticket number. 2007-09-16 12:49 moritz * [r13839] configure.in, win32/config.h: Bump version number after the 0.5.1 release. 2007-09-16 12:23 moritz * [r13835] ChangeLog: Sync. 2007-09-16 12:20 moritz * [r13834] NEWS: 0.5.1 will be released today. 2007-09-14 07:01 moritz * [r13803] NEWS: Update. 2007-09-14 07:01 moritz * [r13802] src/ezstream.c: Warn, in verbose mode, when dealing with empty playlists. 2007-09-14 07:00 moritz * [r13801] src/playlist.c: In this case, the pl->num check is superfluous. 2007-09-14 06:59 moritz * [r13800] src/playlist.c: If there are no playlist entries, dereferencing pl->list causes a segfault. Fix this by checking pl->num early. 2007-08-31 17:19 moritz * [r13678] configure.in, win32/config.h: Bump version number after the 0.5.0 release. 2007-08-31 16:22 moritz * [r13672] ChangeLog: Sync. 2007-08-31 16:02 moritz * [r13671] configure.in: -Wno-unused-parameter breaks gcc2, remove it. 2007-08-31 15:55 moritz * [r13670] configure.in: Try harder to link against TagLib. 2007-08-31 11:49 moritz * [r13669] NEWS: Today is release day. 2007-08-31 11:47 moritz * [r13668] NEWS, configure.in, src/compat.h, src/ezstream.c, src/util.c, src/util.h, win32/config.h: gettimeofday() everywhere; now ezstream behaves almost the same on Windows compared to Unix. Also mention TagLib support on Windows in NEWS. 2007-08-31 11:46 moritz * [r13667] src/compat.c: Fake the location of my basename() source to be more clear. 2007-08-31 01:59 moritz * [r13665] win32/README.win32: Having TagLib on Windows means that reading metadata from files should work like elsewhere now. While here, do some minor tweaking as well. 2007-08-31 01:48 moritz * [r13664] win32/ezstream.sln, win32/ezstream.vcproj: ezstream.exe is now using TagLib as well. 2007-08-30 18:36 moritz * [r13662] win32/README.win32: Tweak, sync with what will be the new reality soon, and include COPYING.txt in the future. 2007-08-30 12:27 moritz * [r13660] NEWS: Document a few extra nits that also happened so far. 2007-08-30 12:13 moritz * [r13659] doc/ezstream.1.in: Sync with new reality, and fix a completely botched up sentence. 2007-08-30 11:31 moritz * [r13658] src/ezstream.c, src/util.c, src/util.h: * Back out conversions to ISO8859-1. * Add 'charset=UTF-8' to the metadata update query arguments. The current release of Icecast will ignore it, and the next one will know how to handle it (karl@ is still working on it at this point, but previous diffs worked as advertised.) * If no metadata format string is available and we have both an artist and a title, use the artist/title way of updating instead of the generic "song" interface. 2007-08-26 14:31 moritz * [r13632] configure.in: When configure found libiconv, it helps to also have it use that information to properly link against it. Problem spotted and fix tested by iCER on #icecast. 2007-08-25 15:07 moritz * [r13627] doc/ezstream.1.in: Expand the "Metadata Caveats" subsection wrt codesets and actual abilities of ezstream and Icecast. 2007-08-25 14:37 moritz * [r13626] src/util.c: Need to consider converting from an unknown/unsupported codeset as well. 2007-08-25 14:16 moritz * [r13624] src/util.c: Whoops. Fix error message ... 2007-08-25 12:24 moritz * [r13622] src/ezstream.c, src/metadata.c, src/util.c, src/util.h: Get closer to what Icecast does (or will) expect wrt used codesets. I still disagree with the new ISO-8859-1 assumption for non-Ogg streams, because (for example) with ID3 tags, a codeset is simply not part of the specification and a better assumption would be that they are in the user's locale. Therefore, it would make more sense, IMO, to clearly specify that ANY metadata sent to Icecast should be UTF-8 and let the source client figure out the rest. This would also answer the question what codeset an /admin user should use if the content type of a mountpoint isn't known (although that can be figured out with an unclean read of the mountpoint's stats beforehand.) 2007-08-24 17:23 moritz * [r13616] src/util.c: Less code is always better. 2007-08-24 12:37 moritz * [r13611] README: Mention optional iconv() dependency. 2007-08-24 12:09 moritz * [r13610] NEWS: Add ticket no. to the MP3 metadata fix. 2007-08-24 11:57 moritz * [r13609] NEWS, configure.in, doc/ezstream.1.in, src/ezstream.c, src/metadata.c, src/util.c, win32/config.h, win32/ezstream.vcproj: UTF-8 support is now ready to be used. 2007-08-24 00:52 moritz * [r13607] ., Makefile.am, build-aux, build-aux/Makefile.am, build-aux/config.rpath, configure.in, m4/iconv.m4, src/util.c, src/util.h: Work in progress: Proper UTF-8 support that doesn't affect console output. No new code is actually used, yet, as there's still more work to be done. This adds the whole iconv-related build stuff and moves most auto* files into build-aux/. 2007-08-24 00:46 moritz * [r13606] src/metadata.c: Fix native ID3v1 reading (no-op, since affected fields were not used.) 2007-08-23 13:48 moritz * [r13592] src/ezstream.c: Change the MP3 special case, so working with metadata is more flexible. Turns out that there is still a problem with MP3 streams that are being reencoded. This allows me to try out more solutions. 2007-08-22 18:29 moritz * [r13589] NEWS: Consistency + typo fix. 2007-08-22 15:19 moritz * [r13587] doc/ezstream.1.in, src/ezstream.c: The -c parameter is not optional. 2007-08-22 15:15 moritz * [r13586] src/ezstream.c, src/util.c, src/util.h: Make main() smaller by moving the libshout setup into a separate function. 2007-08-14 04:10 moritz * [r13546] win32/config.h: Bump version numbers here, too. 2007-08-14 04:08 moritz * [r13545] NEWS: Sync. 2007-08-14 03:43 moritz * [r13544] doc/ezstream.1.in, src/ezstream.c, src/metadata.c, src/metadata.h: Ticket #1225, reported by matpoc at lenta dot ru: Looks like there's demand for normalizing metadata strings, which -- I assume -- is due to strange (MP3) encoders that do weird things. Well, why not. It's not too intrusive, and disabled by default. Enable string normalization with the new -n command line parameter. 2007-08-14 03:33 moritz * [r13543] configure.in: Bump to 0.5.0, new feature coming up. 2007-08-14 03:32 moritz * [r13542] src/ezstream.c, src/util.c, src/util.h: Ticket #1225, reported by matpoc at lenta dot ru: Bring back special case for streaming MP3 files without reencoding, which was lost during the many changes in 0.3.0 and subsequently forgotten. Sorry for the inconvenience, and thanks for the report. 2007-08-09 11:13 moritz * [r13494] win32/ezstream.sln, win32/ezstream.vcproj: More build tweaks. The only thing that still doesn't work by now is building a static, thread-safe libshout. Bugger all, this can wait until if/when I need threads. 2007-08-08 21:52 moritz * [r13467] src/playlist.c: Since playlist_t is using size_t, change two unsigned longs to size_t as well. 2007-08-08 21:33 moritz * [r13466] win32/config.h, win32/ezstream.sln, win32/ezstream.vcproj: More Win32 project and build cleanups. 2007-08-08 14:21 moritz * [r13464] win32/ezstream.sln, win32/ezstream.vcproj: Reorder project list and add xalloc.* to the build. 2007-08-08 14:20 moritz * [r13463] src/ezstream.c, win32/config.h: WIN32 #ifdef reduction. 2007-08-08 13:46 moritz * [r13462] configure.in: A few tweaks: * Get ISO C99 from the compiler, if possible. * Check for ssize_t for --enable-debug portability. * Add AC_C_VOLATILE check, because we use it. 2007-08-08 13:25 moritz * [r13461] win32/config.h: Damn, it looks like I forgot to update this for the Win32 builds ... 2007-08-08 13:24 moritz * [r13460] src/xalloc.c: Sync. 2007-08-08 13:15 moritz * [r13458] src/ezstream.c: Rename shutdown() to ez_shutdown() to prevent a function name clash on Windows. 2007-08-08 13:04 moritz * [r13457] src/metadata.c, src/playlist.c: Use a better \n and \r trimming idiom after fgets(). 2007-08-04 17:24 moritz * [r13443] src/xalloc.c, src/xalloc.h: It's good to know how to spell the own email address. 2007-08-04 17:10 moritz * [r13441] src/xalloc.c: Merge. 2007-08-04 17:10 moritz * [r13440] src/playlist.c: Sprinkle in some consistency ... 2007-08-04 17:04 moritz * [r13438] src/configfile.c, src/configfile.h, src/ezstream.c: Do a clean shutdown on SIGINT and SIGTERM. 2007-08-04 16:46 moritz * [r13437] src/xalloc.c, src/xalloc.h: Merge xalloc changes. 2007-08-04 16:39 moritz * [r13436] src/ezstream.c, src/metadata.c, src/playlist.c: Now that xalloc is pretty much an external entity, explicitly set freed pointers to NULL if we lateron expect them to be NULL (no longer rely on xalloc to do this for us.) 2007-08-04 16:09 moritz * [r13433] src/metadata.c: Do not xfree() something that wasn't x*alloc()'ed. 2007-08-02 18:50 moritz * [r13432] configure.in: Make PACKAGE_BUGREPORT point to the bug tracker URI. 2007-08-02 18:48 moritz * [r13431] Makefile.am, NEWS, README, compat, compat/Makefile.am, compat/sys, compat/sys/Makefile.am, compat/sys/tree.3, compat/sys/tree.h, configure.in, src/Makefile.am, src/configfile.c, src/ezstream.c, src/metadata.c, src/playlist.c, src/util.c, src/util.h, src/xalloc.c, src/xalloc.h: Switch to using the (integrated) libxalloc. 2007-07-24 15:29 moritz * [r13304] src/ezstream.c, src/metadata.c: Cosmetic changes; no functional change. Use the calloc()-style API correctly. 2007-07-24 15:13 moritz * [r13303] src/util.c: Cosmetic changes. No functional change. 2007-07-24 13:44 moritz * [r13302] configure.in: Bump version number after the 0.4.3 release. 2007-07-24 13:21 moritz * [r13298] ChangeLog: Sync. 2007-07-24 13:20 moritz * [r13297] NEWS: Another bugfix, another 0.4.x release. 2007-07-24 13:04 moritz * [r13296] src/ezstream.c: Fix the dang file descriptor leak of < 0.4.1 for good; the old fix only took care of it partially. Diagnosed with the help from someone, who wishes to stay anonymous. Thanks! 2007-07-17 15:16 moritz * [r13279] configure.in: Bump the version number after the 0.4.2 release. 2007-07-17 14:47 moritz * [r13275] ChangeLog: Sync 2007-07-17 14:45 moritz * [r13274] NEWS: Get this out the door today, no need to hold back. 2007-07-16 00:32 moritz * [r13272] NEWS, src/ezstream.c: D'oh! Make work with playlists as well. Problem description found in the Icecast mailing list archive, in a mail by Geoff Shang, via Google. Let's hope that the bug tracker prevents this kind of bug hunting in the future ... 2007-07-15 19:16 moritz * [r13270] win32/README.win32: Provide a pointer to the home page to Windows users. 2007-07-15 19:11 moritz * [r13269] configure.in: Bump version number after the 0.4.1 release. 2007-07-15 16:38 moritz * [r13265] ChangeLog: Update. 2007-07-15 16:37 moritz * [r13264] NEWS: This will be released today. 2007-07-14 01:32 moritz * [r13259] COPYING, doc/ezstream.1.in, src/compat.c, src/compat.h, src/configfile.c, src/configfile.h, src/ezstream.c, src/metadata.c, src/metadata.h, src/playlist.c, src/playlist.h, src/util.c, src/util.h: Change my email address to the new one. 2007-07-14 01:27 moritz * [r13258] NEWS: Update. 2007-07-14 01:20 moritz * [r13257] src/ezstream.c: Plug an fd leak, triggered by using -q. 2007-07-13 10:45 moritz * [r13253] README: Spelingk, and fmt -78. 2007-07-13 10:30 moritz * [r13252] doc/ezstream.1.in: Spelink. 2007-03-11 05:17 moritz * [r12724] configure.in, win32/config.h: Bump version number after the 0.4.0 release. 2007-03-11 05:04 moritz * [r12720] ChangeLog: sync 2007-03-11 04:39 moritz * [r12719] NEWS: Release coming up today. 2007-03-11 03:49 moritz * [r12718] NEWS: fixes 2007-03-11 00:28 moritz * [r12717] src/metadata.c: Make this build on Windows and not segfault the MIPSpro C compiler version <7.2. 2007-03-11 00:02 moritz * [r12716] doc/ezstream.1.in: Formatting improvements, and some minor rewording. 2007-03-10 23:36 moritz * [r12715] win32/Makefile.am: Missed a conf -> examples change here. 2007-03-10 23:28 moritz * [r12714] src/metadata.c: taglib_file_audioproperties returns const 2007-03-10 22:44 moritz * [r12713] src/metadata.c: Remove unreachable statement. 2007-03-10 21:23 moritz * [r12712] NEWS, src/metadata.c, src/playlist.c: Do not execute group-/world-writeable playlist and metadata scripts. 2007-03-10 21:18 moritz * [r12711] NEWS, src/ezstream.c, src/metadata.c, src/metadata.h: Include the total playing time of a song in the "real-time" output, if TagLib supplies it. 2007-03-10 20:13 moritz * [r12710] Makefile.am, conf, configure.in, examples, examples/Makefile.am, examples/ezstream_metadata.xml, examples/ezstream_mp3.xml, examples/ezstream_reencoding_example_mp3.xml, examples/ezstream_reencoding_example_theora.xml, examples/ezstream_reencoding_example_vorbis.xml, examples/ezstream_vorbis.xml, examples/meta.sh, examples/play.sh, win32/README.win32: Move conf/ to examples/. Add ezstream_metadata.xml and two minimalistic example scripts. 2007-03-10 19:03 moritz * [r12707] NEWS, doc/ezstream.1.in, src/configfile.c, src/configfile.h, src/ezstream.c, src/metadata.c, src/metadata.h: More metadata featuritis, add and implement support for '@a@', '@t@' and '@s@'. 2007-03-10 02:27 moritz * [r12701] src/configfile.c, src/configfile.h, src/ezstream.c, src/metadata.c, src/metadata.h: Commit work-in-progress towards more fine-grained control over metadata. This has not been checked for changes to previous behavior and isn't complete, yet. More to come. 2007-03-09 13:43 moritz * [r12698] Makefile.am, src/ezstream.c, win32/Makefile.am, win32/README.win32: Various tweakings, and sync Win32 README with new reality. 2007-03-09 02:30 moritz * [r12693] NEWS, doc/ezstream.1.in, src/configfile.c, src/configfile.h, src/ezstream.c, src/metadata.c, src/metadata.h: Add new configuration option, which specifies an external program/script to get metadata from. Also include SIGUSR2 handling that triggers metadata updates from the external program mid-stream. 2007-03-09 02:24 moritz * [r12692] src/playlist.c: Squash a bug that I introduced a few hours ago ... 2007-03-09 01:52 moritz * [r12691] Makefile.am: Commit forgotten /Makefile.am change (new regen-win32: target). 2007-03-09 01:49 moritz * [r12690] NEWS: sync 2007-03-09 01:49 moritz * [r12689] win32/Makefile.am, win32/ezstream.1.html: Kill off the ugly HTML page. Replace with a regen-win32: target in Makefile.am that automatically generates a PDF version of the current man page (PDF not included in the source tarball.) 2007-03-09 01:44 moritz * [r12688] win32/README.win32: Update with blurp about limited functionality. 2007-03-08 21:38 moritz * [r12686] src/ezstream.c, src/playlist.c: Shrink buffers to PATH_MAX. 2007-03-08 20:59 moritz * [r12685] src/ezstream.c, src/playlist.c, src/playlist.h: Fix playlist_free() as well ... 2007-03-08 20:24 moritz * [r12684] NEWS, README, configure.in, src/Makefile.am, src/metadata.c: Working TagLib support (optional.) 2007-03-08 19:46 moritz * [r12683] src/compat.h: Define SIZE_T_MAX to the real maximum of size_t. 2007-03-08 19:45 moritz * [r12682] win32/ezstream.vcproj: sync 2007-03-08 15:25 moritz * [r12681] src/ezstream.c, src/metadata.c, src/metadata.h: Hmph. I've been stepping into the copy-of-pointer trap twice now. Fix it again. 2007-03-08 14:39 moritz * [r12680] configure.in, src/Makefile.am, src/ezstream.c, src/metadata.c, src/metadata.h: Iterate towards optional TagLib support, as well as scripted metadata support. This is just the first step and equivalent to current functionality. 2007-03-08 14:36 moritz * [r12679] configure.in, win32/config.h: New features coming up, bump version to 0.4.0 2007-03-08 14:34 moritz * [r12678] NEWS: sync 2007-03-08 01:12 moritz * [r12677] src/util.c, src/util.h: Replace the very broken xfree() function with an xfree() macro - the main point was to set ptr to NULL, but the function only set the copy of ptr to NULL. Spotted by Karl Heyes, thanks a lot! 2007-03-07 23:39 moritz * [r12676] src/playlist.c: Remove redundant code since the switch to xfree(). 2007-03-07 21:01 moritz * [r12673] src/Makefile.am, src/compat.c, src/compat.h, src/configfile.c, src/ezstream.c, src/playlist.c, src/util.c, src/util.h, win32/ezstream.vcproj: More code reorganization, move compatibility and utility functions out of ezstream.c. Use a basename() function for Windows that behaves identical to a modern Unix' basename(). 2007-03-07 12:53 moritz * [r12672] src/configfile.c: cosmetics 2007-03-06 14:11 moritz * [r12666] ., conf, doc, m4, src, win32: Ignore generated files. 2007-03-06 14:02 moritz * [r12665] configure.in, win32/config.h: Bump version number after the 0.3.0 release. 2007-03-05 02:03 moritz * [r12639] ChangeLog: regen 2007-03-05 01:01 moritz * [r12637] win32/ezstream.1.html: regen 2007-03-05 00:51 moritz * [r12636] doc/ezstream.1.in: Fix a typo, and reword a few sentences to make them easier to understand. 2007-03-04 23:58 moritz * [r12635] NEWS: Add release date. This is definitely going out today... 2007-03-04 21:19 moritz * [r12634] ChangeLog: regen 2007-03-04 21:12 moritz * [r12633] README: Sync with the blurb on the new home page. 2007-03-04 15:59 moritz * [r12630] src/configfile.c: Fix logic error and prevent an endless loop on error(s) in the config file. 2007-03-04 15:50 moritz * [r12629] src/playlist.c: While rand() being crappy is true for most/all *nix systems, on Windows, this is different. The shifting severely screwed up its randomness. Just leave it away and systems that only have a bad version of rand() will have to just deal with it. 2007-03-04 15:16 moritz * [r12628] COPYING, NEWS, src/configfile.c, src/ezstream.c, win32/README.win32: More pre-release maintenance. 2007-03-04 14:29 moritz * [r12627] win32/Makefile.am, win32/README.win32, win32/config.h, win32/ezstream.1.html, win32/ezstream.sln, win32/ezstream.vcproj: Yay. I finally managed to build a statically linked and self-contained ezstream.exe. Update, and regen the HTML man page for -V. 2007-03-04 14:27 moritz * [r12626] doc/ezstream.1.in, src/ezstream.c: Add -V command line parameter to print the version number and exit. 2007-03-03 20:20 moritz * [r12621] win32/Makefile.am, win32/README.win32, win32/ezstream.1.html, win32/ezstream.sln, win32/ezstream.vcproj: More, rather evil Windows stuff. This is about as far as I'm willing to go for now. Volunteers willing to take all this Windows stuff off my hands are very welcome. ;-) 2007-03-03 20:17 moritz * [r12620] src/compat.h, src/configfile.c, src/ezstream.c, src/strtonum.c: Some more cosmetic tweaks. 2007-03-03 17:50 moritz * [r12617] src/ezstream.c: Forgot one PATH_SEPARATOR instance ... 2007-03-03 17:48 moritz * [r12616] src/ezstream.c: Use size_t in strrcmp(). 2007-03-03 16:13 moritz * [r12615] src/Makefile.am, src/compat.h, src/ezstream.c, src/playlist.c, win32/Makefile.am, win32/ezstream.dsp, win32/ezstream.dsw, win32/ezstream.iss, win32/ezstream.sln, win32/ezstream.vcproj: Iterate back towards working Windows support. 2007-03-03 12:42 moritz * [r12614] src/ezstream.c: STDERR_FILENO -> fileno(stderr), and fix a brain'o: Systems with limited or no signals support obviously don't have SIG_HUP/SIG_USR1 defined. 2007-03-02 12:52 moritz * [r12603] configure.in, src/Makefile.am, src/configfile.c, src/ezstream.c, src/strfctns.h, src/strlcat.c, src/strlcpy.c, src/strlfctns.h, src/strtonum.c: Improve string to integer conversion stuff, and have another stab at the config file parsing. Ezstream now prints each error it can find and then bails out, instead of bailing out on the first error. Tweak URL parsing as well, and do some cosmetic changes to the error messages. 2007-03-02 00:57 moritz * [r12599] NEWS, doc/ezstream.1.in, src/configfile.c, src/configfile.h, src/ezstream.c: Allow users to restrict the number of reconnection attempts. This also changes how reconnections are handled in general: A recovered connection always skips to the next tune as well, as it seems that at least for Ogg Vorbis, libshout wants to see an Ogg header after a shout_open(). The new code makes this behavior consistent among all formats. 2007-03-01 14:50 moritz * [r12597] configure.in, src/ezstream.c, src/playlist.c, src/strlcat.c, src/strlcpy.c, src/util.c: Enable more warnings on gcc, and do some miscellaneous cleanups. 2007-03-01 01:22 moritz * [r12596] src/ezstream.c: Redirect only de-/encoder screen output to /dev/null with -q, and restore standard error outside that popen() call. 2007-03-01 00:34 moritz * [r12595] m4/shout.m4: Tweak XXX comment. 2007-03-01 00:10 moritz * [r12594] README, configure.in: Make the example configuration files directory configurable. 2007-02-28 21:48 moritz * [r12592] NEWS, conf/ezstream_mp3.xml, conf/ezstream_vorbis.xml, doc/ezstream.1.in, src/configfile.c, src/configfile.h, src/ezstream.c: Add new configuration option for disabling continuous streaming. 2007-02-28 21:26 moritz * [r12591] NEWS, conf/ezstream_reencoding_example_mp3.xml, conf/ezstream_reencoding_example_vorbis.xml, doc/ezstream.1.in, src/configfile.c, src/configfile.h, src/ezstream.c, src/playlist.c, src/playlist.h: Add new playlist scripting feature (works similar to Ices 2.x.) 2007-02-28 15:35 moritz * [r12590] configure.in, src/ezstream.c: Replace geteuid() check with stat(), and make it an error if the configuration file is group or world writeable. This is actually what the warning about root was all about. 2007-02-28 13:53 moritz * [r12589] src/Makefile.am, src/ezsignals.h, src/ezstream.c: Back out hardly used ezsignals.h. 2007-02-28 12:47 moritz * [r12588] NEWS: Remove redundant paragraph. 2007-02-28 12:44 moritz * [r12587] CHANGELOG, ChangeLog, Makefile.am, NEWS, mkcl.sh: Make a more standard distribution: Rename CHANGELOG to NEWS, bring back the complete ChangeLog and add mkcl.sh that contains the options to generate ChangeLog. 2007-02-28 11:06 moritz * [r12586] CHANGELOG, ChangeLog, Makefile.am: Switch from a generated ChangeLog to a manually maintained and more compact CHANGELOG. 2007-02-28 11:03 moritz * [r12585] src/ezstream.c: Sync usageHelp() with new reality. 2007-02-27 14:44 moritz * [r12576] configure.in: Let MIPS[pro] C be chatty with warnings and check for basename() in libgen. Ezstream now builds on IRIX. 2007-02-27 14:42 moritz * [r12575] src/ezstream.c: getopt() returns int, not char. 2007-02-27 14:41 moritz * [r12574] m4/xiph_xml2.m4: Use backticks to execute xml2-config/xslt-config, which is more portable. 2007-02-27 12:46 moritz * [r12573] README: Document a caveat when building ezstream on Solaris with a different compiler than the one used to build libshout. 2007-02-26 20:29 moritz * [r12572] configure.in, m4/shout.m4: Make this work on static archs, and get one step closer to SunCC support on Solaris. Also, don't complain if libshout isn't thread-safe, as Ezstream isn't multithreaded. 2007-02-26 19:59 moritz * [r12571] Makefile.am, configure.in, m4/Makefile.am: Add m4/ to the distribution tarball. 2007-02-26 15:28 moritz * [r12570] Makefile.am, m4/ogg.m4, m4/vorbis.m4: Unbreak "make distcheck": $prefix is not a good default, use /usr/local instead. This makes it more likely that installed libogg and libvorbis are found, when the user (or autoconf) specifies a different --prefix. Users who installed their libraries in their homedir now have to set $OGG_PREFIX and $VORBIS_PREFIX, or set their respective --with arguments. Let the snapshot target use distcheck now that it works. 2007-02-26 02:56 moritz * [r12565] m4/ac_config_libconfig_in.m4, m4/acx_pthread.m4, m4/ogg.m4, m4/shout.m4, m4/vorbis.m4, m4/xiph_compiler.m4, m4/xiph_curl.m4, m4/xiph_net.m4, m4/xiph_path_python.m4, m4/xiph_types.m4, m4/xiph_xml2.m4: Remove unused .m4 files and sync the used ones with Icecast. 2007-02-25 18:28 moritz * [r12564] src/ezstream.c: Make Ezstream work properly and do the right thing, even when bombarded with a flurry of simultaneous SIGHUP and SIGUSR1 signals. From what I can tell, signal handling is now quite solid now. Achieve this by moving most of streamFile() into a new sendStream() function, which is called within a new do-while loop inside streamFile(). There, proper behavior is ensured and a race condition resolved in favor of SIGHUP. 2007-02-25 16:00 moritz * [r12563] src/ezstream.c: Switch from using signal() to sigaction() and friends, so that SA_RESTART can be used. This is required for Solaris and possibly others, where signal handlers have to be reinstalled after having caught one signal via signal(). Also prevent Ezstream from being killed by a handled signal in streamFile(), where they can interrupt fread()'s system calls. This improves matters, but isn't perfect, yet. A SIGHUP signal can still cause skipping to the next track, which should be triggered only by SIGUSR1. 2007-02-25 14:00 moritz * [r12562] Makefile.am, conf/Makefile.am, configure.in, src/Makefile.am, src/configfile.c, src/configfile.h, src/ezstream.c, win32/Makefile.am: 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. 2007-02-25 03:49 moritz * [r12557] src/ezstream.c: Merge changes to the remaining two functions, openResource() and streamFile(), after which the merge is complete. Changes in openResource(): * Let the caller know whether we're streaming from standard input, and give it a copy of the metadata information. * Make filename extension matching case insensitive. Ezstream can now stream foo.Ogg out of playlist.tXt. (On that note, another item from the parseConfig() commit log message was missing: and are also case insensitive now.) Changes in streamFile(): * New feature: Skip currently playing track when receiving SIGUSR1. * New feature: When using both the new -q and -v command line parameters, Ezstream now displays some "real-time" information: playlist position, elapsed time streaming the current track, and approximate bitrate in kbps. * Fix the fread() loop by moving the "if read bytes > 0" condition into the while statement, and check with ferror() afterwards whether an error occured. * Remove redundant shout_delay() call. Ezstream puts itself to sleep with shout_sync(). * Return a value that makes sense in main()'s do-while loop, instead of whatever shout_send() returned last. * Remove or prettify a few messages. 2007-02-25 03:10 moritz * [r12554] src/ezstream.c: Merge processMetadata() changes: * Fix how the metadata string is generated. Don't include the " - " in the output if either artist or title are missing from ID3v1/Vorbis tags. * Print the correct error message when ov_open() fails. * Improve filename-based generation of metadata. Use a copy of fileName for basename(), which may modify its argument in some places where the old, weird POSIX implementation is used. Also, basename() is not infallible, but when it fails, it is annoying for us. Assert that it cannot fail since we feed it with path names < PATH_MAX (handled in playlist.c and configfile.c.) In short, make processMetadata() always return something more or less useful as long as the file in question can be opened. 2007-02-25 02:36 moritz * [r12553] src/ezstream.c: Merge changes to replaceString() and buildCommandString(), and do the formatting nitpickery to setMetadata(). Changes in replaceString(): * Fix a heap overflow. replaceString() would happily replace multiple '@T@' and '@M@' placeholders and write into *dest until things blow up. Fix this by using safe string functions. Then completely prevent it by ensuring that it replaces only one placeholder per call (adjusting buildCommandString() accordingly) and already complaining to the user in parseConfig() about illegal, multiple placeholders in their command lines. (That parseConfig() change was missing from the commit log earlier.) In buildCommandString(): * Use xcalloc() instead of malloc() and get rid of the now redundant memset() calls. * Allow decoder command lines to contain the '@M@' metadata placeholder. Useful for combined de-/encoders like ffmpeg2theora. * Tweak message about "unsupported" format, which used to be false in the case of Ogg Theora streams. * Plug several memory leaks. * Don't print the "Executing command 'foo'" message in this function. 2007-02-25 01:14 moritz * [r12552] src/ezstream.c: Merge changes to main(), urlParse() and streamPlaylist(). In main(): * Install the signal handler as late as possible. * Add new command line options: -v (verbose, use twice for even more verbose output) and -q (quiet, redirect standard error output from external de-/ encoders to /dev/null.) * It is now an error to supply more than one -c parameter. This prevents unexpected results. * Add a stern warning when ezstream is running as root. Just Don't Do It. Leaving the configfile writeable to others by accident could mean instant root compromise. * Before handing the config file over to libxml, try to open it ourselves first. The error message from strerror() is a lot more helpful than the cryption I/O error printed by libxml. * Don't preallocate memory for urlParse(). * Fix command line error messages, they seem to be for a different program than Ezstream. * More terse libshout error messages, just print which function failed. I consider these errors of questionable value for an end user, but at least a knowledgeable one will know instantly what went wrong. * Case insensitive matching of playlist file extensions. * Print the address, port and mountpoint that Ezstream is actually trying to connect to, instead of what the user supplied. That should make it easier to spot reasons for connect failures (e.g. typos.) Changes in urlParse(): * Let urlParse() allocate memory for hostname and mountpoint, as it knows how much memory is actually required. * Fix a buffer overflow of the tmpPort buffer by adding checks and using safe string functions. * Let the caller print an error message, instead of having the same printf() twice in urlParse(). The streamPlaylist() function has been rewritten to use the new playlist_*() routines. Apart from the added playlist shuffle feature no functional change. 2007-02-25 00:35 moritz * [r12551] configure.in: Add check for geteuid(), which is better than checking for WIN32. 2007-02-25 00:25 moritz * [r12550] src/ezstream.c: Begin merging ezstream.c changes. This first batch includes: * License reference and various #include cleanups and additions that are required later. * Add new usage() and usageHelp() functions (which already contain what's to come.) Move them close to main() where getopt() is called. * New signal handler, which now no longer uses printf(). printf() is not safe to use in signal handlers. Use volatile sig_atomic_t types instead of ints as flags to set in the handler. * Formatting and const'ifying of WIN32-basename() and strrcmp(). Rearrange them so that the actual "worker functions" are grouped together. * Add function prototypes for those that are already up-to-date. * Rename ReplaceString() to replaceString() for consistency with other function names in Ezstream. * Prepare for portable *__progname usage. 2007-02-24 23:26 moritz * [r12549] src/configfile.c: Merge new parseConfig() function. There were many changes, but those are too cumbersome to merge separately. They are: * The usual formatting nitpickings. * Don't leak memory in case of duplicate entries. Instead make it an error and print a helpful error message, with config file line number, to the user. * Replace the manual cast to (const xmlChar *) with libxml2's BAD_CAST. There probably won't be any UTF8 support in Ezstream any time soon ... * Remove redundant strlen() check - xmlNodeListGetString() never returns an empty string if (cur->xmlChildrenNode != NULL). * Use xstrdup() instead of malloc() + memset() + strcpy(). * Ensure that boolean configration options are always either 1 or 0. * Ensure that path names given via do not exceed PATH_MAX. * Add configuration option for playlist shuffling. 2007-02-24 23:05 moritz * [r12548] src/configfile.c: Add function to free a configuration in case of an error. 2007-02-24 23:03 moritz * [r12547] configure.in: Fix typo in comment. 2007-02-24 22:56 moritz * [r12546] src/configfile.c: Replace three if-conditionals with one, both in getFormatEncoder() and getFormatDecoder(), with prettier formatting. 2007-02-24 22:50 moritz * [r12545] src/configfile.c, src/configfile.h: Const'ify configfile functions. 2007-02-24 22:25 moritz * [r12544] src/configfile.c, src/configfile.h: Add license reference to configfile.c, sync #includes with what will be required later, getEZConfig() formatting and remove unused printConfig() function. 2007-02-24 22:16 moritz * [r12543] src/configfile.h: Begin merging configfile.* changes by cleaning up the .h file: Add license reference, remove prototype of nonexistent getMetadataGrabber() function, and do some formatting. 2007-02-24 22:03 moritz * [r12542] win32/Makefile.am: Clean core and backup files in this directory as well. Only ~2500 lines of diffs left to merge. 2007-02-24 22:01 moritz * [r12541] src/ezsignals.h: Commit header with three macros that help with signal handling. Will be actually used later. Now, all new files are in. 2007-02-24 21:59 moritz * [r12540] configure.in: Let the configure script set a (hard-coded, for now) examples installation directory. This will be made configurable later. 2007-02-24 21:50 moritz * [r12539] configure.in: Add several checks that we need now, i.e. very soon. 2007-02-24 21:46 moritz * [r12538] configure.in: AM_CONFIG_HEADER -> AC_CONFIG_HEADERS, and move config.h into src/. 2007-02-24 21:44 moritz * [r12537] configure.in: Autoconf 2.61 has a nice macro AC_USE_SYSTEM_EXTENSIONS. Use it, depend on autoconf-2.61 for it and remove the annoying _GNU_SOURCE and _XOPEN_SOURCE ... dung. Autoconf takes care of this, and even checks for more useful stuff for us. 2007-02-24 21:37 moritz * [r12536] configure.in: Generate a Makefile in doc/, and switch to AC_CONFIG_FILES. 2007-02-24 21:34 moritz * [r12535] configure.in: Ezstream does not need libtool, so remove it. Remove other redundant configure checks as well: AC_PROG_CC and AC_HEADER_STDC are automatically checked in packages written in C, no need to do it twice. This shaves a lot off configure runtime. 2007-02-24 21:29 moritz * [r12534] configure.in: Start to incrementally merge configure.in changes by simply shuffling code around a bit. No functional change, yet. 2007-02-24 21:19 moritz * [r12533] Makefile.am: Hook up doc/ with the build, depend on automake 1.9 and remove dist-zip for now. The latter will come back after testing on Windows has been done. 2007-02-24 21:16 moritz * [r12532] autogen.sh: Replace the autogen behemoth with something much simpler. AC_PREREQ and AUTOMAKE_OPTIONS already take care of version checks. 2007-02-24 21:12 moritz * [r12531] conf/Makefile.am, conf/ezstream_mp3.xml, conf/ezstream_reencoding_example_mp3.xml, conf/ezstream_reencoding_example_theora.xml, conf/ezstream_reencoding_example_vorbis.xml, conf/ezstream_vorbis.xml: Clean up and install example configuration files. 2007-02-24 21:11 moritz * [r12530] README: Commit rewritten README file. 2007-02-24 20:59 moritz * [r12529] AUTHORS: Remove AUTHORS. Credits are in the man page. 2007-02-24 20:58 moritz * [r12528] INSTALL: Add INSTALL file for those not familiar with the configure+make dance. From autoconf-2.61. 2007-02-24 20:57 moritz * [r12527] src/Makefile.am, src/strlcat.c, src/strlcpy.c, src/strlfctns.h: Add files with safe strlc*() string functions, and hook all new files into Makefile.am. Also let "make clean" clean up coredumps and editor backup files. 2007-02-24 20:52 moritz * [r12526] doc, doc/Makefile.am, doc/ezstream.1.in: Add ezstream man page. 2007-02-24 20:50 moritz * [r12525] src/playlist.c, src/playlist.h: Add new playlist handling functions. 2007-02-24 20:49 moritz * [r12524] src/util.c, src/util.h: Add new utility functions, for memory management. These do The Right Thing and never return NULL. 2007-02-24 18:55 moritz * [r12521] configure.in: Begin to incrementally merge my changes to Ezstream by bumping the version number and shifting blame to me. This should keep most of the history in my local CVS repository. There may be temporary breakages where it doesn't build or package until I'm done. 2005-12-14 21:40 oddsock * [r10593] win32/Makefile.am: forgot to add the inno setup installer to the dist 2005-12-14 21:16 oddsock * [r10592] win32/ezstream.iss: version bump 2005-12-14 21:14 oddsock * [r10590] ChangeLog: added changelog 2005-12-14 21:13 oddsock * [r10589] conf/Makefile.am, configure.in, src/ezstream.c: added some reconnect logic fixed a buffer overflow on large id3tags use pclose for popen'd file handles 2005-01-05 00:38 oddsock * [r8612] README, conf/ezstream_m3u.xml, conf/ezstream_mp3.xml, conf/ezstream_reencoding_example.xml, conf/ezstream_reencoding_example_mp3.xml, conf/ezstream_reencoding_example_theora.xml, conf/ezstream_reencoding_example_vorbis.xml, conf/ezstream_vorbis.xml, configure.in, src/ezstream.c, win32/ezstream.dsp, win32/ezstream.dsw, win32/ezstream.iss: cleanup of config files fixed reencoding bug on win32 bump to version 0.2.0 2004-12-22 01:49 oddsock * [r8519] src/ezstream.c: add passthorough support for unknown types 2004-07-19 03:48 oddsock * [r7171] src/configfile.c, win32/ezstream.dsp, win32/ezstream.iss: some win32 compilation fixes 2004-07-19 03:12 oddsock * [r7170] README, conf/Makefile.am, conf/ezstream_reencoding_example.xml, configure.in, src/configfile.c, src/configfile.h, src/ezstream.c, win32/ezstream.dsp: Added reencoding capabilities to ezstream. 2004-07-16 04:02 oddsock * [r7152] win32/ezstream.dsp: 2004-07-12 19:13 oddsock * [r7103] src/configfile.c, src/configfile.h, src/ezstream.c: support for theora streams 2004-04-21 13:48 oddsock * [r6563] configure.in, src/.deps, src/ezstream.c: added ability to send a signal (SIGHUP) which will re-read the current playlist (m3u) that is being processed. When this happens, ezstream will pick up from the last track that was played. 2004-02-02 04:56 oddsock * [r5806] README: stdin now working :) 2004-02-02 04:39 oddsock * [r5805] aclocal.m4, configure.in: * version bump * remove unneeded file 2004-02-02 04:37 oddsock * [r5804] src/ezstream.c, win32/ezstream.dsp, win32/ezstream.iss: * set read mode to binary for stdin on win32 * add libXML to project file * bump version number 2004-01-30 17:19 oddsock * [r5800] ., AUTHORS, COPYING, Makefile.am, README, aclocal.m4, autogen.sh, conf, conf/Makefile.am, conf/ezstream_m3u.xml, conf/ezstream_mp3.xml, conf/ezstream_vorbis.xml, configure.in, m4, m4/ac_config_libconfig_in.m4, m4/acx_pthread.m4, m4/ogg.m4, m4/shout.m4, m4/vorbis.m4, m4/xiph_compiler.m4, m4/xiph_curl.m4, m4/xiph_net.m4, m4/xiph_path_python.m4, m4/xiph_types.m4, m4/xiph_xml2.m4, src, src/.deps, src/.deps/configfile.Po, src/.deps/ezstream.Po, src/Makefile.am, src/configfile.c, src/configfile.h, src/ezstream.c, src/getopt.c, src/getopt.h, win32, win32/Makefile.am, win32/ezstream.dsp, win32/ezstream.dsw, win32/ezstream.iss: Initial revision ezstream-0.5.6/COPYING0000644000175000017500000004414011246572750013525 0ustar tootstoots ezstream - source client for Icecast with external en-/decoder support Copyright (C) 2003, 2004, 2005, 2006 Ed Zaleski Copyright (C) 2007, 2009 Moritz Grimm The ezstream program, in its entirety, is licensed under the terms and conditions of the GNU General Public License (GPL) version 2. Certain source files and supplementary scripts and utilities may be available under even less restrictive terms and conditions. See the individual source files for licensing details. GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.