aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJacob Appelbaum <jacob@appelbaum.net>2013-04-24 23:18:38 -0700
committerJacob Appelbaum <jacob@appelbaum.net>2013-04-24 23:18:38 -0700
commit5840f8c983fd0f07169d9aacb8f14215ef2154a5 (patch)
treee7f2c5025d341f56bc022271d7ad07c409bd3fa4 /configure.ac
parente69e044fe47e75e9b0793ab5f601a7f368da5733 (diff)
downloadtlsdate-5840f8c983fd0f07169d9aacb8f14215ef2154a5.tar.gz
add configure magic for GNU/kFreeBSD
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ca81844..14aead5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -184,6 +184,24 @@ case "$host" in
[*], [UNPRIV_GROUP=$with_unpriv_group])
AC_DEFINE_UNQUOTED([UNPRIV_GROUP], ["${UNPRIV_GROUP}"], [Unprivileged group])
;;
+ *kfreebsd*-gnu*)
+ dnl This is for Debian GNU/kFreeBSD
+ dnl clock_gettime is either part of libc or unavailable.
+ AC_CHECK_FUNC([clock_gettime], ,
+ [AC_MSG_ERROR([Your system lacks clock_gettime])])
+ dnl If the autoconf goo picks up a compiler that runs in pre-POSIX mode,
+ dnl the fmemopen prototype is hidden causing the unit tests to segfault.
+ dnl This can happen if gcc is a symlink to gcc46 and is preferred to clang.
+ AC_CHECK_FUNC([fmemopen], ,
+ [AC_MSG_ERROR([Missing fmemopen, unit tests are likely to segfault. Try CC=clang.])])
+ AC_ARG_WITH([unpriv-group],
+ [AS_HELP_STRING([--with-unpriv-group=<group>],
+ [Group to drop privs to @<:@default: nobody@:>@])])
+ AS_CASE([$with_unpriv_group],
+ [""|yes|no], [UNPRIV_GROUP="nobody"],
+ [*], [UNPRIV_GROUP=$with_unpriv_group])
+ AC_DEFINE_UNQUOTED([UNPRIV_GROUP], ["${UNPRIV_GROUP}"], [Unprivileged group])
+ ;;
*-netbsd*)
dnl This is for NetBSD
dnl clock_gettime is either part of libc or unavailable.