2 # cd cincv; cfg_cv.sh /path/cin5
3 # used git clone "git://git.cinelerra-gg.org/goodguy/cinelerra.git" "cinelerra5"
4 # ver: git checkout 135eb5f052a2f75e4df6c86511a94ec9586e096d (dec 30, 2016)
6 THIRDPARTY=`pwd`/thirdparty
7 unset LIBS LDFLAGS CFLAGS CPPFLAGS CXXFLAGS
8 export ac_cv_header_xmmintrin_h=no
9 for f in ./quicktime/Makefile.am ./libmpeg3/Makefile.am; do
10 sed -e 's/-Wl,--no-undefined//' -i $f
12 rm -rf thirdparty; cp -a $cin/thirdparty .
13 for f in configure.ac Makefile.am autogen.sh; do mv $f $f.cv; cp -a $cin/$f .; done
15 rm -rf ./libzmpeg3 ./db
16 mkdir -p libzmpeg3 db db/utils mpeg2enc mplexlo
19 ./configure --disable-static-build --without-ladspa-build \
20 --enable-faac=yes --enable-faad2=yes --enable-a52dec=yes \
21 --enable-mjpegtools=yes --enable-lame=yes --enable-x264=yes \
22 --enable-libogg=auto --enable-libtheora=auto --enable-libvorbis=auto \
23 --enable-openexr=auto --enable-libsndfile=auto --enable-libdv=auto \
24 --enable-libjpeg=auto --enable-tiff=auto --enable-x264=auto \
25 --enable-audiofile --disable-encore --disable-esound --disable-fdk \
26 --disable-ffmpeg --disable-fftw --disable-flac --disable-giflib --disable-ilmbase \
27 --disable-libavc1394 --disable-libraw1394 --disable-libiec61883 --disable-libvpx \
28 --disable-openjpeg --disable-twolame --disable-x265
30 export CFG_VARS='CFLAGS+=" -fPIC"'; \
31 export MAK_VARS='CFLAGS+=" -fPIC"'; \
32 export CFG_PARAMS="--with-pic --enable-pic --disable-asm"; \
34 jobs=`make -s -C thirdparty val-WANT_JOBS`
35 make -C thirdparty -j$jobs
37 static_libs=`make -C thirdparty -s val-static_libs`
38 static_incs=`make -C thirdparty -s val-static_incs`
41 for f in configure.ac Makefile.am autogen.sh; do rm -f $f; mv $f.cv $f; done
44 LDFLAGS=`for f in $static_libs; do
45 if [ ! -f "$f" ]; then continue; fi;
47 done | sed -e 's;/[^/]*$;;' | \
48 sort -u | while read d; do
53 LIBS=`for f in $static_libs; do
54 if [ ! -f "$f" ]; then continue; fi;
56 done | sed -e 's;.*/;;' -e 's;lib\(.*\)\.a$;\1;' | \
57 sort -u | while read a; do
63 export CFLAGS="$static_incs"
64 export CXXFLAGS="$static_incs"
66 if [ ! -f configure ]; then ./autogen.sh; fi
67 sed -e 's/^LIBX264_LIBS=""/#LIBX264_LIBS=""/' -i configure
69 export MJPEG_LIBS="-L$THIRDPARTY/mjpegtools-2.1.0/utils/.libs -lmjpegutils \
70 -L$THIRDPARTY/mjpegtools-2.1.0/lavtools/.libs -llavfile \
71 -L$THIRDPARTY/mjpegtools-2.1.0/lavtools/.libs -llavjpeg \
72 -L$THIRDPARTY/mjpegtools-2.1.0/mpeg2enc/.libs -lmpeg2encpp \
73 -L$THIRDPARTY/mjpegtools-2.1.0/mplex/.libs -lmplex2"
74 export MJPEG_CFLAGS="-I$THIRDPARTY/mjpegtools-2.1.0/. \
75 -I$THIRDPARTY/mjpegtools-2.1.0/lavtools \
76 -I$THIRDPARTY/mjpegtools-2.1.0/utils"
78 export LIBX264_CFLAGS="-I$THIRDPARTY/x264-snapshot-20160220-2245-stable/."
79 export LIBX264_LIBS="-L$THIRDPARTY/x264-snapshot-20160220-2245-stable/. -lx264"
81 for f in $MJPEG_LIBS $LIBX264_LIBS; do
82 LIBS=`echo "$LIBS" | sed -e "s;[ ]*\<$f\>[ ]*; ;"`
89 # -lmxxxxx dies, feed it a -lm early to prevent misformed parameters
90 export LIBS="-la52 -ldjbfft -lfaac -lfaad -lHalf -lIex -lIexMath -lIlmThread -lImath -llavfile -llavjpeg -lm -lmjpegutils -lmmxsse -lmp3lame -lmp4ff -lmpeg2encpp -lmpgdecoder -lmplex2 -logg -lvorbis -lvorbisenc -lvorbisfile -lx264 -lyuvfilters -lpthread -ldl"
91 # po Makefile construction error: skip it
92 touch po/Makefile.in.in
94 # uuid search path is not predictable, fake it
95 ( cd thirdparty/libuuid-1.0.3/; ln -s . uuid )
96 # old linker scripts want .libs/.libs path, fake it:
97 find thirdparty/ -name .libs | while read f ; do ( cd $f; ln -s . .libs ); done
102 echo "export ac_cv_header_xmmintrin_h=no"
103 echo "export THIRDPARTY=\"$THIRDPARTY\""
106 # have to rebuild these by hand
107 # have to get rid of -Wl,--no-undefined"
108 # cd plugins/libeffecttv/.libs/; \rm -f libeffecttv.a; ar r libeffecttv.a effecttv.o
109 # cd quicktime/encore50/.libs/; \rm -f libencore.a; ar r libencore.a *.o
110 # cd quicktime; vi Makefile; remove -Wl,--no-undefined from:, make
111 # libquicktimecv_la_LDFLAGS = -version-info 1:0:0 -release 1.6.0
113 # shares do not want thirdparty link data:
117 LDFLAGS="-L$THIRDPARTY/a52dec-0.7.4/liba52/.libs \
118 -L$THIRDPARTY/djbfft-0.76 -ldjbfft" )
121 make LIBS= LDFLAGS= )
123 for f in */Makefile; do
124 cp $f $f.sav1; sed -e "/^LIBS\>/d" -e "/^LDFLAGS\>/d" -i $f
130 #make install DESTDIR=`pwd` >> log 2>&1
131 #export LD_LIBRARY_PATH=`pwd`/usr/local/lib
133 #gdb ./.libs/cinelerra