diff options
author | fanquake <fanquake@gmail.com> | 2020-07-14 20:37:21 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-02-12 09:04:16 +0800 |
commit | 7cd0a696643a824ab6f6911278f116f01c5af662 (patch) | |
tree | 9a2087515fbfaad171adc0c8187db35e69c26d41 /configure.ac | |
parent | 1624e17b5430dfe808bb3b1b79dfa53bf45aa053 (diff) | |
download | bitcoin-7cd0a696643a824ab6f6911278f116f01c5af662.tar.xz |
build: test for __declspec(dllexport) in configure
This should work for GCC and Clang when building for Windows targets.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index b80bde81d4..3ed27b0752 100644 --- a/configure.ac +++ b/configure.ac @@ -813,7 +813,6 @@ if test x$ac_cv_sys_large_files != x && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files" fi -AX_GCC_FUNC_ATTRIBUTE([dllexport]) AX_GCC_FUNC_ATTRIBUTE([dllimport]) if test x$use_glibc_compat != xno; then @@ -1000,6 +999,18 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ] ) +AC_MSG_CHECKING([for dllexport attribute]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + __declspec(dllexport) int foo(void); + int main(){} + ])], + [ + AC_DEFINE(HAVE_DLLEXPORT_ATTRIBUTE,1,[Define if the dllexport attribute is supported.]) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) + dnl thread_local is currently disabled when building with glibc back compat. dnl Our minimum supported glibc is 2.17, however support for thread_local dnl did not arrive in glibc until 2.18. |