Changing / controlling file architecture

Changing / controlling build file architecture
I have “configure” script with “option” to build / generate a library (C++) file of specific architecture. I am using “file” commmand to verify such architecture.
It does not work, keeps building for wrong architecture, and I am looking for a GENERIC information how Linux can do that.
I am just going thru automatically generated script and found some lines which could have the answer I am looking for.
It would help me to have some idea / concept how it could be done in Linux.
I did look at libtool and found nothing helpful there.