diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
index 5d57cc3..689e8c6 100644
--- a/src/acpi/acpidump/acpidump.c
+++ b/src/acpi/acpidump/acpidump.c
@@ -13,6 +13,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  */
+#include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
@@ -23,8 +27,6 @@
 #include <inttypes.h>
 #include <unistd.h>
 
-#include "fwts.h"
-
 static void acpi_dump_raw_table(
 	fwts_framework *fw,
 	const fwts_acpi_table_info *table)
@@ -212,3 +214,5 @@ static fwts_framework_ops acpidump_ops = {
 };
 
 FWTS_REGISTER("acpidump", &acpidump_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_UTILS)
+
+#endif
diff --git a/src/acpi/acpiinfo/acpiinfo.c b/src/acpi/acpiinfo/acpiinfo.c
index d7f9d57..3a05b2d 100644
--- a/src/acpi/acpiinfo/acpiinfo.c
+++ b/src/acpi/acpiinfo/acpiinfo.c
@@ -18,6 +18,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -150,3 +152,5 @@ static fwts_framework_ops acpiinfo_ops = {
 };
 
 FWTS_REGISTER("acpiinfo", &acpiinfo_ops, FWTS_TEST_EARLY, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/acpitables/acpitables.c b/src/acpi/acpitables/acpitables.c
index d9c92bb..064dabe 100644
--- a/src/acpi/acpitables/acpitables.c
+++ b/src/acpi/acpitables/acpitables.c
@@ -13,6 +13,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  */
+#include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -23,8 +27,6 @@
 #include <unistd.h>
 #include <inttypes.h>
 
-#include "fwts.h"
-
 static bool acpi_table_check_field(const char *field, const size_t len)
 {
 	size_t i;
@@ -126,3 +128,5 @@ static fwts_framework_ops acpi_table_check_ops = {
 };
 
 FWTS_REGISTER("acpitables", &acpi_table_check_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/asf/asf.c b/src/acpi/asf/asf.c
index d5f76d4..fdc98d6 100644
--- a/src/acpi/asf/asf.c
+++ b/src/acpi/asf/asf.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -555,3 +557,5 @@ static fwts_framework_ops asf_ops = {
 };
 
 FWTS_REGISTER("asf", &asf_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/aspt/aspt.c b/src/acpi/aspt/aspt.c
index ae6c0b1..4051305 100644
--- a/src/acpi/aspt/aspt.c
+++ b/src/acpi/aspt/aspt.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -111,3 +113,5 @@ static fwts_framework_ops aspt_ops = {
 };
 
 FWTS_REGISTER("aspt", &aspt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/bert/bert.c b/src/acpi/bert/bert.c
index 59676f4..c7bd07a 100644
--- a/src/acpi/bert/bert.c
+++ b/src/acpi/bert/bert.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -185,3 +187,5 @@ static fwts_framework_ops bert_ops = {
 };
 
 FWTS_REGISTER("bert", &bert_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/bgrt/bgrt.c b/src/acpi/bgrt/bgrt.c
index 6f1dd3c..0d1fc6a 100644
--- a/src/acpi/bgrt/bgrt.c
+++ b/src/acpi/bgrt/bgrt.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -101,3 +103,5 @@ static fwts_framework_ops bgrt_ops = {
 };
 
 FWTS_REGISTER("bgrt", &bgrt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/boot/boot.c b/src/acpi/boot/boot.c
index b858bf4..fba9cf4 100644
--- a/src/acpi/boot/boot.c
+++ b/src/acpi/boot/boot.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -109,3 +111,5 @@ static fwts_framework_ops boot_ops = {
 };
 
 FWTS_REGISTER("boot", &boot_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/brightness/brightness-helper.c b/src/acpi/brightness/brightness-helper.c
index b596a40..26141be 100644
--- a/src/acpi/brightness/brightness-helper.c
+++ b/src/acpi/brightness/brightness-helper.c
@@ -17,6 +17,9 @@
  *
  */
 #include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include "brightness-helper.h"
 
 #include <stdlib.h>
@@ -142,3 +145,5 @@ int brightness_set_setting(const char *entry_name, const char *setting, const in
 
 	return FWTS_OK;
 }
+
+#endif
diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c
index 605b04c..bd47f8a 100644
--- a/src/acpi/checksum/checksum.c
+++ b/src/acpi/checksum/checksum.c
@@ -16,6 +16,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  */
+#include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -26,8 +30,6 @@
 #include <stdint.h>
 #include <inttypes.h>
 
-#include "fwts.h"
-
 static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table)
 {
 	uint8_t checksum;
@@ -156,3 +158,5 @@ static fwts_framework_ops checksum_ops = {
 };
 
 FWTS_REGISTER("checksum", &checksum_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/cpep/cpep.c b/src/acpi/cpep/cpep.c
index a1e5a30..02dd102 100644
--- a/src/acpi/cpep/cpep.c
+++ b/src/acpi/cpep/cpep.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -126,3 +128,5 @@ static fwts_framework_ops cpep_ops = {
 };
 
 FWTS_REGISTER("cpep", &cpep_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/crsdump/crsdump.c b/src/acpi/crsdump/crsdump.c
index cbc19ad..3f608b1 100644
--- a/src/acpi/crsdump/crsdump.c
+++ b/src/acpi/crsdump/crsdump.c
@@ -18,6 +18,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -917,3 +919,5 @@ static fwts_framework_ops crsdump_ops = {
 };
 
 FWTS_REGISTER("crsdump", &crsdump_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_UTILS)
+
+#endif
diff --git a/src/acpi/crsdump/prsdump.c b/src/acpi/crsdump/prsdump.c
index f0881d6..403e0f5 100644
--- a/src/acpi/crsdump/prsdump.c
+++ b/src/acpi/crsdump/prsdump.c
@@ -17,6 +17,9 @@
  *
  */
 #include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include "fwts_acpi_object_eval.h"
 #include "crsdump.h"
 
@@ -61,3 +64,5 @@ static fwts_framework_ops prsdump_ops = {
 };
 
 FWTS_REGISTER("prsdump", &prsdump_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_UTILS)
+
+#endif
diff --git a/src/acpi/csrt/csrt.c b/src/acpi/csrt/csrt.c
index a37045c..7ff3131 100644
--- a/src/acpi/csrt/csrt.c
+++ b/src/acpi/csrt/csrt.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -243,3 +245,5 @@ static fwts_framework_ops csrt_ops = {
 };
 
 FWTS_REGISTER("csrt", &csrt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/dbg2/dbg2.c b/src/acpi/dbg2/dbg2.c
index 4096607..610e32c 100644
--- a/src/acpi/dbg2/dbg2.c
+++ b/src/acpi/dbg2/dbg2.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -407,3 +409,5 @@ static fwts_framework_ops dbg2_ops = {
 };
 
 FWTS_REGISTER("dbg2", &dbg2_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/dbgp/dbgp.c b/src/acpi/dbgp/dbgp.c
index cbfba4a..49ba618 100644
--- a/src/acpi/dbgp/dbgp.c
+++ b/src/acpi/dbgp/dbgp.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -137,3 +139,5 @@ static fwts_framework_ops dbgp_ops = {
 };
 
 FWTS_REGISTER("dbgp", &dbgp_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/ecdt/ecdt.c b/src/acpi/ecdt/ecdt.c
index b67e534..4e844c1 100644
--- a/src/acpi/ecdt/ecdt.c
+++ b/src/acpi/ecdt/ecdt.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -218,3 +220,5 @@ static fwts_framework_ops ecdt_ops = {
 };
 
 FWTS_REGISTER("ecdt", &ecdt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/erst/erst.c b/src/acpi/erst/erst.c
index d28aa92..f84463f 100644
--- a/src/acpi/erst/erst.c
+++ b/src/acpi/erst/erst.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -190,3 +192,5 @@ static fwts_framework_ops erst_ops = {
 };
 
 FWTS_REGISTER("erst", &erst_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/facs/facs.c b/src/acpi/facs/facs.c
index 52bc652..4f43563 100644
--- a/src/acpi/facs/facs.c
+++ b/src/acpi/facs/facs.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -174,3 +176,5 @@ static fwts_framework_ops facs_ops = {
 };
 
 FWTS_REGISTER("facs", &facs_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c
index 4dba8f1..139c567 100644
--- a/src/acpi/fadt/fadt.c
+++ b/src/acpi/fadt/fadt.c
@@ -19,6 +19,9 @@
  *
  */
 #include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include "fwts_acpi_object_eval.h"
 
 #include <stdio.h>
@@ -1839,4 +1842,4 @@ static fwts_framework_ops fadt_ops = {
 FWTS_REGISTER("fadt", &fadt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH |
 	      FWTS_FLAG_ROOT_PRIV | FWTS_FLAG_TEST_ACPI |
 	      FWTS_FLAG_TEST_COMPLIANCE_ACPI)
-
+#endif
diff --git a/src/acpi/fpdt/fpdt.c b/src/acpi/fpdt/fpdt.c
index 413b83a..db01b91 100644
--- a/src/acpi/fpdt/fpdt.c
+++ b/src/acpi/fpdt/fpdt.c
@@ -18,6 +18,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -228,3 +230,5 @@ static fwts_framework_ops fpdt_ops = {
 };
 
 FWTS_REGISTER("fpdt", &fpdt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/gpedump/gpedump.c b/src/acpi/gpedump/gpedump.c
index b30f7ee..e42f65f 100644
--- a/src/acpi/gpedump/gpedump.c
+++ b/src/acpi/gpedump/gpedump.c
@@ -17,6 +17,9 @@
  *
  */
 #include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdint.h>
 #include <stdbool.h>
 #include <inttypes.h>
@@ -179,3 +182,5 @@ static fwts_framework_ops gpedump_ops = {
 };
 
 FWTS_REGISTER("gpedump", &gpedump_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_UTILS)
+
+#endif
diff --git a/src/acpi/gtdt/gtdt.c b/src/acpi/gtdt/gtdt.c
index a527129..421f17f 100644
--- a/src/acpi/gtdt/gtdt.c
+++ b/src/acpi/gtdt/gtdt.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -246,3 +248,5 @@ static fwts_framework_ops gtdt_ops = {
 };
 
 FWTS_REGISTER("gtdt", &gtdt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/hest/hest.c b/src/acpi/hest/hest.c
index 6d5d05e..5e2b3ec 100644
--- a/src/acpi/hest/hest.c
+++ b/src/acpi/hest/hest.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -783,3 +785,5 @@ static fwts_framework_ops hest_ops = {
 };
 
 FWTS_REGISTER("hest", &hest_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/hpet/hpet.c b/src/acpi/hpet/hpet.c
index 446c53a..35a574d 100644
--- a/src/acpi/hpet/hpet.c
+++ b/src/acpi/hpet/hpet.c
@@ -19,13 +19,13 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  */
-#include <string.h>
-#include <inttypes.h>
-
 #include "fwts.h"
 
 #ifdef FWTS_ARCH_INTEL
 
+#include <string.h>
+#include <inttypes.h>
+
 static fwts_list *klog;
 
 
diff --git a/src/acpi/iort/iort.c b/src/acpi/iort/iort.c
index 83dd41c..89989aa 100644
--- a/src/acpi/iort/iort.c
+++ b/src/acpi/iort/iort.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -705,3 +707,5 @@ static fwts_framework_ops iort_ops = {
 };
 
 FWTS_REGISTER("iort", &iort_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/lpit/lpit.c b/src/acpi/lpit/lpit.c
index 6a97064..b660e64 100644
--- a/src/acpi/lpit/lpit.c
+++ b/src/acpi/lpit/lpit.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -227,3 +229,5 @@ static fwts_framework_ops lpit_ops = {
 };
 
 FWTS_REGISTER("lpit", &lpit_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
index e32b67f..b65b89e 100644
--- a/src/acpi/madt/madt.c
+++ b/src/acpi/madt/madt.c
@@ -15,6 +15,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -1380,3 +1382,5 @@ static fwts_framework_ops madt_ops = {
 };
 
 FWTS_REGISTER("madt", &madt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI | FWTS_FLAG_TEST_COMPLIANCE_ACPI)
+
+#endif
diff --git a/src/acpi/mchi/mchi.c b/src/acpi/mchi/mchi.c
index a1d08a2..ac49e01 100644
--- a/src/acpi/mchi/mchi.c
+++ b/src/acpi/mchi/mchi.c
@@ -18,6 +18,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -243,3 +245,5 @@ static fwts_framework_ops mchi_ops = {
 };
 
 FWTS_REGISTER("mchi", &mchi_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index edf4e78..79b41ab 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -18,6 +18,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -27,7 +29,6 @@
 #include <inttypes.h>
 #include "fwts_acpi_object_eval.h"
 
-
 /*
  * ACPI methods + objects used in Linux ACPI driver:
  *
@@ -7197,3 +7198,5 @@ static fwts_framework_ops method_ops = {
 };
 
 FWTS_REGISTER("method", &method_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/msdm/msdm.c b/src/acpi/msdm/msdm.c
index 0d2cbe5..4e36981 100644
--- a/src/acpi/msdm/msdm.c
+++ b/src/acpi/msdm/msdm.c
@@ -18,6 +18,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -171,3 +173,5 @@ static fwts_framework_ops msdm_ops = {
 };
 
 FWTS_REGISTER("msdm", &msdm_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/plddump/plddump.c b/src/acpi/plddump/plddump.c
index 26efeed..c7972e6 100644
--- a/src/acpi/plddump/plddump.c
+++ b/src/acpi/plddump/plddump.c
@@ -17,6 +17,9 @@
  *
  */
 #include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdint.h>
 #include <stdbool.h>
 #include <unistd.h>
@@ -265,3 +268,5 @@ static fwts_framework_ops plddump_ops = {
 };
 
 FWTS_REGISTER("plddump", &plddump_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_UTILS)
+
+#endif
diff --git a/src/acpi/rsdp/rsdp.c b/src/acpi/rsdp/rsdp.c
index bf830f0..92b9753 100644
--- a/src/acpi/rsdp/rsdp.c
+++ b/src/acpi/rsdp/rsdp.c
@@ -16,6 +16,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -224,3 +226,5 @@ static fwts_framework_ops rsdp_ops = {
 
 FWTS_REGISTER("rsdp", &rsdp_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH |
 	      FWTS_FLAG_TEST_ACPI | FWTS_FLAG_TEST_COMPLIANCE_ACPI)
+
+#endif
diff --git a/src/acpi/rsdt/rsdt.c b/src/acpi/rsdt/rsdt.c
index 287dfd8..a16d2fc 100644
--- a/src/acpi/rsdt/rsdt.c
+++ b/src/acpi/rsdt/rsdt.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -83,3 +85,5 @@ static fwts_framework_ops rsdt_ops = {
 };
 
 FWTS_REGISTER("rsdt", &rsdt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/sbst/sbst.c b/src/acpi/sbst/sbst.c
index dd19e78..21345a4 100644
--- a/src/acpi/sbst/sbst.c
+++ b/src/acpi/sbst/sbst.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -93,3 +95,5 @@ static fwts_framework_ops sbst_ops = {
 };
 
 FWTS_REGISTER("sbst", &sbst_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/slic/slic.c b/src/acpi/slic/slic.c
index d791912..d5f4632 100644
--- a/src/acpi/slic/slic.c
+++ b/src/acpi/slic/slic.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -180,3 +182,5 @@ static fwts_framework_ops slic_ops = {
 };
 
 FWTS_REGISTER("slic", &slic_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/slit/slit.c b/src/acpi/slit/slit.c
index 4c0b160..628bbde 100644
--- a/src/acpi/slit/slit.c
+++ b/src/acpi/slit/slit.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -188,3 +190,5 @@ static fwts_framework_ops slit_ops = {
 };
 
 FWTS_REGISTER("slit", &slit_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/spcr/spcr.c b/src/acpi/spcr/spcr.c
index 70e49c0..970abf9 100644
--- a/src/acpi/spcr/spcr.c
+++ b/src/acpi/spcr/spcr.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -289,3 +291,5 @@ static fwts_framework_ops spcr_ops = {
 };
 
 FWTS_REGISTER("spcr", &spcr_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/spmi/spmi.c b/src/acpi/spmi/spmi.c
index 2e551bb..8f2e799 100644
--- a/src/acpi/spmi/spmi.c
+++ b/src/acpi/spmi/spmi.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -241,3 +243,5 @@ static fwts_framework_ops spmi_ops = {
 };
 
 FWTS_REGISTER("spmi", &spmi_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/srat/srat.c b/src/acpi/srat/srat.c
index 2bc5e7d..9eb314a 100644
--- a/src/acpi/srat/srat.c
+++ b/src/acpi/srat/srat.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -353,3 +355,5 @@ static fwts_framework_ops srat_ops = {
 };
 
 FWTS_REGISTER("srat", &srat_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/stao/stao.c b/src/acpi/stao/stao.c
index f1f9207..e6ede15 100644
--- a/src/acpi/stao/stao.c
+++ b/src/acpi/stao/stao.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -217,3 +219,5 @@ static fwts_framework_ops stao_ops = {
 };
 
 FWTS_REGISTER("stao", &stao_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/syntaxcheck/syntaxcheck.c b/src/acpi/syntaxcheck/syntaxcheck.c
index 27602d6..e8a997d 100644
--- a/src/acpi/syntaxcheck/syntaxcheck.c
+++ b/src/acpi/syntaxcheck/syntaxcheck.c
@@ -18,6 +18,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -644,3 +646,5 @@ static fwts_framework_ops syntaxcheck_ops = {
 };
 
 FWTS_REGISTER("syntaxcheck", &syntaxcheck_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH)
+
+#endif
diff --git a/src/acpi/tcpa/tcpa.c b/src/acpi/tcpa/tcpa.c
index cb36a4f..e5e3bce 100644
--- a/src/acpi/tcpa/tcpa.c
+++ b/src/acpi/tcpa/tcpa.c
@@ -13,6 +13,9 @@
  *
  */
 #include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -224,3 +227,5 @@ static fwts_framework_ops tcpa_ops = {
 };
 
 FWTS_REGISTER("tcpa", &tcpa_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/tpm2/tpm2.c b/src/acpi/tpm2/tpm2.c
index 820d862..f124b02 100644
--- a/src/acpi/tpm2/tpm2.c
+++ b/src/acpi/tpm2/tpm2.c
@@ -13,6 +13,9 @@
  *
  */
 #include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -114,3 +117,5 @@ static fwts_framework_ops tpm2_ops = {
 };
 
 FWTS_REGISTER("tpm2", &tpm2_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/uefi/uefi.c b/src/acpi/uefi/uefi.c
index 077c21c..287b072 100644
--- a/src/acpi/uefi/uefi.c
+++ b/src/acpi/uefi/uefi.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -133,3 +135,5 @@ static fwts_framework_ops uefi_ops = {
 };
 
 FWTS_REGISTER("uefi", &uefi_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/waet/waet.c b/src/acpi/waet/waet.c
index 99d9d9d..25a4bbc 100644
--- a/src/acpi/waet/waet.c
+++ b/src/acpi/waet/waet.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -98,3 +100,5 @@ static fwts_framework_ops waet_ops = {
 };
 
 FWTS_REGISTER("waet", &waet_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/wdat/wdat.c b/src/acpi/wdat/wdat.c
index ccc4b43..f81c982 100644
--- a/src/acpi/wdat/wdat.c
+++ b/src/acpi/wdat/wdat.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -225,3 +227,5 @@ static fwts_framework_ops wdat_ops = {
 };
 
 FWTS_REGISTER("wdat", &wdat_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/xenv/xenv.c b/src/acpi/xenv/xenv.c
index 61e021e..7358cbc 100644
--- a/src/acpi/xenv/xenv.c
+++ b/src/acpi/xenv/xenv.c
@@ -16,11 +16,13 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  */
+#include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include <string.h>
 #include <inttypes.h>
 
-#include "fwts.h"
-
 static fwts_acpi_table_info *table;
 
 static int xenv_init(fwts_framework *fw)
@@ -97,3 +99,5 @@ static fwts_framework_ops xenv_check_ops = {
 
 FWTS_REGISTER("xenv", &xenv_check_ops, FWTS_TEST_ANYTIME,
 	FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/xsdt/xsdt.c b/src/acpi/xsdt/xsdt.c
index a638c9b..032f1a1 100644
--- a/src/acpi/xsdt/xsdt.c
+++ b/src/acpi/xsdt/xsdt.c
@@ -20,6 +20,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -83,3 +85,5 @@ static fwts_framework_ops xsdt_ops = {
 };
 
 FWTS_REGISTER("xsdt", &xsdt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpica/fwts_acpica.c b/src/acpica/fwts_acpica.c
index 77a96ca..ba41ded 100644
--- a/src/acpica/fwts_acpica.c
+++ b/src/acpica/fwts_acpica.c
@@ -35,6 +35,8 @@
 
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 /* ACPICA specific headers */
 #include "acpi.h"
 #include "accommon.h"
@@ -1195,3 +1197,5 @@ fwts_list *fwts_acpica_get_object_names(int type)
 
 	return list;
 }
+
+#endif
diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
index 711a379..d708201 100644
--- a/src/lib/include/fwts.h
+++ b/src/lib/include/fwts.h
@@ -24,12 +24,21 @@
 
 #if defined(__x86_64__) || defined(__x86_64) || defined(__i386__) || defined(__i386)
 #define FWTS_ARCH_INTEL	1
+#define FWTS_HAS_ACPI	1
+#define FWTS_HAS_UEFI	1
 #endif
 
 #if defined(__aarch64__)
 #define FWTS_ARCH_AARCH64	1
+#define FWTS_HAS_ACPI	1
+#define FWTS_HAS_UEFI	1
 #endif
 
+#if defined(__s390x__)
+#define FWTS_ARCH_S390X	1
+#endif
+
+
 #define FWTS_UNUSED(var)	(void)var
 
 #define FWTS_JSON_DATA_PATH	DATAROOTDIR "/fwts"
diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
index b57022c..64dcd91 100644
--- a/src/lib/include/fwts_acpi.h
+++ b/src/lib/include/fwts_acpi.h
@@ -20,6 +20,10 @@
 #ifndef __FWTS_ACPI_H__
 #define __FWTS_ACPI_H__
 
+#include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #define FWTS_ACPI_TABLES_PATH   "/sys/firmware/acpi/tables"
 
 #define FWTS_FACP_UNSPECIFIED			(0x00)
@@ -1468,3 +1472,5 @@ typedef struct {
 } __attribute__ ((packed)) fwts_acpi_table_aspt;
 
 #endif
+
+#endif
diff --git a/src/lib/include/fwts_acpi_tables.h b/src/lib/include/fwts_acpi_tables.h
index 17a12ea..75ebfa7 100644
--- a/src/lib/include/fwts_acpi_tables.h
+++ b/src/lib/include/fwts_acpi_tables.h
@@ -22,6 +22,8 @@
 
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #define ACPI_MAX_TABLES		(128)
 
 typedef enum {
@@ -52,3 +54,5 @@ uint8_t fwts_acpi_checksum(const uint8_t *data, const int length);
 fwts_bool fwts_acpi_is_reduced_hardware(const fwts_acpi_table_fadt *fadt);
 
 #endif
+
+#endif
diff --git a/src/lib/include/fwts_iasl.h b/src/lib/include/fwts_iasl.h
index cbf8e93..ed3cea2 100644
--- a/src/lib/include/fwts_iasl.h
+++ b/src/lib/include/fwts_iasl.h
@@ -23,6 +23,8 @@
 #include "fwts.h"
 #include <stdint.h>
 
+#if defined(FWTS_HAS_ACPI)
+
 int fwts_iasl_init(fwts_framework *fw);
 void fwts_iasl_deinit(void);
 
@@ -43,3 +45,5 @@ int fwts_iasl_reassemble(fwts_framework *fw,
 const char *fwts_iasl_exception_level(uint8_t level);
 
 #endif
+
+#endif
diff --git a/src/lib/src/fwts_acpi.c b/src/lib/src/fwts_acpi.c
index 6fa3b3a..6a9ed35 100644
--- a/src/lib/src/fwts_acpi.c
+++ b/src/lib/src/fwts_acpi.c
@@ -28,6 +28,8 @@
 
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 const char *fwts_acpi_fadt_preferred_pm_profile[] = {
 	"Unspecified",
 	"Desktop",
@@ -48,3 +50,5 @@ void fwts_acpi_table_get_header(fwts_acpi_table_header *hdr, uint8_t *data)
 {
 	memcpy(hdr, data, sizeof(fwts_acpi_table_header));
 }
+
+#endif
diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c
index 08f0ed1..f60b97f 100644
--- a/src/lib/src/fwts_acpi_object_eval.c
+++ b/src/lib/src/fwts_acpi_object_eval.c
@@ -18,6 +18,8 @@
  */
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -455,3 +457,4 @@ ACPI_STATUS fwts_acpi_object_evaluate(fwts_framework *fw,
         return AcpiEvaluateObject(NULL, name, arg_list, buf);
 }
 
+#endif
diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
index 281ce77..eb1184f 100644
--- a/src/lib/src/fwts_acpi_tables.c
+++ b/src/lib/src/fwts_acpi_tables.c
@@ -35,6 +35,8 @@
 
 #include "fwts.h"
 
+#if defined(FWTS_HAS_ACPI)
+
 #define BIOS_START	(0x000e0000)		/* Start of BIOS memory */
 #define BIOS_END  	(0x000fffff)		/* End of BIOS memory */
 #define BIOS_LENGTH	(BIOS_END - BIOS_START)	/* Length of BIOS memory */
@@ -1279,3 +1281,5 @@ int fwts_acpi_get_table(fwts_framework *fw, const int index, fwts_acpi_table_inf
 	*info = &tables[index];
 	return FWTS_OK;
 }
+
+#endif
diff --git a/src/lib/src/fwts_dump.c b/src/lib/src/fwts_dump.c
index 6749e72..b348d6f 100644
--- a/src/lib/src/fwts_dump.c
+++ b/src/lib/src/fwts_dump.c
@@ -134,6 +134,7 @@ static int dump_lspci(fwts_framework *fw)
 	return dump_exec("lspci.log", command);
 }
 
+#if defined(FWTS_HAS_ACPI)
 /*
  *  dump_acpi_table()
  *	hex dump of a ACPI table
@@ -185,6 +186,7 @@ static int dump_acpi_tables(fwts_framework *fw)
 
 	return FWTS_OK;
 }
+#endif
 
 /*
  *  dump_readme()
@@ -290,6 +292,7 @@ int fwts_dump_info(fwts_framework *fw)
 	else
 		printf("Dumped lspci data to lspci.log\n");
 
+#if defined(FWTS_HAS_ACPI)
 	switch (dump_acpi_tables(fw)) {
 		case FWTS_OK:
 			printf("Dumped ACPI tables to acpidump.log\n");
@@ -301,6 +304,7 @@ int fwts_dump_info(fwts_framework *fw)
 			fprintf(stderr, "Failed to dump ACPI tables.\n");
 			break;
 	}
+#endif
 
 	if (dump_cpuinfo() != FWTS_OK)
 		fprintf(stderr, "Failed to dump cpuinfo.\n");
diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
index e3f03f6..fcf2e86 100644
--- a/src/lib/src/fwts_framework.c
+++ b/src/lib/src/fwts_framework.c
@@ -1250,8 +1250,13 @@ int fwts_framework_options_handler(fwts_framework *fw, int argc, char * const ar
 			fwts_framework_strdup(&fw->json_data_path, optarg);
 			break;
 		case 29: /* --disassemble-aml */
+#if defined(FWTS_HAS_ACPI)
 			fwts_iasl_disassemble_all_to_file(fw, optarg);
 			return FWTS_COMPLETE;
+#else
+			fprintf(stderr, "option not available on this architecture\n");
+			return FWTS_ERROR;
+#endif
 		case 30: /* --log-type */
 			if (fwts_framework_log_type_parse(fw, optarg) != FWTS_OK)
 				return FWTS_ERROR;
@@ -1569,7 +1574,9 @@ tidy:
 	fwts_log_close(fw->results);
 
 tidy_close:
+#if defined(FWTS_HAS_ACPI)
 	fwts_acpi_free_tables();
+#endif
 	fwts_summary_deinit();
 
 	free(fw->lspci);
diff --git a/src/lib/src/fwts_iasl.c b/src/lib/src/fwts_iasl.c
index 322e719..60811d8 100644
--- a/src/lib/src/fwts_iasl.c
+++ b/src/lib/src/fwts_iasl.c
@@ -28,6 +28,9 @@
 #include <limits.h>
 
 #include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include "fwts_iasl_interface.h"
 #include "fwts_acpica.h"
 
@@ -317,3 +320,5 @@ const char *fwts_iasl_exception_level(uint8_t level)
 {
 	return fwts_iasl_exception_level__(level);
 }
+
+#endif
diff --git a/src/pci/aspm/aspm.c b/src/pci/aspm/aspm.c
index 6571984..881063c 100644
--- a/src/pci/aspm/aspm.c
+++ b/src/pci/aspm/aspm.c
@@ -16,6 +16,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  */
+#include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdint.h>
@@ -29,7 +33,6 @@
 #include <fcntl.h>
 #include <limits.h>
 #include <inttypes.h>
-#include "fwts.h"
 
 /* PCI Express Capability Structure Fields */
 #define FWTS_PCIE_ASPM_SUPPORT_L0_FIELD	0x0400
@@ -278,3 +281,5 @@ static fwts_framework_ops aspm_ops = {
 };
 
 FWTS_REGISTER("aspm", &aspm_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_ROOT_PRIV)
+
+#endif
