[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-users] MSYS_PREFIX_HACK
From: |
Keith MARSHALL |
Subject: |
Re: [Mingw-users] MSYS_PREFIX_HACK |
Date: |
Fri, 8 Apr 2005 16:45:36 +0100 |
Stepan Kasal wrote:
> Keith Marshall wrote:
>> ac_default_prefix=`exec 2>/dev/null;cd /usr/local&&pwd -W` ||\
>> ac_default_prefix=/usr/local
>
> This is a possible solution, but I'd like to propose something simpler:
>
> AC_INIT reads file config.site at its initialization file.
> So if the MSYS install process ensures that /usr/local/share/config.site
> is present and assigns ac_default_prefix, then everything should work.
>
> I hope this solution is acceptable to you.
I confess that I hadn't considered the possibility of using config.site
to override the `ac_default_prefix=/usr/local' set by AC_INIT. It does
look like an elegant solution, subject to a couple of caveats:
1) If a user has created a customised config.site, he needs
to be careful not to clobber it with an MSYS upgrade.
2) If a configure.ac script uses AC_PREFIX_DEFAULT or
AC_PREFIX_PROGRAM, that will override the effect of the
config.site initialisation, probably resulting in an
invalid prefix assignment for the MSYS/MinGW build,
since these would normally specify POSIX paths.
Of course, the second of these problems is not addressed by the simple
patch I proposed either. Could this also be handled by config.site, or
will it be necessary to modify the definitions of AC_PREFIX_DEFAULT and
AC_PREFIX_PROGRAM to achieve my desired effect? I have explored this a
bit further, and could work up an RFC for a simple patch, if you think
it worth pursuing.
Best regards,
Keith.