-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configury: fix configure --disable-mpi-cxx when no C++ compiler is av… #1860
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,7 +198,8 @@ AC_DEFUN([OPAL_INTL_POSIX_THREADS_PLAIN_CXX], [ | |
# | ||
# C++ compiler | ||
# | ||
if test "$opal_pthread_cxx_success" = "0"; then | ||
if test "$opal_pthread_cxx_success" = "0" && \ | ||
test "$WANT_MPI_CXX_SUPPORT" -eq; then | ||
AC_MSG_CHECKING([if C++ compiler and POSIX threads work as is]) | ||
|
||
AC_LANG_PUSH(C++) | ||
|
@@ -251,9 +252,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CC], | |
[OPAL_INTL_POSIX_THREADS_PLAIN_C], | ||
[opal_pthread_c_success=1]) | ||
|
||
AC_PROVIDE_IFELSE([AC_PROG_CXX], | ||
[OPAL_INTL_POSIX_THREADS_PLAIN_CXX], | ||
[opal_pthread_cxx_success=1]) | ||
AS_IF([test "$WANT_MPI_CXX_SUPPORT" = 1], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. on OS X with FreePGI, there is no c++ compiler, so configure falls back to g++, and pgcc does not work out of the box with g++, so pthread tests fail. makes sense ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right -- I understand what There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my understanding is that this is here to support autotools that do not define/provide the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see Do you want to get rid of the use of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the test be Which raises the question, how do we test if there is a working c++ compiler ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think /me goes to test... It looks like configure sets The only place we have C++ in the code base is in the MPI C++ bindings (and examples), but those aren't even built by default any more. I wonder if this whole C++ section of configure is in need of a bit of revamping / simplification... |
||
[AC_PROVIDE_IFELSE([AC_PROG_CXX], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually can't find any documentation on But if that's correct, it's been used entirely wrong in this m4 file (and likely should be removed). Specifically: I'm trying to figure out why your new test on |
||
[OPAL_INTL_POSIX_THREADS_PLAIN_CXX], | ||
[opal_pthread_cxx_success=1])]) | ||
|
||
AC_PROVIDE_IFELSE([AC_PROG_FC], | ||
[OPAL_INTL_POSIX_THREADS_PLAIN_FC], | ||
|
@@ -379,9 +381,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CC], | |
[OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS_C], | ||
[opal_pthread_c_success=1]) | ||
|
||
AC_PROVIDE_IFELSE([AC_PROG_CXX], | ||
[OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS_CXX], | ||
[opal_pthread_cxx_success=1]) | ||
AS_IF([test "$WANT_MPI_CXX_SUPPORT" = 1], | ||
[AC_PROVIDE_IFELSE([AC_PROG_CXX], | ||
[OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS_CXX], | ||
[opal_pthread_cxx_success=1])]) | ||
|
||
AC_PROVIDE_IFELSE([AC_PROG_FC], | ||
[OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS_FC], | ||
|
@@ -568,9 +571,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CC], | |
[OPAL_INTL_POSIX_THREADS_LIBS_C], | ||
[opal_pthread_c_success=1]) | ||
|
||
AC_PROVIDE_IFELSE([AC_PROG_CXX], | ||
[OPAL_INTL_POSIX_THREADS_LIBS_CXX], | ||
[opal_pthread_cxx_success=1]) | ||
AS_IF([test "$WANT_MPI_CXX_SUPPORT" = 1], | ||
[AC_PROVIDE_IFELSE([AC_PROG_CXX], | ||
[OPAL_INTL_POSIX_THREADS_LIBS_CXX], | ||
[opal_pthread_cxx_success=1])]) | ||
|
||
AC_PROVIDE_IFELSE([AC_PROG_FC], | ||
[OPAL_INTL_POSIX_THREADS_LIBS_FC], | ||
|
@@ -661,6 +665,10 @@ if test "$OMPI_TRY_FORTRAN_BINDINGS" = "$OMPI_FORTRAN_NO_BINDINGS" || \ | |
opal_pthread_fortran_success=1 | ||
fi | ||
|
||
if test "$WANT_MPI_CXX_SUPPORT" -ne 1; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you use the numeric test operators, you shouldn't need to use quotes on the variable under test (because it had better be guaranteed to be a number). |
||
opal_pthread_cxx_success=1 | ||
fi | ||
|
||
if test "$opal_pthread_c_success" = "1" && \ | ||
test "$opal_pthread_cxx_success" = "1" && \ | ||
test "$opal_pthread_fortran_success" = "1"; then | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing RHS 1.