pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat/files Update AC_C___ATTRIBUTE__ m...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8ae242b1fd84
branches:  trunk
changeset: 508969:8ae242b1fd84
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Wed Mar 01 16:47:54 2006 +0000

description:
Update AC_C___ATTRIBUTE__ macro from heimdal, fixes detection with
GCC 4.

diffstat:

 pkgtools/libnbcompat/files/aclocal.m4 |  20 +++++++++++---------
 pkgtools/libnbcompat/files/configure  |   9 ---------
 2 files changed, 11 insertions(+), 18 deletions(-)

diffs (76 lines):

diff -r f8780bf516a7 -r 8ae242b1fd84 pkgtools/libnbcompat/files/aclocal.m4
--- a/pkgtools/libnbcompat/files/aclocal.m4     Wed Mar 01 16:44:28 2006 +0000
+++ b/pkgtools/libnbcompat/files/aclocal.m4     Wed Mar 01 16:47:54 2006 +0000
@@ -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 @@
   ])
 
 
+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 @@
 {
   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 -r f8780bf516a7 -r 8ae242b1fd84 pkgtools/libnbcompat/files/configure
--- a/pkgtools/libnbcompat/files/configure      Wed Mar 01 16:44:28 2006 +0000
+++ b/pkgtools/libnbcompat/files/configure      Wed Mar 01 16:47:54 2006 +0000
@@ -5727,13 +5727,7 @@
 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 @@
   exit(1);
 }
 
-  ;
-  return 0;
-}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5



Home | Main Index | Thread Index | Old Index