summaryrefslogtreecommitdiff
path: root/pkg/ffmpeg/gen.lua
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-09-07 13:35:38 -0700
committerMichael Forney <mforney@mforney.org>2021-09-07 13:41:35 -0700
commitfefb82678bd82c02fd177e58170a7558df504b9c (patch)
tree6f4d3ee8b786fbf0571f1b920cb547b21b8eea1f /pkg/ffmpeg/gen.lua
parent9b4962ff1c89d5c3babd45e14542dba97d4ae74f (diff)
ffmpeg: Probe for inline asm and intrinsics
Diffstat (limited to 'pkg/ffmpeg/gen.lua')
-rw-r--r--pkg/ffmpeg/gen.lua16
1 files changed, 13 insertions, 3 deletions
diff --git a/pkg/ffmpeg/gen.lua b/pkg/ffmpeg/gen.lua
index dd2c5ca1..6b7c2cd7 100644
--- a/pkg/ffmpeg/gen.lua
+++ b/pkg/ffmpeg/gen.lua
@@ -27,9 +27,15 @@ pkg.deps = {
'$gendir/headers',
}
-build('cat', '$outdir/config.h', {'$dir/config-head.h', '$dir/config.h', '$builddir/probe/PIC', '$dir/config-tail.h'})
-build('awk', '$outdir/config.asm', {'$dir/config.h', '$builddir/probe/PIC'}, {
- expr=[['{print "%define " substr($$0, length("#define ") + 1)}']],
+local probe = {
+ '$builddir/probe/PIC',
+ '$builddir/probe/HAVE_INLINE_ASM',
+ '$builddir/probe/HAVE_MMINTRIN_H',
+}
+
+build('cat', '$outdir/config.h', {'$dir/config-head.h', probe, '$dir/config.h', '$dir/config-tail.h'})
+build('sed', '$outdir/config.asm', {probe, '$dir/config.h'}, {
+ expr=[[-n -e 's,^# *,%,p']],
})
build('awk', '$outdir/config.texi', '$dir/config.h', {
expr=[['$$3 == "1" {gsub("_", "-", $$2); print "@set", tolower($$2), "yes"}']],
@@ -92,6 +98,10 @@ for line in iterlines('sources.txt', 1) do
end
end
end
+-- combination option in libavutil/x86/Makefile
+if options.HAVE_MMX_EXTERNAL then
+ sources.libavutil['libavutil/x86/emms.asm'] = true
+end
for lib, srcs in pairs(sources) do
sources[lib] = table.keys(srcs)
end