I would say its best to buy the gun already compliant... I believe the seller can not even ship it into the state unless it is compliant... The delivery truck can drive through the state with it on board, but its final destination can not be within the states borders.
If you are having issues finding a compliant "carbine" type. The fixed stock rifle is a good choice. They have 20" barrels, and the longer gas system is a good thing.
Also, you can buy a separate lower, that has the compliant parts. Then an upper with the correct length barrel for you that is also compliant. I suggest a mid length gas system if you are getting a 16in barrel. You may even save a dollar or two, and get exactly the features you want up front.
As far as barrel length... minimum length is 16"... the flash hider does not count as part of the length unless it is permanently attached to the barrel, and not simply threaded on.
Also there is the bayonet lug issue as well, some places do not allow it.
All the states that still have limits are all different... some allow 30 round mags but no collapsible butt stock or other features... some may be the opposite.