aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-libgtop-sysdeps.m4
diff options
context:
space:
mode:
authorMartin Baulig <martin@src.gnome.org>1998-12-03 22:49:39 +0800
committerMartin Baulig <martin@src.gnome.org>1998-12-03 22:49:39 +0800
commit405dbe01d90c954f52e0a79b45ec5c764dfcb83a (patch)
tree5bc42257d98b6b9fca79ad7157e35283d5fbfaaa /macros/gnome-libgtop-sysdeps.m4
parent548ada4c9277204ba41c01ac0fa4b22ff37e719b (diff)
downloadgsoc2013-evolution-405dbe01d90c954f52e0a79b45ec5c764dfcb83a.tar.gz
gsoc2013-evolution-405dbe01d90c954f52e0a79b45ec5c764dfcb83a.tar.zst
gsoc2013-evolution-405dbe01d90c954f52e0a79b45ec5c764dfcb83a.zip
Only check for the linux table () function on Linux systems.
svn path=/trunk/; revision=502
Diffstat (limited to 'macros/gnome-libgtop-sysdeps.m4')
-rw-r--r--macros/gnome-libgtop-sysdeps.m483
1 files changed, 41 insertions, 42 deletions
diff --git a/macros/gnome-libgtop-sysdeps.m4 b/macros/gnome-libgtop-sysdeps.m4
index 6a96214673..371ee43323 100644
--- a/macros/gnome-libgtop-sysdeps.m4
+++ b/macros/gnome-libgtop-sysdeps.m4
@@ -23,48 +23,6 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
AM_CONDITIONAL(EXAMPLES, test x"$build_examples" = xyes)
- AC_ARG_WITH(linux-table,
- [ --with-linux-table Use the table () function from Martin Baulig],[
- linux_table="$withval"],[linux_table=auto])
-
- 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_MSG_CHECKING(for table function in Linux Kernel)
- 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)
- AC_MSG_RESULT($linux_table)
- fi
-
- if test $linux_table = yes ; then
- AC_DEFINE(HAVE_LINUX_TABLE)
- fi
-
- AM_CONDITIONAL(LINUX_TABLE, test $linux_table = yes)
AC_ARG_WITH(libgtop-smp,
[ --with-libgtop-smp Enable SMP support (default-auto)],[
@@ -205,6 +163,47 @@ main (void)
fi
fi
;;
+ linux*)
+ AC_ARG_WITH(linux-table,
+ [ --with-linux-table Use the table () function from Martin Baulig],[
+ linux_table="$withval"],[linux_table=auto])
+ 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_MSG_CHECKING(for table function in Linux Kernel)
+ 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)
+ AC_MSG_RESULT($linux_table)
+ fi
+ if test $linux_table = yes ; then
+ AC_DEFINE(HAVE_LINUX_TABLE)
+ fi
+ AM_CONDITIONAL(LINUX_TABLE, test $linux_table = yes)
+ ;;
esac
AC_MSG_CHECKING(for machine.h in libgtop sysdeps dir)