Great, thanks! This is the flag I have been looking for.
I could indeed build the library with
./configure CFLAGS="-arch i386"
Unfortunately, when I link to the new i386 libhdf5.a, I get these undefined symbols:
___divdi3, ___udivdi3, ___umoddi3.
Scary, three underscores, never seen anything like this...
Funnily enough, I can link to i386 libhdf5.dylib, but then the binary doesn't work unless I patch the dylib path with install_name_tool. Still impractical.
So if I go the i386 arch route: I can't link a dylib to my program statically, can I?