configure: check for readline properly

This commit is contained in:
Andrzej Rybczak
2015-11-11 15:33:32 +01:00
parent 5d13934fed
commit d7fb62c49a
7 changed files with 160 additions and 11 deletions

View File

@@ -1,8 +1,9 @@
AC_INIT(configure.ac)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE(ncmpcpp, 0.6.8_dev)
m4_include([m4/ax_lib_readline.m4])
AC_PREREQ(2.59)
AC_LANG_CPLUSPLUS
@@ -207,13 +208,13 @@ PKG_CHECK_MODULES([libmpdclient], [libmpdclient >= 2.8], [
dnl =========================
dnl = checking for readline =
dnl =========================
AC_CHECK_HEADERS([readline/readline.h readline/history.h],
AC_CHECK_LIB(readline, rl_initialize, LDFLAGS="$LDFLAGS -lreadline",
AC_MSG_ERROR([readline headers found but there is no readline library to make use of])
),
AC_MSG_ERROR([no readline/readline.h header file found])
)
AX_LIB_READLINE
if test "$ax_cv_lib_readline" = "no"; then
AC_MSG_ERROR([no readline compatible library found])
fi
if test "$ax_cv_lib_readline_history" = "no"; then
AC_MSG_WARN([readline library has no history functionality])
fi
dnl ========================
dnl = checking for pthread =