--- configure.ac +++ configure.ac @@ -976,7 +976,6 @@ AC_ARG_ENABLE( [tools], AS_HELP_STRING([--disable-tools],[disable tool compilation]),, - [enable_tools=yes] ) apbs_do_tools="" if test x"$enable_tools" != "xno"; then @@ -1134,32 +1133,32 @@ AC_ARG_ENABLE( [openmp], AS_HELP_STRING([--disable-openmp],[disables OpenMP compiler support]),, - [disable_openmp=yes] ) -if test x"$disable_openmp" != "xyes"; then - AC_MSG_RESULT([yes]) -else +if test x"$enable_openmp" != "xno"; then AC_MSG_RESULT([no]) if [[ "${CC}" = "icc" ] && [ "${F77}" = "ifort" ]]; then CFLAGS="${CFLAGS} -openmp" FFLAGS="${FFLAGS} -openmp -assume cc_omp" LDFLAGS="${LDFLAGS} -static-intel" fi - - if [[ "${CC}" = "gcc" ] && [ "${F77}" = "gfortran" ]]; then - gcc_version=`gcc --version` + if [[[ "${CC}" = *gcc* ]]] && [[[ "${F77}" = *gfortran* ]]]; then + gcc_version=`${CC} --version` gcc_complete_version=`echo ${gcc_version} | awk '{printf("%s",$3)}' | awk -F'.' '{print $1$2}'` - if test ["${gcc_complete_version}" -ge 42]; then CFLAGS="${CFLAGS} -fopenmp" FFLAGS="${FFLAGS} -fopenmp" + OPENMP_LIBS="-lgomp" else AC_MSG_RESULT([WARNING]) AC_MSG_RESULT([WARNING Version of gcc/gfortran does not support OpenMP. Disabling.]) AC_MSG_RESULT([WARNING]) fi fi +else + AC_MSG_RESULT([yes]) + disable_openmp=yes fi +AC_SUBST(OPENMP_LIBS) dnl # ----------------------- dnl # CHECK FOR WINDOWS SPECIFIC LIBRARIES