2014-12-28 06:08:56 -05:00
|
|
|
AC_INIT([Icecast], [2.4.99.1], [icecast@xiph.org])
|
2003-07-24 12:21:22 -04:00
|
|
|
|
2015-11-28 07:22:05 -05:00
|
|
|
AC_PREREQ([2.54])
|
|
|
|
AC_CONFIG_SRCDIR([src/main.c])
|
2015-11-28 07:43:00 -05:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
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
|
2015-11-28 07:22:05 -05: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
|
2007-09-12 21:59:33 -04:00
|
|
|
AC_SYS_LARGEFILE
|
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"
|
2007-10-03 15:50:10 -04:00
|
|
|
PROFILE="-g -p"
|
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
|
2008-04-18 22:04:17 -04:00
|
|
|
AC_HEADER_TIME
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2009-01-08 22:51:58 -05:00
|
|
|
AC_CHECK_HEADERS([alloca.h sys/timeb.h])
|
2012-10-10 20:26:38 -04:00
|
|
|
AC_CHECK_HEADERS([pwd.h unistd.h grp.h sys/types.h],,,AC_INCLUDES_DEFAULT)
|
|
|
|
AC_CHECK_FUNCS([setuid])
|
|
|
|
AC_CHECK_FUNCS([chroot])
|
|
|
|
AC_CHECK_FUNCS([chown])
|
2014-01-12 07:29:27 -05:00
|
|
|
AC_CHECK_FUNCS([strcasestr])
|
2014-11-20 13:41:42 -05:00
|
|
|
AC_CHECK_FUNCS([gethostname])
|
|
|
|
AC_CHECK_FUNCS([uname])
|
2014-11-21 04:28:29 -05:00
|
|
|
AC_CHECK_FUNCS([setenv])
|
2014-11-29 05:34:07 -05:00
|
|
|
AC_CHECK_FUNCS([setresuid])
|
|
|
|
AC_CHECK_FUNCS([setresgid])
|
2001-10-20 17:28:09 -04:00
|
|
|
|
2001-09-09 22:21:46 -04:00
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
2008-04-18 22:04:17 -04:00
|
|
|
XIPH_C__FUNC__
|
2001-09-09 22:21:46 -04:00
|
|
|
|
|
|
|
dnl Check for types
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
2015-11-28 07:22:05 -05:00
|
|
|
AC_CHECK_FUNCS([localtime_r poll gettimeofday ftime])
|
|
|
|
|
|
|
|
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!])
|
|
|
|
])
|
|
|
|
|
2008-04-18 22:11:37 -04:00
|
|
|
AC_CHECK_LIB(kate, kate_decode_init,[have_kate=yes],[have_kate=no], -logg)
|
|
|
|
if test "x$have_kate" == "xyes"
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB(oggkate, kate_ogg_decode_headerin,[have_kate=yes],[have_kate=no],-lkate -logg)
|
|
|
|
if test "x$have_kate" == "xyes"
|
|
|
|
then
|
|
|
|
KATE_LIBS="-loggkate -lkate -logg"
|
|
|
|
AC_DEFINE([HAVE_KATE],[1],[Define if you have libkate])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
dnl we still use format_kate as it doesn't need libkate to work
|
|
|
|
#ICECAST_OPTIONAL="$ICECAST_OPTIONAL format_kate.o"
|
|
|
|
|
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])
|
2008-05-02 19:18:52 -04:00
|
|
|
AC_CHECK_FUNCS([curl_global_init])
|
2016-06-07 07:26:03 -04:00
|
|
|
ICECAST_OPTIONAL="$ICECAST_OPTIONAL auth_url.o event_url.o curl.o"
|
2005-08-07 19:29:12 -04:00
|
|
|
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
|
2007-08-28 23:51:22 -04:00
|
|
|
XIPH_PATH_OPENSSL([
|
|
|
|
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$OPENSSL_CFLAGS])
|
|
|
|
XIPH_VAR_APPEND([XIPH_LDFLAGS],[$OPENSSL_LDFLAGS])
|
|
|
|
XIPH_VAR_PREPEND([XIPH_LIBS],[$OPENSSL_LIBS])
|
|
|
|
],
|
|
|
|
[ AC_MSG_NOTICE([SSL disabled!])
|
|
|
|
])
|
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)
|
2008-04-18 22:11:37 -04:00
|
|
|
AC_SUBST(HAVE_KATE)
|
|
|
|
AC_SUBST(KATE_LIBS)
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2014-12-02 16:50:57 -05:00
|
|
|
AC_OUTPUT([Makefile conf/Makefile src/Makefile src/common/avl/Makefile
|
|
|
|
src/common/httpp/Makefile src/common/thread/Makefile src/common/log/Makefile
|
|
|
|
src/common/net/Makefile src/common/timing/Makefile doc/Makefile doc/img/Makefile
|
2016-06-07 07:30:46 -04:00
|
|
|
doc/assets/Makefile doc/assets/css/Makefile doc/assets/font/Makefile
|
2014-12-29 10:32:52 -05:00
|
|
|
doc/assets/img/Makefile web/Makefile web/assets/Makefile web/assets/css/Makefile
|
2016-06-07 07:30:46 -04:00
|
|
|
web/assets/font/Makefile admin/Makefile admin/includes/Makefile win32/Makefile
|
2015-02-15 04:09:09 -05:00
|
|
|
examples/Makefile])
|