$OpenBSD: patch-configure,v 1.9 2010/09/30 07:44:35 ajacoutot Exp $
--- configure.orig	Tue Sep 28 11:37:06 2010
+++ configure	Tue Sep 28 15:14:22 2010
@@ -6727,10 +6727,12 @@ newos6*)
   ;;
 
 openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
   else
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
   fi
   ;;
 
@@ -12021,6 +12023,11 @@ $as_echo_n "checking for libgtop sysdeps directory... 
 	  libgtop_need_server=yes
 	  libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod 2755 $(bindir)/libgtop_server2'
 	  ;;
+	openbsd*)
+	  libgtop_sysdeps_dir=bsd
+	  libgtop_use_machine_h=yes
+	  libgtop_need_server=yes
+	  ;;
 	freebsd*|kfreebsd*)
 	  libgtop_sysdeps_dir=freebsd
 	  libgtop_use_machine_h=yes
@@ -13985,7 +13992,7 @@ if test "${ac_cv_lib_intl_strftime+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
+LIBS="-lintl -liconv $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -14018,7 +14025,7 @@ $as_echo "$ac_cv_lib_intl_strftime" >&6; }
 if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
 
-LIBS="-lintl $LIBS"
+LIBS="-lintl -liconv $LIBS"
 fi
 
 fi
@@ -14756,7 +14763,7 @@ if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; 
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
+LIBS="-lintl -liconv $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -14793,7 +14800,7 @@ if test "${ac_cv_lib_intl_ngettext+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
+LIBS="-lintl -liconv $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -14830,7 +14837,7 @@ if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
+LIBS="-lintl -liconv $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -14999,7 +15006,7 @@ done
       fi
 
       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        INTLLIBS="-lintl $libintl_extra_libs"
+        INTLLIBS="-lintl -liconv $libintl_extra_libs"
       fi
 
       if test "$gt_cv_have_gettext" = "yes"; then
@@ -15314,11 +15321,6 @@ glib_save_datarootdir="$datarootdir"
 test "x$prefix" = xNONE && prefix=$ac_default_prefix
 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 datarootdir=`eval echo "${datarootdir}"`
-if test "x$CATOBJEXT" = "x.mo" ; then
-  localedir=`eval echo "${libdir}/locale"`
-else
-  localedir=`eval echo "${datadir}/locale"`
-fi
 prefix="$glib_save_prefix"
 exec_prefix="$glib_save_exec_prefix"
 datarootdir="$glib_save_datarootdir"
@@ -16476,9 +16478,9 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+#include <sys/param.h>
 #include <sys/types.h>
 #include <sys/mount.h>
-#include <sys/fs_types.h>
 int
 main ()
 {
