--- dante-1.4.2/acinclude.m4.orig 2017-01-23 20:28:08.000000000 +0100 +++ dante-1.4.2/acinclude.m4 2017-04-16 11:08:02.385924479 +0200 @@ -1106,6 +1106,8 @@ dnl test function that tries to determine if a specified errno error exists m4_define([checkerrno], [AC_MSG_CHECKING(for errno symbol $3) + CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -P" AC_PREPROC_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[ @@ -1117,7 +1119,9 @@ [AC_MSG_RESULT([OK]) $1="$$1 $3" cat conftest.i | grep errnoval: >>$2], - [AC_MSG_RESULT([no])])]) + [AC_MSG_RESULT([no])]) + CPPFLAGS="$CPPFLAGS_save" +]) AC_DEFUN([L_CHECKERRNO], [checkerrno($@)]) @@ -1127,8 +1131,11 @@ dnl test function that tries to determine if a specified errno error exists m4_define([checkgaierror], [AC_MSG_CHECKING(for getaddrinfo() error $3) + CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -P" AC_PREPROC_IFELSE( [AC_LANG_PROGRAM([[ +//#define _GNU_SOURCE 1 #include #include #include ]], @@ -1142,7 +1149,9 @@ $1="$$1 $3" AC_DEFINE(HAVE_ERR_$3, 1, [$3 gai error found]) cat conftest.i | grep gaierrval: >>$2], - [AC_MSG_RESULT([no])])]) + [AC_MSG_RESULT([no])]) + CPPFLAGS="$CPPFLAGS_save" +]) AC_DEFUN([L_CHECKGAIERROR], [checkgaierror($@)])