2008-10-28 20:22:29 +03:00
|
|
|
dnl
|
2010-07-30 22:59:34 +04:00
|
|
|
dnl Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl University Research and Technology
|
|
|
|
dnl Corporation. All rights reserved.
|
|
|
|
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
dnl of Tennessee Research Foundation. All rights
|
|
|
|
dnl reserved.
|
|
|
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
dnl University of Stuttgart. All rights reserved.
|
|
|
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
dnl All rights reserved.
|
2010-03-17 02:10:50 +03:00
|
|
|
dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
2011-06-09 23:45:29 +04:00
|
|
|
dnl Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved.
|
2014-05-07 01:16:29 +04:00
|
|
|
dnl Copyright (c) 2014 Intel, Inc. All rights reserved
|
2014-10-21 14:13:19 +04:00
|
|
|
dnl Copyright (c) 2015 Research Organization for Information Science
|
|
|
|
dnl and Technology (RIST). All rights reserved.
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl $COPYRIGHT$
|
|
|
|
dnl
|
|
|
|
dnl Additional copyrights may follow
|
|
|
|
dnl
|
|
|
|
dnl $HEADER$
|
|
|
|
dnl
|
|
|
|
|
2010-03-17 02:10:50 +03:00
|
|
|
AC_DEFUN([OPAL_CONFIG_THREADS],[
|
2008-10-28 20:22:29 +03:00
|
|
|
#
|
|
|
|
# Arguments: none
|
|
|
|
#
|
|
|
|
# Dependencies: None
|
|
|
|
#
|
|
|
|
# Modifies:
|
|
|
|
# none - see called tests
|
|
|
|
#
|
|
|
|
# configure threads
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
2014-10-21 14:49:58 +04:00
|
|
|
# Check we have POSIX threads
|
2008-10-28 20:22:29 +03:00
|
|
|
#
|
2014-05-07 01:16:29 +04:00
|
|
|
OPAL_CONFIG_POSIX_THREADS(HAVE_POSIX_THREADS=1, HAVE_POSIX_THREADS=0)
|
2008-10-28 20:22:29 +03:00
|
|
|
AC_MSG_CHECKING([for working POSIX threads package])
|
|
|
|
if test "$HAVE_POSIX_THREADS" = "1" ; then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
|
|
|
export HAVE_POSIX_THREADS
|
|
|
|
|
|
|
|
#
|
2013-12-14 00:07:11 +04:00
|
|
|
# Ask what threading we want (allow posix right now)
|
2008-10-28 20:22:29 +03:00
|
|
|
#
|
|
|
|
|
2014-10-21 14:13:19 +04:00
|
|
|
if test "$HAVE_POSIX_THREADS" = "0"; then
|
|
|
|
AC_MSG_WARN(["*** POSIX threads are not"])
|
|
|
|
AC_MSG_WARN(["*** available on your system "])
|
|
|
|
AC_MSG_ERROR(["*** Can not continue"])
|
2008-10-28 20:22:29 +03:00
|
|
|
fi
|
|
|
|
|
2014-10-21 14:13:19 +04:00
|
|
|
THREAD_CFLAGS="$PTHREAD_CFLAGS"
|
|
|
|
THREAD_FCFLAGS="$PTHREAD_FCFLAGS"
|
|
|
|
THREAD_CXXFLAGS="$PTHREAD_CXXFLAGS"
|
|
|
|
THREAD_CPPFLAGS="$PTHREAD_CPPFLAGS"
|
|
|
|
THREAD_CXXCPPFLAGS="$PTHREAD_CXXCPPFLAGS"
|
|
|
|
THREAD_LDFLAGS="$PTHREAD_LDFLAGS"
|
|
|
|
THREAD_LIBS="$PTHREAD_LIBS"
|
2008-10-28 20:22:29 +03:00
|
|
|
|
2014-10-21 14:13:19 +04:00
|
|
|
OPAL_CHECK_PTHREAD_PIDS
|
2008-10-28 20:22:29 +03:00
|
|
|
|
2013-12-13 23:40:12 +04:00
|
|
|
AC_DEFINE_UNQUOTED([OPAL_ENABLE_MULTI_THREADS], [1],
|
2010-03-17 02:10:50 +03:00
|
|
|
[Whether we should enable thread support within the OPAL code base])
|
2009-11-25 02:20:37 +03:00
|
|
|
|
2008-10-28 20:22:29 +03:00
|
|
|
])dnl
|
|
|
|
|