aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJacob Appelbaum <jacob@appelbaum.net>2013-04-23 20:35:15 -0700
committerJacob Appelbaum <jacob@appelbaum.net>2013-04-23 20:35:15 -0700
commit455a90cf939aee0cbeb8e4186f84771895bfa959 (patch)
tree18549f1803aca7b1c6d731b4add58ac7d1f91ad1 /configure.ac
parent27895e1358a05753cc5d198f4b4d9ec465eb7dbe (diff)
downloadtlsdate-455a90cf939aee0cbeb8e4186f84771895bfa959.tar.gz
Add support for building with Cygwin CYGWIN_NT-6.1 1.7.18(0.263/5/3)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index aa37bfa..696f8c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -273,6 +273,23 @@ case "$host" in
[""|yes|no], [UNPRIV_GROUP="nogroup"],
[*], [UNPRIV_GROUP=$with_unpriv_group])
AC_DEFINE_UNQUOTED([UNPRIV_GROUP], ["${UNPRIV_GROUP}"], [Unprivileged group])
+ ;;
+ *-cygwin*)
+ dnl This is for Cygwin
+ dnl Check for clock_gettime. Some systems put it into -lc, while
+ dnl others use -lrt. Try the first and fallback to the latter.
+ RT_LIB=
+ AC_CHECK_FUNC([clock_gettime], [:],
+ [AC_CHECK_LIB([rt], [clock_gettime], [RT_LIB="-lrt"],
+ [AC_MSG_ERROR([Your system lacks clock_gettime])])])
+ AC_SUBST(RT_LIB)
+ AC_ARG_WITH([unpriv-group],
+ [AS_HELP_STRING([--with-unpriv-group=<group>],
+ [Group to drop privs to @<:@default: nogroup@:>@])])
+ AS_CASE([$with_unpriv_group],
+ [""|yes|no], [UNPRIV_GROUP="nogroup"],
+ [*], [UNPRIV_GROUP=$with_unpriv_group])
+ AC_DEFINE_UNQUOTED([UNPRIV_GROUP], ["${UNPRIV_GROUP}"], [Unprivileged group])
case "$host" in
*-linux-androideabi)
dnl This is for Android NDK as it is a special case of linux