xref: /freebsd/contrib/ntp/sntp/m4/ntp_facilitynames.m4 (revision 5b56413d04e608379c9a306373554a8e4d321bc0)
1dnl ######################################################################
2dnl Check syslog.h for 'facilitynames' table
3AC_DEFUN([NTP_FACILITYNAMES], [
4
5AC_CACHE_CHECK(
6    [for facilitynames in syslog.h],
7    [ac_cv_HAVE_SYSLOG_FACILITYNAMES],
8    [AC_COMPILE_IFELSE(
9	[AC_LANG_PROGRAM(
10	    [[
11		#define SYSLOG_NAMES
12		#include <stdlib.h>
13		#include <syslog.h>
14	    ]],
15	    [[
16		void *fnames = facilitynames;
17	    ]]
18	)]
19	[ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes],
20	[ac_cv_HAVE_SYSLOG_FACILITYNAMES=no]
21    )]
22)
23case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
24 yes)
25    AC_DEFINE([HAVE_SYSLOG_FACILITYNAMES], [1], [syslog.h provides facilitynames])
26    ;;
27 no)
28    AC_MSG_WARN([No facilitynames in <syslog.h>])
29esac
30])
31dnl ======================================================================
32