diff options
author | Felipe Pena <felipe@php.net> | 2011-11-15 20:33:26 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2011-11-15 20:33:26 +0000 |
commit | 42776c0259b94d63e82f869442e8ee7f27a33387 (patch) | |
tree | 37738d49353661737573f807be0b86be39192916 /configure.in | |
parent | b6530d8978aab57eebd17f6076035f786ae1693b (diff) | |
download | php-git-42776c0259b94d63e82f869442e8ee7f27a33387.tar.gz |
- Fixed bug #55874 (GCC does not provide __sync_fetch_and_add on some archs)
patch by: klightspeed at netspace dot net dot au
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.in b/configure.in index a63afa7868..3ab1e4632c 100644 --- a/configure.in +++ b/configure.in @@ -661,6 +661,13 @@ if test "$ac_cv_func_getaddrinfo" = yes; then AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the getaddrinfo function]) fi +dnl Check for the __sync_fetch_and_add builtin +AC_CACHE_CHECK([for __sync_fetch_and_add], ac_cv_func_sync_fetch_and_add, +[AC_TRY_LINK([],[int x;__sync_fetch_and_add(&x,1);],ac_cv_func_sync_fetch_and_add=yes,ac_cv_func_sync_fetch_and_add=no)]) +if test "$ac_cv_func_sync_fetch_and_add" = yes; then + AC_DEFINE(HAVE_SYNC_FETCH_AND_ADD,1,[Define if you have the __sync_fetch_and_add function]) +fi + AC_REPLACE_FUNCS(strlcat strlcpy getopt) AC_FUNC_UTIME_NULL AC_FUNC_ALLOCA |