aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2006-06-22 18:57:40 +0000
committerMåns Rullgård <mans@mansr.com>2006-06-22 18:57:40 +0000
commit2ba042a75603bdd0fee31b2348b371a953fbd5c9 (patch)
tree609efe62da3b715068a0a2192f393534e4eded28 /configure
parent87f1c97e7a10e2ea60af93977569d74dd5c743fd (diff)
downloadffmpeg-2ba042a75603bdd0fee31b2348b371a953fbd5c9.tar.gz
enable logging in configure by default, and print some advice on failure
Originally committed as revision 5509 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure38
1 files changed, 31 insertions, 7 deletions
diff --git a/configure b/configure
index 717b23d192..d95daf9936 100755
--- a/configure
+++ b/configure
@@ -9,7 +9,7 @@ show_help(){
echo
echo "Standard options:"
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 " --libdir=DIR install libs in DIR [PREFIX/lib]"
echo " --incdir=DIR install includes in DIR [PREFIX/include/ffmpeg]"
@@ -107,9 +107,29 @@ logfile(){
log END $1
}
-die(){
+echolog(){
log "$@"
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
exit 1
}
@@ -278,8 +298,8 @@ TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
# default parameters
-log="no"
-logfile="/dev/null"
+log="yes"
+logfile="config.err"
prefix="/usr/local"
libdir=""
incdir=""
@@ -631,7 +651,9 @@ CODEC_LIST=`grep 'register_avcodec(&[a-z]' $source_path/libavcodec/allcodecs.c
for opt do
case "$opt" in
- --log) log=yes
+ --log)
+ ;;
+ --log=*) log="${opt#*-}"
;;
--prefix=*) prefix=`echo $opt | cut -d '=' -f 2`; force_prefix=yes
;;
@@ -797,10 +819,12 @@ for opt do
esac
done
-if enabled log; then
- logfile=config.err
+if test "$log" != no; then
+ test "$log" = yes || logfile="$log"
echo "# $0 $@" >$logfile
set >>$logfile
+else
+ logfile=/dev/null
fi
# Combine FFLDFLAGS and the LDFLAGS environment variable