2009-03-15 20:08:31 -04:00
|
|
|
dnl ###########
|
|
|
|
dnl ## SETUP ###########################################################
|
|
|
|
dnl ###########
|
|
|
|
|
2020-01-28 14:59:43 -05:00
|
|
|
AC_INIT([ezstream], [1.0.0], [https://gitlab.xiph.org/xiph/ezstream/issues])
|
2009-03-15 20:08:31 -04:00
|
|
|
AC_PREREQ([2.61])
|
|
|
|
AC_CONFIG_SRCDIR([src/ezstream.c])
|
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
2004-01-30 12:19:45 -05:00
|
|
|
AM_INIT_AUTOMAKE
|
2009-03-15 20:08:31 -04:00
|
|
|
AC_CONFIG_HEADERS([src/config.h])
|
2015-02-27 13:39:01 -05:00
|
|
|
AC_CONFIG_LIBOBJ_DIR([compat])
|
2004-01-30 12:19:45 -05:00
|
|
|
AM_MAINTAINER_MODE
|
2007-02-24 16:44:35 -05:00
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2007-08-08 09:46:17 -04:00
|
|
|
AC_PROG_CC_STDC
|
2009-03-15 20:08:31 -04:00
|
|
|
AC_PROG_FGREP
|
|
|
|
AC_CANONICAL_HOST
|
2007-02-24 16:29:27 -05:00
|
|
|
|
2009-03-17 14:32:39 -04:00
|
|
|
BUILD_DATE=$(date '+%B %d, %Y')
|
|
|
|
AC_SUBST([BUILD_DATE])
|
|
|
|
|
2007-02-28 19:10:12 -05:00
|
|
|
EXAMPLES_DIR="\$(datadir)/examples/${PACKAGE_TARNAME}"
|
2009-03-15 20:08:31 -04:00
|
|
|
AC_ARG_ENABLE([examplesdir],
|
|
|
|
[AS_HELP_STRING([--enable-examplesdir=DIR],
|
|
|
|
[examples installation directory (default: DATADIR/examples/ezstream)])],
|
2007-02-28 19:10:12 -05:00
|
|
|
[case "$enableval" in
|
|
|
|
yes) ;;
|
2009-03-15 20:08:31 -04:00
|
|
|
no) AC_MSG_ERROR([Must have an install directory for the examples.]) ;;
|
2007-02-28 19:10:12 -05:00
|
|
|
*) EXAMPLES_DIR="$enableval" ;;
|
|
|
|
esac], [])
|
2009-03-15 20:08:31 -04:00
|
|
|
AC_SUBST([EXAMPLES_DIR])
|
2007-02-24 16:59:07 -05:00
|
|
|
|
2015-05-06 17:45:52 -04:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AC_SUBST([LIBTOOL_DEPS])
|
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
EZ_CFLAGS=""
|
|
|
|
EZ_CPPFLAGS=""
|
|
|
|
EZ_LDFLAGS=""
|
|
|
|
EZ_LIBS=""
|
|
|
|
|
2015-05-06 17:45:52 -04:00
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
|
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
|
|
|
|
dnl ##############
|
|
|
|
dnl ## COMPILER ########################################################
|
|
|
|
dnl ##############
|
|
|
|
|
|
|
|
if test -n "${GCC}"; then
|
2020-02-11 10:21:40 -05:00
|
|
|
for _flag in Wall W Wshadow Wconversion Wmissing-declarations \
|
|
|
|
Wmissing-prototypes Wstrict-prototypes
|
2009-03-15 20:08:31 -04:00
|
|
|
do
|
|
|
|
AX_CHECK_CFLAG([${_flag}],
|
2009-07-26 06:52:02 -04:00
|
|
|
[AX_UNIQVAR_APPEND([EZ_CFLAGS], [-${_flag}])], [])
|
2009-03-15 20:08:31 -04:00
|
|
|
done
|
|
|
|
AX_CHECK_CFLAG([Wformat=2],
|
2009-07-26 06:52:02 -04:00
|
|
|
[AX_UNIQVAR_APPEND([EZ_CFLAGS], [-Wformat=2])],
|
2009-03-15 20:08:31 -04:00
|
|
|
[
|
|
|
|
AX_CHECK_CFLAG([Wformat],
|
2009-07-26 06:52:02 -04:00
|
|
|
[AX_UNIQVAR_APPEND([EZ_CFLAGS], [-Wformat])], [])
|
2009-03-15 20:08:31 -04:00
|
|
|
])
|
|
|
|
else
|
|
|
|
case "${host}" in
|
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
|
|
|
*-irix*)
|
2009-03-15 20:08:31 -04:00
|
|
|
EZ_CFLAGS="-fullwarn"
|
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
|
|
|
;;
|
|
|
|
*-solaris*)
|
2009-03-15 20:08:31 -04:00
|
|
|
EZ_CFLAGS="-v"
|
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
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
2004-01-30 12:19:45 -05:00
|
|
|
fi
|
|
|
|
|
2015-04-15 17:17:20 -04:00
|
|
|
have_attributes=no
|
|
|
|
CFG_ATTRIBUTE_UNUSED=0
|
|
|
|
AX_FUNC_ATTRIBUTE_UNUSED([
|
|
|
|
CFG_ATTRIBUTE_UNUSED=1
|
|
|
|
have_attributes=yes
|
|
|
|
], [])
|
|
|
|
AC_SUBST([CFG_ATTRIBUTE_UNUSED])
|
|
|
|
|
|
|
|
CFG_HAVE_ATTRIBUTES=0
|
|
|
|
CFG_ATTRIBUTE_FORMAT=0
|
|
|
|
CFG_ATTRIBUTE_NONNULL=0
|
|
|
|
if test x"${have_attributes}" = "xyes"; then
|
|
|
|
CFG_HAVE_ATTRIBUTES=1
|
|
|
|
AX_FUNC_ATTRIBUTE([const char *a, ...],
|
|
|
|
[format], [(printf, 1, 2)],
|
|
|
|
[CFG_ATTRIBUTE_FORMAT=1], [])
|
|
|
|
AX_FUNC_ATTRIBUTE([const char *a],
|
|
|
|
[nonnull], [(1)],
|
|
|
|
[CFG_ATTRIBUTE_NONNULL=1], [])
|
|
|
|
fi
|
|
|
|
AC_SUBST([CFG_HAVE_ATTRIBUTES])
|
|
|
|
AC_SUBST([CFG_ATTRIBUTE_FORMAT])
|
|
|
|
AC_SUBST([CFG_ATTRIBUTE_NONNULL])
|
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
AC_C_CONST
|
|
|
|
AC_C_VOLATILE
|
2007-08-02 14:48:26 -04:00
|
|
|
|
2004-01-30 12:19:45 -05:00
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
dnl #############
|
|
|
|
dnl ## HEADERS #########################################################
|
|
|
|
dnl #############
|
2004-01-30 12:19:45 -05:00
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
AC_CHECK_HEADERS([ \
|
2017-09-20 12:12:52 -04:00
|
|
|
sys/random.h sys/time.h libgen.h paths.h \
|
2009-03-15 20:08:31 -04:00
|
|
|
], [], [],
|
|
|
|
[
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
# include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
])
|
2007-02-24 16:50:54 -05:00
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
|
|
|
|
dnl ###########
|
|
|
|
dnl ## TYPES ###########################################################
|
|
|
|
dnl ###########
|
2007-08-31 07:47:54 -04:00
|
|
|
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_TYPE_SSIZE_T
|
2009-03-15 20:08:31 -04:00
|
|
|
|
2007-08-31 07:47:54 -04:00
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
dnl ###############
|
|
|
|
dnl ## LIBRARIES #######################################################
|
|
|
|
dnl ###############
|
|
|
|
|
|
|
|
AC_CHECK_LIB([gen], [basename],
|
|
|
|
[ AX_UNIQVAR_PREPEND([EZ_LIBS], [-lgen]) ])
|
|
|
|
|
|
|
|
AX_CHECK_LIBSHOUT([], [],
|
2016-09-07 09:50:13 -04:00
|
|
|
[AC_MSG_ERROR([libshout is missing], [1])])
|
2009-03-15 20:08:31 -04:00
|
|
|
AX_UNIQVAR_APPEND([EZ_CPPFLAGS], [${LIBSHOUT_CPPFLAGS}])
|
|
|
|
AX_UNIQVAR_APPEND([EZ_CFLAGS], [${LIBSHOUT_CFLAGS}])
|
|
|
|
AX_UNIQVAR_APPEND([EZ_LDFLAGS], [${LIBSHOUT_LDFLAGS}])
|
|
|
|
AX_UNIQVAR_PREPEND([EZ_LIBS], [${LIBSHOUT_LIBS}])
|
|
|
|
|
|
|
|
AX_CHECK_LIBXML2([], [],
|
2016-09-07 09:50:13 -04:00
|
|
|
[AC_MSG_ERROR([libxml is missing], [1])])
|
2009-03-15 20:08:31 -04:00
|
|
|
AX_UNIQVAR_APPEND([EZ_CPPFLAGS], [${LIBXML2_CPPFLAGS}])
|
|
|
|
AX_UNIQVAR_APPEND([EZ_CFLAGS], [${LIBXML2_CFLAGS}])
|
|
|
|
AX_UNIQVAR_APPEND([EZ_LDFLAGS], [${LIBXML2_LDFLAGS}])
|
|
|
|
AX_UNIQVAR_PREPEND([EZ_LIBS], [${LIBXML2_LIBS}])
|
|
|
|
|
2016-04-22 09:56:30 -04:00
|
|
|
AX_CHECK_TAGLIB_C([], [],
|
2016-09-07 09:50:13 -04:00
|
|
|
[AC_MSG_ERROR([libtag_c is missing], [1])])
|
2016-04-22 09:56:30 -04:00
|
|
|
AX_UNIQVAR_APPEND([EZ_CFLAGS], [${TAGLIB_CFLAGS}])
|
|
|
|
AX_UNIQVAR_APPEND([EZ_CPPFLAGS], [${TAGLIB_CPPFLAGS}])
|
|
|
|
AX_UNIQVAR_APPEND([EZ_LDFLAGS], [${TAGLIB_LDFLAGS}])
|
|
|
|
AX_UNIQVAR_PREPEND([EZ_LIBS], [${TAGLIB_C_LIBS}])
|
2009-03-15 20:08:31 -04:00
|
|
|
|
2007-08-26 10:31:40 -04:00
|
|
|
EZ_LIBICONV=""
|
2009-03-15 20:08:31 -04:00
|
|
|
AM_ICONV
|
|
|
|
if test -n "${LTLIBICONV}"; then
|
|
|
|
EZ_LIBICONV="${LTLIBICONV}"
|
2007-08-26 10:31:40 -04:00
|
|
|
else
|
2009-03-15 20:08:31 -04:00
|
|
|
EZ_LIBICONV="${LIBICONV}"
|
|
|
|
fi
|
|
|
|
AX_UNIQVAR_APPEND([EZ_CPPFLAGS], [$INCICONV])
|
|
|
|
AX_UNIQVAR_PREPEND([EZ_LIBS], [$EZ_LIBICONV])
|
|
|
|
use_iconv="No"
|
|
|
|
if test x"${am_cv_func_iconv}" = "xyes"; then
|
|
|
|
use_iconv="Yes"
|
2007-08-26 10:31:40 -04:00
|
|
|
fi
|
2007-02-24 16:50:54 -05:00
|
|
|
|
2004-01-30 12:19:45 -05:00
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
dnl #######################
|
|
|
|
dnl ## FUNCTIONS / MACROS ##############################################
|
|
|
|
dnl #######################
|
2004-01-30 12:19:45 -05:00
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
AC_CHECK_FUNCS([ \
|
|
|
|
arc4random \
|
2017-09-20 12:12:52 -04:00
|
|
|
getrandom \
|
2009-03-15 20:08:31 -04:00
|
|
|
])
|
2007-03-08 15:24:09 -05:00
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
AC_REPLACE_FUNCS([ \
|
2015-02-27 13:39:01 -05:00
|
|
|
getopt \
|
2015-04-22 17:38:19 -04:00
|
|
|
reallocarray \
|
2009-03-15 20:08:31 -04:00
|
|
|
strlcat \
|
|
|
|
strlcpy \
|
|
|
|
strtonum \
|
|
|
|
])
|
2007-03-08 15:24:09 -05:00
|
|
|
|
2017-07-06 11:44:08 -04:00
|
|
|
AC_CHECK_FUNC([clock_gettime], [], [
|
|
|
|
AC_CHECK_LIB([rt], [clock_gettime], [
|
|
|
|
AX_UNIQVAR_PREPEND([EZ_LIBS], [-lrt])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2007-08-31 11:55:16 -04:00
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
dnl ##################
|
|
|
|
dnl ## MISCELLANEOUS ###################################################
|
|
|
|
dnl ##################
|
2007-03-08 15:24:09 -05:00
|
|
|
|
2009-03-15 20:08:31 -04:00
|
|
|
AX_CHECK___PROGNAME
|
|
|
|
|
|
|
|
|
|
|
|
dnl ############
|
|
|
|
dnl ## OUTPUT ##########################################################
|
|
|
|
dnl ############
|
|
|
|
|
|
|
|
AC_SUBST([EZ_CPPFLAGS])
|
|
|
|
AC_SUBST([EZ_CFLAGS])
|
|
|
|
AC_SUBST([EZ_LDFLAGS])
|
|
|
|
AC_SUBST([EZ_LIBS])
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
build-aux/Makefile
|
|
|
|
compat/Makefile
|
|
|
|
doc/Makefile
|
2018-01-22 19:51:48 -05:00
|
|
|
doc/ezstream-cfgmigrate.1.in
|
2009-08-30 08:49:06 -04:00
|
|
|
doc/ezstream-file.sh.1.in
|
|
|
|
doc/ezstream.1.in
|
2009-03-15 20:08:31 -04:00
|
|
|
examples/Makefile
|
|
|
|
m4/Makefile
|
|
|
|
src/Makefile
|
2015-04-15 17:17:20 -04:00
|
|
|
src/attr_config.h
|
2009-08-30 08:49:06 -04:00
|
|
|
src/ezstream-file.sh
|
2015-05-06 17:45:52 -04:00
|
|
|
tests/Makefile
|
2009-03-15 20:08:31 -04:00
|
|
|
])
|
2004-01-30 12:19:45 -05:00
|
|
|
|
2007-02-24 16:37:06 -05:00
|
|
|
AC_OUTPUT
|
2009-03-15 20:08:31 -04:00
|
|
|
|
|
|
|
cat << __EOT
|
|
|
|
|
|
|
|
${PACKAGE_STRING} has been configured successfully.
|
|
|
|
|
|
|
|
Configuration:
|
2009-03-16 18:59:28 -04:00
|
|
|
Charset conversion support .... : ${use_iconv}
|
|
|
|
Prefix ........................ : ${prefix}
|
2009-03-15 20:08:31 -04:00
|
|
|
|
|
|
|
__EOT
|