summaryrefslogtreecommitdiff
path: root/m4/bootstrapping_ghc_info_field.m4
blob: 54936263cd0a60e87433c1d1226768c3880d9824 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# BOOTSTRAPPING_GHC_INFO_FIELD
# --------------------------------
# Set the variable $1 to the value of the ghc --info field $2.
AC_DEFUN([BOOTSTRAPPING_GHC_INFO_FIELD],[
$1=`"$WithGhc" --info | grep "^ ,(\"$2\"," | sed -e 's/.*","//' -e 's/")$//'`
tmp=${$1#\$topdir/}
if test "${$1}" != "$tmp"
then
    topdir=`"$WithGhc" --print-libdir | sed 's#\\\\#/#g'`
    $1="$topdir/$tmp"
fi
AC_SUBST($1)
])