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:
parent
3559d1f9b3
commit
3d15bd8806
|
@ -1,19 +1,24 @@
|
|||
# This file is transmogrified into Setup.config by config.status.
|
||||
|
||||
# The purpose of this file is to conditionally enable certain modules
|
||||
# based on configure-time options. Currently thread support, garbage
|
||||
# collection support, and the BSD DB modules are the only modules so
|
||||
# enabled.
|
||||
|
||||
@USE_THREAD_MODULE@thread threadmodule.c
|
||||
# based on configure-time options.
|
||||
|
||||
# Garbage collection enabled with --with-cycle-gc
|
||||
@USE_GC_MODULE@gc gcmodule.c
|
||||
|
||||
# You may want this to be built as a dynamically loaded module; uncomment
|
||||
# the following line in that case:
|
||||
# Threading
|
||||
@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
|
||||
@USE_BSDDB_MODULE@bsddb bsddbmodule.c @HAVE_LIBDB@
|
||||
|
|
|
@ -120,6 +120,8 @@ GLHACK=-Dclear=__GLclear
|
|||
# and you may have to change -ltermcap to -ltermlib or perhaps remove
|
||||
# it, depending on your system -- see the GNU readline instructions.
|
||||
# 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
|
||||
|
||||
|
@ -322,6 +324,8 @@ rotor rotormodule.c # enigma-inspired encryption
|
|||
# provided by the ncurses library. e.g. on Linux, link with -lncurses
|
||||
# instead of -lcurses; on SunOS 4.1.3, insert -I/usr/5include
|
||||
# -L/usr/5lib before -lcurses).
|
||||
#
|
||||
# First, look at Setup.config; configure may have set this for you.
|
||||
|
||||
#_curses _cursesmodule.c -lcurses -ltermcap
|
||||
# Wrapper for the panel library that's part of ncurses and SYSV curses.
|
||||
|
|
15
configure.in
15
configure.in
|
@ -734,6 +734,21 @@ AC_MSG_RESULT($withval)
|
|||
LIBS="$withval $LIBS"
|
||||
], 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)
|
||||
USE_THREAD_MODULE=""
|
||||
|
||||
|
|
Loading…
Reference in New Issue