--- /dev/null
+AC_INIT([tlsproxy], [0.1], [simon@ruderich.org])
+
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_SRCDIR([src/tlsproxy.c])
+
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
+
+AC_PROG_CC
+
+if test "x$GCC" = xyes; then
+ CFLAGS="-std=c89 -pedantic -Wall -Wextra -Werror -D_XOPEN_SOURCE=500 $CFLAGS"
+fi
+
+AC_CHECK_LIB([gnutls], [gnutls_certificate_verify_peers2])
+if test "x$ac_cv_lib_gnutls_gnutls_certificate_verify_peers2" != xyes; then
+ AC_MSG_ERROR([GnuTLS is required])
+fi
+
+AC_ARG_ENABLE([debug],
+ [AC_HELP_STRING([--enable-debug], [enable debug output])],
+ [if test "x$enableval" = xyes; then
+ AC_DEFINE([DEBUG], 1, [Define to enable debug output.])
+ fi])
+
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_FILES([Makefile src/Makefile])
+AC_OUTPUT