$OpenBSD: patch-configure_in,v 1.7 2011/05/22 08:13:18 dcoppa Exp $
--- configure.in.orig	Tue Mar 22 12:59:37 2011
+++ configure.in	Wed May 18 10:53:09 2011
@@ -3090,7 +3090,7 @@ if test "$wxUSE_LIBJPEG" != "no" ; then
             dnl HAVE_STDLIB_H which are already defined and this provokes
             dnl a compiler warning which configure considers as an error...
             AC_MSG_CHECKING(for jpeglib.h)
-            AC_CACHE_VAL(ac_cv_header_jpeglib_h,
+            AC_CACHE_VAL(ac_cv_header_jpeglib_h,[
                 AC_TRY_COMPILE(
                     [
                         #undef HAVE_STDLIB_H
@@ -3102,7 +3102,7 @@ if test "$wxUSE_LIBJPEG" != "no" ; then
                     ac_cv_header_jpeglib_h=yes,
                     ac_cv_header_jpeglib_h=no
                 )
-            )
+            ])
             AC_MSG_RESULT($ac_cv_header_jpeglib_h)
 
             if test "$ac_cv_header_jpeglib_h" = "yes"; then
@@ -4154,13 +4154,7 @@ if test "$TOOLKIT" != "MSW" ; then
 
         AC_CHECK_HEADER([sql.h], [found_sql_h=1],, [ ])
         if test "x$found_sql_h" = "x1" ; then
-            AC_CHECK_LIB(iodbc, SQLAllocEnv, ODBC_LINK=" -liodbc",
-            [
-                AC_CHECK_LIB(unixodbc, SQLAllocEnv, ODBC_LINK=" -lunixodbc",
-                [
-                    AC_CHECK_LIB(odbc, SQLAllocEnv, ODBC_LINK=" -lodbc")
-                ])
-            ])
+            AC_CHECK_LIB(iodbc, SQLAllocEnv, ODBC_LINK="-pthread -liodbc")
         fi
         if test "x$ODBC_LINK" = "x" ; then
             if test "$wxUSE_ODBC" = "sys" ; then
@@ -4480,7 +4474,7 @@ UNICODE=0
 lib_unicode_suffix=
 WX_CHARTYPE="ansi"
 if test "$wxUSE_UNICODE" = "yes"; then
-    lib_unicode_suffix=u
+    lib_unicode_suffix=
     WX_CHARTYPE="unicode"
     UNICODE=1
 fi
@@ -4489,8 +4483,8 @@ lib_debug_suffix=
 WX_DEBUGTYPE="release"
 DEBUG_FLAG=0
 if test "$wxUSE_DEBUG_FLAG" = "yes"; then
-    lib_debug_suffix=d
-    WX_DEBUGTYPE="debug"
+    lib_debug_suffix=
+    WX_DEBUGTYPE="release"
     DEBUG_FLAG=1
 fi
 
@@ -4504,7 +4498,7 @@ fi
 
 WX_VERSION_TAG=`echo WX${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}_${WX_RELEASE} | tr '[[a-z]]' '[[A-Z]]'`
 
-TOOLCHAIN_NAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}-${WX_RELEASE}"
+TOOLCHAIN_NAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}"
 
 TOOLCHAIN_FULLNAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}-${WX_CHARTYPE}-${WX_DEBUGTYPE}${config_linkage_component}-${WX_RELEASE}${WX_FLAVOUR}"
 
@@ -4730,14 +4724,6 @@ if test "$wxUSE_WCHAR_T" = "yes"; then
     if test "$USE_HPUX" = 1 -a "$GCC" != "yes"; then
         CPPFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CPPFLAGS"
     fi
-
-    dnl Try to use wcsrtombs instead of wcstombs which is buggy in old GNU
-    dnl libc versions if possible. AC_CHECK_FUNCS only checks it's in the
-    dnl library, not the header, so do a header check for mbstate_t first.
-    AC_CHECK_TYPES([mbstate_t],
-                   [AC_CHECK_FUNCS(wcsrtombs)],
-                   [],
-                   [#include <wchar.h>])
 else
     AC_MSG_WARN([Wide character support is unavailable])
 fi
