122 | | [Disable tuntap compilation]), [:], |
123 | | [case "$build_os" in |
124 | | linux*) |
125 | | AC_CHECK_HEADER([linux/if_tun.h], |
126 | | [AC_DEFINE([HAVE_TUNTAP], 1, [If defined, tuntap support is compiled in])], |
127 | | [warn_tuntap=yes]) |
128 | | can_make_libvdetap=yes |
129 | | can_make_vdetunctl=yes |
130 | | ;; |
131 | | darwin*) |
132 | | # I don't use AC_CHECK_FILES because I need test -e and not test -r |
133 | | for i in /dev/tap0 /Library/Extensions/tap.kext ; do |
134 | | AC_MSG_CHECKING([for $i]) |
135 | | if test -e "$i" ; then |
| 122 | [Disable tuntap compilation]), |
| 123 | [if test $enableval = "yes"; then |
| 124 | case "$build_os" in |
| 125 | linux*) |
| 126 | AC_CHECK_HEADER([linux/if_tun.h], |
| 127 | [AC_DEFINE([HAVE_TUNTAP], 1, [If defined, tuntap support is compiled in])], |
| 128 | [warn_tuntap=yes]) |
| 129 | can_make_libvdetap=yes |
| 130 | can_make_vdetunctl=yes |
| 131 | ;; |
| 132 | darwin*) |
| 133 | # I don't use AC_CHECK_FILES because I need test -e and not test -r |
| 134 | AC_MSG_CHECKING([for tap kext]) |
| 135 | if test -e "@PREFIX@/Library/Extensions/tap.kext" ; then |
144 | | done |
145 | | |
146 | | if test "$HAVE__DEV_TAP0_" ; then |
147 | | AC_DEFINE([HAVE_TUNTAP], 1, [If defined, tuntap support is compiled in]) |
148 | | if ! test "$HAVE__LIBRARY_EXTENSIONS_TAP_KEXT_" -o "$HAVE__SYSTEM_LIBRARY_EXTENSIONS_TAP_KEXT_" ; then |
149 | | AC_MSG_WARN([/dev/tap0 exists, but the kext cannot be found. Let's hope your |
150 | | configuration does work...]) |
151 | | fi |
152 | | else |
153 | | warn_tuntap=yes |
154 | | AC_MSG_WARN([You do not have tuntap support. You can get it here: |
155 | | http://tuntaposx.sourceforge.net/]) |
156 | | fi |
157 | | ;; |
158 | | freebsd*) |
159 | | AC_CHECK_HEADER([net/if_tun.h], |
160 | | [AC_DEFINE([HAVE_TUNTAP], 1, [If defined, tuntap support is compiled in])], |
161 | | [warn_tuntap=yes]) |
162 | | ;; |
163 | | esac]) |
| 142 | |
| 143 | ;; |
| 144 | freebsd*) |
| 145 | AC_CHECK_HEADER([net/if_tun.h], |
| 146 | [AC_DEFINE([HAVE_TUNTAP], 1, [If defined, tuntap support is compiled in])], |
| 147 | [warn_tuntap=yes]) |
| 148 | ;; |
| 149 | esac |
| 150 | else |
| 151 | warn_tuntap=yes |
| 152 | fi]) |