diff options
author | Stepan Kasal | 2007-05-15 20:46:20 +0200 |
---|---|---|
committer | Karel Zak | 2007-05-16 11:43:30 +0200 |
commit | b34258064dd36e6b22b0ea8bf3ad4365cc078057 (patch) | |
tree | d1e77c57c8dd197510dba8fd64ddd1b7522615ad /configure.ac | |
parent | build-sys: replace AC_TRY_* by AC_*_IFELSE (diff) | |
download | kernel-qcow2-util-linux-b34258064dd36e6b22b0ea8bf3ad4365cc078057.tar.gz kernel-qcow2-util-linux-b34258064dd36e6b22b0ea8bf3ad4365cc078057.tar.xz kernel-qcow2-util-linux-b34258064dd36e6b22b0ea8bf3ad4365cc078057.zip |
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 <skasal@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 23 insertions, 0 deletions
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 <asm/page.h> +#endif +]) + +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[ +#ifdef HAVE_ASM_PAGE_H +# include <asm/page.h> +#endif +#ifdef HAVE_SYS_SWAP_H +# include <sys/swap.h> +#endif +#include <unistd.h> +]], +[[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 ;; |