summaryrefslogtreecommitdiffstats
path: root/configure.ac.in
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-09-25 14:23:39 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-09-26 14:30:17 +0800
commitca5a62c1d04a3eea1d1c307d4fa4f0b1559140d2 (patch)
tree022367e0be0f9207dd4b7c4c87a3b85ea4717602 /configure.ac.in
parent7889b6f4bf81a1d2742c6f7d6fb9f6f603dd251e (diff)
downloadtalos-petitboot-ca5a62c1d04a3eea1d1c307d4fa4f0b1559140d2.tar.gz
talos-petitboot-ca5a62c1d04a3eea1d1c307d4fa4f0b1559140d2.zip
discover: Don't depend on tftp failure for type detection
Rather than always trying both TFTP client types, do a runtime detection on first invocation. This can be fixed at build-time with --with-tftp=TYPE. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'configure.ac.in')
-rw-r--r--configure.ac.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac.in b/configure.ac.in
index 7f13cca..3374a9a 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -205,6 +205,29 @@ DEFINE_HOST_PROG(WGET, wget, [/usr/bin/wget])
DEFINE_HOST_PROG(IP, ip, [/sbin/ip])
DEFINE_HOST_PROG(UDHCPC, udhcpc, [/sbin/udhcpc])
+AC_ARG_WITH(
+ [tftp],
+ [AS_HELP_STRING([--with-tftp=TYPE],
+ [Use TYPE-type ftp client (either hpa or busybox) [default=runtime-check]]
+ )],
+ [],
+ [with_tftp=detect]
+)
+
+case x$with_tftp in
+'xhpa')
+ tftp_type='TFTP_TYPE_HPA'
+ ;;
+'xbusybox')
+ tftp_type='TFTP_TYPE_BUSYBOX'
+ ;;
+*)
+ tftp_type='TFTP_TYPE_UNKNOWN'
+ ;;
+esac
+
+AC_DEFINE_UNQUOTED(TFTP_TYPE, $tftp_type, [tftp client type])
+
default_cflags="--std=gnu99 -g \
-Wall -W -Wunused -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wredundant-decls"
OpenPOWER on IntegriCloud