$OpenBSD: patch-lib_ruby_site_ruby_shared_mkmf_rb,v 1.3 2011/11/08 23:58:08 jeremy Exp $
--- lib/ruby/site_ruby/shared/mkmf.rb.orig	Tue Oct 25 08:07:12 2011
+++ lib/ruby/site_ruby/shared/mkmf.rb	Sun Oct 30 21:08:59 2011
@@ -1764,8 +1764,8 @@ def init_mkmf(config = CONFIG)
   $CFLAGS = with_config("cflags", arg_config("CFLAGS", config["CFLAGS"])).dup
   $ARCH_FLAG = with_config("arch_flag", arg_config("ARCH_FLAG", config["ARCH_FLAG"])).dup
   $CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup
-  $LDFLAGS = with_config("ldflags", arg_config("LDFLAGS", config["LDFLAGS"])).dup
-  $INCFLAGS = "-I$(topdir) -I$(hdrdir) -I$(srcdir)"
+  $LDFLAGS = with_config("ldflags", arg_config("LDFLAGS", config["LDFLAGS"])).dup + " -L${LOCALBASE}/lib"
+  $INCFLAGS = "-I$(topdir) -I$(hdrdir) -I$(srcdir) -I${LOCALBASE}/include"
   $DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup
   $LIBEXT = config['LIBEXT'].dup
   $OBJEXT = config["OBJEXT"].dup
