summaryrefslogtreecommitdiffstats
path: root/old-configure
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-22 20:54:57 +0200
committerwm4 <wm4@nowhere>2014-05-22 20:54:57 +0200
commit52ff1cf3138485b0083af5ff4369848f0e32e7da (patch)
tree395dcc888752d991fd4e6c807591d64498302766 /old-configure
parentd45b68b938df9eb10f5f600a4959a936c13e358e (diff)
downloadmpv-52ff1cf3138485b0083af5ff4369848f0e32e7da.tar.bz2
mpv-52ff1cf3138485b0083af5ff4369848f0e32e7da.tar.xz
old-configure: we accidentally used bash features
In at least 2 places, we want to "shift" positional parameters by a certain amount, or remove all parameters if there are fewer parameters. bash handled this just fine, but dash vomits upon it. POSIX shell allows both behaviors, so we have to fix it. Fix a comparison done with "==" instead of "=".
Diffstat (limited to 'old-configure')
-rwxr-xr-xold-configure14
1 files changed, 11 insertions, 3 deletions
diff --git a/old-configure b/old-configure
index 03ee0a5eb8..1cf7075141 100755
--- a/old-configure
+++ b/old-configure
@@ -425,7 +425,11 @@ check_compile() {
echocheck "$1"
if test $_res = auto ; then
_res=no
- shift 4
+ if test $# -gt 4 ; then
+ shift 4
+ else
+ shift $#
+ fi
while true ; do
compile_check "$_code" "$1" && libs_mplayer="$libs_mplayer $1" && _res=yes && break
test -z "$1" && break
@@ -448,7 +452,11 @@ check_statement_libs() {
echocheck "$1"
if test $_res = auto ; then
_res=no
- shift 5
+ if test $# -gt 5 ; then
+ shift 5
+ else
+ shift $#
+ fi
while true ; do
statement_check "$_inc" "$_st" "$1" && libs_mplayer="$libs_mplayer $1" && _res=yes && break
test -z "$1" && break
@@ -462,7 +470,7 @@ check_statement_libs() {
# Print "yes" if previous command succeeded, else "no"
defretval() { # shell is retarded?
- if test $? == 0 ; then
+ if test $? = 0 ; then
echo "yes"
else
echo "no"