$NetBSD: patch-af,v 1.10 2012/09/29 06:17:30 dholland Exp $

- provide pkgsrc's X11 dirs
- check for more ethernet headers

--- configure.orig	2008-04-01 02:00:25.000000000 +0000
+++ configure
@@ -5836,7 +5836,7 @@ powerpc-apple-darwin*)
 esac
 
 
-xlibdirs="\
+xlibdirs="${X11LIBDIR} \
 	/usr/openwin/lib \
 	/usr/X11R6/lib \
 	/usr/lib/X11R6 \
@@ -5851,7 +5851,7 @@ xlibdirs="\
 	/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib \
 	/import/X11R4/usr/lib"
 
-xincdirs="\
+xincdirs="${X11INCDIR} \
 	/usr/openwin/include \
 	/usr/X11R6/include \
 	/usr/include/X11R6 \
@@ -6906,7 +6906,7 @@ fi
 
 
 
-for ac_header in arpa/inet.h fenv.h netinet/in.h string.h strings.h time.h unistd.h net/ethernet.h
+for ac_header in arpa/inet.h fenv.h netinet/in.h string.h strings.h time.h unistd.h net/if.h net/ethernet.h netinet/if_ether.h sys/socket.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -9667,7 +9667,24 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 #include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+#ifdef HAVE_NET_ETHERNET_H
 #include <net/ethernet.h>
+#endif
+#ifdef HAVE_NETINET_IF_ETHER_H
+#include <netinet/if_ether.h>
+#endif
 
 int
 main ()
@@ -9736,7 +9753,24 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 #include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+#ifdef HAVE_NET_ETHERNET_H
 #include <net/ethernet.h>
+#endif
+#ifdef HAVE_NETINET_IF_ETHER_H
+#include <netinet/if_ether.h>
+#endif
 
 int
 main ()
