summaryrefslogtreecommitdiff
blob: b17e1c2470fc3be13abde412d6822c79fa4cdbbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
configure.ac: Conditionalize test dependencies

Signed-off-by: Christopher Byrne <salah.coronya@gmail.com>
--- a/configure.ac
+++ b/configure.ac
@@ -369,20 +369,25 @@ else
 fi
 AC_SUBST([DEFAULT_PCR_BANKS])
 
-AC_PATH_PROG([EXPECT], expect)
-if test "x$EXPECT" = "x"; then
-	AC_MSG_ERROR([expect is required: expect package])
-fi
+AC_ARG_ENABLE([test],
+	[AS_HELP_STRING([--enable-test],
+			[enable tests (default is yes)])],
+	[enable_test=$enableval],
+	[enable_test=yes])
+
+AS_IF([test "x$enable_test" != xno],
+	[AC_PATH_PROG([EXPECT], expect)
+	AS_IF([test "x$EXPECT" = "x"],
+		AC_MSG_ERROR([expect is required: expect package]))
+	AC_PATH_PROG([SOCAT], socat)
+	AS_IF([test "x$SOCAT" = "x"],
+		AC_MSG_ERROR([socat is required: socat package]))])
 
 AC_PATH_PROG([GAWK], gawk)
 if test "x$GAWK" = "x"; then
 	AC_MSG_ERROR([gawk is required: gawk package])
 fi
 
-AC_PATH_PROG([SOCAT], socat)
-if test "x$SOCAT" = "x"; then
-	AC_MSG_ERROR([socat is required: socat package])
-fi
 
 AC_PATH_PROG([BASE64], base64)
 if test "x$BASE64" = "x"; then
-- 
2.34.1