+### Checks for special libraries, must be done up-front.
+SHLIB_LIST=""
+CF_WITH_GPM
+if test "$with_gpm" != no ; then
+ AC_MSG_CHECKING(if you want to load GPM dynamically)
+ AC_ARG_WITH(dlsym,
+ [ --without-dlsym do not use dlsym() to load GPM dynamically],
+ [with_dlsym=$withval],
+ [with_dlsym=yes])
+ AC_MSG_RESULT($with_dlsym)
+ if test "x$with_dlsym" = xyes ; then
+ CF_FUNC_DLSYM
+ if test "x$with_gpm" != xyes ; then
+ CF_VERBOSE(assuming soname for gpm is $with_gpm)
+ cf_cv_gpm_soname="$with_gpm"
+ else
+ CF_LIB_SONAME([#include <gpm.h>],[if (Gpm_Open(0,0)) Gpm_Close();],gpm)
+ fi
+ test "$cf_cv_gpm_soname" != "unknown" && AC_DEFINE_UNQUOTED(LIBGPM_SONAME,"$cf_cv_gpm_soname",[Define as needed to set the gpm share library soname])
+ SHLIB_LIST="-ldl $SHLIB_LIST"
+ CF_ADD_LIB(dl,PRIVATE_LIBS)
+ else
+ SHLIB_LIST="-lgpm $SHLIB_LIST"
+ CF_ADD_LIB(gpm,TEST_LIBS)
+ CF_ADD_LIB(gpm,PRIVATE_LIBS)
+ fi
+ AC_DEFINE(HAVE_LIBGPM,1,[Define to 1 if we have the gpm library])
+ CF_CHECK_GPM_WGETCH
+fi
+
+CF_WITH_PCRE2
+CF_WITH_SYSMOUSE
+