mpg123-1.30.0

This commit is contained in:
Ozkan Sezer
2022-06-28 07:10:00 +03:00
parent 01b6013145
commit c46daebce1
56 changed files with 3497 additions and 1035 deletions

View File

@@ -9,16 +9,16 @@ dnl 2.69 at least.
AC_PREREQ([2.69])
dnl ############# Initialisation
AC_INIT([mpg123], [1.29.3], [maintainer@mpg123.org])
AC_INIT([mpg123], [1.30.0], [maintainer@mpg123.org])
dnl Increment API_VERSION when the API gets changes (new functions).
dnl libmpg123
API_VERSION=46
LIB_PATCHLEVEL=7
API_VERSION=47
LIB_PATCHLEVEL=0
dnl libout123
OUTAPI_VERSION=4
OUTLIB_PATCHLEVEL=3
OUTLIB_PATCHLEVEL=4
dnl libsyn123
SYNAPI_VERSION=1
@@ -370,36 +370,6 @@ AC_ARG_ENABLE(fifo,
]
)
AC_ARG_ENABLE(ipv6,
[ --enable-ipv6=[no/yes] IPv6 support (actually any protocol your libc does with getaddrinfo) ],
[
if test "x$enableval" = xyes
then
ipv6="enabled"
else
ipv6="disabled"
fi
],
[
ipv6="auto"
]
)
AC_ARG_ENABLE(network,
[ --enable-network=[no/yes] network support (http streams / webradio) ],
[
if test "x$enableval" = xyes
then
network="enabled"
else
network="disabled"
fi
],
[
network="auto"
]
)
dnl Optional objects list, depends on decoder choice and core feature selection.
dnl Not just for specific decoders anymore...
@@ -1239,11 +1209,13 @@ if test "x$have_mmap" = "xno"; then
AC_CHECK_FUNCS([shmget shmat shmdt shmctl],[], [buffer=disabled])
fi
term_type=none
# Check if system supports termios
AC_SYS_POSIX_TERMIOS
if test "x$ac_cv_sys_posix_termios" = "xyes"; then
AC_DEFINE_UNQUOTED([HAVE_TERMIOS], 1,
[Define this if you have the POSIX termios library])
term_type=posix
fi
AC_CHECK_FUNCS( random )
@@ -1262,12 +1234,45 @@ AC_CHECK_FUNCS( atoll )
AC_CHECK_FUNCS( mkfifo, [ have_mkfifo=yes ], [ have_mkfifo=no ] )
AC_CHECK_FUNCS( fork execvp, [ have_fork=yes ], [have_fork=no; break] )
AC_CHECK_FUNCS( ctermid )
dnl For Windows and OS/2.
dnl Checking for both the functions as well as the flag symbols.
dnl Taking care with _setmode() being preferred on Windows, and
dnl OS/2 providing _setmode, but not the underscored flags.
#AC_CHECK_FUNCS( _setmode setmode )
AC_LINK_IFELSE( [AC_LANG_SOURCE(
#include <io.h>
#include <fcntl.h>
#include <stdio.h>
int main()
{
_setmode(STDIN_FILENO, _O_BINARY);
_setmode(STDOUT_FILENO, _O_TEXT);
return 0;
} )], [AC_DEFINE( HAVE__SETMODE, 1, [for Win/DOS system with _setmode()] )], [] )
AC_LINK_IFELSE( [AC_LANG_SOURCE(
#include <io.h>
#include <fcntl.h>
#include <stdio.h>
int main()
{
setmode(STDIN_FILENO, O_BINARY);
setmode(STDOUT_FILENO, O_TEXT);
return 0;
} )], [AC_DEFINE( HAVE_SETMODE, 1, [for Win/DOS system with setmode()] )], [] )
dnl ############## Header and Library Checks
# locale headers
AC_CHECK_HEADERS([locale.h langinfo.h wchar.h wctype.h])
# Headers for network (http) stuff
network_type=Unknown
network_internal=unknown
AC_CHECK_HEADERS([netdb.h sys/param.h sys/socket.h netinet/in.h arpa/inet.h])
if test "x$ac_cv_header_netdb_h" = "xyes" &&
test "x$ac_cv_header_sys_param_h" = "xyes" &&
@@ -1275,7 +1280,7 @@ if test "x$ac_cv_header_netdb_h" = "xyes" &&
test "x$ac_cv_header_netinet_in_h" = "xyes" &&
test "x$ac_cv_header_arpa_inet_h" = "xyes"; then
have_network=yes
network_type=Posix
network_internal=posix
else
have_network=no
fi
@@ -1342,10 +1347,9 @@ ADD_CPPFLAGS="$sys_cppflags"
ADD_LDFLAGS=""
LIBS="$LIBS"
# Consider moving that stuff.
AC_CHECK_HEADER([os2.h], [ADD_CPPFLAGS="$ADD_CPPFLAGS -DOS2"])
# On OS/2, we need to link to os2term to make terminal control actually work.
AC_CHECK_LIB([os2term], [tcsetattr], [ADD_LDFLAGS="$ADD_LDFLAGS -los2term"])
# Remove that if it is settled that tcsetattr on OS/2 is unsalvageable anyway.
# The only user of os2.h is the output module.
AC_CHECK_HEADERS([os2.h])
# If debugging is enabled, just enable debugging symbols.
# All other stuff enters nagging territory.
@@ -1675,7 +1679,10 @@ output_modules=
check_forced=no
check_failed=no
if test "x$with_audio" != "x"; then
check_modules="`echo $with_audio|tr , ' '` dummy"
check_modules=`echo $with_audio|tr , ' '`
if ! echo "$check_modules" | grep -qw dummy; then
check_modules="$check_modules dummy"
fi
echo "Limiting outputs to build according to your preference: $check_modules"
check_forced=yes
fi
@@ -1968,6 +1975,9 @@ int main(){
;;
os2)
OS2_LIBS="-lcx -lmmpm2"
OS2_CFLAGS="-idirafter /@unixroot/usr/include/os2tk45"
oldcflags="$CFLAGS"
CFLAGS="$CFLAGS $OS2_CFLAGS"
AC_CHECK_HEADERS([os2.h])
# os2me.h depends on os2.h
# Yes, that way of coding it is ugly.
@@ -1976,6 +1986,7 @@ int main(){
# We mimick exactly the way how the header will be used.
# It seems to be picky...
AC_CHECK_HEADERS([os2me.h], [], [], [#define INCL_OS2MM
#undef VERSION
#define INCL_DOS
#define INCL_VIO
#define INCL_KBD
@@ -1990,6 +2001,7 @@ int main(){
else
check_failed=yes
fi
CFLAGS="$oldcflags"
;;
# from here on only forced tests, untested code
hp)
@@ -2186,6 +2198,15 @@ fi
default_output_module=`first_word $default_output_modules`
# Without actual modules, there is only the builtin one.
if test x"$modules" = xdisabled; then
# Module-less build needs _some_ default module.
if test -z "$default_output_module"; then
default_output_module=dummy
fi
default_output_modules=$default_output_module
fi
# Setup the static build.
# The conditionals always need to be defined by configure, even if
# HAVE_MODULES is FALSE!
@@ -2222,10 +2243,6 @@ AM_CONDITIONAL([BUILD_SGI], [ test "sgi" = $default_output_module ])
AM_CONDITIONAL([BUILD_MINT], [ test "mint" = $default_output_module ])
AM_CONDITIONAL([BUILD_OPENAL], [ test "openal" = $default_output_module ])
# Without actual modules, there is only the builtin one.
if test x"$modules" = xdisabled; then
default_output_modules=$default_output_module
fi
default_modstring=`echo "$default_output_modules"|tr ' ' ,`
AC_DEFINE_UNQUOTED( DEFAULT_OUTPUT_MODULE, "$default_modstring", [The default audio output module(s) to use] )
@@ -2305,21 +2322,14 @@ AC_DEFINE_UNQUOTED(INDEX_SIZE, $seektable, [size of the frame index seek table])
dnl ############## Win32 function checks
# Check if we want Unicode for Win32. Cygwin and Midipix does not need _wopen
if test "x$ac_cv_header_windows_h" = xyes &&
test "x$host_os" != xcygwin &&
test "x$host_os" != xmidipix; then
win32_specific_codes=enabled
else
win32_specific_codes=disabled
fi
COMPAT_LIBS=
win32_unicode=unneeded
win32_sockets=disabled
win32_sockets_working=no
win32_wide_working=no
win32_winver_bump=no
COMPAT_LIBS=
### mingw.org may not work properly for newer APIs
case $host_os in
*mingw*)
@@ -2331,6 +2341,11 @@ case $host_os in
;;
esac
# enable win32 code
if test "x$ac_cv_header_windows_h" = xyes -a "x$host_os" != xcygwin -a "x$host_os" != xmidipix; then
win32_specific_codes=enabled
fi
dnl We do not support non-unicode Windows.
if test "x$win32_specific_codes" = xenabled; then
#### Check for Wide functions
@@ -2390,7 +2405,7 @@ if test "x$win32_specific_codes" = xenabled; then
#### Check for Network functions
AC_CHECK_HEADERS([ws2tcpip.h], [win32_sockets=enabled], [AC_MSG_WARN([Please update your headers to support winsock 2.2.])])
AC_MSG_CHECKING([if we want Win32 sockets])
if test "x$win32_sockets" = "xenabled" && test "x$network" != "xdisabled"; then
if test "x$win32_sockets" = "xenabled"; then
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if winsock2 API is available])
wsoldlibs="$LIBS"
@@ -2424,14 +2439,13 @@ if test "x$win32_specific_codes" = xenabled; then
fi
if test "x$win32_sockets_working" = "xyes"; then
AC_MSG_RESULT([yes])
AC_DEFINE([WANT_WIN32_SOCKETS], [1], [ Define to use Win32 sockets ])
network_type=Winsock2
network_internal=winsock2
have_network=yes
have_ipv6=yes
else
LIBS="$wsoldlibs"
AC_MSG_WARN([Please update your headers to support winsock 2.2.])
fi
LIBS="$wsoldlibs"
else
AC_MSG_RESULT([no])
fi
@@ -2522,24 +2536,137 @@ int i = (EOVERFLOW) + 0;
AC_MSG_RESULT([$eoverflow_present])
AS_IF([test "x$eoverflow_present" = "xyes"],[],[AC_DEFINE([EOVERFLOW],[EFBIG],[Use EFBIG as substitude for EOVERFLOW, mingw.org may lack the latter])])
# old network choice
AC_ARG_ENABLE(ipv6,
[ --enable-ipv6=[no/yes] IPv6 support in internal network stack ],
[
if test "x$enableval" = xyes
then
ipv6="enabled"
else
ipv6="disabled"
fi
],
[
ipv6="auto"
]
)
dnl make it clear that auto is the default for both enable and with options.
network_type=auto
dnl This is to be kept in sync with --with-network, it is a shortcut that
dnl keep the old semantics of being able to --disable-network support altogether.
dnl The default should match the --with-network default.
AC_ARG_ENABLE(network,
[ --enable-network=[no/yes] network support (http streams / webradio), if available (overruled by --with-network!) ],
[
if test "x$enableval" = xyes
then
network_type=auto
else
network_type=disabled
fi
],
[
]
)
# new network choice
AC_MSG_CHECKING([for preferred network support])
AC_ARG_WITH([network],
[AS_HELP_STRING([--with-network=<type>], [Available options, depending on platform, are auto, none, internal, winhttp, wininet, and exec (wget or curl binaries).])],
[
case "$withval" in
exec)
network_type="exec"
AC_MSG_RESULT([exec])
;;
winhttp)
network_type="winhttp"
AC_MSG_RESULT([winhttp])
;;
wininet)
network_type="wininet"
AC_MSG_RESULT([wininet])
;;
internal)
network_type="internal"
AC_MSG_RESULT([internal])
;;
yes|auto)
network_type="auto"
AC_MSG_RESULT([auto])
;;
no|none)
network_type="disabled"
AC_MSG_RESULT([none])
;;
*)
AC_MSG_ERROR([Unknown network option "$withval"])
;;
esac
],
[
AC_MSG_RESULT([$network_type])
]
)
if test x$network_type = xauto; then
AC_MSG_CHECKING([for automatic network support])
if test "x$have_fork" = "xyes"; then
network_type=exec
elif test "x$win32_specific_codes" = "xenabled"; then
network_type=winhttp
elif test "x$have_network" = "xyes"; then
network_type="internal"
else
network_type="disabled"
fi
AC_MSG_RESULT([$network_type])
fi
# new net123
if test x$network_type != xinternal -a x$network_type != xdisabled; then
AC_DEFINE([NET123], [1], [ Define to for new net123 network stack. ])
fi
if test x$network_type = xexec -a x$have_fork != xyes; then
AC_MSG_ERROR([exec network support selected but fork not available])
fi
if test x$network_type = xwininet -o x$network_type = xwinhttp && test x$win32_specific_codes != xenabled; then
AC_MSG_ERROR([wininet or winhttp is currently only for Windows])
fi
#### Use Win32 support codes
AM_CONDITIONAL([WIN32_CODES], [ test "x$win32_specific_codes" = xenabled ])
if test x"$network" = xauto; then
if test x"$have_network" = xyes; then
network=enabled
else
network=disabled
fi
fi
if test x"$ipv6" = xauto; then
if test x"$have_ipv6" = xyes; then
AC_MSG_CHECKING([IPv6 use])
if test x"$have_ipv6" = xyes -a x"$network_type" = xinternal; then
ipv6=enabled
else
ipv6=disabled
fi
AC_MSG_RESULT([$ipv6])
fi
if test x$network_type = xinternal -a x$network_internal = xwinsock2; then
AC_DEFINE([WANT_WIN32_SOCKETS], [1], [ Define to use Win32 sockets ])
fi
AM_CONDITIONAL([NETWORK_WINSOCK], [ test x$network_type = xinternal -a x$network_internal = xwinsock2 ])
AM_CONDITIONAL([NET123_EXEC], [ test x$network_type = xexec ])
AM_CONDITIONAL([NET123_WINHTTP], [ test x$network_type = xwinhttp ])
AM_CONDITIONAL([NET123_WININET], [ test x$network_type = xwininet ])
dnl ############## Terminal choice
AM_CONDITIONAL( [TERM_POSIX], [test "x$term_type" = xposix] )
AM_CONDITIONAL( [TERM_NONE], [test "x$term_type" = xnone] )
AM_CONDITIONAL( [TERM_WIN32], [test "x$term_type" = xwin32] )
dnl ############## FIFO enable
if test x"$fifo" = xauto; then
@@ -2558,7 +2685,7 @@ if test x"$fifo" = xenabled; then
fi
dnl ############## Network enable
if test x"$network" = xenabled; then
if test x"$network_type" = xinternal; then
AC_DEFINE(NETWORK, 1, [ Define if network support is enabled. ])
if test x"$have_network" = xno; then
AC_MSG_WARN( [ You forced network code while I think there is support missing! ] )
@@ -2601,8 +2728,6 @@ AC_CONFIG_FILES([
AC_OUTPUT
dnl ############## Display Message
echo "
@@ -2613,13 +2738,16 @@ echo "
Compiler Optimization ... $with_optimization
Gapless Support ......... $gapless
Debugging ............... $debugging
Terminal control ........ $term_type
Extreme debugging ....... $xdebugging
Seek table size ......... $seektable
FIFO support ............ $fifo
Buffer .................. $buffer
Network (http streams) .. $network
Network Sockets ......... $network_type
Network (http streams) .. $network_type"
if test x$network_type = xinternal; then
echo " Internal network type ... $network_internal
IPv6 (getaddrinfo) ...... $ipv6"
fi
if test x"$LARGEFILE_BITS" = x; then
echo " File offsets ............ default"
else