forked from larsbrinkhoff/httptunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
58 lines (48 loc) · 1.53 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
dnl Copyright (C) Lars Brinkhoff.
dnl Process this file with autoconf to produce a configure script.
AC_INIT([GNU httptunnel], [3.3.git])
AC_CONFIG_SRCDIR([tunnel.c])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AM_CONDITIONAL(SRCDIR, test "x$srcdir" != x.)
AC_ARG_ENABLE(debug,
[ --enable-debug enable debugging],
AC_DEFINE(DEBUG_MODE, 1, [Enable debugging mode.]))
if test "x$CFLAGS" = x; then
if test "x$enable_debug" != x; then
CFLAGS="-g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith"
else
CFLAGS="-O2 -Wall -fomit-frame-pointer"
fi
fi
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
dnl Checks for libraries.
AC_CHECK_FUNC([gethostent], :, [AC_CHECK_LIB(nsl, gethostent)])
AC_CHECK_FUNC([setsockopt], :, [AC_CHECK_LIB(socket, setsockopt)])
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h syslog.h unistd.h sys/poll.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
##AC_CHECK_TYPE(socklen_t, unsigned) # doesn't search <sys/socket.h>
HTTPTUNNEL_TYPE_SOCKLEN_T
HTTPTUNNEL_DEFINE_INADDR_NONE
AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(long long, 8)
dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(socket strdup strerror daemon vsyslog)
AC_CHECK_FUNCS(poll select endprotoent vsnprintf syslog)
AC_OUTPUT(Makefile port/Makefile port/sys/Makefile)