Support Fujitsu in AC_OPENMP

Christian Rössel <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <[email protected]>
Dear all,

the attached patch adds OpenMP flag detection for Fujitsu compilers.

Tested with the Fujitsu cross compilers fccpx/FCCpx/frtpx:
   Fujitsu C/C++/Fortran Compiler Driver Version 1.2.0 P-id:
   L30000-06 (Jun  7 2013 10:24:51) K-1.2.0-14

Christian
ac_openmp.diff (text/x-patch, 1 KB)
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index 25780f9..47e1b12 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -2116,13 +2116,14 @@ AC_DEFUN([AC_OPENMP],
           dnl   Cray CCE             -homp
           dnl   NEC SX               -Popenmp
           dnl   Lahey Fortran (Linux)  --openmp
+          dnl   Fujitsu              -Kopenmp
 	  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 -homp \
-                           -Popenmp --openmp; do
+                           -Popenmp --openmp -Kopenmp; 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],
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.