]> git.deb.at Git - pkg/abook.git/blobdiff - configure.in
added --with-readline configure option
[pkg/abook.git] / configure.in
index a03bbe75cbe11a250c41e4b89f8d4dabd357e003..772c81c4faffe2ed93056ac8077d1905efa89148 100644 (file)
@@ -46,12 +46,30 @@ dnl --------------------------
 dnl end of (n)curses detection
 dnl --------------------------
 
+dnl ------------------
+dnl readline detection
+dnl ------------------
+
+abook_cv_readline=/usr
+AC_ARG_WITH(readline, [  --with-readline=DIR     Where readline is installed ],
+       [if test $withval != yes; then
+               abook_cv_readline=$withval
+       fi
+       if test x$abook_cv_readline != x/usr; then
+               LDFLAGS="-L${abook_cv_readline}/lib $LDFLAGS"
+               CPPFLAGS="$CPPFLAGS -I${abook_cv_readline}/include"
+       fi])
+
 AC_LIB_READLINE
 
 if test x$ac_cv_lib_readline = xno -o x$ac_cv_lib_readline_history = xno; then
        AC_MSG_ERROR([*** readline library not found or it doesn't support history ***])
 fi
 
+dnl -------------------------
+dnl end of readline detection
+dnl -------------------------
+
 AC_CHECK_FUNCS(resizeterm)
 
 AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF)],)