Files
apfstests/configure.ac
T
Eryu Guan 219077fcb8 fstests: update autoconf rules to define _GNU_SOURCE where needed
Starting from xfsprogs commit cb898f157f84 ("linux.h: Use off64_t
instead of loff_t") in v4.5-rc1, fstests failed to build because of
configure error:

    checking xfs/xfs.h usability... no
    checking xfs/xfs.h presence... yes
    configure: WARNING: xfs/xfs.h: present but cannot be compiled
    configure: WARNING: xfs/xfs.h:     check for missing prerequisite headers?
    configure: WARNING: xfs/xfs.h: see the Autoconf documentation
    configure: WARNING: xfs/xfs.h:     section "Present But Cannot Be Compiled"
    configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
    checking for xfs/xfs.h... no

    FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
    Run "make install-qa" from the xfsprogs source.

and that's because off64_t is not defined without _GNU_SOURCE being set.

Fix it by updating the autoconf rules adding _GNU_SOURCE define for the
following checks:

xfs.h libxfs.h xfs_log_format.h xlog_assign_lsn xqm.h xfsctl

Suggested-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2016-02-29 10:19:05 +11:00

88 lines
1.8 KiB
Plaintext

AC_INIT([xfstests], [1.1.1])
AC_PREREQ(2.50)
AC_CONFIG_SRCDIR([src/xfsctl.c])
AC_PACKAGE_GLOBALS(xfstests)
AC_PACKAGE_UTILITIES(xfstests)
AC_HEADER_STDC
AC_CHECK_HEADERS([ assert.h \
bstring.h \
libgen.h \
dirent.h \
errno.h \
malloc.h \
uuid.h \
uuid/uuid.h \
sys/uuid.h \
sys/file.h \
sys/fcntl.h \
sys/syssgi.h \
sys/param.h \
sys/stat.h \
sys/statvfs.h \
sys/time.h \
sys/ioctl.h \
sys/wait.h \
sys/types.h \
strings.h \
err.h \
linux/falloc.h \
sys/fs/xfs_fsops.h \
sys/fs/xfs_itable.h \
xfs/platform_defs.h \
btrfs/ioctl.h \
cifs/ioctl.h \
])
AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[
#define _GNU_SOURCE
#include <xfs/libxfs.h>])
AC_PACKAGE_NEED_UUIDCOMPARE
case $pkg_platform
in
irix)
AC_PACKAGE_NEED_SYS_ACL_H
AC_PACKAGE_NEED_ATTRIBUTES_H
AC_PACKAGE_WANT_NDBM
AC_PACKAGE_NEED_IRIX_LIBHANDLE
have_attr_list=true
AC_SUBST(have_attr_list)
;;
*)
AC_MULTILIB($enable_lib64)
AC_PACKAGE_NEED_XFS_XFS_H
AC_PACKAGE_WANT_LIBXFS_H
AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
AC_PACKAGE_NEED_XFS_XQM_H
AC_PACKAGE_NEED_XFSCTL_MACRO
AC_PACKAGE_NEED_XFS_HANDLE_H
AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
AC_PACKAGE_NEED_ATTR_XATTR_H
AC_PACKAGE_NEED_ATTRIBUTES_H
AC_PACKAGE_WANT_ATTRLIST_LIBATTR
AC_PACKAGE_NEED_GETXATTR_LIBATTR
AC_PACKAGE_NEED_SYS_ACL_H
AC_PACKAGE_NEED_ACL_LIBACL_H
AC_PACKAGE_NEED_ACLINIT_LIBACL
AC_PACKAGE_WANT_GDBM
AC_PACKAGE_WANT_AIO
AC_PACKAGE_WANT_DMAPI
AC_PACKAGE_WANT_LINUX_FIEMAP_H
AC_PACKAGE_WANT_FALLOCATE
AC_PACKAGE_WANT_LINUX_PRCTL_H
AC_PACKAGE_WANT_LINUX_FS_H
AC_PACKAGE_WANT_SSL
;;
esac
AC_CHECK_FUNCS([renameat2])
AC_CONFIG_HEADER(include/config.h)
AC_CONFIG_FILES([include/builddefs])
AC_OUTPUT