octave-maintainers
[Top][All Lists]
Advanced

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

Re: Octave on windows testing


From: John W. Eaton
Subject: Re: Octave on windows testing
Date: Fri, 11 Mar 2016 17:15:21 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

On 03/11/2016 05:05 PM, Olaf Till wrote:
On Fri, Mar 11, 2016 at 10:35:15PM +0100, Olaf Till wrote:
Think I'll put my nose into the autoconf documentation again and try
to fiddle together something.

I think the best solution is to set, in configure.ac,

CXX=`mkoctfile -p CXX`

before

AC_PROG_CXX

and then check for $GXX. Whatever name in $CXX, AC_PROG_CXX seems to
check if it corresponds to g++ using a compilation test, so it should
work.

If you check based on the name of the executable, you could be easily fooled.

If you use a test program that has something like

  #ifdef __GNUC__

compilers like clang that sometimes try to pretend that they are behaving like GCC can mislead you.

And even if you can reliably determine that the compiler is GCC, there may be some time in the future when GCC doesn't support the feature you need. So I think that asking whether you are using GCC is the wrong question to ask.

If you really have no better way to accomplish what you want to do (and again, I think there must be a better way) then I think the best solution is to test for the feature that you need, not try to figure out what compiler it is that you are using.

jwe





reply via email to

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