#!/bin/bash -x
# cd cincv; cfg_cv.sh /path/cin5
cin="$1"
+THIRDPARTY=`pwd`/thirdparty
rm -rf thirdparty; cp -a $cin/thirdparty .
for f in configure.ac Makefile.am autogen.sh; do mv $f $f.cv; cp -a $cin/$f .; done
mv m4 m4.cv
-mkdir libzmpeg3 db
+rm -rf ./libzmpeg3 ./db
+mkdir libzmpeg3 db db/utils
./autogen.sh
-./configure --disable-static \
+./configure --disable-static-build --without-ladspa-build \
--enable-faac=yes --enable-faad2=yes --enable-a52dec=yes \
--enable-mjpegtools=yes --enable-lame=yes --enable-x264=yes \
--enable-libogg=auto --enable-libtheora=auto --enable-libvorbis=auto \
--disable-audiofile --disable-encore --disable-esound --disable-fdk \
--disable-ffmpeg --disable-fftw --disable-flac --disable-giflib --disable-ilmbase \
--disable-libavc1394 --disable-libraw1394 --disable-libiec61883 --disable-libvpx \
- --disable-openjpeg --disable-ladspa --disable-twolame --disable-x265
+ --disable-openjpeg --disable-twolame --disable-x265
export CFG_VARS='CFLAGS+=" -fPIC"'; \
export MAK_VARS='CFLAGS+=" -fPIC"'; \
echo -n " -L$d";
done`
-export LIBS=`for f in $static_libs; do
+export LIBS=-lpthread `for f in $static_libs; do
if [ ! -f "$f" ]; then continue; fi;
ls $f
done | sed -e 's;.*/;;' -e 's;lib\(.*\)\.a$;\1;' | \
export LIBX264_LIBS="-L$THIRDPARTY/x264-20151229/. -lx264"
for f in $MJPEG_LIBS $LIBX264_LIBS; do
- LIBS=`echo "$LIBS" | sed -e "s/[ ]*\<$f\>[ ]*/ /"`
+ LIBS=`echo "$LIBS" | sed -e "s;[ ]*\<$f\>[ ]*; ;"`
done
echo LDFLAGS=$LDFLAGS
a52dec.mak_params?= ; cd $(call bld_path,a52dec,include); ln -sf . a52dec
a52dec.cfg_vars?= CFLAGS+=" -U__FreeBSD__ $(call inc_path,djbfft)" LIBS+=" $(call ld_path,djbfft)"
a52dec.cfg_params?=--enable-djbfft
-djbfft.cfg_vars?=echo "$(call bld_path,djbfft)" > conf-home; echo "$(CC) $(CFLAGS)" > conf-cc; echo > ./configure; chmod +x ./configure;
+djbfft.cfg_vars?=echo "$(call bld_path,djbfft)" > conf-home; \
+ (CFLAGS="$(CFLAGS)"; $(CFG_VARS); echo "$(CC) $$$$CFLAGS") > conf-cc; \
+ echo > ./configure; chmod +x ./configure;
djbfft.mak_params?=; cd $(call bld_path,djbfft); ln -sf djbfft.a libdjbfft.a
audiofile.cfg_params?=--enable-shared=no
audiofile.mak_params?=LIBS="-lm -lstdc++"