]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Respect --without-chroot correctly
authorPeter Volkov <[email protected]>
Fri, 2 Apr 2010 05:33:30 +0000 (09:33 +0400)
committerGuy Harris <[email protected]>
Fri, 2 Apr 2010 05:56:03 +0000 (22:56 -0700)
./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

index 1c1b63a7969da8339aa943fe96762e4da6f4e7e3..eb3e5e8b1ddf32d3158c590d6dacfe9195967e23 100644 (file)
@@ -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