[vlc-devel] [PATCH] configure: Simplify mingw flag checks

Jean-Baptiste Kempf jb at videolan.org
Thu Nov 30 14:14:39 CET 2017


OK for me

On Thu, 30 Nov 2017, at 11:05, Marvin Scholz wrote:
> ---
>  configure.ac | 24 +++++++++---------------
>  1 file changed, 9 insertions(+), 15 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 0ca5244905..a8f0aba938 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -539,21 +539,15 @@ dnl Check for broken versions of mingw-runtime
> compatability library
>      ])
>  
>      dnl Check for fnative-struct or mms-bitfields support for mingw32
> -    VLC_SAVE_FLAGS
> -    CFLAGS="${CFLAGS} -mms-bitfields"
> -    CXXFLAGS="${CXXFLAGS} -mms-bitfields"
> -    AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
> -        [ac_cv_c_mms_bitfields],
> -        [AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes,
> ac_cv_c_mms_bitfields=no)])
> -    if test "${ac_cv_c_mms_bitfields}" = "no"; then
> -        VLC_RESTORE_FLAGS
> -        CFLAGS="${CFLAGS} -fnative-struct"
> -        CXXFLAGS="${CXXFLAGS} -fnative-struct"
> -        AC_CACHE_CHECK([if \$CC accepts -fnative-struct],
> -            [ac_cv_c_fnative_struct],
> -            [AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes,
> ac_cv_c_fnative_struct=no)])
> -        "${ac_cv_c_fnative_struct}" = "no" && VLC_RESTORE_FLAGS
> -    fi
> +    AX_CHECK_COMPILE_FLAG([-mms-bitfields], [
> +        AX_APPEND_FLAG([-mms-bitfields], [CFLAGS])
> +        AX_APPEND_FLAG([-mms-bitfields], [CXXFLAGS])
> +    ], [
> +        AX_CHECK_COMPILE_FLAG([-fnative-struct], [
> +            AX_APPEND_FLAG([-fnative-struct], [CFLAGS])
> +            AX_APPEND_FLAG([-fnative-struct], [CXXFLAGS])
> +        ])
> +    ])
>  ])
>  
>  
> -- 
> 2.13.6 (Apple Git-96)
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


-- 
Jean-Baptiste Kempf -  President
+33 672 704 734


More information about the vlc-devel mailing list