1 # FIND_GHC_BOOTSTRAP_PROG()
2 # --------------------------------
3 # Parse the bootstrap GHC's compiler settings file for the location of things
4 # like the `llc` and `opt` commands.
6 # $1 = the variable to set
7 # $2 = The bootstrap compiler.
8 # $3 = The string to grep for to find the correct line.
10 AC_DEFUN([FIND_GHC_BOOTSTRAP_PROG],[
11 BootstrapTmpCmd=`grep $3 $($2 --print-libdir)/settings 2>/dev/null | sed 's/.*", "//;s/".*//'`
12 if test -n "$BootstrapTmpCmd" && test `basename $BootstrapTmpCmd` = $BootstrapTmpCmd ; then
13 AC_PATH_PROG([$1], [$BootstrapTmpCmd], "")