[m-rev.] for review: do not allow the use of x86_64-pc-msys

Peter Wang novalazy at gmail.com
Thu Jan 23 15:07:02 AEDT 2020


On Thu, 23 Jan 2020 13:57:01 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
> 
> For review by anyone.
> 
> I've been bitten by this one too many times.
> 
> ------------------------------------
> 
> Do not allow the use of x86_64-pc-msys.
> 
> configure.ac:
>      Stop and report an error if this script is run on the x86_64-pc-msys
>      architecture; that will go badly wrong as the configure script currently does
>      not handle it correctly.
> 
> Julien.
> 
> diff --git a/configure.ac b/configure.ac
> index e9fa577..8a68912 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -257,6 +257,20 @@ fi
> 
>   #-----------------------------------------------------------------------------#
> 
> +# Ensure that the user does not try to build MSYS executables; we do not
> +# (currently) support that.
> +
> +case "$host" in x86_64-pc-msys)
> +   AC_MSG_ERROR(
> +[
> +***** The x86_64-pc-msys architecture is not supported.
> +***** You probably meant to use one of: x86_64-pc-mingw32, x86_64-pc_mingw64.])
> +   exit 1
> +   ;;
> +esac
> +

Ok except that the indentation seems to be 3 spaces.

AC_MSG_ERROR already exits.

While investigating how to make this look less terrible,
I found out that we could maintain correct indentation like this:

    AC_MSG_ERROR(m4_normalize(
	[here is my message
	wrapped over two lines]))

or if you want to maintain newlines

    AC_MSG_ERROR(m4_join(m4_newline,
	[line 1],
	[line 2],
	[line 3]))

Anyway, that's enough of that.

Peter


More information about the reviews mailing list