$NetBSD: patch-ad,v 1.1 2007/06/30 19:18:47 joerg Exp $

--- configure.orig	2001-10-30 21:27:30.000000000 +0000
+++ configure
@@ -1561,9 +1561,10 @@ if test "$ac_x_libraries" = NO; then
 cat > conftest.$ac_ext <<EOF
 #line 1563 "configure"
 #include "confdefs.h"
+#include <X11/Intrinsic.h>
 
 int main() {
-${x_direct_test_function}()
+XtMalloc(0);
 ; return 0; }
 EOF
 if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
@@ -2632,7 +2633,7 @@ case "${platform}" in
 	PLATFORM_SUBDIRS=""
 	echo "$ac_t""yes---AIX" 1>&6
 	;;
-*-*-*bsd*)
+*-*-*bsd* | *-*-dragonfly*)
 	TCLTK_INCLUDES="-I/usr/local/include/tk$TK_DOTTED_HI_VERS -I/usr/local/include/tcl$TCL_DOTTED_HI_VERS -L/usr/local/lib"
 	if test x$TCLTK_LIB_SUFFIX_TYPE = xunspecified
 	then
@@ -2908,6 +2909,8 @@ for ac_option
 do
   case "\$ac_option" in
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+	: Avoid regenerating within pkgsrc
+	exit 0
     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
