$NetBSD: patch-aa,v 1.5 2010/07/08 11:28:05 obache Exp $

--- configure.orig	2010-06-01 13:42:21.000000000 +0000
+++ configure
@@ -3069,7 +3069,7 @@ case "$host_os" in
   linux*)	OS_TYPE=linux;;
   openbsd*)	OS_TYPE=openbsd;;
   netbsd*)	OS_TYPE=netbsd;;
-  freebsd*|kfreebsd*-gnu)	OS_TYPE=freebsd;;
+  freebsd*|dragonfly*|kfreebsd*-gnu)	OS_TYPE=freebsd;;
   solaris*)	OS_TYPE=solaris;;
   darwin*)	OS_TYPE=darwin;;
   cygwin*)	OS_TYPE=cygwin;;
@@ -5154,13 +5154,16 @@ fi
 
 done
 
-for ac_header in linux/if.h linux/if_tun.h net/if.h net/if_tun.h
+for ac_header in linux/if.h linux/if_tun.h net/if.h net/if_tun.h net/if_tap.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
 
 "
 eval as_val=\$$as_ac_Header
@@ -6424,7 +6427,7 @@ $as_echo "#define _POSIX_C_SOURCE 199506
   irix*)
     EXTRASYSSRCS="Unix/parameters_unix.cpp Unix/irix/unaligned.c Unix/host_filesys_unix.cpp"
     ;;
-  freebsd*|kfreebsd*-gnu)
+  freebsd*|dragonfly*|kfreebsd*-gnu)
 
 $as_echo "#define HAVE_O_FSYNC 1" >>confdefs.h
 
@@ -6720,8 +6723,14 @@ else
       #include <linux/if_tun.h>
       #endif
       #if defined(HAVE_NET_IF_H) && defined(HAVE_NET_IF_TUN_H)
+      #ifdef HAVE_SYS_TYPES_H
+      #include <sys/types.h>
+      #endif
       #include <net/if.h>
       #include <net/if_tun.h>
+      #if defined(HAVE_NET_IF_TAP_H)
+      #include <net/if_tap.h>
+      #endif
       #endif
 
 int
@@ -7775,7 +7784,7 @@ $as_echo "#define NO_NESTED_SIGSEGV 1 " 
         as_fn_error "Sorry, extended segfault handler not supported on your platform" "$LINENO" 5
       fi
       ;;
-    freebsd*|kfreebsd*-gnu)
+    freebsd*|dragonfly*|kfreebsd*-gnu)
       if [ "x$HAVE_I386" = "xyes" ]; then
         SYSSRCS="$SYSSRCS Unix/xbsd/sigsegv_xbsd.cpp"
       else
@@ -8486,7 +8495,7 @@ fi
 
 SDL_CFLAGS=
 SDL_LIBS=
-if test "x$OS_TYPE" == "xdarwin" -a "x$WITH_FINK" = "xno"; then
+if test "x$OS_TYPE" = "xdarwin" -a "x$WITH_FINK" = "xno"; then
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports framework SDL" >&5
 $as_echo_n "checking whether compiler supports framework SDL... " >&6; }
