Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Test version 4.3.6-dev-1



On Fri, 10 Oct 2008 16:12:43 +0000
Clint Adams <clint@xxxxxxx> wrote:
> On Fri, Oct 10, 2008 at 04:09:17PM +0100, Peter Stephenson wrote:
> > Hmm... it looks like linking this in is unconditional if the library is
> > found.  We presumably need a --disable-gdbm or option.
> > 
> > You can turn off the gdbm module in other ways, but that doesn't
> > strictly stop the shell *linking* against libgdbm.
> 
> If anyone is actually going to care about this, I'll be happy to
> maintain it out-of-tree.

All we need is this.

Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.108
diff -u -r1.108 configure.ac
--- configure.ac	24 Sep 2008 09:10:17 -0000	1.108
+++ configure.ac	10 Oct 2008 16:27:46 -0000
@@ -351,6 +351,10 @@
 AC_HELP_STRING([--enable-cap],
 [enable the search for POSIX capabilities (may require additional headers to be added by hand)]))
 
+AC_ARG_ENABLE(gdbm,
+AC_HELP_STRING([--disable-gdbm], [turn off search for gdbm library]),
+[gdbm="$enableval"], [gdbm=yes])
+
 dnl ------------------
 dnl CHECK THE COMPILER
 dnl ------------------
@@ -563,7 +567,7 @@
 		 utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \
 		 netinet/in_systm.h pcre.h langinfo.h wchar.h stddef.h \
 		 sys/stropts.h iconv.h ncurses.h ncursesw/ncurses.h \
-		 ncurses/ncurses.h gdbm.h)
+		 ncurses/ncurses.h)
 if test x$dynamic = xyes; then
   AC_CHECK_HEADERS(dlfcn.h)
   AC_CHECK_HEADERS(dl.h)
@@ -834,7 +838,10 @@
   AC_DEFINE(MUST_DEFINE_OSPEED)
 fi
 
-AC_CHECK_LIB(gdbm, gdbm_open)
+if test x$gdbm != xno; then
+  AC_CHECK_HEADERS(gdbm.h)
+  AC_CHECK_LIB(gdbm, gdbm_open)
+fi
 
 dnl --------------
 dnl CHECK TYPEDEFS
@@ -2938,6 +2945,7 @@
   (*-lgdbm*)
   echo "WARNING: zsh has been linked against libgdbm.
 This means the binary is covered by the GNU General Public License.
-This does not affect the source code."
+This does not affect the source code.
+Run configure with --disable-gdbm if required."
   ;;
 esac


-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author