]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - configure.ac
xfsprogs: Release v6.7.0
[thirdparty/xfsprogs-dev.git] / configure.ac
CommitLineData
09ba6420 1AC_INIT([xfsprogs],[6.7.0],[linux-xfs@vger.kernel.org])
1a35c8df 2AC_PREREQ([2.69])
07c561fe
AG
3AC_CONFIG_AUX_DIR([.])
4AC_CONFIG_MACRO_DIR([m4])
f474cd4f 5AC_CONFIG_SRCDIR([include/libxfs.h])
521902a9 6AC_PREFIX_DEFAULT(/usr)
9440d84d 7
84322551 8AC_PROG_INSTALL
69d66277 9LT_INIT
07c561fe 10
e14913c1 11AC_PROG_CC
0a71e383
GG
12AC_ARG_VAR(BUILD_CC, [C compiler for build tools])
13if test "${BUILD_CC+set}" != "set"; then
14 if test $cross_compiling = no; then
15 BUILD_CC="$CC"
16 else
17 AC_CHECK_PROGS(BUILD_CC, gcc cc)
18 fi
19fi
20AC_ARG_VAR(BUILD_CFLAGS, [C compiler flags for build tools])
21if test "${BUILD_CFLAGS+set}" != "set"; then
22 if test $cross_compiling = no; then
23 BUILD_CFLAGS="$CFLAGS"
24 else
25 BUILD_CFLAGS="-g -O2"
26 fi
e14913c1
TT
27fi
28
534b0bfd 29AC_ARG_ENABLE(shared,
09c343eb 30[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
d5dca43b
NS
31 enable_shared=yes)
32AC_SUBST(enable_shared)
33
16c44ed2 34AC_ARG_ENABLE(gettext,
09c343eb 35[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
16c44ed2
NS
36 enable_gettext=yes)
37AC_SUBST(enable_gettext)
38
d4b9ebda 39AC_ARG_ENABLE(editline,
09c343eb 40[ --enable-editline=[yes/no] Enable editline command editing [default=no]],
541a1d4f 41 test $enable_editline = yes && libeditline="-ledit",
d4b9ebda 42 enable_editline=no)
d4b9ebda
NS
43AC_SUBST(libeditline)
44AC_SUBST(enable_editline)
45
541a1d4f 46AC_ARG_ENABLE(termcap,
09c343eb 47[ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]],
541a1d4f
NS
48 test $enable_termcap = yes && libtermcap="-ltermcap",)
49AC_SUBST(libtermcap)
50
e4da9941 51
82805b60 52AC_ARG_ENABLE(lib64,
09c343eb 53[ --enable-lib64=[yes/no] Enable lib64 support [default=yes]],,
595e27db 54 enable_lib64=yes)
82805b60
TS
55AC_SUBST(enable_lib64)
56
e63257c0
DW
57AC_ARG_WITH([multiarch],
58[ --with-multiarch=ARCH Specify the multiarch triplet],
59 multiarch=$withval)
60AC_SUBST(multiarch)
61
1d43056b 62AC_ARG_ENABLE(librt,
09c343eb 63[ --enable-librt=[yes/no] Enable librt support [default=yes]],,
1d43056b
JT
64 enable_librt=yes)
65AC_SUBST(enable_librt)
0caa2bae 66
e99e3d7d
DW
67# Enable UBSAN; set enable_ubsan=probe below to enable autoprobe.
68AC_ARG_ENABLE(ubsan,
09c343eb 69[ --enable-ubsan=[yes/no] Enable Undefined Behavior Sanitizer (UBSAN) [default=no]],,
e99e3d7d
DW
70 enable_ubsan=no)
71AC_SUBST(enable_ubsan)
72
de9c45b8
DW
73# Enable ADDRSAN; set enable_addrsan=probe below to enable autoprobe.
74AC_ARG_ENABLE(addrsan,
09c343eb 75[ --enable-addrsan=[yes/no] Enable Address Sanitizer (ADDRSAN) [default=no]],,
de9c45b8
DW
76 enable_addrsan=no)
77AC_SUBST(enable_addrsan)
78
30127fbf
DW
79# Enable THREADSAN; set enable_threadsan=probe to enable autoprobe.
80AC_ARG_ENABLE(threadsan,
09c343eb 81[ --enable-threadsan=[yes/no] Enable Thread Sanitizer (THREADSAN) [default=no]],,
30127fbf
DW
82 enable_threadsan=no)
83AC_SUBST(enable_threadsan)
84
e61f1552 85AC_ARG_ENABLE(lto,
09c343eb 86[ --enable-lto=[yes/no] Enable link time optimization (LTO) [default=no]],,
d18ae0e7 87 enable_lto=no)
e61f1552
DW
88AC_SUBST(enable_lto)
89
9fae859a
ES
90# Enable xfs_scrub build
91AC_ARG_ENABLE(scrub,
09c343eb 92[ --enable-scrub=[yes/no] Enable build of xfs_scrub utility [default=yes]],,
9fae859a
ES
93 enable_scrub=yes)
94AC_SUBST(enable_scrub)
95
bff5d1a4
DW
96# Enable libicu for xfs_scrubbing of malicious unicode sequences in names
97AC_ARG_ENABLE(libicu,
09c343eb 98[ --enable-libicu=[yes/no] Enable Unicode name scanning in xfs_scrub (libicu) [default=probe]],,
bff5d1a4
DW
99 enable_libicu=probe)
100
595e27db
CH
101#
102# If the user specified a libdir ending in lib64 do not append another
103# 64 to the library names.
104#
105base_libdir=`basename "$libdir"`
106case $base_libdir in
107lib64)
108 enable_lib64=no
109esac
110
e63257c0
DW
111#
112# If the user specified a multiarch path then disable lib64
113#
114test -n "$multiarch" && enable_lib64=no
115
595e27db
CH
116#
117# Some important tools should be installed into the root partitions.
118#
119# Check whether exec_prefix=/usr: and install them to /sbin in that
15ce5839 120# case. If the user chooses a different prefix assume they just want
595e27db
CH
121# a local install for testing and not a system install.
122#
123case $exec_prefix:$prefix in
124NONE:NONE | NONE:/usr | /usr:*)
125 root_sbindir='/sbin'
595e27db 126 root_libdir="/${base_libdir}"
2ccb8cf0
CH
127 ;;
128*)
129 root_sbindir="${sbindir}"
130 root_libdir="${libdir}"
131 ;;
595e27db
CH
132esac
133
2ccb8cf0
CH
134AC_SUBST([root_sbindir])
135AC_SUBST([root_libdir])
136
d9ee1c4c
AE
137# Find localized files. Don't descend into any "dot directories"
138# (like .git or .pc from quilt). Strangely, the "-print" argument
139# to "find" is required, to avoid including such directories in the
140# list.
8c053393 141LOCALIZED_FILES=""
d9ee1c4c 142for lfile in `find ${srcdir} -path './.??*' -prune -o -name '*.c' -type f -print || exit 1`; do
8c053393
AM
143 LOCALIZED_FILES="$LOCALIZED_FILES \$(TOPDIR)/$lfile"
144done
145AC_SUBST(LOCALIZED_FILES)
146
16c44ed2
NS
147AC_PACKAGE_GLOBALS(xfsprogs)
148AC_PACKAGE_UTILITIES(xfsprogs)
82805b60 149AC_MULTILIB($enable_lib64)
e63257c0 150AC_MULTIARCH($multiarch)
1d43056b 151AC_RT($enable_librt)
93d9f139 152
50949a0f
DC
153AC_PACKAGE_NEED_INI_H
154AC_PACKAGE_NEED_LIBINIH
155
0686de0f 156AC_PACKAGE_NEED_UUID_H
7b9d2be9 157AC_PACKAGE_NEED_UUIDCOMPARE
fc49813f 158
949c0f10
NS
159AC_PACKAGE_NEED_PTHREAD_H
160AC_PACKAGE_NEED_PTHREADMUTEXINIT
161
e4da1b16
DC
162AC_PACKAGE_NEED_URCU_H
163AC_PACKAGE_NEED_RCU_INIT
164
c5deeac9 165AC_HAVE_PWRITEV2
628e112a 166AC_HAVE_COPY_FILE_RANGE
6529e656 167AC_NEED_INTERNAL_FSXATTR
dfe209d8 168AC_NEED_INTERNAL_FSCRYPT_ADD_KEY_ARG
e97caf71 169AC_NEED_INTERNAL_FSCRYPT_POLICY_V2
71956d72 170AC_HAVE_GETFSMAP
dad79683 171AC_HAVE_MAP_SYNC
851c5d11 172AC_HAVE_DEVMAPPER
173a0283 173AC_HAVE_MALLINFO
c74f0468 174AC_HAVE_MALLINFO2
396cd022
DW
175AC_PACKAGE_WANT_ATTRIBUTES_H
176AC_HAVE_LIBATTR
9fae859a
ES
177if test "$enable_scrub" = "yes"; then
178 if test "$enable_libicu" = "yes" || test "$enable_libicu" = "probe"; then
179 AC_HAVE_LIBICU
180 fi
181 if test "$enable_libicu" = "yes" && test "$have_libicu" != "yes"; then
182 AC_MSG_ERROR([libicu not found.])
183 fi
bff5d1a4 184fi
824b5807
DW
185AC_CONFIG_SYSTEMD_SYSTEM_UNIT_DIR
186AC_CONFIG_CROND_DIR
8105f53e 187AC_CONFIG_UDEV_RULE_DIR
6635d6ab 188AC_HAVE_BLKID_TOPO
6635d6ab 189
e99e3d7d
DW
190if test "$enable_ubsan" = "yes" || test "$enable_ubsan" = "probe"; then
191 AC_PACKAGE_CHECK_UBSAN
192fi
193if test "$enable_ubsan" = "yes" && test "$have_ubsan" != "yes"; then
194 AC_MSG_ERROR([UBSAN not supported by compiler.])
195fi
196
de9c45b8
DW
197if test "$enable_addrsan" = "yes" || test "$enable_addrsan" = "probe"; then
198 AC_PACKAGE_CHECK_ADDRSAN
199fi
200if test "$enable_addrsan" = "yes" && test "$have_addrsan" != "yes"; then
201 AC_MSG_ERROR([ADDRSAN not supported by compiler.])
202fi
203
30127fbf
DW
204if test "$enable_threadsan" = "yes" || test "$enable_threadsan" = "probe"; then
205 AC_PACKAGE_CHECK_THREADSAN
206fi
207if test "$enable_threadsan" = "yes" && test "$have_threadsan" != "yes"; then
208 AC_MSG_ERROR([THREADSAN not supported by compiler.])
209fi
210
211if test "$have_threadsan" = "yes" && test "$have_addrsan" = "yes"; then
212 AC_MSG_WARN([ADDRSAN and THREADSAN are not known to work together.])
213fi
214
e61f1552
DW
215if test "$enable_lto" = "yes" || test "$enable_lto" = "probe"; then
216 AC_PACKAGE_CHECK_LTO
217fi
218if test "$enable_lto" = "yes" && test "$have_lto" != "yes"; then
219 AC_MSG_ERROR([LTO not supported by compiler.])
220fi
221
16c44ed2 222AC_MANUAL_FORMAT
7448af58 223AC_HAVE_LIBURCU_ATOMIC64
fc49813f 224
f474cd4f
JE
225AC_CONFIG_FILES([include/builddefs])
226AC_OUTPUT