Auto libraries detection(not finished)