From 4f5b75badc8e9d308a5a2f2e66c8aab1fc70323c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Sun, 23 Feb 2003 19:06:58 +0100
Subject: [PATCH] Use LSH_GCC_ATTRIBUTES.

Rev: src/nettle/configure.ac:1.19
---
 configure.ac | 36 +-----------------------------------
 1 file changed, 1 insertion(+), 35 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7b601204..4935e1f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,41 +129,7 @@ AC_C_BIGENDIAN
 
 AC_REPLACE_FUNCS(memxor)
 
-# Check for gcc's __attribute__ construction
-AC_CACHE_CHECK(for __attribute__,
-	       lsh_cv_c_attribute,
-[ AC_TRY_COMPILE([
-#include <stdlib.h>
-],
-[
-static void foo(void) __attribute__ ((noreturn));
-
-static void __attribute__ ((noreturn))
-foo(void)
-{
-  exit(1);
-}
-],
-lsh_cv_c_attribute=yes,
-lsh_cv_c_attribute=no)])
-
-AH_TEMPLATE([HAVE_GCC_ATTRIBUTE],
-	    [Define if the compiler understands __attribute__])
-if test "x$lsh_cv_c_attribute" = "xyes"; then
-  AC_DEFINE(HAVE_GCC_ATTRIBUTE)
-fi
-
-AH_BOTTOM(
-[#if __GNUC__ && HAVE_GCC_ATTRIBUTE
-# define NORETURN __attribute__ ((__noreturn__))
-# define PRINTF_STYLE(f, a) __attribute__ ((__format__ (__printf__, f, a)))
-# define UNUSED __attribute__ ((__unused__))
-#else
-# define NORETURN
-# define PRINTF_STYLE(f, a)
-# define UNUSED
-#endif
-])
+LSH_GCC_ATTRIBUTES
 
 # Checks for libraries
 AC_CHECK_LIB(gmp, __gmpz_getlimbn,,
-- 
GitLab