summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorJeff Bailey <jbailey@gnu.org>2002-02-21 21:55:54 +0000
committerJeff Bailey <jbailey@gnu.org>2002-02-21 21:55:54 +0000
commite443ed152e9591ddbb93f9814c9bd0cdd0114702 (patch)
tree8578f671f4f3b4797921da52c63cb107ccfbf809 /configure.in
parent4f73d50f766dd2a5429aaa967c2e818d380c76fe (diff)
downloadmailutils-e443ed152e9591ddbb93f9814c9bd0cdd0114702.tar.gz
mailutils-e443ed152e9591ddbb93f9814c9bd0cdd0114702.tar.bz2
Curses detection. Swap library link order in sieve to make sure dependacies are caught right. Add errno.h to mailutils/Makefile.am for make release
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in38
1 files changed, 28 insertions, 10 deletions
diff --git a/configure.in b/configure.in
index 1b427aba7..052376870 100644
--- a/configure.in
+++ b/configure.in
@@ -270,19 +270,37 @@ AC_CHECK_FUNC(gethostbyname, [true],
AC_CHECK_FUNC(socket, [true],
AC_CHECK_LIB(socket, socket, LIBS="-lsocket $LIBS"))
+dnl Check for Curses libs.
+AC_CHECK_LIB(ncurses, tputs, CURSES_LIBS="-lncurses",
+ AC_CHECK_LIB(curses, tputs, CURSES_LIBS="-lcurses"))
+
+AC_SUBST(CURSES_LIBS)
+
dnl Check for GNU Readline
AC_SUBST(READLINE_LIBS)
+
if test x"$usereadline" = x"yes"; then
- AC_CHECK_LIB(readline, readline,
- [AC_CHECK_HEADERS(readline/readline.h,
- AC_DEFINE(WITH_READLINE))
- READLINE_LIBS="-lcurses -lreadline"
- saved_LIBS=$LIBS
- LIBS="$LIBS $READLINE_LIBS"
- AC_CHECK_FUNCS(rl_completion_matches)
- LIBS=$saved_LIBS],
- :,
- -lcurses)
+
+ dnl FIXME This should only link in the curses libraries if it's
+ dnl really needed!
+
+ saved_LIBS=$LIBS
+ LIBS="$LIBS $CURSES_LIBS"
+ AC_CHECK_LIB(readline, readline, mu_have_readline=yes)
+ LIBS=$saved_LIBS
+
+ if test x"$mu_have_readline" = x"yes"; then
+ AC_CHECK_HEADERS(readline/readline.h,
+ AC_DEFINE(WITH_READLINE))
+ READLINE_LIBS="-lreadline $CURSES_LIBS"
+ saved_LIBS=$LIBS
+ LIBS="$LIBS $READLINE_LIBS"
+ AC_CHECK_FUNCS(rl_completion_matches)
+ LIBS=$saved_LIBS
+ else
+ AC_MSG_WARN(readline requested but does not seem to be installed)
+ fi
+
fi
dnl Check for DBM

Return to:

Send suggestions and report system problems to the System administrator.