Skip to content

Commit 35911c5

Browse files
sharedfp/sm: fix configure to define HAVE_SEM_XXX
HAVE_SEM_OPEN and HAVE_SEM_INIT are used by sharedfp/sm, but OPAL_SEARCH_LIBS_COMPONENT(), which works similarly to AC_CHECK_FUNCS(), does not define them. This patch adds AC_CHECK_FUNCS() to define those macros in opal_config.h. Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
1 parent 26dd34f commit 35911c5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ompi/mca/sharedfp/sm/configure.m4

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ AC_DEFUN([MCA_ompi_sharedfp_sm_CONFIG],[
3030
[dnl requires potentially pthread library
3131
OPAL_SEARCH_LIBS_COMPONENT([sharedfp_sm],
3232
[sem_open], [pthread],
33-
[sharedfp_sm_happy="yes"])])
34-
33+
[AC_CHECK_FUNCS([sem_open],
34+
[sharedfp_sm_happy="yes"],[])]
35+
)])
3536
AC_CHECK_HEADER([semaphore.h],
3637
[dnl requires potentially pthread library
3738
OPAL_SEARCH_LIBS_COMPONENT([sharedfp_sm],
3839
[sem_init], [pthread],
39-
[sharedfp_sm_happy="yes"])])
40-
40+
[AC_CHECK_FUNCS([sem_init],
41+
[sharedfp_sm_happy="yes"],[])]
42+
)])
4143
AS_IF([test "$sharedfp_sm_happy" = "yes"],
4244
[$1],
4345
[$2])

0 commit comments

Comments
 (0)