diff --git a/configure.ac b/configure.ac
index c7429a68e691cab2c87979c0d486a4e3735d6a9d..aeb671e208030cac660eea9bc02e8b40c688b3db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,9 +28,12 @@ AM_MAINTAINER_MODE([disable])
 
 # Check building environment
 AC_PROG_CC_C99
+dnl The check above forgets to delete the following directory
+dnl generated by the MacOS linker, which results in multiple
+dnl annoying messages from the rm utility:
+rm -rf conftest.dSYM
 dnl verify the setup supports POSIX 2001
 ACX_PROG_CC_POSIX([2001])
-AM_PROG_CC_C_O
 AC_C_RESTRICT
 AC_PROG_FC
 AS_IF([test -n "$FC" && test "X$FC" != Xno],