automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

choosing compilers in config.ca


From: Matt Pratola
Subject: choosing compilers in config.ca
Date: Wed, 10 Apr 2019 15:59:25 -0400

Hello,

I am trying to write a config.ac script that will select between using a
regular C++ compiler or an MPI C++ compiler.  I have something like:

if [ test "x$with_mpi" = "xno"];
then
AC_PROG_CXX
else
AX_PROG_CXX_MPI
fi

Later on I check for C++11 support, and then regular build succeeds but the
MPI build fails.  However, if I change the order of the if statement above,
then the MPI build succeeds but the regular build fails (or using the mpi++
compiler even though it should not be set).

I am no bash scripting expert, but I am surprised the logic needs to be
more complicated than this?  I also tried using AS_IF instead, with similar
results.

TIA for any helpful hints.

Matt


reply via email to

[Prev in Thread] Current Thread [Next in Thread]