        THIS TARBALL IS NOT A FULL DISTRIBUTION.

The contents of this tarball is designed to be incorporated into
software packages that utilize the AutoOpts option automation
package and are intended to be installed on systems that may not
have libopts installed.

Usage Instructions for autoconf/automake/libtoolized projects:

1. Install the unrolled tarball into your package source tree,
   copying ``libopts.m4'' to your autoconf macro directory.

   In your bootstrap (pre-configure) script, you can do this:

      rm -rf libopts libopts-*
      gunzip -c `autoopts-config libsrc` | tar -xvf -
      mv -f libopts-*.*.* libopts
      cp -fp libopts/libopts.m4 config/.

   I tend to put my configure auxiliary files in "config".
   Whatever directory you choose, if it is not ".", then
   be sure to tell autoconf about it with:

      AC_CONFIG_AUX_DIR(config)

   This is one macro where you *MUST* remember to *NOT* quote
   the argument.  If you do, automake will get lost.

2. Add the following to your ``configure.ac'' file:

      LIBOPTS_CHECK

   This macro will automatically invoke

      AC_CONFIG_FILES( [libopts/Makefile] )

3. Add the following to your top level ``Makefile.am'' file:

      include $(srcdir)/libopts/MakeDefs.inc
      EXTRA_DIST = $(LIBOPTS_REDIST) <...>
      SUBDIRS = <...> $(LIBOPTS_DIR) <...>
      if NEED_LIBOPTS
         <<Makefile.am text for when building libopts>>
      else
         <<Makefile.am text for when libopts not needed>>
      endif

   where ``<...>'' can be whatever other files or directories
   you may need.  The SUBDIRS must be properly ordered.
   ``LIBOPTS_CHECK'' will ensure that ``$(LIBOPTS_DIR)''
   is empty if compiling libopts is not necessary.

   Unfortunately, the "redist" stuff is all necessary to get the
   correct set of files in your distribution.  If you simply add,
   "libopts", you'll include unmodifiable files that will cause
   distcheck to fail.  If you try to name all the files yourself,
   you'll miss some when the distribution changes.  Therefore,
   we have the magic "MakeDefs.inc" file in the distribution.

   You may not need the "NEED_LIBOPTS" construct, but it's there.

4. Add ``$(LIBOPTS_CFLAGS)'' to relevant compiler flags and
   ``$(LIBOPTS_LDADD)'' to relevant link options whereever
   you need them in your build tree.

5. Make sure your object files explicitly depend upon the
   generated options header file.  e.g.:

     $(prog_OBJECTS) : prog-opts.h
     prog-opts.h : prog-opts.c
     prog-opts.c : prog-opts.def
         autogen prog-opts.def

6. *OPTIONAL* --
   If you are creating man pages and texi documentation from
   the program options, you will need these rules somewhere, too:

     man_MANS = prog.1
     prog.1 : prog-opts.def
         autogen -Tagman1.tpl -bprog prog-opts.def

     prog-invoke.texi : prog-opts.def
         autogen -Taginfo.tpl -bprog-invoke prog-opts.def

If your package does not utilize the auto* tools, then you
will need to hand craft the rules for building the library.

LICENSING:

This material is copyright 1993-2003 by Bruce Korb.
You are licensed to use this under the terms of either
the GNU Lesser General Public License (see: COPYING.lgpl), or,
at your option, the modified Berkeley Software Distribution
License (see:  COPYING.mbsd).  Both of these files should be
included with this tarball.
