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

@@ -1,6 +1,6 @@
function(read_api_version project_version api_version outapi_version synapi_version )
file( READ "${CMAKE_SOURCE_DIR}/../../configure.ac" configure_ac )
file( READ "${CMAKE_CURRENT_SOURCE_DIR}/../../configure.ac" configure_ac )
string( REGEX MATCH "AC_INIT\\(\\[mpg123\\], \\[([0-9\\.]+)" result ${configure_ac} )
set( ${project_version} ${CMAKE_MATCH_1} PARENT_SCOPE )

View File

@@ -8,15 +8,12 @@ include(CheckSymbolExists)
include(CMakeDependentOption)
include(TestBigEndian)
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)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
check_include_file("langinfo.h" HAVE_LANGINFO_H)
check_include_file("limits.h" HAVE_LIMITS_H)
check_include_file("locale.h" HAVE_LOCALE_H)
check_include_file("netdb.h" HAVE_NETDB_H)
check_include_file("netinet/in.h" HAVE_NETINET_IN_H)
check_include_file("sched.h" HAVE_SCHED_H)
check_include_file("signal.h" HAVE_SIGNAL_H)
check_include_file("stdio.h" HAVE_STDIO_H)
@@ -25,7 +22,6 @@ check_include_file("stdlib.h" HAVE_STDLIB_H)
check_include_file("string.h" HAVE_STRING_H)
check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H)
check_include_file("sys/ipc.h" HAVE_SYS_IPC_H)
check_include_file("sys/param.h" HAVE_SYS_PARAM_H)
check_include_file("sys/resource.h" HAVE_SYS_RESOURCE_H)
check_include_file("sys/select.h" HAVE_SYS_SELECT_H)
check_include_file("sys/shm.h" HAVE_SYS_SHM_H)
@@ -38,7 +34,6 @@ check_include_file("sys/wait.h" HAVE_SYS_WAIT_H)
check_include_file("termios.h" HAVE_TERMIOS)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_include_file("windows.h" HAVE_WINDOWS_H)
function(check_m)
set(CMAKE_REQUIRED_LIBRARIES m)
check_function_exists(sin HAVE_M)
@@ -58,6 +53,9 @@ 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(fork HAVE_FORK)
check_function_exists(execvp HAVE_EXECVP)
check_function_exists(ctermid HAVE_CTERMID)
search_libs(gethostbyname GETHOSTBYNAME_LIB nsl socket network)
search_libs(socket SOCKET_LIB socket)
@@ -175,10 +173,6 @@ if(WIN32)
set(HAVE_MKFIFO ON)
endif()
if(HAVE_NETDB_H AND HAVE_SYS_PARAM_H AND HAVE_SYS_SOCKET_H AND HAVE_NETINET_IN_H AND HAVE_ARPA_INET_H)
set(HAVE_NETWORK ON)
endif()
if(NO_MESSAGES)
set(NO_WARNING ON)
set(NO_ERRORMSG ON)
@@ -319,7 +313,6 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -pedantic")
endif()
endif()
cmake_dependent_option(NETWORK "network support (http streams / webradio)" ON "HAVE_NETWORK" OFF)
option(NEWOLD_WRITE_SAMPLE "enable new/old WRITE_SAMPLE macro for non-accurate 16 bit output, faster on certain CPUs (default on on x86-32)" OFF)
cmake_dependent_option(NO_BUFFER "enable audio buffer code (default uses system whitelist... proper checks later)" OFF "HAVE_MMAP OR HAVE_SYS_IPC_H AND HAVE_SYS_SHM_H AND HAVE_SHMGET AND HAVE_SHMAT AND HAVE_SHMDT AND HAVE_SHMCTL" ON)
option(NO_DOWNSAMPLE "no downsampled decoding" OFF)
@@ -376,6 +369,18 @@ if(UNIX)
option(BUILD_PROGRAMS "Build programs" ON)
if(BUILD_PROGRAMS)
if(HAVE_FORK AND HAVE_EXECVP)
set(NET123 ON)
set(NET123_EXEC ON)
endif()
if(HAVE_TERMIOS)
set(TERM_POSIX ON)
else()
set(TERM_NONE ON)
endif()
add_subdirectory("tests")
if(BUILD_LIBOUT123)
@@ -388,12 +393,15 @@ if(UNIX)
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/getlopt.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/httpget.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/resolver.c"
$<$<BOOL:${NET123_EXEC}>:${CMAKE_CURRENT_SOURCE_DIR}/../../../src/net123_exec.c>
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/genre.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/mpg123.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/metaprint.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/local.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/playlist.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/streamdump.c"
$<$<BOOL:${TERM_POSIX}>:${CMAKE_CURRENT_SOURCE_DIR}/../../../src/term_posix.c>
$<$<BOOL:${TERM_NONE}>:${CMAKE_CURRENT_SOURCE_DIR}/../../../src/term_none.c>
"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/term.c")
target_link_libraries(${PROJECT_NAME} PRIVATE
compat

View File

@@ -69,8 +69,9 @@
#define LFS_ALIAS_BITS @LFS_ALIAS_BITS@
#define LT_MODULE_EXT "@CMAKE_SHARED_MODULE_SUFFIX@"
// Define if network support is enabled.
#cmakedefine NETWORK 1
// Define for new-style network code.
#cmakedefine NET123 1
#cmakedefine
// Define to disable downsampled decoding.
#cmakedefine NO_DOWNSAMPLE 1