[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] Check for __attribute__ ((cleanup)) during configuration.
From: |
Philipp Stephani |
Subject: |
[PATCH 2/2] Check for __attribute__ ((cleanup)) during configuration. |
Date: |
Thu, 25 Apr 2019 15:46:09 +0200 |
It’s nicer to fail early if __attribute__ ((cleanup)) doesn’t work.
* configure.ac: Enable modules only if __attribute__ ((cleanup))
works.
---
configure.ac | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/configure.ac b/configure.ac
index 1f87fe0383..7acd2cb6e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4422,6 +4422,18 @@ AC_DEFUN
AC_SUBST([GMP_OBJ])
### Dynamic modules support
+AC_CACHE_CHECK(
+ [for __attribute__ ((cleanup))],
+ [emacs_cv_have_attribute_cleanup],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [static int status = 1;
+ static void cleanup (int *p) { status = 0; }],
+ [{ __attribute__ ((cleanup (cleanup))) int v; }
+ return status;])],
+ [emacs_cv_have_attribute_cleanup=yes],
+ [emacs_cv_have_attribute_cleanup=no])])
+
LIBMODULES=
HAVE_MODULES=no
MODULES_OBJ=
@@ -4449,6 +4461,12 @@ AC_DEFUN
HAVE_MODULES=no
fi
+ if test "${emacs_cv_have_attribute_cleanup}" != yes; then
+ # The module implementation currently requires
+ # __attribute__((cleanup)).
+ HAVE_MODULES=no
+ fi
+
if test "${HAVE_MODULES}" = no; then
AC_MSG_ERROR([Dynamic modules are not supported on your system])
else
--
2.20.1 (Apple Git-117)
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., (continued)
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Stefan Monnier, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Paul Eggert, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Stefan Monnier, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Philipp Stephani, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Paul Eggert, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Philipp Stephani, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Paul Eggert, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Eli Zaretskii, 2019/04/25
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Philipp Stephani, 2019/04/25
- [PATCH 1/2] Require full GMP when building module support., Philipp Stephani, 2019/04/25
- [PATCH 2/2] Check for __attribute__ ((cleanup)) during configuration.,
Philipp Stephani <=
- Re: [PATCH 2/2] Check for __attribute__ ((cleanup)) during configuration., Paul Eggert, 2019/04/25
- Re: [PATCH 2/2] Check for __attribute__ ((cleanup)) during configuration., Philipp Stephani, 2019/04/28
- Re: [PATCH 1/2] Require full GMP when building module support., Eli Zaretskii, 2019/04/25
- Re: [PATCH 1/2] Require full GMP when building module support., Philipp Stephani, 2019/04/25
- Re: [PATCH 1/2] Require full GMP when building module support., Eli Zaretskii, 2019/04/25
- [PATCH] Require full GMP for big integer module functions., Philipp Stephani, 2019/04/25
- Re: [PATCH] Require full GMP for big integer module functions., Paul Eggert, 2019/04/25
- Re: [PATCH] Require full GMP for big integer module functions., Philipp Stephani, 2019/04/28
- Re: [PATCH] Require full GMP for big integer module functions., Paul Eggert, 2019/04/28
- Re: [PATCH 1/2] Require full GMP when building module support., Philipp Stephani, 2019/04/28