PageRenderTime 22ms CodeModel.GetById 8ms app.highlight 11ms RepoModel.GetById 2ms app.codeStats 0ms

/contrib/ntp/libopts/README

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