]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blob - configure.ac
src/connection.c: Send HTML in error messages.
[tlsproxy/tlsproxy.git] / configure.ac
1 AC_INIT([tlsproxy], [0.1], [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 fi
15
16 AC_CHECK_LIB([pthread], [pthread_create],
17              [], [AC_MSG_ERROR([pthread is required])])
18 AC_CHECK_LIB([gnutls], [gnutls_certificate_verify_peers2],
19              [], [AC_MSG_ERROR([GnuTLS is required])])
20
21 AC_ARG_ENABLE([debug],
22               [AC_HELP_STRING([--enable-debug], [enable debug output])],
23               [if test "x$enableval" = xyes; then
24                    AC_DEFINE([DEBUG], 1, [Define to enable debug output.])
25                fi])
26
27 AC_ARG_ENABLE([ipv6],
28               [AC_HELP_STRING([--disable-ipv6],
29                               [disable IPv6, for IPv4 only network stacks])],
30               [if test "x$enableval" = xno; then
31                    AC_DEFINE([USE_IPV4_ONLY], 1, [Define to not use IPv6.])
32                fi])
33
34 AC_CONFIG_HEADERS([config.h])
35 AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile])
36 AC_OUTPUT