Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitry Baryshkov
nettle
Commits
41af9a77
Commit
41af9a77
authored
22 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Check for gcc:s __attribute__.
Rev: src/nettle/configure.ac:1.15
parent
0b25e96e
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configure.ac
+36
-1
36 additions, 1 deletion
configure.ac
with
36 additions
and
1 deletion
configure.ac
+
36
−
1
View file @
41af9a77
dnl -*- mode: shell-script; sh-indentation: 2; -*-
dnl -*- mode: shell-script; sh-indentation: 2; -*-
dnl $Id$
dnl Process this file with autoconf to produce a configure script.
dnl Process this file with autoconf to produce a configure script.
...
@@ -130,6 +129,42 @@ AC_C_BIGENDIAN
...
@@ -130,6 +129,42 @@ AC_C_BIGENDIAN
AC_REPLACE_FUNCS(memxor)
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
])
# Checks for libraries
# Checks for libraries
AC_CHECK_LIB(gmp, __gmpz_getlimbn,,
AC_CHECK_LIB(gmp, __gmpz_getlimbn,,
[AC_MSG_WARN(
[AC_MSG_WARN(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment