Files
xen/m4/fetcher.m4
Wei Liu 58e1417945 build: don't mandate availability of a fetcher program
It is common that build hosts are isolated from outside world. They
don't necessarily have wget or ftp installed.

Turn the error into warning in configure. And point FETCHER to `false'
command if neither wget nor ftp is available, so any attempt to
download will result in error.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-04-04 15:03:05 +01:00

17 lines
385 B
Plaintext

AC_DEFUN([AX_CHECK_FETCHER], [
AC_PATH_PROG([WGET],[wget], [no])
AC_PATH_PROG([FALSE],[false], [/bin/false])
AS_IF([test x"$WGET" != x"no"], [
FETCHER="$WGET -c -O"
], [
AC_PATH_PROG([FTP],[ftp], [no])
AS_IF([test x"$FTP" != x"no"], [
FETCHER="$FTP -o"
], [
FETCHER="$FALSE"
AC_MSG_WARN([cannot find wget or ftp])
])
])
AC_SUBST(FETCHER)
])