2005-11-30 12:40:40 -05:00
|
|
|
AC_INIT([Icecast], [2.3.1], [icecast@xiph.org])
|
2003-07-24 12:21:22 -04:00
|
|
|
|
2003-07-23 22:31:36 -04:00
|
|
|
AC_PREREQ(2.54)
|
2003-07-24 12:21:22 -04:00
|
|
|
AC_CONFIG_SRCDIR(src/main.c)
|
2003-07-20 22:23:41 -04:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2003-07-24 12:21:22 -04:00
|
|
|
AM_INIT_AUTOMAKE
|
2003-07-20 22:23:41 -04:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2003-07-24 12:21:22 -04:00
|
|
|
AM_MAINTAINER_MODE
|
2001-09-09 22:21:46 -04:00
|
|
|
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_CANONICAL_HOST
|
2004-01-29 18:23:53 -05:00
|
|
|
AC_PROG_LIBTOOL
|
2001-09-09 22:21:46 -04:00
|
|
|
|
|
|
|
dnl Set some options based on environment
|
|
|
|
|
2003-07-23 22:31:36 -04:00
|
|
|
DEBUG="-g"
|
2001-09-09 22:21:46 -04:00
|
|
|
if test -z "$GCC"; then
|
2003-07-23 22:31:36 -04:00
|
|
|
XIPH_CPPFLAGS="-D_REENTRANT"
|
2003-07-20 22:23:41 -04:00
|
|
|
case $host in
|
2001-09-09 22:21:46 -04:00
|
|
|
*-*-irix*)
|
2003-07-23 22:31:36 -04:00
|
|
|
XIPH_CPPFLAGS="$XIPH_CPPFLAGS -w -signed"
|
2001-10-21 10:19:39 -04:00
|
|
|
PROFILE="-p -g3 -O2 -signed -D_REENTRANT"
|
2003-07-20 22:23:41 -04:00
|
|
|
;;
|
2001-10-29 10:02:54 -05:00
|
|
|
*-*-solaris*)
|
2003-07-23 22:31:36 -04:00
|
|
|
XIPH_CFLAGS="-xO4 -xcg92"
|
|
|
|
XIPH_CPPFLAGS="$XIPH_CPPFLAGS -v -w -fsimple -fast"
|
|
|
|
PROFILE="-xpg -g -Dsuncc"
|
2003-07-20 22:23:41 -04:00
|
|
|
;;
|
2001-09-09 22:21:46 -04:00
|
|
|
*)
|
2003-07-23 22:31:36 -04:00
|
|
|
XIPH_CFLAGS="-O"
|
|
|
|
PROFILE="-g -p"
|
2003-07-20 22:23:41 -04:00
|
|
|
;;
|
|
|
|
esac
|
2003-07-24 01:32:37 -04:00
|
|
|
|
|
|
|
case "$host" in
|
|
|
|
*openbsd* | *irix*)
|
|
|
|
;;
|
|
|
|
*) AC_DEFINE([_XOPEN_SOURCE], 600, [Define if you have POSIX and XPG specifications])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2001-09-09 22:21:46 -04:00
|
|
|
else
|
2003-07-23 22:31:36 -04:00
|
|
|
XIPH_CPPFLAGS="-Wall -ffast-math -fsigned-char"
|
|
|
|
PROFILE="-pg -g"
|
2003-07-24 01:32:37 -04:00
|
|
|
AC_DEFINE([_GNU_SOURCE], 1, [Define to include GNU extensions to POSIX])
|
2001-09-09 22:21:46 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
|
|
|
|
dnl Checks for libraries.
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
|
2003-07-24 01:32:37 -04:00
|
|
|
AC_CHECK_HEADERS([alloca.h])
|
2003-07-24 12:21:22 -04:00
|
|
|
AC_CHECK_HEADERS(pwd.h, AC_DEFINE(CHUID, 1, [Define if you have pwd.h]),,)
|
|
|
|
AC_CHECK_HEADERS(unistd.h, AC_DEFINE(CHROOT, 1, [Define if you have unistd.h]),,)
|
2001-10-20 17:28:09 -04:00
|
|
|
|
2001-09-09 22:21:46 -04:00
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
|
|
|
|
dnl Check for types
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
2004-03-08 21:36:01 -05:00
|
|
|
AC_CHECK_FUNCS(localtime_r poll)
|
|
|
|
AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1,
|
|
|
|
[Define if you have nanosleep]))
|
2003-07-20 22:23:41 -04:00
|
|
|
XIPH_NET
|
2001-09-09 22:21:46 -04:00
|
|
|
|
|
|
|
dnl -- configure options --
|
|
|
|
|
2003-07-20 22:23:41 -04:00
|
|
|
XIPH_PATH_XSLT
|
|
|
|
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$XSLT_CFLAGS])
|
|
|
|
XIPH_VAR_PREPEND([XIPH_LIBS],[$XSLT_LIBS])
|
2002-08-11 08:15:40 -04:00
|
|
|
|
2004-12-07 16:06:26 -05:00
|
|
|
XIPH_PATH_VORBIS([
|
|
|
|
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$VORBIS_CFLAGS])
|
|
|
|
XIPH_VAR_PREPEND([XIPH_LIBS],[$VORBIS_LIBS])
|
|
|
|
XIPH_VAR_APPEND([XIPH_LDFLAGS],[$VORBIS_LDFLAGS])
|
|
|
|
ICECAST_OPTIONAL="$ICECAST_OPTIONAL format_vorbis.o"
|
|
|
|
],
|
|
|
|
[AC_MSG_ERROR([must have Ogg Vorbis v1.0 or above installed])
|
|
|
|
])
|
|
|
|
|
|
|
|
XIPH_PATH_THEORA([
|
|
|
|
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$THEORA_CFLAGS])
|
|
|
|
XIPH_VAR_APPEND([XIPH_LDFLAGS],[$THEORA_LDFLAGS])
|
|
|
|
XIPH_VAR_PREPEND([XIPH_LIBS],[$THEORA_LIBS])
|
|
|
|
ICECAST_OPTIONAL="$ICECAST_OPTIONAL format_theora.o"
|
|
|
|
],
|
|
|
|
[ AC_MSG_WARN([Theora disabled!])
|
|
|
|
])
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2005-05-07 07:01:35 -04:00
|
|
|
XIPH_PATH_SPEEX(
|
|
|
|
[ XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$SPEEX_CFLAGS])
|
|
|
|
XIPH_VAR_PREPEND([XIPH_LIBS],[$SPEEX_LIBS])
|
|
|
|
XIPH_VAR_APPEND([XIPH_LDFLAGS],[$SPEEX_LDFLAGS])
|
|
|
|
ICECAST_OPTIONAL="$ICECAST_OPTIONAL format_speex.o"
|
|
|
|
],
|
|
|
|
[ AC_MSG_WARN([Speex support disabled!])
|
|
|
|
])
|
|
|
|
|
2003-05-28 11:04:53 -04:00
|
|
|
ACX_PTHREAD(, AC_MSG_ERROR([POSIX threads missing]))
|
2003-07-20 22:23:41 -04:00
|
|
|
XIPH_VAR_APPEND([XIPH_CFLAGS],[$PTHREAD_CFLAGS])
|
|
|
|
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$PTHREAD_CPPFLAGS])
|
|
|
|
XIPH_VAR_PREPEND([XIPH_LIBS],[$PTHREAD_LIBS])
|
2003-05-28 11:04:53 -04:00
|
|
|
|
2003-07-20 22:23:41 -04:00
|
|
|
XIPH_PATH_CURL([
|
2003-07-23 22:31:36 -04:00
|
|
|
AC_CHECK_DECL([CURLOPT_NOSIGNAL],
|
2005-08-07 19:29:12 -04:00
|
|
|
[ AC_DEFINE([HAVE_AUTH_URL], 1, [Define to compile in auth URL support code])
|
|
|
|
ICECAST_OPTIONAL="$ICECAST_OPTIONAL auth_url.o"
|
|
|
|
enable_curl="yes"
|
2003-07-23 22:31:36 -04:00
|
|
|
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$CURL_CFLAGS])
|
|
|
|
XIPH_VAR_PREPEND([XIPH_LIBS],[$CURL_LIBS])
|
2005-08-17 12:38:46 -04:00
|
|
|
], [ AC_MSG_NOTICE([Your curl dev files are too old (7.10 or above required)])
|
2003-07-23 22:31:36 -04:00
|
|
|
], [#include <curl/curl.h>
|
|
|
|
])
|
2005-08-07 19:29:12 -04:00
|
|
|
],[ AC_MSG_NOTICE([libcurl not found])
|
2003-07-23 22:31:36 -04:00
|
|
|
])
|
2005-08-07 19:29:12 -04:00
|
|
|
dnl -- YP support --
|
|
|
|
AC_ARG_ENABLE([yp],
|
|
|
|
AC_HELP_STRING([--disable-yp],[disable YP directory support]),
|
|
|
|
enable_yp="$enableval",
|
|
|
|
enable_yp="yes")
|
|
|
|
if test "x$enable_yp" = "xyes" -a "x$enable_curl" = xyes
|
|
|
|
then
|
|
|
|
AC_DEFINE([USE_YP], 1, [Define to compile in YP support code])
|
|
|
|
ICECAST_OPTIONAL="$ICECAST_OPTIONAL yp.o"
|
2003-07-23 22:31:36 -04:00
|
|
|
else
|
|
|
|
AC_MSG_NOTICE([YP support disabled])
|
2003-05-28 11:04:53 -04:00
|
|
|
fi
|
2001-09-09 22:21:46 -04:00
|
|
|
|
|
|
|
dnl Make substitutions
|
|
|
|
|
2003-07-20 22:23:41 -04:00
|
|
|
AC_SUBST(XIPH_CPPFLAGS)
|
|
|
|
AC_SUBST(XIPH_CFLAGS)
|
|
|
|
AC_SUBST(XIPH_LIBS)
|
2004-12-07 16:06:26 -05:00
|
|
|
AC_SUBST(XIPH_LDFLAGS)
|
2003-07-20 22:23:41 -04:00
|
|
|
AC_SUBST(PTHREAD_CPPFLAGS)
|
|
|
|
AC_SUBST(PTHREAD_CFLAGS)
|
|
|
|
AC_SUBST(PTHREAD_LIBS)
|
2001-09-09 22:21:46 -04:00
|
|
|
AC_SUBST(LIBTOOL_DEPS)
|
|
|
|
AC_SUBST(LIBS)
|
|
|
|
AC_SUBST(DEBUG)
|
|
|
|
AC_SUBST(CFLAGS)
|
|
|
|
AC_SUBST(PROFILE)
|
2003-07-20 22:23:41 -04:00
|
|
|
AC_SUBST(ICECAST_OPTIONAL)
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2003-08-04 04:42:13 -04:00
|
|
|
AC_OUTPUT([Makefile conf/Makefile debian/Makefile src/Makefile src/avl/Makefile
|
2003-07-23 22:31:36 -04:00
|
|
|
src/httpp/Makefile src/thread/Makefile src/log/Makefile
|
|
|
|
src/net/Makefile src/timing/Makefile doc/Makefile web/Makefile
|
2005-09-23 17:31:52 -04:00
|
|
|
admin/Makefile win32/Makefile win32/res/Makefile examples/Makefile])
|