aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-libgtop-check.m4
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>2000-02-05 06:25:36 +0800
committerMartin Baulig <martin@src.gnome.org>2000-02-05 06:25:36 +0800
commitdec6d6b0971480b8910c301daa6218abe3f2eee0 (patch)
tree29fd7339beb795f11907acd39fb6f0c43e61f7a5 /macros/gnome-libgtop-check.m4
parent5d56cdb0b37b4b8919df92ff35daf06934666061 (diff)
downloadgsoc2013-evolution-dec6d6b0971480b8910c301daa6218abe3f2eee0.tar.gz
gsoc2013-evolution-dec6d6b0971480b8910c301daa6218abe3f2eee0.tar.zst
gsoc2013-evolution-dec6d6b0971480b8910c301daa6218abe3f2eee0.zip
New macro. This is an improved version of AC_CHECK_TYPE which takes into
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. svn path=/trunk/; revision=1667
Diffstat (limited to 'macros/gnome-libgtop-check.m4')
-rw-r--r--macros/gnome-libgtop-check.m437
1 files changed, 35 insertions, 2 deletions
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