diff --git a/configure b/configure
index 035c21b2b2ca2f8e51f5a627b2913e46a11727ba..541ee3b58c66d13f2ea4f42102f766930ef55c0e 100755
--- a/configure
+++ b/configure
@@ -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 34ea602cb1bb642b29e21b3c2b388d551f49f206..23813573d016abe24c24a53f5715e3ef0c3ee552 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.]),