[hipl-commit] [trunk] Rev 4214: Write the build-time configuration to config.h.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Fri, 9 Apr 2010 17:52:00 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 09/04/2010 at 17:52:00
Revision: 4214
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Write the build-time configuration to config.h.
  
  This will be reused in program debug output.

Modified:
  M  configure.ac

=== modified file 'configure.ac'
--- configure.ac        2010-04-09 14:34:54 +0000
+++ configure.ac        2010-04-09 14:51:27 +0000
@@ -3,6 +3,15 @@
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 
+# This needs to be placed before AM_INIT_AUTOMAKE, otherwise $@ is modified.
+# Note that the value of $@ changes if configure is rerun automatically during
+# a rebuild. In this case "--no-create --no-recursion" appear to get passed to
+# configure in addition to the stored command line options. Since this is a
+# harmless sideeffect, it is ignored. Clean release builds should be made from
+# a pristine tree.
+AC_DEFINE_UNQUOTED(HIPL_CONFIGURATION, "$@")
+AH_TEMPLATE(HIPL_CONFIGURATION, [options passed to configure])
+
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_INSTALL

Other related posts:

  • » [hipl-commit] [trunk] Rev 4214: Write the build-time configuration to config.h. - Diego Biurrun