freebsd-skq/contrib/ntp/sntp/m4/ntp_facilitynames.m4
Cy Schubert 2b15cb3d09 MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
Thanks to roberto for providing pointers to wedge this into HEAD.

Approved by:	roberto
2015-03-30 13:30:15 +00:00

25 lines
797 B
Plaintext

dnl ######################################################################
dnl Check syslog.h for 'facilitynames' table
AC_DEFUN([NTP_FACILITYNAMES], [
AC_CACHE_CHECK([for facilitynames in syslog.h],ac_cv_HAVE_SYSLOG_FACILITYNAMES,[
AC_TRY_COMPILE([
#define SYSLOG_NAMES
#include <stdlib.h>
#include <syslog.h>
],
[ void *fnames; fnames = facilitynames; ],
ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes,ac_cv_HAVE_SYSLOG_FACILITYNAMES=no,ac_cv_HAVE_SYSLOG_FACILITYNAMES=cross)])
case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
yes)
AC_DEFINE(HAVE_SYSLOG_FACILITYNAMES,1,[ ])
;;
no)
AC_MSG_WARN([No facilitynames in <syslog.h>])
;;
cross)
AC_MSG_WARN([facilitynames in <syslog.h> - cross-compiling])
;;
esac
])
dnl ======================================================================