1
0

README 3.0 KB

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