xref: /freebsd/contrib/ntp/sntp/m4/ntp_facilitynames.m4 (revision 193d9e768ba63fcfb187cfd17f461f7d41345048)
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