Skip to content
Browse files

Check the availability of readline headers, not just the library

This commit also introduces an embarassing amount of whitespace to
configure.ac in a vain attempt to make it slightly more comprehensible
  • Loading branch information...
1 parent 7f730c9 commit d3c5707ac894e69e85661067bb184beeff37c5ad @ale-f ale-f committed
Showing with 24 additions and 6 deletions.
  1. +24 −6 configure.ac
View
30 configure.ac
@@ -31,12 +31,30 @@ AC_ARG_WITH(
LIBREADLINE=
AS_IF([test "x$with_readline" != xno],
- [AC_SEARCH_LIBS(
- [readline], [readline],
- [AC_SUBST([LIBREADLINE], ["-lreadline"]) AC_DEFINE([HAVE_LIBREADLINE], [1], [Define if you have libreadline])],
- [if test "x$with_readline" != xcheck; then
- AC_MSG_FAILURE([readline test failed (--without-readline to disable)])
- fi], [])])
+ [
+ AC_CHECK_HEADER(
+ [readline/readline.h],
+ [
+ AC_SEARCH_LIBS(
+ [readline],
+ [readline],
+ [
+ AC_SUBST([LIBREADLINE], ["-lreadline"])
+ AC_DEFINE(HAVE_LIBREADLINE, [1], [Define if you have libreadline])
+ ], [
+ if test "x$with_readline" != xcheck; then
+ AC_MSG_FAILURE([readline test failed (--without-readline to disable)])
+ fi
+ ]
+ )
+ ], [
+ if test "x$with_readline" != xcheck; then
+ AC_MSG_FAILURE([readline test failed (--without-readline to disable)])
+ fi
+ ]
+ )
+ ]
+)
AC_HEADER_ASSERT

0 comments on commit d3c5707

Please sign in to comment.
Something went wrong with that request. Please try again.