summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2018-01-25 02:37:32 -0500
committerCorey Farrell <git@cfware.com>2018-01-25 10:38:45 -0500
commit23381d2c5ea84cb45e41163b81c3b7bb43a9db75 (patch)
tree633dcd16c3f30644c55d942876b18c778fc3c9ee /configure
parent6fbd85522896c9c94281ed775c98a041721de424 (diff)
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
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure17
1 files changed, 6 insertions, 11 deletions
diff --git a/configure b/configure
index f000c66f1..f6e83d9eb 100755
--- a/configure
+++ b/configure
@@ -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]];'.