diff options
author | Guillem Jover <guillem@debian.org> | 2010-03-13 07:29:23 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2010-03-13 07:44:05 +0100 |
commit | 28b0443163ac43515197dbef8ff441990be43866 (patch) | |
tree | 5dc2476b109761dde044d4927237d851081f2f19 /m4/dpkg-compiler.m4 | |
parent | 6fdc75338295a91ceebfddebb1e672fe8f929012 (diff) | |
download | dpkg-28b0443163ac43515197dbef8ff441990be43866.tar.gz |
libdpkg: Use __attribute__ keyword depending on compiler support
Check for compiler support from preprocessor macros and selectively
enable specific __attribute__ specifications. We avoid exposing the
configure variable HAVE_C_ATTRIBUTE, which was never defined for the
installed headers. Remove the now unused DPKG_C_ATTRIBUTE autoconf
macro.
Diffstat (limited to 'm4/dpkg-compiler.m4')
-rw-r--r-- | m4/dpkg-compiler.m4 | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4 index db68e6fcf..08154ae9e 100644 --- a/m4/dpkg-compiler.m4 +++ b/m4/dpkg-compiler.m4 @@ -38,23 +38,6 @@ AC_DEFUN([DPKG_COMPILER_OPTIMISATIONS], fi])dnl ]) -# DPKG_C_ATTRIBUTE -# ---------------- -# Check whether the C compiler supports __attribute__, defines HAVE_C_ATTRIBUTE -AC_DEFUN([DPKG_C_ATTRIBUTE], -[AC_CACHE_CHECK([whether compiler supports __attribute__], [dpkg_cv_attribute], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[]], - [[extern int testfunction(int x) __attribute__((unused))]] - )], - [dpkg_cv_attribute=yes], - [dpkg_cv_attribute=no])]) -AS_IF([test "x$dpkg_cv_attribute" = "xyes"], - [AC_DEFINE([HAVE_C_ATTRIBUTE], 1, - [Define to 1 if compiler supports '__attribute__', 0 otherwise.])], - [AC_DEFINE([HAVE_C_ATTRIBUTE], 0)])dnl -])# DPKG_C_ATTRIBUTE - # DPKG_TRY_C99([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------------------ # Try compiling some C99 code to see whether it works |