Newer
Older
echo "CONFIG_LIBVORBIS=yes" >> config.mak
fi
Zdenek Kabelac
committed
if test "$faad" = "yes" ; then
echo "#define CONFIG_FAAD 1" >> $TMPH
echo "CONFIG_FAAD=yes" >> config.mak
fi
if test "$faadbin" = "yes" ; then
echo "#define CONFIG_FAADBIN 1" >> $TMPH
Zdenek Kabelac
committed
fi
Michael Niedermayer
committed
if test "$faac" = "yes" ; then
echo "#define CONFIG_FAAC 1" >> $TMPH
echo "CONFIG_FAAC=yes" >> config.mak
fi
if test "$xvid" = "yes" ; then
echo "#define CONFIG_XVID 1" >> $TMPH
echo "CONFIG_XVID=yes" >> config.mak
fi
if test "$x264" = "yes" ; then
echo "#define CONFIG_X264 1" >> $TMPH
echo "CONFIG_X264=yes" >> config.mak
fi
if test "$avisynth" = "yes" ; then
echo "#define CONFIG_AVISYNTH 1" >> $TMPH
echo "CONFIG_AVISYNTH=yes" >> config.mak
fi
if test "$mingw32" = "yes" ; then
echo "CONFIG_MINGW=yes" >> config.mak
echo "HAVE_W32THREADS=yes" >> config.mak
echo "#define HAVE_W32THREADS 1" >> $TMPH
François Revol
committed
echo "#define HAVE_THREADS 1" >> $TMPH
echo "#ifndef __MINGW32__" >> $TMPH
echo "#define __MINGW32__ 1" >> $TMPH
echo "#endif" >> $TMPH
Felix Bünemann
committed
fi
echo "CONFIG_MINGW=yes" >> config.mak
echo "#define CONFIG_WINCE 1" >> $TMPH
echo "CONFIG_WINCE=yes" >> config.mak
echo "#ifndef __MINGW32__" >> $TMPH
echo "#define __MINGW32__ 1" >> $TMPH
echo "#endif" >> $TMPH
fi
if test "$os2" = "yes" ; then
echo "#define CONFIG_OS2 1" >> $TMPH
echo "CONFIG_OS2=yes" >> config.mak
Michael Niedermayer
committed
echo "HAVE_OS2THREADS=yes" >> config.mak
echo "#define HAVE_OS2THREADS 1" >> $TMPH
echo "#define HAVE_THREADS 1" >> $TMPH
fi
if test "$targetos" = "SunOS" ; then
echo "#define CONFIG_SUNOS 1" >> $TMPH
fi
if test "$targetos" = "BeOS" ; then
François Revol
committed
echo "HAVE_BEOSTHREADS=yes" >> config.mak
echo "#define HAVE_BEOSTHREADS 1" >> $TMPH
echo "#define HAVE_THREADS 1" >> $TMPH
fi
if test "$targetos" = "Darwin"; then
echo "#define CONFIG_DARWIN 1" >> $TMPH
echo "CONFIG_DARWIN=yes" >> config.mak
fi
echo "#define HAVE_MALLOC_H 1" >> $TMPH
echo "#define HAVE_MEMALIGN 1" >> $TMPH
else
echo "#undef HAVE_MEMALIGN" >> $TMPH
fi
Michael Niedermayer
committed
if test "$memalignhack" = "yes" ; then
echo "#define MEMALIGN_HACK 1" >> $TMPH
fi
if test "$netserver" = "yes" ; then
echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
fi
if test "$need_inet_aton" = "yes" ; then
echo "NEED_INET_ATON=yes" >> config.mak
fi
echo "#define SIMPLE_IDCT 1" >> $TMPH
fi
if test "$protocols" = "yes" ; then
echo "#define CONFIG_PROTOCOLS 1" >> $TMPH
echo "CONFIG_PROTOCOLS=yes" >> config.mak
fi
if test "$ffmpeg" = "yes" ; then
echo "#define CONFIG_FFMPEG 1" >> $TMPH
echo "CONFIG_FFMPEG=yes" >> config.mak
fi
if test "$ffserver" = "yes" ; then
echo "#define CONFIG_FFSERVER 1" >> $TMPH
echo "CONFIG_FFSERVER=yes" >> config.mak
fi
if test "$ffplay" = "yes" ; then
echo "CONFIG_FFPLAY=yes" >> config.mak
fi
Michael Niedermayer
committed
if test "$gpl" = "yes" ; then
echo "#define CONFIG_GPL 1" >> $TMPH
echo "CONFIG_GPL=yes" >> config.mak
fi
echo "#define restrict $_restrict" >> $TMPH
if test "$optimize" = "small"; then
echo "#define always_inline" >> $TMPH
echo "#define CONFIG_SMALL 1" >> $TMPH
Fabrice Bellard
committed
# build tree in object directory if source path is different from current one
if test "$source_path_used" = "yes" ; then
DIRS="\
doc \
libavformat \
libavcodec \
libavcodec/alpha \
libavcodec/armv4l \
libavcodec/bfin \
libavcodec/i386 \
libavcodec/sparc \
libavcodec/mlib \
libavcodec/ppc \
libavcodec/liba52 \
tests \
vhook \
"
FILES="\
Makefile \
libavformat/Makefile \
libavcodec/Makefile \
tests/Makefile \
vhook/Makefile \
doc/Makefile \
doc/texi2pod.pl \
"
Fabrice Bellard
committed
for dir in $DIRS ; do
mkdir -p $dir
done
for f in $FILES ; do
Fabrice Bellard
committed
done
fi
echo "SRC_PATH=$source_path" >> config.mak
echo "BUILD_ROOT=$PWD" >> config.mak
Fabrice Bellard
committed
echo "#define CONFIG_AMR 1" >> $TMPH
echo "CONFIG_AMR=yes" >> config.mak
if test "$amr_wb" = "yes" ; then
echo "#define CONFIG_AMR_WB 1" >> $TMPH
echo "CONFIG_AMR_WB=yes" >> config.mak
echo
echo "AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204"
echo "V5.1.0 from "
echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip"
echo "and extracted the source to libavcodec/amrwb_float"
fi
if test "$amr_nb" = "yes" ; then
echo "#define CONFIG_AMR_NB 1" >> $TMPH
echo "CONFIG_AMR_NB=yes" >> config.mak
echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
echo "REL-5 V5.1.0 from "
echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/26104-510.zip"
echo "and extracted the source to libavcodec/amr_float"
echo "If you try this on alpha, you may need to change Word32 to int in amr/typedef.h"
fi
echo "#define CONFIG_AMR_NB_FIXED 1" >> $TMPH
echo "CONFIG_AMR_NB_FIXED=yes" >> config.mak
echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
echo "REL-5 version 5.1.0 from "
echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-510.zip"
echo "and extracted src to libavcodec/amr"
echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
Torsten Martinsen
committed
if test "$amr_if2" = "yes" ; then
echo "AMR_CFLAGS=-DIF2=1" >> config.mak
fi
# Apparently it's not possible to portably echo a backslash.
if test "$asmalign_pot" = "yes" ; then
printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH
printf '#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\\n\\t"\n' >> $TMPH
# "tr '[a-z]' '[A-Z]'" is a workaround for Solaris tr not grokking "tr a-z A-Z"
for codec in $DECODER_LIST $ENCODER_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST; do
echo "#define CONFIG_`echo $codec | tr '[a-z]' '[A-Z]'` 1" >> $TMPH
echo "CONFIG_`echo $codec | tr '[a-z]' '[A-Z]'`=yes" >> config.mak
Michael Niedermayer
committed
done
Diego Biurrun
committed
# Do not overwrite config.h if unchanged to avoid superfluous rebuilds.
diff $TMPH config.h >/dev/null 2>&1
if test "$?" != "0" ; then
Diego Biurrun
committed
mv -f $TMPH config.h
else
echo "config.h is unchanged"
fi
rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
Aurelien Jacobs
committed
# libavutil.pc
cat <<EOF >libavutil.pc
prefix=$PREFIX
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
Name: libavutil
Description: FFmpeg utility library
Version: $lavu_version
Conflicts:
Libs: -L\${libdir} -lavutil
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
EOF
cat <<EOF >libavutil-uninstalled.pc
prefix=
exec_prefix=
libdir=\${pcfiledir}/libavutil
includedir=\${pcfiledir}/libavutil
Name: libavutil
Description: FFmpeg utility library
Version: $lavu_version
Conflicts:
Libs: \${libdir}/${LIBPREF}avutil${LIBSUF}
Cflags: -I\${includedir}
EOF
Aurelien Jacobs
committed
# libavcodec.pc
cat <<EOF >libavcodec.pc
prefix=$PREFIX
exec_prefix=\${prefix}
Aurelien Jacobs
committed
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
Aurelien Jacobs
committed
Name: libavcodec
Description: FFmpeg codec library
Version: $lavc_version
Requires: $pkg_requires libavutil = $lavu_version
Aurelien Jacobs
committed
Conflicts:
Libs: -L\${libdir} -lavcodec $extralibs
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
EOF
cat <<EOF >libavcodec-uninstalled.pc
prefix=
exec_prefix=
libdir=\${pcfiledir}/libavcodec
includedir=\${pcfiledir}/libavcodec
Name: libavcodec
Description: FFmpeg codec library
Version: $lavc_version
Requires: $pkg_requires libavutil = $lavu_version
Aurelien Jacobs
committed
Conflicts:
Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
Cflags: -I\${includedir}
EOF
# libavformat.pc
cat <<EOF >libavformat.pc
prefix=$PREFIX
exec_prefix=\${prefix}
Aurelien Jacobs
committed
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
Aurelien Jacobs
committed
Name: libavformat
Description: FFmpeg container format library
Version: $lavf_version
Requires: $pkg_requires libavcodec = $lavc_version
Aurelien Jacobs
committed
Conflicts:
Libs: -L\${libdir} -lavformat $extralibs
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
EOF
cat <<EOF >libavformat-uninstalled.pc
prefix=
exec_prefix=
libdir=\${pcfiledir}/libavformat
includedir=\${pcfiledir}/libavformat
Name: libavformat
Description: FFmpeg container format library
Version: $lavf_version
Requires: $pkg_requires libavcodec = $lavc_version
Aurelien Jacobs
committed
Conflicts:
Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs
Cflags: -I\${includedir}
EOF
# libpostproc.pc
cat <<EOF >libpostproc.pc
prefix=$PREFIX
exec_prefix=\${prefix}
Aurelien Jacobs
committed
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
Aurelien Jacobs
committed
Name: libpostproc
Description: FFmpeg post processing library
Version: $lavc_version
Aurelien Jacobs
committed
Conflicts:
Libs: -L\${libdir} -lpostproc
Cflags: -I\${includedir} -I\${includedir}/postproc
EOF
cat <<EOF >libpostproc-uninstalled.pc
prefix=
exec_prefix=
libdir=\${pcfiledir}/libpostproc
includedir=\${pcfiledir}/libpostproc
Aurelien Jacobs
committed
Name: libpostproc
Description: FFmpeg post processing library
Version: $lavc_version
Aurelien Jacobs
committed
Conflicts:
Libs: \${libdir}/${LIBPREF}postproc${LIBSUF}
Cflags: -I\${includedir}
EOF
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
# libswscale.pc
cat <<EOF >libswscale.pc
prefix=$PREFIX
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
Name: libswscale
Description: FFmpeg image rescaling library
Version: $sws_version
Requires: $pkg_requires libavutil = $lavu_version
Conflicts:
Libs: -L\${libdir} -lswscale
Cflags: -I\${includedir} -I\${includedir}/swscale
EOF
cat <<EOF >libswscale-uninstalled.pc
prefix=
exec_prefix=
libdir=\${pcfiledir}/libswscale
includedir=\${pcfiledir}/libswscale
Name: libswscale
Description: FFmpeg image rescaling library
Version: $sws_version
Requires: $pkg_requires libavutil = $lavu_version
Conflicts:
Libs: \${libdir}/${LIBPREF}swscale${LIBSUF}
Cflags: -I\${includedir}
EOF