Commit 194aa161 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Merge branch 'autotools-cleanup'

parents f89e85c7 e0c227d4
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign dist-zip
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src conf doc web admin win32 examples tests SUBDIRS = src conf doc web admin win32 examples tests
EXTRA_DIST = README.md HACKING m4/acx_pthread.m4 m4/ogg.m4 \ EXTRA_DIST = README.md HACKING
m4/theora.m4 m4/vorbis.m4 m4/speex.m4 \
m4/xiph_compiler.m4 m4/xiph_curl.m4 m4/xiph_net.m4 \
m4/xiph_types.m4 m4/xiph_xml2.m4
docdir = $(datadir)/doc/$(PACKAGE) docdir = $(datadir)/doc/$(PACKAGE)
doc_DATA = README.md AUTHORS COPYING NEWS ChangeLog doc_DATA = README.md AUTHORS COPYING NEWS ChangeLog
debug:
$(MAKE) all CFLAGS="@DEBUG@"
profile:
$(MAKE) all CFLAGS="@PROFILE@"
static: static:
$(MAKE) all LDFLAGS="${LDFLAGS} -all-static" $(MAKE) all LDFLAGS="${LDFLAGS} -all-static"
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign
SUBDIRS = includes
admindir = $(pkgdatadir)/admin admindir = $(pkgdatadir)/admin
dist_admin_DATA = listclients.xsl listmounts.xsl moveclients.xsl response.xsl \ nobase_dist_admin_DATA = listclients.xsl listmounts.xsl moveclients.xsl response.xsl \
stats.xsl manageauth.xsl updatemetadata.xsl xspf.xsl vclt.xsl stats.xsl manageauth.xsl updatemetadata.xsl xspf.xsl vclt.xsl includes/footer.xsl \
includes/head.xsl includes/header.xsl includes/page.xsl includes/mountnav.xsl
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign
admindir = $(pkgdatadir)/admin
otheradmindir = $(admindir)/includes
otheradmin_DATA = footer.xsl head.xsl header.xsl page.xsl mountnav.xsl
EXTRA_DIST = $(otheradmin_DATA)
## Process this with automake to create Makefile.in ## Process this with automake to create Makefile.in
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = icecast.xml.in icecast_minimal.xml.in icecast_shoutcast_compat.xml.in icecast_urlauth.xml.in EXTRA_DIST = icecast.xml.in icecast_minimal.xml.in icecast_shoutcast_compat.xml.in icecast_urlauth.xml.in
DISTCLEANFILES = icecast.xml.dist icecast_minimal.xml.dist icecast_shoutcast_compat.xml.dist icecast_urlauth.xml.dist DISTCLEANFILES = icecast.xml.dist icecast_minimal.xml.dist icecast_shoutcast_compat.xml.dist icecast_urlauth.xml.dist
......
AC_INIT([Icecast], [2.4.99.2], [icecast@xiph.org]) AC_INIT([Icecast], [2.4.99.2], [icecast@xiph.org])
AC_PREREQ([2.54]) AC_PREREQ([2.54])
AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_REQUIRE_AUX_FILE([tap-driver.sh]) AC_CONFIG_AUX_DIR([build-aux])
dnl Process this file with autoconf to produce a configure script.
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE
AC_PROG_CC AC_PROG_CC
AC_PROG_AWK
AC_CANONICAL_HOST AX_CHECK_COMPILE_FLAG([-std=c99], [
AC_PROG_LIBTOOL AX_APPEND_FLAG([-std=c99])
], [
AC_MSG_WARN([Compiler does not accept -std=c99 flag!])
])
AC_PROG_CC_C99
AS_IF([test "${ac_cv_prog_cc_c99}" = "no"], [
AC_MSG_ERROR([No C99 compiler found!])
])
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
AC_DEFINE([_GNU_SOURCE], 1, [Define to include GNU extensions to POSIX])
dnl Set build/host to default values
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
dnl Set some options based on environment
DEBUG="-g" AM_INIT_AUTOMAKE([tar-ustar foreign dist-zip])
if test -z "$GCC"; then m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
XIPH_CPPFLAGS="-D_REENTRANT"
PROFILE="-g -p"
else
XIPH_CPPFLAGS="-Wall -ffast-math -fsigned-char"
PROFILE="-pg -g"
AC_DEFINE([_GNU_SOURCE], 1, [Define to include GNU extensions to POSIX])
fi
dnl Checks for programs. AM_MAINTAINER_MODE([enable])
dnl Checks for libraries. LT_INIT
dnl Checks for header files. dnl Checks for header files.
AC_HEADER_ASSERT
AC_HEADER_STDC AC_HEADER_STDC
AC_HEADER_TIME AC_HEADER_TIME
AC_CHECK_HEADERS([alloca.h sys/timeb.h]) AC_CHECK_HEADERS([stdint.h inttypes.h], [
AC_CHECK_HEADERS([pwd.h unistd.h grp.h sys/types.h],,,AC_INCLUDES_DEFAULT) ice_found_int_headers="yes";
break;
])
AS_IF([test "$ice_found_int_headers" != "yes"], [
AC_MSG_ERROR([Unable to find the standard integers headers])
])
AC_CHECK_HEADERS([sys/types.h])
AC_CHECK_HEADERS([sys/timeb.h])
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([pwd.h grp.h])
XIPH_NET
dnl Check for functions
AC_FUNC_FORK
AC_FUNC_CHOWN
AC_CHECK_FUNCS([setuid]) AC_CHECK_FUNCS([setuid])
AC_CHECK_FUNCS([chroot]) AC_CHECK_FUNCS([chroot])
AC_CHECK_FUNCS([chown])
AC_CHECK_FUNCS([strcasestr]) AC_CHECK_FUNCS([strcasestr])
AC_CHECK_FUNCS([gethostname]) AC_CHECK_FUNCS([gethostname])
AC_CHECK_FUNCS([uname]) AC_CHECK_FUNCS([uname])
AC_CHECK_FUNCS([setenv]) AC_CHECK_FUNCS([setenv])
AC_CHECK_FUNCS([setresuid]) AC_CHECK_FUNCS([setresuid])
AC_CHECK_FUNCS([setresgid]) AC_CHECK_FUNCS([setresgid])
AC_CHECK_FUNCS([localtime_r])
AC_CHECK_FUNCS([poll])
AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_FUNCS([ftime])
dnl Checks for typedefs, structures, and compiler characteristics. AC_SEARCH_LIBS([nanosleep], [rt posix4], [
XIPH_C__FUNC__ AC_DEFINE([HAVE_NANOSLEEP], [1], [Define if you have nanosleep])
])
dnl Check for types dnl Checks for types and typedefs
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UID_T
dnl Checks for library functions. dnl Checks for required libraries
AC_CHECK_FUNCS([localtime_r poll gettimeofday ftime])
AC_SEARCH_LIBS([nanosleep], [rt posix4], AC_DEFINE([HAVE_NANOSLEEP], [1], [Define if you have nanosleep])) dnl
XIPH_NET dnl libxml2
dnl
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], [], [
AC_MSG_ERROR([${LIBXML2_PKG_ERRORS}. libxml2 is required.])
])
dnl -- configure options -- CFLAGS="${CFLAGS} ${LIBXML2_CFLAGS}"
LIBS="${LIBS} ${LIBXML2_LIBS}"
XIPH_PATH_XSLT
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$XSLT_CFLAGS])
XIPH_VAR_PREPEND([XIPH_LIBS],[$XSLT_LIBS])
XIPH_PATH_VORBIS([ dnl
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$VORBIS_CFLAGS]) dnl libxslt
XIPH_VAR_PREPEND([XIPH_LIBS],[$VORBIS_LIBS]) dnl
XIPH_VAR_APPEND([XIPH_LDFLAGS],[$VORBIS_LDFLAGS]) PKG_CHECK_MODULES([LIBXSLT], [libxslt], [], [
ICECAST_OPTIONAL="$ICECAST_OPTIONAL format_vorbis.o" AC_MSG_ERROR([${LIBXSLT_PKG_ERRORS}. libxslt is required.])
], ])
[AC_MSG_ERROR([must have Ogg Vorbis v1.0 or above installed])
])
XIPH_PATH_THEORA([ CFLAGS="${CFLAGS} ${LIBXSLT_CFLAGS}"
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$THEORA_CFLAGS]) LIBS="${LIBS} ${LIBXSLT_LIBS}"
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!])
])
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!])
])
AC_CHECK_LIB(kate, kate_decode_init,[have_kate=yes],[have_kate=no], -logg) dnl
if test "x$have_kate" == "xyes" dnl libvorbis
then dnl
AC_CHECK_LIB(oggkate, kate_ogg_decode_headerin,[have_kate=yes],[have_kate=no],-lkate -logg) PKG_CHECK_MODULES([VORBIS], [vorbis >= 1.0], [], [
if test "x$have_kate" == "xyes" AC_MSG_ERROR([${VORBIS_PKG_ERRORS}. Must have libvorbis v1.0 or above installed.])
then ])
KATE_LIBS="-loggkate -lkate -logg"
AC_DEFINE([HAVE_KATE],[1],[Define if you have libkate]) CFLAGS="${CFLAGS} ${VORBIS_CFLAGS}"
fi LIBS="${LIBS} ${VORBIS_LIBS}"
fi
dnl Checks for optional libraries
dnl
dnl libogg
dnl
PKG_HAVE_WITH_MODULES([OGG], [ogg], [
CFLAGS="${CFLAGS} ${OGG_CFLAGS}"
LIBS="${LIBS} ${OGG_LIBS}"
])
dnl
dnl libtheora
dnl
PKG_HAVE_WITH_MODULES([THEORA], [theora], [
CFLAGS="${CFLAGS} ${THEORA_CFLAGS}"
LIBS="${LIBS} ${THEORA_LIBS}"
])
dnl
dnl libspeex
dnl
PKG_HAVE_WITH_MODULES([SPEEX], [speex], [
CFLAGS="${CFLAGS} ${SPEEX_CFLAGS}"
LIBS="${LIBS} ${SPEEX_LIBS}"
])
dnl
dnl libcurl
dnl
PKG_HAVE_WITH_MODULES([CURL], [libcurl], [
CFLAGS="${CFLAGS} ${CURL_CFLAGS}"
LIBS="${LIBS} ${CURL_LIBS}"
])
dnl
dnl openssl
dnl
PKG_HAVE_WITH_MODULES([OPENSSL], [openssl], [
CFLAGS="${CFLAGS} ${OPENSSL_CFLAGS}"
LIBS="${LIBS} ${OPENSSL_LIBS}"
])
dnl Check for library-specific functions
AC_CHECK_FUNCS([xsltSaveResultToString])
dnl we still use format_kate as it doesn't need libkate to work dnl we still use format_kate as it doesn't need libkate to work
#ICECAST_OPTIONAL="$ICECAST_OPTIONAL format_kate.o" #ICECAST_OPTIONAL="$ICECAST_OPTIONAL format_kate.o"
ACX_PTHREAD(, AC_MSG_ERROR([POSIX threads missing])) ACX_PTHREAD([], [AC_MSG_ERROR([POSIX threads missing])])
XIPH_VAR_APPEND([XIPH_CFLAGS],[$PTHREAD_CFLAGS])
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$PTHREAD_CPPFLAGS]) CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
XIPH_VAR_PREPEND([XIPH_LIBS],[$PTHREAD_LIBS]) CPPFLAGS="${CPPFLAGS} ${PTHREAD_CPPFLAGS}"
LIBS="${LIBS} ${PTHREAD_LIBS}"
XIPH_PATH_CURL([
AC_CHECK_DECL([CURLOPT_NOSIGNAL], dnl Feature enable/disable arguments
[ AC_DEFINE([HAVE_AUTH_URL], 1, [Define to compile in auth URL support code])
AC_CHECK_FUNCS([curl_global_init])
ICECAST_OPTIONAL="$ICECAST_OPTIONAL auth_url.o event_url.o curl.o"
enable_curl="yes"
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$CURL_CFLAGS])
XIPH_VAR_PREPEND([XIPH_LIBS],[$CURL_LIBS])
], [ AC_MSG_NOTICE([Your curl dev files are too old (7.10 or above required)])
], [#include <curl/curl.h>
])
],[ AC_MSG_NOTICE([libcurl not found])
])
dnl -- YP support --
AC_ARG_ENABLE([yp], AC_ARG_ENABLE([yp],
AC_HELP_STRING([--disable-yp],[disable YP directory support]), AS_HELP_STRING([--enable-yp],
enable_yp="$enableval", [enable yellowpage directory listing support (default: auto)])
enable_yp="yes") )
if test "x$enable_yp" = "xyes" -a "x$enable_curl" = xyes
then AS_IF([test "x$enable_yp" != "xno"], [
AC_DEFINE([USE_YP], 1, [Define to compile in YP support code]) AS_IF([test "x$have_curl" != "xyes"], [
ICECAST_OPTIONAL="$ICECAST_OPTIONAL yp.o" AS_IF([test "x$enable_yp" == "xyes"], [
else AC_MSG_ERROR([cURL is required for YP support])
AC_MSG_NOTICE([YP support disabled])
fi
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!])
]) ])
enable_yp="no"
], [
AC_DEFINE([USE_YP], 1, [Define to compile in YP support code])
enable_yp="yes"
])
])
dnl Make substitutions AM_CONDITIONAL([ENABLE_YP],
[test "x$enable_yp" = "xyes"])
AC_ARG_ENABLE([client-tests],
AS_HELP_STRING([--enable-client-tests],
[enable client tests module (default: disabled)])
)
AS_IF([test "x$enable_client_tests" == "xyes"], [
AC_DEFINE([ENABLE_MODULE_CLIENT_TESTS], 1, [Define to compile client test module])
], [enable_client_tests="no"])
AM_CONDITIONAL([ENABLE_MODULE_CLIENT_TESTS],
[test "x$enable_client_tests" = "xyes"])
AC_ARG_WITH([default-config],
AS_HELP_STRING([--with-default-config=PATH],
[Sets default Icecast configuration file (used when no configuration file is given)]),
[], [with_default_config=no]
)
AS_IF([test "$with_default_config" != "no"], [
AS_IF([test "$with_default_config" = "yes"], [
AC_MSG_ERROR([You need to supply a path as value for --with-default-config])
])
AC_DEFINE_UNQUOTED([ICECAST_DEFAULT_CONFIG], ["$with_default_config"], [Define to default config file path])
])
dnl Make substitutions
AC_SUBST(XIPH_LIBS)
AC_SUBST(XIPH_CPPFLAGS) AC_SUBST(XIPH_CPPFLAGS)
AC_SUBST(XIPH_CFLAGS) AC_SUBST(XIPH_CFLAGS)
AC_SUBST(XIPH_LIBS)
AC_SUBST(XIPH_LDFLAGS) AC_SUBST(XIPH_LDFLAGS)
AC_SUBST(PTHREAD_CPPFLAGS)
AC_SUBST(PTHREAD_CFLAGS) AC_CONFIG_HEADERS([config.h])
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(LIBTOOL_DEPS) AC_CONFIG_FILES([
AC_SUBST(LIBS) Makefile
AC_SUBST(DEBUG) conf/Makefile
AC_SUBST(CFLAGS) src/Makefile
AC_SUBST(PROFILE) src/common/avl/Makefile
AC_SUBST(ICECAST_OPTIONAL) src/common/httpp/Makefile
AC_SUBST(HAVE_KATE) src/common/thread/Makefile
AC_SUBST(KATE_LIBS) src/common/log/Makefile
src/common/net/Makefile
AC_OUTPUT([Makefile conf/Makefile src/Makefile src/common/avl/Makefile src/common/timing/Makefile
src/common/httpp/Makefile src/common/thread/Makefile src/common/log/Makefile doc/Makefile
src/common/net/Makefile src/common/timing/Makefile doc/Makefile web/Makefile web/Makefile
web/assets/Makefile web/assets/css/Makefile web/assets/font/Makefile admin/Makefile
admin/Makefile admin/includes/Makefile win32/Makefile examples/Makefile tests/Makefile]) win32/Makefile
examples/Makefile
tests/Makefile
])
AC_OUTPUT
echo "
Icecast configuration
---------------------
Version : ${VERSION}
cURL : ${have_curl}
TLS (openSSL) : ${have_openssl}
Format/Codec support:
Ogg : ${have_ogg}
Theora : ${have_theora}
Speex : ${have_speex}
Features:
YP support : ${enable_yp}
Client tests : ${enable_client_tests}"
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign docdir = $(datadir)/doc/$(PACKAGE)
docdir = $(datadir)/doc/icecast
nobase_doc_DATA = index.html \ nobase_doc_DATA = index.html \
admin_interface/index.html \ admin_interface/index.html \
auth/index.html \ auth/index.html \
......
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = icecast_auth-1.0.tar.gz EXTRA_DIST = icecast_auth-1.0.tar.gz
Subproject commit 57027c6cc3f8b26d59e9560b4ac72a1a06d643b9 Subproject commit 541d6079634c420ea757687715580fa199a0e3f0
## Process this with automake to create Makefile.in ## Process this with automake to create Makefile.in
AUTOMAKE_OPTIONS = foreign
SUBDIRS = common/avl common/net common/thread common/httpp common/log common/timing SUBDIRS = common/avl common/net common/thread common/httpp common/log common/timing
bin_PROGRAMS = icecast bin_PROGRAMS = icecast
noinst_HEADERS = admin.h cfgfile.h logging.h sighandler.h connection.h \ noinst_HEADERS = \
global.h util.h errors.h curl.h slave.h source.h stats.h refbuf.h client.h playlist.h \ admin.h \
compat.h fserve.h xslt.h yp.h md5.h matchfile.h tls.h \ cfgfile.h \
event.h event_log.h event_exec.h event_url.h \ logging.h \
sighandler.h \
connection.h \
global.h \
util.h \
errors.h \
curl.h \
slave.h \
source.h \
stats.h \
refbuf.h \
client.h \
playlist.h \
compat.h \
fserve.h \
xslt.h \
yp.h \
md5.h \
matchfile.h \
tls.h \
event.h \
event_log.h \
event_exec.h \
event_url.h \
acl.h auth.h \ acl.h auth.h \
format.h format_ogg.h format_mp3.h format_ebml.h \ format.h \
format_vorbis.h format_theora.h format_flac.h format_speex.h format_midi.h \ format_ogg.h \
format_kate.h format_skeleton.h format_opus.h format_mp3.h \
icecast_SOURCES = cfgfile.c main.c logging.c sighandler.c connection.c global.c \ format_ebml.h \
util.c errors.c slave.c source.c stats.c refbuf.c client.c playlist.c \ format_vorbis.h \
xslt.c fserve.c admin.c md5.c matchfile.c tls.c \ format_theora.h \
format.c format_ogg.c format_mp3.c format_midi.c format_flac.c format_ebml.c \ format_flac.h \
format_kate.c format_skeleton.c format_opus.c \ format_speex.h \
event.c event_log.c event_exec.c \ format_midi.h \
acl.c auth.c auth_htpasswd.c auth_anonymous.c auth_static.c format_kate.h \
EXTRA_icecast_SOURCES = curl.c yp.c \ format_skeleton.h \
auth_url.c event_url.c \ format_opus.h
format_vorbis.c format_theora.c format_speex.c
icecast_SOURCES = \
icecast_DEPENDENCIES = @ICECAST_OPTIONAL@ common/net/libicenet.la common/thread/libicethread.la \ main.c \
common/httpp/libicehttpp.la common/log/libicelog.la common/avl/libiceavl.la common/timing/libicetiming.la cfgfile.c \
icecast_LDADD = $(icecast_DEPENDENCIES) @XIPH_LIBS@ @KATE_LIBS@ logging.c \
sighandler.c \
AM_CFLAGS = @XIPH_CFLAGS@ connection.c \
AM_CPPFLAGS = -I$(srcdir)/common/ @XIPH_CPPFLAGS@ global.c \
AM_LDFLAGS = @XIPH_LDFLAGS@ @KATE_LIBS@ util.c \
errors.c \
slave.c \
debug: source.c \
$(MAKE) all CFLAGS="@DEBUG@" stats.c \
refbuf.c \
profile: client.c \
$(MAKE) all CFLAGS="@PROFILE@" playlist.c \
xslt.c \
fserve.c \
admin.c \
md5.c \
matchfile.c \
tls.c \
format.c \
format_ogg.c \
format_mp3.c \
format_midi.c \
format_flac.c \
format_ebml.c \
format_kate.c \
format_skeleton.c \
format_opus.c \
event.c \
event_log.c \
event_exec.c \
acl.c \
auth.c \
auth_htpasswd.c \
auth_anonymous.c \
auth_static.c
if HAVE_CURL
icecast_SOURCES += \
curl.c \
auth_url.c \
event_url.c
endif
if ENABLE_YP
icecast_SOURCES += yp.c
endif
if HAVE_OGG
icecast_SOURCES += format_vorbis.c
endif
if HAVE_THEORA
icecast_SOURCES += format_theora.c
endif
if HAVE_SPEEX
icecast_SOURCES += format_speex.c
endif