$OpenBSD: patch-Makefile_config_in,v 1.1.1.1 2006/12/18 14:39:56 espie Exp $
--- Makefile.config.in.orig	Sat May 13 23:01:38 2006
+++ Makefile.config.in	Sun Dec 17 20:15:52 2006
@@ -35,8 +35,8 @@ HAVE_WCHAR_H_DEFINE = @HAVE_WCHAR_H_DEFI
 SHELL = @SHELL@
 CC = @CC@
 CXX = @CXX@
-CCLD = $(CC)
-CXXLD = $(CXX)
+CCLD = $(CC) $(CFLAGS)
+CXXLD = $(CXX) $(CXXFLAGS)
 AR = ar
 RANLIB = @RANLIB@
 LN_S = @LN_S@
@@ -193,6 +193,12 @@ ifeq ($(findstring netbsd,$(HOST_OS)),FI
   CFLAGS_SHLIB = -fpic
 endif
 
+ifeq ($(findstring openbsd,$(HOST_OS)),FIND)
+  SHARED_LIB_TYPE = openbsd
+  SHLIB_SUFFIX = so
+  CFLAGS_SHLIB = -fpic
+  LDFLAGS_SHLIB = -shared
+endif
 ifeq ($(HOST_OS),darwin)
   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
   # If you can finish it and make it work on AIX, please do.
