1 # FP_MERGE_OBJECTS_SUPPORTS_RESPONSE_FILES
3 # See if whether we are using a version of the merge objects tool which supports response files.
4 AC_DEFUN([FP_MERGE_OBJECTS_SUPPORTS_RESPONSE_FILES], [
5 AC_MSG_CHECKING([whether $LD supports response files])
6 echo 'int funA(int x) {return x;}' > conftesta.c
7 echo 'int funB(int x) {return x;}' > conftestb.c
8 "$CC" -c -o conftesta.o conftesta.c > /dev/null 2>&1
9 "$CC" -c -o conftestb.o conftestb.c > /dev/null 2>&1
10 printf -- "-o\nconftest.o\nconftesta.o\nconftestb.o\n" > args.txt
11 "$MergeObjsCmd" "$MergeObjsArgs" @args.txt > /dev/null 2>&1
12 if ("$NM" conftest.o | grep "funA" > /dev/null 2>&1) && ("$NM" conftest.o | grep "funB" > /dev/null 2>&1)
14 MergeObjsSupportsResponseFiles=YES
17 MergeObjsSupportsResponseFiles=NO
20 rm -f conftesta.c conftestb.c conftesta.o conftestb.o conftest.o args.txt
21 AC_SUBST(MergeObjsSupportsResponseFiles)