Spellbooks: Only if they have protective magic on them, such as explosive runes, fire trap, etc. (So really it's not the book, it's the spell on the book). However Boccob's Blessed Book will detect as magic, obviously, since it is a magic item.
Constructs: No. They are creatures, not magic items, even though there means of creation is similar.