summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2008-04-30 15:06:00 -0700
committerDan Nicholson <dbn.lists@gmail.com>2008-05-05 14:21:28 -0700
commit00994ac08cb84937ca1e35b7a556d8924229bacb (patch)
treef5d5f53953e25610826567a02b0a409e36fdbb81 /configure.ac
parent2ed0f7278e389ecc0cf568518799a9a8f33b1365 (diff)
autoconf: Scrape the version from configs/default
Added the make script version.mk to print the various version numbers from configs/default. This is used to substitute the version in autoconf rather than duplicating it in both places.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 10 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 1e9a7981f8..fc8c346138 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,11 +2,17 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ(2.59)
-dnl Versioning
-dnl Make version number available to autoconf and configure
-m4_define([mesa_version],[7.1.0])
+dnl Versioning - scrape the version from configs/default
+m4_define([mesa_version],
+ [m4_esyscmd([${MAKE-make} -s -f bin/version.mk version | tr -d '\n'])])
+m4_ifval(mesa_version,[],[
+ m4_errprint([Error: Failed to get the Mesa version from the output of
+ running `make -f bin/version.mk version'
+])
+ m4_exit([1])
+])
-AC_INIT([Mesa],[mesa_version()],
+AC_INIT([Mesa],[mesa_version],
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
AC_CONFIG_AUX_DIR(bin)
AC_CANONICAL_HOST