mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 20:08:17 +00:00
Build System: Require __sync or __atomic functions.
This change causes the configure script to throw an error if neither __sync nor __atomic builtin functions are available. ASTERISK-27619 Change-Id: Ie01a281e0f5c41dfeeb5f250c1ccea8752f56ef9
This commit is contained in:
17
configure
vendored
17
configure
vendored
@@ -17909,6 +17909,7 @@ _ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
ax_cv_have_gcc_atomics=1
|
||||
|
||||
$as_echo "#define HAVE_GCC_ATOMICS 1" >>confdefs.h
|
||||
|
||||
@@ -17936,6 +17937,7 @@ _ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
ax_cv_have_c_atomics=1
|
||||
|
||||
$as_echo "#define HAVE_C_ATOMICS 1" >>confdefs.h
|
||||
|
||||
@@ -17947,6 +17949,10 @@ fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
if test -z $ax_cv_have_c_atomics$ax_cv_have_gcc_atomics; then
|
||||
as_fn_error $? "*** Atomic operations are not supported by your compiler." "$LINENO" 5
|
||||
fi
|
||||
|
||||
# glibc, AFAIK, is the only C library that makes printing a NULL to a string safe.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system printf is NULL-safe." >&5
|
||||
$as_echo_n "checking if your system printf is NULL-safe.... " >&6; }
|
||||
@@ -19357,17 +19363,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "libkern/OSAtomic.h" "ac_cv_header_libkern_OSAtomic_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_libkern_OSAtomic_h" = xyes; then :
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_OSX_ATOMICS 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# The cast to long int works around a bug in the HP C Compiler
|
||||
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
|
||||
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
|
||||
|
||||
Reference in New Issue
Block a user