X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fconfigure.ac;h=ea1353ef7ffda04ae055bb335e3607079d6d95aa;hb=b734be7a047ce659cf3bc341bcdbf084bc51a3c7;hp=040041d0a3e2c4fc4107feb059b20b81f1c50514;hpb=f271c1f89f2f60d1416a029f1aa5ff2b33dd4be9;p=ghc-hetmet.git diff --git a/ghc/configure.ac b/ghc/configure.ac index 040041d..ea1353e 100644 --- a/ghc/configure.ac +++ b/ghc/configure.ac @@ -2,10 +2,17 @@ AC_INIT([Glasgow Haskell Compiler], [6.3], [glasgow-haskell-bugs@haskell.org], [ghc]) AC_CONFIG_SRCDIR([ghc.spec.in]) -# Compute the version number and the release, they are needed by the .spec file. -AC_SUBST([version], [[`sed 's/.* version \([0-9][0-9.]*\).*/\1/' VERSION`]]) +# Calculate project version as an integer, using 2 digits for minor version +case $PACKAGE_VERSION in + *.?) ProjectVersionInt=`echo "$PACKAGE_VERSION" | sed 's,^\(.*\)\.\(.\)$,\10\2,'` ;; + *.??) ProjectVersionInt=`echo "$PACKAGE_VERSION" | sed 's,^\(.*\)\.\(..\)$,\1\2,'` ;; + *) AC_MSG_ERROR([bad package version $PACKAGE_VERSION]) ;; +esac +AC_SUBST([ProjectVersionInt]) + +# Hmmm, we fix the RPM release number to 1 here... Is this convenient? AC_SUBST([release], [1]) # Write the results... -AC_CONFIG_FILES([ghc.spec]) +AC_CONFIG_FILES([ghc.spec VERSION docs/users_guide/ug-book.xml]) AC_OUTPUT