On Thu, Jul 26, 2018 at 11:55 AM, Zack Weinberg <zackw@xxxxxxxxx> wrote: > On Thu, Jul 26, 2018 at 11:47 AM, Jeffrey Walton <noloader@xxxxxxxxx> wrote: >> >> AC_COMPILE_ELSEIF and AC_LINK_ELSEIF often misdetects which results in >> bad configurations and broken compiles on AIX with XL C/C++ and >> Solaris with SunCC. We found we can't use the macros. > > Could you please supply a short, self-contained configure.ac that > shows the problem? I don't think I understand the issue from your > description. Here's the AIX equivalent using IBM XL C/C++. I'm working from GCC119 on the compile farm (gcc119.fsffrance.org). $ cat configure.ac AC_INIT([Test], [1.0]) AC_PROG_CXX SAVED_CXXFLAGS="$CXXFLAGS" CXXFLAGS="-qrtti-nonsense" AC_MSG_CHECKING([for -qrtti-nonsense]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])] ) CXXFLAGS="$SAVED_CXXFLAGS" And the result: $ CXX=xlC ./configure checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... no checking whether xlC accepts -g... yes checking for -qrtti-nonsense... checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed yes And an XLC test program: $ cat test.cxx int main (int argc, char* argv) { return 0; } And the result: $ xlC -qrtti-nonsense test.cxx -o test.exe 1540-5200 (W) The option "rtti-nonsense" is not supported. $ echo $? 0 _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf