mirror of https://github.com/BOINC/boinc.git
Merge pull request #4737 from mtasaka/autoconf271_fix
configure.ac: reset compiler flags before calling AC_CHECK_DECLS
This commit is contained in:
commit
35ddac9813
16
configure.ac
16
configure.ac
|
@ -711,11 +711,19 @@ AC_CHECK_HEADERS([sys/types.h sys/un.h arpa/inet.h dirent.h grp.h fcntl.h inttyp
|
||||||
|
|
||||||
save_cxxflags="${CXXFLAGS}"
|
save_cxxflags="${CXXFLAGS}"
|
||||||
save_cppflags="${CPPFLAGS}"
|
save_cppflags="${CPPFLAGS}"
|
||||||
CXXFLAGS="${CXXFLAGS} -msse3"
|
sse3_flags="-msse3"
|
||||||
CPPFLAGS="${CPPFLAGS} -msse3"
|
avx_flags="-mavx"
|
||||||
|
CXXFLAGS="${save_cxxflags} ${sse3_flags}"
|
||||||
|
CPPFLAGS="${save_cppflags} ${sse3_flags}"
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([],)], [], [sse_flags=""])
|
||||||
|
CXXFLAGS="${save_cxxflags} ${avx_flags}"
|
||||||
|
CPPFLAGS="${save_cppflags} ${avx_flags}"
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([],)], [], [avx_flags=""])
|
||||||
|
CXXFLAGS="${save_cxxflags} ${sse3_flags}"
|
||||||
|
CXXFLAGS="${save_cxxflags} ${sse3_flags}"
|
||||||
AC_CHECK_HEADERS([intrin.h x86intrin.h pmmintrin.h xmmintrin.h emmintrin.h])
|
AC_CHECK_HEADERS([intrin.h x86intrin.h pmmintrin.h xmmintrin.h emmintrin.h])
|
||||||
CXXFLAGS="${save_cxxflags} -mavx"
|
CXXFLAGS="${save_cxxflags} ${avx_flags}"
|
||||||
CPPFLAGS="${save_cppflags} -mavx"
|
CPPFLAGS="${save_cppflags} ${avx_flags}"
|
||||||
AC_CHECK_HEADERS([immintrin.h avxintrin.h])
|
AC_CHECK_HEADERS([immintrin.h avxintrin.h])
|
||||||
|
|
||||||
AC_CHECK_DECLS([_xgetbv, xgetbv, __xgetbv, cpuid, _cpuid, __cpuid],
|
AC_CHECK_DECLS([_xgetbv, xgetbv, __xgetbv, cpuid, _cpuid, __cpuid],
|
||||||
|
|
Loading…
Reference in New Issue