On AIX, I would run:
ar -X32 -t libdb2.a
and check for output to determine if there is a 32-bit object in the archive. Similarly with -X64 for checking for a 64-bit object. However, what about if I m on another platform, and need to check the archive to see what it has? Usually I m on Linux when I need to check, but I could just as easily be on Solaris or HP-UX.
I used to check for shr.o and shr_64.o, since that s what s being compiled, but those are starting to show up in actual messages that are in the archives, and thus the reliability of these have dropped to the point where I m getting false positives.
If anyone has a pointer, preferably something I can do in perl, that d be great.