[vlc-devel] [PATCH] configure: Simplify mingw flag checks
Marvin Scholz
epirat07 at gmail.com
Thu Nov 30 11:05:53 CET 2017
---
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)
More information about the vlc-devel
mailing list