Omer Dagan
Omer Dagan

Reputation: 15996

How to put logical or in autoconf m4 AS_IF

In the official documentation the AS_IF macro is described pretty much like:

Macro: AS_IF (test1, [run-if-true1], ..., [run-if-false]) 

How can I make test1 include several conditions? (combination of "logical and" and "logical or")

Thanks

Upvotes: 1

Views: 1429

Answers (1)

Omer Dagan
Omer Dagan

Reputation: 15996

The test1 is just a bash command. So it should be used as a regular bash code. For example:

AS_IF ([test "x$a" == "xb" || test "x$a" == "xc"], [echo "test passed"], [echo "test has not passed"]

Upvotes: 3

Related Questions