README 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. THIS TARBALL IS NOT A FULL DISTRIBUTION.
  2. The contents of this tarball is designed to be incorporated into
  3. software packages that utilize the AutoOpts option automation
  4. package and are intended to be installed on systems that may not
  5. have libopts installed. It is redistributable under the terms
  6. of either the LGPL (see COPYING.lgpl) or under the terms of
  7. the advertising clause free BSD license (see COPYING.mbsd).
  8. Usage Instructions for autoconf/automake/libtoolized projects:
  9. 1. Install the unrolled tarball into your package source tree,
  10. copying ``libopts.m4'' to your autoconf macro directory.
  11. In your bootstrap (pre-configure) script, you can do this:
  12. rm -rf libopts libopts-*
  13. gunzip -c `autoopts-config libsrc` | tar -xvf -
  14. mv -f libopts-*.*.* libopts
  15. cp -fp libopts/m4/*.m4 m4/.
  16. I tend to put my configure auxiliary files in "m4".
  17. Whatever directory you choose, if it is not ".", then
  18. be sure to tell autoconf about it with:
  19. AC_CONFIG_AUX_DIR(m4)
  20. This is one macro where you *MUST* remember to *NOT* quote
  21. the argument. If you do, automake will get lost.
  22. 2. Add the following to your ``configure.ac'' file:
  23. LIBOPTS_CHECK
  24. or:
  25. LIBOPTS_CHECK([relative/path/to/libopts])
  26. This macro will automatically invoke
  27. AC_CONFIG_FILES( [relative/path/to/libopts/Makefile] )
  28. The default ``relative/path/to/libopts'' is simply
  29. ``libopts''.
  30. 3. Add the following to your top level ``Makefile.am'' file:
  31. if NEED_LIBOPTS
  32. SUBDIRS += $(LIBOPTS_DIR)
  33. endif
  34. where ``<...>'' can be whatever other files or directories
  35. you may need. The SUBDIRS must be properly ordered.
  36. *PLEASE NOTE* it is crucial that the SUBDIRS be set under the
  37. control of an automake conditional. To work correctly,
  38. automake has to know the range of possible values of SUBDIRS.
  39. It's a magical name with magical properties. ``NEED_LIBOPTS''
  40. will be correctly set by the ``LIBOPTS_CHECK'' macro, above.
  41. 4. Add ``$(LIBOPTS_CFLAGS)'' to relevant compiler flags and
  42. ``$(LIBOPTS_LDADD)'' to relevant link options whereever
  43. you need them in your build tree.
  44. 5. Make sure your object files explicitly depend upon the
  45. generated options header file. e.g.:
  46. $(prog_OBJECTS) : prog-opts.h
  47. prog-opts.h : prog-opts.c
  48. prog-opts.c : prog-opts.def
  49. autogen prog-opts.def
  50. 6. *OPTIONAL* --
  51. If you are creating man pages and texi documentation from
  52. the program options, you will need these rules somewhere, too:
  53. man_MANS = prog.1
  54. prog.1 : prog-opts.def
  55. autogen -Tagman1.tpl -bprog prog-opts.def
  56. prog-invoke.texi : prog-opts.def
  57. autogen -Taginfo.tpl -bprog-invoke prog-opts.def
  58. If your package does not utilize the auto* tools, then you
  59. will need to hand craft the rules for building the library.
  60. LICENSING:
  61. This material is copyright (c) 1993-2009 by Bruce Korb.
  62. You are licensed to use this under the terms of either
  63. the GNU Lesser General Public License (see: COPYING.lgpl), or,
  64. at your option, the modified Berkeley Software Distribution
  65. License (see: COPYING.mbsd). Both of these files should be
  66. included with this tarball.