Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checks required by FFmpeg (#64) #68

Open
wants to merge 167 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
9a4602a
Add HAVE_ACCESS
helmesjo Aug 22, 2024
3837d8c
Add HAVE_ALTIVEC
helmesjo Aug 22, 2024
c06b2d1
Add HAVE__ALIGNED_MALLOC
helmesjo Aug 22, 2024
105ebcc
Add HAVE_ATAN2F
helmesjo Aug 22, 2024
6720012
Add HAVE_ATAN2
helmesjo Aug 22, 2024
11f05c5
Add HAVE_BCRYPT
helmesjo Aug 22, 2024
26d6316
Add HAVE_CBRT
helmesjo Aug 22, 2024
41436a0
Add HAVE_CBRTF
helmesjo Aug 22, 2024
a6d2ca3
Define HAVE_CBRT and HAVE_CBRTF for mingw
helmesjo Aug 22, 2024
76c0485
Add HAVE_CLOSESOCKET
helmesjo Aug 22, 2024
90700bb
Add HAVE_COMMANDLINETOARGVW
helmesjo Aug 22, 2024
f338630
Fix typo in HAVE_ACCESS
helmesjo Aug 22, 2024
0010432
Define HAVE_ATAN* for solaris.
helmesjo Aug 22, 2024
8eaaf5c
Define HAVE_CBRT* for solaris.
helmesjo Aug 22, 2024
3e69b09
Add HAVE_COPYSIGN
helmesjo Aug 22, 2024
1b3a6b9
Add HAVE_COPYSIGNF & HAVE_COPYSIGNL
helmesjo Aug 22, 2024
06c4ccf
Update sun/solaris checks.
helmesjo Aug 22, 2024
4bb26f7
Add HAVE_COS, HAVE_COSF & HAVE_COSL
helmesjo Aug 22, 2024
65909b3
Add HAVE_DEV_IC_BT8XX_H
helmesjo Aug 22, 2024
f6c259f
Add HAVE_DIRECT_H.h
helmesjo Aug 22, 2024
2f7ad17
Fix typo in with OpenBSD year
helmesjo Aug 22, 2024
04c226f
Add HAVE_DIRENT_H
helmesjo Aug 22, 2024
b9b9eb6
Add HAVE_DOS_PATHS
helmesjo Aug 22, 2024
0a132b1
Add HAVE_DXGIDEBUG_H
helmesjo Aug 22, 2024
1e1a927
Add HAVE_DXVA_H
helmesjo Aug 22, 2024
26d3c69
Add HAVE_ERF
helmesjo Aug 22, 2024
fa3e16b
Add HAVE_WINDOWS_H
helmesjo Aug 22, 2024
2e1d0ce
Add HAVE_WINSOCK2_H
helmesjo Aug 22, 2024
0aa4903
Add HAVE_GETHRTIME
helmesjo Aug 22, 2024
a5662ab
Add HAVE_GETRUSAGE.h
helmesjo Aug 22, 2024
d29e704
Add HAVE_GLOB
helmesjo Aug 22, 2024
2520701
Add HAVE_GMTIME_R
helmesjo Aug 22, 2024
35f4af9
Add HAVE_ISINF|FINITE|NORMAL|NAN
helmesjo Aug 22, 2024
4e18574
Add HAVE_LSX & HAVE_LASX
helmesjo Aug 22, 2024
2b932e5
Add HAVE_INET_ATON
helmesjo Aug 22, 2024
e0a367e
Add HAVE_GETOPT
helmesjo Aug 22, 2024
b72c7d5
Fix typo in HAVE_COS
helmesjo Aug 22, 2024
0ddedad
Add HAVE_HYPOT, HAVE_HYPOTF & HAVE_CABS
helmesjo Aug 22, 2024
867d71a
Add HAVE_LOG2[F] & HAVE_LOG10[F]
helmesjo Aug 22, 2024
009d3c5
Add HAVE_POW[FL]
helmesjo Aug 22, 2024
10d0a0b
Add HAVE_ROUND[FL]
helmesjo Aug 22, 2024
861fba8
Add HAVE_ARMV8
helmesjo Sep 6, 2024
d37571a
Add HAVE_AS_ARCHEXT_DOTPROD HAVE_AS_ARCHEXT_I8MM HAVE_AS_ARCH_DIRECTI…
helmesjo Sep 6, 2024
0bcb617
Add HAVE_AVX512
helmesjo Sep 6, 2024
c4caa91
Add HAVE_ASM_HWPROBE_H
helmesjo Sep 6, 2024
cfd9325
Add HAVE_ASM_TYPES_H
helmesjo Sep 6, 2024
44d61d1
Add HAVE_AS_OBJECT_ARCH_DIRECTIVE
helmesjo Sep 6, 2024
0d6e596
Add HAVE_AVX512ICL
helmesjo Sep 6, 2024
2b492a1
Add HAVE_DCBZ
helmesjo Sep 6, 2024
85b8b9a
Add HAVE_ASM_EBP
helmesjo Sep 6, 2024
e4c8c20
Add HAVE_ASM_EBX
helmesjo Sep 6, 2024
9de48e9
Add HAVE_EXP[2F]
helmesjo Sep 6, 2024
694cb74
Add HAVE_MKSTEMP
helmesjo Sep 6, 2024
6f2d2fa
Add HAVE_FMA[3|4]
helmesjo Sep 6, 2024
4edfcc0
Add HAVE_I8MM & HAVE_I686
helmesjo Sep 6, 2024
971435d
Add HAVE_LOCALTIME_R
helmesjo Sep 6, 2024
b3a23c7
Add HAVE_LOCAL_ALIGNED
helmesjo Sep 6, 2024
e8b2d6b
Add HAVE_FAST_UNALIGNED
helmesjo Sep 6, 2024
2320711
Add HAVE_LOONGSON[2|3]
helmesjo Sep 6, 2024
fba0391
Add HAVE_PRAGMA_DEPRECATED
helmesjo Sep 6, 2024
6a60f74
Add HAVE_IBM_ASM
helmesjo Sep 9, 2024
bc234d3
Add HAVE_INLINE_ASM, HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS & HAVE_INLINE…
helmesjo Sep 9, 2024
5ef0f5e
Add HAVE_LDBRX
helmesjo Sep 9, 2024
531bf1b
Add HAVE_LDEXPF
helmesjo Sep 9, 2024
4214f83
Add HAVE_LIBC_MSVCRT
helmesjo Sep 9, 2024
dad00b4
Add HAVE_MACHINE_IOCTL_METEOR_H & HAVE_MACHINE_IOCTL_BT848_H
helmesjo Sep 9, 2024
73ca233
Add HAVE_MALLOC_H
helmesjo Sep 9, 2024
4b65c51
Add HAVE_MEMALIGN & HAVE_POSIX_MEMALIGN
helmesjo Sep 9, 2024
9d94af9
Add HAVE_MAPVIEWOFFILE
helmesjo Sep 9, 2024
a6326a8
Add HAVE_DEV_BKTR_IOCTL_BT848_H & HAVE_DEV_BKTR_IOCTL_METEOR_H
helmesjo Sep 9, 2024
b993499
Minor cleanup.
helmesjo Sep 9, 2024
dcbaf21
Add HAVE_KCVIMAGEBUFFERCOLORPRIMARIES_ITU_R_2020.h
helmesjo Sep 9, 2024
5482688
Add HAVE_PRCTL
helmesjo Sep 9, 2024
c4abb63
Add HAVE_PTHREAD_{CANCEL, NP_H, SETNAME_NP, SET_NAME_NP}
helmesjo Sep 9, 2024
a26dfbc
Add:
helmesjo Sep 9, 2024
a286c5f
Add HAVE_SYSCTLBYNAME
helmesjo Sep 9, 2024
84fb599
Add HAVE_SYS_HWPROBE_H
helmesjo Sep 9, 2024
9adfe11
Add HAVE_SYS_VIDEOIO_H
helmesjo Sep 9, 2024
4b84b79
Add HAVE_TERMIOS_H
helmesjo Sep 9, 2024
32dae31
Tweak HAVE_ISINF
helmesjo Sep 10, 2024
db03ff1
Add HAVE_RV
helmesjo Sep 10, 2024
89e9b56
Add HAVE_RVV
helmesjo Sep 10, 2024
aeced58
Add HAVE_RV_ZVBB
helmesjo Sep 10, 2024
a7c4c81
Add HAVE_SCHED_GETAFFINITY
helmesjo Sep 10, 2024
223c789
Add HAVE_SECITEMIMPORT
helmesjo Sep 10, 2024
37d62a1
Add HAVE_SECTION_DATA_REL_RO
helmesjo Sep 10, 2024
a658855
Add HAVE_SETCONSOLECTRLHANDLER
helmesjo Sep 10, 2024
2ace485
Add HAVE_SETCONSOLETEXTATTRIBUTE
helmesjo Sep 10, 2024
18a8b4b
Add HAVE_SETDLLDIRECTORY
helmesjo Sep 10, 2024
7572bd8
Add HAVE_SETMODE
helmesjo Sep 10, 2024
4c8332d
Add HAVE_SIMD_ALIGN_16
helmesjo Sep 10, 2024
896dc29
Add HAVE_SIMD_ALIGN_32
helmesjo Sep 10, 2024
2cda0cc
Add HAVE_SIMD_ALIGN_64
helmesjo Sep 10, 2024
162979f
Add HAVE_SINF
helmesjo Sep 10, 2024
d6c9977
Add HAVE_SSE4
helmesjo Sep 10, 2024
d809fee
Add HAVE_FAST_64BIT
helmesjo Sep 10, 2024
dd25faa
Add HAVE_FAST_CLZ
helmesjo Sep 10, 2024
47e2fb7
Add HAVE_FAST_CMOV
helmesjo Sep 10, 2024
d0489cb
Add HAVE_LIBDRM_GETFB2
helmesjo Sep 10, 2024
5f876dd
Tweak HAVE_LIBDRM_GETFB2
helmesjo Sep 10, 2024
de1a6d9
Add HAVE_LINUX_DMA_BUF_H
helmesjo Sep 10, 2024
38e6ad2
Add HAVE_MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
helmesjo Sep 10, 2024
c77590b
Add HAVE_MMXEXT
helmesjo Sep 10, 2024
89d27bc
Add HAVE_MM_EMPTY
helmesjo Sep 10, 2024
4abd7e7
Add HAVE_MSA
helmesjo Sep 10, 2024
1df659c
Add HAVE_OS2THREADS
helmesjo Sep 10, 2024
13487fb
Add HAVE_PEEKNAMEDPIPE
helmesjo Sep 10, 2024
dc2fc4e
Add HAVE_PPC4XX
helmesjo Sep 10, 2024
01e0e71
Add HAVE_RDTSC
helmesjo Sep 10, 2024
2ad1a35
Tweak HAVE_RDTSC
helmesjo Sep 10, 2024
473c169
Add HAVE_UDPLITE_H
helmesjo Sep 10, 2024
3c3fad5
Add HAVE_UWP
helmesjo Sep 10, 2024
06ab1d0
Add HAVE_VFP
helmesjo Sep 10, 2024
afbb4dc
Add HAVE_VFPV3
helmesjo Sep 10, 2024
f5c4c8a
Add HAVE_VFPV4
helmesjo Sep 10, 2024
8c9a048
Add HAVE_VFP_ARGS
helmesjo Sep 10, 2024
8945ff4
Add HAVE_VSX
helmesjo Sep 10, 2024
df7dcca
Add HAVE_WINRT
helmesjo Sep 10, 2024
1f44db0
Add HAVE_X86ASM
helmesjo Sep 10, 2024
4a775ac
Add HAVE_XFORM_ASM
helmesjo Sep 10, 2024
64f4c2d
Add HAVE_XMM_CLOBBERS
helmesjo Sep 10, 2024
8bc44e2
Add HAVE_ELF_AUX_INFO
helmesjo Sep 11, 2024
a1a5be1
Tweak HAVE_ATAN2 & HAVE_ATAN2F.
helmesjo Sep 11, 2024
6a1930a
Add HAVE_ALIGNED_STACK
helmesjo Sep 11, 2024
3075b26
Add HAVE_ATAN
helmesjo Sep 11, 2024
a164460
Add HAVE_ATANF
helmesjo Sep 11, 2024
cae2823
Add HAVE_MMX
helmesjo Sep 11, 2024
7b265be
HAVE_LLRINT HAVE_LLRINTF HAVE_LRINT HAVE_LRINTF HAVE_LSTAT HAVE_MMI H…
by-ryan Sep 11, 2024
3c0ff9e
Tweak HAVE_LOCALTIME_R
helmesjo Sep 11, 2024
e1c4a0d
HAVE_BCRYPT: Make available on more platforms (and add context).
helmesjo Sep 12, 2024
1f2bae3
HAVE_MALLOC_H: Don't check glibc version, since even though it is dep…
helmesjo Sep 12, 2024
a320261
Remove HAVE_LIBDRM_GETFB2, it's library specific and should instead b…
helmesjo Sep 12, 2024
d87921b
Various fixes, mainly for macos.
helmesjo Oct 18, 2024
2567175
HAVE_SECTION_DATA_REL_RO: Not available for macos.
helmesjo Oct 19, 2024
0ea2d68
HAVE_SYSCTL: Fix 'older than' check for GLIBC.
helmesjo Oct 14, 2024
bf6d96d
HAVE_X86ASM: Also check MSVC defines.
helmesjo Oct 14, 2024
9b49ed8
HAVE_ARC4RANDOM_BUF: Not available on linux (unless libbsd is install…
helmesjo Oct 20, 2024
621a069
HAVE_ARC4RANDOM: Not available on linux (unless libbsd is installed).
helmesjo Oct 20, 2024
7fdf94f
HAVE_ASM_EBP & HAVE_ASM_EBX enabled on x86_64 as well.
helmesjo Oct 21, 2024
503aaaf
HAVE_MMX & HAVE_MMXEXT are available with MSVC for x86 & x86_64.
helmesjo Oct 21, 2024
4a98dc4
socklen_t: Revert accidental change.
helmesjo Oct 25, 2024
5fa403a
HAVE_ASM_EBP & HAVE_ASM_EBX not available on Windows.
helmesjo Oct 28, 2024
45c87be
Improve checks (in particular for linux): HAVE_DEV_IC_BT8XX_H HAVE_PT…
helmesjo Oct 29, 2024
34e3fc7
BYTE_ORDER: If '__DARWIN_BYTE_ORDER' isn't defined (eg. on apple-sili…
helmesjo Oct 30, 2024
54ec7b9
Tweak some checks that should also be defined as 1 on windows.
helmesjo Oct 30, 2024
a0c1900
Add HAVE_GNU_WINDRES
helmesjo Oct 30, 2024
2b9871b
HAVE_ASM_EBP & HAVE_ASM_EBX: Don't define as '0' when not available.
helmesjo Nov 4, 2024
9c74369
HAVE_SLEEP: Don't define as '0' when not available.
helmesjo Nov 4, 2024
b0c20b8
Add HAVE_GNU_AS
helmesjo Nov 4, 2024
9231156
Add HAVE_ASM_MOD_Q
helmesjo Nov 4, 2024
593c36a
HAVE_AS_FUNC_DIRECTIVE (.func) is not available on apple-silicon.
helmesjo Nov 4, 2024
0f311ea
HAVE_GNU_WINDRES: Also available on MSYS2.
helmesjo Nov 4, 2024
2574861
Revert "Add HAVE_GNU_AS"
helmesjo Nov 4, 2024
4e34952
Fix the following checks for MINGW32: HAVE_GMTIME_R.h HAVE_GNU_WINDRE…
helmesjo Nov 4, 2024
020466f
Revert "HAVE_ARC4RANDOM_BUF: Not available on linux (unless libbsd is…
helmesjo Nov 9, 2024
a6b00ed
Revert "HAVE_ARC4RANDOM: Not available on linux (unless libbsd is ins…
helmesjo Nov 9, 2024
194f35c
TEMP: Tweaks for windows. Clean this up.
helmesjo Dec 9, 2024
28f5ade
Add HAVE_ARMASM
helmesjo Dec 14, 2024
bbda87c
Revise these checks (specifically to work correctly for MacOS):
helmesjo Dec 14, 2024
99bce66
BYTE_ORDER: Remove problematic header on MacOS (which isn't necessary…
helmesjo Dec 16, 2024
af601df
socklen_t: Add missing semi-colon.
helmesjo Dec 16, 2024
e7cccc8
Revise these checks (specifically to work correctly for MacOS):
helmesjo Dec 16, 2024
2b07dac
HAVE_XOP: 1 for MSVC+AMD
helmesjo Dec 16, 2024
d93b1ca
BYTE_ORDER: Use the same fallback for __APPLE__ as other platforms.
helmesjo Dec 16, 2024
c70f324
Revise these checks (specifically to work correctly for Win32 as FFmp…
helmesjo Dec 28, 2024
36819ca
Revise HAVE_MMX & HAVE_MMXEXT to cover more cases.
helmesjo Jan 7, 2025
661f90a
Revise HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC (don't define for MacOS).
helmesjo Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions libbuild2-autoconf-tests/checks/instructions/HAVE_ALTIVEC.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Verify existence of instruction set
* https://github.com/gcc-mirror/gcc/blob/9bbad3685131ec95d970f81bf75f9556d4d92742/gcc/config/rs6000/altivec.h#L33-L35
*/

#include "config.h"

#ifdef HAVE_ALTIVEC
# include <altivec.h>
#endif

int
main ()
{
#ifdef HAVE_ALTIVEC
vector signed int v1 = (vector signed int) { 0 };
vector signed int v2 = (vector signed int) { 1 };
v1 = vec_add(v1, v2);
#endif

return 0;
}
16 changes: 16 additions & 0 deletions libbuild2-autoconf-tests/checks/instructions/buildfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

for t : c{*}
{
exe{$name($t)}: $t h{config}
}

h{config}: in{config}

c.poptions += "-I$out_base"

if ($c.target.system != 'win32-msvc')
{
c.libs += -pthread
c.poptions += -DTEST_PTHREAD
}

1 change: 1 addition & 0 deletions libbuild2-autoconf-tests/checks/instructions/config.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#undef HAVE_ALTIVEC
19 changes: 13 additions & 6 deletions libbuild2-autoconf/libbuild2/autoconf/checks/BYTE_ORDER.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
#elif defined(__FreeBSD__) || defined(__NetBSD__)
# include <sys/endian.h>
#elif defined(__APPLE__)
# include <machine/endian.h>
// NOTE: This header is deprecated and also causes various
// issues with defines like u_int and friends, and
// strictly speaking it shouldn't be necessary.
//# include <machine/endian.h>
#elif !defined(_WIN32)
# include <sys/param.h>
#endif
Expand Down Expand Up @@ -43,11 +46,15 @@
# define BIG_ENDIAN 4321
# define LITTLE_ENDIAN 1234
# define BYTE_ORDER LITTLE_ENDIAN
# elif defined(__BYTE_ORDER__) && \
defined(__ORDER_BIG_ENDIAN__) && \
defined(__ORDER_LITTLE_ENDIAN__)
/* GCC, Clang (and others, potentially).
*/
# endif
#endif

/* Fallback: GCC, Clang (specifically apple-silicon and others, potentially).
*/
#ifndef BYTE_ORDER
# if defined(__BYTE_ORDER__) && \
defined(__ORDER_BIG_ENDIAN__) && \
defined(__ORDER_LITTLE_ENDIAN__)
# define BYTE_ORDER __BYTE_ORDER__
# define BIG_ENDIAN __ORDER_BIG_ENDIAN__
# define LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
Expand Down
21 changes: 21 additions & 0 deletions libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ACCESS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// HAVE_ACCESS : BUILD2_AUTOCONF_LIBC_VERSION

#ifndef BUILD2_AUTOCONF_LIBC_VERSION
# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included
#endif

#undef HAVE_ACCESS

/* Since glibc 2.1, BSD 4.3, FreeBSD 1.0, OpenBSD 2.0, NetBSD 1.0, MacOS, Mingw-w64 2.0
* POSIX.1, SVr4
*/
#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 1) || \
BUILD2_AUTOCONF_FREEBSD_PREREQ(1, 0) || \
BUILD2_AUTOCONF_OPENBSD_PREREQ(199518) || \
BUILD2_AUTOCONF_NETBSD_PREREQ(1, 0) || \
BUILD2_AUTOCONF_MINGW_PREREQ(2, 0) || \
defined(BUILD2_AUTOCONF_MACOS) || \
(defined(__sun) && defined(__SVR4)) || \
defined(_WIN32)
# define HAVE_ACCESS 1
#endif
52 changes: 52 additions & 0 deletions libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ALIGNED_STACK.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// HAVE_ALIGNED_STACK : BUILD2_AUTOCONF_LIBC_VERSION

#ifndef BUILD2_AUTOCONF_LIBC_VERSION
# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included
#endif

#undef HAVE_ALIGNED_STACK

/* Platform or compiler ensures a properly aligned stack for functions,
* which is necessary for optimal performance
*/
// Linux: Supports x86, x86_64, ARM (32-bit and 64-bit), SPARC
#if defined(__linux__) \
&& (defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__sparc__))
# define HAVE_ALIGNED_STACK 1
#endif

// Windows: Supports x86, x86_64, ARM (32-bit and 64-bit)
#if defined(_WIN32) \
&& (defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64))
# define HAVE_ALIGNED_STACK 1
#endif

// macOS: Supports x86_64 and ARM64
#if defined(__APPLE__) \
&& (defined(__x86_64__) || defined(__aarch64__))
# define HAVE_ALIGNED_STACK 1
#endif

// FreeBSD: Supports x86_64, ARM (32-bit and 64-bit), SPARC64
#if defined(__FreeBSD__) \
&& (defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__sparc64__))
# define HAVE_ALIGNED_STACK 1
#endif

// OpenBSD: Supports x86_64, ARM (32-bit and 64-bit)
#if defined(__OpenBSD__) \
&& (defined(__x86_64__) || defined(__arm__) || defined(__aarch64__))
# define HAVE_ALIGNED_STACK 1
#endif

// NetBSD: Supports x86_64, ARM (32-bit and 64-bit)
#if defined(__NetBSD__) \
&& (defined(__x86_64__) || defined(__arm__) || defined(__aarch64__))
# define HAVE_ALIGNED_STACK 1
#endif

// Solaris: Supports x86_64 and SPARC64
#if defined(__sun) \
&& (defined(__x86_64__) || defined(__sparc64__))
# define HAVE_ALIGNED_STACK 1
#endif
9 changes: 9 additions & 0 deletions libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ALTIVEC.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// HAVE_ALTIVEC

#undef HAVE_ALTIVEC

/* PowerPC (POWER1 and later) + compiler flag
*/
#if defined(__VEC__) || defined(__ALTIVEC__)
# define HAVE_ALTIVEC 1
#endif
12 changes: 12 additions & 0 deletions libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ARMASM.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// HAVE_ARMASM

#undef HAVE_ARMASM

// Check for ARM assembly support based on compiler targeting ARM

// GCC or Clang (including Apple Clang) - Check for ARM target architecture
#if defined(__GNUC__) || defined(__clang__)
# if defined(__ARM_ARCH) || defined(__arm__) || defined(__aarch64__)
# define HAVE_ARMASM 1
# endif
#endif
13 changes: 13 additions & 0 deletions libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ARMV8.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// HAVE_ARMV8

#undef HAVE_ARMV8

/* Based on:
* https://developer.arm.com/documentation/dui0774/g/chr1383660321827
* https://developer.arm.com/documentation/101028/0012/5--Feature-test-macros
*/
#if defined(__ARM_ARCH)
# if __ARM_ARCH == 8
# define HAVE_ARMV8 1
# endif
#endif
15 changes: 15 additions & 0 deletions libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ASM_EBP.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// HAVE_ASM_EBP

#undef HAVE_ASM_EBP

/* Check for EBP (Extended Base Pointer) support in assembly on x86/x86_64,
* excluding unsupported architectures (ARM, PowerPC, MIPS, RISC-V)
* and excluding Windows x64 with MSVC due to calling convention limitations.
*/
#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)) && \
!(defined(_WIN32) && defined(_MSC_VER) && defined(_M_X64)) && \
!defined(__arm__) && !defined(__aarch64__) && \
!defined(__powerpc__) && !defined(__ppc__) && \
!defined(__mips__) && !defined(__riscv)
#define HAVE_ASM_EBP 1
#endif
15 changes: 15 additions & 0 deletions libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ASM_EBX.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// HAVE_ASM_EBX

#undef HAVE_ASM_EBX

/* Check for EBX (Extended Base Pointer) support in assembly on x86/x86_64,
* excluding unsupported architectures (ARM, PowerPC, MIPS, RISC-V)
* and excluding Windows x64 with MSVC due to calling convention limitations.
*/
#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)) && \
!(defined(_WIN32) && defined(_MSC_VER) && defined(_M_X64)) && \
!defined(__arm__) && !defined(__aarch64__) && \
!defined(__powerpc__) && !defined(__ppc__) && \
!defined(__mips__) && !defined(__riscv)
#define HAVE_ASM_EBX 1
#endif
10 changes: 10 additions & 0 deletions libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ASM_HWPROBE_H.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// HAVE_ASM_HWPROBE_H

#undef HAVE_ASM_HWPROBE_H

/* AFAICS this is exclusively a Risc-V thing.
*/

#if defined(__riscv__) || defined(__riscv)
# define HAVE_ASM_HWPROBE_H 1
#endif
19 changes: 19 additions & 0 deletions libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ASM_MOD_Q.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// HAVE_ASM_MOD_Q

#undef HAVE_ASM_MOD_Q

/* Check if the 'modq' assembly instruction is available, which may be used
* in x86-64 environments with specific assemblers.
* This instruction is non-standard and might not be universally supported.
*/
#if defined(__x86_64__) || defined(_M_X64)
#if defined(__GNUC__) || defined(__clang__)
// GCC and Clang can support inline assembly with 'modq'
#define HAVE_ASM_MOD_Q 1
#elif defined(_MSC_VER)
// MSVC does not natively support 'modq' but might support equivalent
// operations depending on the intrinsic and inline assembly
// options (older MSVC might lack support)
#define HAVE_ASM_MOD_Q 1
#endif
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// HAVE_ASM_TYPES_H

#undef HAVE_ASM_TYPES_H

/* Since Linux 2.2.
*/
#if defined(__linux__)
# define HAVE_ASM_TYPES_H 1
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// HAVE_AS_ARCHEXT_DOTPROD

#undef HAVE_AS_ARCHEXT_DOTPROD

/* Assembly feature.
* Available in Cortex-A75, Cortex-A55, and Neoverse N1 and later.
*/
#if defined(__ARM_FEATURE_DOTPROD)
# define HAVE_AS_ARCHEXT_DOTPROD 1
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// HAVE_AS_ARCHEXT_I8MM

#undef HAVE_AS_ARCHEXT_I8MM

/* Assembly feature.
* Available in ARMV8 and later.
* See: https://developer.arm.com/documentation/101754/0622/armclang-Reference/Other-Compiler-specific-Features/Supported-architecture-features/Matrix-Multiplication-extension?lang=en
*/
#if defined(__ARM_ARCH)
# if __ARM_ARCH >= 8
# define HAVE_AS_ARCHEXT_I8MM 1
# endif
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// HAVE_AS_ARCH_DIRECTIVE

#undef HAVE_AS_ARCH_DIRECTIVE

/* Assembly directive '.arch'
* AFAICS this exists on ARM since very old versions.
*/
#if defined(__ARM_ARCH)
# define HAVE_AS_ARCH_DIRECTIVE 1
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// HAVE_AS_DN_DIRECTIVE

#undef HAVE_AS_DN_DIRECTIVE

/* Assembly feature.
* Available in ARMv8 and later.
* See: https://sourceware.org/binutils/docs/as/ARM-Directives.html
* Note: Apple Silicon (M1 and later) uses ARMv8 architecture but has different preprocessor macros.
*/
#if (defined(__ARM_NEON) || defined(__ARM_ARCH_ISA_A64)) || (defined(__APPLE__) && (defined(__arm64__) || defined(__arm64e__)))
# if defined(__ARM_ARCH) && __ARM_ARCH >= 8 || (defined(__APPLE__) && (defined(__arm64__) || defined(__arm64e__)))
# define HAVE_AS_DN_DIRECTIVE 1
# endif
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// HAVE_AS_FPU_DIRECTIVE

#undef HAVE_AS_FPU_DIRECTIVE

/* Assembly feature.
* Available in ARMv8 and later.
* See: https://sourceware.org/binutils/docs/as/ARM-Directives.html
* Note: Apple Silicon (M1 and later) uses ARMv8 architecture but has different preprocessor macros.
*/
#if defined(__ARM_ARCH) || (defined(__APPLE__) && (defined(__arm64__) || defined(__arm64e__)))
# if defined(__ARM_ARCH) && __ARM_ARCH >= 8 || (defined(__APPLE__) && (defined(__arm64__) || defined(__arm64e__)))
# define HAVE_AS_FPU_DIRECTIVE 1
# endif
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// HAVE_AS_FUNC_DIRECTIVE

#undef HAVE_AS_FUNC_DIRECTIVE

/* Assembly directive '.func'/'.function'
* AFAICS this exists on ARM since very old versions,
* but not on Apple Silicon.
*/
#if defined(__ARM_ARCH) && !defined(__APPLE__)
# define HAVE_AS_FUNC_DIRECTIVE 1
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// HAVE_AS_OBJECT_ARCH_DIRECTIVE

#undef HAVE_AS_OBJECT_ARCH_DIRECTIVE

/* Assembly directive '.object_arch'
* AFAICS this exists on ARM since very old versions.
*/
#if defined(__ARM_ARCH)
# define HAVE_AS_OBJECT_ARCH_DIRECTIVE 1
#endif
21 changes: 21 additions & 0 deletions libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ATAN.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// HAVE_ATAN : BUILD2_AUTOCONF_LIBC_VERSION

#undef HAVE_ATAN

/* Presence of the atan2() function, which is a
* non-standard POSIX function used to set the name of a thread.
* Since glibc 2.0, FreeBSD 1.0, OpenBSD 1.0, NetBSD 1.0, MacOS 10.0
* Solaris 2.0, Windows, MinGW
*/
#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 0) || \
BUILD2_AUTOCONF_FREEBSD_PREREQ(3, 0) || \
BUILD2_AUTOCONF_OPENBSD_PREREQ(199610) || \
BUILD2_AUTOCONF_NETBSD_PREREQ(1, 3) || \
BUILD2_AUTOCONF_MACOS_PREREQ(10, 0) || \
defined(_WIN32) || \
defined(__MINGW32__) || \
defined(__CYGWIN__) || \
((defined(__sun) && defined(__SVR4)) || defined(__sun__))
# define HAVE_ATAN 1
#endif

21 changes: 21 additions & 0 deletions libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ATAN2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// HAVE_ATAN2 : BUILD2_AUTOCONF_LIBC_VERSION

#undef HAVE_ATAN2

/* Presence of the atan2() function, which is a
* non-standard POSIX function used to set the name of a thread.
* Since glibc 2.0, FreeBSD 1.0, OpenBSD 1.0, NetBSD 1.0, MacOS 10.0
* Solaris 2.0, Windows, MinGW
*/
#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 0) || \
BUILD2_AUTOCONF_FREEBSD_PREREQ(3, 0) || \
BUILD2_AUTOCONF_OPENBSD_PREREQ(199610) || \
BUILD2_AUTOCONF_NETBSD_PREREQ(1, 3) || \
BUILD2_AUTOCONF_MACOS_PREREQ(10, 0) || \
defined(_WIN32) || \
defined(__MINGW32__) || \
defined(__CYGWIN__) || \
((defined(__sun) && defined(__SVR4)) || defined(__sun__))
# define HAVE_ATAN2 1
#endif

Loading