Renamed HAVE_GCC_FOPENMP into HAVE_OPENMP. Changed compile test into link test.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7652 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index dd6c953..a06d73c 100644
--- a/configure.in
+++ b/configure.in
@@ -553,20 +553,30 @@
 # does this compiler support -fopenmp, does it have the include file
 # <omp.h> and does it have libgomp ?
 
+AC_MSG_CHECKING([for OpenMP])
+
 safe_CFLAGS=$CFLAGS
 CFLAGS="-fopenmp"
 
-AC_COMPILE_CHECK([OpenMP], [#include <omp.h>], [ omp_set_dynamic(0); ],
+AC_LINK_IFELSE(
 [
-ac_have_gcc_fopenmp=yes
+#include <omp.h> 
+int main(int argc, char** argv)
+{
+  omp_set_dynamic(0);
+  return 0;
+}
+],
+[
+ac_have_openmp=yes
 AC_MSG_RESULT([yes])
 ], [
-ac_have_gcc_fopenmp=no
+ac_have_openmp=no
 AC_MSG_RESULT([no])
 ])
 CFLAGS=$safe_CFLAGS
 
-AM_CONDITIONAL([HAVE_GCC_FOPENMP], [test x$ac_have_gcc_fopenmp = xyes])
+AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes])
 
 
 # does this compiler support -m32 ?