ref: 3b74bed1e335c5d0f634a6c5b80092ee0eaeaad2
parent: bd2f5a1c784a853e723bb8ea703e1a40ddcf6319
author: cbagwell <cbagwell>
date: Sun Dec 13 22:26:32 EST 2009
Add -lpthreads to -lgomp on platforms known to need it.
--- a/configure.ac
+++ b/configure.ac
@@ -198,9 +198,14 @@
AC_HELP_STRING([--disable-gomp], [Don't use GOMP.]),,enable_gomp=yes)
AC_MSG_RESULT($enable_gomp)
if test "$enable_gomp" = "yes"; then
+ EXTRA_GOMP_LIBS=""
+ case $target in
+ *mingw32*)
+ EXTRA_GOMP_LIBS="-lpthread"
+ ;;
+ esac
AC_CHECK_HEADERS(omp.h,
- AC_CHECK_LIB(gomp, omp_get_thread_num, GOMP_LIBS="$GOMP_LIBS -lgomp", enable_gomp=no),
- enable_gomp=no)
+ AC_CHECK_LIB(gomp, omp_get_thread_num, GOMP_LIBS="$GOMP_LIBS -lgomp $EXTRA_GOMP_LIBS", enable_gomp=no, $EXTRA_GOMP_LIBS), enable_gomp=no)
fi
if test "$enable_gomp" = yes; then
AC_DEFINE(HAVE_OPENMP, 1, [Define to 1 if you have GOMP.])