diff -ur opus-1.2.1.orig/configure.ac opus-1.2.1/configure.ac
--- opus-1.2.1.orig/configure.ac	2017-06-26 11:06:46.000000000 -0700
+++ opus-1.2.1/configure.ac	2018-06-01 17:00:15.140159087 -0700
@@ -812,6 +812,13 @@
   AC_DEFINE([ENABLE_UPDATE_DRAFT], [1], [Enable bitstream changes from draft-ietf-codec-opus-update])
 ])
 
+AS_IF([test "$enable_shared" = "no"], [
+    LIBM_SHARED=""
+    LIBM_STATIC="$LIBM"
+], [
+    LIBM_SHARED="$LIBM"
+    LIBM_STATIC=""
+])
 
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -fvisibility=hidden"
@@ -843,6 +850,8 @@
 AC_CHECK_FUNCS([__malloc_hook])
 
 AC_SUBST([PC_BUILD])
+AC_SUBST([LIBM_SHARED])
+AC_SUBST([LIBM_STATIC])
 
 AC_CONFIG_FILES([
     Makefile
diff -ur opus-1.2.1.orig/opus.pc.in opus-1.2.1/opus.pc.in
--- opus-1.2.1.orig/opus.pc.in	2017-06-15 15:24:07.000000000 -0700
+++ opus-1.2.1/opus.pc.in	2018-06-01 17:00:26.500350502 -0700
@@ -11,6 +11,6 @@
 Version: @VERSION@
 Requires:
 Conflicts:
-Libs: -L${libdir} -lopus
-Libs.private: @LIBM@
+Libs: -L${libdir} -lopus @LIBM_STATIC@
+Libs.private: @LIBM_SHARED@
 Cflags: -I${includedir}/opus
