Earnie Boyd wrote: > But if I change MSYS so that variable prefix is always a win32 > path value this MSYS_PREFIX_HACK would not need to be done ... I'm curious as to how you might achieve that. In a recently generated configure script I see the following sequence of operations, invoked by AC_INIT: 1) Variable `ac_default_prefix' is explicitly initialised, as `ac_default_prefix=/usr/local' 2) Variable `prefix' is explicitly initialised, as `prefix=NONE' 3) Command line arguments are parsed; if `--prefix=value' is specified, then variable `prefix' is redefined, as `prefix=value' Then, when we get to the AC_OUTPUT phase, I see: `test "x$prefix" = xNONE && prefix=$ac_default_prefix' I know your objective with MSYS is to provide a minimal environment for running `./configure && make', but some of us also use it simply to have a usable shell on Win32 -- I know I am not not alone in saying that cmd.exe and command.com are quite useless. If you kludge MSYS, or MSYS-bash, such that any attempt to define a variable called `prefix', (or indeed, any other specifically named variable, other than those which are documented as special in standard bash), then you diminish its value as a generally useful UNIXy shell for Win32. Expand that, to treat other variable names as special cases, and you increase the probability of nasty surprises even further, making MSYS even less generally useful. Surely, the better approach is to adapt autoconf, such that either the AC_INIT setting of `ac_default_prefix' is more intelligent wrt Win32 (or more specifically, MSYS) paths, or to adapt the AC_OUTPUT reassignment of `prefix=$ac_default_prefix' to incorporate some variant of the MSYS_PREFIX_HACK logic I presented earlier -- my preference would be to have a more intelligent initialisation for `ac_default_prefix', e.g. instead of: ac_default_prefix=/usr/local say: ac_default_prefix=`exec 2>/dev/null;cd /usr/local;pwd -W` ||\ ac_default_prefix=/usr/local I have tested this alternative initialisation on every system available to me. On SunOS 5.5.1 with `sh', `ksh' and `bash', on Linux 2.4.18 with `sh' which is linked to `bash', and on Cygwin with `sh' and with `bash', it sets `ac_default_prefix=/usr/local', while on my MSYS setup it sets `ac_default_prefix=d:/msys/1.0/local', which is exactly the behaviour I want to see; (it does, of course, require that the directory `d:/msys/1.0/local' already exists, when the `pwd -W` is invoked, otherwise it would simply revert to the `ac_default_prefix=/usr/local' behaviour). Such autoconf modification *could* be restricted to the mingw.org distribution of autotools, but then a regeneration of `configure' would become a prerequisite phase of the MSYS build process, for autoconf maintained packages. A better solution, IMO, would be to incorporate this as an autoconf standard. BTW, I have opened a thread for this topic on `autoconf@xxxxxxx'. This message is copied to both MinGW-users and to autoconf lists. Best regards, Keith. _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf