Well, if you are talking about pure hardware and no peripherals it is very possible. Here is a good hardware post about each console:
http://www.ign.com/wikis/xbox-one/PS4_vs._Xbox_One_vs._Wii_U_Comparison_Chart Just to note, it includes Wii U too.
You are going to go AMD for this if you actually want to match.
CPU: FX8*** These start at about $130 and go up in price but they are 8 core.
RAM: 8 GB of ram is going to cost between $50-$60.
Case + PSU: Roughly $100.00
Motherboard: $50.00 + depending on the board and what extra features you want.
HDD: A 500 GB SATA drive costs you $50-$60. A 120 GB SSD Drive starts off at $60+ depending on the drive.
DVD burner: About $20.00~$25.00
Windows cost... or Linux for free.
The GPU is the kicker. I don't really know how to compare the two, but I doubt a comparable GPU is going to cost more than $150.00.
Your total cost is going to be slightly higher for a computer, but you get a full computer. You can also upgrade any part at any time, whereas an Xbox One or PS4 is stuck with the current hardware. It is possible that new parts will come out to replace current items (hard drive is the best example) you are stuck with the rest.