Comment on Make QMAIL with vpopmail vchkpw, courier-authlib and courier-imap auth work without MySQL on Debian Linux qmailrocks Thibs install by John.
I had a problem compiling courier-imap on Ubuntu 16.04.5. It would fail to compile couriertcpd in tcpd.
The problem was fixed by changing the options passed to libtool. The old args looked like "-Wl,-lgdbm". The new args looked like "-lgdbm". This had to be changed in 4 or 5 places in the Makefile. After doing that, it compiled.
I think that the newer version of libtool, 2.4.6, handles "-lgdbm", or the newer gcc handles it. I'm not sure which.