Unportable test(1) construct

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
_tk_
Posts: 6
Joined: 2014-04-26T13:29:09-07:00
Authentication code: 6789

Unportable test(1) construct

Post by _tk_ »

The configure script uses in two places "==" as a comparison operator for test(1).
This is only supported by bash, not even by GNU coreutils. The standard comparison operator is "=".
This patch, against 6.8.9-7, fixes this:

Code: Select all

--- configure.ac.orig   2014-08-13 11:58:49.000000000 +0000
+++ configure.ac
@@ -3273,12 +3273,12 @@ AC_PATH_PROG(LaunchDelegate, "$LaunchDel
 AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault")
 AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
-if test "$MPEGDecodeDelegate" == "$MPEGDecodeDelegateDefault" ; then
+if test "$MPEGDecodeDelegate" = "$MPEGDecodeDelegateDefault" ; then
   MPEGDecodeDelegateDefault='ffmpeg'
   AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
 fi;
 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
-if test "$MPEGEncodeDelegate" == "$MPEGEncodeDelegateDefault" ; then
+if test "$MPEGEncodeDelegate" = "$MPEGEncodeDelegateDefault" ; then
   MPEGEncodeDelegateDefault='ffmpeg'
   AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
 fi;
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Unportable test(1) construct

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.9-8 Beta, available by sometime tomorrow. Thanks.
Post Reply