From: Po Lu Date: Wed, 22 Feb 2023 03:19:57 +0000 (+0800) Subject: Add cross-compilation test for cleanup attribute X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=86f10534dcc24047e503d45e7f51e09b0a89db69;p=emacs.git Add cross-compilation test for cleanup attribute * configure.ac: Per title. --- diff --git a/configure.ac b/configure.ac index cb2b1370d58..e6a8c760b10 100644 --- a/configure.ac +++ b/configure.ac @@ -4792,7 +4792,20 @@ if test "${with_modules}" != "no"; then ]], [[cleanup_func (); return 1;]])], [emacs_cv_attribute_cleanup=yes], [emacs_cv_attribute_cleanup=no], - [emacs_cv_attribute_cleanup="guessing yes"])]) + [AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + cleanup_func_1 (k) + int *k; + { + return *k; + }; + cleanup_func () + { + int k __attribute__((cleanup (cleanup_func_1))) = 100; + }]], + [[cleanup_func ()]])], + [emacs_cv_attribute_cleanup="guessing yes"], + [emacs_cv_attribute_cleanup=no])])]) if test "$emacs_cv_attribute_cleanup" = "no"; then if test "${with_modules}" = "ifavailable"; then