-define Build/Configure
- # this is *NOT* GNU configure
- ( cd $(PKG_BUILD_DIR); \
- CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
- ./configure \
- --enable-cross-compile \
- --cross-prefix="$(TARGET_CROSS)" \
- --arch="$(ARCH)" \
- --target-os=linux \
- --prefix="/usr" \
- --enable-shared \
- --enable-static \
- --disable-debug \
- \
- --enable-gpl \
- --enable-version3 \
- \
- --disable-doc \
- --disable-dxva2 \
- --disable-mmx \
- --disable-mmx2 \
- --enable-pthreads \
- --disable-optimizations \
- --enable-small \
- --disable-stripping \
- --enable-zlib \
- --enable-postproc \
- --enable-swscale \
- \
- $(if $(CONFIG_FFMPEG_BSFS),,--disable-bsfs) \
- $(if $(CONFIG_FFMPEG_OUTDEVS),,--disable-outdevs) \
- $(if $(CONFIG_FFMPEG_INDEVS),,--disable-indevs) \
- $(if $(CONFIG_FFMPEG_FILTERS),,--disable-filters) \
- $(if $(CONFIG_FFMPEG_HWACCELS),,--disable-hwaccels) \
- $(if $(CONFIG_FFMPEG_PARSERS),,--disable-parsers) \
- $(if $(CONFIG_FFMPEG_PROTOCOLS),,--disable-protocols) \
- $(if $(CONFIG_FFMPEG_ENCODE),,--disable-encoders --disable-muxers) \
- $(if $(CONFIG_FFMPEG_DECODE),,--disable-decoders --disable-demuxers) \
- $(FFMPEG_CONFIGURE_ENCODERS) \
- $(FFMPEG_CONFIGURE_DECODERS) \
- $(FFMPEG_CONFIGURE_MUXERS) \
- $(FFMPEG_CONFIGURE_DEMUXERS) \
- $(FFMPEG_CONFIGURE_PARSERS) \
- $(FFMPEG_CONFIGURE_PROTOCOLS) \
- \
- $(if $(CONFIG_PACKAGE_ffmpeg),,--disable-ffmpeg) \
- --disable-ffplay \
- $(if $(CONFIG_PACKAGE_ffprobe),,--disable-ffprobe) \
- $(if $(CONFIG_PACKAGE_ffserver),,--disable-ffserver) \
- \
+FFMPEG_CONFIGURE:= \
+ CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ PKG_CONFIG="pkg-config" \
+ ./configure \
+ --enable-cross-compile \
+ --cross-prefix="$(TARGET_CROSS)" \
+ --arch="$(ARCH)" \
+ --target-os=linux \
+ --prefix="/usr" \
+ --enable-shared \
+ --enable-static \
+ --disable-debug \
+ \
+ --enable-gpl \
+ --enable-version3 \
+ \
+ --disable-doc \
+ --disable-dxva2 \
+ --disable-mmx \
+ --disable-mmx2 \
+ --enable-pthreads \
+ --disable-optimizations \
+ --enable-small \
+ --disable-stripping \
+ --enable-zlib \
+
+ifeq ($(BUILD_VARIANT),custom)
+
+ FFMPEG_ENABLE= \
+ $(foreach c, $(2), \
+ $(if $($(3)_$(c)),--enable-$(1)="$(c)") \