diff --git a/configure b/configure
index 8e7929cf677436cddb7c51b895e8c652e7f40b4e..97b82a074e52b735136804db62b6d0688a813ebc 100755
--- a/configure
+++ b/configure
@@ -693,7 +693,6 @@ enable_debug_glibcxx
 enable_shared
 enable_cxx_exceptions
 enable_mpi
-enable_openmp
 enable_external_lapack
 enable_external_blas
 enable_molfile_plugins
@@ -709,6 +708,7 @@ enable_execinfo
 enable_almost
 enable_gsl
 enable_xdrfile
+enable_openmp
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1348,7 +1348,6 @@ Optional Features:
   --enable-shared         enable shared libs, default: yes
   --enable-cxx-exceptions enable c++ exceptions, default: no
   --enable-mpi            enable search for mpi, default: yes
-  --enable-openmp         enable search for openmp, default: yes
   --enable-external-lapack
                           enable search for external lapack, default: yes
   --enable-external-blas  enable search for external blas, default: yes
@@ -2449,24 +2448,6 @@ fi
 
 
 
-openmp=
-# Check whether --enable-openmp was given.
-if test "${enable_openmp+set}" = set; then :
-  enableval=$enable_openmp; case "${enableval}" in
-             (yes) openmp=true ;;
-             (no)  openmp=false ;;
-             (*)   as_fn_error $? "wrong argument to --enable-openmp" "$LINENO" 5 ;;
-  esac
-else
-  case "yes" in
-             (yes) openmp=true ;;
-             (no)  openmp=false ;;
-  esac
-
-fi
-
-
-
 external_lapack=
 # Check whether --enable-external-lapack was given.
 if test "${enable_external_lapack+set}" = set; then :
@@ -5637,7 +5618,9 @@ $as_echo "$as_me: WARNING: cannot enable __PLUMED_MPI" >&2;}
 else
   mpi_found=ko
 fi
-if test $openmp == true ; then
+
+# search for openmp is automatically disabled by autoconf
+# when configuring with --disable-openmp
 
   OPENMP_CXXFLAGS=
   # Check whether --enable-openmp was given.
@@ -5704,7 +5687,7 @@ $as_echo "$ac_cv_prog_cxx_openmp" >&6; }
   fi
 
 
-fi
+
 if test $matheval == true ; then
 
     found=ko
diff --git a/configure.ac b/configure.ac
index f2da8633f7cc6c78b0964eac59fca6f6f0e734fe..08d0aef9b75aa0bfaf52ca29209d20189b8a8c4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,7 +108,6 @@ PLUMED_CONFIG_ENABLE([debug_glibcxx],[debug-glibcxx],[enable boundary check],[no
 PLUMED_CONFIG_ENABLE([shared],[shared],[shared libs],[yes])
 PLUMED_CONFIG_ENABLE([cxx_exceptions],[cxx-exceptions],[c++ exceptions],[no])
 PLUMED_CONFIG_ENABLE([mpi],[mpi],[search for mpi],[yes])
-PLUMED_CONFIG_ENABLE([openmp],[openmp],[search for openmp],[yes])
 PLUMED_CONFIG_ENABLE([external_lapack],[external-lapack],[search for external lapack],[yes])
 PLUMED_CONFIG_ENABLE([external_blas],[external-blas],[search for external blas],[yes])
 PLUMED_CONFIG_ENABLE([molfile_plugins],[molfile-plugins],[use molfile_plugins],[yes])
@@ -342,9 +341,11 @@ if test $mpi == true ; then
 else 
   mpi_found=ko
 fi
-if test $openmp == true ; then
-  AC_OPENMP
-fi
+
+# search for openmp is automatically disabled by autoconf
+# when configuring with --disable-openmp
+AC_OPENMP
+
 if test $matheval == true ; then
   PLUMED_CHECK_PACKAGE([matheval.h],[evaluator_create],[__PLUMED_HAS_MATHEVAL],[matheval])
 fi