Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 732648
Collapse All | Expand All

(-)a/doc/autoconf.texi (-13 / +20 lines)
Lines 1876-1896 distribution tar ball names (e.g., @samp{autoconf}). It defaults to Link Here
1876
other than alphanumerics and underscores are changed to @samp{-}.  If
1876
other than alphanumerics and underscores are changed to @samp{-}.  If
1877
provided, @var{url} should be the home page for the package.
1877
provided, @var{url} should be the home page for the package.
1878
1878
1879
All the arguments of @code{AC_INIT} must be static, i.e., there should not
1879
Leading and trailing whitespace is stripped from all the arguments to
1880
be any shell computation, quotes, or newlines, but they can be computed
1880
@code{AC_INIT}, and interior whitespace is collapsed to a single space.
1881
by M4.  This is because the package information strings are expanded at
1881
1882
M4 time into several contexts, and must give the same text at shell time
1882
The arguments to @code{AC_INIT} may be computed by M4, when
1883
whether used in single-quoted strings, double-quoted strings, quoted
1883
@command{autoconf} is run.  For instance, it is fine for the
1884
here-documents, or unquoted here-documents.  It is permissible to use
1884
@var{version} argument to be an invocation of @code{m4_esyscmd} that
1885
@code{m4_esyscmd} or @code{m4_esyscmd_s} for computing a version string
1885
runs a command that determines the package's version from information
1886
that changes with every commit to a version control system (in fact,
1886
stored in the package's version control system.  However, they may not
1887
Autoconf does just that, for all builds of the development tree made
1887
be computed by the shell, when @command{configure} is run; if they
1888
between releases).
1888
contain any construct that would cause computation by the shell,
1889
Autoconf will issue an error.  This restriction is because the arguments
1890
to AC_INIT are written into @file{configure} several times, in different
1891
places, only some of which are subject to shell variable and command
1892
substitution.
1889
1893
1890
The @var{tarname} argument is used to construct filenames.
1894
The @var{tarname} argument is used to construct filenames.
1891
In addition to being static, it should not contain wildcard
1895
It should not contain wildcard characters, white space, or anything else
1892
characters, white space, or anything else that could be troublesome
1896
that could be troublesome as part of a file or directory name.
1893
as part of a file or directory name.
1894
1897
1895
The following M4 macros (e.g., @code{AC_PACKAGE_NAME}), output variables
1898
The following M4 macros (e.g., @code{AC_PACKAGE_NAME}), output variables
1896
(e.g., @code{PACKAGE_NAME}), and preprocessor symbols (e.g.,
1899
(e.g., @code{PACKAGE_NAME}), and preprocessor symbols (e.g.,
Lines 1947-1952 of updating @samp{$@@} and @samp{$*}. However, we suggest that you use Link Here
1947
standard macros like @code{AC_ARG_ENABLE} instead of attempting to
1950
standard macros like @code{AC_ARG_ENABLE} instead of attempting to
1948
implement your own option processing.  @xref{Site Configuration}.
1951
implement your own option processing.  @xref{Site Configuration}.
1949
1952
1953
If you use the @code{AC_PACKAGE} M4 macros, beware that they may contain
1954
characters that are significant to M4.  In almost all cases, you should
1955
refer to them using @code{m4_defn}.  @xref{Programming in M4sugar}.
1956
1950
@node Versioning
1957
@node Versioning
1951
@section Dealing with Autoconf versions
1958
@section Dealing with Autoconf versions
1952
@cindex Autoconf version
1959
@cindex Autoconf version
(-)a/lib/autoconf/general.m4 (-80 / +69 lines)
Lines 230-285 m4_define([_AC_INIT_LITERAL], Link Here
230
230
231
# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME], [URL])
231
# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME], [URL])
232
# ---------------------------------------------------------------------
232
# ---------------------------------------------------------------------
233
# Set the values of AC_PACKAGE_{NAME,VERSION,STRING,BUGREPORT,TARNAME,URL}
234
# from the arguments.
233
m4_define([_AC_INIT_PACKAGE],
235
m4_define([_AC_INIT_PACKAGE],
234
[m4_pushdef([_ac_init_NAME],     m4_normalize([$1]))
236
[_AC_INIT_PACKAGE_N(m4_normalize([$1]), m4_normalize([$2]), m4_normalize([$3]),
235
m4_pushdef([_ac_init_VERSION],   m4_normalize([$2]))
237
                    m4_normalize([$4]), m4_normalize([$5]))])
236
m4_pushdef([_ac_init_BUGREPORT], m4_normalize([$3]))
238
237
m4_pushdef([_ac_init_TARNAME],   m4_normalize([$4]))
239
# _AC_INIT_PACKAGE_N(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME], [URL])
238
m4_pushdef([_ac_init_URL],       m4_normalize([$5]))
240
# -----------------------------------------------------------------------
239
# NAME, VERSION, BUGREPORT, and URL should all be safe for use in shell
241
# Subroutine of _AC_INIT_PACKAGE.
240
# strings of all kinds.
242
m4_define([_AC_INIT_PACKAGE_N],
241
_AC_INIT_LITERAL(m4_defn([_ac_init_NAME]))
243
[# PACKAGE-NAME, VERSION, BUGREPORT, and URL should all be safe for use
242
_AC_INIT_LITERAL(m4_defn([_ac_init_VERSION]))
244
# in shell strings of all kinds.
243
_AC_INIT_LITERAL(m4_defn([_ac_init_BUGREPORT]))
245
_AC_INIT_LITERAL([$1])
244
_AC_INIT_LITERAL(m4_defn([_ac_init_URL]))
246
_AC_INIT_LITERAL([$2])
247
_AC_INIT_LITERAL([$3])
248
_AC_INIT_LITERAL([$5])
245
# TARNAME is even more constrained: it should not contain any shell
249
# TARNAME is even more constrained: it should not contain any shell
246
# metacharacters or whitespace, because it is used to construct
250
# metacharacters or whitespace, because it is used to construct
247
# filenames.
251
# filenames.
248
AS_LITERAL_WORD_IF(m4_defn([_ac_init_TARNAME]), [],
252
AS_LITERAL_WORD_IF([$4], [],
249
  [m4_warn([syntax],
253
  [m4_warn([syntax],
250
	   [AC_INIT: unsafe as a filename: "]m4_defn([_ac_init_TARNAME])["])])
254
	   [AC_INIT: unsafe as a filename: "$4"])])
251
#
255
#
252
# These do not use m4_copy because we don't want to copy the pushdef stack.
256
m4_define_default([AC_PACKAGE_NAME],      [$1])
253
m4_ifndef([AC_PACKAGE_NAME],
257
m4_define_default([AC_PACKAGE_VERSION],   [$2])
254
	  [m4_define([AC_PACKAGE_NAME],
258
# The m4_strip makes AC_PACKAGE_STRING be [], not [ ], when
255
		     m4_defn([_ac_init_NAME]))])
259
# both $1 and $2 are empty.
256
m4_ifndef([AC_PACKAGE_VERSION],
260
m4_define_default([AC_PACKAGE_STRING],    m4_strip([$1 $2]))
257
	  [m4_define([AC_PACKAGE_VERSION],
261
m4_define_default([AC_PACKAGE_BUGREPORT], [$3])
258
		     m4_defn([_ac_init_VERSION]))])
262
#
259
m4_ifndef([AC_PACKAGE_STRING],
263
# N.B. m4_ifnblank strips one layer of quotation from whichever of its
260
	  [m4_define([AC_PACKAGE_STRING],
264
# second and third argument it evaluates to.
261
		     m4_defn([_ac_init_NAME])[ ]m4_defn([_ac_init_VERSION]))])
265
m4_define_default([AC_PACKAGE_TARNAME],
262
m4_ifndef([AC_PACKAGE_BUGREPORT],
266
  m4_ifnblank([$4], [[$4]],
263
	  [m4_define([AC_PACKAGE_BUGREPORT], _ac_init_BUGREPORT)])
267
    [m4_quote(m4_bpatsubst(m4_tolower(m4_bpatsubst([$1], [^GNU ], [])),
264
m4_ifndef([AC_PACKAGE_TARNAME],
268
      [[^_abcdefghijklmnopqrstuvwxyz0123456789]], [-]))]))
265
	  [m4_define([AC_PACKAGE_TARNAME],
269
m4_define_default([AC_PACKAGE_URL],
266
		     m4_default(m4_defn([_ac_init_TARNAME]),
270
  m4_ifnblank([$5], [[$5]],
267
				[m4_bpatsubst(m4_tolower(
271
    [m4_if(m4_index([$1], [GNU ]), [0],
268
				 m4_bpatsubst(m4_defn([_ac_init_NAME]),
272
      [[https://www.gnu.org/software/]m4_defn([AC_PACKAGE_TARNAME])[/]],
269
					      [GNU ])),
273
      [])]))
270
				 [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
271
				 [-])]))])
272
m4_ifndef([AC_PACKAGE_URL],
273
	  [m4_define([AC_PACKAGE_URL],
274
		     m4_default(m4_defn([_ac_init_URL]),
275
				[m4_if(m4_index(m4_defn([_ac_init_NAME]),
276
						[GNU ]), [0],
277
    [[https://www.gnu.org/software/]m4_defn([AC_PACKAGE_TARNAME])[/]])]))])
278
m4_popdef([_ac_init_NAME])
279
m4_popdef([_ac_init_VERSION])
280
m4_popdef([_ac_init_BUGREPORT])
281
m4_popdef([_ac_init_TARNAME])
282
m4_popdef([_ac_init_URL])
283
])
274
])
284
275
285
276
Lines 363-375 m4_define([_AC_INIT_NOTICE], Link Here
363
[m4_divert_text([HEADER-COMMENT],
354
[m4_divert_text([HEADER-COMMENT],
364
[@%:@ Guess values for system-dependent variables and create Makefiles.
355
[@%:@ Guess values for system-dependent variables and create Makefiles.
365
@%:@ Generated by m4_PACKAGE_STRING[]dnl
356
@%:@ Generated by m4_PACKAGE_STRING[]dnl
366
m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
357
m4_ifset([AC_PACKAGE_STRING], [ for m4_defn([AC_PACKAGE_STRING]).
367
358
])dnl
368
m4_ifset([AC_PACKAGE_BUGREPORT],
359
m4_ifset([AC_PACKAGE_BUGREPORT],
369
	 [m4_divert_text([HEADER-COMMENT],
360
	 [m4_divert_text([HEADER-COMMENT],
370
			 [@%:@
361
			 [@%:@
371
@%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
362
@%:@ Report bugs to: m4_defn([AC_PACKAGE_BUGREPORT])])])
372
])
363
])])
373
364
374
365
375
# _AC_INIT_COPYRIGHT
366
# _AC_INIT_COPYRIGHT
Lines 436-453 AC_SUBST([SHELL])dnl Link Here
436
AC_SUBST([PATH_SEPARATOR])dnl
427
AC_SUBST([PATH_SEPARATOR])dnl
437
428
438
# Identity of this package.
429
# Identity of this package.
439
AC_SUBST([PACKAGE_NAME],
430
AC_SUBST([PACKAGE_NAME],      ['m4_defn([AC_PACKAGE_NAME])'])dnl
440
	 [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])dnl
431
AC_SUBST([PACKAGE_TARNAME],   ['m4_defn([AC_PACKAGE_TARNAME])'])dnl
441
AC_SUBST([PACKAGE_TARNAME],
432
AC_SUBST([PACKAGE_VERSION],   ['m4_defn([AC_PACKAGE_VERSION])'])dnl
442
	 [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])dnl
433
AC_SUBST([PACKAGE_STRING],    ['m4_defn([AC_PACKAGE_STRING])'])dnl
443
AC_SUBST([PACKAGE_VERSION],
434
AC_SUBST([PACKAGE_BUGREPORT], ['m4_defn([AC_PACKAGE_BUGREPORT])'])dnl
444
	 [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])dnl
435
AC_SUBST([PACKAGE_URL],       ['m4_defn([AC_PACKAGE_URL])'])dnl
445
AC_SUBST([PACKAGE_STRING],
446
	 [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])dnl
447
AC_SUBST([PACKAGE_BUGREPORT],
448
	 [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
449
AC_SUBST([PACKAGE_URL],
450
	 [m4_ifdef([AC_PACKAGE_URL],       ['AC_PACKAGE_URL'])])dnl
451
436
452
m4_divert_pop([DEFAULTS])dnl
437
m4_divert_pop([DEFAULTS])dnl
453
m4_wrap_lifo([m4_divert_text([DEFAULTS],
438
m4_wrap_lifo([m4_divert_text([DEFAULTS],
Lines 1048-1056 if test "$ac_init_help" = "long"; then Link Here
1048
  # Omit some internal or obsolete options to make the list less imposing.
1033
  # Omit some internal or obsolete options to make the list less imposing.
1049
  # This message is too long to be a string in the A/UX 3.1 sh.
1034
  # This message is too long to be a string in the A/UX 3.1 sh.
1050
  cat <<_ACEOF
1035
  cat <<_ACEOF
1051
\`configure' configures m4_ifset([AC_PACKAGE_STRING],
1036
\`configure' configures m4_default_nblank(m4_defn([AC_PACKAGE_STRING]),
1052
			[AC_PACKAGE_STRING],
1037
					  [this package])dnl
1053
			[this package]) to adapt to many kinds of systems.
1038
 to adapt to many kinds of systems.
1054
1039
1055
Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
1040
Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
1056
1041
Lines 1099-1107 Fine tuning of the installation directories: Link Here
1099
  --infodir=DIR           info documentation [DATAROOTDIR/info]
1084
  --infodir=DIR           info documentation [DATAROOTDIR/info]
1100
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1085
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1101
  --mandir=DIR            man documentation [DATAROOTDIR/man]
1086
  --mandir=DIR            man documentation [DATAROOTDIR/man]
1102
]AS_HELP_STRING([--docdir=DIR],
1087
  --docdir=DIR            documentation root @<:@DATAROOTDIR/doc/]dnl
1103
  [documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME],
1088
m4_default_quoted(m4_defn([AC_PACKAGE_TARNAME]), [PACKAGE])[@:>@
1104
    [AC_PACKAGE_TARNAME], [PACKAGE])@:>@)[
1105
  --htmldir=DIR           html documentation [DOCDIR]
1089
  --htmldir=DIR           html documentation [DOCDIR]
1106
  --dvidir=DIR            dvi documentation [DOCDIR]
1090
  --dvidir=DIR            dvi documentation [DOCDIR]
1107
  --pdfdir=DIR            pdf documentation [DOCDIR]
1091
  --pdfdir=DIR            pdf documentation [DOCDIR]
Lines 1139-1156 fi Link Here
1139
if test -n "$ac_init_help"; then
1123
if test -n "$ac_init_help"; then
1140
m4_ifset([AC_PACKAGE_STRING],
1124
m4_ifset([AC_PACKAGE_STRING],
1141
[  case $ac_init_help in
1125
[  case $ac_init_help in
1142
     short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1126
     short | recursive )
1127
       AS_ECHO(["Configuration of m4_defn([AC_PACKAGE_STRING]):"]);;
1143
   esac])
1128
   esac])
1144
  cat <<\_ACEOF
1129
  cat <<\_ACEOF
1145
m4_divert_pop([HELP_ENABLE])dnl
1130
m4_divert_pop([HELP_ENABLE])dnl
1146
m4_divert_push([HELP_END])dnl
1131
m4_divert_push([HELP_END])dnl
1147
1132
1148
Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [<AC_PACKAGE_BUGREPORT>],
1133
m4_ifset([AC_PACKAGE_BUGREPORT],
1149
  [the package provider]).dnl
1134
[Report bugs to: m4_defn([AC_PACKAGE_BUGREPORT])
1150
m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [
1135
])dnl
1151
AC_PACKAGE_NAME home page: <AC_PACKAGE_URL>.])dnl
1136
m4_ifset([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL],
1152
m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [
1137
[m4_defn([AC_PACKAGE_NAME]) home page: m4_defn([AC_PACKAGE_URL])
1153
General help using GNU software: <https://www.gnu.org/gethelp/>.])])
1138
])])dnl
1139
m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0],
1140
[General help using GNU software: <https://www.gnu.org/gethelp/>.
1141
])dnl
1154
_ACEOF
1142
_ACEOF
1155
ac_status=$?
1143
ac_status=$?
1156
fi
1144
fi
Lines 1189-1197 m4_define([_AC_INIT_VERSION], Link Here
1189
[m4_divert_text([VERSION_BEGIN],
1177
[m4_divert_text([VERSION_BEGIN],
1190
[if $ac_init_version; then
1178
[if $ac_init_version; then
1191
  cat <<\_ACEOF
1179
  cat <<\_ACEOF
1192
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1180
m4_ifset([AC_PACKAGE_NAME], [m4_defn([AC_PACKAGE_NAME]) ])configure[]dnl
1193
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1181
m4_ifset([AC_PACKAGE_VERSION], [ m4_defn([AC_PACKAGE_VERSION])])
1194
generated by m4_PACKAGE_STRING])
1182
generated by m4_defn([m4_PACKAGE_STRING])])
1195
m4_divert_text([VERSION_END],
1183
m4_divert_text([VERSION_END],
1196
[_ACEOF
1184
[_ACEOF
1197
  exit
1185
  exit
Lines 1230-1238 cat >config.log <<_ACEOF Link Here
1230
This file contains any messages produced by compilers while
1218
This file contains any messages produced by compilers while
1231
running configure, to aid debugging if configure makes a mistake.
1219
running configure, to aid debugging if configure makes a mistake.
1232
1220
1233
It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1221
It was created by m4_ifset([AC_PACKAGE_NAME], [m4_defn([AC_PACKAGE_NAME]) ])dnl
1234
$as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1222
$as_me[]m4_ifset([AC_PACKAGE_VERSION],
1235
generated by m4_PACKAGE_STRING.  Invocation command line was
1223
                 [ m4_defn([AC_PACKAGE_VERSION])]), which was
1224
generated by m4_defn([m4_PACKAGE_STRING]).  Invocation command line was
1236
1225
1237
  $ $[0]$ac_configure_args_raw
1226
  $ $[0]$ac_configure_args_raw
1238
1227
Lines 1446-1452 m4_define([_AS_FORCE_REEXEC_WITH_CONFIG_SHELL], [yes]) Link Here
1446
AS_INIT[]dnl
1435
AS_INIT[]dnl
1447
AS_PREPARE[]dnl
1436
AS_PREPARE[]dnl
1448
m4_divert_push([KILL])
1437
m4_divert_push([KILL])
1449
m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1438
_AC_INIT_PACKAGE($@)
1450
_AC_INIT_DEFAULTS
1439
_AC_INIT_DEFAULTS
1451
_AC_INIT_PARSE_ARGS
1440
_AC_INIT_PARSE_ARGS
1452
_AC_INIT_DIRCHECK
1441
_AC_INIT_DIRCHECK
(-)a/lib/autoconf/status.m4 (-12 / +17 lines)
Lines 1343-1351 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 Link Here
1343
# report actual input values of CONFIG_FILES etc. instead of their
1343
# report actual input values of CONFIG_FILES etc. instead of their
1344
# values after options handling.
1344
# values after options handling.
1345
ac_log="
1345
ac_log="
1346
This file was extended by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1346
This file was extended by m4_ifset([AC_PACKAGE_NAME],
1347
$as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1347
                                   [m4_defn([AC_PACKAGE_NAME]) ])dnl
1348
generated by m4_PACKAGE_STRING.  Invocation command line was
1348
$as_me[]m4_ifset([AC_PACKAGE_VERSION],
1349
                 [ m4_defn([AC_PACKAGE_VERSION])]), which was
1350
generated by m4_defn([m4_PACKAGE_STRING]).  Invocation command line was
1349
1351
1350
  CONFIG_FILES    = $CONFIG_FILES
1352
  CONFIG_FILES    = $CONFIG_FILES
1351
  CONFIG_HEADERS  = $CONFIG_HEADERS
1353
  CONFIG_HEADERS  = $CONFIG_HEADERS
Lines 1431-1442 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], Link Here
1431
$config_commands
1433
$config_commands
1432
1434
1433
])dnl
1435
])dnl
1434
Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [<AC_PACKAGE_BUGREPORT>],
1436
m4_ifset([AC_PACKAGE_BUGREPORT],
1435
  [the package provider]).dnl
1437
[Report bugs to: m4_defn([AC_PACKAGE_BUGREPORT])
1436
m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [
1438
]))dnl
1437
AC_PACKAGE_NAME home page: <AC_PACKAGE_URL>.])dnl
1439
m4_ifset([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL],
1438
m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [
1440
[m4_defn([AC_PACKAGE_NAME]) home page: m4_defn([AC_PACKAGE_URL])
1439
General help using GNU software: <https://www.gnu.org/gethelp/>.])])"
1441
])])dnl
1442
m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0],
1443
[General help using GNU software: <https://www.gnu.org/gethelp/>.
1444
])"
1440
1445
1441
_ACEOF
1446
_ACEOF
1442
ac_cs_config=`AS_ECHO(["$ac_configure_args"]) | sed "$ac_safe_unquote"`
1447
ac_cs_config=`AS_ECHO(["$ac_configure_args"]) | sed "$ac_safe_unquote"`
Lines 1444-1452 ac_cs_config_escaped=`AS_ECHO(["$ac_cs_config"]) | sed "s/^ //; s/'/'\\\\\\\\''/ Link Here
1444
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1449
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1445
ac_cs_config='$ac_cs_config_escaped'
1450
ac_cs_config='$ac_cs_config_escaped'
1446
ac_cs_version="\\
1451
ac_cs_version="\\
1447
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
1452
m4_ifset([AC_PACKAGE_NAME], [m4_defn([AC_PACKAGE_NAME]) ])config.status[]dnl
1448
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1453
m4_ifset([AC_PACKAGE_VERSION], [ m4_defn([AC_PACKAGE_VERSION])])
1449
configured by $[0], generated by m4_PACKAGE_STRING,
1454
configured by $[0], generated by m4_defn([m4_PACKAGE_STRING]),
1450
  with options \\"\$ac_cs_config\\"
1455
  with options \\"\$ac_cs_config\\"
1451
1456
1452
Copyright (C) m4_PACKAGE_YEAR Free Software Foundation, Inc.
1457
Copyright (C) m4_PACKAGE_YEAR Free Software Foundation, Inc.
(-)a/tests/base.at (-12 / +173 lines)
Lines 238-273 AT_CLEANUP Link Here
238
238
239
AT_SETUP([AC_INIT with unusual version strings])
239
AT_SETUP([AC_INIT with unusual version strings])
240
240
241
if echo 'ab*c' | grep -F 'ab*c' >/dev/null 2>&1; then
242
  FGREP="grep -F"
243
else
244
  FGREP=fgrep
245
fi
246
247
# In both of the arguments that might contain URLs, make sure we test
248
# all of the unusual ASCII characters that commonly appear in URLs.
249
# The RFC 3986 "unreserved" characters are ASCII letters and digits, plus
250
#    - . _ ~
251
# The RFC 3986 "gen-delims" and "sub-delims" are
252
#    / : ? # [ ] @ ! $ & ' ( ) * + , ; =
253
# The URL escape character is
254
#    %
255
# Characters that are still significant for Bourne shell within a
256
# single-quoted string, double-quoted string, quoted here-doc, or
257
# unquoted here-doc are explicitly not allowed:
258
#    ' $
259
# Also, we don't test unbalanced parentheses or brackets here.
260
241
AT_DATA([configure.ac],
261
AT_DATA([configure.ac],
242
[[AC_INIT([GNU String++ with  spaces (foo)],
262
[[AC_INIT([GNU String++ with  spaces
263
           (foo)],
243
	  [2.48++  (2010-07-03)],
264
	  [2.48++  (2010-07-03)],
244
          [[https://example.com/?a=b&c=d#e]],
265
          [https://example/~bug/cdfijknoqrvw/-._:@!()[]*+,;/?y=z#1234567890
266
],
245
          [string++],
267
          [string++],
246
          [[https://example.com/?f=g&h=i%2fj#42]])
268
          [HTTPS://EXAMPLE/~PKG/BCDFIJNOQRUVW/-._:@!()[]*+,;/?y=z#1234567890
269
])
247
AC_OUTPUT
270
AC_OUTPUT
248
]])
271
]])
249
272
250
if echo 'ab*c' | grep -F 'ab*c' >/dev/null 2>&1; then
273
AT_CHECK_AUTOCONF([-Werror])
251
  FGREP="grep -F"
274
AT_CHECK_CONFIGURE([-q])
252
else
275
253
  FGREP=fgrep
276
AT_CHECK_CONFIGURE([--help], [], [stdout])
254
fi
277
AT_CHECK([[$FGREP \
278
  'https://example/~bug/cdfijknoqrvw/-._:@!()[]*+,;/?y=z#1234567890' \
279
  stdout]], [], [ignore])
280
AT_CHECK([[$FGREP \
281
  'HTTPS://EXAMPLE/~PKG/BCDFIJNOQRUVW/-._:@!()[]*+,;/?y=z#1234567890' \
282
  stdout]], [], [ignore])
283
284
AT_CHECK_CONFIGURE([--version], [], [stdout])
285
AT_CHECK([$FGREP 'GNU String++ with spaces (foo)' stdout], [], [ignore])
286
AT_CHECK([$FGREP '2.48++ (2010-07-03)' stdout], [], [ignore])
287
288
AT_CHECK([./config.status --help], [], [stdout])
289
AT_CHECK([[$FGREP \
290
  'https://example/~bug/cdfijknoqrvw/-._:@!()[]*+,;/?y=z#1234567890' \
291
  stdout]], [], [ignore])
292
AT_CHECK([[$FGREP \
293
  'HTTPS://EXAMPLE/~PKG/BCDFIJNOQRUVW/-._:@!()[]*+,;/?y=z#1234567890' \
294
  stdout]], [], [ignore])
295
296
AT_CHECK([./config.status --version], [], [stdout])
297
AT_CHECK([$FGREP 'GNU String++ with spaces (foo)' stdout], [], [ignore])
298
AT_CHECK([$FGREP '2.48++ (2010-07-03)' stdout], [], [ignore])
299
300
# Repeat the above test using all the unusual characters that might appear
301
# in a list of email addresses in both BUG-REPORT and URL.  (URL isn't
302
# supposed to contain email addresses, but there's no good reason to
303
# restrict its syntax.)
304
# The RFC 5822 "atext" characters are ASCII letters and digits, plus
305
#    ! # $ % & ' * + - / = ? ^ _ ` { | } ~
306
# The RFC 5822 "special" characters, all of which might appear somewhere
307
# in an address list, are
308
#    ( ) < > [ ] : ; @ \ , . "
309
# As above, characters that are significant for Bourne shell within
310
# strings and heredocs are explicitly not allowed:
311
#    ' " ` \ $
312
# Whitespace is allowed but collapsed (just like AC_INIT does itself).
313
AT_DATA([configure.ac],
314
[[AC_INIT([GNU String++ with  spaces
315
           (foo)],
316
	  [2.48++  (2010-07-03)],
317
          [bugs: fred <A=B?C^D_E@F>,
318
                 G!H!I#J@K.L (wilma),
319
                 M%N&O@[156.247.38.49],
320
                 P*Q+R-S/T@U,
321
                 {jon|chyp~}@kqtvxz.VWXYZ;],
322
          [string++],
323
          [contact: jem <A=B?C^D_E@bd>,
324
                    F!G!H#I@fv.J (lugh),
325
                    K%L&M@[156.247.38.49],
326
                    N*O+P-Q/R@STU,
327
                    {qik|~prys}@wxz.VWXYZ;])
328
AC_OUTPUT
329
]])
255
330
256
AT_CHECK_AUTOCONF([-Werror])
331
AT_CHECK_AUTOCONF([-Werror])
257
AT_CHECK_CONFIGURE([-q])
332
AT_CHECK_CONFIGURE([-q])
333
258
AT_CHECK_CONFIGURE([--help], [], [stdout])
334
AT_CHECK_CONFIGURE([--help], [], [stdout])
259
AT_CHECK([[$FGREP 'com/?a=b&c=d#e' stdout]], [], [ignore])
335
AT_CHECK([[$FGREP \
260
AT_CHECK([[$FGREP 'com/?f=g&h=i%2fj#42' stdout]], [], [ignore])
336
  'bugs: fred <A=B?C^D_E@F>, G!H!I#J@K.L (wilma), M%N&O@[156.247.38.49], P*Q+R-S/T@U, {jon|chyp~}@kqtvxz.VWXYZ;' \
337
  stdout]], [], [ignore])
338
AT_CHECK([[$FGREP \
339
  'contact: jem <A=B?C^D_E@bd>, F!G!H#I@fv.J (lugh), K%L&M@[156.247.38.49], N*O+P-Q/R@STU, {qik|~prys}@wxz.VWXYZ;' \
340
  stdout]], [], [ignore])
341
261
AT_CHECK_CONFIGURE([--version], [], [stdout])
342
AT_CHECK_CONFIGURE([--version], [], [stdout])
262
AT_CHECK([$FGREP 'GNU String++ with spaces (foo)' stdout], [], [ignore])
343
AT_CHECK([$FGREP 'GNU String++ with spaces (foo)' stdout], [], [ignore])
263
AT_CHECK([$FGREP '2.48++ (2010-07-03)' stdout], [], [ignore])
344
AT_CHECK([$FGREP '2.48++ (2010-07-03)' stdout], [], [ignore])
264
345
265
AT_CHECK([./config.status --help], [], [stdout])
346
AT_CHECK([./config.status --help], [], [stdout])
266
AT_CHECK([[$FGREP 'com/?a=b&c=d#e' stdout]], [], [ignore])
347
AT_CHECK([[$FGREP \
348
  'bugs: fred <A=B?C^D_E@F>, G!H!I#J@K.L (wilma), M%N&O@[156.247.38.49], P*Q+R-S/T@U, {jon|chyp~}@kqtvxz.VWXYZ;' \
349
  stdout]], [], [ignore])
350
AT_CHECK([[$FGREP \
351
  'contact: jem <A=B?C^D_E@bd>, F!G!H#I@fv.J (lugh), K%L&M@[156.247.38.49], N*O+P-Q/R@STU, {qik|~prys}@wxz.VWXYZ;' \
352
  stdout]], [], [ignore])
353
267
AT_CHECK([./config.status --version], [], [stdout])
354
AT_CHECK([./config.status --version], [], [stdout])
268
AT_CHECK([$FGREP 'GNU String++ with spaces (foo)' stdout], [], [ignore])
355
AT_CHECK([$FGREP 'GNU String++ with spaces (foo)' stdout], [], [ignore])
269
AT_CHECK([$FGREP '2.48++ (2010-07-03)' stdout], [], [ignore])
356
AT_CHECK([$FGREP '2.48++ (2010-07-03)' stdout], [], [ignore])
270
357
358
# Check for invalid characters in each argument.
271
AT_DATA([configure.ac],
359
AT_DATA([configure.ac],
272
[[AC_INIT([GNU "String++"],
360
[[AC_INIT([GNU "String++"],
273
	  [2.48], [https://example.com/], [string++])
361
	  [2.48], [https://example.com/], [string++])
Lines 347-352 AC_OUTPUT Link Here
347
AT_CHECK_AUTOCONF([-Werror], [1], [ignore], [stderr])
435
AT_CHECK_AUTOCONF([-Werror], [1], [ignore], [stderr])
348
AT_CHECK([grep 'AC_INIT: unsafe as a filename: ' stderr], [], [ignore])
436
AT_CHECK([grep 'AC_INIT: unsafe as a filename: ' stderr], [], [ignore])
349
437
438
# Commas and unbalanced close parentheses are especially troublesome for M4.
439
440
AT_DATA([configure.ac],
441
[[AC_INIT([GNU, String], [2.48], [bugs@gstring.example],
442
          [string], [https://gstring.example/])
443
AC_OUTPUT
444
]])
445
AT_CHECK_AUTOCONF
446
447
AT_DATA([configure.ac],
448
[[AC_INIT([GNU String)], [2.48], [bugs@gstring.example],
449
          [string], [https://gstring.example/])
450
AC_OUTPUT
451
]])
452
AT_CHECK_AUTOCONF
453
454
AT_DATA([configure.ac],
455
[[AC_INIT([GNU String], [2,48], [bugs@gstring.example],
456
          [string], [https://gstring.example/])
457
AC_OUTPUT
458
]])
459
AT_CHECK_AUTOCONF
460
461
AT_DATA([configure.ac],
462
[[AC_INIT([GNU String], [2.48)], [bugs@gstring.example],
463
          [string], [https://gstring.example/])
464
AC_OUTPUT
465
]])
466
AT_CHECK_AUTOCONF
467
468
AT_DATA([configure.ac],
469
[[AC_INIT([GNU String], [2.48], [bugs@gstring.example,
470
                                 gstring-bugs@example.com],
471
          [string], [https://gstring.example/])
472
AC_OUTPUT
473
]])
474
AT_CHECK_AUTOCONF
475
476
AT_DATA([configure.ac],
477
[[AC_INIT([GNU String], [2.48], [bugs)@gstring.example],
478
          [string], [https://gstring.example/])
479
AC_OUTPUT
480
]])
481
AT_CHECK_AUTOCONF
482
483
AT_DATA([configure.ac],
484
[[AC_INIT([GNU String], [2.48], [bugs@gstring.example],
485
          [string,], [https://gstring.example/])
486
AC_OUTPUT
487
]])
488
AT_CHECK_AUTOCONF
489
490
AT_DATA([configure.ac],
491
[[AC_INIT([GNU String], [2.48], [bugs@gstring.example],
492
          [string)], [https://gstring.example/])
493
AC_OUTPUT
494
]])
495
AT_CHECK_AUTOCONF([], [0], [ignore], [stderr])
496
AT_CHECK([grep 'AC_INIT: unsafe as a filename: ' stderr], [], [ignore])
497
498
AT_DATA([configure.ac],
499
[[AC_INIT([GNU String], [2.48], [bugs@gstring.example],
500
          [string], [https://gstring.example/docs,html])
501
AC_OUTPUT
502
]])
503
AT_CHECK_AUTOCONF
504
505
506
AT_DATA([configure.ac],
507
[[AC_INIT([GNU String], [2.48], [bugs@gstring.example],
508
          [string], [https://gstring.example/weird)/path])
509
AC_OUTPUT
510
]])
511
AT_CHECK_AUTOCONF
350
512
351
AT_CLEANUP
513
AT_CLEANUP
352
514
353
- 

Return to bug 732648