$NetBSD: patch-aa,v 1.5 2012/03/12 10:39:13 fhajny Exp $

--- configure.orig	2009-03-06 12:17:38.000000000 +0000
+++ configure
@@ -1962,7 +1962,7 @@ _ACEOF
 
     DEFAULT_DEFAULT_wxUSE_MOTIF=1
   ;;
-  *-*-freebsd*)
+  *-*-freebsd* | *-*-dragonfly*)
     USE_BSD=1
     USE_FREEBSD=1
     cat >>confdefs.h <<\_ACEOF
@@ -16139,7 +16139,7 @@ retest_macosx_linking=no
 
 #if test "$wxUSE_MAC" = 1; then
     if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
-                        if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
+                        if test "x$wxUSE_UNIVERSAL_BINARY" = xyes; then
             # Implicitly turn on the new --with-macosx-sdk using the default
             # SDK which provides the behavior this option has always had.
             if test "x$wxUSE_MACOSX_SDK" = "x"; then
@@ -16221,7 +16221,7 @@ echo $ECHO_N "checking SDK deployment ve
         MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" buildSettings | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
 
         # If that failed, try again with the new key
-        if test "x$MACOSX_SDK_PLIST_VERSION_MIN" == "x"; then
+        if test "x$MACOSX_SDK_PLIST_VERSION_MIN" = "x"; then
 
             MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" DefaultProperties | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
 
@@ -24948,6 +24948,7 @@ SEARCH_INCLUDE="\
                               \
     /usr/include/Xm           \
                               \
+    /usr/X11R7/include        \
     /usr/X11R6/include        \
     /usr/X11R6.4/include      \
                               \
@@ -25055,11 +25056,12 @@ fi
         wx_cv_std_libpath="lib";
         ;;
 esac
+wx_cv_std_libpath="lib"
 
 echo "$as_me:$LINENO: result: $wx_cv_std_libpath" >&5
 echo "${ECHO_T}$wx_cv_std_libpath" >&6
 
-SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s@include@$wx_cv_std_libpath@g` /usr/$wx_cv_std_libpath"
+SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s@include@$wx_cv_std_libpath@g` /usr/$wx_cv_std_libpath @PREFIX@/lib"
 
 if test "$build" != "$host" -a "$GCC" = yes; then
                     if cross_root=`$CC -print-prog-name=ld 2>/dev/null`; then
@@ -26379,9 +26381,9 @@ echo "${ECHO_T}$ac_cv_header_png_h" >&6
 
 
             if test "$ac_cv_header_png_h" = "yes"; then
-                echo "$as_me:$LINENO: checking for png_check_sig in -lpng" >&5
-echo $ECHO_N "checking for png_check_sig in -lpng... $ECHO_C" >&6
-if test "${ac_cv_lib_png_png_check_sig+set}" = set; then
+                echo "$as_me:$LINENO: checking for png_sig_cmp in -lpng" >&5
+echo $ECHO_N "checking for png_sig_cmp in -lpng... $ECHO_C" >&6
+if test "${ac_cv_lib_png_png_sig_cmp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -26399,11 +26401,11 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char png_check_sig ();
+char png_sig_cmp ();
 int
 main ()
 {
-png_check_sig ();
+png_sig_cmp ();
   ;
   return 0;
 }
@@ -26429,20 +26431,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_png_png_check_sig=yes
+  ac_cv_lib_png_png_sig_cmp=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_png_png_check_sig=no
+ac_cv_lib_png_png_sig_cmp=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_check_sig" >&5
-echo "${ECHO_T}$ac_cv_lib_png_png_check_sig" >&6
-if test $ac_cv_lib_png_png_check_sig = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_sig_cmp" >&5
+echo "${ECHO_T}$ac_cv_lib_png_png_sig_cmp" >&6
+if test $ac_cv_lib_png_png_sig_cmp = yes; then
   PNG_LINK=" -lpng -lz"
 fi
 
@@ -39478,6 +39480,9 @@ echo "$as_me: WARNING: BeOS threads are 
                     THREAD_OPTS="-mt $THREAD_OPTS"
                 fi
                 ;;
+	  *-*-dragonfly*)
+                THREAD_OPTS="-pthread $THREAD_OPTS"
+		;;
           *-*-freebsd*)
                                                 THREAD_OPTS="-kthread lthread $THREAD_OPTS c_r"
                 ;;
@@ -39611,7 +39616,7 @@ echo $ECHO_N "checking if more special f
                                                                                                                 LDFLAGS="-L/usr/lib/threads $LDFLAGS"
                 flag="-D_THREAD_SAFE"
                 ;;
-            *-freebsd*)
+            *-freebsd*|*-*-dragonfly*)
                 flag="-D_THREAD_SAFE"
                 ;;
             *-hp-hpux* )
@@ -48532,7 +48537,7 @@ echo "${ECHO_T}$bakefile_cv_gcc31" >&6
             SHARED_LD_CXX="\${CXX} -dynamiclib -single_module -headerpad_max_install_names -o"
         fi
 
-        if test "x$GCC" == "xyes"; then
+        if test "x$GCC" = "xyes"; then
             PIC_FLAG="-dynamic -fPIC"
         fi
         if test "x$XLCC" = "xyes"; then
@@ -49099,6 +49104,7 @@ EOF
 
       powerpc-apple-macos* | \
       *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | \
+      *-*-dragonfly* | \
       *-*-mirbsd* | \
       *-*-sunos4* | \
       *-*-osf* | \
@@ -49142,7 +49148,7 @@ echo "$as_me: error: unknown system type
 
     case "${BAKEFILE_HOST}" in
       *-*-linux* | *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
-      *-*-k*bsd*-gnu | *-*-mirbsd* )
+      *-*-k*bsd*-gnu | *-*-mirbsd* | *-*-dragonfly*)
         if test "x$SUNCXX" = "xyes"; then
             SONAME_FLAG="-h "
         else
