octave-maintainers
[Top][All Lists]
Advanced

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

Re: Requiring C++11 in configure.ac


From: Mike Miller
Subject: Re: Requiring C++11 in configure.ac
Date: Tue, 20 Jun 2017 16:18:48 -0700
User-agent: NeoMutt/20170306 (1.8.0)

On Tue, Jun 20, 2017 at 15:53:34 -0700, Rik wrote:
> So maybe after gnulib bootstrap has occurred and the compiler and flags
> have been determined we should check the version with
> 
> AC_LANG_PUSH(C++)
> AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
>                    #if (__cplusplus < 201103L)
>                    #  error "Octave requires a C++11 compiler"
>                    #endif
>                   ]], [])],
>                   [],
>                   [AC_MSG_ERROR([Octave requires a C++11 compiler])])
> AC_LONG_POP(C++)

I don't think we need this. My point earlier was that the checks we
already have don't throw an error, but they do exhaustively test the
compiler better than this, and do export shell variables like
ac_cv_prog_cxx_cxx11, ac_cv_prog_cxx_stdcxx, and ac_prog_cxx_stdcxx. I
think we can use one or more of these and declare our own error message.

The Autoconf manual explicitly documents the variables
ac_cv_prog_cxx_stdcxx and ac_cv_prog_cxx_cxx11, so I think it's safe to
depend on them.

The gnulib module is a backport of Autoconf's facility until everyone is
on Autoconf 2.70 or newer.

-- 
mike



reply via email to

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