]>
Commit | Line | Data |
---|---|---|
27c3aeb2 | 1 | AC_INIT([xfsprogs], [4.16.1], [linux-xfs@vger.kernel.org]) |
86b99f0a | 2 | AC_PREREQ(2.50) |
07c561fe AG |
3 | AC_CONFIG_AUX_DIR([.]) |
4 | AC_CONFIG_MACRO_DIR([m4]) | |
f474cd4f | 5 | AC_CONFIG_SRCDIR([include/libxfs.h]) |
9440d84d | 6 | AC_CONFIG_HEADER(include/platform_defs.h) |
521902a9 | 7 | AC_PREFIX_DEFAULT(/usr) |
9440d84d | 8 | |
84322551 | 9 | AC_PROG_INSTALL |
07c561fe AG |
10 | AC_PROG_LIBTOOL |
11 | ||
e14913c1 | 12 | AC_PROG_CC |
0a71e383 GG |
13 | AC_ARG_VAR(BUILD_CC, [C compiler for build tools]) |
14 | if test "${BUILD_CC+set}" != "set"; then | |
15 | if test $cross_compiling = no; then | |
16 | BUILD_CC="$CC" | |
17 | else | |
18 | AC_CHECK_PROGS(BUILD_CC, gcc cc) | |
19 | fi | |
20 | fi | |
21 | AC_ARG_VAR(BUILD_CFLAGS, [C compiler flags for build tools]) | |
22 | if test "${BUILD_CFLAGS+set}" != "set"; then | |
23 | if test $cross_compiling = no; then | |
24 | BUILD_CFLAGS="$CFLAGS" | |
25 | else | |
26 | BUILD_CFLAGS="-g -O2" | |
27 | fi | |
e14913c1 TT |
28 | fi |
29 | ||
534b0bfd | 30 | AC_ARG_ENABLE(shared, |
dfc13ce1 | 31 | [ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],, |
d5dca43b NS |
32 | enable_shared=yes) |
33 | AC_SUBST(enable_shared) | |
34 | ||
16c44ed2 NS |
35 | AC_ARG_ENABLE(gettext, |
36 | [ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],, | |
37 | enable_gettext=yes) | |
38 | AC_SUBST(enable_gettext) | |
39 | ||
6635d6ab JT |
40 | AC_ARG_ENABLE(blkid, |
41 | [ --enable-blkid=[yes/no] Enable use of block device id library [default=yes]],, | |
42 | enable_blkid=yes) | |
43 | AC_SUBST(enable_blkid) | |
44 | ||
e246ba5f | 45 | AC_ARG_ENABLE(readline, |
16c44ed2 | 46 | [ --enable-readline=[yes/no] Enable readline command editing [default=no]], |
541a1d4f | 47 | test $enable_readline = yes && libreadline="-lreadline", |
e246ba5f | 48 | enable_readline=no) |
e246ba5f NS |
49 | AC_SUBST(libreadline) |
50 | AC_SUBST(enable_readline) | |
51 | ||
d4b9ebda | 52 | AC_ARG_ENABLE(editline, |
16c44ed2 | 53 | [ --enable-editline=[yes/no] Enable editline command editing [default=no]], |
541a1d4f | 54 | test $enable_editline = yes && libeditline="-ledit", |
d4b9ebda | 55 | enable_editline=no) |
d4b9ebda NS |
56 | AC_SUBST(libeditline) |
57 | AC_SUBST(enable_editline) | |
58 | ||
541a1d4f NS |
59 | AC_ARG_ENABLE(termcap, |
60 | [ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]], | |
61 | test $enable_termcap = yes && libtermcap="-ltermcap",) | |
62 | AC_SUBST(libtermcap) | |
63 | ||
e4da9941 | 64 | |
82805b60 | 65 | AC_ARG_ENABLE(lib64, |
595e27db CH |
66 | [ --enable-lib64=[yes/no] Enable lib64 support [default=yes]],, |
67 | enable_lib64=yes) | |
82805b60 TS |
68 | AC_SUBST(enable_lib64) |
69 | ||
1d43056b JT |
70 | AC_ARG_ENABLE(librt, |
71 | [ --enable-librt=[yes/no] Enable librt support [default=yes]],, | |
72 | enable_librt=yes) | |
73 | AC_SUBST(enable_librt) | |
0caa2bae | 74 | |
e99e3d7d DW |
75 | # Enable UBSAN; set enable_ubsan=probe below to enable autoprobe. |
76 | AC_ARG_ENABLE(ubsan, | |
77 | [ --enable-ubsan=[yes/no] Enable Undefined Behavior Sanitizer (UBSAN) [default=no]],, | |
78 | enable_ubsan=no) | |
79 | AC_SUBST(enable_ubsan) | |
80 | ||
de9c45b8 DW |
81 | # Enable ADDRSAN; set enable_addrsan=probe below to enable autoprobe. |
82 | AC_ARG_ENABLE(addrsan, | |
83 | [ --enable-addrsan=[yes/no] Enable Address Sanitizer (ADDRSAN) [default=no]],, | |
84 | enable_addrsan=no) | |
85 | AC_SUBST(enable_addrsan) | |
86 | ||
30127fbf DW |
87 | # Enable THREADSAN; set enable_threadsan=probe to enable autoprobe. |
88 | AC_ARG_ENABLE(threadsan, | |
89 | [ --enable-threadsan=[yes/no] Enable Thread Sanitizer (THREADSAN) [default=no]],, | |
90 | enable_threadsan=no) | |
91 | AC_SUBST(enable_threadsan) | |
92 | ||
e61f1552 DW |
93 | AC_ARG_ENABLE(lto, |
94 | [ --enable-lto=[yes/no] Enable link time optimization (LTO) [default=probe]],, | |
95 | enable_lto=probe) | |
96 | AC_SUBST(enable_lto) | |
97 | ||
bff5d1a4 DW |
98 | # Enable libicu for xfs_scrubbing of malicious unicode sequences in names |
99 | AC_ARG_ENABLE(libicu, | |
100 | [ --enable-libicu=[yes/no] Enable Unicode name scanning (libicu) [default=probe]],, | |
101 | enable_libicu=probe) | |
102 | ||
595e27db CH |
103 | # |
104 | # If the user specified a libdir ending in lib64 do not append another | |
105 | # 64 to the library names. | |
106 | # | |
107 | base_libdir=`basename "$libdir"` | |
108 | case $base_libdir in | |
109 | lib64) | |
110 | enable_lib64=no | |
111 | esac | |
112 | ||
113 | # | |
114 | # Some important tools should be installed into the root partitions. | |
115 | # | |
116 | # Check whether exec_prefix=/usr: and install them to /sbin in that | |
117 | # case. If the user choses a different prefix assume he just wants | |
118 | # a local install for testing and not a system install. | |
119 | # | |
120 | case $exec_prefix:$prefix in | |
121 | NONE:NONE | NONE:/usr | /usr:*) | |
122 | root_sbindir='/sbin' | |
595e27db | 123 | root_libdir="/${base_libdir}" |
2ccb8cf0 CH |
124 | ;; |
125 | *) | |
126 | root_sbindir="${sbindir}" | |
127 | root_libdir="${libdir}" | |
128 | ;; | |
595e27db CH |
129 | esac |
130 | ||
2ccb8cf0 CH |
131 | AC_SUBST([root_sbindir]) |
132 | AC_SUBST([root_libdir]) | |
133 | ||
d9ee1c4c AE |
134 | # Find localized files. Don't descend into any "dot directories" |
135 | # (like .git or .pc from quilt). Strangely, the "-print" argument | |
136 | # to "find" is required, to avoid including such directories in the | |
137 | # list. | |
8c053393 | 138 | LOCALIZED_FILES="" |
d9ee1c4c | 139 | for lfile in `find ${srcdir} -path './.??*' -prune -o -name '*.c' -type f -print || exit 1`; do |
8c053393 AM |
140 | LOCALIZED_FILES="$LOCALIZED_FILES \$(TOPDIR)/$lfile" |
141 | done | |
142 | AC_SUBST(LOCALIZED_FILES) | |
143 | ||
16c44ed2 NS |
144 | AC_PACKAGE_GLOBALS(xfsprogs) |
145 | AC_PACKAGE_UTILITIES(xfsprogs) | |
82805b60 | 146 | AC_MULTILIB($enable_lib64) |
1d43056b | 147 | AC_RT($enable_librt) |
93d9f139 | 148 | |
0686de0f | 149 | AC_PACKAGE_NEED_UUID_H |
7b9d2be9 | 150 | AC_PACKAGE_NEED_UUIDCOMPARE |
fc49813f | 151 | |
949c0f10 NS |
152 | AC_PACKAGE_NEED_PTHREAD_H |
153 | AC_PACKAGE_NEED_PTHREADMUTEXINIT | |
154 | ||
0bba1a49 NS |
155 | AC_HAVE_FADVISE |
156 | AC_HAVE_MADVISE | |
157 | AC_HAVE_MINCORE | |
158 | AC_HAVE_SENDFILE | |
cfe6e3f0 NS |
159 | AC_HAVE_GETMNTENT |
160 | AC_HAVE_GETMNTINFO | |
c0b5232a | 161 | AC_HAVE_FALLOCATE |
8f0e0912 | 162 | AC_HAVE_FIEMAP |
c5deeac9 | 163 | AC_HAVE_PWRITEV2 |
197d5828 | 164 | AC_HAVE_PREADV |
628e112a | 165 | AC_HAVE_COPY_FILE_RANGE |
197d5828 | 166 | AC_HAVE_SYNC_FILE_RANGE |
eb24bcff | 167 | AC_HAVE_SYNCFS |
5ae294ea | 168 | AC_HAVE_MNTENT |
5121281b | 169 | AC_HAVE_FLS |
3bc05641 | 170 | AC_HAVE_READDIR |
c14c7b79 | 171 | AC_HAVE_FSETXATTR |
a49984b3 | 172 | AC_HAVE_MREMAP |
6529e656 | 173 | AC_NEED_INTERNAL_FSXATTR |
71956d72 | 174 | AC_HAVE_GETFSMAP |
ce9adab0 | 175 | AC_HAVE_STATFS_FLAGS |
dad79683 | 176 | AC_HAVE_MAP_SYNC |
851c5d11 | 177 | AC_HAVE_DEVMAPPER |
173a0283 | 178 | AC_HAVE_MALLINFO |
396cd022 DW |
179 | AC_PACKAGE_WANT_ATTRIBUTES_H |
180 | AC_HAVE_LIBATTR | |
bff5d1a4 DW |
181 | if test "$enable_libicu" = "yes" || test "$enable_libicu" = "probe"; then |
182 | AC_HAVE_LIBICU | |
183 | fi | |
184 | if test "$enable_libicu" = "yes" && test "$have_libicu" != "yes"; then | |
185 | AC_MSG_ERROR([libicu not found.]) | |
186 | fi | |
b364a9c0 DW |
187 | AC_HAVE_OPENAT |
188 | AC_HAVE_FSTATAT | |
03c0cd8f DW |
189 | AC_HAVE_SG_IO |
190 | AC_HAVE_HDIO_GETGEO | |
824b5807 DW |
191 | AC_CONFIG_SYSTEMD_SYSTEM_UNIT_DIR |
192 | AC_CONFIG_CROND_DIR | |
0bba1a49 | 193 | |
6635d6ab JT |
194 | if test "$enable_blkid" = yes; then |
195 | AC_HAVE_BLKID_TOPO | |
196 | fi | |
197 | ||
e99e3d7d DW |
198 | if test "$enable_ubsan" = "yes" || test "$enable_ubsan" = "probe"; then |
199 | AC_PACKAGE_CHECK_UBSAN | |
200 | fi | |
201 | if test "$enable_ubsan" = "yes" && test "$have_ubsan" != "yes"; then | |
202 | AC_MSG_ERROR([UBSAN not supported by compiler.]) | |
203 | fi | |
204 | ||
de9c45b8 DW |
205 | if test "$enable_addrsan" = "yes" || test "$enable_addrsan" = "probe"; then |
206 | AC_PACKAGE_CHECK_ADDRSAN | |
207 | fi | |
208 | if test "$enable_addrsan" = "yes" && test "$have_addrsan" != "yes"; then | |
209 | AC_MSG_ERROR([ADDRSAN not supported by compiler.]) | |
210 | fi | |
211 | ||
30127fbf DW |
212 | if test "$enable_threadsan" = "yes" || test "$enable_threadsan" = "probe"; then |
213 | AC_PACKAGE_CHECK_THREADSAN | |
214 | fi | |
215 | if test "$enable_threadsan" = "yes" && test "$have_threadsan" != "yes"; then | |
216 | AC_MSG_ERROR([THREADSAN not supported by compiler.]) | |
217 | fi | |
218 | ||
219 | if test "$have_threadsan" = "yes" && test "$have_addrsan" = "yes"; then | |
220 | AC_MSG_WARN([ADDRSAN and THREADSAN are not known to work together.]) | |
221 | fi | |
222 | ||
e61f1552 DW |
223 | if test "$enable_lto" = "yes" || test "$enable_lto" = "probe"; then |
224 | AC_PACKAGE_CHECK_LTO | |
225 | fi | |
226 | if test "$enable_lto" = "yes" && test "$have_lto" != "yes"; then | |
227 | AC_MSG_ERROR([LTO not supported by compiler.]) | |
228 | fi | |
229 | ||
1b0adc71 | 230 | AC_PACKAGE_CHECK_RETPOLINE |
865f1075 JE |
231 | AC_CHECK_SIZEOF([long]) |
232 | AC_CHECK_SIZEOF([char *]) | |
cd960ece | 233 | AC_TYPE_UMODE_T |
16c44ed2 | 234 | AC_MANUAL_FORMAT |
fc49813f | 235 | |
f474cd4f JE |
236 | AC_CONFIG_FILES([include/builddefs]) |
237 | AC_OUTPUT |