]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blob - configure.ac
src/tlsproxy.c: Add thread support.
[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 -D_XOPEN_SOURCE=500 $CFLAGS"
13 fi
14
15 AC_CHECK_LIB([pthread], [pthread_create])
16 if test "x$ac_cv_lib_pthread_pthread_create" != xyes; then
17    AC_MSG_ERROR([pthread is required])
18 fi
19
20 AC_CHECK_LIB([gnutls], [gnutls_certificate_verify_peers2])
21 if test "x$ac_cv_lib_gnutls_gnutls_certificate_verify_peers2" != xyes; then
22    AC_MSG_ERROR([GnuTLS is required])
23 fi
24
25 AC_ARG_ENABLE([debug],
26               [AC_HELP_STRING([--enable-debug], [enable debug output])],
27               [if test "x$enableval" = xyes; then
28                    AC_DEFINE([DEBUG], 1, [Define to enable debug output.])
29                fi])
30
31 AC_CONFIG_HEADERS([config.h])
32 AC_CONFIG_FILES([Makefile src/Makefile])
33 AC_OUTPUT