$NetBSD: patch-aa-toplevel,v 1.2 2013/05/09 13:59:35 joerg Exp $

--- configure.in.orig	2013-01-05 14:21:05.000000000 +0000
+++ configure.in
@@ -1945,7 +1945,7 @@ ld.])
     MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin'
     ;;
 
-*-freebsd*)
+*-freebsd* | *-dragonfly*)
     if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` != "elf"; then
 	DLL_SUFFIX=".so.1.0"
 	DSO_LDOPTS="-shared"
@@ -1953,6 +1953,9 @@ ld.])
     if test ! "$GNU_CC"; then
 	DSO_LDOPTS="-Bshareable $DSO_LDOPTS"
     fi
+    if test "$LIBRUNPATH"; then
+       DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
+    fi
     ;; 
 
 ia64*-hpux*)
@@ -3016,6 +3019,9 @@ if test "$GNU_CC"; then
   AC_CACHE_CHECK(for visibility(hidden) attribute,
                  ac_cv_visibility_hidden,
                  [cat > conftest.c <<EOF
+#ifdef __clang__
+#error Not supported by old Mozilla
+#endif
                   int foo __attribute__ ((visibility ("hidden"))) = 1;
 EOF
                   ac_cv_visibility_hidden=no
@@ -3185,6 +3191,9 @@ dnl ====================================
 case $target in
 *-hpux11.*)
 	;;
+*-dragonfly*)
+	AC_CHECK_LIB(c, gethostbyname_r)
+	;;
 *)
 	AC_CHECK_LIB(c_r, gethostbyname_r)
 	;;
