@@ -12,6 +12,7 @@ dnl Copyright (c) 2004-2005 The Regents of the University of California.
1212dnl                         All rights reserved.
1313dnl Copyright (c) 2012      Oracle and/or its affiliates.  All rights reserved.
1414dnl Copyright (c) 2014      Intel, Inc. All rights reserved
15+ dnl Copyright (c) 2017      IBM Corporation.  All rights reserved.
1516dnl $COPYRIGHT $
1617dnl
1718dnl Additional copyrights may follow
@@ -114,6 +115,18 @@ AC_DEFUN([_OPAL_CHECK_COMPILER_VENDOR], [
114115          [OPAL_IF_IFELSE([defined(__FUJITSU)],
115116               [opal_check_compiler_vendor_result= " fujitsu"  ])])
116117
118+     #  IBM XL C/C++
119+     AS_IF([test " $opal_check_compiler_vendor_result "   =  " unknown"  ],
120+           [OPAL_IF_IFELSE([defined(__xlC__) ||  defined(__IBMC__) ||  defined(__IBMCPP__)],
121+                [opal_check_compiler_vendor_result= " ibm" 
122+                 xlc_major_version= ` $CC  -qversion 2>&1  |  tail -n 1 |  cut -d '  '   -f 2 |  cut -d ' .'   -f 1` 
123+                 xlc_minor_version= ` $CC  -qversion 2>&1  |  tail -n 1 |  cut -d '  '   -f 2 |  cut -d ' .'   -f 2` 
124+                 AS_IF([ (test " $xlc_major_version "   -lt " 13"   ) ||  (test " $xlc_major_version "   -eq " 13"   &&  test  " $xlc_minor_version "   -lt " 1"   )],
125+                     [AC_MSG_ERROR([" XL Compiler versions less than 13.1 not supported. Detected $xlc_major_version .$xlc_minor_version "  ])])
126+                ],
127+                [OPAL_IF_IFELSE([defined(_AIX) &&  ! defined(__GNUC__)],
128+                     [opal_check_compiler_vendor_result= " ibm"  ])])])
129+ 
117130    #  GNU
118131    AS_IF([test " $opal_check_compiler_vendor_result "   =  " unknown"  ],
119132          [OPAL_IFDEF_IFELSE([__GNUC__],
@@ -131,7 +144,7 @@ AC_DEFUN([_OPAL_CHECK_COMPILER_VENDOR], [
131144                   AC_MSG_WARN([Detected gccfss being used to compile Open MPI.])
132145                   AC_MSG_WARN([Because of several issues Open MPI does not support])
133146                   AC_MSG_WARN([the gccfss compiler.  Please use a different compiler.])
134-                    AC_MSG_WARN([If you didn ' t  think you used gccfss you may want to])
147+                    AC_MSG_WARN([If you did not  think you used gccfss you may want to])
135148                   AC_MSG_WARN([check to see if  the compiler you think you used is])
136149                   AC_MSG_WARN([actually a link to gccfss.])
137150                   AC_MSG_ERROR([Cannot continue])
@@ -181,13 +194,6 @@ AC_DEFUN([_OPAL_CHECK_COMPILER_VENDOR], [
181194          [OPAL_IF_IFELSE([defined(__HP_cc) ||  defined(__HP_aCC)],
182195               [opal_check_compiler_vendor_result= " hp"  ])])
183196
184-     # IBM XL C/C++ 
185-     AS_IF([test "$opal_check_compiler_vendor_result" = "unknown"], 
186-           [OPAL_IF_IFELSE([defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__)], 
187-                [opal_check_compiler_vendor_result="ibm"], 
188-                [OPAL_IF_IFELSE([defined(_AIX) && !defined(__GNUC__)], 
189-                     [opal_check_compiler_vendor_result="ibm"])])]) 
190- 
191197    #  KAI C++ (rest in peace)
192198    AS_IF([test " $opal_check_compiler_vendor_result "   =  " unknown"  ],
193199          [OPAL_IFDEF_IFELSE([__KCC],
0 commit comments