summary refs log tree commit diff
path: root/configure.ac
blob: f2a27a9c314cb8988de0587e8e5417d464ddb33f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright (c) 2014-2015 Brent Cook
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

AC_INIT([libretls], m4_esyscmd([tr -d '\n' < VERSION]))
AC_SUBST([LIBTLS_VERSION], m4_esyscmd([tr -d '\n' < LIBTLS_VERSION]))

AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([subdir-objects foreign])
AC_CONFIG_MACRO_DIR([m4])

m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

# This must be saved before AC_PROG_CC
USER_CFLAGS="$CFLAGS"

AC_PROG_CC([cc gcc])
AC_PROG_CC_STDC
AM_PROG_CC_C_O
LT_INIT([pic-only])

CHECK_OS_OPTIONS

CHECK_C_HARDENING_OPTIONS

DISABLE_AS_EXECUTABLE_STACK
AM_PROG_AS

DISABLE_COMPILER_WARNINGS

CHECK_LIBC_COMPAT
CHECK_CRYPTO_COMPAT
CHECK_VA_COPY

AC_MSG_CHECKING([if .gnu.warning accepts long strings])
AC_LINK_IFELSE([AC_LANG_SOURCE([[
extern void SSLv3_method();
__asm__(".section .gnu.warning.SSLv3_method\n\t.ascii \"SSLv3_method is insecure\"\n\t.text");
int main() {return 0;}
]])], [
    AC_DEFINE(HAS_GNU_WARNING_LONG, 1, [Define if .gnu.warning accepts long strings.])
    AC_MSG_RESULT(yes)
], [
   AC_MSG_RESULT(no)
])

# Check if time_t is sized correctly
AC_CHECK_SIZEOF([time_t], [time.h])

AX_CHECK_OPENSSL([], [AC_MSG_ERROR([unable to find OpenSSL])])

AC_CONFIG_FILES([
	Makefile
	include/Makefile
	man/Makefile
	libtls.pc
])

AM_CONDITIONAL([SMALL_TIME_T], [test "$ac_cv_sizeof_time_t" = "4"])
if test "$ac_cv_sizeof_time_t" = "4"; then
    AC_DEFINE([SMALL_TIME_T])
    echo " ** Warning, this system is unable to represent times past 2038"
    echo " ** It will behave incorrectly when handling valid RFC5280 dates"

    if test "$host_os" = "mingw32" ; then
        echo " **"
        echo " ** You can solve this by adjusting the build flags in your"
        echo " ** mingw-w64 toolchain. Refer to README.windows for details."
    fi
fi

AC_OUTPUT
lass='logsubject'>Add catsit-timer utilityJune McEnroe 2021-02-25Add catsit-watch utilityJune McEnroe 2021-02-01Drop pledge privileges after daemonization 1.2June McEnroe 2021-02-01Remove use of "%n"June McEnroe https://cvsweb.openbsd.org/src/lib/libc/stdio/vfprintf.c?rev=1.79&content-type=text/x-cvsweb-markup I think this is silly, as I've said elsewhere, and it's a shame because that was clearly the best way to write this. Oh well. 2021-02-01Check signals first in the loopJune McEnroe Signals need to be checked first in the loop to catch any that were delivered between setting up the signals handlers and entering the loop, i.e. in the time it takes to initially start each of the services. 2020-12-15Log a message when stopping a service waiting to restart 1.1June McEnroe It's a little annoying to have to special-case this, but otherwise there is no confirmation in the log that the restart won't still happen. 2020-11-10Refactor unveil calls so errors can be reported properlyJune McEnroe 2020-10-27Do not increment signalsJune McEnroe No need to do a read and a write... and it's declared volatile so maybe that's even worse? I don't even know, but there's no point. 2020-10-23Only look up group if one is namedJune McEnroe 2020-10-23Remove default defines of RUNDIR, ETCDIRJune McEnroe 2020-10-23Set shell scripts executable in buildJune McEnroe 2020-10-20Humanize milliseconds if interval is less than 1sJune McEnroe The intervals are configurable in milliseconds so humanize should be able to display at that precision. 2020-10-20Humanize restart intervalJune McEnroe 2020-08-17Document default catsit.conf location on OpenBSD 1.0June McEnroe 2020-08-17Template catsit script with RUNDIRJune McEnroe 2020-08-17Clean up includesJune McEnroe 2020-08-17Log service uptime in statusJune McEnroe