]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - configure.ac
xfs: don't rely on ->total in xfs_alloc_space_available
[thirdparty/xfsprogs-dev.git] / configure.ac
CommitLineData
95d85185 1AC_INIT([xfsprogs], [4.9.0], [linux-xfs@vger.kernel.org])
86b99f0a 2AC_PREREQ(2.50)
07c561fe
AG
3AC_CONFIG_AUX_DIR([.])
4AC_CONFIG_MACRO_DIR([m4])
f474cd4f 5AC_CONFIG_SRCDIR([include/libxfs.h])
9440d84d 6AC_CONFIG_HEADER(include/platform_defs.h)
521902a9 7AC_PREFIX_DEFAULT(/usr)
9440d84d 8
07c561fe
AG
9AC_PROG_LIBTOOL
10
e14913c1
TT
11AC_PROG_CC
12if test $cross_compiling = no; then
13 BUILD_CC="$CC"
14 AC_SUBST(BUILD_CC)
15else
16 AC_CHECK_PROGS(BUILD_CC, gcc cc)
17fi
18
534b0bfd 19AC_ARG_ENABLE(shared,
dfc13ce1 20[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
d5dca43b
NS
21 enable_shared=yes)
22AC_SUBST(enable_shared)
23
16c44ed2
NS
24AC_ARG_ENABLE(gettext,
25[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
26 enable_gettext=yes)
27AC_SUBST(enable_gettext)
28
6635d6ab
JT
29AC_ARG_ENABLE(blkid,
30[ --enable-blkid=[yes/no] Enable use of block device id library [default=yes]],,
31 enable_blkid=yes)
32AC_SUBST(enable_blkid)
33
e246ba5f 34AC_ARG_ENABLE(readline,
16c44ed2 35[ --enable-readline=[yes/no] Enable readline command editing [default=no]],
541a1d4f 36 test $enable_readline = yes && libreadline="-lreadline",
e246ba5f 37 enable_readline=no)
e246ba5f
NS
38AC_SUBST(libreadline)
39AC_SUBST(enable_readline)
40
d4b9ebda 41AC_ARG_ENABLE(editline,
16c44ed2 42[ --enable-editline=[yes/no] Enable editline command editing [default=no]],
541a1d4f 43 test $enable_editline = yes && libeditline="-ledit",
d4b9ebda 44 enable_editline=no)
d4b9ebda
NS
45AC_SUBST(libeditline)
46AC_SUBST(enable_editline)
47
541a1d4f
NS
48AC_ARG_ENABLE(termcap,
49[ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]],
50 test $enable_termcap = yes && libtermcap="-ltermcap",)
51AC_SUBST(libtermcap)
52
e4da9941 53
82805b60 54AC_ARG_ENABLE(lib64,
595e27db
CH
55[ --enable-lib64=[yes/no] Enable lib64 support [default=yes]],,
56 enable_lib64=yes)
82805b60
TS
57AC_SUBST(enable_lib64)
58
1d43056b
JT
59AC_ARG_ENABLE(librt,
60[ --enable-librt=[yes/no] Enable librt support [default=yes]],,
61 enable_librt=yes)
62AC_SUBST(enable_librt)
0caa2bae 63
595e27db
CH
64#
65# If the user specified a libdir ending in lib64 do not append another
66# 64 to the library names.
67#
68base_libdir=`basename "$libdir"`
69case $base_libdir in
70lib64)
71 enable_lib64=no
72esac
73
74#
75# Some important tools should be installed into the root partitions.
76#
77# Check whether exec_prefix=/usr: and install them to /sbin in that
78# case. If the user choses a different prefix assume he just wants
79# a local install for testing and not a system install.
80#
81case $exec_prefix:$prefix in
82NONE:NONE | NONE:/usr | /usr:*)
83 root_sbindir='/sbin'
595e27db 84 root_libdir="/${base_libdir}"
2ccb8cf0
CH
85 ;;
86*)
87 root_sbindir="${sbindir}"
88 root_libdir="${libdir}"
89 ;;
595e27db
CH
90esac
91
2ccb8cf0
CH
92AC_SUBST([root_sbindir])
93AC_SUBST([root_libdir])
94
d9ee1c4c
AE
95# Find localized files. Don't descend into any "dot directories"
96# (like .git or .pc from quilt). Strangely, the "-print" argument
97# to "find" is required, to avoid including such directories in the
98# list.
8c053393 99LOCALIZED_FILES=""
d9ee1c4c 100for lfile in `find ${srcdir} -path './.??*' -prune -o -name '*.c' -type f -print || exit 1`; do
8c053393
AM
101 LOCALIZED_FILES="$LOCALIZED_FILES \$(TOPDIR)/$lfile"
102done
103AC_SUBST(LOCALIZED_FILES)
104
16c44ed2
NS
105AC_PACKAGE_GLOBALS(xfsprogs)
106AC_PACKAGE_UTILITIES(xfsprogs)
82805b60 107AC_MULTILIB($enable_lib64)
1d43056b 108AC_RT($enable_librt)
93d9f139 109
0686de0f 110AC_PACKAGE_NEED_UUID_H
7b9d2be9 111AC_PACKAGE_NEED_UUIDCOMPARE
fc49813f 112
949c0f10
NS
113AC_PACKAGE_NEED_PTHREAD_H
114AC_PACKAGE_NEED_PTHREADMUTEXINIT
115
0bba1a49
NS
116AC_HAVE_FADVISE
117AC_HAVE_MADVISE
118AC_HAVE_MINCORE
119AC_HAVE_SENDFILE
cfe6e3f0
NS
120AC_HAVE_GETMNTENT
121AC_HAVE_GETMNTINFO
c0b5232a 122AC_HAVE_FALLOCATE
8f0e0912 123AC_HAVE_FIEMAP
197d5828 124AC_HAVE_PREADV
628e112a 125AC_HAVE_COPY_FILE_RANGE
197d5828 126AC_HAVE_SYNC_FILE_RANGE
5ae294ea 127AC_HAVE_MNTENT
5121281b 128AC_HAVE_FLS
3bc05641 129AC_HAVE_READDIR
c14c7b79 130AC_HAVE_FSETXATTR
a49984b3 131AC_HAVE_MREMAP
6529e656 132AC_NEED_INTERNAL_FSXATTR
0bba1a49 133
6635d6ab
JT
134if test "$enable_blkid" = yes; then
135AC_HAVE_BLKID_TOPO
136fi
137
865f1075
JE
138AC_CHECK_SIZEOF([long])
139AC_CHECK_SIZEOF([char *])
cd960ece 140AC_TYPE_UMODE_T
16c44ed2 141AC_MANUAL_FORMAT
fc49813f 142
f474cd4f
JE
143AC_CONFIG_FILES([include/builddefs])
144AC_OUTPUT