Whamcloud - gitweb
4b52570aecc112a31f8ab36eca6e0a0c586d2e4b
[fs/lustre-release.git] / config / lustre-build-ldiskfs.m4
1 #
2 # LDISKFS_LINUX_SERIES
3 #
4 AC_DEFUN([LDISKFS_LINUX_SERIES], [
5 AC_MSG_CHECKING([which ldiskfs series to use])
6 case x$LDISKFS_SERIES in
7         x)                      # not set
8                 ;;
9         *.series)               # set externally
10                 ;;
11         *) LDISKFS_SERIES=
12 esac
13 AS_IF([test -z "$LDISKFS_SERIES"], [
14 AS_IF([test x$RHEL_KERNEL = xyes], [
15         case $RHEL_RELEASE_NO in
16         81)     LDISKFS_SERIES="4.18-rhel8.1.series"    ;;
17         80)     LDISKFS_SERIES="4.18-rhel8.series"      ;;
18         78)     LDISKFS_SERIES="3.10-rhel7.8.series"    ;;
19         77)     LDISKFS_SERIES="3.10-rhel7.7.series"    ;;
20         76)     LDISKFS_SERIES="3.10-rhel7.6.series"    ;;
21         esac
22 ], [test x$SUSE_KERNEL = xyes], [
23         AS_VERSION_COMPARE([$LINUXRELEASE],[5.3.18],[
24         AS_VERSION_COMPARE([$LINUXRELEASE],[4.12.14],[
25         AS_VERSION_COMPARE([$LINUXRELEASE],[4.4.82],[
26         AS_VERSION_COMPARE([$LINUXRELEASE],[4.4.0],[
27         AS_VERSION_COMPARE([$LINUXRELEASE],[3.12.0],[],
28         [LDISKFS_SERIES="3.12-sles12.series"],[
29                 PLEV=$(grep PATCHLEVEL /etc/SuSE-release | sed -e 's/.*= *//')
30                 case $PLEV in
31                 1) LDISKFS_SERIES="3.12-sles12sp1.series"
32                         ;;
33                 *) LDISKFS_SERIES="3.12-sles12.series"
34                         ;;
35                 esac
36         ])],[LDISKFS_SERIES="4.4-sles12sp2.series"],
37             [LDISKFS_SERIES="4.4-sles12sp2.series"]
38         )], [LDISKFS_SERIES="4.4-sles12sp3.series"],
39             [LDISKFS_SERIES="4.4-sles12sp3.series"]
40         )], [LDISKFS_SERIES="4.12-sles15.series"],
41             [LDISKFS_SERIES="4.12-sles15.series"]
42         )], [LDISKFS_SERIES="5.4.0-ml.series"],
43             [LDISKFS_SERIES="5.4.0-ml.series"])
44 ], [test x$UBUNTU_KERNEL = xyes], [
45         AS_VERSION_COMPARE([$LINUXRELEASE],[5.3.0],[
46         AS_VERSION_COMPARE([$LINUXRELEASE],[5.0.0],[
47         AS_VERSION_COMPARE([$LINUXRELEASE],[4.15.0],[
48         AS_VERSION_COMPARE([$LINUXRELEASE],[4.4.0], [],
49         [
50                 KPLEV=$(echo $LINUXRELEASE | sed -n 's/.*-\([0-9]\+\).*/\1/p')
51                 AS_IF(
52                         [test -z "$KPLEV"], [
53                                 AC_MSG_WARN([Failed to determine Kernel patch level. Assume latest.])
54                                 LDISKFS_SERIES="4.4.0-73-ubuntu14+16.series"
55                         ],
56                         [test $KPLEV -ge 73], [LDISKFS_SERIES="4.4.0-73-ubuntu14+16.series"],
57                         [test $KPLEV -ge 62], [LDISKFS_SERIES="4.4.0-62-ubuntu14+16.series"],
58                         [test $KPLEV -ge 49], [LDISKFS_SERIES="4.4.0-49-ubuntu14+16.series"],
59                         [LDISKFS_SERIES="4.4.0-45-ubuntu14+16.series"]
60                 )
61         ],
62         [LDISKFS_SERIES="4.4.0-73-ubuntu14+16.series"])],
63         [
64                 KPLEV=$(echo $LINUXRELEASE | sed -n 's/.*-\([0-9]\+\).*/\1/p')
65                 AS_IF(
66                         [test -z "$KPLEV"], [
67                                 AC_MSG_WARN([Failed to determine Kernel patch level. Assume latest.])
68                                 LDISKFS_SERIES="4.15.0-24-ubuntu18.series"
69                         ],
70                         [test $KPLEV -ge 24], [LDISKFS_SERIES="4.15.0-24-ubuntu18.series"],
71                         [test $KPLEV -ge 20], [LDISKFS_SERIES="4.15.0-20-ubuntu18.series"]
72                 )
73         ],
74         [LDISKFS_SERIES="4.15.0-24-ubuntu18.series"])],
75         [LDISKFS_SERIES="5.0.0-13-ubuntu19.series"],
76         [LDISKFS_SERIES="5.0.0-13-ubuntu19.series"])],
77         [LDISKFS_SERIES="5.4.0-ml.series"],
78         [LDISKFS_SERIES="5.4.0-ml.series"])
79 ])
80 ])
81 # Not RHEL/SLES or Ubuntu .. probably mainline
82 AS_IF([test -z "$LDISKFS_SERIES"],
83         [
84         AS_VERSION_COMPARE([$LINUXRELEASE],[5.4.0],[],
85         [LDISKFS_SERIES="5.4.0-ml.series"],[
86         AS_VERSION_COMPARE([$LINUXRELEASE],[5.4.0],
87                 [LDISKFS_SERIES="5.4.0-ml.series"], # lt
88                 [LDISKFS_SERIES="5.4.0-ml.series"], # eq
89                 [LDISKFS_SERIES="5.4.0-ml.series"]  # gt
90                 )])
91         ],
92 [])
93 AS_IF([test -z "$LDISKFS_SERIES"],
94         [AC_MSG_RESULT([failed to identify series])],
95         [AC_MSG_RESULT([$LDISKFS_SERIES for $LINUXRELEASE])])
96 AC_SUBST(LDISKFS_SERIES)
97 ]) # LDISKFS_LINUX_SERIES
98
99 #
100 # LB_EXT_FREE_BLOCKS_WITH_BUFFER_HEAD
101 #
102 # 2.6.32-rc7 ext4_free_blocks requires struct buffer_head
103 # Note that RHEL6 is pre 2.6.32-rc7 so this check is still needed.
104 #
105 AC_DEFUN([LB_EXT_FREE_BLOCKS_WITH_BUFFER_HEAD], [
106 LB_CHECK_COMPILE([if 'ext4_free_blocks' needs 'struct buffer_head'],
107 ext4_free_blocks_with_buffer_head, [
108         #include <linux/fs.h>
109         #include "$EXT4_SRC_DIR/ext4.h"
110 ],[
111         ext4_free_blocks(NULL, NULL, NULL, 0, 0, 0);
112 ],[
113         AC_DEFINE(HAVE_EXT_FREE_BLOCK_WITH_BUFFER_HEAD, 1,
114                 [ext4_free_blocks do not require struct buffer_head])
115 ])
116 ]) # LB_EXT_FREE_BLOCKS_WITH_BUFFER_HEAD
117
118 #
119 # LB_EXT4_JOURNAL_START_3ARGS
120 #
121 # 3.9 added a type argument to ext4_journal_start and friends
122 #
123 AC_DEFUN([LB_EXT4_JOURNAL_START_3ARGS], [
124 LB_CHECK_COMPILE([if ext4_journal_start takes 3 arguments],
125 ext4_journal_start, [
126         #include <linux/fs.h>
127         #include "$EXT4_SRC_DIR/ext4_jbd2.h"
128 ],[
129         ext4_journal_start(NULL, 0, 0);
130 ],[
131         AC_DEFINE(JOURNAL_START_HAS_3ARGS, 1, [ext4_journal_start takes 3 arguments])
132 ])
133 ]) # LB_EXT4_JOURNAL_START_3ARGS
134
135 #
136 # LB_EXT4_BREAD_4ARGS
137 #
138 # 3.18 ext4_bread has 4 arguments
139 # NOTE: It may not be exported for modules, use a positive compiler test here.
140 #
141 AC_DEFUN([LB_EXT4_BREAD_4ARGS], [
142 LB_CHECK_COMPILE([if ext4_bread takes 4 arguments],
143 ext4_bread, [
144         #include <linux/fs.h>
145         #include "$EXT4_SRC_DIR/ext4.h"
146
147         struct buffer_head *ext4_bread(handle_t *handle, struct inode *inode,
148                                        ext4_lblk_t block, int map_flags)
149         {
150                 struct buffer_head *bh = NULL;
151                 (void)handle;
152                 (void)inode;
153                 (void)block;
154                 (void)map_flags;
155                 return bh;
156         }
157 ],[
158         ext4_bread(NULL, NULL, 0, 0);
159 ],[
160         AC_DEFINE(HAVE_EXT4_BREAD_4ARGS, 1, [ext4_bread takes 4 arguments])
161 ])
162 ]) # LB_EXT4_BREAD_4ARGS
163
164 #
165 # LB_EXT4_HAVE_INFO_DQUOT
166 #
167 # in linux 4.4 i_dqout is in ext4_inode_info, not in struct inode
168 #
169 AC_DEFUN([LB_EXT4_HAVE_INFO_DQUOT], [
170 LB_CHECK_COMPILE([if i_dquot is in ext4_inode_info],
171 ext4_info_dquot, [
172         #include <linux/fs.h>
173         #include <linux/quota.h>
174         #include "$EXT4_SRC_DIR/ext4.h"
175 ],[
176         struct ext4_inode_info in;
177         struct dquot *dq;
178
179         dq = in.i_dquot[0];
180 ],[
181         AC_DEFINE(HAVE_EXT4_INFO_DQUOT, 1, [i_dquot is in ext4_inode_info])
182 ])
183 ]) # LB_EXT4_HAVE_INFO_DQUOT
184
185 #
186 # LB_EXT4_HAVE_I_CRYPT_INFO
187 #
188 # in linux 4.8 i_crypt_info moved from ext4_inode_info to struct inode
189 #
190 # Determine if we need to enable CONFIG_LDISKFS_FS_ENCRYPTION.
191 # If we have i_crypt_info in ext4_inode_info, the config option
192 # should be enabled to make the ldiskfs module compilation happy.
193 # Otherwise i_crypy_info is in struct inode, we need to check kernel
194 # config option to determine that.
195 #
196 AC_DEFUN([LB_EXT4_HAVE_I_CRYPT_INFO], [
197 LB_CHECK_COMPILE([if i_crypt_info is in ext4_inode_info],
198 ext4_i_crypt_info, [
199         #define CONFIG_EXT4_FS_ENCRYPTION 1
200         #include <linux/fs.h>
201         #include "$EXT4_SRC_DIR/ext4.h"
202 ],[
203         struct ext4_inode_info in;
204
205         in.i_crypt_info = NULL;
206 ],[
207         AC_DEFINE(
208                 CONFIG_LDISKFS_FS_ENCRYPTION, 1,
209                 [enable encryption for ldiskfs]
210         )
211 ],[
212         LB_CHECK_CONFIG([EXT4_FS_ENCRYPTION],[
213                 AC_DEFINE(
214                         CONFIG_LDISKFS_FS_ENCRYPTION, 1,
215                         [enable encryption for ldiskfs]
216                 )
217         ])
218 ])
219 ]) # LB_EXT4_HAVE_I_CRYPT_INFO
220
221 #
222 # LB_LDISKFS_IGET_HAS_FLAGS_ARG
223 #
224 # kernel 4.19 commit 8a363970d1dc38c4ec4ad575c862f776f468d057
225 # ext4_iget changed to a macro with 3 args was function with 2 args
226 #
227 AC_DEFUN([LB_LDISKFS_IGET_HAS_FLAGS_ARG], [
228 tmp_flags="$EXTRA_KCFLAGS"
229 EXTRA_KCFLAGS="-Werror"
230 LB_CHECK_COMPILE([if ldiskfs_iget takes a flags argument],
231 ext4_iget_3args, [
232         #include <linux/fs.h>
233         #include "$EXT4_SRC_DIR/ext4.h"
234 ],[
235         int f = EXT4_IGET_SPECIAL;
236         (void)f;
237 ],[
238         AC_DEFINE(HAVE_LDISKFS_IGET_WITH_FLAGS, 1,
239                 [if ldiskfs_iget takes a flags argument])
240 ])
241 EXTRA_KCFLAGS="$tmp_flags"
242 ]) # LB_LDISKFS_IGET_HAS_FLAGS_ARG
243
244 #
245 # LDISKFS_AC_PATCH_PROGRAM
246 #
247 # Determine which program should be used to apply the patches to
248 # the ext4 source code to produce the ldiskfs source code.
249 #
250 AC_DEFUN([LDISKFS_AC_PATCH_PROGRAM], [
251         AC_ARG_ENABLE([quilt],
252                 [AC_HELP_STRING([--disable-quilt],
253                         [disable use of quilt for ldiskfs])],
254                 [AS_IF([test "x$enableval" = xno],
255                         [use_quilt=no],
256                         [use_quilt=maybe])],
257                 [use_quilt=maybe]
258         )
259
260         AS_IF([test x$use_quilt = xmaybe], [
261                 AC_PATH_PROG([quilt_avail], [quilt], [no])
262                 AS_IF([test x$quilt_avail = xno], [
263                         use_quilt=no
264                 ], [
265                         use_quilt=yes
266                 ])
267         ])
268
269         AS_IF([test x$use_quilt = xno], [
270                 AC_PATH_PROG([patch_avail], [patch], [no])
271                 AS_IF([test x$patch_avail = xno], [
272                         AC_MSG_ERROR([*** Need "quilt" or "patch" command])
273                 ])
274         ])
275 ]) # LDISKFS_AC_PATCH_PROGRAM
276
277 #
278 # LB_LDISKFS_FIND_ENTRY_LOCKED_EXISTS
279 #
280 # kernel 5.2 commit 8a363970d1dc38c4ec4ad575c862f776f468d057
281 # ext4: avoid declaring fs inconsistent due to invalid file handles
282 # __ext4_find_entry became a helper function for ext4_find_entry
283 # conflicting with previous ldiskfs patches.
284 # ldiskfs patches map ext4_find_entry to ldiskfs_find_entry_locked to
285 # avoid conflicting with __ext4_find_entry
286 #
287 # When the following check succeeds __ext4_find_entry helper is not
288 # used.
289 #
290 AC_DEFUN([LB_LDISKFS_FIND_ENTRY_LOCKED_EXISTS], [
291 tmp_flags="$EXTRA_KCFLAGS"
292 EXTRA_KCFLAGS="-Werror"
293 LB_CHECK_COMPILE([if __ldiskfs_find_entry is available],
294 ldiskfs_find_entry_locked, [
295         #include <linux/fs.h>
296         #include "$EXT4_SRC_DIR/ext4.h"
297         #include "$EXT4_SRC_DIR/namei.c"
298
299         static int __ext4_find_entry(void) { return 0; }
300 ],[
301         int x = __ext4_find_entry();
302         (void)x;
303 ],[
304         AC_DEFINE(HAVE___LDISKFS_FIND_ENTRY, 1,
305                 [if __ldiskfs_find_entry is available])
306 ])
307 EXTRA_KCFLAGS="$tmp_flags"
308 ]) # LB_LDISKFS_FIND_ENTRY_LOCKED_EXISTS
309
310 #
311 # LB_LDISKFSFS_DIRHASH_WANTS_DIR
312 #
313 # kernel 5.2 commit 8a363970d1dc38c4ec4ad575c862f776f468d057
314 # ext4fs_dirhash UNICODE support
315 #
316 AC_DEFUN([LB_LDISKFSFS_DIRHASH_WANTS_DIR], [
317 tmp_flags="$EXTRA_KCFLAGS"
318 EXTRA_KCFLAGS="-Werror"
319 LB_CHECK_COMPILE([if ldiskfsfs_dirhash takes an inode argument],
320 ext4fs_dirhash, [
321         #include <linux/fs.h>
322         #include "$EXT4_SRC_DIR/ext4.h"
323
324         int ext4fs_dirhash(const struct inode *dir, const char *name, int len,
325                           struct dx_hash_info *hinfo)
326         {
327                 (void)dir;
328                 (void)name;
329                 (void)len;
330                 (void)hinfo;
331                 return 0;
332         }
333 ],[
334         int f = ext4fs_dirhash(NULL, NULL, 0, NULL);
335         (void)f;
336 ],[
337         AC_DEFINE(HAVE_LDISKFSFS_GETHASH_INODE_ARG, 1,
338                 [if ldiskfsfs_dirhash takes an inode argument])
339 ])
340 EXTRA_KCFLAGS="$tmp_flags"
341 ]) # LB_LDISKFSFS_DIRHASH_WANTS_DIR
342
343 #
344 # LB_CONFIG_LDISKFS
345 #
346 AC_DEFUN([LB_CONFIG_LDISKFS], [
347 # --with-ldiskfs is deprecated now that ldiskfs is fully merged with lustre.
348 # However we continue to support this option through Lustre 2.5.
349 AC_ARG_WITH([ldiskfs],
350         [],
351         [AC_MSG_WARN([--with-ldiskfs is deprecated, please use --enable-ldiskfs])
352         AS_IF([test x$withval != xyes -a x$withval != xno],
353                 [AC_MSG_ERROR([
354
355 The ldiskfs option is deprecated,
356 and no longer supports paths to external ldiskfs source
357 ])])
358 ])
359
360 AC_ARG_ENABLE([ldiskfs],
361         [AS_HELP_STRING([--disable-ldiskfs],
362                 [disable ldiskfs osd (default is enable)])],
363         [AS_IF([test x$enable_ldiskfs != xyes -a x$enable_ldiskfs != xno],
364                 [AC_MSG_ERROR([ldiskfs valid options are "yes" or "no"])])],
365         [AS_IF([test "${with_ldiskfs+set}" = set],
366                 [enable_ldiskfs=$with_ldiskfs],
367                 [enable_ldiskfs=maybe])
368 ])
369
370 AS_IF([test x$enable_server = xno],
371         [AS_CASE([$enable_ldiskfs],
372                 [maybe], [enable_ldiskfs=no],
373                 [yes], [AC_MSG_ERROR([cannot build ldiskfs when servers are disabled])]
374         )])
375
376 AS_IF([test x$enable_ldiskfs != xno],[
377         # In the future, we chould change enable_ldiskfs from maybe to
378         # either yes or no based on additional tests, e.g.  whether a patch
379         # set is available for the detected kernel.  For now, we just always
380         # set it to "yes".
381         AS_IF([test x$enable_ldiskfs = xmaybe], [enable_ldiskfs=yes])
382         AC_SUBST(ENABLE_LDISKFS, yes)
383
384         LDISKFS_LINUX_SERIES
385         LDISKFS_AC_PATCH_PROGRAM
386         LB_EXT_FREE_BLOCKS_WITH_BUFFER_HEAD
387         LB_EXT4_JOURNAL_START_3ARGS
388         LB_EXT4_BREAD_4ARGS
389         LB_EXT4_HAVE_INFO_DQUOT
390         LB_EXT4_HAVE_I_CRYPT_INFO
391         LB_LDISKFS_IGET_HAS_FLAGS_ARG
392         LB_LDISKFS_FIND_ENTRY_LOCKED_EXISTS
393         LB_LDISKFSFS_DIRHASH_WANTS_DIR
394         AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [posix acls for ldiskfs])
395         AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [fs security for ldiskfs])
396         AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [extened attributes for ldiskfs])
397         AC_DEFINE(CONFIG_LDISKFS_FS_RW, 1, [enable rw access for ldiskfs])
398         AC_SUBST(LDISKFS_SUBDIR, ldiskfs)
399         AC_DEFINE(HAVE_LDISKFS_OSD, 1, Enable ldiskfs osd)
400 ], [
401         AC_SUBST(ENABLE_LDISKFS, no)
402 ])
403
404 AC_MSG_CHECKING([whether to build ldiskfs])
405 AC_MSG_RESULT([$enable_ldiskfs])
406
407 AM_CONDITIONAL([LDISKFS_ENABLED], [test x$enable_ldiskfs = xyes])
408 ]) # LB_CONFIG_LDISKFS
409
410 #
411 # LB_VALIDATE_EXT4_SRC_DIR
412 #
413 # Spot check the existence of several source files common to ext4.
414 # Detecting this at configure time allows us to avoid a potential build
415 # failure and provide a useful error message to explain what is wrong.
416 #
417 AC_DEFUN([LB_VALIDATE_EXT4_SRC_DIR], [
418 enable_ldiskfs_build="no"
419 AS_IF([test -n "$EXT4_SRC_DIR"], [
420         enable_ldiskfs_build="yes"
421         LB_CHECK_FILE([$EXT4_SRC_DIR/dir.c], [], [
422                 enable_ldiskfs_build="no"
423                 AC_MSG_WARN([ext4 must exist for ldiskfs build])
424         ])
425         LB_CHECK_FILE([$EXT4_SRC_DIR/file.c], [], [
426                 enable_ldiskfs_build="no"
427                 AC_MSG_WARN([ext4 must exist for ldiskfs build])
428         ])
429         LB_CHECK_FILE([$EXT4_SRC_DIR/inode.c], [], [
430                 enable_ldiskfs_build="no"
431                 AC_MSG_WARN([ext4 must exist for ldiskfs build])
432         ])
433         LB_CHECK_FILE([$EXT4_SRC_DIR/super.c], [], [
434                 enable_ldiskfs_build="no"
435                 AC_MSG_WARN([ext4 must exist for ldiskfs build])
436         ])
437 ])
438
439 AS_IF([test "x$enable_ldiskfs_build" = xno], [
440         enable_ldiskfs="no"
441
442         AC_MSG_WARN([
443
444 Disabling ldiskfs support because complete ext4 source does not exist.
445
446 If you are building using kernel-devel packages and require ldiskfs
447 server support then ensure that the matching kernel-debuginfo-common
448 and kernel-debuginfo-common-<arch> packages are installed.
449 ])
450 ])
451 ]) # LB_VALIDATE_EXT4_SRC_DIR
452
453 #
454 # LB_EXT4_SRC_DIR
455 #
456 # Determine the location of the ext4 source code.  It it required
457 # for several configure tests and to build ldiskfs.
458 #
459 AC_DEFUN([LB_EXT4_SRC_DIR], [
460 AC_MSG_CHECKING([ext4 source directory])
461 # Kernel ext source located with devel headers
462 linux_src=$LINUX
463 AS_IF([test -e "$linux_src/fs/ext4/super.c"], [
464         EXT4_SRC_DIR="$linux_src/fs/ext4"
465 ], [
466         # Kernel ext source provided by kernel-debuginfo-common package
467         # that extracted to $LINUX
468         linux_src=$(ls -1d $linux_src/../../debug/*/linux-${LINUXRELEASE%.*}* \
469                 2>/dev/null | tail -1)
470         AS_IF([test -e "$linux_src/fs/ext4/super.c"], [
471                 EXT4_SRC_DIR="$linux_src/fs/ext4"
472         ], [
473                 # Kernel ext source provided by kernel-debuginfo-common package
474                 linux_src=$(ls -1d /usr/src/debug/*/linux-${LINUXRELEASE%.*}* \
475                         2>/dev/null | tail -1)
476                 AS_IF([test -e "$linux_src/fs/ext4/super.c"], [
477                         EXT4_SRC_DIR="$linux_src/fs/ext4"
478                 ], [
479                         EXT4_SRC_DIR=""
480                 ])
481         ])
482 ])
483 AC_MSG_RESULT([$EXT4_SRC_DIR])
484 AC_SUBST(EXT4_SRC_DIR)
485
486 LB_VALIDATE_EXT4_SRC_DIR
487 ]) # LB_EXT4_SRC_DIR
488
489 #
490 # LB_DEFINE_E2FSPROGS_NAMES
491 #
492 # Enable the use of alternate naming of ldiskfs-enabled e2fsprogs package.
493 #
494 AC_DEFUN([LB_DEFINE_E2FSPROGS_NAMES], [
495 AC_MSG_CHECKING([whether to use alternate names for e2fsprogs])
496 AC_ARG_WITH([ldiskfsprogs],
497         AC_HELP_STRING([--with-ldiskfsprogs],
498                 [use alternate names for ldiskfs-enabled e2fsprogs]),
499         [], [withval="no"])
500
501 AS_IF([test "x$withval" = xyes], [
502         AC_MSG_RESULT([enabled])
503         AC_DEFINE(HAVE_LDISKFSPROGS, 1, [enable use of ldiskfsprogs package])
504         E2FSPROGS="ldiskfsprogs"
505         MKE2FS="mkfs.ldiskfs"
506         DEBUGFS="debugfs.ldiskfs"
507         TUNE2FS="tunefs.ldiskfs"
508         E2LABEL="label.ldiskfs"
509         DUMPE2FS="dumpfs.ldiskfs"
510         E2FSCK="fsck.ldiskfs"
511         PFSCK="pfsck.ldiskfs"
512 ], [
513         AC_MSG_RESULT([disabled])
514         E2FSPROGS="e2fsprogs"
515         MKE2FS="mke2fs"
516         DEBUGFS="debugfs"
517         TUNE2FS="tune2fs"
518         E2LABEL="e2label"
519         DUMPE2FS="dumpe2fs"
520         E2FSCK="e2fsck"
521         PFSCK="fsck"
522 ])
523
524 AC_DEFINE_UNQUOTED(E2FSPROGS, "$E2FSPROGS", [name of ldiskfs e2fsprogs package])
525 AC_DEFINE_UNQUOTED(MKE2FS, "$MKE2FS", [name of ldiskfs mkfs program])
526 AC_DEFINE_UNQUOTED(DEBUGFS, "$DEBUGFS", [name of ldiskfs debug program])
527 AC_DEFINE_UNQUOTED(TUNE2FS, "$TUNE2FS", [name of ldiskfs tune program])
528 AC_DEFINE_UNQUOTED(E2LABEL, "$E2LABEL", [name of ldiskfs label program])
529 AC_DEFINE_UNQUOTED(DUMPE2FS,"$DUMPE2FS", [name of ldiskfs dump program])
530 AC_DEFINE_UNQUOTED(E2FSCK, "$E2FSCK", [name of ldiskfs fsck program])
531 AC_DEFINE_UNQUOTED(PFSCK, "$PFSCK", [name of parallel fsck program])
532
533 AC_SUBST([E2FSPROGS], [$E2FSPROGS])
534 AC_SUBST([MKE2FS], [$MKE2FS])
535 AC_SUBST([DEBUGFS], [$DEBUGFS])
536 AC_SUBST([TUNE2FS], [$TUNE2FS])
537 AC_SUBST([E2LABEL], [$E2LABEL])
538 AC_SUBST([DUMPE2FS], [$DUMPE2FS])
539 AC_SUBST([E2FSCK], [$E2FSCK])
540 AC_SUBST([PFSCK], [$PFSCK])
541 ]) # LB_DEFINE_E2FSPROGS_NAMES