You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sci-chemistry/apbs/files/apbs-1.3-openmp.patch

62 lines
1.8 KiB

diff --git a/configure.ac b/configure.ac
index 6020fbf..73fbe21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -982,7 +982,6 @@ AC_MSG_CHECKING([for --disable-tools])
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
@@ -1048,7 +1047,6 @@ AC_MSG_CHECKING([--disable-zlib])
AC_ARG_ENABLE(
[zlib],
AS_HELP_STRING([--disable-zlib], [disable zlib compilation]),,
- [disable_zlib=no]
)
if test x"$disable_zlib" == "xno"; then
AC_MSG_RESULT([yes])
@@ -1160,11 +1158,8 @@ AC_MSG_CHECKING([for --disable-openmp])
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"$disable_openmp" != "xno"; then
AC_MSG_RESULT([no])
if [[ "${CC}" = "icc" ] && [ "${F77}" = "ifort" ]]; then
CFLAGS="${CFLAGS} -openmp"
@@ -1172,20 +1167,25 @@ else
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