Here's what I needed to install before ctypes.sh would compile and pass all test in /tests folder:
# mandatory to built ctypes.sh without Structs:
sudo apt install autoconf libffi-dev libltdl-dev automake libtool
above are mandatory for ./autogen.sh to build ./configure
# mandatory to build ctypes.sh with Structs:
sudo apt install libdw-dev libelf-dev
The build script states that the failure is a lack of elfutils when actually it's a lack of libdwfl.h
The error would be much more helpful if it reported what the actual failure was instead of reporting the name of a package which it mistakenly assumes will bring in what's missing.
You should be able to build it for MacOS as well using homebrew. Sorry but it's been a long time since I built anything on MacOS, but you should be able to follow the missing library errors and use that to search which brews to install, until it will eventually build.
Here's what I needed to install before ctypes.sh would compile and pass all test in /tests folder:
above are mandatory for ./autogen.sh to build ./configure
The build script states that the failure is a lack of elfutils when actually it's a lack of libdwfl.h
The error would be much more helpful if it reported what the actual failure was instead of reporting the name of a package which it mistakenly assumes will bring in what's missing.