source: trunk/doc/build_tool.doxygen @ 1414

Last change on this file since 1414 was 1414, checked in by Peter, 13 years ago

adding some docs on m4 macro. This info is for users and because README is merely on how to build and install the library, I decided to put this text within doxygen generated stuff (which should be more accessible for a user) - refs #283.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1// $Id: build_tool.doxygen 1414 2008-08-17 16:23:34Z peter $
2//
3// Copyright (C) 2008 Peter Johansson
4//
5// This file is part of the yat library, http://dev.thep.lu.se/yat
6//
7// The yat library is free software; you can redistribute it and/or
8// modify it under the terms of the GNU General Public License as
9// published by the Free Software Foundation; either version 2 of the
10// License, or (at your option) any later version.
11//
12// The yat library is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15// General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program; if not, write to the Free Software
19// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20// 02111-1307, USA.
21
22
23/**
24\page build_tool Build Tools
25
26\section yat-config
27
28The \c yat-config script provides information on the local version of
29the library. For instance the following command shows that the yat
30header files are located in \c `/usr/local/include'
31
32\verbatim
33 #> yat-config --includedir
34/usr/local/include
35\endverbatim
36
37For more information use \c yat-config \c --help
38
39\section macro Autoconf Macro
40
41For applications using autoconf there is a macro available in \c
42yat.m4. The macro can be called from your \c configure.ac:
43
44\verbatim
45   YAT_CHECK_YAT([minimum-version], [action-if-found],[action-if-not-found])
46\endverbatim
47
48The argument minimum-version should be the number (\c MAJOR.MINOR or
49\c MAJOR.MINOR.PATCH) of the version you require. If yat header files
50and library are not found or the version is not new enough, macro will
51complain and execute shell command \c action-if-not-found. A suitable
52\c action-if-not-found could be
53
54\verbatim
55   AC_MSG_ERROR([could not find required version of yat])
56\endverbatim
57
58If the test is successful, \c HAVE_YAT is defined and \c
59action-if-found is executed. The test calls \c yat-config and sets
60variables \c YAT_CPPFLAGS, \c YAT_CXXFLAGS, \c YAT_LDFLAGS, \c
61YAT_LIBS, and \c YAT_LA_FILE. These flags can then be used in the \c
62Makefile.am. For instance:
63
64\verbatim
65   AM_CPPFLAGS = $(YAT_CPPFLAGS)
66   AM_CXXFLAGS = $(YAT_CXXFLAGS)
67   AM_LDFLAGS = $(YAT_LDFLAGS)
68   LDADD = $(YAT_LIBS)
69\endverbatim
70
71or when using libtool you could use \c YAT_LA_FILE:
72
73\verbatim
74   AM_CPPFLAGS = $(YAT_CPPFLAGS)
75   AM_CXXFLAGS = $(YAT_CXXFLAGS)
76   LDADD = $(YAT_LA_FILE)
77\endverbatim
78
79If you have yat installed with a different prefix than aclocal, for
80example, if yat is installed in prefix \c /usr/local and aclocal is
81located in /usr/bin, then you need to tell aclocal (or autoreconf)
82where to look for \c yat.m4
83
84\verbatim
85   #> aclocal -I /usr/local/share/aclocal
86\endverbatim
87
88*/
89
Note: See TracBrowser for help on using the repository browser.