next up previous contents
Next: Machine-specific notes Up: A Programmer's Guide to Previous: 4.3 Structure files

5 Compiling and installing Qddb

This chapter is important if you are the maintainer of Qddb at your site. It describes how to acquire, configure, compile, and install Qddb. If you are an application programmer or an end user, you might find this chapter interesting, but it will not be directly useful to you.

Qddb uses the Gnu autoconf utility to customize header files to your computer and to build Makefiles. It determines the location of important libraries and sets flags that indicate conventions appropriate to your version of Unix.

Qddb compilation requires that you have both bison and flex. (You need at least version 1.22 of bison and 2.4.7 of flex.) The autoconf utility will use certain environment variables such as MAKE and CC, if they are set, to establish your conventions. For example, you might configure Qddb as follows:

    $ export MAKE=gmake CC=gcc2 CFLAGS="-O2 -m486" 
    $ ./configure

Unless you indicate otherwise, configure will assume that you don't have Tcl or its extensions: Tk, Itcl, Blt, and others. By default, installation will only produce libQddb.a and routines such as qedit. You can specify that you want to use Tcl and its extensions. (You need at least version 7.3 of Tcl and 3.6a of Tk.)

    $ ./configure --with-tk --with-tclx --with-blt \
        --with-itcl --with-tktable

If the Tcl extensions are in strange places, you can specify their locations with environment variables:

    $ export XPM_LIBRARY_DIR=/usr/myXdir/lib \
      BLT_LIBRARY_DIR=/usr/mylocaldir/blt/lib \
      TK_LIBRARY_NAME=tk4.0 \
      TCL_LIBRARY_NAME=tcl7.4 \
      TK_LIBRARY_DIR=/usr/local/tk4/lib \
      TCL_LIBRARY_DIR=/usr/local/tk4/lib \
      CC=gcc2 CFLAGS="-O2 -m486" LDFLAGS="-s" \
      MAKE=gmake
    $ ./configure --with-tk --with-xpm --with-blt

Tcl 7.4 and Tk 4.0 install their libraries as libtcl7.4.a and libtk4.0.a respectively; if you use these versions you should specify TCL_LIBRARY_NAME and TK_LIBRARY_NAME.

The following Qddb-specific configure options are available. A full list of options can be found by typing ./configure --help.

  1. --with-diagnostics: turn on various sanity-checking mechanisms. This option is highly recommended.
  2. --with-gnumalloc: use GNU malloc (under Lib/GNUmalloc).
  3. --with-mallocstats: print malloc statistics at stabilization. Automatically includes -with-gnumalloc.
  4. --enable-maxmem=X: set maximum Qddb stabilization growth to `X' kilobytes. (5MB is the default, reasonable for a 16MB machine.) This number is just a soft limit; qindex and qstall may grow somewhat larger if necessary.
  5. --disable-maxmem: disable maximum stabilization growth. This option is not recommended.
  6. --with-default-editor=/X/Y/editor: Change the default editor to /X/Y/editor for qedit and qadd.
  7. --enable-record-locking: Turn on fcntl-style record locking (default)
  8. --disable-record-locking: Turn off fcntl-style record locking. This should only be used for single-user relations.
  9. --with-tcl: Compile and install qtclsh (TCL_LIBRARY_DIR, TCL_LIBRARY_NAME, TCL_INCLUDE_DIR)
  10. --with-tk: Compile and install both qwish and qtclsh (TK_LIBRARY_DIR, TK_LIBRARY_NAME, TK_INCLUDE_DIR)
  11. --with-xpm: Required if Tk libraries are compiled with Xpm extensions. (XPM_LIBRARY_DIR)
  12. --with-blt: Include Blt Tk extensions in qwish. This package should be included to get the ``I am busy'' cursor for the Fx toolkit. (BLT_LIBRARY_DIR)
  13. --with-tcltcp: Include TclTCP-2.X in qtclsh and qwish. (TCLTCP_LIBRARY_DIR)
  14. --with-tclx: Include TclX in qtclsh and qwish. (TCLX_LIBRARY_DIR)
  15. --with-expect: Include Expect in qtclsh and qwish. (EXPECT_LIBRARY_DIR)
  16. --with-tktable: Include TkTable 0.2a in qtclsh and qwish. The TkTable package is included in the Qddb sources for convenience.
  17. --with-itcl: Include Itcl 1.5 in qtclsh and qwish. This package is required for the Fx toolkit. (ITCL_LIBRARY_DIR)
  18. --with-tix: Include Tix 4.0 in qwish. (TIX_LIBRARY_DIR, TIX_LIBRARY_NAME)
  19. --with-tree: Include TkTree 4.0 in qwish. (TREE_LIBRARY_DIR)
  20. --with-default-date-format=%m/%d/%y: Set the default date format to %m/%d/%y or %d/%m/%y.

See Section 5.1 below for information on options for particular architectures.

Once you have configured the distribution, you may issue make in the top-level directory to make the binaries and libraries. make install will install the distribution in the place specified by --prefix (default: /usr/local/qddb). make clean removes object files, while make distclean cleans the distribution so that you can re-configure for another platform.

Some versions of make won't work well with Qddb. You might want to use Gnu make instead.




next up previous contents
Next: Machine-specific notes Up: A Programmer's Guide to Previous: 4.3 Structure files

Herrin Software Development, Inc.