Hi, I found bug in korn shell (version M-11/16/88f) on AIX 6.1 (tested only on one server instance) and due to this bug I couldn't correctly configure ImageMagick.
> uname -a AIX myhost 1 6 00CB25304C00 Here is minimal script that shows this bug: #!/bin/sh echo `echo 'hello bug\c'` echo `echo this text fall to blackhole` echo `echo next line` and output: h hello bug next line Generated configure and config.status scripts contains some tests that causes wrong initialization of some variables later. Fragments from configure script: ... ... ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac ... ... ... ac_prefix_conf_OUT=`echo magick/magick-config.h` ... ... Variable ac_prefix_conf_OUT contains only one character - x. My solution was to configure it with another shell (./configure SHELL=/bin/ksh93) but I think it would be nice to handle this bug in autoconf. I'm not sure if it is ok, but this patch helps me: diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index c7b0bff..b884a88 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -785,9 +785,11 @@ m4_defun([_AS_ECHO_N_PREPARE], [ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@(((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy*) ECHO_C='\c';; + *) echo `echo bug ksh88 AIX 6.1` > /dev/null # this line handles bug in ksh version M-11/16/88f on AIX 6.1 + ECHO_C='\c' ;; esac;; *) ECHO_N='-n';; But this patch solve just this particular test. It does not solve further use of echo with ECHO_C variable in command substitution.
