diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-14 02:23:29 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-14 02:23:29 +0000 |
commit | 2ce6a2d8468fea20230f8694fc77ff16b2ca321b (patch) | |
tree | d707cd055b6330f4dde16f4352e6f70db1a48d74 | |
parent | d433b2eaba39b9545398648e02f5aae193ab5fe2 (diff) |
use the proper test for compiler atomics
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33995 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | configure | 15 | ||||
-rw-r--r-- | configure.ac | 2 |
2 files changed, 9 insertions, 8 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 33690 . +# From configure.ac Revision: 33953 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59e. # @@ -26314,7 +26314,7 @@ fi done -echo -n "checking for compiler atomic operations..." +echo -n "checking for compiler atomic operations... " cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -26330,14 +26330,14 @@ int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1); return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -26354,7 +26354,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -26380,7 +26380,8 @@ echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts" diff --git a/configure.ac b/configure.ac index 34ea602cb..23813573d 100644 --- a/configure.ac +++ b/configure.ac @@ -724,7 +724,7 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS([atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strndup strnlen strrchr strsep strspn strstr strtol unsetenv utime strtoq strcasestr asprintf vasprintf]) echo -n "checking for compiler atomic operations... " -AC_COMPILE_IFELSE( +AC_LINK_IFELSE( AC_LANG_PROGRAM([], [int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);]), AC_MSG_RESULT(yes) AC_DEFINE([HAVE_GCC_ATOMICS], 1, [Define to 1 if your GCC C compiler provides atomic operations.]), |