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