[m-rev.] for review: avoid a spurious warning from configure

Peter Wang novalazy at gmail.com
Wed Jul 26 15:56:33 AEST 2023


On Wed, 26 Jul 2023 14:36:03 +1000 Julien Fischer <jfischer at opturion.com> wrote:
> 
> Avoid a spurious warning from configure.
> 
> The configure script currently emits a warning about static linking not being
> supported when using MSVC. This wrong: static linking is the only form of
> of linking that *is* currently supported when using MSVC.
> 
> Clean-up a left over reference to lcc.
> 
> src/configure.ac:
>      As above.
> 
> Julien.
> 
> diff --git a/configure.ac b/configure.ac
> index e9b4051..d20f104 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -4497,6 +4497,7 @@ AC_SUBST([C_COMPILER_TYPE])
> 
>   # Note that changes here may require changes in scripts/ml.in.
> 
> +AC_MSG_CHECKING([options for static linking])
>   LD_STATIC_FLAGS=
>   case "$C_COMPILER_TYPE" in
>       gcc*|clang*)
> @@ -4512,18 +4513,17 @@ case "$FULLARCH" in
>           esac
>           ;;
>   esac
> -
> -# We can't put the call to MSG_CHECKING at the start of the case statement
> -# above, because of the nested check in the lcc case. So we just put it here
> -# immediately before the MSG_RESULT call.
> -AC_MSG_CHECKING([options for static linking])
>   AC_MSG_RESULT($LD_STATIC_FLAGS)
> -case "$LD_STATIC_FLAGS" in
> -    "")
> -        AC_MSG_WARN(
> +
> +if test "$USING_MICROSOFT_CL_COMPILER" = "no"
> +then
> +    case "$LD_STATIC_FLAGS" in
> +        "")
> +            AC_MSG_WARN(
>   ['mmc --linkage static' and 'ml --static' not implemented with
>   ****    this C compiler ('$CC').])
> -esac
> +    esac
> +fi

Delete the **** prefix; don't try to wrap the line.

The message could be less verbose, e.g.
checking options for static linking: unknown for this C compiler ('$CC')

Add ;; at the end of the clause.

That looks fine.

Peter


More information about the reviews mailing list