Commit 720c69da authored by Måns Rullgård's avatar Måns Rullgård

solaris sh doesn't allow functions and variables with the same name

Originally committed as revision 5614 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 57d664ff
...@@ -102,7 +102,7 @@ log(){ ...@@ -102,7 +102,7 @@ log(){
echo "$@" >>$logfile echo "$@" >>$logfile
} }
logfile(){ log_file(){
log BEGIN $1 log BEGIN $1
cat -n $1 >>$logfile cat -n $1 >>$logfile
log END $1 log END $1
...@@ -120,7 +120,7 @@ If you think configure made a mistake, make sure you are using the latest ...@@ -120,7 +120,7 @@ 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 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. ffmpeg-devel@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
EOF EOF
if enabled log; then if enabled logging; then
cat <<EOF cat <<EOF
Include the log file "$logfile" produced by configure as this will help Include the log file "$logfile" produced by configure as this will help
solving the problem. solving the problem.
...@@ -196,7 +196,7 @@ add_extralibs(){ ...@@ -196,7 +196,7 @@ add_extralibs(){
check_cc(){ check_cc(){
log check_cc "$@" log check_cc "$@"
cat >$TMPC cat >$TMPC
logfile $TMPC log_file $TMPC
log $cc $CFLAGS "$@" -c -o $TMPO $TMPC log $cc $CFLAGS "$@" -c -o $TMPO $TMPC
$cc $CFLAGS "$@" -c -o $TMPO $TMPC >>$logfile 2>&1 $cc $CFLAGS "$@" -c -o $TMPO $TMPC >>$logfile 2>&1
} }
...@@ -204,7 +204,7 @@ check_cc(){ ...@@ -204,7 +204,7 @@ check_cc(){
check_cpp(){ check_cpp(){
log check_cpp "$@" log check_cpp "$@"
cat >$TMPC cat >$TMPC
logfile $TMPC log_file $TMPC
log $cc $CFLAGS "$@" -E -o $TMPO $TMPC log $cc $CFLAGS "$@" -E -o $TMPO $TMPC
$cc $CFLAGS "$@" -E -o $TMPO $TMPC >>$logfile 2>&1 $cc $CFLAGS "$@" -E -o $TMPO $TMPC >>$logfile 2>&1
} }
...@@ -212,7 +212,7 @@ check_cpp(){ ...@@ -212,7 +212,7 @@ check_cpp(){
check_ld(){ check_ld(){
log check_ld "$@" log check_ld "$@"
cat >$TMPC cat >$TMPC
logfile $TMPC log_file $TMPC
log $cc $CFLAGS $LDFLAGS "$@" -o $TMPE $TMPC $extralibs log $cc $CFLAGS $LDFLAGS "$@" -o $TMPE $TMPC $extralibs
$cc $CFLAGS $LDFLAGS "$@" -o $TMPE $TMPC $extralibs >>$logfile 2>&1 $cc $CFLAGS $LDFLAGS "$@" -o $TMPE $TMPC $extralibs >>$logfile 2>&1
} }
...@@ -299,7 +299,7 @@ TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S" ...@@ -299,7 +299,7 @@ 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="yes" logging="yes"
logfile="config.err" logfile="config.err"
prefix="/usr/local" prefix="/usr/local"
libdir="" libdir=""
...@@ -650,7 +650,7 @@ for opt do ...@@ -650,7 +650,7 @@ for opt do
case "$opt" in case "$opt" in
--log) --log)
;; ;;
--log=*) log="${opt#*=}" --log=*) logging="${opt#*=}"
;; ;;
--prefix=*) prefix=`echo $opt | cut -d '=' -f 2`; force_prefix=yes --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`; force_prefix=yes
;; ;;
...@@ -818,8 +818,8 @@ for opt do ...@@ -818,8 +818,8 @@ for opt do
esac esac
done done
if test "$log" != no; then if test "$logging" != no; then
test "$log" = yes || logfile="$log" test "$logging" = yes || logfile="$logging"
echo "# $0 $@" >$logfile echo "# $0 $@" >$logfile
set >>$logfile set >>$logfile
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment