[Top][All Lists]

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

Re: AC_PROG_LIBTOOL changing ./configure compiler selection

From: Ralf Wildenhues
Subject: Re: AC_PROG_LIBTOOL changing ./configure compiler selection
Date: Tue, 14 Mar 2006 08:25:43 +0100
User-agent: Mutt/1.5.11

Hi Guillaume,

* Guillaume Rousse wrote on Mon, Mar 13, 2006 at 11:58:17PM CET:
> Ralf Wildenhues wrote:
> > * Guillaume Rousse wrote on Thu, Mar 09, 2006 at 05:09:30PM CET:
> >> I'm trying to convert a program creating static libraries only to
> >> libtool use. In, I just changed AC_PROG_RANLIB to
> >> AC_PROG_LIBTOOL. However, as a side-effect, configure script tries to
> >> use gcc instead of g++, and fails to find correct headers.

> >> AC_PROG_CC(cc gcc)
> >> AC_PROG_CXX(CC g++ gcc c++ cxx)
> >> AC_PROG_F77(f77 g77 f90 xlf90)
> >> ...
> >> AC_CHECK_HEADERS([cstdlib stdlib.h], [break],)
> > 
> > Try surrounding the tests that are supposed to use the C++ compiler by
> >   AC_LANG_PUSH(C++)
> >   AC_LANG_POP(C++)
> It works, thanks.
> Is it worth to be reported as a bug in AC_PROG_LIBTOOL ?

No, I don't think this is a bug.  You were previously relying on a bit
of luck, so to speak.  Always specifying the language in which tests are
to be performed is safe, even without AC_PROG_LIBTOOL.

You could probably even argue the other way round, in that

should not be using C++ for testing the headers, since that is what the
Autoconf manual implies, see
  info Autoconf "Language Choice"


reply via email to

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