diff --git a/libavcodec/x86/mpegaudiodsp.c b/libavcodec/x86/mpegaudiodsp.c
index 27231674ae78ade22d4b9f07486b28d9e2ea1d04..298dc2dbdaaecd0dffd8d27a6e5d8a006a7507a9 100644
--- a/libavcodec/x86/mpegaudiodsp.c
+++ b/libavcodec/x86/mpegaudiodsp.c
@@ -30,6 +30,7 @@
 static void imdct36_blocks_ ## CPU(float *out, float *buf, float *in, int count, int switch_point, int block_type);\
 void ff_imdct36_float_ ## CPU(float *out, float *buf, float *in, float *win);
 
+#if HAVE_YASM
 #if ARCH_X86_32
 DECL(sse)
 #endif
@@ -37,6 +38,7 @@ DECL(sse2)
 DECL(sse3)
 DECL(ssse3)
 DECL(avx)
+#endif /* HAVE_YASM */
 
 void ff_four_imdct36_float_sse(float *out, float *buf, float *in, float *win,
                                float *tmpbuf);