forked from latchset/tang
-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
87 lines (70 loc) · 2.26 KB
/
configure.ac
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
83
84
85
86
87
AC_PREREQ(2.59)
AC_INIT(tang, 7)
AC_CANONICAL_SYSTEM
AC_PROG_CC_C99
AC_PROG_SED
AM_INIT_AUTOMAKE([subdir-objects foreign no-dist-gzip dist-bzip2 parallel-tests])
AM_SILENT_RULES([yes])
AM_PROG_CC_C_O
PKG_PROG_PKG_CONFIG([0.25])
AC_CHECK_LIB([dl], [dlopen], [AC_SUBST([dl_LIBS], [-ldl])],
[AC_CHECK_LIB([dl], [dlopen], [AC_SUBST([dl_LIBS], [-ldl])],
[AC_MSG_ERROR([unable to find dlopen])])])
AC_CHECK_HEADER([http_parser.h], [],
[AC_MSG_ERROR([http-parser required!])], [
#include <http_parser.h>
#ifndef HTTP_STATUS_MAP
#error HTTP_STATUS_MAP not defined!
#endif
])
AC_CHECK_LIB([http_parser], [http_parser_execute],
[AC_SUBST(http_parser_LIBS, [-lhttp_parser])],
[AC_MSG_ERROR([http-parser required!])])
PKG_CHECK_MODULES([jose], [jose >= 8])
PKG_CHECK_MODULES([systemd], [systemd])
AC_ARG_WITH([systemdsystemunitdir],
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],
[],
[with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
for ac_prog in systemd-socket-activate systemd-activate; do
AC_CHECK_PROG([SD_ACTIVATE], [$ac_prog], [$as_dir/$ac_prog], [],
[$PATH$PATH_SEPARATOR$($PKG_CONFIG --variable=systemdutildir systemd)])
test -n "$SD_ACTIVATE" && break
done
test -n "$SD_ACTIVATE" || AC_MSG_ERROR([systemd-socket-activate required!])
AC_MSG_CHECKING([systemd-socket-activate inetd flag])
if $SD_ACTIVATE --help | grep -q inetd; then
SD_ACTIVATE="$SD_ACTIVATE --inetd"
AC_MSG_RESULT([--inetd])
else
AC_MSG_RESULT([(default)])
fi
AC_SUBST(SD_ACTIVATE)
TANG_CFLAGS="\
-Wall \
-Wextra \
-Werror \
-Wstrict-aliasing \
-Wchar-subscripts \
-Wformat-security \
-Wmissing-declarations \
-Wmissing-prototypes \
-Wnested-externs \
-Wpointer-arith \
-Wshadow \
-Wsign-compare \
-Wstrict-prototypes \
-Wtype-limits \
-Wunused-function \
-Wno-missing-field-initializers \
-Wno-unused-parameter \
"
AC_SUBST([TANG_CFLAGS])
AC_CHECK_PROGS(A2X, [a2x])
if test "x$A2X" = "x"; then
AC_MSG_WARN([asciidoc / a2x not found -- man pages will not be generated and installed])
fi
AM_CONDITIONAL(HAVE_A2X, [test -n "$A2X"])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT