mpg123-1.32.0

This commit is contained in:
Ozkan Sezer
2023-09-24 08:51:02 +03:00
parent 89d671ef14
commit 2279cffc0f
241 changed files with 18940 additions and 16360 deletions

View File

@@ -13,5 +13,7 @@ it to work with minimal fuzz.
- cmake: CMake build to get started on non-Unix-like platforms, especially
for just libmpg123 on Windows
- Sony PSP: Sony_PSP/; building libmpg123 for the PSP (used for the MODO player).
...by Bastian Pflieger <wb@illogical.de>
There used to be other ports, last of those for the Sony PSP. There was not
much porting involved on that one, though, just a custom Makefile for building
a generic libmpg123.

View File

@@ -1,38 +0,0 @@
PSPSDK = $(shell psp-config --pspsdk-path)
PSPDIR = $(shell psp-config --psp-prefix)
#DEFINES := PSP OPT_GENERIC REAL_IS_FIXED HAVE_CONFIG_H
DEFINES := PSP OPT_GENERIC REAL_IS_FLOAT HAVE_CONFIG_H
#DEFINES := PSP OPT_GENERIC FLOATOUT REAL_IS_FLOAT HAVE_CONFIG_H
DEFINEFLAGS := $(addprefix -D,$(DEFINES))
INCDIR := ../.
CFLAGS = -g -O2 -Wall -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math $(DEFINEFLAGS)
MPG123_OBJS = compat.o parse.o frame.o format.o index.o synth.o synth_8bit.o \
ntom.o icy2utf8.o synth_real.o synth_s32.o\
equalizer.o icy.o id3.o layer1.o layer2.o layer3.o optimize.o readers.o tabinit.o stringbuf.o libmpg123.o dct64.o
MPG123_LIB_FILE = ./libmpg123.a
OBJS = $(MPG123_OBJS)
TARGET_LIB = $(MPG123_LIB_FILE)
include $(PSPSDK)/lib/build.mak
####################
## Makefile rules ##
####################
install: $(MPG123_LIB_FILE)
@echo ""
@echo "**********************************************************************"
@echo "Installing libstsound into $(PSPDIR)"
@mkdir -p $(PSPDIR)/include $(PSPDIR)/lib
@cp -v mpg123.h $(PSPDIR)/include
@cp -v libmpg123.a $(PSPDIR)/lib
@echo "Done"
@echo "**********************************************************************"
@echo ""

View File

@@ -1,11 +0,0 @@
Hi
* Place Makefile.psp in the directory src/libmpg123.
* Patch readers.c (present in src/libmpg123) using readers.c.patch
* Place Config.h in directory src/
* cd to src/libmpg123 and do "make -f Makefile.psp install"
Tested on mpg123 1.4.x and psptoolchain rev. 2398
Regards
Bastian

View File

@@ -1,368 +0,0 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define if your architecture wants/needs/can use attribute_align_arg and
alignment checks. It's for 32bit x86... */
#define ABI_ALIGN_FUN 1
/* Define to use proper rounding. */
/* #undef ACCURATE_ROUNDING */
/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */
/* #undef ASMALIGN_EXP */
/* Define if __attribute__((aligned(16))) shall be used */
/* #undef CCALIGN */
/* Define if checking of stack alignment is wanted. */
#define CHECK_ALIGN 1
/* Define if debugging is enabled. */
/* #undef DEBUG */
/* The default audio output module(s) to use */
#define DEFAULT_OUTPUT_MODULE "alsa,oss,esd,sdl,nas,arts"
/* Define if building with dynamcally linked libmpg123 */
#define DYNAMIC_BUILD 1
/* Define if FIFO support is enabled. */
#define FIFO 1
/* Define if frame index should be used. */
#define FRAME_INDEX 1
/* Define if gapless is enabled. */
#define GAPLESS 1
/* Define to 1 if you have the <Alib.h> header file. */
/* #undef HAVE_ALIB_H */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <asm/audioio.h> header file. */
/* #undef HAVE_ASM_AUDIOIO_H */
/* Define to 1 if you have the `atoll' function. */
#define HAVE_ATOLL 1
/* Define to 1 if you have the <audios.h> header file. */
/* #undef HAVE_AUDIOS_H */
/* Define to 1 if you have the <AudioToolbox/AudioToolbox.h> header file. */
/* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
/* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */
/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */
/* #undef HAVE_CORESERVICES_CORESERVICES_H */
/* Define to 1 if you have the <CUlib.h> header file. */
/* #undef HAVE_CULIB_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mx' library (-lmx). */
/* #undef HAVE_LIBMX */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/soundcard.h> header file. */
#define HAVE_LINUX_SOUNDCARD_H 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if libltdl is available */
#define HAVE_LTDL 1
/* Define to 1 if you have the <machine/soundcard.h> header file. */
/* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <os2me.h> header file. */
/* #undef HAVE_OS2ME_H */
/* Define to 1 if you have the <os2.h> header file. */
/* #undef HAVE_OS2_H */
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `sched_setscheduler' function. */
#define HAVE_SCHED_SETSCHEDULER 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setpriority' function. */
#define HAVE_SETPRIORITY 1
/* Define to 1 if you have the `setuid' function. */
#define HAVE_SETUID 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the <sndio.h> header file. */
/* #undef HAVE_SNDIO_H */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sun/audioio.h> header file. */
/* #undef HAVE_SUN_AUDIOIO_H */
/* Define to 1 if you have the <sys/audioio.h> header file. */
/* #undef HAVE_SYS_AUDIOIO_H */
/* Define to 1 if you have the <sys/audio.h> header file. */
/* #undef HAVE_SYS_AUDIO_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/signal.h> header file. */
#define HAVE_SYS_SIGNAL_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#define HAVE_SYS_SOUNDCARD_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define this if you have the POSIX termios library */
#define HAVE_TERMIOS 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to indicate that float storage follows IEEE754. */
#define IEEE_FLOAT 1
/* size of the frame index seek table */
#define INDEX_SIZE 1000
/* Define if IPV6 support is enabled. */
#define IPV6 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Define if network support is enabled. */
/* #define NETWORK 1 */
/* Define to disable 16 bit integer output. */
/* #undef NO_16BIT */
/* Define to disable 32 bit integer output. */
/* define NO_32BIT 1 */
/* Define to disable 8 bit integer output. */
/* #undef NO_8BIT */
/* Define to disable downsampled decoding. */
/* #undef NO_DOWNSAMPLE */
/* Define to disable error messages in combination with a return value (the
return is left intact). */
/* #undef NO_ERETURN */
/* Define to disable error messages. */
/* #undef NO_ERRORMSG */
/* Define to disable feeder and buffered readers. */
/* #undef NO_FEEDER */
/* Define to disable ICY handling. */
/* #undef NO_ICY */
/* Define to disable ID3v2 parsing. */
/* #undef NO_ID3V2 */
/* Define to disable layer I. */
/* #undef NO_LAYER1 */
/* Define to disable layer II. */
/* #undef NO_LAYER2 */
/* Define to disable layer III. */
/* #undef NO_LAYER3 */
/* Define to disable ntom resampling. */
/* #undef NO_NTOM */
/* Define to disable real output. */
/* define NO_REAL 1 */
/* Define to disable string functions. */
/* #undef NO_STRING */
/* Define to disable warning messages. */
/* #undef NO_WARNING */
/* Name of package */
#define PACKAGE "mpg123"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "mpg123"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "mpg123 1.8rc5"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mpg123"
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.8rc5"
/* Define if portaudio v18 API is wanted. */
/* #undef PORTAUDIO18 */
/* The size of `int32_t', as computed by sizeof. */
#define SIZEOF_INT32_T 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 4
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 4
/* The size of `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if modules are enabled */
#define USE_MODULES 1
/* Version number of package */
#define VERSION "1.8rc5"
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `short' if <sys/types.h> does not define. */
/* #undef int16_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef int32_t */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned long' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to `unsigned short' if <sys/types.h> does not define. */
/* #undef uint16_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef uint32_t */

View File

@@ -1,2 +0,0 @@
14a15
> #include <sys/fd_set.h>

View File

@@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.12)
include(cmake/read_api_version.cmake)
read_api_version(MPG123_VERSION API_VERSION OUTAPI_VERSION SYNAPI_VERSION)
read_api_version(MPG123_VERSION)
project(mpg123 VERSION ${MPG123_VERSION} LANGUAGES C ASM)
option(BUILD_LIBOUT123 "build libout123" ON)
option(BUILD_LIBOUT123 "build libout123 (prerequisite for included programs)" ON)
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(WARNING "Output module is not implemented for '${CMAKE_SYSTEM_NAME}' platform.")
message(WARNING "To prevent build errors 'BUILD_LIBOUT123' option is set to OFF.")

View File

@@ -1,17 +1,18 @@
function(read_api_version project_version api_version outapi_version synapi_version )
function(read_api_version project_version)
file( READ "${CMAKE_CURRENT_SOURCE_DIR}/../../configure.ac" configure_ac )
file( READ "${CMAKE_CURRENT_SOURCE_DIR}/../../src/version.h" version_h )
string( REGEX MATCH "AC_INIT\\(\\[mpg123\\], \\[([0-9\\.]+)" result ${configure_ac} )
set( ${project_version} ${CMAKE_MATCH_1} PARENT_SCOPE )
string( REGEX MATCH "#define +MPG123_MAJOR +([0-9]+)" result ${version_h} )
set( major_version ${CMAKE_MATCH_1})
string( REGEX MATCH "#define +MPG123_MINOR +([0-9]+)" result ${version_h} )
set( minor_version ${CMAKE_MATCH_1})
string( REGEX MATCH "API_VERSION=([0-9]+)" result ${configure_ac} )
set( ${api_version} ${CMAKE_MATCH_1} PARENT_SCOPE )
string( REGEX MATCH "#define +MPG123_PATCH +([0-9]+)" result ${version_h} )
set( patch_version ${CMAKE_MATCH_1})
string( REGEX MATCH "OUTAPI_VERSION=([0-9]+)" result ${configure_ac} )
set( ${outapi_version} ${CMAKE_MATCH_1} PARENT_SCOPE )
string( REGEX MATCH "SYNAPI_VERSION=([0-9]+)" result ${configure_ac} )
set( ${synapi_version} ${CMAKE_MATCH_1} PARENT_SCOPE )
# string( REGEX MATCH "#define +MPG123_SUFFIX +\"([^\"]+)\"" result ${version_h} )
# set( version_suffix ${CMAKE_MATCH_1})
# CMake project() chokes on version with suffix, so give it just the numbers.
set( ${project_version} ${major_version}.${minor_version}.${patch_version} PARENT_SCOPE)
endfunction()

View File

@@ -8,6 +8,8 @@ include(CheckSymbolExists)
include(CMakeDependentOption)
include(TestBigEndian)
option(PORTABLE_API "Only build portable library API (no off_t, no internal I/O." OFF)
check_include_file("arpa/inet.h" HAVE_ARPA_INET_H)
check_include_file("dirent.h" HAVE_DIRENT_H)
check_include_file("dlfcn.h" HAVE_DLFCN_H)
@@ -54,15 +56,32 @@ check_function_exists(random HAVE_RANDOM)
check_function_exists(setenv HAVE_SETENV)
check_function_exists(unsetenv HAVE_UNSETENV)
check_function_exists(setlocale HAVE_SETLOCALE)
check_function_exists(uselocale HAVE_USELOCALE)
check_function_exists(setpriority HAVE_SETPRIORITY)
check_function_exists(shmget HAVE_SHMGET)
check_function_exists(shmat HAVE_SHMAT)
check_function_exists(shmdt HAVE_SHMDT)
check_function_exists(shmctl HAVE_SHMCTL)
check_function_exists(strerror HAVE_STRERROR)
check_function_exists(strerror_l HAVE_STRERROR_L)
check_function_exists(fork HAVE_FORK)
check_function_exists(execvp HAVE_EXECVP)
check_function_exists(ctermid HAVE_CTERMID)
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
check_function_exists(lseek64 LFS_LARGEFILE_64)
if(LFS_LARGEFILE_64)
check_c_source_compiles(
" #define _LARGEFILE64_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
int fd = open(\"/foo\", O_RDONLY|O_LARGEFILE);
" HAVE_O_LARGEFILE)
endif()
search_libs(gethostbyname GETHOSTBYNAME_LIB nsl socket network)
search_libs(socket SOCKET_LIB socket)
@@ -83,26 +102,6 @@ check_c_source_compiles(
"int main() { __attribute__((aligned(16))) float var; return 0; }"
CCALIGN)
if(MSVC)
# Here, off_t is always 32 bit, the whole machinery doesn't work without explicit
# API for 64 bit file access.
unset(_FILE_OFFSET_BITS)
set(LFS_SENSITIVE OFF)
set(LFS_INSENSITIVE ON)
set(MPG123_LARGE_FILE_SUPPORT OFF)
# We disable all the dynamic naming with MSVC to avoid confusing consumers.
# Maybe it would be more proper to conditionit on LFS_INSENSTIIVE.
set(BUILD_NO_LARGENAME 1)
else()
option(MPG123_LARGE_FILE_SUPPORT "Support large files (define _FILE_OFFSET_BITS)" ON)
if(MPG123_LARGE_FILE_SUPPORT)
set(_FILE_OFFSET_BITS 64)
else()
unset(_FILE_OFFSET_BITS)
endif()
set(BUILD_NO_LARGENAME 0)
endif()
if(NOT LFS_INSENSITIVE)
check_c_source_compiles("
#include <sys/types.h>
@@ -132,17 +131,6 @@ if(NOT LFS_INSENSITIVE)
endif()
check_type_size(long SIZEOF_LONG)
check_type_size(off_t SIZEOF_OFF_T)
if(LFS_SENSITIVE)
set(LFS_ALIAS_TYPE long)
math(EXPR LFS_ALIAS_BITS "${SIZEOF_LONG} * 8")
elseif(CMAKE_ANDROID_ARCH_ABI)
check_type_size(off64_t SIZEOF_OFF64_T)
set(LFS_ALIAS_TYPE off64_t)
math(EXPR LFS_ALIAS_BITS "${SIZEOF_OFF64_T} * 8")
else()
set(LFS_ALIAS_TYPE off_t)
math(EXPR LFS_ALIAS_BITS "${SIZEOF_OFF_T} * 8")
endif()
if(WIN32 AND HAVE_WINDOWS_H)
check_c_source_compiles("
@@ -330,13 +318,6 @@ cmake_dependent_option(NO_BUFFER "enable audio buffer code (default uses system
option(NO_DOWNSAMPLE "no downsampled decoding" OFF)
option(NO_EQUALIZER "no equalizer support" OFF)
option(NO_FEEDER "no feeder decoding, no buffered readers" OFF)
if(CYGWIN)
option(NO_LFS_ALIAS "disable alias wrappers for largefile bitness (mpg123_seek_32 or mpg123_seek_64 in addition to mpg123_seek, or the other way around; It is a mess, do not play with this!)" ON)
elseif(MSVC)
set(NO_LFS_ALIAS ON)
else()
option(NO_LFS_ALIAS "disable alias wrappers for largefile bitness (mpg123_seek_32 or mpg123_seek_64 in addition to mpg123_seek, or the other way around; It is a mess, do not play with this!)" OFF)
endif()
option(NO_ICY "ICY metainfo parsing/conversion" OFF)
option(NO_LAYER1 "no layer I decoding" OFF)
option(NO_LAYER2 "no layer II decoding" OFF)
@@ -359,6 +340,8 @@ include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/"
"${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/compat"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/libsyn123"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/libout123"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/libmpg123")
add_compile_definitions(
@@ -376,8 +359,8 @@ if(BUILD_LIBOUT123)
endif()
add_subdirectory("libsyn123")
if(UNIX)
option(BUILD_PROGRAMS "Build programs" ON)
if(UNIX AND NOT PORTABLE_API)
option(BUILD_PROGRAMS "Build programs (mpg123 executable and others)" ON)
if(BUILD_PROGRAMS)

View File

@@ -1,3 +1,6 @@
// Define to only include portable API in libraries.
#cmakedefine PORTABLE_API 1
// Define to use proper rounding.
#cmakedefine ACCURATE_ROUNDING 1
@@ -36,12 +39,18 @@
#cmakedefine HAVE_RANDOM 1
#cmakedefine HAVE_SCHED_H 1
#cmakedefine HAVE_SETLOCALE 1
#cmakedefine HAVE_USELOCALE 1
#cmakedefine HAVE_SETPRIORITY 1
#cmakedefine HAVE_SIGNAL_H 1
#cmakedefine HAVE_STDIO_H 1
#cmakedefine HAVE_STDINT_H 1
#cmakedefine HAVE_STDLIB_H 1
#cmakedefine HAVE_STRERROR 1
#cmakedefine HAVE_STRERROR_L 1
#cmakedefine HAVE_FORK 1
#cmakedefine HAVE_EXECVP 1
#cmakedefine HAVE_CTERMID 1
#cmakedefine HAVE_CLOCK_GETTIME 1
#cmakedefine HAVE_STRING_H 1
#cmakedefine HAVE_STRINGS_H 1
#cmakedefine HAVE_SYS_IOCTL_H 1
@@ -67,7 +76,6 @@
// Define if IPV6 support is enabled.
#cmakedefine IPV6 1
#define LFS_ALIAS_BITS @LFS_ALIAS_BITS@
#define LT_MODULE_EXT "@CMAKE_SHARED_MODULE_SUFFIX@"
// Define if network support is enabled.
@@ -140,8 +148,10 @@
#define PKGLIBDIR "@CMAKE_INSTALL_LIBDIR@/@PROJECT_NAME@"
#define SIZEOF_LONG @SIZEOF_LONG@
#define SIZEOF_OFF_T @SIZEOF_OFF_T@
// CMake leaves it emtpy for non-existing type. Autoconf sets it to 0.
#define SIZEOF_LONG (@SIZEOF_LONG@+0)
#define SIZEOF_OFF_T (@SIZEOF_OFF_T@+0)
#define SIZEOF_OFF64_T (@SIZEOF_OFF64_T@+0)
#cmakedefine STDERR_FILENO @STDERR_FILENO@
#cmakedefine STDIN_FILENO @STDIN_FILENO@
@@ -158,7 +168,7 @@
// Define to use Unicode for Windows
#cmakedefine WANT_WIN32_UNICODE 1
#if WANT_WIN32_UNICODE == 1
#ifdef WANT_WIN32_UNICODE
# define strcasecmp _stricmp
# define strncasecmp _strnicmp
#endif
@@ -168,8 +178,9 @@
#cmakedefine WORDS_BIGENDIAN 1
// Number of bits in a file offset, on hosts where this is settable.
#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
// Define to the native offset type (long or actually off_t).
#define lfs_alias_t @LFS_ALIAS_TYPE@
#cmakedefine LFS_LARGEFILE_64 1
#cmakedefine LFS_SENSITIVE 1
#cmakedefine HAVE_O_LARGEFILE 1
#ifndef HAVE_O_LARGEFILE
#define O_LARGEFILE 0
#endif

View File

@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.12)
option(NO_FEATURE_REPORT "Disable feature report function" OFF)
option(NO_LFS_ALIAS "disable alias wrappers for largefile bitness (mpg123_seek_32 or mpg123_seek_64 in addition to mpg123_seek, or the other way around; It is a mess, do not play with this!)" OFF)
include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/")
@@ -40,8 +39,6 @@ else()
endif()
message(STATUS "Detected machine: ${MACHINE}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/mpg123.h.in" mpg123.h)
set(TARGET lib${PROJECT_NAME})
add_library(${TARGET}
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/parse.c"
@@ -60,7 +57,6 @@ add_library(${TARGET}
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<NOT:$<BOOL:${NO_LAYER1}>>:layer1.c>"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<NOT:$<OR:$<BOOL:${NO_LAYER1}>,$<BOOL:${NO_LAYER2}>>>:layer2.c>"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<NOT:$<BOOL:${NO_LAYER3}>>:layer3.c>"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<NOT:$<BOOL:${NO_LFS_ALIAS}>>:lfs_alias.c>"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<NOT:$<BOOL:${NO_NTOM}>>:ntom.c>"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<NOT:$<BOOL:${NO_8BIT}>>:synth_8bit.c>"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<NOT:$<BOOL:${NO_16BIT}>>:synth.c>"
@@ -68,7 +64,7 @@ add_library(${TARGET}
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<AND:$<BOOL:${HAVE_FPU}>,$<NOT:$<BOOL:${NO_REAL}>>>:synth_real.c>"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<NOT:$<BOOL:${NO_STRING}>>:stringbuf.c>"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<NOT:$<BOOL:${NO_FEATURE_REPORT}>>:feature.c>"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<BOOL:${LFS_SENSITIVE}>:lfs_wrap.c>"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/$<$<NOT:$<BOOL:${PORTABLE_API}>>:lfs_wrap.c>"
$<TARGET_OBJECTS:compat>)
if(MSVC)
@@ -252,7 +248,7 @@ install(TARGETS ${TARGET} EXPORT targets
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/mpg123.h"
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/mpg123.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/fmt123.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

View File

@@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.12)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libout123/out123.h.in" out123.h)
include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libout123/")
add_subdirectory("modules")
@@ -33,5 +31,5 @@ install(TARGETS ${TARGET} EXPORT targets
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/out123.h"
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libout123/out123.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

View File

@@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.12)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libsyn123/syn123.h.in" syn123.h)
include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../../src/libsyn123/")
set(TARGET libsyn123)
@@ -28,5 +26,5 @@ install(TARGETS ${TARGET} EXPORT targets
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/syn123.h"
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libsyn123/syn123.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")