diff --git a/configure b/configure
index c9c48165b68eeff62b7c69408e9f0e5bfaa2c90e..6174f107d1d937f6f9e06813f11acdeea4b4dcbe 100755
--- a/configure
+++ b/configure
@@ -2654,7 +2654,7 @@ print_config CONFIG_ $TMPH config.mak $CONFIG_LIST       \
 
 echo "#define restrict $_restrict" >> $TMPH
 
-if enabled small; then
+if enabled small || disabled optimizations; then
     echo "#define av_always_inline"  >> $TMPH
 fi