summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2015-07-01 23:40:36 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2015-07-02 11:54:12 +0100
commite5653d5f1d1b349ec320b056d3e6e17008c256a7 (patch)
treea40899fe45400137528f824f068ae84c878670e0 /configure.ac
parent0a01a190f6f7b2256d6efdd49018f43023f389dd (diff)
build: Add an option to not use the git hash in version
When developing, it's quite annoying that the version changes every commit, causing the library to be rebuild and every single binary re-linked. Add a config option to skip that. I remember Ville asking for this "feature" as well. v2: Option is now called --disable-git-hash (Thomas) Various spelling mistakes (Thomas) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4208f000..a69a3815 100644
--- a/configure.ac
+++ b/configure.ac
@@ -212,6 +212,13 @@ if test "x$enable_debug" = xyes; then
AC_SUBST([DEBUG_CFLAGS])
fi
+# prevent relinking the world on every commit for developers
+AC_ARG_ENABLE(git-hash,
+ AS_HELP_STRING([--disable-git-hash],
+ [Do not use git hash in version]),
+ [git_hash=$enableval], [git_hash=yes])
+AM_CONDITIONAL(SKIP_GIT_HASH, [test "x$git_hash" = xno])
+
# -----------------------------------------------------------------------------
# To build multithread code, gcc uses -pthread, Solaris Studio cc uses -mt