Detect absence of rl_outstream and handle accordingly.
[pspp] / acinclude.m4
index 52ac81acd3dc99e5b16d9405e518227d640fa604..ee7c9b0be68b98ad8ec071497da577f9cf3c29bd 100644 (file)
@@ -123,6 +123,9 @@ AC_DEFUN([PSPP_READLINE],
     AC_DEFINE(HAVE_READLINE, 1, [Define if you have the readline library.])
     AC_MSG_CHECKING([how to link with libreadline])
     AC_MSG_RESULT([$LIBREADLINE])
+    AC_SEARCH_LIBS([rl_outstream], [readline],
+        AC_DEFINE(HAVE_RL_OUTSTREAM, 1, [Define if the readline library provides rl_outstream.])
+    )
   else
     dnl If $LIBREADLINE didn't lead to a usable library, we don't
     dnl need $INCREADLINE either.