Eric the half-a-wit, driven to berserk rage after repeatedly doing

builds during which he forgot to uncomment crucial library lines in
Setup, walks into Guido's East End nightclub with a tactical nuclear
weapon on his shoulder.  Said nuclear weapon is promptly deployed
exactly where it will do the most good, right in the middle of
configure.in.

With this patch, the set of libraries autoconfigured in is extended to
include ndbm, gdbm, and crypt.  This essentially eliminates any need to
tweak Setup for a normal Linux build.

"'E was a fair man.  Cruel, but fair."
This commit is contained in:
Eric S. Raymond 2001-01-17 08:25:11 +00:00
parent 90badd1286
commit a888540593
4 changed files with 394 additions and 204 deletions

View File

@ -20,8 +20,18 @@
# The ncurses library, under Linux # The ncurses library, under Linux
@USE_NCURSES_MODULE@_curses _cursesmodule.c -lncurses -ltermcap @USE_NCURSES_MODULE@_curses _cursesmodule.c -lncurses -ltermcap
# bsddb module enabled by --with-libdb or presence of db.h # bsddb(3) 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@
# dbm(3) may require -lndbm or similar # dbm(3) may require -lndbm or similar
@USE_DBM_MODULE@dbm dbmmodule.c @HAVE_LIBNDBM@ @USE_DBM_MODULE@dbm dbmmodule.c @HAVE_LIBNDBM@
# ndbm(3) may require -lndbm or similar
@USE_NDBM_MODULE@ndbm ndbmmodule.c @HAVE_LIBNDBM@
# gdbm(3) may require -lgdbm or similar
@USE_GDBM_MODULE@gdbm gdbmmodule.c @HAVE_LIBGDBM@
# crypt(3) may require -lcrypt or similar
@USE_CRYPT_MODULE@crypt cryptmodule.c @HAVE_LIBCRYPT@

View File

@ -172,6 +172,9 @@ _socket socketmodule.c
# The crypt module is now disabled by default because it breaks builds # The crypt module is now disabled by default because it breaks builds
# on many systems (where -lcrypt is needed), e.g. Linux (I believe). # on many systems (where -lcrypt is needed), e.g. Linux (I believe).
#
# First, look at Setup.config; configure may have set this for you.
#crypt cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems #crypt cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems
@ -359,10 +362,14 @@ new newmodule.c
# it will be compiled as a shared library by default. Compiling it as # it will be compiled as a shared library by default. Compiling it as
# a built-in module causes conflicts with the pybsddb3 module since it # a built-in module causes conflicts with the pybsddb3 module since it
# creates a static dependency on an out-of-date version of db.so. # creates a static dependency on an out-of-date version of db.so.
#
# First, look at Setup.config; configure may have set this for you.
#dbm dbmmodule.c # dbm(3) may require -lndbm or similar #dbm dbmmodule.c # dbm(3) may require -lndbm or similar
# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
#
# First, look at Setup.config; configure may have set this for you.
#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm #gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm

544
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -749,19 +749,46 @@ 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 #
# These are used to generate Setup.config. They autoconfigure several
# features that are otherwise severe pains in the butt.
#
# ncurses
AC_SUBST(USE_NCURSES_MODULE) AC_SUBST(USE_NCURSES_MODULE)
AC_CHECK_LIB(ncurses, initscr, AC_CHECK_LIB(ncurses, initscr,
[USE_NCURSES_MODULE=""], [USE_NCURSES_MODULE=""],
[USE_NCURSES_MODULE="#"], [USE_NCURSES_MODULE="#"],
-ltermcap) -ltermcap)
# GNU readline
# This is used to generate Setup.config
AC_SUBST(USE_READLINE_MODULE) AC_SUBST(USE_READLINE_MODULE)
AC_CHECK_LIB(readline, readline, AC_CHECK_LIB(readline, readline,
[USE_READLINE_MODULE=""], [USE_READLINE_MODULE=""],
[USE_READLINE_MODULE="#"], [USE_READLINE_MODULE="#"],
-ltermcap) -ltermcap)
# gdbm(3)
AC_SUBST(USE_GDBM_MODULE)
AC_SUBST(HAVE_LIBGDBM)
AC_CHECK_LIB(gdbm, gdbm_open,
[USE_GDBM_MODULE=""
HAVE_LIBGDBM=-lgdbm],
[USE_GDBM_MODULE="#"
HAVE_LIBGDBM=""])
# ndbm(3)
AC_SUBST(USE_NDBM_MODULE)
AC_SUBST(HAVE_LIBNDBM)
AC_CHECK_LIB(ndbm, ndbm_open,
[USE_NDBM_MODULE=""
HAVE_LIBNDBM=-lndbm],
[USE_NDBM_MODULE="#"
HAVE_LIBNDBM=""])
# crypt(3)
AC_SUBST(USE_CRYPT_MODULE)
AC_SUBST(HAVE_LIBCRYPT)
AC_CHECK_LIB(crypt, crypt,
[USE_CRYPT_MODULE=""
HAVE_LIBCRYPT=-lcrypt],
[USE_CRYPT_MODULE="#"
HAVE_LIBCRYPT=""])
# This is used to generate Setup.config # This is used to generate Setup.config
AC_SUBST(USE_THREAD_MODULE) AC_SUBST(USE_THREAD_MODULE)
@ -905,7 +932,7 @@ else
# make sure user knows why dbm support wasn't enabled even though # make sure user knows why dbm support wasn't enabled even though
# s/he requested it # s/he requested it
if test "$with_dbm" = "yes" if test "$with_dbm" = "yes"
then echo $ac_n "(requested by no ndbm.h was found) $ac_c" then echo $ac_n "(requested but no ndbm.h was found) $ac_c"
fi fi
with_dbm="no" with_dbm="no"
fi fi