diff --git a/ChangeLog b/ChangeLog index 2ec66245..6f2caccc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-01-24 Martin Baulig + + * libgtop-sysdeps.m4 (GNOME_LIBGTOP_TYPES_PRIVATE): New macro. + This is the same than `GNOME_LIBGTOP_TYPES' but also checks for + `u_int8_t' and `int8_t' and it doesn't force people to put this + in their acconfig.h. + + * configure.in: Use GNOME_LIBGTOP_TYPES_PRIVATE instead of + GNOME_LIBGTOP_TYPES. + 2000-01-23 Martin Baulig * lib/sysdeps-init-kernel.c: Load the "glibtop-backend-kernel" before diff --git a/configure.in b/configure.in index ee0baabd..ad1b3ea3 100644 --- a/configure.in +++ b/configure.in @@ -115,7 +115,7 @@ fi AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes) GNOME_LIBGTOP_SYSDEPS -GNOME_LIBGTOP_TYPES +GNOME_LIBGTOP_TYPES_PRIVATE sysdeps_dir="$libgtop_sysdeps_dir" sysdeps_name="$libgtop_sysdeps_name" @@ -123,7 +123,7 @@ AC_SUBST(sysdeps_dir) AC_SUBST(sysdeps_name) AC_MSG_CHECKING(for sysdeps_init_file) -if x$linux_sysctl = xyes ; then +if test x$linux_sysctl = xyes ; then sysdeps_init_file='sysdeps-init-kernel.c' else sysdeps_init_file='sysdeps-init-'"$libgtop_sysdeps_name"'.c' @@ -442,6 +442,26 @@ typedef signed long long int int64_t; _______EOF fi + if test x$glibtop_uint8_t != xyes ; then + did_typedefs=yes + cat >> $outfile <<\_______EOF + +#ifndef u_int8_t +typedef unsigned char u_int8_t; +#endif +_______EOF + fi + + if test x$glibtop_int8_t != xyes ; then + did_typedefs=yes + cat >> $outfile <<\_______EOF + +#ifndef int8_t +typedef signed char int8_t; +#endif +_______EOF + fi + if test x$did_typedefs = xyes ; then cat >>$outfile <<_______EOF @@ -505,6 +525,8 @@ esac ],[ glibtop_uint64_t=$ac_cv_type_u_int64_t glibtop_int64_t=$ac_cv_type_int64_t +glibtop_uint8_t=$ac_cv_type_u_int8_t +glibtop_int8_t=$ac_cv_type_int8_t libgtop_major_version=$LIBGTOP_MAJOR_VERSION libgtop_minor_version=$LIBGTOP_MINOR_VERSION libgtop_micro_version=$LIBGTOP_MICRO_VERSION diff --git a/libgtop-sysdeps.m4 b/libgtop-sysdeps.m4 index 9e54f769..37f8e39d 100644 --- a/libgtop-sysdeps.m4 +++ b/libgtop-sysdeps.m4 @@ -1,3 +1,13 @@ +dnl This is used internally for . + +AC_DEFUN([GNOME_LIBGTOP_TYPES_PRIVATE], +[ + AC_CHECK_TYPE(u_int64_t, unsigned long long int) + AC_CHECK_TYPE(int64_t, signed long long int) + AC_CHECK_TYPE(u_int8_t, unsigned char) + AC_CHECK_TYPE(int8_t, signed char) +]) + dnl This file is intended for use both internally in libgtop and in every program dnl that wants to use it. dnl