- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[@%:@include <unistd.h>]],
- [[@%:@if _POSIX_VERSION < 199009L && \
- (defined unix || defined _unix || defined _unix_ \
- || defined __unix || defined __unix__)
- @%:@error "'free (NULL)' is not known to work"
- @%:@endif]])],
- [gl_cv_func_free=yes],
- [gl_cv_func_free=no])])
+ [case "$host_os" in
+ mingw*) gl_cv_func_free=yes ;;
+ *)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[@%:@include <unistd.h>]],
+ [[@%:@if _POSIX_VERSION < 199009L && \
+ (defined unix || defined _unix || defined _unix_ \
+ || defined __unix || defined __unix__)
+ @%:@error "'free (NULL)' is not known to work"
+ @%:@endif]])],
+ [gl_cv_func_free=yes],
+ [gl_cv_func_free=no])
+ esac
+ ])