testsuite/IpeStats: Use Make rather than shell interpolation
[ghc.git] / m4 / fp_prog_ld_filelist.m4
blobe8bbbd80c2e08c583fbf691f7f48f49ab9330fbe
1 # FP_PROG_LD_FILELIST
2 # -------------------
3 # Sets the output variable LdHasFilelist to YES if ld supports
4 # -filelist, or NO otherwise.
5 AC_DEFUN([FP_PROG_LD_FILELIST],
7 AC_CACHE_CHECK([whether ld understands -filelist], [fp_cv_ld_has_filelist],
9     echo 'int foo() { return 0; }' > conftest1.c
10     echo 'int bar() { return 0; }' > conftest2.c
11     ${CC-cc} -c conftest1.c
12     ${CC-cc} -c conftest2.c
13     echo conftest1.o  > conftest.o-files
14     echo conftest2.o >> conftest.o-files
15     if $LD -r -filelist conftest.o-files -o conftest.o > /dev/null 2>&1
16     then
17         fp_cv_ld_has_filelist=yes
18     else
19         fp_cv_ld_has_filelist=no
20     fi
21     rm -rf conftest*
23 FP_CAPITALIZE_YES_NO(["$fp_cv_ld_has_filelist"], [LdHasFilelist])
24 AC_SUBST([LdHasFilelist])
25 ])# FP_PROG_LD_FILELIST