aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac49
1 files changed, 49 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 15270b9..336e05c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,6 +124,55 @@ AC_SUBST(GDBM183_INCLUDEDIR)
124AM_CONDITIONAL([COMPAT_OPT], [test "$want_compat" = yes]) 124AM_CONDITIONAL([COMPAT_OPT], [test "$want_compat" = yes])
125AM_CONDITIONAL([ENABLE_EXPORT], [test "$want_export" = yes]) 125AM_CONDITIONAL([ENABLE_EXPORT], [test "$want_export" = yes])
126 126
127# Check for Curses libs.
128for lib in ncurses curses termcap
129do
130 AC_CHECK_LIB($lib, tputs, [CURSES_LIBS="-l$lib"; break])
131done
132
133AC_SUBST(CURSES_LIBS)
134# Readline
135AC_ARG_WITH([readline],
136 AC_HELP_STRING([--without-readline],
137 [do not use readline]),
138 [
139case "${withval}" in
140 yes) status_readline=yes ;;
141 no) status_readline=no ;;
142 *) AC_MSG_ERROR(bad value ${withval} for --without-readline) ;;
143esac],[status_readline=probe])
144
145AC_SUBST(READLINE_LIBS)
146
147if test "$status_readline" != "no"; then
148 dnl FIXME This should only link in the curses libraries if it's
149 dnl really needed!
150 saved_LIBS=$LIBS
151 LIBS="$LIBS $CURSES_LIBS"
152 AC_CHECK_LIB(readline, readline,
153 [status_readline=yes],
154 [if test "$status_readline" = "yes"; then
155 AC_MSG_ERROR(readline requested but does not seem to be installed)
156 else
157 status_readline=no
158 fi])
159 LIBS=$saved_LIBS
160
161 if test "$status_readline" = "yes"; then
162 AC_CHECK_HEADERS(readline/readline.h,
163 AC_DEFINE(WITH_READLINE,1,[Enable use of readline]))
164 READLINE_LIBS="-lreadline $CURSES_LIBS"
165 saved_LIBS=$LIBS
166 LIBS="$LIBS $READLINE_LIBS"
167 AC_CHECK_FUNCS(rl_completion_matches)
168 LIBS=$saved_LIBS
169 fi
170else
171 status_readline=no
172fi
173
174AM_CONDITIONAL([GDBM_COND_READLINE], [test "$status_readline" = "yes"])
175
127# Initialize the test suite. 176# Initialize the test suite.
128AC_CONFIG_TESTDIR(tests) 177AC_CONFIG_TESTDIR(tests)
129AC_CONFIG_FILES([tests/Makefile tests/atlocal po/Makefile.in]) 178AC_CONFIG_FILES([tests/Makefile tests/atlocal po/Makefile.in])

Return to:

Send suggestions and report system problems to the System administrator.