1 # Initialise and check sanity.
2 AC_INIT([Glasgow Haskell Compiler], [6.3], [glasgow-haskell-bugs@haskell.org], [ghc])
3 AC_CONFIG_SRCDIR([ghc.spec.in])
5 # Calculate project version as an integer, using 2 digits for minor version
6 case $PACKAGE_VERSION in
7 *.?) ProjectVersionInt=`echo "$PACKAGE_VERSION" | sed 's,^\(.*\)\.\(.\)$,\10\2,'` ;;
8 *.??) ProjectVersionInt=`echo "$PACKAGE_VERSION" | sed 's,^\(.*\)\.\(..\)$,\1\2,'` ;;
9 *.?.*) ProjectVersionInt=`echo "$PACKAGE_VERSION" | sed 's,^\(.*\)\.\(.\)\.\(.*\)$,\10\2,'` ;;
10 *.??.*) ProjectVersionInt=`echo "$PACKAGE_VERSION" | sed 's,^\(.*\)\.\(..\)\.\(.*\)$,\1\2,'` ;;
11 *) AC_MSG_ERROR([bad package version $PACKAGE_VERSION]) ;;
13 AC_SUBST([ProjectVersionInt])
15 # Hmmm, we fix the RPM release number to 1 here... Is this convenient?
16 AC_SUBST([release], [1])
18 # Write the results...
19 AC_CONFIG_FILES([ghc.spec VERSION docs/users_guide/ug-book.xml mk/version.mk])