Fix path to Cabal library, corrects documentation.
authorLennart Kolmodin <kolmodin@google.com>
Wed, 20 Jul 2011 13:14:03 +0000 (15:14 +0200)
committerIan Lynagh <igloo@earth.li>
Tue, 2 Aug 2011 20:25:54 +0000 (21:25 +0100)
aclocal.m4
configure.ac

index f8dafac..680e0a8 100644 (file)
@@ -1570,12 +1570,14 @@ fi
 AC_SUBST($1)
 ])
 
-# LIBRARY_VERSION(lib)
+# LIBRARY_VERSION(lib, [dir])
 # --------------------------------
 # Gets the version number of a library.
 # If $1 is ghc-prim, then we define LIBRARY_ghc_prim_VERSION as 1.2.3
+# $2 points to the directory under libraries/
 AC_DEFUN([LIBRARY_VERSION],[
-LIBRARY_[]translit([$1], [-], [_])[]_VERSION=`grep -i "^version:" libraries/$1/$1.cabal | sed "s/.* //"`
+dir=m4_default([$2],[$1])
+LIBRARY_[]translit([$1], [-], [_])[]_VERSION=`grep -i "^version:" libraries/${dir}/$1.cabal | sed "s/.* //"`
 AC_SUBST(LIBRARY_[]translit([$1], [-], [_])[]_VERSION)
 ])
 
index 74c190b..31a4692 100644 (file)
@@ -916,7 +916,7 @@ AC_SUBST(BUILD_DOCBOOK_PS)
 AC_SUBST(BUILD_DOCBOOK_PDF)
 
 LIBRARY_VERSION(base)
-LIBRARY_VERSION(Cabal)
+LIBRARY_VERSION(Cabal, Cabal/cabal)
 LIBRARY_VERSION(ghc-prim)
 LIBRARY_ghc_VERSION="$ProjectVersion"
 AC_SUBST(LIBRARY_ghc_VERSION)