Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/mount-helper.m4
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
AC_DEFUN([ZFS_AC_CONFIG_USER_MOUNT_HELPER], [
AC_ARG_WITH(mounthelperdir,
AS_HELP_STRING([--with-mounthelperdir=DIR],
[install mount.zfs in dir [[/sbin]]]),
mounthelperdir=$withval,mounthelperdir=/sbin)
[install mount.zfs in dir [[$sbindir]]]),
mounthelperdir=$withval,mounthelperdir=$sbindir)

AC_SUBST(mounthelperdir)
])
17 changes: 11 additions & 6 deletions config/user-dracut.m4
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
AC_DEFUN([ZFS_AC_CONFIG_USER_DRACUT], [
AC_MSG_CHECKING(for dracut directory)
AC_MSG_CHECKING(for dracut directory XXX prefix=$prefix adp=$ac_default_prefix XXX)
AC_ARG_WITH([dracutdir],
AS_HELP_STRING([--with-dracutdir=DIR],
[install dracut helpers @<:@default=check@:>@]),
[dracutdir=$withval],
[dracutdir=check])

AS_IF([test "x$dracutdir" = xcheck], [
path1=/usr/share/dracut
path2=/usr/lib/dracut
default=$path2
AS_IF([test "$prefix" != "NONE"],
[tprefix="$prefix"],
[tprefix="$ac_default_prefix"]
)

AS_IF([test -d "$path1"], [dracutdir="$path1"], [
AS_IF([test -d "$path2"], [dracutdir="$path2"],
path1='$prefix/share/dracut'
path2='$prefix/lib/dracut'
default="$path2"

AS_IF([test -d "$tprefix/share/dracut"], [dracutdir="$path1"], [
AS_IF([test -d "$tprefix/lib/dracut"], [dracutdir="$path2"],
[dracutdir="$default"])
])
])
Expand Down
16 changes: 8 additions & 8 deletions config/user-systemd.m4
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_SYSTEMD], [

AC_ARG_WITH(systemdunitdir,
AS_HELP_STRING([--with-systemdunitdir=DIR],
[install systemd unit files in dir [[/usr/lib/systemd/system]]]),
systemdunitdir=$withval,systemdunitdir=/usr/lib/systemd/system)
[install systemd unit files in dir [[$libdir/systemd/system]]]),
systemdunitdir=$withval,systemdunitdir=$libdir/systemd/system)

AC_ARG_WITH(systemdpresetdir,
AS_HELP_STRING([--with-systemdpresetdir=DIR],
[install systemd preset files in dir [[/usr/lib/systemd/system-preset]]]),
systemdpresetdir=$withval,systemdpresetdir=/usr/lib/systemd/system-preset)
[install systemd preset files in dir [[$libdir/systemd/system-preset]]]),
systemdpresetdir=$withval,systemdpresetdir=$libdir/systemd/system-preset)

AC_ARG_WITH(systemdmodulesloaddir,
AS_HELP_STRING([--with-systemdmodulesloaddir=DIR],
[install systemd module load files into dir [[/usr/lib/modules-load.d]]]),
systemdmodulesloaddir=$withval,systemdmodulesloaddir=/usr/lib/modules-load.d)
[install systemd module load files into dir [[$libdir/modules-load.d]]]),
systemdmodulesloaddir=$withval,systemdmodulesloaddir=$libdir/modules-load.d)

AC_ARG_WITH(systemdgeneratordir,
AS_HELP_STRING([--with-systemdgeneratordir=DIR],
[install systemd generators in dir [[/usr/lib/systemd/system-generators]]]),
systemdgeneratordir=$withval,systemdgeneratordir=/usr/lib/systemd/system-generators)
[install systemd generators in dir [[$libdir/systemd/system-generators]]]),
systemdgeneratordir=$withval,systemdgeneratordir=$libdir/systemd/system-generators)

AS_IF([test "x$enable_systemd" = xcheck], [
AS_IF([systemctl --version >/dev/null 2>&1],
Expand Down
22 changes: 14 additions & 8 deletions config/user-udev.m4
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
AC_DEFUN([ZFS_AC_CONFIG_USER_UDEV], [
AC_MSG_CHECKING(for udev directories)
PKG_CHECK_MODULES([UDEV], [udev], [have_udev=yes], [have_udev=no])

AC_MSG_CHECKING(for udev directories XXX $prefix XXX)
AC_ARG_WITH(udevdir,
AS_HELP_STRING([--with-udevdir=DIR],
[install udev helpers @<:@default=check@:>@]),
[udevdir=$withval],
[udevdir=check])

AS_IF([test "x$udevdir" = xcheck], [
path1=/lib/udev
path2=/usr/lib/udev
default=$path2
AS_IF([test "x$prefix" != "xNONE"],
[tprefix="$prefix"],
[tprefix="$ac_default_prefix"]
)

AS_IF([test -d "$path1"], [udevdir="$path1"], [
AS_IF([test -d "$path2"], [udevdir="$path2"],
[udevdir="$default"])
])
AS_IF([test "x$tprefix" = "x/usr"], [
AS_IF([test "x${have_udev}" = xyes],
[udevdir=`$PKG_CONFIG --variable=udevdir udev`],
AS_IF([test -d '/lib/udev' -a ! -L '/lib'],
[udevdir="/lib/udev"],
[udevdir="/usr/lib/udev"]))
], [udevdir='${prefix}/lib/udev'])
])

AC_ARG_WITH(udevruledir,
Expand Down
12 changes: 6 additions & 6 deletions config/zfs-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -644,24 +644,24 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
AC_MSG_CHECKING([default init config directory])
case "$VENDOR" in
alpine|artix|gentoo)
initconfdir=/etc/conf.d
initconfdir=$sysconfdir/conf.d
;;
fedora|openeuler|redhat|sles|toss)
initconfdir=/etc/sysconfig
initconfdir=$sysconfdir/sysconfig
;;
freebsd)
initconfdir=$sysconfdir/rc.conf.d
;;
*)
# debian|ubuntu
initconfdir=/etc/default
initconfdir=$sysconfdir/default
;;
esac
AC_MSG_RESULT([$initconfdir])
AC_SUBST(initconfdir)

AC_MSG_CHECKING([whether initramfs-tools is available])
if test -d /usr/share/initramfs-tools ; then
if test -d $datarootdir/initramfs-tools ; then
RPM_DEFINE_INITRAMFS='--define "_initramfs 1"'
AC_MSG_RESULT([yes])
else
Expand All @@ -673,13 +673,13 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
AC_MSG_CHECKING([default bash completion directory])
case "$VENDOR" in
alpine|arch|artix|debian|gentoo|ubuntu)
bashcompletiondir=/usr/share/bash-completion/completions
bashcompletiondir=$datarootdir/bash-completion/completions
;;
freebsd)
bashcompletiondir=$sysconfdir/bash_completion.d
;;
*)
bashcompletiondir=/etc/bash_completion.d
bashcompletiondir=$sysconfdir/bash_completion.d
;;
esac
AC_MSG_RESULT([$bashcompletiondir])
Expand Down
2 changes: 1 addition & 1 deletion contrib/initramfs/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
i_tdir = /usr/share/initramfs-tools
i_tdir = $(datarootdir)/initramfs-tools
dist_i_t_SCRIPTS = \
%D%/zfsunlock

Expand Down