$OpenBSD: patch-plugins_configure,v 1.9 2012/11/27 08:13:15 ajacoutot Exp $
--- plugins/configure.orig	Mon Nov 26 11:48:31 2012
+++ plugins/configure	Tue Nov 27 08:23:29 2012
@@ -6481,7 +6481,7 @@ $as_echo "#define PLUGIN_CODEC_DLL_EXPORTS 1" >>confde
 
         *)
           CFLAGS="$CFLAGS -fPIC"
-          LDSO='-shared -Wl,-soname,$(SONAME)'
+          LDSO='-shared -fPIC -Wl,-soname,$(SONAME)'
           PLUGINEXT=so
           for ac_header in sys/time.h sys/file.h netinet/in.h
 do :
@@ -7000,7 +7000,7 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-            #include <gsm/gsm.h>
+            #include <gsm.h>
 
 int
 main ()
@@ -7026,7 +7026,7 @@ fi
 $as_echo "$opal_gsm" >&6; }
 
             if test "x${opal_gsm}" = "xyes" ; then
-              GSM_CFLAGS="-I/usr/include/gsm -I/usr/local/include/gsm"
+              GSM_CFLAGS="-I${LOCALBASE}/include"
               GSM_LIBS="-lgsm"
             fi
 
@@ -7107,7 +7107,7 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-            #include <gsm/gsm.h>
+            #include <gsm.h>
 
 int
 main ()
@@ -7133,7 +7133,7 @@ fi
 $as_echo "$opal_gsm" >&6; }
 
             if test "x${opal_gsm}" = "xyes" ; then
-              GSM_CFLAGS="-I/usr/include/gsm -I/usr/local/include/gsm"
+              GSM_CFLAGS="-I${LOCALBASE}/include"
               GSM_LIBS="-lgsm"
             fi
 
