From 64183ac418dd2e3e13fca69c3294d3a25ba2700e Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 1 Nov 2010 12:44:07 -0600 Subject: Fix the build on ubuntu 10.4 --- configure.in | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index c6adc86..c5de976 100644 --- a/configure.in +++ b/configure.in @@ -122,20 +122,29 @@ if test "$enable_tproxy" = "yes"; then [have_tproxy="yes"], [have_tproxy="no"], [[ - #ifdef HAVE_LIMITS_H - #include - #endif #include #include - #include - #include ]] ) - if test "$enable_tproxy" = "yes"; then - AC_DEFINE(HAVE_IP_TRANSPARENT, $have_tproxy, "Linux transparent proxy") + if test "$have_tproxy" = "yes"; then + AC_DEFINE(HAVE_IP_TRANSPARENT, 1, [Linux transparent proxy]) + else - AC_MSG_ERROR([Only linux 2.6.28 and later support true transparent proxy. See --disable-tproxy]) + AC_MSG_CHECKING([whether broken IP_TRANSPARENT definition is present]) + AC_COMPILE_IFELSE([[ + #include + #include + int main (void) { return IP_TRANSPARENT == 19; } + ]], [have_tproxy="yes"], [have_tproxy="no"]) + AC_MSG_RESULT([$have_tproxy]) + + if test "$have_tproxy" = "yes"; then + AC_DEFINE(HAVE_IP_TRANSPARENT, 1, [Linux transparent proxy]) + AC_DEFINE(IP_TRANSPARENT, 19, [Fix missing linux header definition]) + else + AC_MSG_ERROR([Only linux 2.6.28 and later support true transparent proxy. See --disable-tproxy]) + fi fi fi -- cgit v1.2.3