From: Dave Hart Date: Thu, 7 May 2009 05:19:36 +0000 (+0000) Subject: [Bug 784] Make --enable-linuxcaps the default when available X-Git-Tag: NTP_4_2_4P7_RC6~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=691d2f408321157e1076a42ef7941050011f65f2;p=thirdparty%2Fntp.git [Bug 784] Make --enable-linuxcaps the default when available add reference to refclock_jjy.c to ports/winnt/ntpd/ntpd.vcproj bk: 4a026f68xFunhJpBE4EdRFt_bgz3fw --- diff --git a/ChangeLog b/ChangeLog index a7ffbbdd1..f98dbb1f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ --- +* [Bug 784] Make --enable-linuxcaps the default when available * Updated JJY reference clock driver from Takao abe --- diff --git a/configure.ac b/configure.ac index a262e7ea4..94920c5cd 100644 --- a/configure.ac +++ b/configure.ac @@ -4232,8 +4232,6 @@ esac AC_CHECK_HEADERS(sys/clockctl.h) -AC_MSG_CHECKING([if we should use /dev/clockctl]) - case "$host" in *-*-netbsd*) ans=yes @@ -4248,62 +4246,65 @@ AC_ARG_ENABLE( [--enable-clockctl], [s Use /dev/clockctl for non-root clock control] ), - [ans=$enableval] + [ntp_use_dev_clockctl=$enableval], + [ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h] ) -case "$ac_cv_header_sys_clockctl_h" in - no) - ans=no -esac - -AC_MSG_RESULT([$ans]) - -case "$ans" in - yes) - AC_DEFINE(HAVE_DROPROOT, ,[Can we drop root privileges?]) -esac +AC_MSG_CHECKING([[if we should use /dev/clockctl]]) +AC_MSG_RESULT([$ntp_use_dev_clockctl]) AC_CHECK_HEADERS([sys/capability.h]) AC_CHECK_HEADERS([sys/prctl.h]) -AC_MSG_CHECKING([if we have linux capabilities (libcap)]) +AC_MSG_CHECKING([[if we have linux capabilities (libcap)]]) + +case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in + yesyes) + ntp_have_linuxcaps=yes + ;; + *) + ntp_have_linuxcaps=no +esac + +AC_MSG_RESULT([$ntp_have_linuxcaps]) + AC_ARG_ENABLE( [linuxcaps], AC_HELP_STRING( - [--enable-linuxcaps], - [s Use Linux capabilities for non-root clock control] + [--enable-linuxcaps], + [[s Use Linux capabilities for non-root clock control]] ), - [ans=$enableval], - [ans=no] + [ntp_have_linuxcaps=$enableval] ) -case "$ans$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in - yesyesyes) - ;; - *) - ans=no -esac - -AC_MSG_RESULT([$ans]) -case "$ans" in +case "$ntp_have_linuxcaps" in yes) - AC_DEFINE(HAVE_LINUX_CAPABILITIES, ,[Do we have Linux capabilities?]) - AC_DEFINE(HAVE_DROPROOT, ,[Can we drop root privileges?]) + AC_DEFINE(HAVE_LINUX_CAPABILITIES, ,[[Do we have Linux capabilities?]]) LIBS="$LIBS -lcap" esac -AC_CHECK_HEADERS(libscf.h) +case "$ntp_use_dev_clockctl$ntp_have_linuxcaps" in + *yes*) + AC_DEFINE(HAVE_DROPROOT, ,[[Can we drop root privileges?]]) +esac + + +AC_CHECK_HEADERS([libscf.h]) + case "$ac_cv_header_libscf_h" in yes) AC_SUBST(LSCF, [-lscf]) - ;; esac -AC_CHECK_FUNC(setppriv,AC_DEFINE(HAVE_SOLARIS_PRIVS, ,[Are Solaris privileges available?]), ) +AC_CHECK_FUNC( + [setppriv], + AC_DEFINE(HAVE_SOLARIS_PRIVS, ,[[Are Solaris privileges available?]]) +) + # # ISC stuff diff --git a/ports/winnt/ntpd/ntpd.vcproj b/ports/winnt/ntpd/ntpd.vcproj index 335e47330..79b64cacb 100644 --- a/ports/winnt/ntpd/ntpd.vcproj +++ b/ports/winnt/ntpd/ntpd.vcproj @@ -1439,6 +1439,10 @@ /> + +