gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 01/02: configure: check for support of __func__ magic-ma


From: gnunet
Subject: [libmicrohttpd] 01/02: configure: check for support of __func__ magic-macro
Date: Wed, 21 Oct 2020 10:58:12 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 365597ea10fd283d34d8b8d1d389b9b36aec93e2
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Oct 20 21:50:11 2020 +0300

    configure: check for support of __func__ magic-macro
---
 configure.ac | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/configure.ac b/configure.ac
index 3d1b679c..ace652d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -866,6 +866,23 @@ AX_CHECK_LINK_FLAG([-fno-strict-aliasing],
 
 AC_C_BIGENDIAN
 AC_C_VARARRAYS
+
+AC_CACHE_CHECK([[whether __func__ magic-macro is available]],
+  [[mhd_cv_macro___func___avail]], [dnl
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>]],[[const char 
*funcname = __func__ ; if (NULL == funcname) return 1;]])],
+    [[mhd_cv_macro___func___avail="yes"]],[[mhd_cv_macro___func___avail="no"]])
+])
+AS_VAR_IF([mhd_cv_macro___func___avail], ["yes"],
+  [AC_DEFINE([HAVE___FUNC__], [1], [Define to 1 if your compiler supports 
__func__ magic-macro.])],
+  [
+    AC_CACHE_CHECK([[whether __FUNCTION__ magic-macro is available]],
+      [[mhd_cv_macro___function___avail]], [dnl
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>]],[[const char 
*funcname = __FUNCTION__ ; if (NULL == funcname) return 1;]])],
+        
[[mhd_cv_macro___function___avail="yes"]],[[mhd_cv_macro___function___avail="no"]])
+    ])
+    AC_DEFINE([HAVE___FUNCTION__], [1], [Define to 1 if your compiler supports 
__FUNCTION__ magic-macro.])
+  ]
+)
 AC_CACHE_CHECK([[whether __builtin_bswap32() is available]],
   [[mhd_cv_func___builtin_bswap32_avail]], [dnl
   AC_TRY_LINK([#include<stdint.h>],[uint32_t a = 1; uint32_t b = 
__builtin_bswap32(a); a = b;],

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]