- AS_IF([test "x$ac_cv_msg_nosignal" = "xyes"],[
- AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Define to 1 if you have a MSG_NOSIGNAL])])
- AS_IF([test "x$ac_cv_msg_dontwait" = "xyes"],[
- AC_DEFINE(HAVE_MSG_DONTWAIT, 1, [Define to 1 if you have a MSG_DONTWAIT])])
- AS_IF([test "x$ac_cv_msg_more" = "xyes"],[
- AC_DEFINE(HAVE_MSG_MORE, 1, [Define to 1 if you have a HAVE_MSG_MORE])])
-])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],[int flags= MSG_DONTWAIT])],[ac_cv_msg_dontwait="yes"])
+ AC_LANG_POP
+ AX_RESTORE_FLAGS])
+
+ AC_CACHE_CHECK([for MSG_MORE],[ac_cv_msg_more],
+ [AC_LANG_PUSH([C])
+ AX_SAVE_FLAGS
+ CFLAGS="$CFLAGS -I${srcdir}"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>], [int flags= MSG_MORE])], [ac_cv_msg_more="yes"])
+ AC_LANG_POP
+ AX_RESTORE_FLAGS])
+
+ AS_IF([test "x$ac_cv_msg_nosignal" = "xyes"],[AC_DEFINE([HAVE_MSG_NOSIGNAL],[1],[Define to 1 if you have a MSG_NOSIGNAL])])
+ AS_IF([test "x$ac_cv_msg_dontwait" = "xyes"],[AC_DEFINE([HAVE_MSG_DONTWAIT],[1],[Define to 1 if you have a MSG_DONTWAIT])])
+ AS_IF([test "x$ac_cv_msg_more" = "xyes"],[AC_DEFINE([HAVE_MSG_MORE],[1],[Define to 1 if you have a MSG_MORE])])
+ ])