-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.in
72 lines (59 loc) · 1.58 KB
/
configure.in
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
59
60
61
62
63
64
65
66
67
68
69
70
71
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/addr.cc)
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(portfwd,"0.30")
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_YACC
AM_PROG_LEX
AC_PROG_RANLIB
dnl Checks for library, function.
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, gethostbyname)
dnl Checks for operating systems.
AC_AIX
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(getopt.h fcntl.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h sys/termios.h sys/socket.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
dnl Checks for library functions.
AC_FUNC_ALLOCA
dnl AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(getopt_long select socket strdup strerror)
dnl Checks for includes declarations.
dnl
dnl Only for Autoconf 2.50+:
dnl AC_CHECK_DECLS([getopt], , , includes=stdlib.h)
dnl AC_EGREP_HEADER(getopt, stdlib.h,
dnl [AC_DEFINE(HAVE_STDLIB_DECL_GETOPT, 1, [Define if you have the getopt() declared in <stdlib.h>])]
dnl )
dnl Checks for MSG_PROXY symbol
AC_TRY_RUN(
[
#include <sys/socket.h>
int main()
{
#ifdef MSG_PROXY
exit(0);
#else
exit(1);
#endif
}
],
[AC_DEFINE(HAVE_MSG_PROXY, 1, [Define if you have MSG_PROXY in <sys/socket.h>])],
echo "Transparent proxy support is NOT present in kernel",
echo "Transparent proxy support disabled by cross-compiling"
)
LIBS="$LIBS $LEXLIB"
AC_SUBST(LIBS)
REAL_CC=$CC
CC=$CXX
AC_SUBST(REAL_CC)
AC_SUBST(CC)
AC_OUTPUT(getopt/Makefile src/Makefile tools/Makefile doc/Makefile Makefile)