aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>1998-06-14 05:26:18 +0800
committerMartin Baulig <martin@src.gnome.org>1998-06-14 05:26:18 +0800
commit82d04fa4399c91c4c0ef131b77dfd8a1e4409b57 (patch)
tree544b1859492e3a324d4a756beb82675935063eda
parent2ab162417f029ac1ee8b3e9f25263bfc2a8ab725 (diff)
downloadgsoc2013-evolution-82d04fa4399c91c4c0ef131b77dfd8a1e4409b57.tar
gsoc2013-evolution-82d04fa4399c91c4c0ef131b77dfd8a1e4409b57.tar.gz
gsoc2013-evolution-82d04fa4399c91c4c0ef131b77dfd8a1e4409b57.tar.bz2
gsoc2013-evolution-82d04fa4399c91c4c0ef131b77dfd8a1e4409b57.tar.lz
gsoc2013-evolution-82d04fa4399c91c4c0ef131b77dfd8a1e4409b57.tar.xz
gsoc2013-evolution-82d04fa4399c91c4c0ef131b77dfd8a1e4409b57.tar.zst
gsoc2013-evolution-82d04fa4399c91c4c0ef131b77dfd8a1e4409b57.zip
Added check for the table () system call in the linux kernel.
1998-06-13 Martin Baulig <martin@home-of-linux.org> * gnome-libgtop-sysdeps.m4: Added check for the table () system call in the linux kernel. svn path=/trunk/; revision=261
-rw-r--r--macros/ChangeLog5
-rw-r--r--macros/gnome-libgtop-sysdeps.m448
2 files changed, 51 insertions, 2 deletions
diff --git a/macros/ChangeLog b/macros/ChangeLog
index 73a2c9a85f..f066a8a8d8 100644
--- a/macros/ChangeLog
+++ b/macros/ChangeLog
@@ -1,3 +1,8 @@
+1998-06-13 Martin Baulig <martin@home-of-linux.org>
+
+ * gnome-libgtop-sysdeps.m4: Added check for the table ()
+ system call in the linux kernel.
+
1998-06-11 Raja R Harinath <harinath@cs.umn.edu>
* gnome-x-checks.m4 (USE_DEVGTK): Use AC_EGREP_CPP rather than
diff --git a/macros/gnome-libgtop-sysdeps.m4 b/macros/gnome-libgtop-sysdeps.m4
index 17c66f001e..0993cbaa27 100644
--- a/macros/gnome-libgtop-sysdeps.m4
+++ b/macros/gnome-libgtop-sysdeps.m4
@@ -17,12 +17,56 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
AC_SUBST(libgtop_use_machine_h)
AC_SUBST(libgtop_need_server)
+ AC_ARG_WITH(linux-table,
+ [ --with-linux-table Use the table () function from Martin Baulig],[
+ linux_table="$withval"],[linux_table=auto])
+
+ AC_MSG_CHECKING(for table function in Linux Kernel)
+
+ if test $linux_table = yes ; then
+ AC_CHECK_HEADER(linux/table.h, linux_table=yes, linux_table=no)
+ elif test $linux_table = auto ; then
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <unistd.h>
+#include <linux/unistd.h>
+#include <linux/table.h>
+
+#include <syscall.h>
+
+static inline _syscall3 (int, table, int, type, union table *, tbl, const void *, param);
+
+int
+main (void)
+{
+ union table tbl;
+ int ret;
+
+ ret = table (TABLE_VERSION, NULL, NULL);
+
+ if (ret == -1)
+ exit (-errno);
+
+ exit (ret < 1 ? ret : 0);
+}
+], linux_table=yes, linux_table=no, linux_table=no)
+ fi
+
+ AC_MSG_RESULT($linux_table)
+
AC_MSG_CHECKING(for libgtop sysdeps directory)
case "$host_os" in
linux*)
- libgtop_sysdeps_dir=linux
- libgtop_use_machine_h=yes
+ if test x$linux_table = xyes ; then
+ libgtop_sysdeps_dir=kernel
+ libgtop_use_machine_h=no
+ else
+ libgtop_sysdeps_dir=linux
+ libgtop_use_machine_h=yes
+ fi
libgtop_need_server=no
;;
sunos4*)