From dec6d6b0971480b8910c301daa6218abe3f2eee0 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Fri, 4 Feb 2000 22:25:36 +0000 Subject: New macro. This is an improved version of AC_CHECK_TYPE which takes into 2000-02-05 Martin Baulig * gnome-libgtop-types.m4 (AC_LIBGTOP_CHECK_TYPE): New macro. This is an improved version of AC_CHECK_TYPE which takes into account that we need to #include some other header files on some systems to get some types. (GNOME_LIBGTOP_TYPES): Check for for Tru64 and use AC_LIBGTOP_CHECK_TYPE rather than AC_CHECK_TYPE. svn path=/trunk/; revision=1667 --- macros/ChangeLog | 9 +++++++++ macros/gnome-libgtop-check.m4 | 37 +++++++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/macros/ChangeLog b/macros/ChangeLog index f7718e2f97..b752b6036c 100644 --- a/macros/ChangeLog +++ b/macros/ChangeLog @@ -1,3 +1,12 @@ +2000-02-05 Martin Baulig + + * gnome-libgtop-types.m4 (AC_LIBGTOP_CHECK_TYPE): New macro. This + is an improved version of AC_CHECK_TYPE which takes into account + that we need to #include some other header files on some systems + to get some types. + (GNOME_LIBGTOP_TYPES): Check for for Tru64 and + use AC_LIBGTOP_CHECK_TYPE rather than AC_CHECK_TYPE. + 2000-01-26 Dave Camp * gnome-bonobo-check.m4 Include rather than diff --git a/macros/gnome-libgtop-check.m4 b/macros/gnome-libgtop-check.m4 index 0845435167..0ce6f6f612 100644 --- a/macros/gnome-libgtop-check.m4 +++ b/macros/gnome-libgtop-check.m4 @@ -1,3 +1,35 @@ +dnl +dnl LIBGTOP_CHECK_TYPE +dnl +dnl Improved version of AC_CHECK_TYPE which takes into account +dnl that we need to #include some other header files on some +dnl systems to get some types. + +dnl AC_LIBGTOP_CHECK_TYPE(TYPE, DEFAULT) +AC_DEFUN(AC_LIBGTOP_CHECK_TYPE, +[AC_REQUIRE([AC_HEADER_STDC])dnl +AC_MSG_CHECKING(for $1) +AC_CACHE_VAL(ac_cv_type_$1, +[AC_EGREP_CPP(dnl +changequote(<<,>>)dnl +<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl +changequote([,]), [#include +#if STDC_HEADERS +#include +#include +#endif + +/* For Tru64 */ +#ifdef HAVE_SYS_BITYPES_H +#include +#endif +], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl +AC_MSG_RESULT($ac_cv_type_$1) +if test $ac_cv_type_$1 = no; then + AC_DEFINE($1, $2) +fi +]) + dnl dnl GNOME_LIBGTOP_TYPES dnl @@ -6,8 +38,9 @@ dnl AC_DEFUN([GNOME_LIBGTOP_TYPES], [ - AC_CHECK_TYPE(u_int64_t, unsigned long long int) - AC_CHECK_TYPE(int64_t, signed long long int) + AC_CHECK_HEADERS(sys/bitypes.h) + AC_LIBGTOP_CHECK_TYPE(u_int64_t, unsigned long long int) + AC_LIBGTOP_CHECK_TYPE(int64_t, signed long long int) ]) dnl -- cgit