forked from troglobit/redir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
43 lines (32 loc) · 1.31 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
AC_INIT([redir], [3.2], [https://github.com/troglobit/redir/issues])
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
AC_CONFIG_SRCDIR([redir.c])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile])
AC_PROG_CC
AC_PROG_INSTALL
AC_HEADER_STDC
AC_ARG_ENABLE(compat,
AS_HELP_STRING([--enable-compat], [Enable limited v2.x command line syntax]))
AC_ARG_ENABLE(shaping,
AS_HELP_STRING([--disable-shaping], [Disable traffic shaping support]))
AC_ARG_ENABLE(ftp,
AS_HELP_STRING([--disable-ftp], [Disable FTP redirection support]))
AC_ARG_WITH(libwrap,
AS_HELP_STRING([--with-libwrap=DIR], [use libwrap (rooted in DIR), default: yes]),
[with_libwrap=$withval], [with_libwrap=yes])
AS_IF([test "x$with_libwrap" != "xno"],[
AS_IF([test -d "$with_libwrap"],[
CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
LDFLAGS="$LDFLAGS -L${with_libwrap}/"
])
AC_CHECK_LIB(wrap, request_init,, with_libwrap=no)
AC_CHECK_HEADER([tcpd.h],, with_libwrap=no)
])
AS_IF([test "x$enable_compat" = "xyes"], [
AC_DEFINE(COMPAT_OPTIONS, 1, [Enable v2.x command line syntax])])
AS_IF([test "x$enable_shaping" != "xno"], enable_shaping="yes", [
AC_DEFINE(NO_SHAPER, 1, [Disable traffic shaping])])
AS_IF([test "x$enable_ftp" != "xno"], enable_ftp="yes", [
AC_DEFINE(NO_FTP, 1, [Disable FTP support])])
AC_OUTPUT