autoconf fixes and cleanups (check for dlopen() in libc too).

8 files changed