]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blob - configure.ac
tests/tests-*.sh: Remove unnecessary calls to tlsproxy-add.
[tlsproxy/tlsproxy.git] / configure.ac
1 AC_INIT([tlsproxy], [0.2], [simon@ruderich.org])
2
3 AC_CONFIG_AUX_DIR([build-aux])
4 AC_CONFIG_MACRO_DIR([m4])
5 AC_CONFIG_SRCDIR([src/tlsproxy.c])
6
7 AM_INIT_AUTOMAKE([foreign -Wall -Werror])
8
9 AC_PROG_CC
10
11 if test "x$GCC" = xyes; then
12     CFLAGS="-std=c89 -pedantic -Wall -Wextra -Werror $CFLAGS"
13     CFLAGS="-D_XOPEN_SOURCE=500 -Wno-error=int-to-pointer-cast $CFLAGS"
14     # Additional security flags.
15     CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector -fPIE -pie"
16     LDFLAGS="$LDFLAGS -z relro -z now"
17 fi
18
19 AC_CHECK_LIB([pthread], [pthread_create],
20              [], [AC_MSG_ERROR([pthread is required])])
21 AC_CHECK_LIB([gnutls], [gnutls_certificate_verify_peers2],
22              [], [AC_MSG_ERROR([GnuTLS is required])])
23
24 AC_ARG_ENABLE([debug],
25               [AC_HELP_STRING([--enable-debug], [enable debug output])],
26               [if test "x$enableval" = xyes; then
27                    AC_DEFINE([DEBUG], 1, [Define to enable debug output.])
28                fi])
29
30 AC_ARG_ENABLE([ipv6],
31               [AC_HELP_STRING([--disable-ipv6],
32                               [disable IPv6, for IPv4 only network stacks])],
33               [if test "x$enableval" = xno; then
34                    AC_DEFINE([USE_IPV4_ONLY], 1, [Define to not use IPv6.])
35                fi])
36
37 AC_CONFIG_HEADERS([config.h])
38 AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile])
39 AC_OUTPUT