diff --git a/m4/fp_prog_ld_no_compact_unwind.m4 b/m4/fp_prog_ld_no_compact_unwind.m4
index 8cf4f7f30cab54255a5744c15cc46fa44d9f0fe3..f1adee3e89111d838637ea0947ec6e0fddcf9e95 100644
--- a/m4/fp_prog_ld_no_compact_unwind.m4
+++ b/m4/fp_prog_ld_no_compact_unwind.m4
@@ -6,7 +6,7 @@ AC_DEFUN([FP_PROG_LD_NO_COMPACT_UNWIND],
 [
 AC_CACHE_CHECK([whether ld understands -no_compact_unwind], [fp_cv_ld_no_compact_unwind],
 [
-case $build in
+case $target in
   *-darwin)
     echo 'int foo() { return 0; }' > conftest.c
     "${CC-cc}" -c conftest.c