Skip to content

Commit 17e84ca

Browse files
committed
Added linking of libpthread in non-MPI compilation and added a configure message if MPI is disabled
1 parent 1c8949e commit 17e84ca

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

configure.ac

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,18 @@ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]],
4040
AC_ARG_ENABLE([mpi],
4141
AS_HELP_STRING([--disable-mpi], [Disable MPI. User will need to manually assign the rank index to the AD instances.]), [], [enable_mpi=yes])
4242

43-
AS_IF([test "x$enable_mpi" != "xno"], [
43+
AS_IF(
44+
[test "x$enable_mpi" != "xno"], [
4445
#Check we can compile with MPI
4546
AC_MSG_NOTICE([MPI use is enabled, checking compilation with MPI is possible])
4647
AC_CHECK_HEADER(mpi.h, [], [AC_MSG_FAILURE([["Cannot find MPI header"]])] )
4748
AC_DEFINE([USE_MPI],[1],[Use MPI])
48-
])
49+
],
50+
[test "x$enable_mpi" == "xno"], [
51+
AC_MSG_NOTICE([MPI use is disabled])
52+
LIBS+="-lpthread"
53+
]
54+
)
4955

5056

5157
#Check for curl config and library

0 commit comments

Comments
 (0)