
	$Id: INSTALL 11941 2005-08-15 18:02:54Z jimg $

---------------------------------------------------------------------------

BUILDING THE SOFTWARE
BUILD REQUIREMENTS
NOTES
CONFIGURATION

---------------------------------------------------------------------------

BUILDING THE SOFTWARE

  To build the hello world example module software, follow these steps:

  0. Please skim BUILD REQUIREMENTS and NOTES sections of this file before
     reporting problems. Also, this software _requires_ other software
     components be built and installed and that its configuration file be
     edited. Make sure you read over the CONFIGURATION section! Thanks.

  1. Type `./configure' at the system prompt. On some systems you may have
     to type `sh configure'.

  2. Type `make' to build the software, `make check' to run the tests. You
     must have DejaGNU to run `make check.'

  3. There is no need to install this module. But, if you would like to have
     it available to others to try out, type `make install' to install the
     BES software. The package installs in /usr/local/ by default; use
     --prefix to change that.

Building from Our SVN Repository

  If you are building from a SVN checkout, run 'autoreconf --verbose' before
  './configure; make'. If you try to run autoconf, et c., by hand and wind up
  with build files that don't work, use 'autoreconf --force --verbose' and
  then './configure; make'.

AFTER INSTALLING

  o See the CONFIGURATION section once you have finished building.

  o Once built you and configured will start and stop the BES using the
  besctl script located in the installation directories bin directory. To
  start the BES:

  besctl start

  To stop the BES:

  besctl stop

  Note: Stopping the BES only stops the daemon and the main listener. If you
  have clients connected to the BES then the listeners handling requests
  from those clients will remain up until the connections are closed. This
  is only the case in the servers 'multiple' mode and not its 'single' mode
  (refer to the BES configuration file for more on this topic).


BUILD REQUIREMENTS

  o Of course you will need the bes installed. Read the README and INSTALL
    files in the bes directory.

  o To build from a fresh SVN checkout, you'll need automake 1.9.2, autoconf
    2.59 (2.57 will probably work and that's what's listed in the configure.ac
    file) and libtool 1.5.6. Earlier versions may work, but may cause
    problems, particularly with the 'distcheck' target for make. Given those
    requirements, use 'autoreconf --force --verbose' and then build as
    described above.

    If you have an Intel Mac and you are experiencing configuration issues
    then you might need to download the latest and greatest autoconf,
    automake, and libtool using the DarwinPorts tool. We've tried using
    other download tools, like fink, and building from source these
    packages, but only DarwinPorts seems to resolve the issues. We continue
    to watch this issue and hope to get it resolved soon.

  o You should have gcc/g++ 3.3.x or greater. You'll also need to get the
    stdc++ library that matches the compiler (whatever version). NB: gcc
    2.8.x and earlier *won't* build the software. We're working on modifying
    the software so that it will build with a variety of compilers. As of
    01/22/03 we have built the code using Microsoft's Visual C++ 6.0 and GNU
    gcc/++ 3.2.1, 3.3, 3.4 and 4.0

NOTES

  o To test do the following:

    % besctl start -c ./bes.conf
    % bescmdln -h localhost -p 10002
    BESClient> say hello to world;
    <?xml version="1.0" encoding="UTF-8"?>
    <say>
	<response>
	    <text>hello world</text>
	</response>
    </say>
    BESClient> exit;
    % cat say.log
    [MDT Thu Oct 25 21:55:57 2007] "hello" said to "world"

  o If you are developing code that uses the DAP, get autoconf and SVN. We
    maintain a SVN-managed source tree that people outside the group may
    access. See http://scm.opendap.org:8090/trac/

  o DEBUGGING AIDS

    - Debugging is built in to the BES and does not require any special
      debug flags during compile time. To activate debugging in the BES,
      simpy use the -d "./bes.debug,sample" option to besctl. Debugging
      will go to the file ./bes.debug

    - You can also check the BES log file, the location specified in the
      BES configuration file. There might be some useful information
      in that file.

CONFIGURATION

  o CONFIGURATION

    - The configuration file provided in this directory should not need to
      be modified. To use this configuration file set the environment
      variable BES_CONF to point to this configuration file.

      setenv BES_CONF ./bes.conf

      or

      BES_CONF=./bes.conf
      export BES_CONF

      or use the -c option on the command line:

      % besctl start -c ./bes.conf

