diff options
author | joerg <joerg@pkgsrc.org> | 2006-03-01 16:47:54 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-03-01 16:47:54 +0000 |
commit | 70affd6c4bf16835275ce15a72e8776125b8d406 (patch) | |
tree | a1ee8a30eb749de0f3cb90568041a0692fa23462 /pkgtools | |
parent | 9534013f8cde847d3db48ba72740f999da120093 (diff) | |
download | pkgsrc-70affd6c4bf16835275ce15a72e8776125b8d406.tar.gz |
Update AC_C___ATTRIBUTE__ macro from heimdal, fixes detection with
GCC 4.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/libnbcompat/files/aclocal.m4 | 20 | ||||
-rwxr-xr-x | pkgtools/libnbcompat/files/configure | 9 |
2 files changed, 11 insertions, 18 deletions
diff --git a/pkgtools/libnbcompat/files/aclocal.m4 b/pkgtools/libnbcompat/files/aclocal.m4 index 95b1bafca12..be248420f82 100644 --- a/pkgtools/libnbcompat/files/aclocal.m4 +++ b/pkgtools/libnbcompat/files/aclocal.m4 @@ -1,4 +1,4 @@ -dnl $NetBSD: aclocal.m4,v 1.3 2004/02/01 00:07:56 snj Exp $ +dnl $NetBSD: aclocal.m4,v 1.4 2006/03/01 16:47:54 joerg Exp $ dnl dnl @@ -113,17 +113,18 @@ AC_DEFUN(AC_LIBRARY_NET, [ ]) +dnl From heimdal sources +dnl Id: c-attribute.m4,v 1.5 2004/08/26 12:35:41 joda Exp +dnl + dnl dnl Test for __attribute__ dnl -AC_DEFUN(AC_C___ATTRIBUTE__, [ +AC_DEFUN([AC_C___ATTRIBUTE__], [ AC_MSG_CHECKING(for __attribute__) AC_CACHE_VAL(ac_cv___attribute__, [ -AC_TRY_COMPILE([ -#include <stdlib.h> -], -[ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h> static void foo(void) __attribute__ ((noreturn)); static void @@ -131,11 +132,12 @@ foo(void) { exit(1); } -], -ac_cv___attribute__=yes, -ac_cv___attribute__=no)]) +]])], +[ac_cv___attribute__=yes], +[ac_cv___attribute__=no])]) if test "$ac_cv___attribute__" = "yes"; then AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__]) fi AC_MSG_RESULT($ac_cv___attribute__) ]) + diff --git a/pkgtools/libnbcompat/files/configure b/pkgtools/libnbcompat/files/configure index 932096286a0..1b3736d1b5e 100755 --- a/pkgtools/libnbcompat/files/configure +++ b/pkgtools/libnbcompat/files/configure @@ -5727,13 +5727,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include <stdlib.h> - -int -main () -{ - static void foo(void) __attribute__ ((noreturn)); static void @@ -5742,9 +5736,6 @@ foo(void) exit(1); } - ; - return 0; -} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |