]>
Commit | Line | Data |
---|---|---|
09ba6420 | 1 | AC_INIT([xfsprogs],[6.7.0],[linux-xfs@vger.kernel.org]) |
1a35c8df | 2 | AC_PREREQ([2.69]) |
07c561fe AG |
3 | AC_CONFIG_AUX_DIR([.]) |
4 | AC_CONFIG_MACRO_DIR([m4]) | |
f474cd4f | 5 | AC_CONFIG_SRCDIR([include/libxfs.h]) |
521902a9 | 6 | AC_PREFIX_DEFAULT(/usr) |
9440d84d | 7 | |
84322551 | 8 | AC_PROG_INSTALL |
69d66277 | 9 | LT_INIT |
07c561fe | 10 | |
e14913c1 | 11 | AC_PROG_CC |
0a71e383 GG |
12 | AC_ARG_VAR(BUILD_CC, [C compiler for build tools]) |
13 | if 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 | |
19 | fi | |
20 | AC_ARG_VAR(BUILD_CFLAGS, [C compiler flags for build tools]) | |
21 | if 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 |
27 | fi |
28 | ||
534b0bfd | 29 | AC_ARG_ENABLE(shared, |
09c343eb | 30 | [ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],, |
d5dca43b NS |
31 | enable_shared=yes) |
32 | AC_SUBST(enable_shared) | |
33 | ||
16c44ed2 | 34 | AC_ARG_ENABLE(gettext, |
09c343eb | 35 | [ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],, |
16c44ed2 NS |
36 | enable_gettext=yes) |
37 | AC_SUBST(enable_gettext) | |
38 | ||
d4b9ebda | 39 | AC_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 |
43 | AC_SUBST(libeditline) |
44 | AC_SUBST(enable_editline) | |
45 | ||
541a1d4f | 46 | AC_ARG_ENABLE(termcap, |
09c343eb | 47 | [ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]], |
541a1d4f NS |
48 | test $enable_termcap = yes && libtermcap="-ltermcap",) |
49 | AC_SUBST(libtermcap) | |
50 | ||
e4da9941 | 51 | |
82805b60 | 52 | AC_ARG_ENABLE(lib64, |
09c343eb | 53 | [ --enable-lib64=[yes/no] Enable lib64 support [default=yes]],, |
595e27db | 54 | enable_lib64=yes) |
82805b60 TS |
55 | AC_SUBST(enable_lib64) |
56 | ||
e63257c0 DW |
57 | AC_ARG_WITH([multiarch], |
58 | [ --with-multiarch=ARCH Specify the multiarch triplet], | |
59 | multiarch=$withval) | |
60 | AC_SUBST(multiarch) | |
61 | ||
1d43056b | 62 | AC_ARG_ENABLE(librt, |
09c343eb | 63 | [ --enable-librt=[yes/no] Enable librt support [default=yes]],, |
1d43056b JT |
64 | enable_librt=yes) |
65 | AC_SUBST(enable_librt) | |
0caa2bae | 66 | |
e99e3d7d DW |
67 | # Enable UBSAN; set enable_ubsan=probe below to enable autoprobe. |
68 | AC_ARG_ENABLE(ubsan, | |
09c343eb | 69 | [ --enable-ubsan=[yes/no] Enable Undefined Behavior Sanitizer (UBSAN) [default=no]],, |
e99e3d7d DW |
70 | enable_ubsan=no) |
71 | AC_SUBST(enable_ubsan) | |
72 | ||
de9c45b8 DW |
73 | # Enable ADDRSAN; set enable_addrsan=probe below to enable autoprobe. |
74 | AC_ARG_ENABLE(addrsan, | |
09c343eb | 75 | [ --enable-addrsan=[yes/no] Enable Address Sanitizer (ADDRSAN) [default=no]],, |
de9c45b8 DW |
76 | enable_addrsan=no) |
77 | AC_SUBST(enable_addrsan) | |
78 | ||
30127fbf DW |
79 | # Enable THREADSAN; set enable_threadsan=probe to enable autoprobe. |
80 | AC_ARG_ENABLE(threadsan, | |
09c343eb | 81 | [ --enable-threadsan=[yes/no] Enable Thread Sanitizer (THREADSAN) [default=no]],, |
30127fbf DW |
82 | enable_threadsan=no) |
83 | AC_SUBST(enable_threadsan) | |
84 | ||
e61f1552 | 85 | AC_ARG_ENABLE(lto, |
09c343eb | 86 | [ --enable-lto=[yes/no] Enable link time optimization (LTO) [default=no]],, |
d18ae0e7 | 87 | enable_lto=no) |
e61f1552 DW |
88 | AC_SUBST(enable_lto) |
89 | ||
9fae859a ES |
90 | # Enable xfs_scrub build |
91 | AC_ARG_ENABLE(scrub, | |
09c343eb | 92 | [ --enable-scrub=[yes/no] Enable build of xfs_scrub utility [default=yes]],, |
9fae859a ES |
93 | enable_scrub=yes) |
94 | AC_SUBST(enable_scrub) | |
95 | ||
bff5d1a4 DW |
96 | # Enable libicu for xfs_scrubbing of malicious unicode sequences in names |
97 | AC_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 | # | |
105 | base_libdir=`basename "$libdir"` | |
106 | case $base_libdir in | |
107 | lib64) | |
108 | enable_lib64=no | |
109 | esac | |
110 | ||
e63257c0 DW |
111 | # |
112 | # If the user specified a multiarch path then disable lib64 | |
113 | # | |
114 | test -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 | # | |
123 | case $exec_prefix:$prefix in | |
124 | NONE: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 |
132 | esac |
133 | ||
2ccb8cf0 CH |
134 | AC_SUBST([root_sbindir]) |
135 | AC_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 | 141 | LOCALIZED_FILES="" |
d9ee1c4c | 142 | for lfile in `find ${srcdir} -path './.??*' -prune -o -name '*.c' -type f -print || exit 1`; do |
8c053393 AM |
143 | LOCALIZED_FILES="$LOCALIZED_FILES \$(TOPDIR)/$lfile" |
144 | done | |
145 | AC_SUBST(LOCALIZED_FILES) | |
146 | ||
16c44ed2 NS |
147 | AC_PACKAGE_GLOBALS(xfsprogs) |
148 | AC_PACKAGE_UTILITIES(xfsprogs) | |
82805b60 | 149 | AC_MULTILIB($enable_lib64) |
e63257c0 | 150 | AC_MULTIARCH($multiarch) |
1d43056b | 151 | AC_RT($enable_librt) |
93d9f139 | 152 | |
50949a0f DC |
153 | AC_PACKAGE_NEED_INI_H |
154 | AC_PACKAGE_NEED_LIBINIH | |
155 | ||
0686de0f | 156 | AC_PACKAGE_NEED_UUID_H |
7b9d2be9 | 157 | AC_PACKAGE_NEED_UUIDCOMPARE |
fc49813f | 158 | |
949c0f10 NS |
159 | AC_PACKAGE_NEED_PTHREAD_H |
160 | AC_PACKAGE_NEED_PTHREADMUTEXINIT | |
161 | ||
e4da1b16 DC |
162 | AC_PACKAGE_NEED_URCU_H |
163 | AC_PACKAGE_NEED_RCU_INIT | |
164 | ||
c5deeac9 | 165 | AC_HAVE_PWRITEV2 |
628e112a | 166 | AC_HAVE_COPY_FILE_RANGE |
6529e656 | 167 | AC_NEED_INTERNAL_FSXATTR |
dfe209d8 | 168 | AC_NEED_INTERNAL_FSCRYPT_ADD_KEY_ARG |
e97caf71 | 169 | AC_NEED_INTERNAL_FSCRYPT_POLICY_V2 |
71956d72 | 170 | AC_HAVE_GETFSMAP |
dad79683 | 171 | AC_HAVE_MAP_SYNC |
851c5d11 | 172 | AC_HAVE_DEVMAPPER |
173a0283 | 173 | AC_HAVE_MALLINFO |
c74f0468 | 174 | AC_HAVE_MALLINFO2 |
396cd022 DW |
175 | AC_PACKAGE_WANT_ATTRIBUTES_H |
176 | AC_HAVE_LIBATTR | |
9fae859a ES |
177 | if 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 | 184 | fi |
824b5807 DW |
185 | AC_CONFIG_SYSTEMD_SYSTEM_UNIT_DIR |
186 | AC_CONFIG_CROND_DIR | |
8105f53e | 187 | AC_CONFIG_UDEV_RULE_DIR |
6635d6ab | 188 | AC_HAVE_BLKID_TOPO |
6635d6ab | 189 | |
e99e3d7d DW |
190 | if test "$enable_ubsan" = "yes" || test "$enable_ubsan" = "probe"; then |
191 | AC_PACKAGE_CHECK_UBSAN | |
192 | fi | |
193 | if test "$enable_ubsan" = "yes" && test "$have_ubsan" != "yes"; then | |
194 | AC_MSG_ERROR([UBSAN not supported by compiler.]) | |
195 | fi | |
196 | ||
de9c45b8 DW |
197 | if test "$enable_addrsan" = "yes" || test "$enable_addrsan" = "probe"; then |
198 | AC_PACKAGE_CHECK_ADDRSAN | |
199 | fi | |
200 | if test "$enable_addrsan" = "yes" && test "$have_addrsan" != "yes"; then | |
201 | AC_MSG_ERROR([ADDRSAN not supported by compiler.]) | |
202 | fi | |
203 | ||
30127fbf DW |
204 | if test "$enable_threadsan" = "yes" || test "$enable_threadsan" = "probe"; then |
205 | AC_PACKAGE_CHECK_THREADSAN | |
206 | fi | |
207 | if test "$enable_threadsan" = "yes" && test "$have_threadsan" != "yes"; then | |
208 | AC_MSG_ERROR([THREADSAN not supported by compiler.]) | |
209 | fi | |
210 | ||
211 | if test "$have_threadsan" = "yes" && test "$have_addrsan" = "yes"; then | |
212 | AC_MSG_WARN([ADDRSAN and THREADSAN are not known to work together.]) | |
213 | fi | |
214 | ||
e61f1552 DW |
215 | if test "$enable_lto" = "yes" || test "$enable_lto" = "probe"; then |
216 | AC_PACKAGE_CHECK_LTO | |
217 | fi | |
218 | if test "$enable_lto" = "yes" && test "$have_lto" != "yes"; then | |
219 | AC_MSG_ERROR([LTO not supported by compiler.]) | |
220 | fi | |
221 | ||
16c44ed2 | 222 | AC_MANUAL_FORMAT |
7448af58 | 223 | AC_HAVE_LIBURCU_ATOMIC64 |
fc49813f | 224 | |
f474cd4f JE |
225 | AC_CONFIG_FILES([include/builddefs]) |
226 | AC_OUTPUT |