On Sun, 5 Aug 2018 at 00:17, Jeffrey Walton <noloader@xxxxxxxxx> wrote: > I'm testing different configurations of a C++ library. When I test on > AIX with XLC I am catching an error: > > -bash-4.4$ OBJECT_MODE=64 CXX=xlC ./configure > checking for a BSD-compatible install... ./install-sh -c > checking whether build environment is sane... yes > checking for a thread-safe mkdir -p... ./install-sh -c -d > checking for gawk... gawk > checking whether make sets $(MAKE)... yes > checking whether make supports nested variables... yes > checking for style of include used by make... GNU > checking for gcc... gcc > checking whether the C compiler works... no > configure: error: in `/home/noloader/cryptopp': > configure: error: C compiler cannot create executables > See `config.log' for more details > ... > > The problem is using the wrong compiler: > > configure:3381: gcc conftest.c >&5 > Assembler: > /tmp/cczCkD4X.s: line 9: Only .llong should be used for relocatable > expressions. > configure:3385: $? = 1 > configure:3423: result: no > > Our configure.ac has AC_PROG_CXX after the various init's, and lacks > AC_PROG_CC. We don't do anything with the C compiler because we are a > C++ library. > > How do we tell Autoconf to use the specified C++ compiler for all tests? > > > Your Autoconf test needs to be wrapped around with AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]). -- VH _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf