The test
utility doesn't have visible output unless you supply an erroneous expression.
test
will exit with a 0 status if the expression was true and a nonzero exit status indicates the expression was false (or invalid).
AS_IF
tests the exit status of the expression you supply as its first parameter.
If it was 0 (true), the associated block of code is executed. If not, it moves on to the next test expression and performs with the same behavior.
This happens until the macro runs out of tests. Once all tests are found false, it executes the last parameter's contents if the last parameter was supplied.
Edit
Naturally if you don't have "have_hdf5" defined in your current shell, it won't be true when you execute your test
expression alone, but if it is true in the configure script, it will do what it is meant to. In any case, output will not happen unless you use an output statement.