--- configure.orig	2009-01-09 07:56:07 -0800
+++ configure	2009-03-03 16:24:30 -0800
@@ -2938,11 +2938,11 @@
 		CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
 		libmono_ldflags="-pthread"
 		need_link_unlink=yes
-		libdl="-ldl"
+		libdl="-ldl /libexec/ld.elf_so"
 		libgc_threads=pthreads
 		with_sigaltstack=no
 		;;
-	*-*-*freebsd*)
+	*-*-*freebsd* | *-*-*dragonfly*)
 		platform_win32=no
 		if test "x$PTHREAD_CFLAGS" = "x"; then
 			CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS"
@@ -32216,6 +32216,9 @@
 /* end confdefs.h.  */
 $ac_includes_default
 #include <$ac_header>
+#ifdef __DragonFly__
+#error extattr
+#endif
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -32256,6 +32259,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <$ac_header>
+#ifdef __DragonFly__
+#error extattr
+#endif
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
