$NetBSD: patch-ag,v 1.6 2005/08/11 11:14:06 adam Exp $

--- configure.ac.orig	2005-01-25 17:29:49.000000000 +0000
+++ configure.ac
@@ -211,6 +211,7 @@ case "$host" in
       AC_CHECK_LIB(kvm, main)
   ;;
 esac
+AM_CONDITIONAL([VTY_OPT], [test "${enable_vtysh}" = yes])
 
 dnl ---------------------
 dnl Integrated VTY option
@@ -219,8 +220,10 @@ case "${enable_vtysh}" in
   "yes")
     VTYSH="vtysh";
     AC_DEFINE(VTYSH,,VTY shell)
-    AC_CHECK_LIB(tinfo, tputs, , AC_CHECK_LIB(ncurses, tputs, ,
-                 AC_CHECK_LIB(termcap, tputs)))
+    AC_CHECK_LIB(termcap, tputs, ,
+	AC_CHECK_LIB(tinfo, tputs, ,
+	AC_CHECK_LIB(curses, tputs, ,
+	AC_CHECK_LIB(ncurses, tputs))))
     AC_CHECK_LIB(readline, main)
     if test $ac_cv_lib_readline_main = no; then
       AC_MSG_ERROR([vtysh needs libreadline but was not found on your system.])
@@ -501,6 +504,7 @@ else
       AC_MSG_RESULT(Linux IPv6)
    fi
 fi
+AM_CONDITIONAL([V6_OPT], [test "${enable_ipv6}" = yes])
 
 if test "$zebra_cv_linux_ipv6" = "yes";then
    AC_DEFINE(HAVE_IPV6)
