Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8c4ed9ae
Commit
8c4ed9ae
authored
Dec 31, 1996
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewritten the readline test, hopefully it's okay now.
parent
591bbb15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
31 deletions
+60
-31
configure.in
configure.in
+60
-31
No files found.
configure.in
View file @
8c4ed9ae
...
...
@@ -243,38 +243,67 @@ AC_MSG_RESULT($withval)
LIBS="$withval $LIBS"
], AC_MSG_RESULT(no))
AC_MSG_CHECKING(for --with-readline)
AC_ARG_WITH(readline, [--with-readline[=DIRECTORY] use GNU readline library], [
AC_MSG_RESULT($withval)
AC_DEFINE(WITH_READLINE)
if test -d "$withval"
then LDFLAGS="$LDFLAGS -L$withval"
AC_MSG_CHECKING(for --with(out)-readline)
use_readline="yes"
AC_ARG_WITH(readline,
[--with-readline=DIRECTORY search GNU readline library in DIRECTORY
--without-readline do not use GNU readline library],
[AC_MSG_RESULT($withval); use_readline="$withval"],
[AC_MSG_RESULT((default) yes)])
if test "$use_readline" != "no"
then
if test "$use_readline" != "yes"
then add_ldflags="-L$use_readline"
else add_ldflags=""
fi
# See where the termcap interface could be hiding...
AC_MSG_CHECKING(for readline and termcap libraries)
AC_CACHE_VAL(ac_cv_readline_termcap,
[
AC_MSG_RESULT(have to find out)
save_libs="$LIBS"
save_ldflags="$LDFLAGS"
LDFLAGS="$save_ldflags $add_ldflags"
rl="-lreadline"
first=""
# Hack for SGI IRIX 5.x.
# Both termcap and gl have an entry point clear().
# When linking with both shared libraries, we're in trouble.
# We don't need the one in termcap.
# By forcing a static link for termcap, we avoid
# linking its clear() entry point.
if test -f /usr/lib/libgl.so -a -f /usr/lib/libtermcap.a
then first="/usr/lib/libtermcap.a"
fi
for add_lib in \
"$first" "-ltermcap" "-ltermlib" "-lcurses" "-lncurses"
do
AC_MSG_CHECKING(for $rl $add_lib)
LIBS="$save_libs $rl $add_lib"
AC_TRY_LINK([extern char *readline();],
[char *line=readline();],
[AC_MSG_RESULT(yes);
ac_cv_readline_termcap="$rl $add_lib"],
[AC_MSG_RESULT(no)])
if test "$ac_cv_readline_termcap" != ""
then break
fi
done
LIBS="$save_libs"
LDFLAGS="$save_ldflags"
AC_MSG_CHECKING(result from check for readline and termcap)
])
if test "$ac_cv_readline_termcap" = ""
then
AC_MSG_RESULT(no)
AC_MSG_WARN(cannot link with GNU readline -- see config.log)
else
AC_MSG_RESULT($ac_cv_readline_termcap)
LIBS="$LIBS $ac_cv_readline_termcap"
LDFLAGS="$LDFLAGS $add_ldflags"
AC_DEFINE(WITH_READLINE)
fi
fi
# first check if we can compile without lib termcap
AC_MSG_CHECKING(for -lreadline without -ltermcap)
# check if a libreadline exists
LIBS="$LIBS -lreadline"
AC_TRY_LINK(extern char *readline();,char *line=readline();,[
AC_MSG_RESULT(yes)],[
AC_MSG_RESULT(no)
AC_CHECKING(for -lreadline that needs -ltermcap)
termcap=
AC_CHECK_LIB(termcap, tgetent, [termcap=termcap], [
AC_CHECK_LIB(termlib, tgetent, [termcap=termlib], [
AC_ERROR(no working -ltermcap/termlib found -- do not use --with-readline)])])
# Avoid possible conflict between shared libraries termcap and gl
# on IRIX 5: both contain a routine called clear.
if test -f /usr/lib/lib$termcap.a
then LIBS="$LIBS /usr/lib/lib$termcap.a"
else LIBS="$LIBS -l$termcap"
fi
AC_MSG_CHECKING(for -lreadline)
AC_TRY_LINK(extern char *readline();, char *line=readline();,[
AC_MSG_RESULT(yes)],[
AC_ERROR(no working GNU readline library found -- do not use --with-readline)])
])
],
AC_MSG_RESULT(no))
AC_MSG_CHECKING(for --with-thread)
AC_ARG_WITH(thread, [--with-thread[=DIRECTORY] make interpreter thread-safe], [
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment