summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-09-09 16:21:03 (GMT)
committerGuido van Rossum <guido@python.org>1996-09-09 16:21:03 (GMT)
commit6f2260ea7f8814257923e824feee71ec666d4105 (patch)
treefe3f02bb4019c27fb7e59bb3fbe7bf3661c6a9b0 /configure.in
parent2c349bbc775a431ff10d939103717825ed5efe48 (diff)
downloadcpython-6f2260ea7f8814257923e824feee71ec666d4105.zip
cpython-6f2260ea7f8814257923e824feee71ec666d4105.tar.gz
cpython-6f2260ea7f8814257923e824feee71ec666d4105.tar.bz2
Fixed nextstep buglet; check for libreadline w/o libterm*
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in38
1 files changed, 24 insertions, 14 deletions
diff --git a/configure.in b/configure.in
index 2e90bdc..2435199 100644
--- a/configure.in
+++ b/configure.in
@@ -99,7 +99,7 @@ then
esac
fi
-if test -z "$ac_arch_flags"
+if test "$ac_arch_flags"
then
OPT="$OPT $ac_arch_flags"
fi
@@ -242,20 +242,30 @@ AC_DEFINE(WITH_READLINE)
if test -d "$withval"
then LDFLAGS="$LDFLAGS -L$withval"
fi
-termcap=
-AC_CHECK_LIB(termcap, tgetent, [termcap=termcap], [
-AC_CHECK_LIB(termlib, tgetent, [termcap=termlib], [
-AC_ERROR(no working termcap/termlib -- do not use --with-readline)])])
-AC_CHECK_LIB(readline, readline, [
+# first check if we can compile without lib termcap
+AC_MSG_CHECKING(for -lreadline without -ltermcap)
+# check if a libreadline exists
LIBS="$LIBS -lreadline"
-# 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_ERROR(no working GNU readline -- do not use --with-readline)],
--l$termcap)],
+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)