X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/57ce68d00a352c063217eeb9a18cafc44ebcca4e..99cde35bb58605e86541acd812860c222e375af2:/configure.ac diff --git a/configure.ac b/configure.ac index 0ed842c..0b9bab1 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,25 @@ gl_EARLY LT_INIT gl_INIT +AC_CACHE_CHECK([if readline supports add_history], [dx_cv_rl_add_history], [dnl +dx_cv_rl_add_history=no +dx_save_libs=$LIBS +LIBS="$LIBS $LIBREADLINE" +AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl +#include +#if HAVE_READLINE_HISTORY_H +# include +#endif +], [dnl +(*add_history)(""); +])], [dx_cv_rl_add_history=yes], [dx_cv_rl_add_history=no]) +LIBS=$dx_save_libs +]) + +AS_IF([test x"$dx_cv_rl_add_history" = x"yes"], + [AC_DEFINE([HAVE_RL_ADD_HISTORY], [1], + [Define to 1 if readline supports add_history.])]) + m4_include([lib/gnulib.mk]) DX_GLSYM_PREFIX([cdecl__]) @@ -55,7 +74,6 @@ AS_CASE([$with_gsl], AM_CONDITIONAL([HAVE_GSL], [test x"$have_gsl" = x"yes"]) AC_CONFIG_FILES([ - exported.sh Makefile ]) AC_OUTPUT