ax_save_flags

Synopsis

AX_SAVE_FLAGS([NAMESPACE])

Description

Save common compilation flags into temporary variables.

Compilation flags includes: CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS, OBJCFLAGS.

By default these flags are saved to a global (empty) namespace, but user could specify a specific NAMESPACE to AX_SAVE_FLAGS macro and latter restore it by using AX_RESTORE_FLAGS(NAMESPACE).

  AX_SAVE_FLAGS(mypackage)
  CPPFLAGS="-Imypackagespath ${CPPFLAGS}"
  dnl .. do some detection ...
  AX_RESTORE_FLAGS(mypackage)

Source Code

Download the latest version of ax_save_flags.m4 or browse the macro’s revision history.

License

Copyright © 2009 Filippo Giunchedi 
Copyright © 2011 The Board of Trustees of the Leland Stanford Junior University
Copyright © 2011 Russ Allbery 
Copyright © 2013 Bastien ROUCARIES 

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.