Kaydet (Commit) 6f2260ea authored tarafından Guido van Rossum's avatar Guido van Rossum

Fixed nextstep buglet; check for libreadline w/o libterm*

üst 2c349bbc
...@@ -99,7 +99,7 @@ then ...@@ -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) ...@@ -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
termcap= # first check if we can compile without lib termcap
AC_CHECK_LIB(termcap, tgetent, [termcap=termcap], [ AC_MSG_CHECKING(for -lreadline without -ltermcap)
AC_CHECK_LIB(termlib, tgetent, [termcap=termlib], [ # check if a libreadline exists
AC_ERROR(no working termcap/termlib -- do not use --with-readline)])])
AC_CHECK_LIB(readline, readline, [
LIBS="$LIBS -lreadline" LIBS="$LIBS -lreadline"
# Avoid possible conflict between shared libraries termcap and gl AC_TRY_LINK(extern char *readline();,char *line=readline();,[
# on IRIX 5: both contain a routine called clear. AC_MSG_RESULT(yes)],[
if test -f /usr/lib/lib$termcap.a AC_MSG_RESULT(no)
then LIBS="$LIBS /usr/lib/lib$termcap.a" AC_CHECKING(for -lreadline that needs -ltermcap)
else LIBS="$LIBS -l$termcap" termcap=
fi AC_CHECK_LIB(termcap, tgetent, [termcap=termcap], [
], [AC_ERROR(no working GNU readline -- do not use --with-readline)], AC_CHECK_LIB(termlib, tgetent, [termcap=termlib], [
-l$termcap)], 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_RESULT(no))
AC_MSG_CHECKING(for --with-thread) AC_MSG_CHECKING(for --with-thread)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment