perf: Key the interpreter symbol cache by Name rather than FastString
[ghc.git] / m4 / find_ghc_bootstrap_prog.m4
blob4f9eb8bcbc90919c05157e669408fce19b7fd4dc
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], "")
14     else
15         $1=$BootstrapTmpCmd
16     fi