l3codeca.acm: Use the bundled mpg123 and build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-10-21 11:41:21 +02:00
parent 2113c42263
commit 5329da61ac
5 changed files with 2 additions and 143 deletions

110
configure vendored
View File

@ -637,8 +637,6 @@ VKD3D_CFLAGS
NETAPI_LIBS
NETAPI_CFLAGS
PROCSTAT_LIBS
MPG123_LIBS
MPG123_CFLAGS
JPEG_LIBS
JPEG_CFLAGS
GSSAPI_LIBS
@ -874,7 +872,6 @@ with_jpeg
with_krb5
with_ldap
with_mingw
with_mpg123
with_netapi
with_openal
with_opencl
@ -1992,8 +1989,6 @@ GSSAPI_CFLAGS
GSSAPI_LIBS
JPEG_CFLAGS
JPEG_LIBS
MPG123_CFLAGS
MPG123_LIBS
NETAPI_CFLAGS
NETAPI_LIBS
VKD3D_CFLAGS
@ -2665,7 +2660,6 @@ Optional Packages:
--without-krb5 do not use krb5 (Kerberos)
--without-ldap do not use LDAP
--without-mingw do not use the MinGW cross-compiler
--without-mpg123 do not use the mpg123 library
--without-netapi do not use the Samba NetAPI library
--without-openal do not use OpenAL
--without-opencl do not use OpenCL
@ -2818,9 +2812,6 @@ Some influential environment variables:
GSSAPI_LIBS Linker flags for krb5-gssapi, overriding pkg-config
JPEG_CFLAGS C compiler flags for libjpeg, overriding pkg-config
JPEG_LIBS Linker flags for libjpeg, overriding pkg-config
MPG123_CFLAGS
C compiler flags for libmpg123, overriding pkg-config
MPG123_LIBS Linker flags for libmpg123, overriding pkg-config
NETAPI_CFLAGS
C compiler flags for netapi, overriding pkg-config
NETAPI_LIBS Linker flags for netapi, overriding pkg-config
@ -4133,12 +4124,6 @@ if test "${with_mingw+set}" = set; then :
fi
# Check whether --with-mpg123 was given.
if test "${with_mpg123+set}" = set; then :
withval=$with_mpg123;
fi
# Check whether --with-netapi was given.
if test "${with_netapi+set}" = set; then :
withval=$with_netapi;
@ -15416,99 +15401,6 @@ esac
fi
if test "x$with_mpg123" != "xno"
then
if ${MPG123_CFLAGS:+false} :; then :
if ${PKG_CONFIG+:} false; then :
MPG123_CFLAGS=`$PKG_CONFIG --cflags libmpg123 2>/dev/null`
fi
fi
if ${MPG123_LIBS:+false} :; then :
if ${PKG_CONFIG+:} false; then :
MPG123_LIBS=`$PKG_CONFIG --libs libmpg123 2>/dev/null`
fi
fi
MPG123_LIBS=${MPG123_LIBS:-"-lmpg123"}
$as_echo "$as_me:${as_lineno-$LINENO}: libmpg123 cflags: $MPG123_CFLAGS" >&5
$as_echo "$as_me:${as_lineno-$LINENO}: libmpg123 libs: $MPG123_LIBS" >&5
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $MPG123_CFLAGS"
for ac_header in mpg123.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "mpg123.h" "ac_cv_header_mpg123_h" "$ac_includes_default"
if test "x$ac_cv_header_mpg123_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MPG123_H 1
_ACEOF
fi
done
if test "$ac_cv_header_mpg123_h" = "yes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpg123_feed in -lmpg123" >&5
$as_echo_n "checking for mpg123_feed in -lmpg123... " >&6; }
if ${ac_cv_lib_mpg123_mpg123_feed+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmpg123 $MPG123_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char mpg123_feed ();
int
main ()
{
return mpg123_feed ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_mpg123_mpg123_feed=yes
else
ac_cv_lib_mpg123_mpg123_feed=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpg123_mpg123_feed" >&5
$as_echo "$ac_cv_lib_mpg123_mpg123_feed" >&6; }
if test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes; then :
:
else
MPG123_LIBS=""
fi
else
MPG123_CFLAGS=""
MPG123_LIBS=""
fi
CPPFLAGS=$ac_save_CPPFLAGS
fi
if test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes; then :
case "x$with_mpg123" in
x) as_fn_append wine_notices "|libmpg123 ${notice_platform}development files not found (or too old), mp3 codec won't be supported." ;;
xno) ;;
*) as_fn_error $? "libmpg123 ${notice_platform}development files not found (or too old), mp3 codec won't be supported.
This is an error since --with-mpg123 was requested." "$LINENO" 5 ;;
esac
enable_l3codeca_acm=${enable_l3codeca_acm:-no}
fi
test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_mp3dmod=${enable_mp3dmod:-no}
if test "$ac_cv_header_AL_al_h" = "yes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lopenal" >&5
@ -18935,8 +18827,6 @@ GSSAPI_CFLAGS = $GSSAPI_CFLAGS
GSSAPI_LIBS = $GSSAPI_LIBS
JPEG_CFLAGS = $JPEG_CFLAGS
JPEG_LIBS = $JPEG_LIBS
MPG123_CFLAGS = $MPG123_CFLAGS
MPG123_LIBS = $MPG123_LIBS
PROCSTAT_LIBS = $PROCSTAT_LIBS
NETAPI_CFLAGS = $NETAPI_CFLAGS
NETAPI_LIBS = $NETAPI_LIBS

View File

@ -60,7 +60,6 @@ AC_ARG_WITH(krb5, AS_HELP_STRING([--without-krb5],[do not use krb5 (Kerbero
AC_ARG_WITH(ldap, AS_HELP_STRING([--without-ldap],[do not use LDAP]),
[if test "x$withval" = "xno"; then ac_cv_header_ldap_h=no; ac_cv_header_lber_h=no; fi])
AC_ARG_WITH(mingw, AS_HELP_STRING([--without-mingw],[do not use the MinGW cross-compiler]))
AC_ARG_WITH(mpg123, AS_HELP_STRING([--without-mpg123],[do not use the mpg123 library]))
AC_ARG_WITH(netapi, AS_HELP_STRING([--without-netapi],[do not use the Samba NetAPI library]))
AC_ARG_WITH(openal, AS_HELP_STRING([--without-openal],[do not use OpenAL]),
[if test "x$withval" = "xno"; then ac_cv_header_AL_al_h=no; ac_cv_header_OpenAL_al_h=no; fi])
@ -1722,24 +1721,6 @@ fi
WINE_WARNING_WITH(jpeg,[test "x$ac_cv_lib_soname_jpeg" = "x"],
[libjpeg ${notice_platform}development files not found, JPEG won't be supported.])
dnl **** Check for mpg123 ****
if test "x$with_mpg123" != "xno"
then
WINE_PACKAGE_FLAGS(MPG123,[libmpg123],[-lmpg123],,,
[AC_CHECK_HEADERS([mpg123.h])
if test "$ac_cv_header_mpg123_h" = "yes"
then
AC_CHECK_LIB(mpg123,mpg123_feed,[:],[MPG123_LIBS=""],[$MPG123_LIBS])
else
MPG123_CFLAGS=""
MPG123_LIBS=""
fi])
fi
WINE_NOTICE_WITH(mpg123,[test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes],
[libmpg123 ${notice_platform}development files not found (or too old), mp3 codec won't be supported.],
[enable_l3codeca_acm])
test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_mp3dmod=${enable_mp3dmod:-no}
dnl **** Check for OpenAL 1.1 ****
if test "$ac_cv_header_AL_al_h" = "yes"
then

View File

@ -1,9 +1,6 @@
MODULE = l3codeca.acm
IMPORTS = winmm user32
EXTRAINCL = $(MPG123_CFLAGS)
EXTRALIBS = $(MPG123_LIBS)
EXTRADLLFLAGS = -mcygwin
IMPORTS = $(MPG123_PE_LIBS) winmm user32 kernelbase
EXTRAINCL = $(MPG123_PE_CFLAGS)
C_SRCS = \
mpegl3.c

View File

@ -19,13 +19,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdarg.h>
#include <string.h>
#include <mpg123.h>
#include "windef.h"
@ -212,14 +208,12 @@ static LRESULT MPEG3_StreamOpen(ACMDRVSTREAMINSTANCE *instance)
instance->dwDriver = (DWORD_PTR)handle;
mpg123_open_feed(handle);
#if MPG123_API_VERSION >= 31 /* needed for MPG123_IGNORE_FRAMEINFO enum value */
/* mpg123 may find a XING header in the mp3 and use that information
* to ask for seeks in order to read specific frames in the file.
* We cannot allow that since the caller application is feeding us.
* This fixes problems for mp3 files encoded with LAME (bug 42361)
*/
mpg123_param(handle, MPG123_ADD_FLAGS, MPG123_IGNORE_INFOFRAME, 0);
#endif
return MMSYSERR_NOERROR;
}

View File

@ -327,9 +327,6 @@
/* Define to 1 if you have the <mntent.h> header file. */
#undef HAVE_MNTENT_H
/* Define to 1 if you have the <mpg123.h> header file. */
#undef HAVE_MPG123_H
/* Define if MTLDevice protocol has registryID property. */
#undef HAVE_MTLDEVICE_REGISTRYID