1 dnl Check to find out whether the running kernel has support for TUN/TAP
6 [ --with-kernel=dir give the directory with kernel sources]
7 [ (default: /usr/src/linux)],
9 kerneldir="/usr/src/linux"
12 AC_CACHE_CHECK([for linux/if_tun.h], tinc_cv_linux_if_tun_h,
14 AC_TRY_COMPILE([#include "$kerneldir/include/linux/if_tun.h"],
16 if_tun_h="\"$kerneldir/include/linux/if_tun.h\"",
17 [AC_TRY_COMPILE([#include <linux/if_tun.h>],
24 if test $if_tun_h = no; then
25 tinc_cv_linux_if_tun_h=none
27 tinc_cv_linux_if_tun_h="$if_tun_h"
31 if test $tinc_cv_linux_if_tun_h != none; then
32 AC_DEFINE(HAVE_TUNTAP)
33 if test $tinc_cv_linux_if_tun_h != default; then
34 AC_DEFINE_UNQUOTED(LINUX_IF_TUN_H, $tinc_cv_linux_if_tun_h)
37 AC_SUBST(LINUX_IF_TUN_H)