diff options
Diffstat (limited to 'config/zfs-build.m4')
-rw-r--r-- | config/zfs-build.m4 | 64 |
1 files changed, 37 insertions, 27 deletions
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index 54b61de09..2f0aca830 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -418,33 +418,43 @@ dnl # package type for 'make pkg': (rpm | deb | tgz) dnl # AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ AC_MSG_CHECKING([os distribution]) - if test -f /etc/toss-release ; then - VENDOR=toss ; - elif test -f /etc/fedora-release ; then - VENDOR=fedora ; - elif test -f /etc/redhat-release ; then - VENDOR=redhat ; - elif test -f /etc/gentoo-release ; then - VENDOR=gentoo ; - elif test -f /etc/arch-release ; then - VENDOR=arch ; - elif test -f /etc/SuSE-release ; then - VENDOR=sles ; - elif test -f /etc/slackware-version ; then - VENDOR=slackware ; - elif test -f /etc/lunar.release ; then - VENDOR=lunar ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; - elif test -f /etc/debian_version ; then - VENDOR=debian ; - elif test -f /etc/alpine-release ; then - VENDOR=alpine ; - elif test -f /bin/freebsd-version ; then - VENDOR=freebsd ; - else - VENDOR= ; - fi + 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 + VENDOR=fedora ; + elif test -f /etc/redhat-release ; then + VENDOR=redhat ; + elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; + elif test -f /etc/arch-release ; then + VENDOR=arch ; + elif test -f /etc/SuSE-release ; then + VENDOR=sles ; + elif test -f /etc/slackware-version ; then + VENDOR=slackware ; + elif test -f /etc/lunar.release ; then + VENDOR=lunar ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; + elif test -f /etc/debian_version ; then + VENDOR=debian ; + elif test -f /etc/alpine-release ; then + VENDOR=alpine ; + elif test -f /bin/freebsd-version ; then + VENDOR=freebsd ; + else + VENDOR= ; + fi], + [ test "x${with_vendor}" != x],[ + VENDOR="$with_vendor" ], + [ VENDOR= ; ] + ) AC_MSG_RESULT([$VENDOR]) AC_SUBST(VENDOR) |