Fix the build for non-GNU-ar
[ghc-hetmet.git] / aclocal.m4
index 275b2e4..42b8ed5 100644 (file)
@@ -395,6 +395,7 @@ else
   fp_cv_prog_ar_is_gnu=no
 fi])
 fp_prog_ar_is_gnu=$fp_cv_prog_ar_is_gnu
+AC_SUBST([ArIsGNUAr], [`echo $fp_prog_ar_is_gnu | tr 'a-z' 'A-Z'`])
 ])# FP_PROG_AR_IS_GNU
 
 
@@ -1329,10 +1330,11 @@ case "$1" in
 
 # LIBRARY_VERSION(lib)
 # --------------------------------
-# Gets the version number of a library
+# Gets the version number of a library.
+# If $1 is ghc-prim, then we define LIBRARY_ghc_prim_VERSION as 1.2.3
 AC_DEFUN([LIBRARY_VERSION],[
-LIBRARY_$1_VERSION=`grep -i "^version:" libraries/$1/$1.cabal | sed "s/.* //"`
-AC_SUBST(LIBRARY_$1_VERSION)
+LIBRARY_[]translit([$1], [-], [_])[]_VERSION=`grep -i "^version:" libraries/$1/$1.cabal | sed "s/.* //"`
+AC_SUBST(LIBRARY_[]translit([$1], [-], [_])[]_VERSION)
 ])
 
 # LocalWords:  fi