doc: update Vala documentation
[automake.git] / t / self-check-configure-help.sh
blob811087e68651668c112ca19754fb761ac245c68f
1 #! /bin/sh
2 # Copyright (C) 2011-2024 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
17 # Sanity check on the function used by the automake testsuite to
18 # analyze output of "configure --help".
20 . test-init.sh
22 # FIXME: this test is a good candidate for a conversion to TAP.
24 # Prefer real-world data. This is from the help screen of the
25 # configure script from GNU coreutils, with small adaptations.
26 cat > help <<'END'
27 'configure' configures GNU coreutils 8.14a to adapt to many kinds of systems.
29 Usage: ./configure [OPTION]... [VAR=VALUE]...
31 To assign environment variables (e.g., CC, CFLAGS...), specify them as
32 VAR=VALUE. See below for descriptions of some of the useful variables.
34 Defaults for the options are specified in brackets.
36 Configuration:
37 -h, --help display this help and exit
38 --help=short display options specific to this package
39 --help=recursive display the short help of all the included packages
40 -V, --version display version information and exit
41 -q, --quiet, --silent do not print 'checking ...' messages
42 --cache-file=FILE cache test results in FILE [disabled]
43 -C, --config-cache alias for '--cache-file=config.cache'
44 -n, --no-create do not create output files
45 --srcdir=DIR find the sources in DIR [configure dir or '..']
47 Installation directories:
48 --prefix=PREFIX install architecture-independent files in PREFIX
49 [/usr/local]
50 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
51 [PREFIX]
53 By default, 'make install' will install all the files in
54 '/usr/local/bin', '/usr/local/lib' etc. You can specify
55 an installation prefix other than '/usr/local' using '--prefix',
56 for instance '--prefix=$HOME'.
58 For better control, use the options below.
60 Fine tuning of the installation directories:
61 --bindir=DIR user executables [EPREFIX/bin]
62 --sbindir=DIR system admin executables [EPREFIX/sbin]
63 --libexecdir=DIR program executables [EPREFIX/libexec]
64 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
65 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
66 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
67 --libdir=DIR object code libraries [EPREFIX/lib]
68 --includedir=DIR C header files [PREFIX/include]
69 --oldincludedir=DIR C header files for non-gcc [/usr/include]
70 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
71 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
72 --infodir=DIR info documentation [DATAROOTDIR/info]
73 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
74 --mandir=DIR man documentation [DATAROOTDIR/man]
75 --docdir=DIR documentation root [DATAROOTDIR/doc/coreutils]
76 --htmldir=DIR html documentation [DOCDIR]
77 --dvidir=DIR dvi documentation [DOCDIR]
78 --pdfdir=DIR pdf documentation [DOCDIR]
79 --psdir=DIR ps documentation [DOCDIR]
81 Program names:
82 --program-prefix=PREFIX prepend PREFIX to installed program names
83 --program-suffix=SUFFIX append SUFFIX to installed program names
84 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
86 System types:
87 --build=BUILD configure for building on BUILD [guessed]
88 --host=HOST cross-compile to build programs to run on HOST [BUILD]
90 Optional Features:
91 --disable-option-checking ignore unrecognized --enable/--with options
92 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
93 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
94 --enable-silent-rules less verbose build output (undo: 'make V=1')
95 --disable-silent-rules verbose build output (undo: 'make V=0')
96 --disable-dependency-tracking speeds up one-time build
97 --enable-dependency-tracking do not reject slow dependency extractors
98 --disable-largefile omit support for large files
99 --enable-threads={posix|solaris|pth|win32}
100 specify multithreading API
101 --disable-threads build without multithread safety
102 --disable-acl do not support ACLs
103 --disable-assert turn off assertions
104 --disable-rpath do not hardcode runtime library paths
105 --disable-xattr do not support extended attributes
106 --disable-libcap disable libcap support
107 --enable-gcc-warnings turn on lots of GCC warnings (for developers)
108 --enable-install-program=PROG_LIST
109 install the programs in PROG_LIST (comma-separated,
110 default: none)
111 --enable-no-install-program=PROG_LIST
112 do NOT install the programs in PROG_LIST
113 (comma-separated, default: arch,hostname,su)
114 --disable-nls do not use Native Language Support
116 Optional Packages:
117 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
118 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
119 --with-gnu-ld assume the C compiler uses GNU ld default=no
120 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
121 --without-libiconv-prefix don't search for libiconv in includedir and libdir
122 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
123 --without-libpth-prefix don't search for libpth in includedir and libdir
124 --without-included-regex
125 don't compile regex; this is the default on systems
126 with recent-enough versions of the GNU C Library
127 (use with caution on other systems).
128 --without-selinux do not use SELinux, even on systems with SELinux
129 --with-packager String identifying the packager of this software
130 --with-packager-version Packager-specific version information
131 --with-packager-bug-reports
132 Packager info for bug reports (URL/e-mail/...)
133 --with-tty-group[=NAME]
134 group used by system for TTYs, "tty" when not
135 specified (default: do not rely on any group used
136 for TTYs)
137 --without-gmp do not use the GNU MP library for arbitrary
138 precision calculation (default: use it if available)
139 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
140 --without-libintl-prefix don't search for libintl in includedir and libdir
142 Some influential environment variables:
143 CC C compiler command
144 CFLAGS C compiler flags
145 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
146 nonstandard directory <lib dir>
147 LIBS libraries to pass to the linker, e.g. -l<library>
148 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
149 you have headers in a nonstandard directory <include dir>
150 CPP C preprocessor
151 YACC The "Yet Another C Compiler" implementation to use. Defaults to
152 'bison -y'. Values other than 'bison -y' will most likely break
153 on most systems.
154 YFLAGS YFLAGS contains the list arguments that will be passed by
155 default to Bison. This script will default YFLAGS to the empty
156 string to avoid a default value of '-d' given by some make
157 applications.
158 DEFAULT_POSIX2_VERSION
159 POSIX version to default to; see 'config.hin'.
161 Use these variables to override the choices made by 'configure' or to help
162 it to find libraries and programs with nonstandard names/locations.
164 Report bugs to <bug-automake@gnu.org>.
165 General help using GNU software: <https://www.gnu.org/gethelp/>.
168 compare_extracted_help ()
170 cat > exp || exit 99
171 extract_configure_help "$1" help > got || exit 1
172 cat exp
173 cat got
174 diff exp got || exit 1
177 compare_extracted_help --disable-libcap <<'END'
178 --disable-libcap disable libcap support
181 compare_extracted_help --disable-nls <<'END'
182 --disable-nls do not use Native Language Support
185 compare_extracted_help --disable-option-checking <<'END'
186 --disable-option-checking ignore unrecognized --enable/--with options
189 compare_extracted_help --build= <<'END'
190 --build=BUILD configure for building on BUILD [guessed]
193 compare_extracted_help --host= <<'END'
194 --host=HOST cross-compile to build programs to run on HOST [BUILD]
197 compare_extracted_help '--with-libintl-prefix[=]' <<'END'
198 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
201 compare_extracted_help --without-included-regex <<'END'
202 --without-included-regex
203 don't compile regex; this is the default on systems
204 with recent-enough versions of the GNU C Library
205 (use with caution on other systems).
208 compare_extracted_help --enable-threads= <<'END'
209 --enable-threads={posix|solaris|pth|win32}
210 specify multithreading API
213 compare_extracted_help '--with-tty-group[=]' <<'END'
214 --with-tty-group[=NAME]
215 group used by system for TTYs, "tty" when not
216 specified (default: do not rely on any group used
217 for TTYs)
220 compare_extracted_help '--prefix=' <<'END'
221 --prefix=PREFIX install architecture-independent files in PREFIX
222 [/usr/local]
225 compare_extracted_help '--exec-prefix=' <<'END'
226 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
227 [PREFIX]
230 compare_extracted_help CC <<'END'
231 CC C compiler command
234 compare_extracted_help CPP <<'END'
235 CPP C preprocessor
238 compare_extracted_help CPPFLAGS <<'END'
239 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
240 you have headers in a nonstandard directory <include dir>
243 compare_extracted_help YACC <<'END'
244 YACC The "Yet Another C Compiler" implementation to use. Defaults to
245 'bison -y'. Values other than 'bison -y' will most likely break
246 on most systems.
249 compare_extracted_help DEFAULT_POSIX2_VERSION <<'END'
250 DEFAULT_POSIX2_VERSION
251 POSIX version to default to; see 'config.hin'.
254 for o in \
255 '--nonesuch' \
256 '--nonesuch=' \
257 '--nonesuch[=]' \
258 '--disable-nls=' \
259 '--disable-nls[=]' \
260 '--without-included-regex=' \
261 '--without-included-regex[=]' \
262 '--prefix' \
263 '--prefix[=]' \
264 '--build' \
265 '--build[=]' \
266 '--with-tty-group' \
267 '--with-tty-group=' \
268 'NO_SUCH_VAR' \
269 'NOSUCHVAR' \
270 ; do
271 compare_extracted_help "$o" </dev/null
272 done