--- config_office/configure.in.ark	2007-10-19 11:27:12.000000000 +0200
+++ config_office/configure.in	2007-10-19 11:28:12.000000000 +0200
@@ -3311,11 +3311,11 @@
     else
        AC_MSG_RESULT([no. you need at least db 4.1])
     fi
-    # does not work :/
-    #AC_CHECK_LIB(db, db_create, [],
-    #  [AC_MSG_ERROR([db library not installed or functional])], [])
-    AC_HAVE_LIBRARY(db, [],
-      [AC_MSG_ERROR([db not installed or functional])], [])
+    # dnl Workaround for a db 4.x bug -- it uses pthreads without linking to
+    # the lib
+    LIBS="$LIBS -lpthread"
+    AC_CHECK_LIB(db, db_create, [],
+      [AC_MSG_ERROR([db library not installed or functional])], [])
     SCPDEFS="$SCPDEFS -DSYSTEM_DB"
 else
     AC_MSG_RESULT([internal])
