@@ -10,6 +10,8 @@ dnl University of Stuttgart. All rights reserved.
10
10
dnl Copyright (c) 2004-2005 The Regents of the University of California.
11
11
dnl All rights reserved.
12
12
dnl Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
13
+ dnl Copyright (c) 2014 Research Organization for Information Science
14
+ dnl and Technology (RIST). All rights reserved.
13
15
dnl $COPYRIGHT$
14
16
dnl
15
17
dnl Additional copyrights may follow
@@ -175,43 +177,15 @@ AC_DEFUN([OMPI_INTL_POSIX_THREADS_PLAIN_C], [
175
177
#
176
178
if test "$ompi_pthread_c_success" = "0"; then
177
179
AC_MSG_CHECKING ( [ if C compiler and POSIX threads work as is] )
178
- if test "$HAVE_POSIX_THREADS" = "1" ; then
179
- run_this_test=1
180
- else
181
- case "${host_cpu}-${host_os}" in
182
- *solaris*)
183
- AC_MSG_RESULT ( [ no - Solaris, not checked] )
184
- run_this_test=0
185
- ;;
186
- *-aix* | *-freebsd*)
187
- if test "`echo $CPPFLAGS | $GREP 'D_THREAD_SAFE'`" = ""; then
188
- PTHREAD_CPPFLAGS="-D_THREAD_SAFE"
189
- CPPFLAGS="$CPPFLAGS $PTHREAD_CPPFLAGS"
190
- fi
191
- run_this_test=1
192
- ;;
193
- *)
194
- if test "`echo $CPPFLAGS | $GREP 'D_REENTRANT'`" = ""; then
195
- PTHREAD_CPPFLAGS="-D_REENTRANT"
196
- CPPFLAGS="$CPPFLAGS $PTHREAD_CPPFLAGS"
197
- fi
198
- run_this_test=1
199
- ;;
200
- esac
201
- fi
202
180
203
- if test "$run_this_test" = "1" ; then
204
- AC_LANG_PUSH ( C )
205
- OMPI_INTL_PTHREAD_TRY_LINK(ompi_pthread_c_success=1,
206
- ompi_pthread_c_success=0)
207
- AC_LANG_POP ( C )
208
- if test "$ompi_pthread_c_success" = "1"; then
209
- AC_MSG_RESULT ( [ yes] )
210
- else
211
- PTHREAD_CPPFLAGS=
212
- CPPFLAGS="$orig_CPPFLAGS"
213
- AC_MSG_RESULT ( [ no] )
214
- fi
181
+ AC_LANG_PUSH ( C )
182
+ OMPI_INTL_PTHREAD_TRY_LINK(ompi_pthread_c_success=1,
183
+ ompi_pthread_c_success=0)
184
+ AC_LANG_POP ( C )
185
+ if test "$ompi_pthread_c_success" = "1"; then
186
+ AC_MSG_RESULT ( [ yes] )
187
+ else
188
+ AC_MSG_RESULT ( [ no] )
215
189
fi
216
190
fi
217
191
] ) dnl
@@ -223,43 +197,15 @@ AC_DEFUN([OMPI_INTL_POSIX_THREADS_PLAIN_CXX], [
223
197
#
224
198
if test "$ompi_pthread_cxx_success" = "0"; then
225
199
AC_MSG_CHECKING ( [ if C++ compiler and POSIX threads work as is] )
226
- if test "$HAVE_POSIX_THREADS" = "1" ; then
227
- run_this_test=1
228
- else
229
- case "${host_cpu}-${host_os}" in
230
- *solaris*)
231
- AC_MSG_RESULT ( [ no - Solaris, not checked] )
232
- run_this_test=0
233
- ;;
234
- *-aix* | *-freebsd*)
235
- if test "`echo $CXXCPPFLAGS | $GREP 'D_THREAD_SAFE'`" = ""; then
236
- PTHREAD_CXXCPPFLAGS="-D_THREAD_SAFE"
237
- CXXCPPFLAGS="$CXXCPPFLAGS $PTHREAD_CXXCPPFLAGS"
238
- fi
239
- run_this_test=1
240
- ;;
241
- *)
242
- if test "`echo $CXXCPPFLAGS | $GREP 'D_REENTRANT'`" = ""; then
243
- PTHREAD_CXXCPPFLAGS="-D_REENTRANT"
244
- CXXCPPFLAGS="$CXXCPPFLAGS $PTHREAD_CXXCPPFLAGS"
245
- fi
246
- run_this_test=1
247
- ;;
248
- esac
249
- fi
250
200
251
- if test "$run_this_test" = "1" ; then
252
- AC_LANG_PUSH ( C++ )
253
- OMPI_INTL_PTHREAD_TRY_LINK(ompi_pthread_cxx_success=1,
254
- ompi_pthread_cxx_success=0)
255
- AC_LANG_POP ( C++ )
256
- if test "$ompi_pthread_cxx_success" = "1"; then
257
- AC_MSG_RESULT ( [ yes] )
258
- else
259
- PTHREAD_CXXCPPFLAGS=
260
- CXXCPPFLAGS="$orig_CXXCPPFLAGS"
261
- AC_MSG_RESULT ( [ no] )
262
- fi
201
+ AC_LANG_PUSH ( C++ )
202
+ OMPI_INTL_PTHREAD_TRY_LINK(ompi_pthread_cxx_success=1,
203
+ ompi_pthread_cxx_success=0)
204
+ AC_LANG_POP ( C++ )
205
+ if test "$ompi_pthread_cxx_success" = "1"; then
206
+ AC_MSG_RESULT ( [ yes] )
207
+ else
208
+ AC_MSG_RESULT ( [ no] )
263
209
fi
264
210
fi
265
211
] ) dnl
@@ -271,30 +217,15 @@ AC_DEFUN([OMPI_INTL_POSIX_THREADS_PLAIN_FC], [
271
217
#
272
218
if test "$ompi_pthread_fortran_success" = "0" -a "$OMPI_WANT_FORTRAN_BINDINGS" = "1" -a $ompi_fortran_happy -eq 1; then
273
219
AC_MSG_CHECKING ( [ if Fortran compiler and POSIX threads work as is] )
274
- if test "$HAVE_POSIX_THREADS" = "1" ; then
275
- run_this_test=1
276
- else
277
- case "${host_cpu}-${host_os}" in
278
- *solaris*)
279
- AC_MSG_RESULT ( [ no - Solaris, not checked] )
280
- run_this_test=0
281
- ;;
282
- *)
283
- run_this_test=1
284
- ;;
285
- esac
286
- fi
287
220
288
- if test "$run_this_test" = "1" ; then
289
- AC_LANG_PUSH ( C )
290
- OMPI_INTL_PTHREAD_TRY_LINK_FORTRAN(ompi_pthread_fortran_success=1,
291
- ompi_pthread_fortran_success=0)
292
- AC_LANG_POP ( C )
293
- if test "$ompi_pthread_fortran_success" = "1"; then
294
- AC_MSG_RESULT ( [ yes] )
295
- else
296
- AC_MSG_RESULT ( [ no] )
297
- fi
221
+ AC_LANG_PUSH ( C )
222
+ OMPI_INTL_PTHREAD_TRY_LINK_FORTRAN(ompi_pthread_fortran_success=1,
223
+ ompi_pthread_fortran_success=0)
224
+ AC_LANG_POP ( C )
225
+ if test "$ompi_pthread_fortran_success" = "1"; then
226
+ AC_MSG_RESULT ( [ yes] )
227
+ else
228
+ AC_MSG_RESULT ( [ no] )
298
229
fi
299
230
fi
300
231
] ) dnl
0 commit comments