patchGNU Autoconf Archive - Patches: patch #7985, Feature additions to...

 
 

patch #7985: Feature additions to AX_CXX_COMPILE_STDCXX_11 macro

Submitted by:  None
Submitted on:  Thu 28 Mar 2013 05:35:19 PM UTC  
 
Priority: 3 - LowStatus: Done
Assigned to: Peter Simons <simons>Originator Email: -unavailable-
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 01 Apr 2013 11:23:07 AM UTC, comment #7:

The new version was pushed in commit ccd1d4f54b07b46b7e12b4b21b821a3f6e539d06. I've also updated the synopsis line to reflect the second argument that has been added.

I hope the macro is fine now?

Peter Simons <simons>
Project AdministratorIn charge of this item.
Fri 29 Mar 2013 11:08:56 PM UTC, comment #6:

Only one more nit from me:

this needs to be updated to mention the new second argument. Sorry for missing it earlier.

Zack Weinberg <zackw>
Fri 29 Mar 2013 10:40:23 PM UTC, comment #5:

Attempt 2 is attached.

(file #27718)

Roy Stogner <roystgnr>
Fri 29 Mar 2013 06:44:28 PM UTC, comment #4:

On experimentation, it appears that the effect of having AM_CONDITIONAL in a configure.ac that lacks AM_INIT_AUTOMAKE is mostly harmless (you get a pair of substitutions in config.status which probably aren't meaningful, but don't do any harm either). However, you cannot have AM_CONDITIONAL nested inside a shell conditional, and that by itself is (IMHO) a strong argument for not having it embedded in a macro.

Zack Weinberg <zackw>
Fri 29 Mar 2013 06:13:35 PM UTC, comment #3:

I'll try to have a version ready for upload with the bug and the criticisms fixed shortly (unless someone else has already started on it?); thanks for the feedback.

The only criticism-fix that should cause problems for me is the removal of AM_CONDITIONAL; however if the alternatives here are "my users need an extra line in their configure.ac" versus "users without automake can't use the macro" then the former is preferable.

Roy Stogner <roystgnr>
Fri 29 Mar 2013 05:52:32 PM UTC, comment #2:

There appears to be one outright bug: ax_cv_cxx_compile_cxx11_required is initialized to either 'true' or 'false', but is later tested against 'no'. (Use of 'true' and 'false' in this context is contra standard Autoconf practice, it should be 'yes' and 'no'.) If 'true' is replaced with 'yes' and 'false' with 'no', then the sense of the conditional is also backward.

I also have a few minor criticisms:

  • When the macro is used in "C++11 support is mandatory" mode, it should not set the shell variable HAVE_CXX11 nor should it make any AC_SUBST, AC_DEFINE, or AM_CONDITIONAL definitions.
  • The embedded use of AM_CONDITIONAL introduces an invisible dependency on automake; this should probably be removed altogether.
  • ax_cv_cxx_compile_cxx11_required is not the result of a test and should not have a cv name.
  • Use of 'true'/'false' to toggle mandatory/optional means that configure.ac will be less readable than it could be. Why not 'mandatory' or 'optional' keywords?
  • `dnl`s were removed in a few places, perhaps because they appeared to be unnecessary. Their purpose was to suppress extra blank lines in the generated configure script.
Zack Weinberg <zackw>
Fri 29 Mar 2013 05:29:34 PM UTC, comment #1:

I have pushed your patch in commit dca23d5eef837f335e13f946534eccb4ab416df5.

Zack, Benjamin, could you please take a look at those changes to check that everything is fine?

Peter Simons <simons>
Project AdministratorIn charge of this item.
Thu 28 Mar 2013 05:35:19 PM UTC, original submission:

The attached version of ax_cxx_compile_stdcxx_11.m4 has several changes:

The C++11 test code includes the "auto" keyword

AC_LANG_PUSH/POP rather than AC_LANG_ASSERT makes it more robust to use

An optional second argument makes it possible to test for C++11 and return the result with an AC_DEFINE/AC_SUBST/AM_CONDITIONAL without erroring out if support is not found.

This new version should be nearly backwards-compatible with the old; the obvious exception being when compilers which implement a subset of C++11 not including "auto" are used with codes for which that subset would have been sufficient.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #27718:  ax_cxx_compile_stdcxx_11.m4 added by roystgnr (4kB - application/x-m4)
file #27704:  ax_cxx_compile_stdcxx_11.m4 added by None (4kB - application/x-m4)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by roystgnr (Posted a comment)
  • -unavailable- added by zackw (Posted a comment)
  • -unavailable- added by simons (Posted a comment)
  • -unavailable- added by simons
  • -unavailable- added by simons
  • -unavailable- added by None (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 06 Apr 2013 12:59:43 PM UTCsimonsStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Fri 29 Mar 2013 10:40:23 PM UTCroystgnrAttached File-=>Added ax_cxx_compile_stdcxx_11.m4, #27718
    Fri 29 Mar 2013 05:29:34 PM UTCsimonsStatusNone=>Ready For Test
      Assigned toNone=>simons
      Carbon-Copy-=>Added -unavailable-
      Carbon-Copy-=>Added -unavailable-
    Thu 28 Mar 2013 05:35:19 PM UTCNoneAttached File-=>Added ax_cxx_compile_stdcxx_11.m4, #27704

    Back to the top


    Powered by Savane 3.1-cleanup