summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@src.gnome.org>1998-12-03 14:49:39 +0000
committerMartin Baulig <martin@src.gnome.org>1998-12-03 14:49:39 +0000
commitb387e8355330bffc1b0b69f8a579b94c2710325a (patch)
tree042c631588e1200192fe88dc843799e28baed0cf
parenta3e8e691c87827a725c0749f10c981677deded87 (diff)
downloadgnome-common-b387e8355330bffc1b0b69f8a579b94c2710325a.tar.gz
Only check for the linux table () function on Linux systems.
svn path=/trunk/; revision=498
-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 6a96214..371ee43 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)