AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
[ AC_MSG_CHECKING([for fallocate])
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <fcntl.h>
-#include <linux/falloc.h> ],
- [ fallocate(0, 0, 0, 0); ],
- [ have_fallocate=true; AC_MSG_RESULT(yes) ],
- [ have_fallocate=false; AC_MSG_RESULT(no) ])
+#include <linux/falloc.h> ]], [[ fallocate(0, 0, 0, 0); ]])],[ have_fallocate=true; AC_MSG_RESULT(yes) ],[ have_fallocate=false; AC_MSG_RESULT(no) ])
AC_SUBST(have_fallocate)
])
AC_DEFUN([AC_PACKAGE_WANT_OPEN_BY_HANDLE_AT],
[ AC_MSG_CHECKING([for open_by_handle_at])
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <fcntl.h>
- ],
- [
+ ]], [[
struct file_handle fh;
open_by_handle_at(0, &fh, 0);
- ],
- [ have_open_by_handle_at=true; AC_MSG_RESULT(yes) ],
- [ have_open_by_handle_at=false; AC_MSG_RESULT(no) ])
+ ]])],[ have_open_by_handle_at=true; AC_MSG_RESULT(yes) ],[ have_open_by_handle_at=false; AC_MSG_RESULT(no) ])
AC_SUBST(have_open_by_handle_at)
])
-AC_INIT([xfstests], [1.1.1])
+AC_INIT([xfstests],[1.1.2])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
AC_CONFIG_SRCDIR([src/xfsctl.c])
AC_PACKAGE_GLOBALS(xfstests)
AC_PACKAGE_UTILITIES(xfstests)
-AC_HEADER_STDC
- AC_CHECK_HEADERS([ assert.h \
+AC_CHECK_HEADERS([ assert.h \
bstring.h \
libgen.h \
dirent.h \
btrfs/ioctl.h \
cifs/ioctl.h \
sys/mman.h \
- ])
+])
AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[
#define _GNU_SOURCE
#include <linux/btrfs.h>
]])
-AC_CONFIG_HEADER(include/config.h)
+AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_FILES([include/builddefs])
AC_OUTPUT
#
AC_DEFUN([AC_HAVE_FADVISE],
[ AC_MSG_CHECKING([for fadvise ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <fcntl.h>
- ], [
+ ]], [[
posix_fadvise(0, 1, 0, POSIX_FADV_NORMAL);
- ], have_fadvise=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_fadvise=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_fadvise)
])
#
AC_DEFUN([AC_HAVE_MADVISE],
[ AC_MSG_CHECKING([for madvise ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <sys/mman.h>
- ], [
+ ]], [[
posix_madvise(0, 0, MADV_NORMAL);
- ], have_madvise=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_madvise=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_madvise)
])
#
AC_DEFUN([AC_HAVE_MINCORE],
[ AC_MSG_CHECKING([for mincore ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <sys/mman.h>
- ], [
+ ]], [[
mincore(0, 0, 0);
- ], have_mincore=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_mincore=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_mincore)
])
#
AC_DEFUN([AC_HAVE_SENDFILE],
[ AC_MSG_CHECKING([for sendfile ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <sys/sendfile.h>
- ], [
+ ]], [[
sendfile(0, 0, 0, 0);
- ], have_sendfile=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_sendfile=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_sendfile)
])
#
AC_DEFUN([AC_HAVE_GETMNTENT],
[ AC_MSG_CHECKING([for getmntent ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <mntent.h>
- ], [
+ ]], [[
getmntent(0);
- ], have_getmntent=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_getmntent=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_getmntent)
])
#
AC_DEFUN([AC_HAVE_GETMNTINFO],
[ AC_MSG_CHECKING([for getmntinfo ])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/param.h>
#include <sys/ucred.h>
#include <sys/mount.h>
- ], [
+ ]], [[
getmntinfo(0, 0);
- ], have_getmntinfo=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_getmntinfo=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_getmntinfo)
])
#
AC_DEFUN([AC_HAVE_COPY_FILE_RANGE],
[ AC_MSG_CHECKING([for copy_file_range])
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <sys/syscall.h>
#include <unistd.h>
- ], [
+ ]], [[
syscall(__NR_copy_file_range, 0, 0, 0, 0, 0, 0);
- ], have_copy_file_range=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ ]])],[have_copy_file_range=yes
+ AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
AC_SUBST(have_copy_file_range)
])
libcurses="-lncurses"
LIBS="$LIBS $libcurses"
CFLAGS="$CFLAGS -D_GNU_SOURCE"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <ncurses.h>
-#include <signal.h>],
- [wgetch(stdscr);],
- [enable_curses=yes; AC_MSG_RESULT([ok])],
- [enable_curses=no; libcurses=""; AC_MSG_RESULT([disabling curses])])
+#include <signal.h>]], [[wgetch(stdscr);]])],[enable_curses=yes; AC_MSG_RESULT([ok])],[enable_curses=no; libcurses=""; AC_MSG_RESULT([disabling curses])])
AC_SUBST(enable_curses)
AC_SUBST(libcurses)
])
AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO],
[ AC_MSG_CHECKING([xfsctl from xfs/xfs.h])
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
-#include <xfs/xfs.h> ],
- [ int x = xfsctl(0, 0, 0, 0); ],
- [ echo ok ],
- [ echo
+#include <xfs/xfs.h> ]], [[ int x = xfsctl(0, 0, 0, 0); ]])],[ echo ok ],[ echo
echo 'FATAL ERROR: cannot find required macros in the XFS headers.'
echo 'Upgrade your XFS programs (xfsprogs) development package.'
echo 'Alternatively, run "make install-dev" from the xfsprogs source.'