gcc/libjava/classpath/m4/gcc_attribute.m4
Ralf Wildenhues 015cd9b118 gcc_attribute.m4 (GCC_ATTRIBUTE): Fix cache variable name.
libjava/classpath/

	* m4/gcc_attribute.m4 (GCC_ATTRIBUTE): Fix cache variable name.
	* tools/Makefile.am (gappletviewer, gjarsigner, gkeytool, gjar)
	(gnative2ascii, gserialver, gjavah, grmiregistry, gtnameserv)
	(gorbd, grmid, grmic) [!CREATE_WRAPPERS]: Add stub dependencies
	for these scripts, to trick automake into hiding the respective
	rules for the programs below the CREATE_WRAPPERS conditional.
	* aclocal.m4: Regenerate.
	* configure: Likewise.
	* Makefile.in: Likewise.
	* native/jni/Makefile.in: Likewise.
	* native/jni/classpath/Makefile.in: Likewise.
	* native/jni/gstreamer-peer/Makefile.in: Likewise.
	* native/jni/midi-dssi/Makefile.in: Likewise.
	* native/jni/gconf-peer/Makefile.in: Likewise.
	* native/jni/java-io/Makefile.in: Likewise.
	* native/jni/native-lib/Makefile.in: Likewise.
	* native/jni/java-util/Makefile.in: Likewise.
	* native/jni/java-lang/Makefile.in: Likewise.
	* native/jni/midi-alsa/Makefile.in: Likewise.
	* native/jni/java-nio/Makefile.in: Likewise.
	* native/jni/java-net/Makefile.in: Likewise.
	* native/jni/xmlj/Makefile.in: Likewise.
	* native/jni/qt-peer/Makefile.in: Likewise.
	* native/jni/gtk-peer/Makefile.in: Likewise.
	* native/Makefile.in: Likewise.
	* native/jawt/Makefile.in: Likewise.
	* native/fdlibm/Makefile.in: Likewise.
	* native/plugin/Makefile.in: Likewise.
	* resource/Makefile.in: Likewise.
	* scripts/Makefile.in: Likewise.
	* tools/Makefile.in: Likewise.
	* doc/Makefile.in: Likewise.
	* doc/api/Makefile.in: Likewise.
	* lib/Makefile.in: Likewise.
	* external/Makefile.in: Likewise.
	* external/jsr166/Makefile.in: Likewise.
	* external/sax/Makefile.in: Likewise.
	* external/w3c_dom/Makefile.in: Likewise.
	* external/relaxngDatatype/Makefile.in: Likewise.
	* include/Makefile.in: Likewise.
	* examples/Makefile.in: Likewise.

From-SVN: r134413
2008-04-17 21:58:12 +00:00

134 lines
3.9 KiB
Plaintext

dnl CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
AC_DEFUN([CACHED_TRY_COMPILE],[
AC_MSG_CHECKING($1)
AC_CACHE_VAL($2,[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$3]], [[$4]])],[$2=yes],[$2=no])
])
if test "x$$2" = xyes; then
true
$5
else
true
$6
fi
])
dnl GCC_ATTRIBUTE(<short-label>,<cachevar>,<func-params>,<attribute>,<HAVE>,<desc>,[<true-cmds>],[<false-cmds>])
AC_DEFUN([GCC_ATTRIBUTE],[
CACHED_TRY_COMPILE(__attribute__(($1)),gcc_cv_c_gcc_attribute_$2,,
[extern int testfunction($3) __attribute__(($4))],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GNUC25_$5,,$6)
$7,
AC_MSG_RESULT(no)
$8)
])
AC_DEFUN([GCC_ATTRIBUTE_SUPPORTED],[
GCC_ATTRIBUTE([,,],supported,[int x],[,,],ATTRIB,[Define if function attributes a la GCC 2.5 and higher are available.])
AH_BOTTOM([/* GNU C attributes. */
#ifndef FUNCATTR
#ifdef HAVE_GNUC25_ATTRIB
#define FUNCATTR(x) __attribute__(x)
#else
#define FUNCATTR(x)
#endif
#endif])
])
AC_DEFUN([GCC_ATTRIBUTE_CONST],[
AC_REQUIRE([GCC_ATTRIBUTE_SUPPORTED])
GCC_ATTRIBUTE(const,const,[int x],const,CONST,[Define if constant functions a la GCC 2.5 and higher are available.])
AH_BOTTOM([/* GNU C constant functions, or null. */
#ifndef ATTRCONST
#ifdef HAVE_GNUC25_CONST
#define ATTRCONST const
#else
#define ATTRCONST
#endif
#endif
#ifndef CONSTANT
#define CONSTANT FUNCATTR((ATTRCONST))
#endif])
])
AC_DEFUN([GCC_ATTRIBUTE_NORETURN],[
AC_REQUIRE([GCC_ATTRIBUTE_SUPPORTED])
GCC_ATTRIBUTE(noreturn,noreturn,[int x],noreturn,NORETURN,[Define if nonreturning functions a la GCC 2.5 and higher are available.])
AH_BOTTOM([/* GNU C nonreturning functions, or null. */
#ifndef ATTRNORETURN
#ifdef HAVE_GNUC25_NORETURN
#define ATTRNORETURN noreturn
#else /* ! HAVE_GNUC25_NORETURN */
#define ATTRNORETURN
#endif /* HAVE_GNUC25_NORETURN */
#endif /* ATTRNORETURN */
#ifndef NONRETURNING
#define NONRETURNING FUNCATTR((ATTRNORETURN))
#endif /* NONRETURNING */])
])
AC_DEFUN([GCC_ATTRIBUTE_UNUSED],[
AC_REQUIRE([GCC_ATTRIBUTE_SUPPORTED])
GCC_ATTRIBUTE(unused,unused,[int x],unused,UNUSED,[Define if unused variables la GCC 2.5 and higher are available.])
AH_BOTTOM([/* GNU C unused functions, or null. */
#ifndef ATTRUNUSED
#ifdef HAVE_GNUC25_UNUSED
#define ATTRUNUSED unused
#else
#define ATTRUNUSED
#endif
#endif
#ifndef UNUSED
#define UNUSED FUNCATTR((ATTRUNUSED))
#endif])
])
AC_DEFUN([GCC_ATTRIBUTE_FORMAT],[
AC_REQUIRE([GCC_ATTRIBUTE_SUPPORTED])
GCC_ATTRIBUTE(format...,format,[char *y, ...],[format(printf,1,2)],PRINTFFORMAT,[Define if printf-format argument lists a la GCC are available.])
AH_BOTTOM([/* GNU C printf formats, or null. */
#ifndef ATTRPRINTF
#ifdef HAVE_GNUC25_PRINTFFORMAT
#define ATTRPRINTF(si,tc) format(printf,si,tc)
#else
#define ATTRPRINTF(si,tc)
#endif
#endif
#ifndef PRINTFFORMAT
#define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
#endif
#ifndef NONRETURNPRINTFFORMAT
#define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
#endif])
])
AC_DEFUN([GCC_ATTRIBUTE_ALWAYS_INLINE],[
AC_REQUIRE([GCC_ATTRIBUTE_SUPPORTED])
GCC_ATTRIBUTE(always_inline,always_inline,[int x],always_inline,ALWAYS_INLINE,[Define if unconditional inlining of functions a la GCC 3.1 and higher are available.])
AH_BOTTOM([/* GNU C constant functions, or null. */
#ifndef ATTRALWAYS_INLINE
#ifdef HAVE_GNUC25_ALWAYS_INLINE
#define ATTRALWAYS_INLINE always_inline
#else
#define ATTRALWAYS_INLINE
#endif
#endif
#ifndef ALWAYS_INLINE
#define ALWAYS_INLINE FUNCATTR((ATTRALWAYS_INLINE))
#endif])
])
AC_DEFUN([GCC_ATTRIBUTE_PACKED],[
AC_REQUIRE([GCC_ATTRIBUTE_SUPPORTED])
GCC_ATTRIBUTE(packed,packed,[int x],packed,PACKED,[Define if packing of struct members a la GCC 2.5 and higher is available.])
AH_BOTTOM([/* GNU C constant functions, or null. */
#ifndef ATTRPACKED
#ifdef HAVE_GNUC25_PACKED
#define ATTRPACKED packed
#else
#define ATTRPACKED
#endif
#endif
#ifndef PACKED
#define PACKED FUNCATTR((ATTRPACKED))
#endif])
])