Remove unused headers and checks
This commit is contained in:
parent
1ac41d3ea0
commit
d10301c209
@ -46,7 +46,6 @@
|
||||
#include "alMain.h"
|
||||
#include "alconfig.h"
|
||||
#include "compat.h"
|
||||
#include "bool.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "mastering.h"
|
||||
#include "uhjfilter.h"
|
||||
#include "bformatdec.h"
|
||||
#include "static_assert.h"
|
||||
#include "ringbuffer.h"
|
||||
#include "filters/splitter.h"
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "filters/splitter.h"
|
||||
#include "alu.h"
|
||||
|
||||
#include "bool.h"
|
||||
#include "threads.h"
|
||||
#include "almalloc.h"
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "mastering.h"
|
||||
#include "alu.h"
|
||||
#include "almalloc.h"
|
||||
#include "static_assert.h"
|
||||
#include "math_defs.h"
|
||||
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include "alSource.h"
|
||||
|
||||
#include "hrtf.h"
|
||||
#include "align.h"
|
||||
#include "alu.h"
|
||||
#include "defs.h"
|
||||
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "alAuxEffectSlot.h"
|
||||
#include "alu.h"
|
||||
#include "alconfig.h"
|
||||
#include "bool.h"
|
||||
#include "ambdec.h"
|
||||
#include "bformatdec.h"
|
||||
#include "filters/splitter.h"
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include "ringbuffer.h"
|
||||
#include "align.h"
|
||||
#include "atomic.h"
|
||||
#include "threads.h"
|
||||
#include "almalloc.h"
|
||||
|
100
CMakeLists.txt
100
CMakeLists.txt
@ -235,45 +235,6 @@ IF(HAVE_LIBLOG)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} log)
|
||||
ENDIF()
|
||||
|
||||
# Check if we have C99 bool
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
"int main(int argc, char *argv[])
|
||||
{
|
||||
volatile _Bool ret;
|
||||
ret = (argc > 1) ? 1 : 0;
|
||||
return ret ? -1 : 0;
|
||||
}"
|
||||
HAVE_C99_BOOL)
|
||||
|
||||
# Check if we have C11 static_assert
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
"int main()
|
||||
{
|
||||
_Static_assert(sizeof(int) == sizeof(int), \"What\");
|
||||
return 0;
|
||||
}"
|
||||
HAVE_C11_STATIC_ASSERT)
|
||||
|
||||
# Check if we have C11 alignas
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
"_Alignas(16) int foo;
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}"
|
||||
HAVE_C11_ALIGNAS)
|
||||
|
||||
# Check if we have C11 _Atomic
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
"#include <stdatomic.h>
|
||||
int _Atomic foo = ATOMIC_VAR_INIT(0);
|
||||
int main()
|
||||
{
|
||||
atomic_fetch_add(&foo, 2);
|
||||
return 0;
|
||||
}"
|
||||
HAVE_C11_ATOMIC)
|
||||
|
||||
# Add definitions, compiler switches, etc.
|
||||
INCLUDE_DIRECTORIES("${OpenAL_SOURCE_DIR}/include" "${OpenAL_SOURCE_DIR}/common" "${OpenAL_BINARY_DIR}")
|
||||
|
||||
@ -517,8 +478,6 @@ ENDIF()
|
||||
CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(printf, 1, 2)));
|
||||
int main() {return 0;}" HAVE_GCC_FORMAT)
|
||||
|
||||
CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H)
|
||||
CHECK_INCLUDE_FILE(stdalign.h HAVE_STDALIGN_H)
|
||||
CHECK_INCLUDE_FILE(malloc.h HAVE_MALLOC_H)
|
||||
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
|
||||
CHECK_INCLUDE_FILE(strings.h HAVE_STRINGS_H)
|
||||
@ -744,13 +703,10 @@ ENDIF()
|
||||
SET(COMMON_OBJS
|
||||
common/alcomplex.cpp
|
||||
common/alcomplex.h
|
||||
common/align.h
|
||||
common/almalloc.cpp
|
||||
common/almalloc.h
|
||||
common/atomic.h
|
||||
common/bool.h
|
||||
common/math_defs.h
|
||||
common/static_assert.h
|
||||
common/threads.cpp
|
||||
common/threads.h
|
||||
common/uintmap.h
|
||||
@ -861,15 +817,13 @@ CHECK_INCLUDE_FILE(xmmintrin.h HAVE_XMMINTRIN_H "${SSE_SWITCH}")
|
||||
IF(HAVE_XMMINTRIN_H)
|
||||
OPTION(ALSOFT_CPUEXT_SSE "Enable SSE support" ON)
|
||||
IF(ALSOFT_CPUEXT_SSE)
|
||||
IF(ALIGN_DECL OR HAVE_C11_ALIGNAS)
|
||||
SET(HAVE_SSE 1)
|
||||
SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse.cpp)
|
||||
IF(SSE_SWITCH)
|
||||
SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse.cpp PROPERTIES
|
||||
COMPILE_FLAGS "${SSE_SWITCH}")
|
||||
ENDIF()
|
||||
SET(CPU_EXTS "${CPU_EXTS}, SSE")
|
||||
SET(HAVE_SSE 1)
|
||||
SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse.cpp)
|
||||
IF(SSE_SWITCH)
|
||||
SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse.cpp PROPERTIES
|
||||
COMPILE_FLAGS "${SSE_SWITCH}")
|
||||
ENDIF()
|
||||
SET(CPU_EXTS "${CPU_EXTS}, SSE")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(ALSOFT_REQUIRE_SSE AND NOT HAVE_SSE)
|
||||
@ -881,15 +835,13 @@ CHECK_INCLUDE_FILE(emmintrin.h HAVE_EMMINTRIN_H "${SSE2_SWITCH}")
|
||||
IF(HAVE_EMMINTRIN_H)
|
||||
OPTION(ALSOFT_CPUEXT_SSE2 "Enable SSE2 support" ON)
|
||||
IF(HAVE_SSE AND ALSOFT_CPUEXT_SSE2)
|
||||
IF(ALIGN_DECL OR HAVE_C11_ALIGNAS)
|
||||
SET(HAVE_SSE2 1)
|
||||
SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse2.cpp)
|
||||
IF(SSE2_SWITCH)
|
||||
SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse2.cpp PROPERTIES
|
||||
COMPILE_FLAGS "${SSE2_SWITCH}")
|
||||
ENDIF()
|
||||
SET(CPU_EXTS "${CPU_EXTS}, SSE2")
|
||||
SET(HAVE_SSE2 1)
|
||||
SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse2.cpp)
|
||||
IF(SSE2_SWITCH)
|
||||
SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse2.cpp PROPERTIES
|
||||
COMPILE_FLAGS "${SSE2_SWITCH}")
|
||||
ENDIF()
|
||||
SET(CPU_EXTS "${CPU_EXTS}, SSE2")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(ALSOFT_REQUIRE_SSE2 AND NOT HAVE_SSE2)
|
||||
@ -901,15 +853,13 @@ CHECK_INCLUDE_FILE(pmmintrin.h HAVE_PMMINTRIN_H "${SSE3_SWITCH}")
|
||||
IF(HAVE_EMMINTRIN_H)
|
||||
OPTION(ALSOFT_CPUEXT_SSE3 "Enable SSE3 support" ON)
|
||||
IF(HAVE_SSE2 AND ALSOFT_CPUEXT_SSE3)
|
||||
IF(ALIGN_DECL OR HAVE_C11_ALIGNAS)
|
||||
SET(HAVE_SSE3 1)
|
||||
SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse3.cpp)
|
||||
IF(SSE2_SWITCH)
|
||||
SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse3.cpp PROPERTIES
|
||||
COMPILE_FLAGS "${SSE3_SWITCH}")
|
||||
ENDIF()
|
||||
SET(CPU_EXTS "${CPU_EXTS}, SSE3")
|
||||
SET(HAVE_SSE3 1)
|
||||
SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse3.cpp)
|
||||
IF(SSE2_SWITCH)
|
||||
SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse3.cpp PROPERTIES
|
||||
COMPILE_FLAGS "${SSE3_SWITCH}")
|
||||
ENDIF()
|
||||
SET(CPU_EXTS "${CPU_EXTS}, SSE3")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(ALSOFT_REQUIRE_SSE3 AND NOT HAVE_SSE3)
|
||||
@ -921,15 +871,13 @@ CHECK_INCLUDE_FILE(smmintrin.h HAVE_SMMINTRIN_H "${SSE4_1_SWITCH}")
|
||||
IF(HAVE_SMMINTRIN_H)
|
||||
OPTION(ALSOFT_CPUEXT_SSE4_1 "Enable SSE4.1 support" ON)
|
||||
IF(HAVE_SSE2 AND ALSOFT_CPUEXT_SSE4_1)
|
||||
IF(ALIGN_DECL OR HAVE_C11_ALIGNAS)
|
||||
SET(HAVE_SSE4_1 1)
|
||||
SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse41.cpp)
|
||||
IF(SSE4_1_SWITCH)
|
||||
SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse41.cpp PROPERTIES
|
||||
COMPILE_FLAGS "${SSE4_1_SWITCH}")
|
||||
ENDIF()
|
||||
SET(CPU_EXTS "${CPU_EXTS}, SSE4.1")
|
||||
SET(HAVE_SSE4_1 1)
|
||||
SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse41.cpp)
|
||||
IF(SSE4_1_SWITCH)
|
||||
SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse41.cpp PROPERTIES
|
||||
COMPILE_FLAGS "${SSE4_1_SWITCH}")
|
||||
ENDIF()
|
||||
SET(CPU_EXTS "${CPU_EXTS}, SSE4.1")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(ALSOFT_REQUIRE_SSE4_1 AND NOT HAVE_SSE4_1)
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "alEffect.h"
|
||||
|
||||
#include "atomic.h"
|
||||
#include "align.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -23,8 +23,6 @@
|
||||
#include "inprogext.h"
|
||||
#include "logging.h"
|
||||
#include "polymorphism.h"
|
||||
#include "static_assert.h"
|
||||
#include "align.h"
|
||||
#include "atomic.h"
|
||||
#include "vector.h"
|
||||
#include "almalloc.h"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#ifndef _AL_SOURCE_H_
|
||||
#define _AL_SOURCE_H_
|
||||
|
||||
#include "bool.h"
|
||||
#include "alMain.h"
|
||||
#include "alu.h"
|
||||
#include "hrtf.h"
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "alBuffer.h"
|
||||
|
||||
#include "hrtf.h"
|
||||
#include "align.h"
|
||||
#include "math_defs.h"
|
||||
#include "filters/defs.h"
|
||||
#include "filters/nfc.h"
|
||||
|
@ -1,18 +0,0 @@
|
||||
#ifndef AL_ALIGN_H
|
||||
#define AL_ALIGN_H
|
||||
|
||||
#if defined(HAVE_STDALIGN_H) && defined(HAVE_C11_ALIGNAS)
|
||||
#include <stdalign.h>
|
||||
#endif
|
||||
|
||||
#if !defined(alignas) && !defined(__cplusplus)
|
||||
#if defined(HAVE_C11_ALIGNAS)
|
||||
#define alignas _Alignas
|
||||
#else
|
||||
/* NOTE: Our custom ALIGN macro can't take a type name like alignas can. For
|
||||
* maximum compatibility, only provide constant integer values to alignas. */
|
||||
#define alignas(_x) ALIGN(_x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* AL_ALIGN_H */
|
@ -3,9 +3,6 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include "static_assert.h"
|
||||
#include "bool.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* This helps cast away the const-ness of a pointer without accidentally
|
||||
* changing the pointer type. This is necessary due to Clang's inability to use
|
||||
|
@ -1,18 +0,0 @@
|
||||
#ifndef AL_BOOL_H
|
||||
#define AL_BOOL_H
|
||||
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#if !defined(bool) && !defined(__cplusplus)
|
||||
#ifdef HAVE_C99_BOOL
|
||||
#define bool _Bool
|
||||
#else
|
||||
#define bool int
|
||||
#endif
|
||||
#define false 0
|
||||
#define true 1
|
||||
#endif
|
||||
|
||||
#endif /* AL_BOOL_H */
|
@ -1,21 +0,0 @@
|
||||
#ifndef AL_STATIC_ASSERT_H
|
||||
#define AL_STATIC_ASSERT_H
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
#if !defined(static_assert) && !defined(__cplusplus)
|
||||
#ifdef HAVE_C11_STATIC_ASSERT
|
||||
#define static_assert _Static_assert
|
||||
#else
|
||||
#define CTASTR2(_pre,_post) _pre##_post
|
||||
#define CTASTR(_pre,_post) CTASTR2(_pre,_post)
|
||||
#if defined(__COUNTER__)
|
||||
#define static_assert(_cond, _msg) typedef struct { int CTASTR(static_assert_failed_at_line_,__LINE__) : !!(_cond); } CTASTR(static_assertion_,__COUNTER__)
|
||||
#else
|
||||
#define static_assert(_cond, _msg) struct { int CTASTR(static_assert_failed_at_line_,__LINE__) : !!(_cond); }
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* AL_STATIC_ASSERT_H */
|
18
config.h.in
18
config.h.in
@ -95,18 +95,6 @@
|
||||
/* Define to the size of a long long int type */
|
||||
#cmakedefine SIZEOF_LONG_LONG ${SIZEOF_LONG_LONG}
|
||||
|
||||
/* Define if we have C99 _Bool support */
|
||||
#cmakedefine HAVE_C99_BOOL
|
||||
|
||||
/* Define if we have C11 _Static_assert support */
|
||||
#cmakedefine HAVE_C11_STATIC_ASSERT
|
||||
|
||||
/* Define if we have C11 _Alignas support */
|
||||
#cmakedefine HAVE_C11_ALIGNAS
|
||||
|
||||
/* Define if we have C11 _Atomic support */
|
||||
#cmakedefine HAVE_C11_ATOMIC
|
||||
|
||||
/* Define if we have GCC's destructor attribute */
|
||||
#cmakedefine HAVE_GCC_DESTRUCTOR
|
||||
|
||||
@ -116,12 +104,6 @@
|
||||
/* Define if we have stdint.h */
|
||||
#cmakedefine HAVE_STDINT_H
|
||||
|
||||
/* Define if we have stdbool.h */
|
||||
#cmakedefine HAVE_STDBOOL_H
|
||||
|
||||
/* Define if we have stdalign.h */
|
||||
#cmakedefine HAVE_STDALIGN_H
|
||||
|
||||
/* Define if we have windows.h */
|
||||
#cmakedefine HAVE_WINDOWS_H
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user