@@ -16,6 +16,7 @@ dnl Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved.
1616dnl Copyright (c) 2008-2020 Cisco Systems, Inc. All rights reserved.
1717dnl Copyright (c) 2015-2016 Research Organization for Information Science
1818dnl and Technology (RIST). All rights reserved.
19+ dnl Copyright (c) 2021 Nanook Consulting. All rights reserved.
1920dnl $COPYRIGHT $
2021dnl
2122dnl Additional copyrights may follow
@@ -33,7 +34,6 @@ AC_DEFUN([OMPI_PROG_CXX],[
3334
3435 ompi_cxxflags_save= " $CXXFLAGS "
3536 AC_PROG_CXX
36- AC_PROG_CXXCPP
3737 CXXFLAGS= " $ompi_cxxflags_save "
3838
3939 # Note: according to the Autoconf docs, if no C++ compiler is
@@ -43,13 +43,14 @@ AC_DEFUN([OMPI_PROG_CXX],[
4343 # https://www.open-mpi.org/community/lists/users/2013/02/21356.php,
4444 # which advises us to set Libtool precious variables to "no" if we
4545 # don't want Libtool to setup that language at all.
46- AS_IF([test " x$CXX " = " x" ], [CXX= no])
4746 set dummy $CXX
4847 ompi_cxx_argv0= [$]2
4948 OPAL_WHICH([$ompi_cxx_argv0 ], [OMPI_CXX_ABSOLUTE])
5049 AS_IF([test " x$OMPI_CXX_ABSOLUTE " = " x" ],
5150 [CXX= no
52- OMPI_CXX_ABSOLUTE= no])
51+ OMPI_CXX_ABSOLUTE= no],
52+ [ # If we did actually find a C++ compiler, find the C++ CPP
53+ AC_PROG_CXXCPP])
5354
5455 AC_DEFINE_UNQUOTED(OMPI_CXX, " $CXX " , [OMPI underlying C++ compiler])
5556 AC_SUBST(OMPI_CXX_ABSOLUTE)
0 commit comments