+DIRS="" AC_SUBST([DIRS])
+
+AX_WITH_PYTHON([2.3], [missing])
+if test "$PYTHON" = "missing"; then
+ python=no
+else
+ python=yes
+ pyscripts='${PYTHONSCRIPTS}'
+ DIRS="$DIRS keys"
+ pymans='${PYTHONMANS}'
+fi
+AC_SUBST([pyscripts]) AC_SUBST([pymans])
+
+if test $python = yes; then
+ AC_CACHE_CHECK([for pygtk], [mdw_cv_pygtk], [
+ mdw_cv_pygtk=no
+ python -c >&5 2>&5 '
+import pygtk
+pygtk.require("2.0")
+import gtk
+' && mdw_cv_pygtk=yes
+ ])
+ if test $mdw_cv_pygtk = yes; then
+ pygtkscripts='${PYGTKSCRIPTS}'
+ DIRS="$DIRS mon"
+ pygtkmans='${PYGTKMANS}'
+ fi
+fi
+AC_SUBST([pygtkscripts]) AC_SUBST([pygtkmans])
+
+
+tun=auto
+AC_ARG_WITH([tunnel],
+[ --with-tunnel=KIND kinds of tunnel device to use
+ (linux, unet, bsd, slip)],
+[tun=$withval])
+
+if test "$tun" = auto; then
+ AC_CACHE_CHECK([tunnel drivers to use], [mdw_cv_tunnel], [
+ mdw_cv_tunnel=""
+ case $host_os in
+ linux*)
+ case `uname -r` in
+ [2.[4-9].*] | [2.[1-9][0-9]*.*] | [[3-9].*] | [[1-9][0-9]*.*])
+ mdw_cv_tunnel=linux
+ ;;
+ *)
+ mdw_cv_tunnel=unet
+ ;;
+ esac
+ ;;
+ *bsd*)
+ mdw_cv_tunnel=bsd
+ ;;
+ esac
+ mdw_cv_tunnel=$mdw_cv_tunnel${mdw_cv_tunnel:+ }slip
+ ])
+ tun=$mdw_cv_tunnel
+fi
+
+tunnels=""
+for i in $tun; do
+ case $i in
+ linux) AC_DEFINE([TUN_LINUX], [1],
+ [Install the Linux TUN/TAP driver.]) ;;
+ bsd) AC_DEFINE([TUN_BSD], [1],
+ [Install the BSD tunnel driver.]) ;;
+ unet) AC_DEFINE([TUN_UNET], [1],
+ [Install the obsolete Linux Usernet driver.]) ;;
+ slip) ;;
+ *) AC_MSG_ERROR([Unknown tunnel type]) ;;
+ esac
+ tunnels="$tunnels&tun_$i, "
+done
+AC_SUBST(tun)
+AC_DEFINE_UNQUOTED([TUN_LIST], [$tunnels 0],
+ [List of tunnel drivers to install.])
+
+
+
+
+