apcupsd-ups: ignore generated files
[networkupstools/kirr.git] / docs / macros.txt
blob7bda2401044b4ecea4e34df0605492b822267397
1 NUT-specific autoconf macros
2 ----------------------------
4 The following NUT-specific autoconf macros are defined in the m4/
5 directory.
7 - NUT_TYPE_SOCKLEN_T
8 - NUT_TYPE_UINT8_T
9 - NUT_TYPE_UINT16_T
11         Check for the corresponding type in the system header files, and
12         #define a replacement if necessary.
14 - NUT_CHECK_LIBGD
15 - NUT_CHECK_LIBHAL
16 - NUT_CHECK_LIBNEON
17 - NUT_CHECK_LIBNETSNMP
18 - NUT_CHECK_LIBPOWERMAN
19 - NUT_CHECK_LIBOPENSSL
20 - NUT_CHECK_LIBNSS
21 - NUT_CHECK_LIBUSB
22 - NUT_CHECK_LIBWRAP
24         Determine the compiler flags for the corresponding library. On
25         success, set nut_have_libxxx="yes" and set LIBXXX_CFLAGS and
26         LIBXXX_LDFLAGS. On failure, set nut_have_libxxx="no". This macro
27         can be run multiple times, but will do the checking only once.
28         Here "xxx" should of course be replaced by the respective library name.
30         The checks for each library grow organically to compensate for
31         various bugs in the libraries, pkg-config, etc. This is why we have
32         a separate macro for each library.
34 - NUT_CHECK_IPV6
36         Check for various features required to compile the IPv6 support.
37         dnl Check for various features required for IPv6 support. Define a
38         preprocessor symbol for each individual feature (HAVE_GETADDRINFO,
39         HAVE_FREEADDRINFO, HAVE_STRUCT_ADDRINFO, HAVE_SOCKADDR_STORAGE,
40         SOCKADDR_IN6, IN6_ADDR, HAVE_IN6_IS_ADDR_V4MAPPED,
41         HAVE_AI_ADDRCONFIG). Also set the shell variable nut_have_ipv6=yes
42         if all the required features are present. Set nut_have_ipv6=no
43         otherwise.
45 - NUT_CHECK_OS
47         Check for the exact system name and type.
48         This was only used in the past to determine the packaging rule to be used
49         through the OS_NAME variable, but may be useful for other purposes in the
50         future.
52 - NUT_REPORT_FEATURE(FEATURE, VALUE, VARIABLE, DESCRIPTION) 
54         Schedule a line for the end-of-configuration feature summary.  The
55         FEATURE is a descriptive string such that the sentence "Checking
56         whether to FEATURE" makes sense, and VALUE describes the decision
57         taken (typically yes or no). The feature is also reported to the
58         terminal.
60         Also use VARIABLE and DESCRIPTION for defining AM_CONDITIONAL and
61         AC_DEFINE (only if VALUE = "yes"). VARIABLE is of the form 'WITH_<NAME>'.
63 - NUT_REPORT(FEATURE, VALUE)
65         Schedule a line for the end-of-configuration feature summary, without
66         printing anything to the terminal immediately. 
68 - NUT_PRINT_FEATURE_REPORT
70         Print out a list of the features that have been reported by
71         previous NUT_REPORT_FEATURE macro calls.
73 - NUT_ARG_WITH(FEATURE, DESCRIPTION, DEFAULT)
75         Declare a simple --with-FEATURE option with the given DESCRIPTION
76         and DEFAULT. Sets the variable nut_with_FEATURE.