For the code to run, you need to download the developer version for LibTools and make sure that ltdl.h is exported to any of the many directories that are implicitly available in LibTools. For Ubuntu, you can use the code,
sudo apt install libltdl-dev
For CentOS, you can use,
yum install libtool-ltdl-devel
For Mac, you have to make sure that brew is installed. Then you can use,
brew install libtool