config/zfs-build.m4: add --with-vendor flag
This will allow an override of auto-detection of distribution, which is based on checking presence of /etc/*-release files. Build systems makes a lot of file location assumptions based on detected distribution. Some distributions (like gentoo) may prefer explicitly setting --with-vendor=gentoo to avoid auto-detection. Since auto-detection checks all files in order, current script may misdetect even on gentoo system if /etc/redhat-release file is present Default behavior is unchanged and default is --with-vendor=check Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> Closes #10835
This commit is contained in:
parent
2b07c5aa3e
commit
7ddcfe7c00
|
@ -418,6 +418,12 @@ dnl # package type for 'make pkg': (rpm | deb | tgz)
|
|||
dnl #
|
||||
AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
||||
AC_MSG_CHECKING([os distribution])
|
||||
AC_ARG_WITH([vendor],
|
||||
[AS_HELP_STRING([--with-vendor],
|
||||
[Distribution vendor @<:@default=check@:>@])],
|
||||
[with_vendor=$withval],
|
||||
[with_vendor=check])
|
||||
AS_IF([test "x$with_vendor" = "xcheck"],[
|
||||
if test -f /etc/toss-release ; then
|
||||
VENDOR=toss ;
|
||||
elif test -f /etc/fedora-release ; then
|
||||
|
@ -444,7 +450,11 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
|||
VENDOR=freebsd ;
|
||||
else
|
||||
VENDOR= ;
|
||||
fi
|
||||
fi],
|
||||
[ test "x${with_vendor}" != x],[
|
||||
VENDOR="$with_vendor" ],
|
||||
[ VENDOR= ; ]
|
||||
)
|
||||
AC_MSG_RESULT([$VENDOR])
|
||||
AC_SUBST(VENDOR)
|
||||
|
||||
|
|
Loading…
Reference in New Issue