echo " --enable-faadbin build FAAD support with runtime linking [default=no]"
echo " --enable-libgsm enable GSM support via libgsm [default=no]"
echo " --enable-mp3lame enable MP3 encoding via libmp3lame [default=no]"
- echo " --enable-libnut enable NUT support via libnut [default=no]"
- echo " --enable-libogg enable Ogg support via libogg [default=no]"
- echo " --enable-libtheora enable Theora support via libtheora [default=no]"
- echo " --enable-vorbis enable Vorbis support via libvorbis [default=no]"
+ echo " --enable-libnut enable NUT (de)muxing via libnut,"
+ echo " native demuxer exists [default=no]"
+ echo " --enable-libogg enable Ogg muxing via libogg [default=no]"
+ echo " --enable-libtheora enable Theora encoding via libtheora [default=no]"
+ echo " --enable-vorbis enable Vorbis en/decoding via libvorbis,"
+ echo " native implementations exist [default=no]"
echo " --enable-x264 enable H.264 encoding via x264 [default=no]"
- echo " --enable-xvid enable Xvid encoding via xvidcore [default=no]"
+ echo " --enable-xvid enable Xvid encoding via xvidcore,"
+ echo " native MPEG-4/Xvid encoder exists [default=no]"
echo " --enable-amr_nb enable amr_nb float audio codec"
echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
echo " --enable-amr_wb enable amr_wb float audio codec"
libdts="no"
libfaac="no"
libfaad="no"
+libfaad2="no"
libfaadbin="no"
libgsm="no"
libmp3lame="no"
show_help
fi
-FFMPEG_CONFIGURATION=" "
-for opt do
- FFMPEG_CONFIGURATION="$FFMPEG_CONFIGURATION""$opt "
-done
+FFMPEG_CONFIGURATION="$@"
ENCODER_LIST=`sed -n 's/^[^#]*ENC.*, *\(.*\)).*/\1_encoder/p' "$source_path/libavcodec/allcodecs.c"`
DECODER_LIST=`sed -n 's/^[^#]*DEC.*, *\(.*\)).*/\1_decoder/p' "$source_path/libavcodec/allcodecs.c"`
die "libogg must be enabled to enable libvorbis."
fi
-if disabled gpl ; then
- if enabled pp; then
- die "The Postprocessing code is under GPL and --enable-gpl is not specified."
- fi
-
- if enabled_any liba52 liba52bin ; then
- die "liba52 is under GPL and --enable-gpl is not specified."
- fi
-
- if enabled xvid; then
- die "libxvidcore is under GPL and --enable-gpl is not specified."
- fi
-
- if enabled x264; then
- die "x264 is under GPL and --enable-gpl is not specified."
- fi
-
- if enabled libdts; then
- die "libdts is under GPL and --enable-gpl is not specified."
- fi
-
- if enabled_any libfaad libfaadbin ; then
- if check_header faad.h; then
- check_cc << EOF
- #include <faad.h>
- #ifndef FAAD2_VERSION
- ok faad1
- #endif
- int main( void ) { return 0; }
+if enabled_any libfaad libfaadbin ; then
+ if check_header faad.h; then
+ check_cc << EOF
+#include <faad.h>
+#ifndef FAAD2_VERSION
+ok faad1
+#endif
+int main( void ) { return 0; }
EOF
- if test $? = 0 ; then
- die "FAAD2 is under GPL and --enable-gpl is not specified."
- fi
- else
- libfaad="no"
- libfaadbin="no"
- echo "FAAD test failed."
- fi
+ test $? = 0 && enable libfaad2
+ else
+ die "FAAD test failed."
fi
+fi
- if enabled x11grab; then
- die "The X11 grabber is under GPL and --enable-gpl is not specified."
- fi
- if enabled swscaler; then
- die "The software scaler is under GPL and --enable-gpl is not specified."
- fi
+if disabled gpl ; then
+ die_gpl_disabled(){
+ name=$1
+ shift
+ enabled_any $@ && die "$name is under GPL and --enable-gpl is not specified."
+ }
+ die_gpl_disabled "The Postprocessing code" pp
+ die_gpl_disabled "liba52" liba52 liba52bin
+ die_gpl_disabled "libxvidcore" xvid
+ die_gpl_disabled "x264" x264
+ die_gpl_disabled "libdts" libdts
+ die_gpl_disabled "FAAD2" libfaad2
+ die_gpl_disabled "The X11 grabber" x11grab
+ die_gpl_disabled "The software scaler" swscaler
fi
# compute MMX state
EOF
if test "$?" != 0; then
echo "$cc is unable to create an executable file."
- if test -z "$cross_prefix" -a "$cross_compile" = no; then
+ if test -z "$cross_prefix" && disabled cross_compile ; then
echo "If $cc is a cross-compiler, use the --cross-compile option."
echo "Only do this if you know what cross compiling means."
fi
check_header malloc.h
check_func memalign
-if disabled_all memalign memalign_hack && enabled_all need_memalign ; then
+if disabled_all memalign memalign_hack && enabled need_memalign ; then
die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
fi
add_extralibs $ldl
fi
-if test "$targetos" = "CYGWIN" -a "$lstatic" = "yes" ; then
+if test "$targetos" = "CYGWIN" && enabled lstatic ; then
vhook="no"
echo
echo "At the moment vhooks don't work on Cygwin static builds."
##########################################
# imlib check
-temp_extralibs -lImlib2
-check_ld <<EOF && imlib2=yes || imlib2=no
-#include <X11/Xlib.h>
+imlib2=no
+if (imlib2-config --version) >/dev/null 2>&1 ; then
+ temp_cflags `imlib2-config --cflags`
+ temp_extralibs `imlib2-config --libs`
+ check_ld <<EOF && imlib2=yes
#include <Imlib2.h>
int main( void ) { return (int) imlib_load_font("foo"); }
EOF
-restore_flags
+ restore_flags
+fi
##########################################
# FreeType check
echo "# Automatically generated by configure - do not modify!" > config.mak
echo "/* Automatically generated by configure - do not modify! */" > $TMPH
-echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
+echo "#define FFMPEG_CONFIGURATION \"$FFMPEG_CONFIGURATION\"" >> $TMPH
echo "PREFIX=$PREFIX" >> config.mak
echo "prefix=\$(DESTDIR)\${PREFIX}" >> config.mak