mirror of
https://github.com/python/cpython.git
synced 2025-09-30 12:21:51 +00:00
Fixed nextstep buglet; check for libreadline w/o libterm*
This commit is contained in:
parent
2c349bbc77
commit
6f2260ea7f
1 changed files with 24 additions and 14 deletions
22
configure.in
22
configure.in
|
@ -99,7 +99,7 @@ then
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$ac_arch_flags"
|
if test "$ac_arch_flags"
|
||||||
then
|
then
|
||||||
OPT="$OPT $ac_arch_flags"
|
OPT="$OPT $ac_arch_flags"
|
||||||
fi
|
fi
|
||||||
|
@ -242,20 +242,30 @@ AC_DEFINE(WITH_READLINE)
|
||||||
if test -d "$withval"
|
if test -d "$withval"
|
||||||
then LDFLAGS="$LDFLAGS -L$withval"
|
then LDFLAGS="$LDFLAGS -L$withval"
|
||||||
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=
|
termcap=
|
||||||
AC_CHECK_LIB(termcap, tgetent, [termcap=termcap], [
|
AC_CHECK_LIB(termcap, tgetent, [termcap=termcap], [
|
||||||
AC_CHECK_LIB(termlib, tgetent, [termcap=termlib], [
|
AC_CHECK_LIB(termlib, tgetent, [termcap=termlib], [
|
||||||
AC_ERROR(no working termcap/termlib -- do not use --with-readline)])])
|
AC_ERROR(no working -ltermcap/termlib found -- do not use --with-readline)])])
|
||||||
AC_CHECK_LIB(readline, readline, [
|
|
||||||
LIBS="$LIBS -lreadline"
|
|
||||||
# Avoid possible conflict between shared libraries termcap and gl
|
# Avoid possible conflict between shared libraries termcap and gl
|
||||||
# on IRIX 5: both contain a routine called clear.
|
# on IRIX 5: both contain a routine called clear.
|
||||||
if test -f /usr/lib/lib$termcap.a
|
if test -f /usr/lib/lib$termcap.a
|
||||||
then LIBS="$LIBS /usr/lib/lib$termcap.a"
|
then LIBS="$LIBS /usr/lib/lib$termcap.a"
|
||||||
else LIBS="$LIBS -l$termcap"
|
else LIBS="$LIBS -l$termcap"
|
||||||
fi
|
fi
|
||||||
], [AC_ERROR(no working GNU readline -- do not use --with-readline)],
|
AC_MSG_CHECKING(for -lreadline)
|
||||||
-l$termcap)],
|
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_RESULT(no))
|
||||||
|
|
||||||
AC_MSG_CHECKING(for --with-thread)
|
AC_MSG_CHECKING(for --with-thread)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue