--- configure.ac.jx	2010-04-09 21:49:03.000000000 -0400
+++ configure.ac	2011-04-01 13:24:14.000000000 -0400
@@ -454,6 +454,7 @@
 AM_CONDITIONAL(HAS_XDM_AUTH, test x$xdmauth = xyes -a x$xdmauth_enable != xno)
 
 AC_SEARCH_LIBS(crypt, crypt)
+AC_SEARCH_LIBS([dlopen], [dl])
 
 AC_SUBST(XDM_CFLAGS)
 AC_SUBST(XDM_LIBS)
