2007-02-24 16:29:27 -05:00
|
|
|
dnl INITIALIZATION
|
2004-01-30 12:19:45 -05:00
|
|
|
|
2007-02-24 16:29:27 -05:00
|
|
|
AC_INIT([ezstream], [0.3.0], [grmo@users.sourceforge.net])
|
2007-02-24 16:44:35 -05:00
|
|
|
AC_PREREQ(2.61)
|
2004-01-30 12:19:45 -05:00
|
|
|
AC_CONFIG_SRCDIR(src/ezstream.c)
|
|
|
|
AM_INIT_AUTOMAKE
|
2007-02-24 16:46:05 -05:00
|
|
|
AC_CONFIG_HEADERS(src/config.h)
|
2007-02-24 16:50:54 -05:00
|
|
|
AC_CONFIG_LIBOBJ_DIR(src)
|
2004-01-30 12:19:45 -05:00
|
|
|
AM_MAINTAINER_MODE
|
2007-02-24 16:44:35 -05:00
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2004-01-30 12:19:45 -05:00
|
|
|
|
2007-02-24 16:29:27 -05:00
|
|
|
|
|
|
|
dnl SETUP
|
|
|
|
|
2007-02-24 18:03:51 -05:00
|
|
|
dnl XXX This should be made configurable.
|
2007-02-24 16:59:07 -05:00
|
|
|
EXAMPLES_DIR="\$(datadir)/examples/${PACKAGE}"
|
|
|
|
AC_SUBST(EXAMPLES_DIR)
|
|
|
|
|
2004-01-30 12:19:45 -05:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
|
|
|
if test -z "$GCC"; then
|
Various cleanups and auto-fu tweaks.
* Make Makefile.am files look alike as much as possible.
* Remove debug: target and don't mess with the users DEBUG environment
variable: Autoconf checks for -g and automatically adds it to CFLAGS, which
is overridden by the user's $DEBUG. If the user didn't specify one, "make
install" will strip the resulting binaries and leave the debugging symbols
intact otherwise.
* Remove profile: target, as it is quite pointless in Ezstream. Also, the user
can add profiling flags via the $DEBUG variable as well.
* Remove -ffast-math and -fsigned-char from gcc, and enable two additional
warnings instead.
* Unconfuse Solaris compiler flags (unfortunately, the configure script still
fails in the libshout check with some obscure linker error): Do not force
-x04 and -fast optimizations, let the user decide (it doesn't matter for
Ezstream anyways.) Remove -xgc92, which is deprecated and actually makes
the resulting binary run slower on SPARC. Also remove -fsimple, which does
not help and has the potential of causing trouble, and don't enable verbose
warnings just to disable them afterwards with -w. Leave only -v for verbose
warnings.
* Const'ify getFormat*() functions and blankString, and squelch a few const-
related warnings.
* Squelch a signedness warning and fix two ;; syntax errors.
* Add a snapshot target to Makefile.am that creates a tarball of the form
ezstream-snapshot-YYYYMMDD.tar.gz.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12562 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-25 09:00:15 -05:00
|
|
|
case $host in
|
|
|
|
*-irix*)
|
|
|
|
XIPH_CPPFLAGS="-w -signed"
|
|
|
|
;;
|
|
|
|
*-solaris*)
|
|
|
|
XIPH_CPPFLAGS="-v"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
2004-01-30 12:19:45 -05:00
|
|
|
else
|
Various cleanups and auto-fu tweaks.
* Make Makefile.am files look alike as much as possible.
* Remove debug: target and don't mess with the users DEBUG environment
variable: Autoconf checks for -g and automatically adds it to CFLAGS, which
is overridden by the user's $DEBUG. If the user didn't specify one, "make
install" will strip the resulting binaries and leave the debugging symbols
intact otherwise.
* Remove profile: target, as it is quite pointless in Ezstream. Also, the user
can add profiling flags via the $DEBUG variable as well.
* Remove -ffast-math and -fsigned-char from gcc, and enable two additional
warnings instead.
* Unconfuse Solaris compiler flags (unfortunately, the configure script still
fails in the libshout check with some obscure linker error): Do not force
-x04 and -fast optimizations, let the user decide (it doesn't matter for
Ezstream anyways.) Remove -xgc92, which is deprecated and actually makes
the resulting binary run slower on SPARC. Also remove -fsimple, which does
not help and has the potential of causing trouble, and don't enable verbose
warnings just to disable them afterwards with -w. Leave only -v for verbose
warnings.
* Const'ify getFormat*() functions and blankString, and squelch a few const-
related warnings.
* Squelch a signedness warning and fix two ;; syntax errors.
* Add a snapshot target to Makefile.am that creates a tarball of the form
ezstream-snapshot-YYYYMMDD.tar.gz.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12562 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-25 09:00:15 -05:00
|
|
|
XIPH_CPPFLAGS="-Wall -Wwrite-strings -Wpointer-arith"
|
2004-01-30 12:19:45 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2007-02-24 16:50:54 -05:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2007-02-24 16:29:27 -05:00
|
|
|
dnl USEFUL HEADERS
|
2004-01-30 12:19:45 -05:00
|
|
|
|
2007-02-24 16:50:54 -05:00
|
|
|
AC_CHECK_HEADERS(sys/time.h paths.h signal.h)
|
|
|
|
|
|
|
|
|
|
|
|
dnl LIBRARY FUNCTIONS
|
|
|
|
|
2007-02-24 19:35:48 -05:00
|
|
|
AC_CHECK_FUNCS(arc4random geteuid gettimeofday random srandomdev)
|
2007-02-24 16:50:54 -05:00
|
|
|
AC_REPLACE_FUNCS(getopt strlcat strlcpy)
|
|
|
|
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
|
|
|
|
|
2004-01-30 12:19:45 -05:00
|
|
|
|
2007-02-24 16:29:27 -05:00
|
|
|
dnl CONFIGURE OPTIONS
|
2004-01-30 12:19:45 -05:00
|
|
|
|
|
|
|
XIPH_PATH_SHOUT(, AC_MSG_ERROR([must have libshout installed!]))
|
Various cleanups and auto-fu tweaks.
* Make Makefile.am files look alike as much as possible.
* Remove debug: target and don't mess with the users DEBUG environment
variable: Autoconf checks for -g and automatically adds it to CFLAGS, which
is overridden by the user's $DEBUG. If the user didn't specify one, "make
install" will strip the resulting binaries and leave the debugging symbols
intact otherwise.
* Remove profile: target, as it is quite pointless in Ezstream. Also, the user
can add profiling flags via the $DEBUG variable as well.
* Remove -ffast-math and -fsigned-char from gcc, and enable two additional
warnings instead.
* Unconfuse Solaris compiler flags (unfortunately, the configure script still
fails in the libshout check with some obscure linker error): Do not force
-x04 and -fast optimizations, let the user decide (it doesn't matter for
Ezstream anyways.) Remove -xgc92, which is deprecated and actually makes
the resulting binary run slower on SPARC. Also remove -fsimple, which does
not help and has the potential of causing trouble, and don't enable verbose
warnings just to disable them afterwards with -w. Leave only -v for verbose
warnings.
* Const'ify getFormat*() functions and blankString, and squelch a few const-
related warnings.
* Squelch a signedness warning and fix two ;; syntax errors.
* Add a snapshot target to Makefile.am that creates a tarball of the form
ezstream-snapshot-YYYYMMDD.tar.gz.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12562 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-25 09:00:15 -05:00
|
|
|
if test "$SHOUT_THREADSAFE" != "yes"; then
|
|
|
|
AC_MSG_ERROR([This libshout isn't threadsafe])
|
2004-01-30 12:19:45 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
XIPH_PATH_XML
|
|
|
|
|
|
|
|
XIPH_VAR_APPEND([XIPH_CFLAGS], [$XML_CFLAGS])
|
|
|
|
XIPH_VAR_PREPEND([XIPH_LIBS], [$XML_LIBS])
|
|
|
|
|
|
|
|
XIPH_VAR_APPEND([XIPH_CPPFLAGS], [$SHOUT_CPPFLAGS])
|
|
|
|
XIPH_VAR_APPEND([XIPH_CFLAGS], [$SHOUT_CFLAGS])
|
|
|
|
XIPH_VAR_PREPEND([XIPH_LIBS], [$SHOUT_LIBS])
|
|
|
|
|
|
|
|
XIPH_PATH_VORBIS(, AC_MSG_ERROR([must have Ogg Vorbis v1.0 installed!]))
|
2004-07-18 23:12:31 -04:00
|
|
|
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$VORBIS_CFLAGS $VORBISFILE_CFLAGS])
|
|
|
|
XIPH_VAR_PREPEND([XIPH_LIBS],[$VORBIS_LIBS $VORBISFILE_LIBS])
|
2004-01-30 12:19:45 -05:00
|
|
|
|
2007-02-24 16:29:27 -05:00
|
|
|
|
|
|
|
dnl OUTPUT
|
2004-01-30 12:19:45 -05:00
|
|
|
|
2007-02-24 16:37:06 -05:00
|
|
|
AC_CONFIG_FILES(Makefile \
|
|
|
|
conf/Makefile \
|
|
|
|
doc/Makefile \
|
2007-02-26 14:59:19 -05:00
|
|
|
m4/Makefile \
|
2007-02-24 16:37:06 -05:00
|
|
|
src/Makefile \
|
|
|
|
win32/Makefile)
|
|
|
|
|
2004-01-30 12:19:45 -05:00
|
|
|
AC_SUBST(XIPH_CPPFLAGS)
|
|
|
|
AC_SUBST(XIPH_CFLAGS)
|
|
|
|
AC_SUBST(XIPH_LIBS)
|
|
|
|
AC_SUBST(LIBS)
|
|
|
|
AC_SUBST(CFLAGS)
|
|
|
|
|
2007-02-24 16:37:06 -05:00
|
|
|
AC_OUTPUT
|