octave-patch-tracker
[Top][All Lists]
Advanced

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

[Octave-patch-tracker] [patch #8906] configure check support for c11 and


From: Mike Miller
Subject: [Octave-patch-tracker] [patch #8906] configure check support for c11 and c++11
Date: Tue, 09 Feb 2016 23:00:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0 Iceweasel/44.0

Update of patch #8906 (project octave):

                  Status:                    None => In Progress            

    _______________________________________________________

Follow-up Comment #1:

Have you looked at the autoconf-archive AX_CXX_COMPILE_STDCXX_11 macro? I
don't think we should use it verbatim, since it also tests for a huge set of
C++11 language features, but it has some ideas you might want to incorporate.

http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_cxx_compile_stdcxx.m4


E.g. you might want to loop over all possible flags in this order:
-std=gnu++11, -std=gnu++0x, -std=c++11, -std=c++0x. They also suggest other
flags for HP and Cray compilers (do we even support those?)

And the equivalent set for C11 would be: -std=gnu11, -std=c11, -std=gnu1x,
-std=c1x. Do you want to fall back to flags to enable C99 if C11 is not
supported?

The AC_SUBST are not needed for declaring new #define symbols, just AC_DEFINE
is enough.

I'm not sure if we even want to add a conditional that says whether the
compiler supports C11 or C++11 versus specific features, isn't this the same
as checking for library versions that we've said we want to avoid in favor of
feature tests?

For what you want to do, I would change this to just see if the compiler
allows (one of) the flags to be passed and add it to the XTRA_ flags if so,
but take away the HAVE_ symbols.

Then later if we decide we want to (conditionally) use specific library
features, say std::atan(std::complex) or std::thread(), add a specific feature
test for that function after the enabling compiler flag has already been
tested for and used if possible.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8906>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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