AC_CACHE_CHECK([for version of libreadline], [ginac_cv_rl_supported], [
ginac_cv_rl_supported="no"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
AC_CACHE_CHECK([for version of libreadline], [ginac_cv_rl_supported], [
ginac_cv_rl_supported="no"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <readline/readline.h>
#if !defined(RL_VERSION_MAJOR) || !defined(RL_VERSION_MINOR)
#error "Ancient/unsupported version of readline"
#include <readline/readline.h>
#if !defined(RL_VERSION_MAJOR) || !defined(RL_VERSION_MINOR)
#error "Ancient/unsupported version of readline"