在官方文档中,AS_IF宏的描述非常像:
Macro: AS_IF (test1, [run-if-true1], ..., [run-if-false])
如何使test1
包含多个条件? (“逻辑与”和“逻辑或”的组合)
谢谢
test1
只是一个bash命令。因此,应将其用作常规bash代码。例如:
AS_IF ([test "x$a" == "xb" || test "x$a" == "xc"], [echo "test passed"], [echo "test has not passed"]