/[gentoo]/xml/htdocs/doc/en/articles/autotools-practices.xml
Gentoo

Diff of /xml/htdocs/doc/en/articles/autotools-practices.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml,v 1.1 2005/12/16 15:03:59 rane Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/autotools-practices.xml,v 1.2 2006/09/08 13:42:04 nightmorph Exp $ -->
4 4
5<guide link="/doc/en/articles/autotools-practices.xml"> 5<guide link="/doc/en/articles/autotools-practices.xml">
6<title>Best practices with autotools</title> 6<title>Best practices with autotools</title>
7 7
8<author title="Author"> 8<author title="Author">
92<path>configure.ac</path> to add these flags. 92<path>configure.ac</path> to add these flags.
93</p> 93</p>
94 94
95<p> 95<p>
96The most commonly used macros in configure.ac are AC_CHECK_HEADERS, 96The most commonly used macros in configure.ac are AC_CHECK_HEADERS,
97AC_CHECK_FUNCTS, and AC_CHECK_LIB, which test for the presence of, 97AC_CHECK_FUNCS, and AC_CHECK_LIB, which test for the presence of, respectively,
98respectively, some header files, some library functions, and a given library 98some header files, some library functions, and a given library (with a specific
99(with a specific function in it). They are important for portability as they 99function in it). They are important for portability as they provides a way to
100provides a way to check which headers are present and which are not (for 100check which headers are present and which are not (for example system headers
101example system headers that have different locations in different operating 101that have different locations in different operating systems), and to check
102systems), and to check whether a function is present in the system library 102whether a function is present in the system library (asprintf() is missing in
103(asprintf() is missing in OpenBSD for example, while it's present on GNU C 103OpenBSD for example, while it's present on GNU C library and FreeBSD), and
104library and FreeBSD), and finally to check for the presence of some third-party 104finally to check for the presence of some third-party library or to see if a
105library or to see if a specific link to a library is needed to get some 105specific link to a library is needed to get some functions (for example
106functions (for example dlopen() function is in libdl library on GNU systems, 106dlopen() function is in libdl library on GNU systems, while it's provided by
107while it's provided by the system's C library on FreeBSD). 107the system's C library on FreeBSD).
108</p> 108</p>
109 109
110<p> 110<p>
111Along with testing for the presence or absence of functions or headers (and 111Along with testing for the presence or absence of functions or headers (and
112sometimes libraries) you usually need to change the code's path (for example to 112sometimes libraries) you usually need to change the code's path (for example to

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20