diff --git a/configure b/configure
index dc1d2eb8072d69bfaab3b45bebfee1c4c351d4fd..da746163237ae7d98ba1d746dce310a3a1f1cfa2 100755
--- a/configure
+++ b/configure
@@ -2851,7 +2851,7 @@ cropdetect_filter_deps="gpl"
 delogo_filter_deps="gpl"
 deshake_filter_select="pixelutils"
 drawtext_filter_deps="libfreetype"
-dynaudnorm_filter_deps="copysign erf"
+dynaudnorm_filter_deps="erf"
 ebur128_filter_deps="gpl"
 eq_filter_deps="gpl"
 fftfilt_filter_deps="avcodec"
diff --git a/libavutil/libm.h b/libavutil/libm.h
index 6d8bd685b710abb11e6e3770e5cd10c1cf96c286..37b8e86b5e6e8d3ba473f228244e94d4cbdc2904 100644
--- a/libavutil/libm.h
+++ b/libavutil/libm.h
@@ -62,6 +62,15 @@ static av_always_inline float cbrtf(float x)
 }
 #endif
 
+#if !HAVE_COPYSIGN
+static av_always_inline double copysign(double x, double y)
+{
+    uint64_t vx = av_double2int(x);
+    uint64_t vy = av_double2int(y);
+    return av_int2double((vx & UINT64_C(0x7fffffffffffffff)) | (vy & UINT64_C(0x8000000000000000)));
+}
+#endif
+
 #if !HAVE_COSF
 #undef cosf
 #define cosf(x) ((float)cos(x))