From 5e46d67dd11e98ce56abf812b8753737047a4e55 Mon Sep 17 00:00:00 2001 From: twisti Date: Wed, 13 Jul 2005 00:34:56 +0000 Subject: [PATCH] * AC_C_ATTRIBUTE: check for __attribute__ (required at least by mipspro) --- autogen.sh | 5 ++--- configure.in | 1 + m4/acinclude.m4 | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 m4/acinclude.m4 diff --git a/autogen.sh b/autogen.sh index 63a6cf6f6..943a8dd0d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,10 +2,9 @@ libtoolize --automake if test `uname` = 'FreeBSD'; then - echo "FreeBSD -- only tested with 5.3-RELEASE though" - aclocal -I . -I src/classpath/m4 -I /usr/local/share/aclocal -I /usr/local/share/aclocal19 + aclocal -I m4 -I src/classpath/m4 -I /usr/local/share/aclocal -I /usr/local/share/aclocal19 else - aclocal -I . -I src/classpath/m4 + aclocal -I m4 -I src/classpath/m4 fi autoheader automake --add-missing diff --git a/configure.in b/configure.in index a3f28faa3..6a6f3af2f 100644 --- a/configure.in +++ b/configure.in @@ -125,6 +125,7 @@ AC_CHECK_HEADERS([sys/ioctl.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE +AC_C_ATTRIBUTE AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_HEADER_TIME diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 new file mode 100644 index 000000000..f7a7202b8 --- /dev/null +++ b/m4/acinclude.m4 @@ -0,0 +1,29 @@ +dnl modified AC_C_INLINE from autoconf/c.m4 by TWISTI + +AN_IDENTIFIER([attribute], [AC_C_ATTRIBUTE]) +AC_DEFUN([AC_C_ATTRIBUTE], +[AC_CACHE_CHECK([for __attribute__], ac_cv_c_attribute, +[ +AC_COMPILE_IFELSE([AC_LANG_SOURCE( +[void foo(void) __attribute__ ((__noreturn__));] +)], +[ac_cv_c_attribute=yes], +[ac_cv_c_attribute=no] +) +]) +AH_VERBATIM([attribute], +[/* Define to `__attribute__' to nothing if it's not supported. */ +#ifndef __cplusplus +#undef __attribute__ +#endif]) +case $ac_cv_c_attribute in + yes) ;; + no) + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define __attribute__(x) /* nothing */ +#endif +_ACEOF + ;; +esac +])# AC_C_ATTRIBUTE -- 2.25.1