diff --git a/configure.in b/configure.in
index 163069cccb026122b7ba7a122a8df4a721a411f2..16d365316ba1b08e1f26f986d0b0fe0696791a45 100644
--- a/configure.in
+++ b/configure.in
@@ -130,10 +130,9 @@ AC_PREPROC_IFELSE(
   ],
 [AC_MSG_RESULT([no])])
 
-AX_OPENMP([with_openmp="yes"], [with_openmp="no"])
-if test $with_openmp == "yes"; then
-fi
-
+AX_OPENMP([], [with_openmp="no"])
+AM_CONDITIONAL([HAVE_OPENMP], [test "$with_openmp" != "no"])
+AC_SUBST(OPENMP_CXXFLAGS)
 
 
 #################