dlopen() without a qualified path searches env vars and paths stamped
into the binary; Exim is usually setuid, so this becomes just the paths
stamped into the binary. On some platforms (*cough* macOS) libreadline
is not in the usual places.
So show how to stamp the Homebrew location of libreadline into the Exim
binary.
# Note that this option adds to the size of the Exim binary, because the
# dynamic loading library is not otherwise included.
+# If libreadline is not in the normal library paths, then because Exim is
+# setuid you'll need to ensure that the correct directory is stamped into
+# the binary so that dlopen will find it.
+# Eg, on macOS/Darwin with a third-party install of libreadline, perhaps:
+
+# EXTRALIBS_EXIM+=-Wl,-rpath,/usr/local/opt/readline/lib
+
#------------------------------------------------------------------------------
# Uncomment this setting to include IPv6 support.