testsuite/IpeStats: Use Make rather than shell interpolation
[ghc.git] / m4 / fp_prog_ld_flag.m4
blob59ceb9082ac61ffb4166fb8b9e34928769b80146
1 # FP_PROG_LD_FLAG
2 # ---------------
3 # Sets the output variable $2 to $1 if ld supports the $1 flag.
4 # Otherwise the variable's value is empty.
5 AC_DEFUN([FP_PROG_LD_FLAG],
7 AC_CACHE_CHECK([whether ld understands $1], [fp_cv_$2],
8 [echo 'int foo() { return 0; }' > conftest.c
9 ${CC-cc} -c conftest.c
10 if $LD -r $1 -o conftest2.o conftest.o > /dev/null 2>&1; then
11    fp_cv_$2=$1
12 else
13    fp_cv_$2=
15 rm -rf conftest*])
16 $2=$fp_cv_$2
17 ])# FP_PROG_LD_FLAG