1111# Copyright (c) 2004-2012 The Regents of the University of California.
1212# All rights reserved.
1313# Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
14- # Copyright (c) 2008-2015 University of Houston. All rights reserved.
14+ # Copyright (c) 2008-2021 University of Houston. All rights reserved.
15+ # Copyright (c) 2021 Argonne National Laboratory. All rights
16+ # reserved.
1517# $COPYRIGHT$
1618#
1719# Additional copyrights may follow
@@ -27,11 +29,19 @@ AC_DEFUN([MCA_ompi_sharedfp_sm_CONFIG],[
2729
2830 sharedfp_sm_happy= no
2931 AC_CHECK_HEADER([semaphore.h],
30- [AC_CHECK_FUNCS([sem_open],[sharedfp_sm_happy= yes],[])])
31-
32+ [dnl requires potentially pthread library
33+ OPAL_SEARCH_LIBS_COMPONENT([sharedfp_sm],
34+ [sem_open], [pthread],
35+ [AC_CHECK_FUNCS([sem_open],
36+ [sharedfp_sm_happy= " yes" ],[])]
37+ )])
3238 AC_CHECK_HEADER([semaphore.h],
33- [AC_CHECK_FUNCS([sem_init],[sharedfp_sm_happy= yes],[])])
34-
39+ [dnl requires potentially pthread library
40+ OPAL_SEARCH_LIBS_COMPONENT([sharedfp_sm],
41+ [sem_init], [pthread],
42+ [AC_CHECK_FUNCS([sem_init],
43+ [sharedfp_sm_happy= " yes" ],[])]
44+ )])
3545 AS_IF([test " $sharedfp_sm_happy " = " yes" ],
3646 [$1 ],
3747 [$2 ])
0 commit comments