From b34258064dd36e6b22b0ea8bf3ad4365cc078057 Mon Sep 17 00:00:00 2001 From: Stepan Kasal Date: Tue, 15 May 2007 20:46:20 +0200 Subject: build-sys: remove swapargs.h, move the tests to main configure.ac Do not use header swapargs.h, generated by script swap.configure; use the standard AC_DEFINE method in configure.ac. Signed-off-by: Stepan Kasal --- configure.ac | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 62d293ccb..a457cc130 100644 --- a/configure.ac +++ b/configure.ac @@ -162,6 +162,29 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]) +AC_CHECK_HEADERS([asm/page.h sys/swap.h], [], [], [ +#ifdef HAVE_ASM_PAGE_H +# include +#endif +]) + +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[ +#ifdef HAVE_ASM_PAGE_H +# include +#endif +#ifdef HAVE_SYS_SWAP_H +# include +#endif +#include +]], +[[swapon("/dev/null", 0);]])], +[AC_DEFINE(SWAPON_HAS_TWO_ARGS, 1, [Is swapon() declared with two parameters?]) +], +[AC_MSG_NOTICE([Your libc thinks that swapon has 1 arg only.]) +]) + + case "$host" in i?86-*) intel=true ;; m68*) m68k=true ;; -- cgit v1.2.3-55-g7522