Adapted version of Eric Raymond's patches to automatically configure

curses and readline (for Linux, at least).

These are done as shared libraries by default, and so is bsddb -- that
seems to make the most sense.
This commit is contained in:
Guido van Rossum 2001-01-10 18:53:48 +00:00
parent 3559d1f9b3
commit 3d15bd8806
4 changed files with 306 additions and 191 deletions

View File

@ -1,19 +1,24 @@
# This file is transmogrified into Setup.config by config.status. # This file is transmogrified into Setup.config by config.status.
# The purpose of this file is to conditionally enable certain modules # The purpose of this file is to conditionally enable certain modules
# based on configure-time options. Currently thread support, garbage # based on configure-time options.
# collection support, and the BSD DB modules are the only modules so
# enabled.
@USE_THREAD_MODULE@thread threadmodule.c
# Garbage collection enabled with --with-cycle-gc # Garbage collection enabled with --with-cycle-gc
@USE_GC_MODULE@gc gcmodule.c @USE_GC_MODULE@gc gcmodule.c
# You may want this to be built as a dynamically loaded module; uncomment # Threading
# the following line in that case: @USE_THREAD_MODULE@thread threadmodule.c
#*shared* # You may want the following to be built as statically loaded modules;
# comment out the *shared* line in that case:
*shared*
# Readline
@USE_READLINE_MODULE@readline readline.c -lreadline -ltermcap
# The ncurses library, under Linux
@USE_NCURSES_MODULE@_curses _cursesmodule.c -lncurses -ltermcap
# bsddb module enabled by --with-libdb or presence of db.h # bsddb module enabled by --with-libdb or presence of db.h
@USE_BSDDB_MODULE@bsddb bsddbmodule.c @HAVE_LIBDB@ @USE_BSDDB_MODULE@bsddb bsddbmodule.c @HAVE_LIBDB@

View File

@ -120,6 +120,8 @@ GLHACK=-Dclear=__GLclear
# and you may have to change -ltermcap to -ltermlib or perhaps remove # and you may have to change -ltermcap to -ltermlib or perhaps remove
# it, depending on your system -- see the GNU readline instructions. # it, depending on your system -- see the GNU readline instructions.
# It's okay for this to be a shared library, too. # It's okay for this to be a shared library, too.
#
# First, look at Setup.config; configure may have set this for you.
#readline readline.c -lreadline -ltermcap #readline readline.c -lreadline -ltermcap
@ -322,6 +324,8 @@ rotor rotormodule.c # enigma-inspired encryption
# provided by the ncurses library. e.g. on Linux, link with -lncurses # provided by the ncurses library. e.g. on Linux, link with -lncurses
# instead of -lcurses; on SunOS 4.1.3, insert -I/usr/5include # instead of -lcurses; on SunOS 4.1.3, insert -I/usr/5include
# -L/usr/5lib before -lcurses). # -L/usr/5lib before -lcurses).
#
# First, look at Setup.config; configure may have set this for you.
#_curses _cursesmodule.c -lcurses -ltermcap #_curses _cursesmodule.c -lcurses -ltermcap
# Wrapper for the panel library that's part of ncurses and SYSV curses. # Wrapper for the panel library that's part of ncurses and SYSV curses.

457
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -734,6 +734,21 @@ AC_MSG_RESULT($withval)
LIBS="$withval $LIBS" LIBS="$withval $LIBS"
], AC_MSG_RESULT(no)) ], AC_MSG_RESULT(no))
# This is used to generate Setup.config
AC_SUBST(USE_NCURSES_MODULE)
AC_CHECK_LIB(ncurses, initscr,
[USE_NCURSES_MODULE=""],
[USE_NCURSES_MODULE="#"],
-ltermcap)
# This is used to generate Setup.config
AC_SUBST(USE_READLINE_MODULE)
AC_CHECK_LIB(readline, readline,
[USE_READLINE_MODULE=""],
[USE_READLINE_MODULE="#"],
-ltermcap)
# This is used to generate Setup.config
AC_SUBST(USE_THREAD_MODULE) AC_SUBST(USE_THREAD_MODULE)
USE_THREAD_MODULE="" USE_THREAD_MODULE=""