dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
AC_INIT(tripe.c)
-AM_INIT_AUTOMAKE(tripe, 1.0.0pre6)
+AM_INIT_AUTOMAKE(tripe, 1.0.0pre7)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
esac],
[ethereal=true requireethereal=false])
-case $host_os in
- linux*)
- case `uname -r` in
+tun=guess
+AC_ARG_WITH([tunnel],
+[ --with-tunnel=KIND kind of tunnel device to use
+ (linux, unet, bsd, slip)],
+[tun=$withval])
+
+if test "$tun" = guess; then
+ AC_CACHE_CHECK([tunnel device to use], [mdw_cv_tunnel], [
+ case $host_os in
+ linux*)
+ case `uname -r` in
changequote(,)dnl
- 2.[4-9].* | 2.[1-9][0-9]*.* | [3-9].* | [1-9][0-9]*.*)
+ 2.[4-9].* | 2.[1-9][0-9]*.* | [3-9].* | [1-9][0-9]*.*)
changequote([,])dnl
- tun=linux
- AC_DEFINE([TUN_TYPE], [TUN_LINUX],
- [Set to the tunnel driver for your OS. See TUN_* in tripe.h.])
+ mdw_cv_tunnel=linux
+ ;;
+ *)
+ mdw_cv_tunnel=unet
+ ;;
+ esac
+ ;;
+ *bsd*)
+ mdw_cv_tunnel=bsd
;;
*)
- tun=unet
- AC_DEFINE([TUN_TYPE], [TUN_UNET],
- [Set to the tunnel driver for your OS. See TUN_* in tripe.h.])
+ mdw_cv_tunnel=slip
;;
esac
- ;;
- *bsd*)
- tun=bsd
- AC_DEFINE([TUN_TYPE], [TUN_BSD],
- [Set to the tunnel driver for your OS. See TUN_* in tripe.h.])
- ;;
- *)
- AC_MSG_ERROR([Unsupported OS: no tunnel interface available])
- ;;
+ ])
+ tun=$mdw_cv_tunnel
+fi
+
+case $tun in
+ linux | unet | bsd | slip) ;;
+ *) AC_MSG_ERROR([Unknown tunnel type]) ;;
esac
+AC_DEFINE_UNQUOTED([TUN_TYPE], [TUN_`echo $tun | tr a-z A-Z`],
+ [Set to the tunnel driver for your OS. See TUN_* in tripe.h.])
AC_SUBST(tun)
mdw_MLIB(2.0.0)