1Add a ftdi option alongside USB and PCI to control the external dependency, and 2ensure that the build is successful in all combinations of options. 3 4Upstream-Status: Pending 5Signed-off-by: Ross Burton <ross.burton@arm.com> 6 7diff --git a/meson.build b/meson.build 8index 375089c..0df9d69 100644 9--- a/meson.build 10+++ b/meson.build 11@@ -91,6 +91,8 @@ else 12 config_digilent_spi = false 13 config_developerbox_spi = false 14 config_pickit2_spi = false 15+ config_stlinkv3_spi = false 16+ config_usbblaster_spi = false 17 endif 18 19 # some programmers require libpci 20@@ -118,6 +120,21 @@ else 21 config_satasii = false 22 endif 23 24+# some programmers require libftdi 25+if get_option('ftdi') 26+ deps += dependency('libftdi1') 27+else 28+ config_ft2232_spi = false 29+ config_usbblaster_spi = false 30+endif 31+ 32+if not (target_machine.cpu_family() == 'x86' or target_machine.cpu_family() == 'x86_64') 33+ config_satamv = false 34+ config_nic3com = false 35+ config_rayer_spi = false 36+ config_nicrealtek = false 37+endif 38+ 39 # set defines for configured programmers 40 if config_atahpt 41 srcs += 'atahpt.c' 42@@ -163,7 +180,6 @@ endif 43 if config_ft2232_spi 44 srcs += 'ft2232_spi.c' 45 cargs += '-DCONFIG_FT2232_SPI=1' 46- deps += dependency('libftdi1') 47 cargs += '-DHAVE_FT232H=1' 48 endif 49 if config_gfxnvidia 50@@ -216,6 +232,7 @@ endif 51 if config_nicintel 52 srcs += 'nicintel.c' 53 cargs += '-DCONFIG_NICINTEL=1' 54+ need_raw_access = true 55 endif 56 if config_nicintel_eeprom 57 srcs += 'nicintel_eeprom.c' 58diff --git a/meson_options.txt b/meson_options.txt 59index ea87311..b6b842d 100644 60--- a/meson_options.txt 61+++ b/meson_options.txt 62@@ -1,5 +1,6 @@ 63 option('pciutils', type : 'boolean', value : true, description : 'use pciutils') 64 option('usb', type : 'boolean', value : true, description : 'use libusb1') 65+option('ftdi', type : 'boolean', value : true, description : 'use libftdi') 66 67 option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers') 68 option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller') 69