xref: /freebsd/contrib/ntp/sntp/m4/ntp_af_unspec.m4 (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1dnl ######################################################################
2dnl AF_UNSPEC checks
3AC_DEFUN([NTP_AF_UNSPEC], [
4
5# We could do a cv check here, but is it worth it?
6
7AC_COMPILE_IFELSE(
8  [AC_LANG_PROGRAM(
9    [[
10    	#include <sys/socket.h>
11	#ifndef AF_UNSPEC
12	#include "Bletch: AF_UNSPEC is undefined!"
13	#endif
14	#if AF_UNSPEC != 0
15	#include "Bletch: AF_UNSPEC != 0"
16	#endif
17    ]],
18    [AC_MSG_NOTICE([AF_UNSPEC is zero, as expected.])],
19    [AC_MSG_ERROR([AF_UNSPEC is not zero on this platform!])]
20  )]
21)])
22
23dnl ######################################################################
24