Put AC_DEFINE symbols definitions directly in the configure script so
that we no longer need an acconfig.h. Cleaned up dlopen() tests a bit.

diff --git a/include/config.h.in b/include/config.h.in
index 52ba496..588b278 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -40,120 +40,6 @@
 /* Define if the X Window System is missing or not being used.  */
 #undef X_DISPLAY_MISSING
 
-/* Define if .type asm directive must be inside a .def directive */
-#undef NEED_TYPE_IN_DEF
-
-/* Define if symbols declared in assembly code need an underscore prefix */
-#undef NEED_UNDERSCORE_PREFIX
-
-/* Define to use .string instead of .ascii */
-#undef HAVE_ASM_STRING
-
-/* Define if struct msghdr contains msg_accrights */
-#undef HAVE_MSGHDR_ACCRIGHTS
-
-/* Define if struct sockaddr_un contains sun_len */
-#undef HAVE_SOCKADDR_SUN_LEN
-
-/* Define if you have the XKB extension */
-#undef HAVE_XKB
-
-/* Define if you have the Xxf86dga library (-lXxf86dga).  */
-#undef HAVE_LIBXXF86DGA
-
-/* Define if you have the Xxf86dga library version 2.0 (-lXxf86dga).  */
-#undef HAVE_LIBXXF86DGA2
-
-/* Define if you have the X Shm extension */
-#undef HAVE_LIBXXSHM
-
-/* Define if you have the X Shape extension */
-#undef HAVE_LIBXSHAPE
-
-/* Define if you have the Xxf86vm library */
-#undef HAVE_LIBXXF86VM
-
-/* Define if you have the Xpm library */
-#undef HAVE_LIBXXPM
-
-/* Define if you have the Open Sound system.  */
-#undef HAVE_OSS
-
-/* Define if you have the Open Sound system (MIDI interface).  */
-#undef HAVE_OSS_MIDI
-
-/* Define if X libraries are not reentrant (compiled without -D_REENTRANT).  */
-#undef NO_REENTRANT_X11
-
-/* Define to the name of the function returning erro for reentrant libc */
-#undef ERRNO_LOCATION
-
-/* Define if all debug messages are to be compiled out */
-#undef NO_DEBUG_MSGS
-
-/* Define if TRACE messages are to be compiled out */
-#undef NO_TRACE_MSGS
-
-/* Define if the struct statfs has the member bavail */
-#undef STATFS_HAS_BAVAIL
-
-/* Define if the struct statfs has the member bfree */
-#undef STATFS_HAS_BFREE
-
-/* Define if the struct statfs is defined by <sys/vfs.h> */
-#undef STATFS_DEFINED_BY_SYS_VFS
-
-/* Define if the struct statfs is defined by <sys/statfs.h> */
-#undef STATFS_DEFINED_BY_SYS_STATFS
-
-/* Define if the struct statfs is defined by <sys/mount.h> */
-#undef STATFS_DEFINED_BY_SYS_MOUNT
-
-/* Define if ncurses have the new resizeterm function */
-#undef HAVE_RESIZETERM
-
-/* Define if ncurses have the new getbkgd function */
-#undef HAVE_GETBKGD
-
-/* Define if IPX should use netipx/ipx.h from libc */
-#undef HAVE_IPX_GNU
-
-/* Define if IPX includes are taken from Linux kernel */
-#undef HAVE_IPX_LINUX
-
-/* Define if OpenGL is present on the system or not */
-#undef HAVE_OPENGL
-
-/* Define if the system has dynamic link library support with the dl* API */
-#undef HAVE_DL_API
-
-/* Define if <linux/joystick.h> defines the Linux 2.2 joystick API */
-#undef HAVE_LINUX_22_JOYSTICK_API
-
-/* Define if the OpenGL library supports the glXGetProcAddressARB call */
-#undef HAVE_GLX_GETPROCADDRESS
-
-/* Define if the OpenGL headers define extension typedefs */
-#undef HAVE_GLEXT_PROTOTYPES
-
-/* Define if the X libraries support XVideo */
-#undef HAVE_XVIDEO
-
-/* Define if Mesa's OSMesa (off-screen rendering) library is present */
-#undef HAVE_OSMESA
-
-/* Define if Linux-style gethostbyname_r and gethostbyaddr_r are available */
-#undef HAVE_LINUX_GETHOSTBYNAME_R_6
-
-/* Define if we have linux/input.h AND it contains the INPUT event API */
-#undef HAVE_CORRECT_LINUXINPUT_H
-
-/* Define if we have CUPS */
-#undef HAVE_CUPS
-
-/* Define if FreeType 2 is installed */
-#undef HAVE_FREETYPE
-
 /* The number of bytes in a long long.  */
 #undef SIZEOF_LONG_LONG
 
@@ -184,6 +70,9 @@
 /* Define if you have the ftruncate64 function.  */
 #undef HAVE_FTRUNCATE64
 
+/* Define if you have the getbkgd function.  */
+#undef HAVE_GETBKGD
+
 /* Define if you have the gethostbyname function.  */
 #undef HAVE_GETHOSTBYNAME
 
@@ -232,6 +121,9 @@
 /* Define if you have the openpty function.  */
 #undef HAVE_OPENPTY
 
+/* Define if you have the resizeterm function.  */
+#undef HAVE_RESIZETERM
+
 /* Define if you have the rfork function.  */
 #undef HAVE_RFORK
 
@@ -502,6 +394,9 @@
 /* Define if you have the <ucontext.h> header file.  */
 #undef HAVE_UCONTEXT_H
 
+/* Define if you have the GL library (-lGL).  */
+#undef HAVE_LIBGL
+
 /* Define if you have the curses library (-lcurses).  */
 #undef HAVE_LIBCURSES
 
@@ -523,9 +418,111 @@
 /* Define if you have the xpg4 library (-lxpg4).  */
 #undef HAVE_LIBXPG4
 
+/* Define if all debug messages are to be compiled out */
+#undef NO_DEBUG_MSGS
+
+/* Define if TRACE messages are to be compiled out */
+#undef NO_TRACE_MSGS
+
+/* Define if you have the Xpm library */
+#undef HAVE_LIBXXPM
+
+/* Define if you have the XKB extension */
+#undef HAVE_XKB
+
+/* Define if you have the X Shm extension */
+#undef HAVE_LIBXXSHM
+
+/* Define if you have the X Shape extension */
+#undef HAVE_LIBXSHAPE
+
+/* Define if you have the Xxf86dga library version 2 */
+#undef HAVE_LIBXXF86DGA2
+
+/* Define if you have the Xxf86dga library version 1 */
+#undef HAVE_LIBXXF86DGA
+
+/* Define if you have the Xxf86vm library */
+#undef HAVE_LIBXXF86VM
+
+/* Define if the X libraries support XVideo */
+#undef HAVE_XVIDEO
+
+/* Define if OpenGL is present on the system */
+#undef HAVE_OPENGL
+
+/* Define if the OpenGL library supports the glXGetProcAddressARB call */
+#undef HAVE_GLX_GETPROCADDRESS
+
+/* Define if the OpenGL headers define extension typedefs */
+#undef HAVE_GLEXT_PROTOTYPES
+
+/* Define if we have CUPS */
+#undef HAVE_CUPS
+
+/* Define if FreeType 2 is installed */
+#undef HAVE_FREETYPE
+
 /* Define if we can use ppdev.h for parallel port access */
 #undef HAVE_PPDEV
 
+/* Define if IPX should use netipx/ipx.h from libc */
+#undef HAVE_IPX_GNU
+
+/* Define if IPX includes are taken from Linux kernel */
+#undef HAVE_IPX_LINUX
+
+/* Define if you have the Open Sound system */
+#undef HAVE_OSS
+
+/* Define if you have the Open Sound system (MIDI interface) */
+#undef HAVE_OSS_MIDI
+
 /* Set this to 64 to enable 64-bit file support on Linux */
 #undef _FILE_OFFSET_BITS
 
+/* Define if .type asm directive must be inside a .def directive */
+#undef NEED_TYPE_IN_DEF
+
+/* Define if symbols declared in assembly code need an underscore prefix */
+#undef NEED_UNDERSCORE_PREFIX
+
+/* Define to use .string instead of .ascii */
+#undef HAVE_ASM_STRING
+
+/* Define to the name of the function returning errno for reentrant libc */
+#undef ERRNO_LOCATION
+
+/* Define if X libraries are not reentrant (compiled without -D_REENTRANT) */
+#undef NO_REENTRANT_X11
+
+/* Define if we have linux/input.h AND it contains the INPUT event API */
+#undef HAVE_CORRECT_LINUXINPUT_H
+
+/* Define if Linux-style gethostbyname_r and gethostbyaddr_r are available */
+#undef HAVE_LINUX_GETHOSTBYNAME_R_6
+
+/* Define if <linux/joystick.h> defines the Linux 2.2 joystick API */
+#undef HAVE_LINUX_22_JOYSTICK_API
+
+/* Define if the struct statfs is defined by <sys/vfs.h> */
+#undef STATFS_DEFINED_BY_SYS_VFS
+
+/* Define if the struct statfs is defined by <sys/statfs.h> */
+#undef STATFS_DEFINED_BY_SYS_STATFS
+
+/* Define if the struct statfs is defined by <sys/mount.h> */
+#undef STATFS_DEFINED_BY_SYS_MOUNT
+
+/* Define if the struct statfs has the member bfree */
+#undef STATFS_HAS_BFREE
+
+/* Define if the struct statfs has the member bavail */
+#undef STATFS_HAS_BAVAIL
+
+/* Define if struct msghdr contains msg_accrights */
+#undef HAVE_MSGHDR_ACCRIGHTS
+
+/* Define if struct sockaddr_un contains sun_len */
+#undef HAVE_SOCKADDR_SUN_LEN
+