X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fopenmp.m4;h=cac6d839beeb3fdf942b06780d8b4f44bdd47506;hb=7ef6c64e210ac0979d7e8ac69bc5b5208c2405ab;hp=78f2b75990a83fc55b8f011d4b196cdfcacfdf2d;hpb=8d8eda4eab3d2801251daf4eb31756c3595e2fc6;p=gnulib.git diff --git a/m4/openmp.m4 b/m4/openmp.m4 index 78f2b7599..cac6d839b 100644 --- a/m4/openmp.m4 +++ b/m4/openmp.m4 @@ -1,5 +1,5 @@ -# openmp.m4 serial 7 -dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. +# openmp.m4 serial 9 +dnl Copyright (C) 2006-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -35,7 +35,14 @@ m4_copy([_AC_LANG_OPENMP(C)], [_AC_LANG_OPENMP(C++)]) # _AC_LANG_OPENMP(Fortran 77) # --------------------------- m4_define([_AC_LANG_OPENMP(Fortran 77)], -[AC_LANG_FUNC_LINK_TRY([omp_get_num_threads])]) +[ + program main + implicit none +!$ integer tid + tid = 42 + call omp_set_num_threads(2) + end +]) # _AC_LANG_OPENMP(Fortran) # --------------------------- @@ -70,12 +77,16 @@ AC_DEFUN([AC_OPENMP], dnl SGI C, PGI C -mp dnl Tru64 Compaq C -omp dnl IBM C (AIX, Linux) -qsmp=omp + dnl Cray CCE -homp + dnl NEC SX -Popenmp + dnl Lahey Fortran (Linux) --openmp dnl If in this loop a compiler is passed an option that it doesn't dnl understand or that it misinterprets, the AC_LINK_IFELSE test dnl will fail (since we know that it failed without the option), dnl therefore the loop will continue searching for an option, and dnl no output file called 'penmp' or 'mp' is created. - for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do + for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \ + -Popenmp --openmp; do ac_save_[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $ac_option" AC_LINK_IFELSE([_AC_LANG_OPENMP],