STATIC_LIBRARIES="y"
elif [ "$1" = "shared" ]; then
STATIC_LIBRARIES="n"
+elif [ "$1" = "cv" ]; then
+ STATIC_LIBRARIES="n"
+ libs="libogg libtheora libvorbis openexr libdv libjpeg tiff x264 mjpegtools a52dec lame libsndfile faac faad2"
+ forced_libs="mjpegtools x264"
else
- echo "usage: $0 <static | shared>"
+ echo "usage: $0 <static | shared | cv>"
exit 1
fi
append $sta_lib $@
}
+inc_a52dec="include"
+add_library a52dec \
+ liba52/.libs/liba52.a
inc_audiofile="."
add_library audiofile \
libaudiofile/.libs/libaudiofile.a \
add_library libvpx \
libvpx.a \
+echo ""
+if [ -n "$libs" ]; then
+ LIBS="$libs"
+fi
+
n=0
for lib in $LIBS; do
echo -n " $lib"
# dynamic library paths
probe() {
+ if ! `echo $LIBS | grep -qw $1`; then return 0; fi
local name="$1"
local headers="$2"
local func="$3"
}
# test for shared libs/header files
+probe a52dec "a52.h" a52_init -la52
probe audiofile "audiofile.h" afOpenFile -laudiofile
probe faac "stdint.h faac.h" faacEncGetVersion -lfaac
probe faad2 "faad.h" NeAACDecInit -lfaad
probe x264 "stdint.h x264.h" x264_encoder_encode -lx264
probe x265 "x265.h" x265_encoder_encode -lx265
-echo ""
+if [ -n "$forced_libs" ]; then
+ forced_libs="encore ffmpeg giflib libuuid"
+fi
+
# for ffmpeg link/broken disto libs
-forced_libs="encore ffmpeg giflib libuuid"
for name in $LIBS; do
if is_in $name $forced_libs; then
set - ${!name}