1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

enable logging in configure by default, and print some advice on failure

Originally committed as revision 5509 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2006-06-22 18:57:40 +00:00
parent 87f1c97e7a
commit 2ba042a756

38
configure vendored
View File

@ -9,7 +9,7 @@ show_help(){
echo echo
echo "Standard options:" echo "Standard options:"
echo " --help print this message" echo " --help print this message"
echo " --log log tests and output to config.err" echo " --log[=FILE|yes|no] log tests and output to FILE [config.err]"
echo " --prefix=PREFIX install in PREFIX [$prefix]" echo " --prefix=PREFIX install in PREFIX [$prefix]"
echo " --libdir=DIR install libs in DIR [PREFIX/lib]" echo " --libdir=DIR install libs in DIR [PREFIX/lib]"
echo " --incdir=DIR install includes in DIR [PREFIX/include/ffmpeg]" echo " --incdir=DIR install includes in DIR [PREFIX/include/ffmpeg]"
@ -107,9 +107,29 @@ logfile(){
log END $1 log END $1
} }
die(){ echolog(){
log "$@" log "$@"
echo "$@" echo "$@"
}
die(){
echolog "$@"
cat <<EOF
If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-devel@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
EOF
if enabled log; then
cat <<EOF
Include the log file "$logfile" produced by configure as this will help
solving the problem.
EOF
else
cat <<EOF
Rerun configure with logging enabled (do not use --log=no), and include the
log this produces with your report.
EOF
fi
rm -f $TMPC $TMPO $TMPE $TMPS $TMPH rm -f $TMPC $TMPO $TMPE $TMPS $TMPH
exit 1 exit 1
} }
@ -278,8 +298,8 @@ TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h" TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
# default parameters # default parameters
log="no" log="yes"
logfile="/dev/null" logfile="config.err"
prefix="/usr/local" prefix="/usr/local"
libdir="" libdir=""
incdir="" incdir=""
@ -631,7 +651,9 @@ CODEC_LIST=`grep 'register_avcodec(&[a-z]' $source_path/libavcodec/allcodecs.c
for opt do for opt do
case "$opt" in case "$opt" in
--log) log=yes --log)
;;
--log=*) log="${opt#*-}"
;; ;;
--prefix=*) prefix=`echo $opt | cut -d '=' -f 2`; force_prefix=yes --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`; force_prefix=yes
;; ;;
@ -797,10 +819,12 @@ for opt do
esac esac
done done
if enabled log; then if test "$log" != no; then
logfile=config.err test "$log" = yes || logfile="$log"
echo "# $0 $@" >$logfile echo "# $0 $@" >$logfile
set >>$logfile set >>$logfile
else
logfile=/dev/null
fi fi
# Combine FFLDFLAGS and the LDFLAGS environment variable # Combine FFLDFLAGS and the LDFLAGS environment variable