You can put Trek accessories on a Specialized.
Decide which bike you like better. Also think about which store you want to deal with. Not just about who will give you a $20 or $30 price break on the bike, but who you'll feel happy about dealing with for service, and who you'll want to come back to and buy accessories (or even another bike?) later.