mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2024-11-03 04:17:18 -05:00
539bb39322
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. git-svn-id: https://svn.xiph.org/trunk/ezstream@12603 0101bb08-14d6-0310-b084-bc0e0c8e3800
124 lines
3.0 KiB
Plaintext
124 lines
3.0 KiB
Plaintext
dnl INITIALIZATION
|
|
|
|
AC_INIT([ezstream], [0.3.0], [grmo@users.sourceforge.net])
|
|
AC_PREREQ(2.61)
|
|
AC_CONFIG_SRCDIR(src/ezstream.c)
|
|
AM_INIT_AUTOMAKE
|
|
AC_CONFIG_HEADERS(src/config.h)
|
|
AC_CONFIG_LIBOBJ_DIR(src)
|
|
AM_MAINTAINER_MODE
|
|
AC_USE_SYSTEM_EXTENSIONS
|
|
|
|
|
|
dnl SETUP
|
|
|
|
EXAMPLES_DIR="\$(datadir)/examples/${PACKAGE_TARNAME}"
|
|
AC_ARG_ENABLE(examplesdir,
|
|
AS_HELP_STRING([--enable-examplesdir=DIR],
|
|
[example configuration files installation directory (default: DATADIR/examples/ezstream)]),
|
|
[case "$enableval" in
|
|
yes) ;;
|
|
no) AC_MSG_ERROR([Must have an example configuration files install dir.]) ;;
|
|
*) EXAMPLES_DIR="$enableval" ;;
|
|
esac], [])
|
|
AC_SUBST(EXAMPLES_DIR)
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
if test -z "$GCC"; then
|
|
case $host in
|
|
*-irix*)
|
|
XIPH_CPPFLAGS="-fullwarn"
|
|
;;
|
|
*-solaris*)
|
|
XIPH_CPPFLAGS="-v"
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
else
|
|
XIPH_CPPFLAGS="-Wall -Wwrite-strings -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
|
|
fi
|
|
|
|
|
|
dnl MISC SYSTEM CHARACTERISTICS
|
|
|
|
dnl __progname check adapted from OpenNTPd-portable's configure.ac
|
|
AC_MSG_CHECKING([whether libc defines __progname])
|
|
AC_LINK_IFELSE(
|
|
[AC_LANG_PROGRAM([[#include <stdio.h>]],
|
|
[[extern char *__progname; printf("%s\n", __progname); ]])],
|
|
[ac_cv_libc_defines___progname="yes"],
|
|
[ac_cv_libc_defines___progname="no"]
|
|
)
|
|
if test x"$ac_cv_libc_defines___progname" = "xyes"; then
|
|
AC_MSG_RESULT([yes])
|
|
AC_DEFINE(HAVE___PROGNAME, 1, [Define whether libc defines __progname])
|
|
else
|
|
AC_MSG_RESULT([no])
|
|
fi
|
|
|
|
AC_C_CONST
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
dnl USEFUL HEADERS
|
|
|
|
AC_CHECK_HEADERS(sys/time.h paths.h signal.h)
|
|
|
|
|
|
dnl LIBRARY FUNCTIONS
|
|
|
|
AC_CHECK_LIB(gen, basename)
|
|
AC_CHECK_FUNCS(arc4random gettimeofday random srandomdev stat)
|
|
AC_REPLACE_FUNCS(getopt strlcat strlcpy strtonum)
|
|
if test x"$ac_cv_header_signal_h" = "xyes"; then
|
|
AC_CHECK_FUNCS([sigaction], [
|
|
AC_DEFINE(HAVE_SIGNALS, 1, [Define whether we have BSD signals])
|
|
], [], [#include <signal.h>])
|
|
fi
|
|
|
|
|
|
dnl CONFIGURE OPTIONS
|
|
|
|
dnl Check for Ogg Vorbis
|
|
XIPH_PATH_OGG(, AC_MSG_ERROR([Must have libogg 1.x installed.]))
|
|
XIPH_PATH_VORBIS(, AC_MSG_ERROR([Must have libvorbis 1.x installed.]))
|
|
|
|
dnl Check for libshout.
|
|
XIPH_PATH_SHOUT(, AC_MSG_ERROR([Must have libshout 2.x installed.]))
|
|
|
|
dnl Check for libxml
|
|
XIPH_PATH_XML(, AC_MSG_ERROR([Must have libxml 2.x installed.]))
|
|
|
|
dnl Assemble *FLAGS and *LIBS in the proper order.
|
|
XIPH_VAR_APPEND([XIPH_CFLAGS], [$OGG_CFLAGS])
|
|
XIPH_VAR_PREPEND([XIPH_LIBS], [$OGG_LIBS])
|
|
XIPH_VAR_APPEND([XIPH_CFLAGS], [$VORBIS_CFLAGS])
|
|
XIPH_VAR_PREPEND([XIPH_LIBS], [$VORBIS_LIBS])
|
|
XIPH_VAR_APPEND([XIPH_CFLAGS], [$VORBISFILE_CFLAGS])
|
|
XIPH_VAR_PREPEND([XIPH_LIBS], [$VORBISFILE_LIBS])
|
|
XIPH_VAR_APPEND([XIPH_CFLAGS], [$SHOUT_CFLAGS])
|
|
XIPH_VAR_APPEND([XIPH_CPPFLAGS], [$SHOUT_CPPFLAGS])
|
|
XIPH_VAR_PREPEND([XIPH_LIBS], [$SHOUT_LIBS])
|
|
XIPH_VAR_APPEND([XIPH_CFLAGS], [$XML_CFLAGS])
|
|
XIPH_VAR_PREPEND([XIPH_LIBS], [$XML_LIBS])
|
|
|
|
|
|
dnl OUTPUT
|
|
|
|
AC_CONFIG_FILES(Makefile \
|
|
conf/Makefile \
|
|
doc/Makefile \
|
|
m4/Makefile \
|
|
src/Makefile \
|
|
win32/Makefile)
|
|
|
|
AC_SUBST(XIPH_CPPFLAGS)
|
|
AC_SUBST(XIPH_CFLAGS)
|
|
AC_SUBST(XIPH_LIBS)
|
|
AC_SUBST(LIBS)
|
|
AC_SUBST(CFLAGS)
|
|
|
|
AC_OUTPUT
|