Updated for vesrion 1.0.1

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

ugrid_functions

BUILDING THE SOFTWARE
BUILD REQUIREMENTS
NOTES
CONFIGURATION

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

BUILDING THE SOFTWARE

  To build the ugrid_functions 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'. If you are building this to run wiht a BES that
     was installed from RPM packages, be sure to check out the info about
     that in the README file!

  2. Type `make' to build the software, `make check' to run the tests.

  3. Type `make install' to install the 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 --force --install --verbose'
  
  before './configure; make'. If you try to run autoconf, etc., 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 and configured, 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 forom Gnu. We've tried using
    download tools, like fink, and building from source these
    packages, but so far going straight to GNU for the sources seems to
    work best. We continue to watch this issue and hope to get it resolved soon.

  o If you are concerned about introducing problems with your OS's package
    system, build and install curl, et c., into a special directory (e.g.,
    /opt/opendap/) and then be sure to set PATH to include the curl-config
    and xml2-config scripts before running configure (e.g., run configure as
    'PATH="$PATH:/opt/opendap/bin';./configure'). You probably should install
    libdap.a under /opt/opendap as well, so set prefix to that path:
    
	'PATH="$PATH:/opt/opendap/bin';./configure --prefix=/opt/opendap'

  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.
    This code has also been built on OSX 10.9 using Apple LLVM version
    5.1 (clang-503.0.40) (based on LLVM 3.4svn).

NOTES

  o If you are building on a new platform (one for which we don't supply
    binaries), please run the tests and tell us about any failures. To do a
    really complete job of this you'll need to get the GNU test system called
    DejaGNU and the CppUnit unit testing package. It is very simple to
    install these and we're very willing to help, so don't be shy!

  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 The gnulib software is used to provide replacement functions when
    autoconf detects that is necessary. To update the gnulib, check it out
    from CVS and run '$gnulib_home/gnulib-tool --lgpl --import' in this
    directory. Macros in configure.ac supply gnulib-tool with all the
    information it needs. Only developers working on libdap should ever have
    to do this.

  o To build a rpm file for a source or binary distribution: 1) Use 'make
    dist' to build a *.tar.gz file; 2) Copy that to ~/rpm/SOURCES,
    and; 3) Run 'rpmbuild -ts ~/rpm/SOURCES/libdap-3.5.1.tar.gz' to make the
    source package. Use '-tb' to make the binary package. I use a
    ~/.rpmmacros file that contains:

	%_topdir		/home/jimg/rpm
	%_tmppath               /home/jimg/rpm/tmp
	
    Or, use the 'rpm' target in the Makefile.

  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 cerr|<filename> option to besctl, besdaemon, and
      beslistener. You should just need to use besctl. You can either
      specify cerr or a file name with the -d option. If you specify cerr
      then debug output will go to standard error. If you specify a file
      name, then debug output will go to that file. You can not specify
      cout, as standard output is redirected to the socket.

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

CONFIGURATION

  o CONFIGURATION

    - The configuration file "ugrid_functions.conf" provided in this directory 
      should not need to be modified and will be install into 
      $prefix/etc/bes/modules during "make install"
      

