summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-05-19 14:24:36 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-06-01 11:07:58 +0300
commit4805f6a8ee7ab47d5d785bce539ab6039c9328ee (patch)
treec71a6c8c2483812a99ee4765e5ed20f09c0e53f2
parentfeb9ac1f4cd0fe0d83f6f5ef18c25f059674905a (diff)
configure: fixed detection of __FUNCTION__ magic macro
-rw-r--r--configure.ac14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index f23a10e8..6b4a0378 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1696,7 +1696,19 @@ AS_VAR_IF([mhd_cv_macro___func___avail], ["yes"],
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.])
+ AS_VAR_IF([mhd_cv_macro___function___avail], ["yes"],
+ [AC_DEFINE([HAVE___FUNCTION__], [1], [Define to 1 if your compiler supports __FUNCTION__ magic-macro.])],
+ [
+ AC_CACHE_CHECK([[whether __PRETTY_FUNCTION__ magic-macro is available]],
+ [[mhd_cv_macro___pretty_function___avail]], [dnl
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>]],[[const char *funcname = __PRETTY_FUNCTION__ ; if (NULL == funcname) return 1;]])],
+ [[mhd_cv_macro___pretty_function___avail="yes"]],[[mhd_cv_macro___pretty_function___avail="no"]])
+ ])
+ AS_VAR_IF([mhd_cv_macro___pretty_function___avail], ["yes"],
+ [AC_DEFINE([HAVE___PRETTY_FUNCTION__], [1], [Define to 1 if your compiler supports __PRETTY_FUNCTION__ magic-macro.])],
+ )
+ ]
+ )
]
)
AC_CACHE_CHECK([[whether __builtin_bswap32() is available]],