aboutsummaryrefslogtreecommitdiffstats
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/ChangeLog9
-rw-r--r--macros/gnome-libgtop-check.m437
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 <martin@home-of-linux.org>
+
+ * 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 <sys/bitypes.h> for Tru64 and
+ use AC_LIBGTOP_CHECK_TYPE rather than AC_CHECK_TYPE.
+
2000-01-26 Dave Camp <campd@oit.edu>
* gnome-bonobo-check.m4 Include <bonobo.h> 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,4 +1,36 @@
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 <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+
+/* For Tru64 */
+#ifdef HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#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
dnl some typechecks for libgtop.
@@ -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