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