diff --git a/configure.ac b/configure.ac index ca184f22f..69c0d93fb 100644 --- a/configure.ac +++ b/configure.ac @@ -616,13 +616,16 @@ dnl AC_DEFUN([RB_CHK_SYSHEADER], [ - AC_CHECK_HEADER([$1], - [ - AC_DEFINE([HAVE_$2], [1], [ Indication $1 is available. ]) - RB_DEFINE_UNQUOTED([INC_$2], [$1>], [ The computed-include location of $1. ]) - ], [ - RB_DEFINE_UNQUOTED([INC_$2], [stddef.h>], [ The dead-header in place of $1. ]) - ]) + if test -z "$rb_have_sysheader_$2"; then + AC_CHECK_HEADER([$1], + [ + rb_have_sysheader_$2=1; + AC_DEFINE([HAVE_$2], [1], [ Indication $1 is available. ]) + RB_DEFINE_UNQUOTED([INC_$2], [$1>], [ The computed-include location of $1. ]) + ], [ + RB_DEFINE_UNQUOTED([INC_$2], [stddef.h>], [ The dead-header in place of $1. ]) + ]) + fi ]) AC_HEADER_STDBOOL