autoconf: automatically detect if -ldl is required.

This logic was copied from the xserver.
1 file changed