it depends on what you want to do, budget, etc.
for example -
if you want to build a cheap pc and play games on the integrated gpu, the a8 3870k would be better as the fx 4100 has no igpu.
if you want to build a cheap pc with single entry level and mid range gfx card e.g. radeon hd 6790, 6850, 6870 in mind, the fx 4100 with a 970 chipset motherboard will be better than the a8.
if upgradability is a factor, a8's supported fm1 socket is dead end, 3870k is the highest one can go. newer apu socket (desktop) is socket fm2. meanwhile, fx supports am3+ chipset which will likely support amd's next piledriver lineup as well.
if overclocking, fx is fully unlocked and quite customizable, overclocks higher than a8.
if you want to build a gaming pc with mid, upper midrange and higher cards e.g. radeon hd 6950, 6970, 7850, gtx 560ti and cfx/sli with mind, neither fx 4100 nor a8 will do. in that case, a core i5 like 2400/2500k with z68/z77 motherboard will outperform both a8 and fx easily.