most macs have an optical audio in. it's in the line in connection. you just need an adapter. just get this adapter if you already have an optical cable or a similar cable like this one.
in terms of software you can use audacity, garageband or quicktime player.