Skip to content

Commit 8f8e9b8

Browse files
authored
Merge pull request #8545 from shintaro-iwasaki/topic/sharedfp-sm-configure-fix
sharedfp/sm: fix configure
2 parents ab3ae3c + 42a6cca commit 8f8e9b8

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

ompi/mca/sharedfp/sm/configure.m4

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
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

Comments
 (0)