specify --enable-gpl flag only once
This commit is contained in:
parent
ed8fd4b4b2
commit
42257524ed
|
@ -158,7 +158,7 @@ for library in {0..61}; do
|
||||||
libvidstab)
|
libvidstab)
|
||||||
CFLAGS+=" $(pkg-config --cflags vidstab 2>>"${BASEDIR}"/build.log)"
|
CFLAGS+=" $(pkg-config --cflags vidstab 2>>"${BASEDIR}"/build.log)"
|
||||||
LDFLAGS+=" $(pkg-config --libs --static vidstab 2>>"${BASEDIR}"/build.log)"
|
LDFLAGS+=" $(pkg-config --libs --static vidstab 2>>"${BASEDIR}"/build.log)"
|
||||||
CONFIGURE_POSTFIX+=" --enable-libvidstab --enable-gpl"
|
CONFIGURE_POSTFIX+=" --enable-libvidstab"
|
||||||
;;
|
;;
|
||||||
libvorbis)
|
libvorbis)
|
||||||
CFLAGS+=" $(pkg-config --cflags vorbis 2>>"${BASEDIR}"/build.log)"
|
CFLAGS+=" $(pkg-config --cflags vorbis 2>>"${BASEDIR}"/build.log)"
|
||||||
|
@ -204,7 +204,7 @@ for library in {0..61}; do
|
||||||
rubberband)
|
rubberband)
|
||||||
CFLAGS+=" $(pkg-config --cflags rubberband 2>>"${BASEDIR}"/build.log)"
|
CFLAGS+=" $(pkg-config --cflags rubberband 2>>"${BASEDIR}"/build.log)"
|
||||||
LDFLAGS+=" $(pkg-config --libs --static rubberband 2>>"${BASEDIR}"/build.log)"
|
LDFLAGS+=" $(pkg-config --libs --static rubberband 2>>"${BASEDIR}"/build.log)"
|
||||||
CONFIGURE_POSTFIX+=" --enable-librubberband --enable-gpl"
|
CONFIGURE_POSTFIX+=" --enable-librubberband"
|
||||||
;;
|
;;
|
||||||
sdl)
|
sdl)
|
||||||
CFLAGS+=" $(pkg-config --cflags sdl2 2>>"${BASEDIR}"/build.log)"
|
CFLAGS+=" $(pkg-config --cflags sdl2 2>>"${BASEDIR}"/build.log)"
|
||||||
|
@ -256,17 +256,17 @@ for library in {0..61}; do
|
||||||
x264)
|
x264)
|
||||||
CFLAGS+=" $(pkg-config --cflags x264 2>>"${BASEDIR}"/build.log)"
|
CFLAGS+=" $(pkg-config --cflags x264 2>>"${BASEDIR}"/build.log)"
|
||||||
LDFLAGS+=" $(pkg-config --libs --static x264 2>>"${BASEDIR}"/build.log)"
|
LDFLAGS+=" $(pkg-config --libs --static x264 2>>"${BASEDIR}"/build.log)"
|
||||||
CONFIGURE_POSTFIX+=" --enable-libx264 --enable-gpl"
|
CONFIGURE_POSTFIX+=" --enable-libx264"
|
||||||
;;
|
;;
|
||||||
x265)
|
x265)
|
||||||
CFLAGS+=" $(pkg-config --cflags x265 2>>"${BASEDIR}"/build.log)"
|
CFLAGS+=" $(pkg-config --cflags x265 2>>"${BASEDIR}"/build.log)"
|
||||||
LDFLAGS+=" $(pkg-config --libs --static x265 2>>"${BASEDIR}"/build.log)"
|
LDFLAGS+=" $(pkg-config --libs --static x265 2>>"${BASEDIR}"/build.log)"
|
||||||
CONFIGURE_POSTFIX+=" --enable-libx265 --enable-gpl"
|
CONFIGURE_POSTFIX+=" --enable-libx265"
|
||||||
;;
|
;;
|
||||||
xvidcore)
|
xvidcore)
|
||||||
CFLAGS+=" $(pkg-config --cflags xvidcore 2>>"${BASEDIR}"/build.log)"
|
CFLAGS+=" $(pkg-config --cflags xvidcore 2>>"${BASEDIR}"/build.log)"
|
||||||
LDFLAGS+=" $(pkg-config --libs --static xvidcore 2>>"${BASEDIR}"/build.log)"
|
LDFLAGS+=" $(pkg-config --libs --static xvidcore 2>>"${BASEDIR}"/build.log)"
|
||||||
CONFIGURE_POSTFIX+=" --enable-libxvid --enable-gpl"
|
CONFIGURE_POSTFIX+=" --enable-libxvid"
|
||||||
;;
|
;;
|
||||||
zimg)
|
zimg)
|
||||||
CFLAGS+=" $(pkg-config --cflags zimg 2>>"${BASEDIR}"/build.log)"
|
CFLAGS+=" $(pkg-config --cflags zimg 2>>"${BASEDIR}"/build.log)"
|
||||||
|
@ -333,6 +333,11 @@ for custom_library_index in "${CUSTOM_LIBRARIES[@]}"; do
|
||||||
CONFIGURE_POSTFIX+=" --enable-${!ffmpeg_flag_name}"
|
CONFIGURE_POSTFIX+=" --enable-${!ffmpeg_flag_name}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# SET ENABLE GPL FLAG WHEN REQUESTED
|
||||||
|
if [ "$GPL_ENABLED" == "yes" ]; then
|
||||||
|
CONFIGURE_POSTFIX+=" --enable-gpl"
|
||||||
|
fi
|
||||||
|
|
||||||
export LDFLAGS+=" -L${ANDROID_NDK_ROOT}/platforms/android-${API}/arch-${TOOLCHAIN_ARCH}/usr/lib"
|
export LDFLAGS+=" -L${ANDROID_NDK_ROOT}/platforms/android-${API}/arch-${TOOLCHAIN_ARCH}/usr/lib"
|
||||||
|
|
||||||
# LINKING WITH ANDROID LTS SUPPORT LIBRARY IS NECESSARY FOR API < 18
|
# LINKING WITH ANDROID LTS SUPPORT LIBRARY IS NECESSARY FOR API < 18
|
||||||
|
|
|
@ -176,7 +176,7 @@ for library in {0..61}; do
|
||||||
libvidstab)
|
libvidstab)
|
||||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags vidstab 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_CFLAGS+=" $(pkg-config --cflags vidstab 2>>"${BASEDIR}"/build.log)"
|
||||||
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static vidstab 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static vidstab 2>>"${BASEDIR}"/build.log)"
|
||||||
CONFIGURE_POSTFIX+=" --enable-libvidstab --enable-gpl"
|
CONFIGURE_POSTFIX+=" --enable-libvidstab"
|
||||||
;;
|
;;
|
||||||
libvorbis)
|
libvorbis)
|
||||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags vorbis 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_CFLAGS+=" $(pkg-config --cflags vorbis 2>>"${BASEDIR}"/build.log)"
|
||||||
|
@ -222,7 +222,7 @@ for library in {0..61}; do
|
||||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags rubberband 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_CFLAGS+=" $(pkg-config --cflags rubberband 2>>"${BASEDIR}"/build.log)"
|
||||||
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static rubberband 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static rubberband 2>>"${BASEDIR}"/build.log)"
|
||||||
FFMPEG_LDFLAGS+=" -framework Accelerate"
|
FFMPEG_LDFLAGS+=" -framework Accelerate"
|
||||||
CONFIGURE_POSTFIX+=" --enable-librubberband --enable-gpl"
|
CONFIGURE_POSTFIX+=" --enable-librubberband"
|
||||||
;;
|
;;
|
||||||
sdl)
|
sdl)
|
||||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags sdl2 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_CFLAGS+=" $(pkg-config --cflags sdl2 2>>"${BASEDIR}"/build.log)"
|
||||||
|
@ -274,17 +274,17 @@ for library in {0..61}; do
|
||||||
x264)
|
x264)
|
||||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags x264 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_CFLAGS+=" $(pkg-config --cflags x264 2>>"${BASEDIR}"/build.log)"
|
||||||
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static x264 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static x264 2>>"${BASEDIR}"/build.log)"
|
||||||
CONFIGURE_POSTFIX+=" --enable-libx264 --enable-gpl"
|
CONFIGURE_POSTFIX+=" --enable-libx264"
|
||||||
;;
|
;;
|
||||||
x265)
|
x265)
|
||||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags x265 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_CFLAGS+=" $(pkg-config --cflags x265 2>>"${BASEDIR}"/build.log)"
|
||||||
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static x265 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static x265 2>>"${BASEDIR}"/build.log)"
|
||||||
CONFIGURE_POSTFIX+=" --enable-libx265 --enable-gpl"
|
CONFIGURE_POSTFIX+=" --enable-libx265"
|
||||||
;;
|
;;
|
||||||
xvidcore)
|
xvidcore)
|
||||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags xvidcore 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_CFLAGS+=" $(pkg-config --cflags xvidcore 2>>"${BASEDIR}"/build.log)"
|
||||||
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static xvidcore 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static xvidcore 2>>"${BASEDIR}"/build.log)"
|
||||||
CONFIGURE_POSTFIX+=" --enable-libxvid --enable-gpl"
|
CONFIGURE_POSTFIX+=" --enable-libxvid"
|
||||||
;;
|
;;
|
||||||
zimg)
|
zimg)
|
||||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags zimg 2>>"${BASEDIR}"/build.log)"
|
FFMPEG_CFLAGS+=" $(pkg-config --cflags zimg 2>>"${BASEDIR}"/build.log)"
|
||||||
|
@ -402,6 +402,11 @@ for custom_library_index in "${CUSTOM_LIBRARIES[@]}"; do
|
||||||
CONFIGURE_POSTFIX+=" --enable-${!ffmpeg_flag_name}"
|
CONFIGURE_POSTFIX+=" --enable-${!ffmpeg_flag_name}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# SET ENABLE GPL FLAG WHEN REQUESTED
|
||||||
|
if [ "$GPL_ENABLED" == "yes" ]; then
|
||||||
|
CONFIGURE_POSTFIX+=" --enable-gpl"
|
||||||
|
fi
|
||||||
|
|
||||||
# ALWAYS BUILD SHARED LIBRARIES
|
# ALWAYS BUILD SHARED LIBRARIES
|
||||||
BUILD_LIBRARY_OPTIONS="--enable-shared --disable-static --install-name-dir=@rpath"
|
BUILD_LIBRARY_OPTIONS="--enable-shared --disable-static --install-name-dir=@rpath"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user