[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 165/335: configure: detect more function attributes
From: |
gnunet |
Subject: |
[libmicrohttpd] 165/335: configure: detect more function attributes |
Date: |
Sat, 27 Jul 2024 22:01:01 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to tag stf-m2
in repository libmicrohttpd.
commit 647502b6e73e6fde5e9052a156476a6de49d4c8e
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu May 16 10:18:21 2024 +0200
configure: detect more function attributes
---
configure.ac | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/configure.ac b/configure.ac
index 31a8b954..e63251c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3267,6 +3267,69 @@ MHD_CHECK_FUNC([[nanosleep]], [[#include <time.h>]],
[[struct timespec ts2, ts1
# NOTE: require setting of errattr_CFLAGS above
CFLAGS="${CFLAGS_ac} ${user_CFLAGS} ${errattr_CFLAGS}"
+AC_CACHE_CHECK([whether $CC supports
__attribute__((used))],[mhd_cv_cc_attr_used],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+extern __attribute__((used)) int
+test_func(void);
+
+extern __attribute__((used)) int
+test_func(void) {return 0;}
+ ]])
+ ],
+ [mhd_cv_cc_attr_used="yes"],[mhd_cv_cc_attr_used="no"]
+ )
+ ]
+)
+AS_VAR_IF([mhd_cv_cc_attr_used],["yes"],
+ [
+ AC_DEFINE([HAVE_ATTR_USED],[1],
+ [Define to '1' if your compiler supports __attribute__((used))]
+ )
+ ]
+)
+AC_CACHE_CHECK([whether $CC supports
__attribute__((pure))],[mhd_cv_cc_attr_pure],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+extern __attribute__((pure)) int
+test_func(const char *ptr);
+
+extern __attribute__((pure)) int
+test_func(const char *ptr) {return (0 == (*ptr));}
+ ]])
+ ],
+ [mhd_cv_cc_attr_pure="yes"],[mhd_cv_cc_attr_pure="no"]
+ )
+ ]
+)
+AS_VAR_IF([mhd_cv_cc_attr_pure],["yes"],
+ [
+ AC_DEFINE([HAVE_ATTR_PURE],[1],
+ [Define to '1' if your compiler supports __attribute__((pure))]
+ )
+ ]
+)
+AC_CACHE_CHECK([whether $CC supports
__attribute__((const))],[mhd_cv_cc_attr_const],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+extern __attribute__((const)) int
+test_func(int a);
+
+extern __attribute__((const)) int
+test_func(int a) {return a + 1;}
+ ]])
+ ],
+ [mhd_cv_cc_attr_const="yes"],[mhd_cv_cc_attr_const="no"]
+ )
+ ]
+)
+AS_VAR_IF([mhd_cv_cc_attr_const],["yes"],
+ [
+ AC_DEFINE([HAVE_ATTR_CONST],[1],
+ [Define to '1' if your compiler supports __attribute__((const))]
+ )
+ ]
+)
AC_CACHE_CHECK([whether $CC supports
__attribute__((visibility("default")))],[mhd_cv_cc_attr_visibility_default],
[
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
@@ -3287,6 +3350,28 @@ AS_VAR_IF([mhd_cv_cc_attr_visibility_default],["yes"],
[Define to '1' if your compiler supports
__attribute__((visibility("default")))]
)
+ AC_CACHE_CHECK([whether $CC supports
__attribute__((visibility("internal")))],[mhd_cv_cc_attr_visibility_internal],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+__attribute__((visibility("internal"))) int
+test_extrn_func(void);
+
+__attribute__((visibility("internal"))) int
+test_extrn_func(void) {return 0;}
+ ]])
+ ],
+
[mhd_cv_cc_attr_visibility_internal="yes"],[mhd_cv_cc_attr_visibility_internal="no"]
+ )
+ ]
+ )
+ AS_VAR_IF([mhd_cv_cc_attr_visibility_internal],["yes"],
+ [
+ AC_DEFINE([HAVE_ATTR_VISIBILITY_INTERNAL],[1],
+ [Define to '1' if your compiler supports
__attribute__((visibility("internal")))]
+ )
+ ]
+ )
+
CFLAGS="${user_CFLAGS}"
MHD_CHECK_CC_CFLAG([-fvisibility=hidden],[CFLAGS_ac],
[
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] 156/335: generator v1, (continued)
- [libmicrohttpd] 156/335: generator v1, gnunet, 2024/07/27
- [libmicrohttpd] 170/335: mhd_sys_options.h: renamed _MHD_EXTERN -> MHD_EXTERN_, gnunet, 2024/07/27
- [libmicrohttpd] 167/335: mhd_sys_options.h: formatting, gnunet, 2024/07/27
- [libmicrohttpd] 159/335: remove dependency on recutils and libjansson, gnunet, 2024/07/27
- [libmicrohttpd] 160/335: This API is TERRIBLE., gnunet, 2024/07/27
- [libmicrohttpd] 174/335: sys_socket_types.h: new internal header, gnunet, 2024/07/27
- [libmicrohttpd] 176/335: mhd_public_api.h: new internal header, gnunet, 2024/07/27
- [libmicrohttpd] 177/335: sys_malloc.h: new internal header, gnunet, 2024/07/27
- [libmicrohttpd] 185/335: GENERATED: fixed comment in comment, gnunet, 2024/07/27
- [libmicrohttpd] 182/335: compat_calloc.{h,c}: implementation of calloc() replacement, gnunet, 2024/07/27
- [libmicrohttpd] 165/335: configure: detect more function attributes,
gnunet <=
- [libmicrohttpd] 161/335: configure: check for more mandatory headers, gnunet, 2024/07/27
- [libmicrohttpd] 171/335: mhd_socket_type.h: new internal header, renamed MHD_socket -> MHD_Socket, gnunet, 2024/07/27
- [libmicrohttpd] 186/335: GENERATED: guard header double inclusion, gnunet, 2024/07/27
- [libmicrohttpd] 178/335: microhttpd2_portability.h: dropped wrong comment, gnunet, 2024/07/27
- [libmicrohttpd] 168/335: mhd_sys_options.h: use function attribute "used", gnunet, 2024/07/27
- [libmicrohttpd] 188/335: GENERATED: use proper includes in .c, gnunet, 2024/07/27
- [libmicrohttpd] 180/335: microhttpd2_portability.h: simplified macros for MHD_EXTERN_, gnunet, 2024/07/27
- [libmicrohttpd] 187/335: GENERATED: use proper includes in headers, gnunet, 2024/07/27
- [libmicrohttpd] 172/335: sys_base_types.h: new internal header, gnunet, 2024/07/27
- [libmicrohttpd] 192/335: GENERATED: check the state before using the options, gnunet, 2024/07/27