[FFmpeg-devel] [PATCH] configure: allow disabling av_always_inline

Michael Niedermayer michaelni at gmx.at
Wed Jul 4 02:58:33 CEST 2012


Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 configure              |    3 +++
 libavutil/attributes.h |    6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index d0f13b9..5680fef 100755
--- a/configure
+++ b/configure
@@ -274,6 +274,7 @@ Optimization options (experts only):
   --disable-mipsdspr2      disable MIPS DSP ASE R2 optimizations
   --disable-mipsfpu        disable floating point MIPS optimizations
   --disable-fast-unaligned consider unaligned accesses slow
+  --disable-always-inline  disable av_always_inline
   --postproc-version=V     build libpostproc version V.
                            Where V can be '$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO' or 'current'. [$postproc_version_default]
 
@@ -1025,6 +1026,7 @@ CONFIG_LIST="
     $COMPONENT_LIST
     $PROGRAM_LIST
     ac3dsp
+    always_inline
     avcodec
     avdevice
     avfilter
@@ -1889,6 +1891,7 @@ enable stripping
 enable swresample
 enable swscale
 
+enable always_inline
 enable asm
 enable debug
 enable doc
diff --git a/libavutil/attributes.h b/libavutil/attributes.h
index c1f26f5..9344a12 100644
--- a/libavutil/attributes.h
+++ b/libavutil/attributes.h
@@ -32,15 +32,15 @@
 #    define AV_GCC_VERSION_AT_LEAST(x,y) 0
 #endif
 
-#ifndef av_always_inline
-#if AV_GCC_VERSION_AT_LEAST(3,1)
+#if defined(CONFIG_ALWAYS_INLINE) && !CONFIG_ALWAYS_INLINE
+#    define av_always_inline inline
+#elif AV_GCC_VERSION_AT_LEAST(3,1)
 #    define av_always_inline __attribute__((always_inline)) inline
 #elif defined(_MSC_VER)
 #    define av_always_inline __forceinline
 #else
 #    define av_always_inline inline
 #endif
-#endif
 
 #ifndef av_extern_inline
 #if defined(__ICL) && __ICL >= 1210 || defined(__GNUC_STDC_INLINE__)
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list