If a book is simply the source of inspiration for your idea, you may not need permission, as ideas and information are not protected by copyright
However, the owner of copyright in a literary work, such as a history book or a novel, has the exclusive right to adapt the work. This right includes the right to convert the book into a dramatic work such as a screenplay. If you want to create a screenplay based on a book, you will need permission. Usually this is done by securing an “option” agreement with the publisher or writer (this agreement deals both with making the adaptation, and with later permission to actually make the film – the option is exercisable if, for example, finance and so on is secured).