summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-01-24 22:36:55 -0500
committerKarel Zak <kzak@redhat.com>2010-02-02 14:37:32 +0100
commitbb4cb69df2a7fba3098f073aa4b758a8011d826f (patch)
tree59f3976ed9d135af9e016f4682643e7ecac41c55 /configure.ac
parent49361dc4dca0a9079ee57a2a0d8833aabd93277b (diff)
downloadutil-linux-old-bb4cb69df2a7fba3098f073aa4b758a8011d826f.tar.gz
fsck/mkfs/mount: unify default search paths for helpers
Rather than each fs util having its own search policy, unify the paths in configure and allow them to be tweaked by downstream. In the process, drop the /etc paths as no one has ever really used these. [kzak@redhat.com: - backport to autoconf < 2.64 (remove AS_{SET,IF,CASE,APPEND} macros)] Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1fef9444..e36b8f6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -960,6 +960,34 @@ if test "x$enable_require_password" = xyes; then
fi
+AC_DEFUN([FS_PATHS_DEFAULT], [/sbin:/sbin/fs.d:/sbin/fs])
+AC_ARG_ENABLE([fs-paths-default],
+ AS_HELP_STRING([--enable-fs-paths-default=paths], [default search path for fs helpers @<:@FS_PATHS_DEFAULT@:>@]),
+ [case "$enableval" in
+ yes) fs_paths_defaults="FS_PATHS_DEFAULT" ;;
+ no) fs_paths_defaults="" ;;
+ *) fs_paths_defaults="$enableval" ;;
+ esac],
+ [fs_paths_defaults="FS_PATHS_DEFAULT"]
+)
+AC_ARG_ENABLE([fs-paths-extra],
+ AS_HELP_STRING([--enable-fs-paths-extra=paths], [additional search paths for fs helpers]),
+ [case "$enableval" in
+ yes|no) fs_paths_extra="" ;;
+ *) fs_paths_extra="$enableval" ;;
+ esac],
+ [fs_paths_extra=""]
+)
+fs_paths="$fs_paths_defaults"
+if test "x$fs_paths_extra" != "x"; then
+ if test "x$fs_paths" != "x"; then
+ fs_paths="${fs_paths}:"
+ fi
+ fs_paths="${fs_paths}${fs_paths_extra}"
+fi
+AC_DEFINE_UNQUOTED([FS_SEARCH_PATH], "$fs_paths", [search path for fs helpers])
+
+
AC_ARG_ENABLE([use-tty-group],
AS_HELP_STRING([--disable-use-tty-group], [do not install wall and write setgid tty]),
[], enable_use_tty_group=yes