>From 7ec07e4815965dd31b85e56ac823249bfb9afc28 Mon Sep 17 00:00:00 2001
From: Peter Volkov <pva () gentoo org>
Date: Fri, 2 Apr 2010 09:33:30 +0400
Subject: [PATCH] Respect --without-chroot correctly

./configure --without-chroot will configure tcpdump with "no" as the
value of chroot directory and cause tcpdump to fail with:

tcpdump: Couldn't chroot/chdir to 'no': No such file or directory

This patch makes ./configure to avoid chroot directory when called with
--without-chroot.
---
 configure.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.in b/configure.in
index 1c1b63a..eb3e5e8 100644
--- a/configure.in
+++ b/configure.in
@@ -159,7 +159,7 @@ fi
 
 AC_ARG_WITH(chroot, [  --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY])
 AC_MSG_CHECKING([whether to chroot])
-if test ! -z "$with_chroot" ; then
+if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then
         AC_DEFINE_UNQUOTED(WITH_CHROOT, "$withval")
        AC_MSG_RESULT(to \"$withval\")
 else
-- 
1.6.4.4

