summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-10-19 03:01:25 +0000
committerNorbert Preining <norbert@preining.info>2022-10-19 03:01:25 +0000
commit7b6cdf4c23e6ed232601dabc70f5553a8dee9c9b (patch)
tree608a2d05e7d0ffa5cde10be67db643ae542dc280 /support
parent0b311348359e1406b173d9c0de4974af3e90f836 (diff)
CTAN sync 202210190301
Diffstat (limited to 'support')
-rw-r--r--support/chktex/ChkTeX.c91
-rw-r--r--support/chktex/ChkTeX.h24
-rw-r--r--support/chktex/ChkTeX.pdfbin0 -> 409006 bytes
-rw-r--r--support/chktex/ChkTeX.tex.in127
-rw-r--r--support/chktex/FindErrs.c317
-rw-r--r--support/chktex/FindErrs.h12
-rwxr-xr-xsupport/chktex/MakeChkTeXRC.pl71
-rw-r--r--support/chktex/Makefile.in32
-rw-r--r--support/chktex/NEWS42
-rw-r--r--support/chktex/OpSys.c88
-rw-r--r--support/chktex/OpSys.h34
-rw-r--r--support/chktex/Resource.c263
-rw-r--r--support/chktex/Resource.h6
-rw-r--r--support/chktex/Test.nore.out108
-rw-r--r--support/chktex/Test.pcre.out111
-rw-r--r--support/chktex/Test.posix-ere.out93
-rw-r--r--support/chktex/Test.tex81
-rw-r--r--support/chktex/Utility.c53
-rw-r--r--support/chktex/Utility.h8
-rw-r--r--support/chktex/aclocal.m46
-rw-r--r--support/chktex/chktexrc802
-rw-r--r--support/chktex/chktexrc.in989
-rw-r--r--support/chktex/config.h.in12
-rwxr-xr-xsupport/chktex/configure4039
-rw-r--r--support/chktex/configure.ac (renamed from support/chktex/configure.in)10
-rw-r--r--support/chktex/input/file8
-rwxr-xr-xsupport/chktex/install-sh174
-rw-r--r--support/chktex/m4/ax_append_flag.m450
-rw-r--r--support/chktex/m4/ax_cflags_strict_prototypes.m4153
-rw-r--r--support/chktex/m4/ax_require_defined.m437
-rw-r--r--support/chktex/tests/main.expected27
-rw-r--r--support/chktex/tests/main.tex14
-rwxr-xr-xsupport/chktex/tests/run-tests.sh137
-rw-r--r--support/chktex/tests/sub1/file.tex8
-rw-r--r--support/chktex/tests/sub1/subsub/subsubfile.tex2
-rw-r--r--support/chktex/tests/sub2/file1.tex7
-rw-r--r--support/chktex/tests/sub2/file2.tex2
-rw-r--r--support/sty2dtx/README.txt (renamed from support/sty2dtx/README)15
-rw-r--r--support/sty2dtx/sty2dtx.154
-rw-r--r--support/sty2dtx/sty2dtx.pdfbin140340 -> 156538 bytes
-rwxr-xr-xsupport/sty2dtx/sty2dtx.pl35
41 files changed, 5162 insertions, 2980 deletions
diff --git a/support/chktex/ChkTeX.c b/support/chktex/ChkTeX.c
index fd7812401a..bf4386b4a5 100644
--- a/support/chktex/ChkTeX.c
+++ b/support/chktex/ChkTeX.c
@@ -46,15 +46,13 @@ struct ErrMsg PrgMsgs[pmMaxFault + 1] = {
PRGMSGS {(enum ErrNum)pmMaxFault, etErr, TRUE, 0, INTERNFAULT}
};
-struct Stack CharStack = {
- 0L
-}, InputStack =
-
-{
-0L}, EnvStack =
-
-{
-0L};
+struct Stack CharStack = {0L};
+struct Stack InputStack = {0L};
+struct Stack EnvStack = {0L};
+struct Stack ConTeXtStack = {0L};
+struct Stack FileSuppStack = {0L};
+struct Stack UserFileSuppStack = {0L};
+struct Stack MathModeStack = {0L};
/************************************************************************/
@@ -71,8 +69,8 @@ unsigned long Brackets[NUMBRACKETS];
*/
-NEWBUF(TmpBuffer, BUFSIZ);
-NEWBUF(ReadBuffer, BUFSIZ);
+NEWBUF(TmpBuffer, BUFFER_SIZE);
+NEWBUF(ReadBuffer, BUFFER_SIZE);
static const char *Banner =
"ChkTeX v" PACKAGE_VERSION " - Copyright 1995-96 Jens T. Berger Thielemann.\n"
@@ -144,8 +142,11 @@ static const char *HelpText =
" -h --help : This text.\n"
" -i --license : Show distribution information\n"
" -l --localrc : Read local .chktexrc formatted file.\n"
- " -d --debug : Debug information. Give it a number.\n"
+ " -d --debug : Debug information. A bit field with 5 bits.\n"
+ " Each bit shows a different type of information.\n"
" -r --reset : Reset settings to default.\n"
+ " -S --set : Read it's argument as if from chktexrc.\n"
+ " e.g., -S TabSize=8 will override the TabSize.\n"
"\n"
"Muting warning messages:\n"
"~~~~~~~~~~~~~~~~~~~~~~~~\n"
@@ -153,7 +154,7 @@ static const char *HelpText =
" -e --erroron : Makes msg # given an error and turns it on.\n"
" -m --msgon : Makes msg # given a message and turns it on.\n"
" -n --nowarn : Mutes msg # given.\n"
- " -L --nolinesupp: Disables per-line suppressions.\n"
+ " -L --nolinesupp: Disables per-line and per-file suppressions.\n"
"\n"
"Output control flags:\n"
"~~~~~~~~~~~~~~~~~~~~~\n"
@@ -173,7 +174,7 @@ static const char *HelpText =
" -x --wipeverb : Ignore contents of `\\verb' commands.\n"
" -g --globalrc : Read global .chktexrc file.\n"
" -I --inputfiles: Execute \\input statements.\n"
- " -H --headererr : Show errors found in front of \\begin{document}\n"
+ " -H --headererr : Show errors found before \\begin{document}\n"
"\n"
"Miscellaneous switches:\n"
"~~~~~~~~~~~~~~~~~~~~~~~\n"
@@ -182,7 +183,17 @@ static const char *HelpText =
"----------------------------------------------------------------------\n"
"If no LaTeX files are specified on the command line, we will read from\n"
"stdin. For explanation of warning/error messages, please consult the\n"
- "main documentation ChkTeX.dvi, ChkTeX.ps or ChkTeX.pdf.\n";
+ "main documentation ChkTeX.dvi, ChkTeX.ps or ChkTeX.pdf:\n"
+ " http://www.nongnu.org/chktex/ChkTeX.pdf\n"
+ "\n"
+ "Any of the above arguments can be made permanent by setting them in the\n"
+ "chktexrc file "
+#if defined(__unix__)
+ "(~/.chktexrc).\n"
+#else
+ "(see documentation for location).\n"
+#endif
+ ;
@@ -194,6 +205,8 @@ static const char *HelpText =
enum Quote Quote;
+enum CmdSpace CmdSpace;
+
char VerbNormal[] = "%k %n in %f line %l: %m\n" "%r%s%t\n" "%u\n";
#define DEF(type, name, value) type name = value
@@ -321,7 +334,7 @@ static void ExpandTabs(char *From, char *To, long TSize, long MaxDiff)
Diff = MaxDiff+1;
if ( !HasExpandedTooLong )
{
- PrintPrgErr(pmTabExpands, BUFSIZ);
+ PrintPrgErr(pmTabExpands, BUFFER_SIZE);
}
HasExpandedTooLong = 1;
}
@@ -335,6 +348,19 @@ static void ExpandTabs(char *From, char *To, long TSize, long MaxDiff)
strcpy(To, From);
}
+void ReadRcFiles(void)
+{
+ unsigned long i;
+ while (SetupVars())
+ {
+ InsertWord(ConfigFile, &ConfigFiles);
+ }
+ FORWL(i, ConfigFiles)
+ {
+ ReadRC(ConfigFiles.Stack.Data[i]);
+ }
+}
+
int main(int argc, char **argv)
{
@@ -370,8 +396,7 @@ int main(int argc, char **argv)
RESOURCE_INFO
- while (SetupVars())
- ReadRC(ConfigFile);
+ ReadRcFiles();
if (CmdLine.Stack.Used)
{
@@ -432,6 +457,22 @@ int main(int argc, char **argv)
Quote = quTrad;
}
}
+ if (CmdSpaceStyle)
+ {
+ if (!strcasecmp(CmdSpaceStyle, "IGNORE"))
+ CmdSpace = csIgnore;
+ else if (!strcasecmp(CmdSpaceStyle, "INTERWORD"))
+ CmdSpace = csInterWord;
+ else if (!strcasecmp(CmdSpaceStyle, "INTERSENTENCE"))
+ CmdSpace = csInterSentence;
+ else if (!strcasecmp(CmdSpaceStyle, "BOTH"))
+ CmdSpace = csBoth;
+ else
+ {
+ PrintPrgErr(pmCmdSpaceStyle, CmdSpaceStyle);
+ CmdSpace = csIgnore;
+ }
+ }
if (DebugLevel)
ShowIntStatus();
@@ -471,6 +512,7 @@ int main(int argc, char **argv)
if (CurArg < argc)
filename = argv[CurArg++];
+ AddDirectoryFromRelativeFile(filename,&TeXInputs);
if (!PushFileName(filename, &InputStack))
break;
}
@@ -481,7 +523,7 @@ int main(int argc, char **argv)
while (!ferror(OutputFile)
&& StkTop(&InputStack)
&& !ferror(CurStkFile(&InputStack))
- && FGetsStk(ReadBuffer, BUFSIZ - 1,
+ && FGetsStk(ReadBuffer, BUFFER_SIZE - 1,
&InputStack))
{
@@ -489,7 +531,8 @@ int main(int argc, char **argv)
strrep(ReadBuffer, '\n', ' ');
strrep(ReadBuffer, '\r', ' ');
- ExpandTabs(ReadBuffer, TmpBuffer, Tab, BUFSIZ - 1 - strlen(ReadBuffer) );
+ ExpandTabs(ReadBuffer, TmpBuffer, Tab,
+ BUFFER_SIZE - 1 - strlen(ReadBuffer));
strcpy(ReadBuffer, TmpBuffer);
strcat(ReadBuffer, " ");
@@ -665,6 +708,7 @@ static void ShowIntStatus(void)
if (DebugLevel & (FLG_DbgListInfo | FLG_DbgListCont))
{
+ ShowWL("ConfigFilesRead", &ConfigFiles);
RESOURCE_INFO
}
@@ -797,6 +841,7 @@ static int ParseArgs(int argc, char **argv)
{"pipeverb", optional_argument, 0L, 'V'},
{"debug", required_argument, 0L, 'd'},
{"reset", no_argument, 0L, 'r'},
+ {"set", required_argument, 0L, 'S'},
{"quiet", no_argument, 0L, 'q'},
{"license", no_argument, 0L, 'i'},
{"splitchar", required_argument, 0L, 's'},
@@ -833,7 +878,7 @@ static int ParseArgs(int argc, char **argv)
while (!ArgErr &&
((c = getopt_long((int) argc, argv,
- "b::d:e:f:g::hH::I::il:m:n:Lo:p:qrs:t::v::V::w:Wx::",
+ "b::d:e:f:g::hH::I::il:m:n:Lo:p:qrs:S:t::v::V::w:Wx::",
long_options, &option_index)) != EOF))
{
while (c)
@@ -841,6 +886,10 @@ static int ParseArgs(int argc, char **argv)
nextc = 0;
switch (c)
{
+ case 'S':
+ ReadRCFromCmdLine(optarg);
+ break;
+
case 's':
if (!(Delimit = strdup(optarg)))
{
diff --git a/support/chktex/ChkTeX.h b/support/chktex/ChkTeX.h
index 01275d38b0..8d1c4b4ed7 100644
--- a/support/chktex/ChkTeX.h
+++ b/support/chktex/ChkTeX.h
@@ -233,7 +233,7 @@ DEBUGBITS(Debug_BIT)
MSG(pmNoRsrc, etWarn, TRUE, 0,\
"Could not find global resource file.")\
MSG(pmQuoteStyle, etWarn, TRUE, 0,\
- "Illegal quotestyle `%s'.")\
+ "Illegal quotestyle `%s' using `Traditional'.")\
MSG(pmWrongWipeTemp, etWarn, TRUE, 0,\
"Wrong template for wiping arguments, \"%s\"")\
MSG(pmSpecifyTerm, etErr, TRUE, 0,\
@@ -261,7 +261,9 @@ DEBUGBITS(Debug_BIT)
MSG(pmLongLines, etWarn, TRUE, 0,\
"ChkTeX does not handle lines over %d bytes correctly. Some errors and line numbers may be wrong in this file.") \
MSG(pmTabExpands, etWarn, TRUE, 0,\
- "ChkTeX could not fully expand tabs because the resulting line would be more than %d bytes. Some errors and line numbers may be wrong in this file.")
+ "ChkTeX could not fully expand tabs because the resulting line would be more than %d bytes. Some errors and line numbers may be wrong in this file.") \
+MSG(pmCmdSpaceStyle, etWarn, TRUE, 0,\
+ "Illegal CmdSpaceStyle `%s' using `Ignore'.")
#undef MSG
#define MSG(num, type, inuse, ctxt, text) num,
@@ -330,20 +332,19 @@ extern FILE *OutputFile, *InputFile;
DEF(int, AtLetter, FALSE); /* Whether `@' is a letter or not. */ \
DEF(int, InHeader, TRUE); /* Whether we're in the header */ \
DEF(int, VerbMode, FALSE); /* Whether we're in complete ignore-mode */ \
- DEF(long, MathMode, 0); /* Whether we're in math mode or not */ \
DEF(const char *, VerbStr, ""); /* String we'll terminate verbmode upon */ \
DEF(unsigned long, ErrPrint, 0); /* # errors printed */ \
DEF(unsigned long, WarnPrint, 0); /* # warnings printed */ \
DEF(unsigned long, UserSupp, 0); /* # user suppressed warnings */ \
- DEF(unsigned long, LineSupp, 0); /* # warnings suppressed on a single line */ \
- DEF(uint64_t, FileSuppressions, 0); /* # warnings suppressed in a file */ \
- DEF(uint64_t, UserFileSuppressions, 0) /* # User warnings suppressed in a file */
+ DEF(unsigned long, LineSupp, 0); /* # warnings suppressed on a single line */
#define DEF(type, name, value) extern type name
OPTION_DEFAULTS;
STATE_VARS;
#undef DEF
-extern struct Stack CharStack, InputStack, EnvStack;
+extern struct Stack CharStack, InputStack, EnvStack, ConTeXtStack;
+extern struct Stack FileSuppStack, UserFileSuppStack;
+extern struct Stack MathModeStack;
enum Quote
{
@@ -354,6 +355,15 @@ enum Quote
extern enum Quote Quote;
extern int StdInTTY, StdOutTTY, UsingStdIn;
+enum CmdSpace
+{
+ csIgnore = 0,
+ csInterWord = 0x1,
+ csInterSentence = 0x2,
+ csBoth = 0x3, /* both bits set */
+};
+extern enum CmdSpace CmdSpace;
+
int main(int argc, char **argv);
void PrintPrgErr(enum PrgErrNum, ...);
void ErrPrintf(const char *fmt, ...);
diff --git a/support/chktex/ChkTeX.pdf b/support/chktex/ChkTeX.pdf
new file mode 100644
index 0000000000..43d9b55485
--- /dev/null
+++ b/support/chktex/ChkTeX.pdf
Binary files differ
diff --git a/support/chktex/ChkTeX.tex.in b/support/chktex/ChkTeX.tex.in
index 353322abfc..3fbba08f56 100644
--- a/support/chktex/ChkTeX.tex.in
+++ b/support/chktex/ChkTeX.tex.in
@@ -54,11 +54,35 @@
{\noindent\large%
\begin{tabularx}{\linewidth}{lY}%
\bf Warning \theerrornum: & \texttt{#1}%
- \end{tabularx}}\stepcounter{errornum}\nopagebreak[4]}
+ \end{tabularx}}\stepcounter{errornum}\nopagebreak[4]}
+
+\newcommand{\fmtrc}[1]{%
+ {\noindent\large%
+ %% \begin{tabularx}{\linewidth}{lY}%
+ \phantomsection%
+ \bf\texttt{#1}%
+ \label{rc:#1}
+ %% \end{tabularx}
+ }\nopagebreak[4]}
\newenvironment{errdesc}[1]{\noindent\fmted{#1}\begin{quote}}{\end{quote}%
\pagebreak[3]}
+\newcommand\Keyword[1]{\marginpar{\texttt{\hfill\hyperref[rc:#1]{#1}}}}
+\newcommand{\chktexrcdefault}{\noindent The default value is}
+\newenvironment{chktexrcvar}[2]{%
+ \smallskip\pagebreak[2]%
+ %% \Keyword{#1}
+ \fmtrc{#1} #2 Variable%
+ \begin{quote}}{%
+ \end{quote}\pagebreak[3]}
+\newenvironment{chktexrcsimplevar}[1]{\begin{chktexrcvar}{#1}{Simple}}{\end{chktexrcvar}}
+\newenvironment{chktexrclistvar}[1]{\begin{chktexrcvar}{#1}{List}}{\end{chktexrcvar}}
+\newenvironment{chktexrclistvar*}[1]{\begin{chktexrcvar}{#1}{Lowercase-able List}}{\end{chktexrcvar}}
+
+%% \newenvironment{chktexrclistvar}[1]{\fmtrc{#1}List Variable}{}
+%% \newenvironment{chktexrclistvar*}[1]{\fmtrc{#1}List Variable with Lowercase}{}
+
\newenvironment{html}{\comment}{\endcomment}
\newenvironment{rawhtml}{\comment}{\endcomment}
@@ -81,6 +105,15 @@
%!\newcommand{\slash}{/}
%endlatex
+% PDF table of contents
+\usepackage{hyperref}
+\hypersetup{
+ colorlinks=true,
+ allcolors=blue,
+ pdfpagemode=UseOutlines
+}
+\usepackage{hypcap}
+
\title{\chktex\ v@PACKAGE_VERSION@}
\author{Jens~T. Berger~Thielemann}
@@ -370,7 +403,7 @@ A few words on installation on various platforms:
\paragraph{Note:} You \emph{must} install the new \rsrc\ file; \chktex\ will
fail to function otherwise!
- After doing this, you may enhance \chktex' behaviour by
+ After doing this, you may enhance \chktex's behaviour by
reading/editing the \rsrc\ file.
%latex
@@ -391,7 +424,7 @@ A UNIX-compliant template format follows:
\end{tabularx}
-\subsubsection{Options}
+\subsubsection{Comamndline Options}
These are the options \chktex\ currently accepts.
Please note that single-lettered options requiring a numerical or no
@@ -510,6 +543,7 @@ File:Line:Column:Warning number:Warning message
longer time to parse, but much more informative in use.
\end{description}
+ \phantomsection\label{clarg:format}%
\item[\texttt{-f [-{}-format]}] Specifies the format of the output.
This is done using a format similar to \Cmd{printf()}, where we
support the specifiers listed below.
@@ -739,6 +773,10 @@ The syntax is nearly the same, namely
\verb+% chktex-file ##+
\end{center}
+
+\input{ChkTeXRC.tex}
+
+
\subsubsection{Hints}
I've tried to collect some advice that may be useful --- if you have a
favourite hint, feel free to send it to me!
@@ -863,10 +901,9 @@ Error messages set in {\it italic type\/} are turned off by default.
Where margin paragraphs are listed in the text, they refer to the
keyword in the \rsrc\ file which controls the discussed warning.
-\newcommand\Keyword[1]{\marginpar{\texttt{\hfill\\ #1}}}
-
\smallskip\pagebreak[2]
-\Keyword{Silent}
+\phantomsection
+\Keyword{Silent}\label{warn:silent}
\begin{errdesc}{Command terminated with space.}
You tried to terminate a command with a blank space. Usually, this
is an error as these are ignored by \LaTeX. In most cases, you would
@@ -917,7 +954,9 @@ keyword in the \rsrc\ file which controls the discussed warning.
\end{errexam}
\end{errdesc}
-\Keyword{Italic\\ItalCmd\\NonItalic}
+\Keyword{Italic}
+\Keyword{ItalCmd}
+\Keyword{NonItalic}
\begin{errdesc}{Italic correction (`\BS/') found in non-italic
buffer.}
If you try to use the \verb@\/@ command when \chktex\ believes that
@@ -932,7 +971,9 @@ keyword in the \rsrc\ file which controls the discussed warning.
\end{errexam}
\end{errdesc}
-\Keyword{Italic\\ItalCmd\\NonItalic}
+\Keyword{Italic}
+\Keyword{ItalCmd}
+\Keyword{NonItalic}
\begin{errdesc}{Italic correction (`\BS/') found more than once.}
If the buffer is italic, and you try to use the \verb@\/@ command
more than once, you'll get this warning.
@@ -946,7 +987,9 @@ keyword in the \rsrc\ file which controls the discussed warning.
\end{errexam}
\end{errdesc}
-\Keyword{Italic\\ItalCmd\\NonItalic}
+\Keyword{Italic}
+\Keyword{ItalCmd}
+\Keyword{NonItalic}
\begin{errdesc}{No italic correction (`\BS/') found.}
You get this error if \chktex\ believes that you are switching from
italic to non-italic, and you've forgot to use the \verb@\/@ command
@@ -977,7 +1020,10 @@ keyword in the \rsrc\ file which controls the discussed warning.
\end{errexam}
\end{errdesc}
-\Keyword{HyphDash\\NumDash\\WordDash\\DashExcpt}
+\Keyword{HyphDash}
+\Keyword{NumDash}
+\Keyword{WordDash}
+\Keyword{DashExcpt}
\begin{errdesc}{Wrong length of dash may have been used.}
This warning suggests that a wrong number of dashes may have been
used. It does this by classifying the dash according to the the
@@ -1036,7 +1082,8 @@ keyword in the \rsrc\ file which controls the discussed warning.
\end{errdesc}
-\Keyword{CenterDots\\LowDots}
+\Keyword{CenterDots}
+\Keyword{LowDots}
\begin{errdesc}{You should use `\%s' to achieve an ellipsis.}
Simply typing three \Cmd{.} in a row will not give a perfect spacing
between the dots. The \verb@\ldots@ is much more suitable for this.
@@ -1057,33 +1104,42 @@ keyword in the \rsrc\ file which controls the discussed warning.
\end{errexam}
\end{errdesc}
+\phantomsection
+\label{warn:interword}
\Keyword{Abbrev}
+\Keyword{CmdSpaceStyle}
\begin{errdesc}{Interword spacing (`\BS\ ') should perhaps be used.}
One of the specified abbreviations were found. Unless you have
previously said \verb@\frenchspacing@, you'll have incorrect
- spacing, which one should avoid if possible.
+ spacing, which one should avoid if possible. The error will be suppressed
+ if you have used \verb@\frenchspacing@.
You can also specify case-insensitive abbreviations in \texttt{[]}, though
only the first letter is actually case-insensitive.
\begin{errexam}
- \verb@This is an example, i.e.@\underline{\tt\ }\verb@an demonstration.@ \\*
- This is an example, i.e. an demonstration. \\*
+ \verb@This is an example, i.e.@\underline{\tt\ }\verb@a demonstration.@ \\*
+ This is an example, i.e. a demonstration. \\*
\smallskip
- \verb@This is an example, i.e.\ an demonstration.@ \\*
- This is an example, i.e.\ an demonstration. \\*
+ \verb@This is an example, i.e.\ a demonstration.@ \\*
+ This is an example, i.e.\ a demonstration. \\*
\end{errexam}
\end{errdesc}
+\phantomsection
+\label{warn:intersentence}
+\Keyword{CmdSpaceStyle}
\begin{errdesc}{Intersentence spacing (`\BS{}@') should perhaps be used.}
- \LaTeX' detection of whether a period ends a sentence or not, is
+ \LaTeX's detection of whether a period ends a sentence or not, is
only based upon the character in front of the period. If it's
uppercase, it assumes that it does not end a sentence. While this
may be correct in many cases, it may be incorrect in others.
\chktex\ thus outputs this warning in every such case.
+ The error will be suppressed if you have used \verb@\frenchspacing@.
+
\begin{errexam}
\verb@I've seen an UFO!@\underline{\tt\ }\verb@Right over there!@ \\*
I've seen an UFO! Right over there! \\*
@@ -1119,7 +1175,7 @@ keyword in the \rsrc\ file which controls the discussed warning.
\end{errdesc}
\Keyword{MathEnvir}
-\begin{errdesc}{Mathmode still on at end of LaTeX file.}
+\begin{errdesc}{Mathmode still on at end of LaTeX file.}
This error is triggered if you at some point have turned on
mathmode, and \chktex\ couldn't see that you remembered to turn it
off.
@@ -1149,13 +1205,13 @@ keyword in the \rsrc\ file which controls the discussed warning.
"'" (ASCII 180).} On some keyboards you might get the wrong quote.
This quote looks, IMHO, \emph{ugly} compared to the standard
quotes, it doesn't even come out as a quote! Just see in the
- example.
-
+ example. In fact, this doesn't even compile anymore, so the warning is
+ probably obsolete.
\begin{errexam}
\verb@``There@\underline{\tt '}\verb@s quotes and there@\underline{\tt '}\verb@s quotes@
\underline{\tt ''} \\* % ''
- ``There´s quotes and there´s quotes´´ \\* % ''
+ % ``There´s quotes and there´s quotes´´ \\* % ''
\smallskip
\verb@``There's quotes and there's quotes''@ \\*
``There's quotes and there's quotes'' \\*
@@ -1265,7 +1321,9 @@ keyword in the \rsrc\ file which controls the discussed warning.
\end{errdesc}
-\Keyword{Italic\\ItalCmd\\NonItalic}
+\Keyword{Italic}
+\Keyword{ItalCmd}
+\Keyword{NonItalic}
\begin{errdesc}{Don't use \BS/ in front of small punctuation.}
Italic correction should generally \emph{not} be used in front of
small punctuation characters like `.' and `,'; as it looks better
@@ -1317,7 +1375,6 @@ keyword in the \rsrc\ file which controls the discussed warning.
derivations of that, ignore all text on the same line as
\verb@\end{verbatim}@. This will warn you about this.
-
\end{errdesc}
\fmted{Use ` to begin quotation, not '.}\hfill\\
@@ -1434,7 +1491,7 @@ keyword in the \rsrc\ file which controls the discussed warning.
\begin{errdesc}{You should put punctuation outside inner/inside
display math mode.}
As recommended in the \TeX{}book, you should try to put punctuation
- outside inner math mode, as this is gets formatted better.
+ outside inner math mode, as it is formatted better.
Similarily, you should let any final punctuation in display math
mode end up within it. Look at the following example, which was
@@ -1562,6 +1619,28 @@ keyword in the \rsrc\ file which controls the discussed warning.
\end{errdesc*}
+\fmted{`\%s' expected, found `\%s' (ConTeXt).}
+\begin{errdesc}{Solo `\%s' found (ConTeXt).}
+
+% \begin{errdesc}{`\%s' expected, found `\%s' (ConTeXt).}
+
+ Similar to warnings~9 and 10, these tracks environments, but Con\TeX{}t{} environments rather than \LaTeX.
+ They are tracked as separate messages to allow being turned on and off independently thereby allowing people to use macros that start with \verb+\start+.
+
+\end{errdesc}
+
+\begin{errdesc}{Expected math mode to be \%s here.}
+
+ Similar to warning~16, this warns when \chktex{} got confused about math mode.
+ In theory, for a well formed \LaTeX{} document this should never happen, but the following (invalid) documents will cause the warning.
+ This is because the \verb+$+ will exit math mode (which \verb+\ensuremath+ entered), and then exiting \verb+\ensuremath+ finds that we are in text mode which shouldn't happen.
+
+ \begin{errexam}
+ \verb+\ensuremath{ \frac{x}{3} $ y\times 7}+\\*
+ \end{errexam}
+
+\end{errdesc}
+
\section{Future plans}
In a somewhat prioritized sequence, this is what I'd like to put into the
diff --git a/support/chktex/FindErrs.c b/support/chktex/FindErrs.c
index f1a470b823..00ca49f48e 100644
--- a/support/chktex/FindErrs.c
+++ b/support/chktex/FindErrs.c
@@ -54,6 +54,7 @@ int NumRegexes = 0;
int FoundErr = EXIT_SUCCESS;
int LastWasComment = FALSE;
int SeenSpace = FALSE;
+int FrenchSpacing = FALSE;
/***************************** ERROR MESSAGES ***************************/
@@ -77,10 +78,10 @@ static int my_##func(int c) \
((LaTeXMsgs[(enum ErrNum) c].InUse == iuOK) && !SUPPRESSED_ON_LINE(c))
#define PSERR2(pos,len,err,a,b) \
- PrintError(CurStkName(&InputStack), RealBuf, pos, len, Line, err, a, b)
+ PrintError(err, CurStkName(&InputStack), RealBuf, pos, len, Line, a, b)
#define PSERRA(pos,len,err,a) \
- PrintError(CurStkName(&InputStack), RealBuf, pos, len, Line, err, a)
+ PrintError(err, CurStkName(&InputStack), RealBuf, pos, len, Line, a)
#define HEREA(len, err, a) PSERRA(BufPtr - Buf - 1, len, err, a)
#define PSERR(pos,len,err) PSERRA(pos,len,err,"")
@@ -124,6 +125,15 @@ static const char LTX_GenPunc[] = { ',', ';', 0 };
static const char LTX_SmallPunc[] = { '.', ',', 0 };
/*
+ * A list of characters that could be considered to start a new
+ * sentence, or not.
+ *
+ * This allows "Mr. ``X'' " to warn about the same as "Mr. X".
+ *
+ */
+static const char LTX_BosPunc[] = {'`', '(', '[', 0};
+
+/*
* String used to delimit a line suppression. This string must be
* followed immediately by the number of the warning to be suppressed.
* If more than one warning is to be suppressed, then multiple copies
@@ -157,9 +167,9 @@ static char *BufPtr;
static int ItFlag = efNone;
static int MathFlag = efNone;
-NEWBUF(Buf, BUFSIZ);
-NEWBUF(CmdBuffer, BUFSIZ);
-NEWBUF(ArgBuffer, BUFSIZ);
+NEWBUF(Buf, BUFFER_SIZE);
+NEWBUF(CmdBuffer, BUFFER_SIZE);
+NEWBUF(ArgBuffer, BUFFER_SIZE);
static enum ErrNum PerformCommand(const char *Cmd, char *Arg);
@@ -300,9 +310,8 @@ static char *PreProcess(void)
char *TmpPtr;
/* Reset any line suppressions */
-
- LineSuppressions = FileSuppressions;
- UserLineSuppressions = UserFileSuppressions;
+ LineSuppressions = *(uint64_t *)StkTop(&FileSuppStack);
+ UserLineSuppressions = *(uint64_t *)StkTop(&UserFileSuppStack);
/* Kill comments. */
strcpy(Buf, RealBuf);
@@ -349,15 +358,16 @@ static char *PreProcess(void)
{
PrintPrgErr(pmSuppTooHigh, error, MaxSuppressionBits);
}
+ uint64_t errbit = ((uint64_t)1 << abs(error));
if (error > 0)
{
- FileSuppressions |= ((uint64_t)1 << error);
- LineSuppressions |= ((uint64_t)1 << error);
+ *(uint64_t *)StkTop(&FileSuppStack) |= errbit;
+ LineSuppressions |= errbit;
}
else
{
- UserFileSuppressions |= ((uint64_t)1 << (-error));
- UserLineSuppressions |= ((uint64_t)1 << (-error));
+ *(uint64_t *)StkTop(&UserFileSuppStack) |= errbit;
+ UserLineSuppressions |= errbit;
}
}
TmpPtr = EscapePtr;
@@ -395,12 +405,30 @@ static char *PreProcess(void)
static void PerformEnv(char *Env, int Begin)
{
- static char VBStr[BUFSIZ] = "";
+ static char VBStr[BUFFER_SIZE] = "";
if (HasWord(Env, &MathEnvir))
{
- MathMode += Begin ? 1 : -1;
- MathMode = max(MathMode, 0);
+ if (Begin)
+ PushMode(TRUE, &MathModeStack);
+ else
+ {
+ if (!CurStkMode(&MathModeStack))
+ PSERRA(BufPtr - Buf - 4, 1, emMathModeConfusion, "on");
+ StkPop(&MathModeStack);
+ }
+ }
+
+ if (HasWord(Env, &TextEnvir))
+ {
+ if (Begin)
+ PushMode(FALSE, &MathModeStack);
+ else
+ {
+ if (CurStkMode(&MathModeStack))
+ PSERRA(BufPtr - Buf - 4, 1, emMathModeConfusion, "off");
+ StkPop(&MathModeStack);
+ }
}
if (Begin && HasWord(Env, &VerbEnvir))
@@ -453,7 +481,7 @@ static enum DotLevel CheckDots(char *PrePtr, char *PstPtr)
int TmpC;
enum DotLevel Front = dtUnknown, Back = dtUnknown;
- if (MathMode)
+ if (CurStkMode(&MathModeStack))
{
PrePtr--;
#define SKIP_EMPTIES(macro, ptr) macro(ptr, TmpC, \
@@ -625,11 +653,10 @@ static void PerformBigCmd(char *CmdPtr)
SKIP_AHEAD(TmpPtr, TmpC, TmpC == '{'); /* } */
if ((*TmpPtr == 'i') || (*TmpPtr == 'j'))
- PrintError(CurStkName(&InputStack), RealBuf,
- CmdPtr - Buf,
- (long) strlen(CmdBuffer), Line,
- emAccent, CmdBuffer, *TmpPtr,
- MathMode ? "math" : "");
+ PrintError(emAccent, CurStkName(&InputStack), RealBuf,
+ CmdPtr - Buf, (long)strlen(CmdBuffer), Line,
+ CmdBuffer, *TmpPtr,
+ CurStkMode(&MathModeStack) ? "math" : "");
}
else
PSERR(CmdPtr - Buf, CmdLen, emNoArgFound);
@@ -670,18 +697,18 @@ static void PerformBigCmd(char *CmdPtr)
if ((ei = PopErr(&EnvStack)))
{
if (strcmp(ei->Data, ArgBuffer))
- PrintError(CurStkName(&InputStack), RealBuf,
+ PrintError(emExpectC, CurStkName(&InputStack), RealBuf,
CmdPtr - Buf,
(long) strlen(CmdBuffer),
- Line, emExpectC, ei->Data, ArgBuffer);
+ Line, ei->Data, ArgBuffer);
FreeErrInfo(ei);
}
else
- PrintError(CurStkName(&InputStack), RealBuf,
+ PrintError(emSoloC, CurStkName(&InputStack), RealBuf,
CmdPtr - Buf,
(long) strlen(CmdBuffer),
- Line, emSoloC, ArgBuffer);
+ Line, ArgBuffer);
}
PerformEnv(ArgBuffer, (int) CmdBuffer[1] == 'b');
@@ -697,28 +724,28 @@ static void PerformBigCmd(char *CmdPtr)
{
TmpPtr = CmdBuffer + 6;
if (!(PushErr(TmpPtr, Line, CmdPtr - Buf + 6,
- CmdLen - 6, RealBuf, &EnvStack)))
+ CmdLen - 6, RealBuf, &ConTeXtStack)))
PrintPrgErr(pmNoStackMem);
}
else
{
TmpPtr = CmdBuffer + 5;
- if ((ei = PopErr(&EnvStack)))
+ if ((ei = PopErr(&ConTeXtStack)))
{
if (strcmp(ei->Data, TmpPtr))
- PrintError(CurStkName(&InputStack), RealBuf,
+ PrintError(emExpectConTeXt, CurStkName(&InputStack), RealBuf,
CmdPtr - Buf + 5,
(long) strlen(TmpPtr),
- Line, emExpectC, ei->Data, TmpPtr);
+ Line, ei->Data, TmpPtr);
FreeErrInfo(ei);
}
else
{
- PrintError(CurStkName(&InputStack), RealBuf,
+ PrintError(emSoloC, CurStkName(&InputStack), RealBuf,
CmdPtr - Buf,
(long) strlen(CmdBuffer),
- Line, emSoloC, TmpPtr);
+ Line, TmpPtr);
}
}
/* TODO: Do I need to call PerformEnv? */
@@ -776,8 +803,13 @@ static void CheckAbbrevs(const char *Buffer)
for (i = Abbrev.MaxLen; i >= 0; i--)
{
*--TmpPtr = *AbbPtr--;
- if (!isalpha((unsigned char)*AbbPtr) && HasWord(TmpPtr, &Abbrev))
+ if (!isalpha((unsigned char)*AbbPtr) &&
+ /* Ignore spacing problems after commands if desired */
+ (*AbbPtr != '\\' || (CmdSpace & csInterWord)) &&
+ HasWord(TmpPtr, &Abbrev))
+ {
PSERR(Buffer - Buf + 1, 1, emInterWord);
+ }
if (!*AbbPtr)
break;
}
@@ -1026,7 +1058,7 @@ static void CheckDash(void)
SKIP_AHEAD(TmpPtr, TmpC, TmpC == '-');
TmpCount = TmpPtr - BufPtr + 1;
- if (MathMode)
+ if (CurStkMode(&MathModeStack))
{
if (TmpCount > 1)
HERE(TmpCount, emWrongDash);
@@ -1088,6 +1120,73 @@ static void CheckDash(void)
}
}
+ /* Check DashExcpt looking for phrase with hyphenation that doesn't
+ * match what's in DashExcpt. This really only makes sense for
+ * HyphDash, but it should be cheap in the other cases. */
+ if (!Errored)
+ {
+ TmpPtr = BufPtr-1;
+
+ SKIP_BACK(TmpPtr, TmpC, (TmpC == '-'));
+ SKIP_BACK(TmpPtr, TmpC, isalpha(TmpC));
+ /* If we found a dash going backwards, the we already checked
+ * this on the first dash */
+ if (*TmpPtr != '-')
+ {
+ /* PrePtr now points to the beginning of the hyphenated phrase */
+ PrePtr = ++TmpPtr;
+
+ struct WordList *el = &DashExcpt;
+
+ FORWL(i, *el)
+ {
+ char *e = el->Stack.Data[i];
+ TmpPtr = PrePtr;
+
+ /* Walk through the strings until we find a
+ * mismatch. */
+ int FoundHyphenDiff = FALSE;
+ while (*e && *TmpPtr && *e == *TmpPtr)
+ {
+ /* Skip past characters that are the same */
+ while (*e && *TmpPtr && *e == *TmpPtr)
+ {
+ ++e;
+ ++TmpPtr;
+ }
+ /* Skip past differences in hyphens */
+ while (*e == '-' && *TmpPtr != '-')
+ {
+ ++e;
+ FoundHyphenDiff = TRUE;
+ }
+ while (*TmpPtr == '-' && *e != '-')
+ {
+ ++TmpPtr;
+ FoundHyphenDiff = TRUE;
+ }
+ }
+
+ /* If there was no mismatch all the way to the end of e,
+ * and TmpPtr is not in the middle of a word, then they
+ * matched ignoring hyphens, so we have found the one
+ * DashExcpt element we care about and don't have to
+ * check any others. Moreover, if we found a difference
+ * in hyphenation, then we must warn because it matches
+ * something in DashExcpt but with improper hyphenation.
+ * It's possible they could put the same phrase in twice
+ * with different hyphenations, but that seems pretty
+ * pathological. */
+ if (*e == '\0' && !isalpha((unsigned char)*TmpPtr))
+ {
+ if (FoundHyphenDiff)
+ Errored = TRUE;
+ break;
+ }
+ }
+ }
+ }
+
if (Errored)
HERE(TmpCount, emWrongDash);
}
@@ -1140,14 +1239,8 @@ static void HandleBracket(char Char)
ItState = TRUE;
/* Same for math mode */
- if (ei->Flags & efMath)
- {
- MathMode = 1;
- }
- else if (ei->Flags & efNoMath)
- {
- MathMode = 0;
- }
+ if (ei->Flags & efMath || ei->Flags & efNoMath)
+ StkPop(&MathModeStack);
FreeErrInfo(ei);
}
@@ -1160,8 +1253,8 @@ static void HandleBracket(char Char)
BBuf[0] = Char;
ABuf[1] = BBuf[1] = 0;
if (Match)
- PrintError(CurStkName(&InputStack), RealBuf,
- BufPtr - Buf - 1, 1, Line, emExpectC,
+ PrintError(emExpectC, CurStkName(&InputStack), RealBuf,
+ BufPtr - Buf - 1, 1, Line,
ABuf, BBuf);
else
HEREA(1, emSoloC, BBuf);
@@ -1187,12 +1280,16 @@ static void HandleBracket(char Char)
switch (MathFlag)
{
- default:
+ case efNone:
+ break;
+ case efMath:
+ case efNoMath:
+ PushMode((MathFlag == efMath), &MathModeStack);
+ /* Save for when we exit this delimiter */
ei->Flags |= MathFlag;
+ /* Reset flag just in case... */
MathFlag = efNone;
break;
- case efNone:
- ei->Flags |= MathMode ? efMath : efNoMath;
}
}
}
@@ -1368,14 +1465,14 @@ int FindErr(const char *_RealBuf, const unsigned long _Line)
TmpPtr = PrePtr;
SKIP_BACK(TmpPtr, TmpC,
- (LATEX_SPACE(TmpC) || strchr("{}$", TmpC)));
+ (LATEX_SPACE(TmpC) || strchr("$", TmpC)));
if (isdigit((unsigned char)*TmpPtr))
{
TmpPtr = BufPtr;
SKIP_AHEAD(TmpPtr, TmpC,
- (LATEX_SPACE(TmpC) || strchr("{}$", TmpC)));
+ (LATEX_SPACE(TmpC) || strchr("$", TmpC)));
if (isdigit((unsigned char)*TmpPtr))
HERE(1, emUseTimes);
@@ -1433,7 +1530,8 @@ int FindErr(const char *_RealBuf, const unsigned long _Line)
case 'W': /* case 'X': */
case 'Y':
case 'Z':
- if (!isalpha((unsigned char)*PrePtr) && (*PrePtr != '\\') && MathMode)
+ if (!isalpha((unsigned char)*PrePtr) && (*PrePtr != '\\') &&
+ CurStkMode(&MathModeStack))
{
TmpPtr = BufPtr;
CmdPtr = CmdBuffer;
@@ -1474,7 +1572,7 @@ int FindErr(const char *_RealBuf, const unsigned long _Line)
HEREA(3, emEllipsis, cTmpPtr);
}
- /* Regexp: "([^A-Z@.])\.[.!?:]*\s+[a-z]" */
+ /* Regexp: "([^A-Z@.])\.[.!?:]*\s[ \`([]*[a-z]" */
TmpPtr = BufPtr;
SKIP_AHEAD(TmpPtr, TmpC, strchr(LTX_EosPunc, TmpC));
@@ -1483,9 +1581,17 @@ int FindErr(const char *_RealBuf, const unsigned long _Line)
if (!isupper((unsigned char)*PrePtr) && (*PrePtr != '@') &&
(*PrePtr != '.'))
{
- SKIP_AHEAD(TmpPtr, TmpC, LATEX_SPACE(TmpC));
+ SKIP_AHEAD(TmpPtr, TmpC,
+ (LATEX_SPACE(TmpC) || TmpC == '\\' ||
+ strchr(LTX_BosPunc, TmpC)));
if (islower((unsigned char)*TmpPtr))
- PSERR(BufPtr - Buf, 1, emInterWord);
+ {
+ /* Ignore spacing problems after commands if desired */
+ TmpPtr = PrePtr;
+ SKIP_BACK(TmpPtr, TmpC, istex(TmpC));
+ if (*TmpPtr != '\\' || (CmdSpace & csInterWord))
+ PSERR(BufPtr - Buf, 1, emInterWord);
+ }
else
CheckAbbrevs(&BufPtr[-1]);
}
@@ -1498,9 +1604,17 @@ int FindErr(const char *_RealBuf, const unsigned long _Line)
case ';':
/* Regexp: "[A-Z][A-Z][.!?:;]\s+" */
- if (isspace((unsigned char)*BufPtr) && isupper((unsigned char)*PrePtr) &&
- (isupper((unsigned char)PrePtr[-1]) || (Char != '.')))
- HERE(1, emInterSent);
+ if (isspace((unsigned char)*BufPtr) &&
+ isupper((unsigned char)*PrePtr) &&
+ (isupper((unsigned char)PrePtr[-1]) || (Char != '.')) &&
+ !FrenchSpacing)
+ {
+ /* Ignore spacing problems after commands if desired */
+ TmpPtr = PrePtr;
+ SKIP_BACK(TmpPtr, TmpC, istex(TmpC));
+ if (*TmpPtr != '\\' || (CmdSpace & csInterSentence))
+ HERE(1, emInterSent);
+ }
/* FALLTHRU */
case ',':
@@ -1509,12 +1623,12 @@ int FindErr(const char *_RealBuf, const unsigned long _Line)
((BufPtr[-1] == '.') || (BufPtr[-1] == ','))))
PSERR(PrePtr - Buf, 1, emSpacePunct);
- if (MathMode &&
+ if (CurStkMode(&MathModeStack) &&
(((*BufPtr == '$') && (BufPtr[1] != '$')) ||
(!strafter(BufPtr, "\\)"))))
HEREA(1, emPunctMath, "outside inner");
- if (!MathMode &&
+ if (!CurStkMode(&MathModeStack) &&
(((*PrePtr == '$') && (PrePtr[-1] == '$')) ||
(!strinfront(PrePtr, "\\]"))))
HEREA(1, emPunctMath, "inside display");
@@ -1524,9 +1638,8 @@ int FindErr(const char *_RealBuf, const unsigned long _Line)
case '`':
if ((Char == *BufPtr) && (Char == BufPtr[1]))
{
- PrintError(CurStkName(&InputStack), RealBuf,
+ PrintError(emThreeQuotes, CurStkName(&InputStack), RealBuf,
BufPtr - Buf - 1, 3, Line,
- emThreeQuotes,
Char, Char, Char, Char, Char, Char);
}
@@ -1557,7 +1670,7 @@ int FindErr(const char *_RealBuf, const unsigned long _Line)
HERE(TmpPtr - BufPtr + 1, emBeginQ);
/* Now check quote style */
-#define ISPUNCT(ptr) (strchr(LTX_GenPunc, *ptr) && (ptr[-1] != '\\'))
+#define ISPUNCT(ptr) ((strchr(LTX_EosPunc, *ptr) || strchr(LTX_GenPunc, *ptr)) && (ptr[-1] != '\\'))
/* We ignore all single words/abbreviations in quotes */
@@ -1662,9 +1775,8 @@ int FindErr(const char *_RealBuf, const unsigned long _Line)
1, emFalsePage);
}
- if (LATEX_SPACE(*BufPtr) && !MathMode &&
- !CheckSilentRegex() &&
- (strlen(CmdBuffer) != 2))
+ if (LATEX_SPACE(*BufPtr) && !CurStkMode(&MathModeStack) &&
+ !CheckSilentRegex() && (strlen(CmdBuffer) != 2))
{
PSERR(BufPtr - Buf, 1, emSpaceTerm);
}
@@ -1696,7 +1808,7 @@ int FindErr(const char *_RealBuf, const unsigned long _Line)
break;
case ')':
- if (isspace((unsigned char)*PrePtr))
+ if (SeenSpace)
PSERRA(BufPtr - Buf - 1, 1, emNoSpaceParen,
"in front of");
if (isalpha((unsigned char)*BufPtr))
@@ -1726,7 +1838,14 @@ int FindErr(const char *_RealBuf, const unsigned long _Line)
SKIP_AHEAD(TmpPtr, TmpC, (TmpC != '$' && TmpC != '\0'));
PSERR(BufPtr - Buf - 1, TmpPtr-BufPtr+2, emInlineMath);
}
- MathMode ^= TRUE;
+ if (CurStkMode(&MathModeStack))
+ {
+ StkPop(&MathModeStack);
+ }
+ else
+ {
+ PushMode(TRUE, &MathModeStack);
+ }
}
break;
@@ -1782,29 +1901,35 @@ void PrintStatus(unsigned long Lines)
while ((ei = PopErr(&CharStack)))
{
- PrintError(ei->File, ei->LineBuf, ei->Column,
- ei->ErrLen, ei->Line, emNoMatchC, (char *) ei->Data);
+ PrintError(emNoMatchC, ei->File, ei->LineBuf, ei->Column,
+ ei->ErrLen, ei->Line, (char *) ei->Data);
FreeErrInfo(ei);
}
while ((ei = PopErr(&EnvStack)))
{
- PrintError(ei->File, ei->LineBuf, ei->Column,
- ei->ErrLen, ei->Line, emNoMatchC, (char *) ei->Data);
+ PrintError(emNoMatchC, ei->File, ei->LineBuf, ei->Column,
+ ei->ErrLen, ei->Line, (char *) ei->Data);
+ FreeErrInfo(ei);
+ }
+
+ while ((ei = PopErr(&ConTeXtStack)))
+ {
+ PrintError(emNoMatchConTeXt, ei->File, ei->LineBuf, ei->Column,
+ ei->ErrLen, ei->Line, (char *) ei->Data);
FreeErrInfo(ei);
}
- if (MathMode)
+ if (CurStkMode(&MathModeStack))
{
- PrintError(CurStkName(&InputStack), "", 0L, 0L, Lines, emMathStillOn);
+ PrintError(emMathStillOn, CurStkName(&InputStack), "", 0L, 0L, Lines);
}
for (Cnt = 0L; Cnt < (NUMBRACKETS >> 1); Cnt++)
{
if (Brackets[Cnt << 1] != Brackets[(Cnt << 1) + 1])
{
- PrintError(CurStkName(&InputStack), "", 0L, 0L, Lines,
- emNoMatchCC,
+ PrintError(emNoMatchCC, CurStkName(&InputStack), "", 0L, 0L, Lines,
BrOrder[Cnt << 1], BrOrder[(Cnt << 1) + 1]);
}
}
@@ -1818,7 +1943,14 @@ void PrintStatus(unsigned long Lines)
/* Print how to suppress warnings. */
if ( ErrPrint + WarnPrint > 0 ) {
- fprintf(stderr, "See the manual for how to suppress some or all of these warnings/errors.\n" );
+ fprintf(
+ stderr,
+ "See the manual for how to suppress some or all of these warnings/errors.\n"
+ "The manual is available "
+#ifdef TEX_LIVE
+ "by running `texdoc chktex` or "
+#endif
+ "at https://www.nongnu.org/chktex/ChkTeX.pdf\n");
}
}
}
@@ -1847,12 +1979,11 @@ void PrintStatus(unsigned long Lines)
void
-PrintError(const char *File, const char *String,
- const long Position, const long Len,
- const long LineNo, const enum ErrNum Error, ...)
+PrintError(const enum ErrNum Error, const char *File, const char *String,
+ const long Position, const long Len, const long LineNo, ...)
{
static /* Just to reduce stack usage... */
- char PrintBuffer[BUFSIZ];
+ char PrintBuffer[BUFFER_SIZE];
va_list MsgArgs;
char *LastNorm = OutputFormat;
@@ -1872,7 +2003,6 @@ PrintError(const char *File, const char *String,
}
else
{
- FoundErr = EXIT_FAILURE;
Context = LaTeXMsgs[Error].Context;
if (!HeadErrOut)
@@ -1880,18 +2010,22 @@ PrintError(const char *File, const char *String,
#define RGTCTXT(Ctxt, Var) if((Context & Ctxt) && !(Var)) break;
- RGTCTXT(ctInMath, MathMode);
- RGTCTXT(ctOutMath, !MathMode);
+ RGTCTXT(ctInMath, CurStkMode(&MathModeStack));
+ RGTCTXT(ctOutMath, !CurStkMode(&MathModeStack));
RGTCTXT(ctInHead, InHeader);
RGTCTXT(ctOutHead, !InHeader);
+ /* Count how warnings or errors we've found, and
+ * update the return code with the worst. */
switch (LaTeXMsgs[Error].Type)
{
case etWarn:
WarnPrint++;
+ FoundErr = max(FoundErr, EXIT_WARNINGS);
break;
case etErr:
ErrPrint++;
+ FoundErr = max(FoundErr, EXIT_ERRORS);
break;
case etMsg:
break;
@@ -1946,7 +2080,7 @@ PrintError(const char *File, const char *String,
fprintf(OutputFile, "%ld", LineNo);
break;
case 'm':
- va_start(MsgArgs, Error);
+ va_start(MsgArgs, LineNo);
vfprintf(OutputFile,
LaTeXMsgs[Error].Message, MsgArgs);
va_end(MsgArgs);
@@ -2008,6 +2142,10 @@ static enum ErrNum PerformCommand(const char *Cmd, char *Arg)
AtLetter = TRUE;
else if (!strcmp(Cmd, "\\makeatother"))
AtLetter = FALSE;
+ else if (!strcmp(Cmd, "\\frenchspacing"))
+ FrenchSpacing = TRUE;
+ else if (!strcmp(Cmd, "\\nonfrenchspacing"))
+ FrenchSpacing = FALSE;
else if (InputFiles && !(strcmp(Cmd, "\\input") && strcmp(Cmd, "\\include")))
{
SKIP_AHEAD(Arg, TmpC, LATEX_SPACE(TmpC));
@@ -2029,8 +2167,8 @@ static enum ErrNum PerformCommand(const char *Cmd, char *Arg)
SKIP_AHEAD(Arg, TmpC, LATEX_SPACE(TmpC));
if (*Arg == '{')
{
- MathFlag = MathMode ? efMath : efNoMath;
- MathMode = 1;
+ /* We will actually turn on math mode when we enter the {} */
+ MathFlag = efMath;
}
}
else if (HasWord(Cmd, &TextCmd))
@@ -2038,8 +2176,8 @@ static enum ErrNum PerformCommand(const char *Cmd, char *Arg)
SKIP_AHEAD(Arg, TmpC, LATEX_SPACE(TmpC));
if (*Arg == '{')
{
- MathFlag = MathMode ? efMath : efNoMath;
- MathMode = 0;
+ /* We will actually turn on text mode when we enter the {} */
+ MathFlag = efNoMath;
}
}
else if (*Cmd == '\\')
@@ -2049,11 +2187,14 @@ static enum ErrNum PerformCommand(const char *Cmd, char *Arg)
{
case '(':
case '[':
- MathMode = TRUE;
+ PushMode(TRUE, &MathModeStack);
break;
case ']':
case ')':
- MathMode = FALSE;
+ if (!CurStkMode(&MathModeStack))
+ PSERRA(BufPtr - Buf - 2, 1, emMathModeConfusion, "on");
+
+ StkPop(&MathModeStack);
break;
case '/':
switch (ItState)
diff --git a/support/chktex/FindErrs.h b/support/chktex/FindErrs.h
index df38559ba3..8190da2168 100644
--- a/support/chktex/FindErrs.h
+++ b/support/chktex/FindErrs.h
@@ -128,7 +128,13 @@
MSG(emDisplayMath, etWarn, iuOK, ctOutMath,\
"Use \\[ ... \\] instead of $$ ... $$.")\
MSG(emInlineMath, etWarn, iuNotSys, ctOutMath,\
- "Use \\( ... \\) instead of $ ... $.")
+ "Use \\( ... \\) instead of $ ... $.")\
+ MSG(emExpectConTeXt, etWarn, iuOK, ctNone,\
+ "`%s' expected, found `%s' (ConTeXt).")\
+ MSG(emNoMatchConTeXt, etWarn, iuOK, ctNone,\
+ "No match found for `%s' (ConTeXt).") \
+ MSG(emMathModeConfusion, etWarn, iuOK, ctNone,\
+ "Expected math mode to be %s here.")
#undef MSG
#define MSG(num, type, inuse, ctxt, text) num,
@@ -193,8 +199,8 @@ extern char *OutputFormat;
int CheckSilentRegex(void);
int FindErr(const char *, const unsigned long);
-void PrintError(const char *, const char *, const long, const long,
- const long, const enum ErrNum, ...);
+void PrintError(const enum ErrNum, const char *, const char *, const long,
+ const long, const long, ...);
void PrintStatus(unsigned long Lines);
#endif /* FINDERRS */
diff --git a/support/chktex/MakeChkTeXRC.pl b/support/chktex/MakeChkTeXRC.pl
new file mode 100755
index 0000000000..4e7e9208ba
--- /dev/null
+++ b/support/chktex/MakeChkTeXRC.pl
@@ -0,0 +1,71 @@
+# Used to convert chktexrc.in (which see) into chktexrc and ChkTeXRC.tex
+
+use strict;
+use warnings;
+
+my $chktexrc_output;
+if ( $ARGV[0] eq '--chktexrc' ) {
+ $chktexrc_output = 1;
+} elsif ( $ARGV[0] eq '--latex' ) {
+ $chktexrc_output = 0;
+} else {
+ exit 1;
+}
+
+
+# Filter the lines of the file
+open(my $fh, '<:encoding(UTF-8)', $ARGV[1])
+ or die "Could not open file '$ARGV[1]' $!";
+
+while ( <$fh> ) {
+ if (/^#### END$/) {
+ exit 0;
+ }
+
+ if ($chktexrc_output) {
+ # chktexrc output, so discard all lines over 2
+ next if /^#{3,}/;
+
+ s/\@verb\@/`/g;
+ s/\@endverb\@/'/g;
+ s/\@emph\@/*/g;
+ s/\@endemph\@/*/g;
+ s/\@ref\@/ /g;
+ s/\@endref\@//g;
+
+ s/\@TeX@/TeX/g;
+ s/\@LaTeX@/LaTeX/g;
+ s/\@ChkTeX@/ChkTeX/g;
+ s/\@\\{2}\@//g; # \\ in LaTeX
+ s/\\\@ */ /g; # \@ in LaTeX
+ s/\@bf //g;
+ s/\@\&\@//g;
+ print;
+
+ } else {
+
+ # LaTeX output, so discard lines except with 1,3
+ next if /^#{4,}/;
+ next if /^#{2} /;
+ # next unless /^#/;
+ s/^#+[ ]*//;
+
+ s/\@emph\@/\\emph{/g;
+ s/\@endemph\@/}/g;
+ s/\@ref\@(.*)\@endref\@/~\\hyperref[rc:$1]{$1}/g;
+
+
+ s/\@TeX@/\\TeX{}/g;
+ s/\@LaTeX@/\\LaTeX{}/g;
+ s/\@ChkTeX@/\\chktex{}/g;
+ s/\@verb\@/\\verb@/g;
+ s/\@endverb\@/@/g;
+ s/\@\\{2}\@/\\\\/g;
+ s/\@bf/\\bf/g;
+ s/\@\&\@/&/g;
+
+ print;
+ }
+}
+# TODO:
+# \ChkTeX
diff --git a/support/chktex/Makefile.in b/support/chktex/Makefile.in
index 8980880ea3..4c8222e4da 100644
--- a/support/chktex/Makefile.in
+++ b/support/chktex/Makefile.in
@@ -47,6 +47,7 @@ LIBS=@LIBS@
LDFLAGS=@LDFLAGS@
LN_S=@LN_S@
LATEX=@LATEX@
+PDFLATEX=@PDFLATEX@
DVIPS=@DVIPS@
PS2PDF=ps2pdf
PERL5=@PERL5@
@@ -64,7 +65,7 @@ VPATH=$(srcdir)
#####################################################################
-EXTRA_DIST=configure.in Makefile.in stamp-h.in config.h.in rmeheader.in \
+EXTRA_DIST=configure.ac Makefile.in stamp-h.in config.h.in rmeheader.in \
MakeHTML.pl ChkTeX.tex.in aclocal.m4 NEWS \
chkweb deweb.in COPYING chktex.1 chkweb.1 deweb.1 \
input.tex Test.tex Test.pcre.out Test.posix-ere.out Test.nore.out configure \
@@ -72,7 +73,7 @@ EXTRA_DIST=configure.in Makefile.in stamp-h.in config.h.in rmeheader.in \
$(wildcard m4/*.m4)
# created by configure
-CONFIG_DIST=ChkTeX.tex
+CONFIG_DIST=ChkTeX.tex ChkTeXRC.tex chktexrc
# created at make time
BUILT_DIST=chktex.doc chkweb.doc deweb.doc README ChkTeX.dvi
@@ -85,7 +86,7 @@ SOURCEFILES=$(CSOURCES) $(wildcard $(CSOURCES:.c=.h)) types.h
DISTFILES=$(EXTRA_DIST) $(SOURCEFILES)
-all: chktex
+all: chktex chktexrc
DISTDIR:=chktex-@PACKAGE_VERSION@
dist: $(DISTDIR).tar.gz
@@ -124,7 +125,7 @@ endif
OBJS= ChkTeX.o FindErrs.o OpSys.o Resource.o Utility.o
-MAKETEST= (builddir=`pwd` ; cd $(srcdir) ; $${builddir}/chktex -mall -r -g0 -lchktexrc -v5 Test.tex || :)
+MAKETEST= (builddir=`pwd` ; cd $(srcdir) ; $${builddir}/chktex -mall -r -g0 -lchktexrc -v5 -q Test.tex || :)
# We can't grep the output of chtex because it might not be built yet
TestOutFile := $(shell sed -n 's/.*HAVE_\(.*RE\) 1.*/\1/p' config.h | tr "A-Z_" "a-z-")
@@ -133,14 +134,14 @@ TestOutFile := Test.nore.out
else
TestOutFile := Test.$(TestOutFile).out
endif
-$(srcdir)/$(TestOutFile): $(srcdir)/Test.tex
+$(srcdir)/$(TestOutFile): $(srcdir)/Test.tex $(srcdir)/input/file
-rm -f $(srcdir)/$(TestOutFile)
@echo ""
@echo "***Warning: creating $(TestOutFile)***"
@echo ""
$(MAKETEST) 1> $(srcdir)/$(TestOutFile)
-check: chktex $(srcdir)/$(TestOutFile)
+check: chktex $(srcdir)/$(TestOutFile) chktexrc
@echo ">>> Testing that checking algorithms work correctly..."
@-rm -f chktest
$(MAKETEST) 1> chktest
@@ -154,6 +155,7 @@ check: chktex $(srcdir)/$(TestOutFile)
echo "results were *supposed* to be..."; \
diff -u $(srcdir)/$(TestOutFile) chktest; \
fi
+ $(srcdir)/tests/run-tests.sh `pwd` "$(srcdir)"
chktex: $(OBJS)
@@ -233,12 +235,12 @@ endif
###################### AUTOCONF REMAKING ################################
-$(srcdir)/configure: configure.in aclocal.m4
+$(srcdir)/configure: configure.ac aclocal.m4
cd $(srcdir) && autoconf
#autoheader might not change config.h.in, so touch a stamp file.
$(srcdir)/config.h.in: stamp-h.in
-$(srcdir)/stamp-h.in: configure.in aclocal.m4
+$(srcdir)/stamp-h.in: configure.ac aclocal.m4
cd $(srcdir) && autoheader
echo timestamp > $(srcdir)/stamp-h.in
@@ -260,7 +262,14 @@ config.status: configure
%.doc: %.1
$(GROFF) $< > $@
-ChkTeX.dvi: ChkTeX.tex
+ChkTeXRC.tex: chktexrc.in MakeChkTeXRC.pl
+ $(PERL5) $(srcdir)/MakeChkTeXRC.pl --latex $(srcdir)/chktexrc.in > ChkTeXRC.tex
+
+chktexrc: chktexrc.in MakeChkTeXRC.pl
+ $(PERL5) $(srcdir)/MakeChkTeXRC.pl --chktexrc $(srcdir)/chktexrc.in > chktexrc
+
+
+ChkTeX.dvi: ChkTeX.tex ChkTeXRC.tex
ifdef LATEX
$(LATEX) ChkTeX.tex
else
@@ -271,8 +280,13 @@ endif
ChkTeX.ps: ChkTeX.dvi
$(DVIPS) -o ChkTeX.ps ChkTeX.dvi
+ifdef PDFLATEX
+ChkTeX.pdf: ChkTeX.tex ChkTeXRC.tex
+ $(PDFLATEX) -interaction=nonstopmode ChkTeX.tex
+else
ChkTeX.pdf: ChkTeX.ps
$(PS2PDF) $< $@
+endif
cover:
-./chktex -h
diff --git a/support/chktex/NEWS b/support/chktex/NEWS
index 14c389b6b8..5605c50b2d 100644
--- a/support/chktex/NEWS
+++ b/support/chktex/NEWS
@@ -1,6 +1,48 @@
Development of ChkTeX is now in a maintainance mode. All versions
1.6.x are essentially bug fixes. Version 1.7 added some new features.
+1.7.8 (2022-10-17), released by Ivan Andrus <darthandrus@gmail.com>
+
+ * Fix some packaging issues for CTAN
+
+1.7.7 (2022-10-17), released by Ivan Andrus <darthandrus@gmail.com>
+
+ * Fix false positives
+ * Fix overzealous warning of x between numbers #60184
+ * Handle nested mathmode e.g. \ensuremath #60197
+ * Add many citation commands from biblatex #56608
+ * Add support for breqn package #62631
+ * WipeArg on \graphicspath #47593
+ * WipeArg on LuaTeX macros which contain lua code #53146
+ * Add \itshape to Silent section https://tex.stackexchange.com/questions/627808/why-does-chktex-complain-when-there-is-a-space-after-itshape-but-not-when-bfse
+ * Make QuoteStyle warnings work with end of sentence punctuation #53494
+ * When checking for inter-word spacing, ignore certain punctuation #54751, #53347
+ * Allow \frenchspacing to turn off warning 13 (intersentence spacing)
+ * Don't warn about space before a parenthesis at the beginning of the line if the previous line ended with a comment (and no space) #109479
+ * Make exit status 2 or 3 (not 1) when warnings or errors are found. Some callers expected a return value of 1 to mean an internal error. #53129
+
+ * Fix many bugs
+ * Make ChkTeX process longer lines, especially on Windows. This doesn't fix the problem entirely, but it should amerliorate it to a large extent.
+ * Make file suppressions only apply to the file they are in. This allows putting all the "badness" into one file. #57809
+ * Add check to make sure input is a regular file and not a directory #56520
+ * Add support for relative paths in sub directories #53494
+ * Manage ConTeXt environments separately from LaTeX environments #51179
+ * Change argument order to avoid undefined behavior in va_start()
+
+ * New warnings and features
+ * Add regex for unescaped optional arguments inside optional arguments #56657
+ * Support RC settings on the command line #56486
+ * Warn about phrases that match DashExcpt _except_ for the hyphens #58886
+ * Add CmdSpaceStyle option to Ignore spacing problems after commands #60809, #60380
+ * Add support for finding chktexrc files in XDG locations #61405
+ * Add new warning when ChkTeX gets confused about mathmode
+
+ * Improved documentation
+ * Make chktexrc somewhat literate and creating ChkTeXRC.tex as well.
+ * Make "keywords" link to the appropriate chktexrc variable documentation
+ * Add note about chktexrc and link to documentation in the help message #50004 #61179
+ * Indicate that debug is a bit field instead of a level
+
1.7.6 (2016-09-09), released by Ivan Andrus <darthandrus@gmail.com>
* Properly copy and free strings. This caused incorrect file
diff --git a/support/chktex/OpSys.c b/support/chktex/OpSys.c
index 7d055b7228..67e2bea4a4 100644
--- a/support/chktex/OpSys.c
+++ b/support/chktex/OpSys.c
@@ -115,7 +115,9 @@ static char term_buffer[2048];
# define LOCALRCFILE "." RCBASENAME
#endif
-char ConfigFile[BUFSIZ] = LOCALRCFILE;
+char ConfigFile[BUFFER_SIZE] = LOCALRCFILE;
+struct WordList ConfigFiles;
+
const char *ReverseOn;
const char *ReverseOff;
@@ -150,6 +152,7 @@ enum LookIn
liMin,
liSysDir,
liUsrDir,
+ liXdgDir,
liEnvir,
liCurDir,
liNFound,
@@ -177,12 +180,10 @@ int SetupVars(void)
break;
case liEnvir: /* Environment defined */
#ifdef __MSDOS__
-
if ((Env = getenv("CHKTEXRC")) || (Env = getenv("CHKTEX_HOME")))
#elif defined(TEX_LIVE)
if ((Env = kpse_var_value("CHKTEXRC")))
#else
-
if ((Env = getenv("CHKTEXRC")))
#endif
@@ -206,6 +207,27 @@ int SetupVars(void)
*ConfigFile = 0;
break;
+
+ case liXdgDir: /* Cross-desktop group dir for resource files */
+
+ /* XDG is really unix specific, but it shouldn't hurt to
+ * support it on Windows, should someone set the variables. */
+ if ((Env = getenv("XDG_CONFIG_HOME")) && *Env)
+ {
+ strcpy(ConfigFile, Env);
+ tackon(ConfigFile, RCBASENAME);
+ }
+ else if ((Env = getenv("HOME")) && *Env)
+ {
+ strcpy(ConfigFile, Env);
+ tackon(ConfigFile, ".config");
+ tackon(ConfigFile, RCBASENAME);
+ }
+ else
+ *ConfigFile = 0;
+
+ break;
+
case liUsrDir: /* User dir for resource files */
#if defined(__unix__)
@@ -446,6 +468,45 @@ static int HasFile(char *Dir, const char *Filename, const char *App)
}
+/*
+ * If Filename is contains a directory component, then add a fully qualified
+ * directory to the TeXInputs WordList.
+ *
+ * I'm not sure how it will work with some Windows paths,
+ * e.g. C:path\to\file.tex since it doesn't really understand the leading C:
+ * But I'm not sure it would even work with a path like that, and I have no
+ * way to test it.
+ *
+ * Behaviour somewhat controlled by the macros SLASH and DIRCHARS in the
+ * OpSys.h file.
+ *
+ */
+
+void AddDirectoryFromRelativeFile(const char * Filename, struct WordList *TeXInputs)
+{
+ if ( ! Filename )
+ return;
+
+ /* There are no path delimiters, so it's just a file, return null */
+ if ( ! strstr( Filename, DIRCHARS ) )
+ return;
+
+
+ char buf[BUFFER_SIZE];
+ if ( strchr(DIRCHARS,Filename[0]) ) {
+ strcpy(buf,Filename);
+ } else {
+ getcwd(buf, BUFFER_SIZE);
+ tackon(buf,Filename);
+ }
+
+ /* Keep up to the final SLASH -- that will be the directory. */
+ char * end = strrchr(buf,SLASH);
+ *end = '\0';
+ InsertWord(buf,TeXInputs);
+}
+
+
#if USE_RECURSE
static int SearchFile(char *Dir, const char *Filename, const char *App)
{
@@ -490,3 +551,24 @@ static int SearchFile(char *Dir, const char *Filename, const char *App)
return (Found);
}
#endif /* USE_RECURSE */
+
+#if defined(HAVE_STAT)
+int IsRegFile(const char *Filename)
+{
+ int Retval = FALSE;
+ struct stat *statbuf;
+ if ((statbuf = malloc(sizeof(struct stat))))
+ {
+ if (!stat(Filename, statbuf))
+ {
+ if ((statbuf->st_mode & S_IFMT) == S_IFREG)
+ Retval = TRUE;
+ }
+ free(statbuf);
+ }
+
+ return Retval;
+}
+#else
+int IsRegFile(const char *Filename) { printf("WTF\n");return TRUE; }
+#endif
diff --git a/support/chktex/OpSys.h b/support/chktex/OpSys.h
index 7ce3f1b527..d1b3f37689 100644
--- a/support/chktex/OpSys.h
+++ b/support/chktex/OpSys.h
@@ -59,7 +59,7 @@
* You may wish to modify the SetupVars() (OpSys.c) to better suit your
* preferences. In any case, it should put the filename (and full path)
* of the `.chktexrc' file into the ConfigFile array. The array is sized
- * BUFSIZ bytes.
+ * BUFFER_SIZE bytes.
*
* The program does also assume that __unix__ is defined if the source is
* compiled on a UNIX machine.
@@ -83,6 +83,9 @@
# define EXIT_SUCCESS 0
#endif
+#define EXIT_WARNINGS 2
+#define EXIT_ERRORS 3
+
/* -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- */
/*
@@ -182,6 +185,26 @@
# define BAKAPPENDIX ".bak"
#endif
+
+/* -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- */
+
+/*
+ * This defines the buffer size used in many places. The biggest
+ * limitation imposed by a small buffer is the size of a line which
+ * can be accurately processed by chktex. On the other hand, a large
+ * buffer size will waste memory. However, memory is quite cheap
+ * these days, especially considering the amount needed by ChkTeX.
+ *
+ * ChkTeX used to use BUFSIZ which was 1024 (fairly reasonable) on
+ * many UNIX-like systems, but was much smaller on Windows. So,
+ * instead we create our own buffer size and hope that no-one has
+ * lines longer than 4k.
+ *
+ */
+
+#define BUFFER_SIZE 4096
+
+
/***************** END OF USER SETTABLE PREFERENCES *****************/
/********************************************************************/
@@ -189,14 +212,14 @@
struct WordList;
#endif
/* Sorry; there are now cyclic dependencies in the
-* source tree. :-/
+* source tree. :-/
*/
extern const char *ReverseOn;
extern const char *ReverseOff;
-extern char ConfigFile[BUFSIZ];
+extern char ConfigFile[BUFFER_SIZE];
+extern struct WordList ConfigFiles;
-char *MatchFileName(char *String);
int SetupVars(void);
void SetupTerm(void);
void AddAppendix(char *Name, const char *App);
@@ -204,4 +227,7 @@ void tackon(char *, const char *);
int LocateFile(const char *Filename, char *Dest, const char *App,
struct WordList *wl);
+void AddDirectoryFromRelativeFile(const char * Filename, struct WordList *TeXInputs);
+int IsRegFile(const char *Filename);
+
#endif /* OPSYS_H */
diff --git a/support/chktex/Resource.c b/support/chktex/Resource.c
index f301c6aff2..40a37df54c 100644
--- a/support/chktex/Resource.c
+++ b/support/chktex/Resource.c
@@ -90,7 +90,8 @@ TOKENBITS(Token);
static enum Token Expect;
static unsigned long RsrcLine;
-static enum Token ReadWord(char *, FILE *);
+static enum Token ReadWord(char *, FILE *,
+ char *(fgetsfun)(char *, int, FILE *));
static char MapChars(char **String);
@@ -108,11 +109,11 @@ static char MapChars(char **String);
* Returns whether the attempt was a successful one.
*/
-int ReadRC(const char *Filename)
+int ProcessRC(FILE *fh, const char *Filename,
+ char *(fgetsfun)(char *, int, FILE *))
{
const char *String = NULL;
- int Success = FALSE;
- FILE *fh;
+ int Success = TRUE;
enum Token Token;
unsigned long Counter;
@@ -130,130 +131,138 @@ int ReadRC(const char *Filename)
RsrcLine = 0;
Expect = FLG_Word | FLG_Eof;
-
- if ((fh = fopen(Filename, "r")))
+ do
{
- Success = TRUE;
- do
+ Token = ReadWord(ReadBuffer, fh, fgetsfun);
+ if (!(Expect & Token))
{
- Token = ReadWord(ReadBuffer, fh);
- if (!(Expect & Token))
+ switch (Token)
{
- switch (Token)
+ case FLG_Item:
+ String = "item";
+ break;
+ case FLG_Word:
+ String = "word";
+ break;
+ case FLG_Equal:
+ String = "`='";
+ break;
+ case FLG_Open:
+ String = "`{'";
+ break;
+ case FLG_Close:
+ String = "`}'";
+ break;
+ case FLG_BrOpen:
+ String = "`['";
+ break;
+ case FLG_BrClose:
+ String = "`]'";
+ break;
+ case FLG_Eof:
+ String = "EOF";
+ break;
+ }
+ PrintPrgErr(pmFaultFmt, Filename, RsrcLine, String);
+ Success = FALSE;
+ Token = FLG_Eof;
+ }
+
+ switch (Token)
+ {
+ case FLG_Word:
+ for (Counter = 0; Keys[Counter].Name; Counter++)
+ {
+ if (!strcasecmp(ReadBuffer, Keys[Counter].Name))
{
- case FLG_Item:
- String = "item";
- break;
- case FLG_Word:
- String = "word";
- break;
- case FLG_Equal:
- String = "`='";
- break;
- case FLG_Open:
- String = "`{'";
- break;
- case FLG_Close:
- String = "`}'";
- break;
- case FLG_BrOpen:
- String = "`['";
- break;
- case FLG_BrClose:
- String = "`]'";
- break;
- case FLG_Eof:
- String = "EOF";
+ CurWord = &Keys[Counter];
+ Expect = (CurWord->List ? FLG_Open : 0) |
+ (CurWord->CaseList ? FLG_BrOpen : 0) | FLG_Equal;
break;
}
- PrintPrgErr(pmFaultFmt, Filename, RsrcLine, String);
+ }
+ if (!Keys[Counter].Name)
+ {
+ PrintPrgErr(pmKeyWord, ReadBuffer, Filename);
Success = FALSE;
Token = FLG_Eof;
}
-
- switch (Token)
+ break;
+ case FLG_Item:
+ switch (What)
{
- case FLG_Word:
- for (Counter = 0; Keys[Counter].Name; Counter++)
+ case whEqual:
+ if (!(*(CurWord->String) = strdup(ReadBuffer)))
{
- if (!strcasecmp(ReadBuffer, Keys[Counter].Name))
- {
- CurWord = &Keys[Counter];
- Expect = (CurWord->List ? FLG_Open : 0) |
- (CurWord->CaseList ? FLG_BrOpen : 0) | FLG_Equal;
- break;
- }
+ PrintPrgErr(pmStrDupErr);
+ Token = FLG_Eof;
+ Success = FALSE;
}
- if (!Keys[Counter].Name)
+
+ What = whNone;
+ Expect = FLG_Word | FLG_Eof;
+ break;
+ case whCaseList:
+ if (!InsertWord(ReadBuffer, CurWord->CaseList))
{
- PrintPrgErr(pmKeyWord, ReadBuffer, Filename);
- Success = FALSE;
Token = FLG_Eof;
+ Success = FALSE;
}
break;
- case FLG_Item:
- switch (What)
+ case whList:
+ if (!InsertWord(ReadBuffer, CurWord->List))
{
- case whEqual:
- if (!(*(CurWord->String) = strdup(ReadBuffer)))
- {
- PrintPrgErr(pmStrDupErr);
- Token = FLG_Eof;
- Success = FALSE;
- }
-
- What = whNone;
- Expect = FLG_Word | FLG_Eof;
- break;
- case whCaseList:
- if (!InsertWord(ReadBuffer, CurWord->CaseList))
- {
- Token = FLG_Eof;
- Success = FALSE;
- }
- break;
- case whList:
- if (!InsertWord(ReadBuffer, CurWord->List))
- {
- Token = FLG_Eof;
- Success = FALSE;
- }
- break;
- case whNone:
- PrintPrgErr(pmAssert);
+ Token = FLG_Eof;
+ Success = FALSE;
}
break;
- case FLG_Equal:
- What = whEqual;
- Expect = (CurWord->List ? FLG_Open : 0) |
- (CurWord->CaseList ? FLG_BrOpen : 0) |
- (CurWord->String ? FLG_Item : 0);
- break;
- case FLG_BrOpen:
- if (What == whEqual)
- ClearWord(CurWord->CaseList);
- What = whCaseList;
- Expect = FLG_Item | FLG_BrClose;
- break;
- case FLG_Open:
- if (What == whEqual)
- ClearWord(CurWord->List);
- What = whList;
- Expect = FLG_Item | FLG_Close;
- break;
- case FLG_BrClose:
- case FLG_Close:
- Expect = (CurWord->List ? FLG_Open : 0) |
- (CurWord->CaseList ? FLG_BrOpen : 0) |
- FLG_Equal | FLG_Word | FLG_Eof;
- What = whNone;
- break;
- case FLG_Eof:
- break;
+ case whNone:
+ PrintPrgErr(pmAssert);
}
+ break;
+ case FLG_Equal:
+ What = whEqual;
+ Expect = (CurWord->List ? FLG_Open : 0) |
+ (CurWord->CaseList ? FLG_BrOpen : 0) |
+ (CurWord->String ? FLG_Item : 0);
+ break;
+ case FLG_BrOpen:
+ if (What == whEqual)
+ ClearWord(CurWord->CaseList);
+ What = whCaseList;
+ Expect = FLG_Item | FLG_BrClose;
+ break;
+ case FLG_Open:
+ if (What == whEqual)
+ ClearWord(CurWord->List);
+ What = whList;
+ Expect = FLG_Item | FLG_Close;
+ break;
+ case FLG_BrClose:
+ case FLG_Close:
+ Expect = (CurWord->List ? FLG_Open : 0) |
+ (CurWord->CaseList ? FLG_BrOpen : 0) | FLG_Equal | FLG_Word |
+ FLG_Eof;
+ What = whNone;
+ break;
+ case FLG_Eof:
+ break;
}
- while (Token != FLG_Eof);
+ } while (Token != FLG_Eof);
+ return (Success);
+}
+/*
+ * Opens a file and passes to ProcessRC().
+ */
+int ReadRC(const char *Filename)
+{
+ int Success = FALSE;
+ FILE *fh;
+
+ if ((fh = fopen(Filename, "r")))
+ {
+ Success = ProcessRC(fh, Filename, &fgets);
fclose(fh);
}
else
@@ -262,16 +271,52 @@ int ReadRC(const char *Filename)
return (Success);
}
+const char *FGETS_TMP = NULL;
+char *fgets_from_string(char *out, int size, FILE *fh)
+{
+ char *res;
+ if (FGETS_TMP == NULL)
+ return NULL;
+ res = strncpy(out, FGETS_TMP, size - 1);
+
+ if (size - 1 < strlen(FGETS_TMP))
+ {
+ /* It wasn't all read, so null terminate it, and get ready for
+ * next time. */
+ res[size] = '\0';
+ FGETS_TMP = FGETS_TMP + (size - 1);
+ }
+ else
+ {
+ /* We're done, so signal that */
+ FGETS_TMP = NULL;
+ }
+ return res;
+}
+
+/*
+ * Opens a file and passes to ProcessRC().
+ */
+int ReadRCFromCmdLine(const char *CmdLineArg)
+{
+ if (!CmdLineArg)
+ return FALSE;
+
+ FGETS_TMP = CmdLineArg;
+ return ProcessRC(NULL, "CommandLineArg", &fgets_from_string);
+}
+
/*
* Reads a token from the `.chktexrc' file; if the token is
* FLG_Item or FLG_Word, Buffer will contain the plaintext of the
* token. If not, the contents are undefined.
*/
-static enum Token ReadWord(char *Buffer, FILE * fh)
+static enum Token ReadWord(char *Buffer, FILE *fh,
+ char *(fgetsfun)(char *, int, FILE *))
{
static char *String = NULL;
- static char StatBuf[BUFSIZ];
+ static char StatBuf[BUFFER_SIZE];
enum Token Retval = FLG_Eof;
unsigned short Chr;
@@ -285,7 +330,7 @@ static enum Token ReadWord(char *Buffer, FILE * fh)
{
if (!(String && *String))
{
- if (fgets(StatBuf, BUFSIZ - 1, fh))
+ if ((fgetsfun)(StatBuf, BUFFER_SIZE - 1, fh))
String = strip(StatBuf, STRP_RGT);
RsrcLine++;
}
diff --git a/support/chktex/Resource.h b/support/chktex/Resource.h
index c0ebed0bd1..e2736a05d4 100644
--- a/support/chktex/Resource.h
+++ b/support/chktex/Resource.h
@@ -48,8 +48,9 @@
LIST(CenterDots) LIST(LowDots) LIST(OutFormat)\
LIST(Primitives) LIST(NotPreSpaced) LIST(NonItalic) LIST(NoCharNext)\
LNEMPTY(CmdLine) LNEMPTY(TeXInputs)\
- LCASE(Abbrev) LCASE(UserWarn) LIST(UserWarnRegex)\
- KEY(VerbClear, "|") KEY(QuoteStyle, "Traditional") KEY(TabSize, "8")
+ LCASE(Abbrev) LCASE(UserWarn) LIST(UserWarnRegex) LIST(TextEnvir)\
+ KEY(VerbClear, "|") KEY(QuoteStyle, "Traditional") KEY(TabSize, "8")\
+ KEY(CmdSpaceStyle, "Ignore")
#define LIST(a) extern struct WordList a;
#define LNEMPTY LIST
@@ -62,6 +63,7 @@ RESOURCE_INFO
#undef LNEMPTY
#undef LIST
int ReadRC(const char *);
+int ReadRCFromCmdLine(const char *CmdLineArg);
#endif /* RESOURCE */
diff --git a/support/chktex/Test.nore.out b/support/chktex/Test.nore.out
index 44e3571500..07393eabd9 100644
--- a/support/chktex/Test.nore.out
+++ b/support/chktex/Test.nore.out
@@ -19,12 +19,6 @@ So is this \foo
Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
\smallskip This is a not. $\foo Neither$ is this.
^^^^^^^^^^^^^^
-Message 1 in Test.tex: Command terminated with space.
-\stoptext
- ^
-Message 9 in Test.tex: `section' expected, found `text'.
-\stoptext
- ^^^^
Message 22 in Test.tex: Comment displayed.
% Warning 2
^
@@ -136,12 +130,18 @@ The Birch--Swinnerton--Dyer conjecture is not correct.
Message 8 in Test.tex: Wrong length of dash may have been used.
The Birch--Swinnerton--Dyer conjecture is not correct.
^^
+Message 8 in Test.tex: Wrong length of dash may have been used.
+The Birch-Swinnerton-Dyer conjecture is not correct (is now caught).
+ ^
Message 22 in Test.tex: Comment displayed.
% Warning 9-10
^
Message 22 in Test.tex: Comment displayed.
% Brackets:
^
+Message 37 in Test.tex: You should avoid spaces in front of parenthesis.
+)}{[])} }}}]]])))
+^
Message 10 in Test.tex: Solo `)' found.
)}{[])} }}}]]])))
^
@@ -194,6 +194,27 @@ Message 10 in Test.tex: Solo `asoi' found.
\begin{quux} \begin{baz} \end{quux} \end{baz} \end{asoi} \begin{dobedo}
^^^^
Message 22 in Test.tex: Comment displayed.
+% Warning 47 -- ConTeXt environment mismatch -- split from 9
+^
+Message 1 in Test.tex: Command terminated with space.
+\stoptext
+ ^
+Message 47 in Test.tex: `section' expected, found `text' (ConTeXt).
+\stoptext
+ ^^^^
+Message 1 in Test.tex: Command terminated with space.
+\starttext
+ ^
+Message 22 in Test.tex: Comment displayed.
+% (Un)fortunately, this is not an error
+^
+Message 1 in Test.tex: Command terminated with space.
+\startbar
+ ^
+Message 1 in Test.tex: Command terminated with space.
+\stopbar
+ ^
+Message 22 in Test.tex: Comment displayed.
% Warning 11
^
Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
@@ -260,12 +281,39 @@ Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
1st. Foo Inc. Ab.cd. foo ab.cd. Foo. bar baz., billy.; bob.: joe.! frank.? james.. george
^
Message 22 in Test.tex: Comment displayed.
+% Bug 54751
+^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)
+ ^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)
+ ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default
+^
+Message 22 in Test.tex: Comment displayed.
% Warning 13
^
Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
Look at THIS! It's an error.
^
Message 22 in Test.tex: Comment displayed.
+% after frenchspacing it's not an error
+^
+Message 22 in Test.tex: Comment displayed.
+% warning again
+^
+Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
+Look at THIS! It's an error.
+ ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default
+^
+Message 21 in Test.tex: This command might not be intended.
+Look at \THIS\@! It's not an error. D. E. Knuth.
+ ^^
+Message 22 in Test.tex: Comment displayed.
% Warning 14
^
Message 1 in Test.tex: Command terminated with space.
@@ -358,6 +406,12 @@ Message 1 in input.tex: Command terminated with space.
Message 11 in input.tex: You should use \ldots to achieve an ellipsis.
\this is a test of whether the file is actually inputted...
^^^
+Message 22 in input/file: Comment displayed.
+% -*- TeX -*-
+^
+Message 22 in input/file: Comment displayed.
+% chktex-file 22
+^
Message 22 in Test.tex: Comment displayed.
% Warning 29
^
@@ -367,6 +421,12 @@ The program opens a screen sized 640x200 pixels
Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
The program opens a screen sized $640\times200$ pixels
^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.
+ ^^^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.
+ ^^^
Message 22 in Test.tex: Comment displayed.
% Warning 30
^
@@ -451,6 +511,9 @@ Message 22 in Test.tex: Comment displayed.
Message 38 in Test.tex: You should not use punctuation in front of quotes.
``An example,'' he said, ``would be great.''
^
+Message 38 in Test.tex: You should not use punctuation in front of quotes.
+``An example,'' he said, ``would be great.''
+ ^
Message 22 in Test.tex: Comment displayed.
% Warning 39
^
@@ -536,6 +599,12 @@ Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
For every $p\nmid n$ you have a cute prime which doesn't divide $n$.
^^^
Message 22 in Test.tex: Comment displayed.
+% Warning about optional arguments inside optional arguments
+^
+Message 22 in Test.tex: Comment displayed.
+% Shouldn't warn
+^
+Message 22 in Test.tex: Comment displayed.
% Math mode check
^
Message 35 in Test.tex: You should perhaps use `\sin' instead.
@@ -557,6 +626,18 @@ Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
Also, $x(3)\text{ is not x(3) but it is $x(3)$}$
^^^^^^
Message 22 in Test.tex: Comment displayed.
+% breqn mode check
+^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+sin x
+^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+is not the same as sin x, but is the same as $sin x$
+ ^^^^^^^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+is not the same as sin x, but is the same as $sin x$
+ ^^^
+Message 22 in Test.tex: Comment displayed.
This is\\% a comment. Nothing here should be checked(right)?
^
Message 36 in Test.tex: You should put a space in front of parenthesis.
@@ -596,6 +677,18 @@ Message 31 in Test.tex: This text may be ignored.
\end{verbatim} FOO
^^^
Message 22 in Test.tex: Comment displayed.
+% WipeArg
+^
+Message 22 in Test.tex: Comment displayed.
+% Bug 60197 -- "double math mode" should be handled okay
+^
+Message 22 in Test.tex: Comment displayed.
+% Warning 49
+^
+Message 49 in Test.tex: Expected math mode to be on here.
+\]
+^
+Message 22 in Test.tex: Comment displayed.
% Warning 16,15
^
Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
@@ -613,6 +706,9 @@ Message 22 in Test.tex: Comment displayed.
Message 22 in Test.tex: Comment displayed.
% There should be no newline at the end of this file to test bug #46539
^
+Message 48 in Test.tex: No match found for `text' (ConTeXt).
+\starttext
+ ^^^^
Message 16 in Test.tex: Mathmode still on at end of LaTeX file.
diff --git a/support/chktex/Test.pcre.out b/support/chktex/Test.pcre.out
index c2e8eefac2..2f47f60de1 100644
--- a/support/chktex/Test.pcre.out
+++ b/support/chktex/Test.pcre.out
@@ -19,9 +19,6 @@ So is this \foo
Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
\smallskip This is a not. $\foo Neither$ is this.
^^^^^^^^^^^^^^
-Message 9 in Test.tex: `section' expected, found `text'.
-\stoptext
- ^^^^
Message 22 in Test.tex: Comment displayed.
% Warning 2
^
@@ -133,12 +130,18 @@ The Birch--Swinnerton--Dyer conjecture is not correct.
Message 8 in Test.tex: Wrong length of dash may have been used.
The Birch--Swinnerton--Dyer conjecture is not correct.
^^
+Message 8 in Test.tex: Wrong length of dash may have been used.
+The Birch-Swinnerton-Dyer conjecture is not correct (is now caught).
+ ^
Message 22 in Test.tex: Comment displayed.
% Warning 9-10
^
Message 22 in Test.tex: Comment displayed.
% Brackets:
^
+Message 37 in Test.tex: You should avoid spaces in front of parenthesis.
+)}{[])} }}}]]])))
+^
Message 10 in Test.tex: Solo `)' found.
)}{[])} }}}]]])))
^
@@ -178,6 +181,9 @@ Message 10 in Test.tex: Solo `)' found.
Message 10 in Test.tex: Solo `)' found.
)}{[])} }}}]]])))
^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+{[]} ((([[[{{{}}}]]])))
+ ^^^
Message 22 in Test.tex: Comment displayed.
% Envs:
^
@@ -191,6 +197,15 @@ Message 10 in Test.tex: Solo `asoi' found.
\begin{quux} \begin{baz} \end{quux} \end{baz} \end{asoi} \begin{dobedo}
^^^^
Message 22 in Test.tex: Comment displayed.
+% Warning 47 -- ConTeXt environment mismatch -- split from 9
+^
+Message 47 in Test.tex: `section' expected, found `text' (ConTeXt).
+\stoptext
+ ^^^^
+Message 22 in Test.tex: Comment displayed.
+% (Un)fortunately, this is not an error
+^
+Message 22 in Test.tex: Comment displayed.
% Warning 11
^
Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
@@ -257,12 +272,39 @@ Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
1st. Foo Inc. Ab.cd. foo ab.cd. Foo. bar baz., billy.; bob.: joe.! frank.? james.. george
^
Message 22 in Test.tex: Comment displayed.
+% Bug 54751
+^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)
+ ^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)
+ ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default
+^
+Message 22 in Test.tex: Comment displayed.
% Warning 13
^
Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
Look at THIS! It's an error.
^
Message 22 in Test.tex: Comment displayed.
+% after frenchspacing it's not an error
+^
+Message 22 in Test.tex: Comment displayed.
+% warning again
+^
+Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
+Look at THIS! It's an error.
+ ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default
+^
+Message 21 in Test.tex: This command might not be intended.
+Look at \THIS\@! It's not an error. D. E. Knuth.
+ ^^
+Message 22 in Test.tex: Comment displayed.
% Warning 14
^
Message 1 in Test.tex: Command terminated with space.
@@ -355,6 +397,12 @@ Message 1 in input.tex: Command terminated with space.
Message 11 in input.tex: You should use \ldots to achieve an ellipsis.
\this is a test of whether the file is actually inputted...
^^^
+Message 22 in input/file: Comment displayed.
+% -*- TeX -*-
+^
+Message 22 in input/file: Comment displayed.
+% chktex-file 22
+^
Message 22 in Test.tex: Comment displayed.
% Warning 29
^
@@ -364,6 +412,12 @@ The program opens a screen sized 640x200 pixels
Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
The program opens a screen sized $640\times200$ pixels
^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.
+ ^^^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.
+ ^^^
Message 22 in Test.tex: Comment displayed.
% Warning 30
^
@@ -448,6 +502,9 @@ Message 22 in Test.tex: Comment displayed.
Message 38 in Test.tex: You should not use punctuation in front of quotes.
``An example,'' he said, ``would be great.''
^
+Message 38 in Test.tex: You should not use punctuation in front of quotes.
+``An example,'' he said, ``would be great.''
+ ^
Message 22 in Test.tex: Comment displayed.
% Warning 39
^
@@ -536,6 +593,27 @@ Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
For every $p\nmid n$ you have a cute prime which doesn't divide $n$.
^^^
Message 22 in Test.tex: Comment displayed.
+% Warning about optional arguments inside optional arguments
+^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+\begin{something}[\cite2[1231]{adadsd}]\end{something}
+ ^^^^^^^^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+[dasd{dasda[ ads[ dasd ]]}]
+ ^^^^^^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+adssd[ {}[]]
+ ^^^^^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+\begin{something}[\cite{adadsd}[1231]]\end{something}
+ ^^^^^^^^^^^^^^^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+\begin{something}[ ][\cite{adadsd}[1231]]\end{something}
+ ^^^^^^^^^^^^^^^
+Message 22 in Test.tex: Comment displayed.
+% Shouldn't warn
+^
+Message 22 in Test.tex: Comment displayed.
% Math mode check
^
Message 35 in Test.tex: You should perhaps use `\sin' instead.
@@ -557,6 +635,18 @@ Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
Also, $x(3)\text{ is not x(3) but it is $x(3)$}$
^^^^^^
Message 22 in Test.tex: Comment displayed.
+% breqn mode check
+^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+sin x
+^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+is not the same as sin x, but is the same as $sin x$
+ ^^^^^^^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+is not the same as sin x, but is the same as $sin x$
+ ^^^
+Message 22 in Test.tex: Comment displayed.
This is\\% a comment. Nothing here should be checked(right)?
^
Message 36 in Test.tex: You should put a space in front of parenthesis.
@@ -605,6 +695,18 @@ Message 31 in Test.tex: This text may be ignored.
\end{verbatim} FOO
^^^
Message 22 in Test.tex: Comment displayed.
+% WipeArg
+^
+Message 22 in Test.tex: Comment displayed.
+% Bug 60197 -- "double math mode" should be handled okay
+^
+Message 22 in Test.tex: Comment displayed.
+% Warning 49
+^
+Message 49 in Test.tex: Expected math mode to be on here.
+\]
+^
+Message 22 in Test.tex: Comment displayed.
% Warning 16,15
^
Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
@@ -622,6 +724,9 @@ Message 22 in Test.tex: Comment displayed.
Message 22 in Test.tex: Comment displayed.
% There should be no newline at the end of this file to test bug #46539
^
+Message 48 in Test.tex: No match found for `text' (ConTeXt).
+\starttext
+ ^^^^
Message 16 in Test.tex: Mathmode still on at end of LaTeX file.
diff --git a/support/chktex/Test.posix-ere.out b/support/chktex/Test.posix-ere.out
index c89ce36936..f22f757d72 100644
--- a/support/chktex/Test.posix-ere.out
+++ b/support/chktex/Test.posix-ere.out
@@ -19,9 +19,6 @@ So is this \foo
Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
\smallskip This is a not. $\foo Neither$ is this.
^^^^^^^^^^^^^^
-Message 9 in Test.tex: `section' expected, found `text'.
-\stoptext
- ^^^^
Message 22 in Test.tex: Comment displayed.
% Warning 2
^
@@ -133,12 +130,18 @@ The Birch--Swinnerton--Dyer conjecture is not correct.
Message 8 in Test.tex: Wrong length of dash may have been used.
The Birch--Swinnerton--Dyer conjecture is not correct.
^^
+Message 8 in Test.tex: Wrong length of dash may have been used.
+The Birch-Swinnerton-Dyer conjecture is not correct (is now caught).
+ ^
Message 22 in Test.tex: Comment displayed.
% Warning 9-10
^
Message 22 in Test.tex: Comment displayed.
% Brackets:
^
+Message 37 in Test.tex: You should avoid spaces in front of parenthesis.
+)}{[])} }}}]]])))
+^
Message 10 in Test.tex: Solo `)' found.
)}{[])} }}}]]])))
^
@@ -191,6 +194,15 @@ Message 10 in Test.tex: Solo `asoi' found.
\begin{quux} \begin{baz} \end{quux} \end{baz} \end{asoi} \begin{dobedo}
^^^^
Message 22 in Test.tex: Comment displayed.
+% Warning 47 -- ConTeXt environment mismatch -- split from 9
+^
+Message 47 in Test.tex: `section' expected, found `text' (ConTeXt).
+\stoptext
+ ^^^^
+Message 22 in Test.tex: Comment displayed.
+% (Un)fortunately, this is not an error
+^
+Message 22 in Test.tex: Comment displayed.
% Warning 11
^
Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
@@ -257,12 +269,39 @@ Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
1st. Foo Inc. Ab.cd. foo ab.cd. Foo. bar baz., billy.; bob.: joe.! frank.? james.. george
^
Message 22 in Test.tex: Comment displayed.
+% Bug 54751
+^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)
+ ^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)
+ ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default
+^
+Message 22 in Test.tex: Comment displayed.
% Warning 13
^
Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
Look at THIS! It's an error.
^
Message 22 in Test.tex: Comment displayed.
+% after frenchspacing it's not an error
+^
+Message 22 in Test.tex: Comment displayed.
+% warning again
+^
+Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
+Look at THIS! It's an error.
+ ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default
+^
+Message 21 in Test.tex: This command might not be intended.
+Look at \THIS\@! It's not an error. D. E. Knuth.
+ ^^
+Message 22 in Test.tex: Comment displayed.
% Warning 14
^
Message 1 in Test.tex: Command terminated with space.
@@ -355,6 +394,12 @@ Message 1 in input.tex: Command terminated with space.
Message 11 in input.tex: You should use \ldots to achieve an ellipsis.
\this is a test of whether the file is actually inputted...
^^^
+Message 22 in input/file: Comment displayed.
+% -*- TeX -*-
+^
+Message 22 in input/file: Comment displayed.
+% chktex-file 22
+^
Message 22 in Test.tex: Comment displayed.
% Warning 29
^
@@ -364,6 +409,12 @@ The program opens a screen sized 640x200 pixels
Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
The program opens a screen sized $640\times200$ pixels
^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.
+ ^^^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.
+ ^^^
Message 22 in Test.tex: Comment displayed.
% Warning 30
^
@@ -448,6 +499,9 @@ Message 22 in Test.tex: Comment displayed.
Message 38 in Test.tex: You should not use punctuation in front of quotes.
``An example,'' he said, ``would be great.''
^
+Message 38 in Test.tex: You should not use punctuation in front of quotes.
+``An example,'' he said, ``would be great.''
+ ^
Message 22 in Test.tex: Comment displayed.
% Warning 39
^
@@ -536,6 +590,12 @@ Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
For every $p\nmid n$ you have a cute prime which doesn't divide $n$.
^^^
Message 22 in Test.tex: Comment displayed.
+% Warning about optional arguments inside optional arguments
+^
+Message 22 in Test.tex: Comment displayed.
+% Shouldn't warn
+^
+Message 22 in Test.tex: Comment displayed.
% Math mode check
^
Message 35 in Test.tex: You should perhaps use `\sin' instead.
@@ -557,6 +617,18 @@ Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
Also, $x(3)\text{ is not x(3) but it is $x(3)$}$
^^^^^^
Message 22 in Test.tex: Comment displayed.
+% breqn mode check
+^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+sin x
+^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+is not the same as sin x, but is the same as $sin x$
+ ^^^^^^^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+is not the same as sin x, but is the same as $sin x$
+ ^^^
+Message 22 in Test.tex: Comment displayed.
This is\\% a comment. Nothing here should be checked(right)?
^
Message 36 in Test.tex: You should put a space in front of parenthesis.
@@ -605,6 +677,18 @@ Message 31 in Test.tex: This text may be ignored.
\end{verbatim} FOO
^^^
Message 22 in Test.tex: Comment displayed.
+% WipeArg
+^
+Message 22 in Test.tex: Comment displayed.
+% Bug 60197 -- "double math mode" should be handled okay
+^
+Message 22 in Test.tex: Comment displayed.
+% Warning 49
+^
+Message 49 in Test.tex: Expected math mode to be on here.
+\]
+^
+Message 22 in Test.tex: Comment displayed.
% Warning 16,15
^
Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
@@ -622,6 +706,9 @@ Message 22 in Test.tex: Comment displayed.
Message 22 in Test.tex: Comment displayed.
% There should be no newline at the end of this file to test bug #46539
^
+Message 48 in Test.tex: No match found for `text' (ConTeXt).
+\starttext
+ ^^^^
Message 16 in Test.tex: Mathmode still on at end of LaTeX file.
diff --git a/support/chktex/Test.tex b/support/chktex/Test.tex
index 9a7fc05fa0..1285447355 100644
--- a/support/chktex/Test.tex
+++ b/support/chktex/Test.tex
@@ -13,10 +13,6 @@ are nonsense in a TeXnical manner.
So is this \foo
\smallskip This is a not. $\foo Neither$ is this.
-\startsection[title={Testing ConTeXt}]
-These should now be an error.
-\stoptext
-
% Warning 2
This is a faulty reference to \ref{foo}
@@ -55,7 +51,7 @@ in plain TeX---are the key
% Using DashExcpt
The Birch--Swinnerton-Dyer conjecture is correct.
The Birch--Swinnerton--Dyer conjecture is not correct.
-The Birch-Swinnerton-Dyer conjecture is not correct (but not caught).
+The Birch-Swinnerton-Dyer conjecture is not correct (is now caught).
% Warning 9-10
@@ -70,6 +66,18 @@ The Birch-Swinnerton-Dyer conjecture is not correct (but not caught).
\begin{foo} \begin{bar} \end{bar}\end{foo}
+% Warning 47 -- ConTeXt environment mismatch -- split from 9
+\startsection[title={Testing ConTeXt}]
+These should now be an error.
+\stoptext
+\starttext
+
+% (Un)fortunately, this is not an error
+\begin{foo}
+\startbar
+\end{foo}
+\stopbar
+
% Warning 11
Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.
@@ -80,11 +88,31 @@ Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.
1st. Foo Inc. Ab.cd. foo ab.cd. Foo. bar baz., billy.; bob.: joe.! frank.? james.. george
1st.\ foo Inc.\ ab.cd.\ foo ab.cd.\ Foo.\ bar baz., billy.; bob.:\ joe.!\ frank.?\ james..\ george
+% Bug 54751
+
+Mr. ``X'' and Mrs. \(Y\)
+
+% ignore commands by default
+\Mr. ``X'' and \Mrs. \(Y\)
+
% Warning 13
Look at THIS! It's an error.
Look at THIS\@! It's an error. D. E. Knuth.
+% after frenchspacing it's not an error
+\frenchspacing
+Look at THIS! It's not an error.
+Look at THIS\@! It's not an error. D. E. Knuth.
+
+% warning again
+\nonfrenchspacing
+Look at THIS! It's an error.
+Look at THIS\@! It's not an error. D. E. Knuth.
+
+% ignore commands by default
+Look at \THIS\@! It's not an error. D. E. Knuth.
+
% Warning 14
\hat
@@ -133,10 +161,12 @@ Do you understand?
\input input.tex
\input input
+\input input/file
% Warning 29
The program opens a screen sized 640x200 pixels
The program opens a screen sized $640\times200$ pixels
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.
% Warning 30
@@ -197,10 +227,34 @@ You should always write a good introduction.
For every $p\not|n$ you have an ugly prime which doesn't divide $n$.
For every $p\nmid n$ you have a cute prime which doesn't divide $n$.
+% Warning about optional arguments inside optional arguments
+\begin{something}[\cite2[1231]{adadsd}]\end{something}
+[dasd{dasda[ ads[ dasd ]]}]
+adssd[ {}[]]
+\begin{something}[\cite{adadsd}[1231]]\end{something}
+\begin{something}[ ][\cite{adadsd}[1231]]\end{something}
+
+% Shouldn't warn
+\begin{something}[{\cite{adadsd}[1231]}]\end{something}
+\begin{something}[{\cite{{adadsd}}[1231]}]\end{something}
+\begin{something}[{\cite{adadsd}[1231]}]\end{something}
+\begin{something}[ ]{\cite{adadsd}[1231]}\end{something}
+\begin{something}[ ][{\cite{adadsd}[1231]}]\end{something}
+\begin{something}[{} ]{\cite{adadsd}[1231]}\end{something}
+
+
% Math mode check
\ensuremath{sin x\text{is not the same as sin x, but is the same as $sin x$}}
Also, $x(3)\text{ is not x(3) but it is $x(3)$}$
+% breqn mode check
+\begin{darray*}
+sin x
+\begin{dsuspend}
+is not the same as sin x, but is the same as $sin x$
+\end{dsuspend}
+\end{darray*}
+
This is\\% a comment. Nothing here should be checked(right)?
a broken line.
But this is not a \% comment, so we should find this error(right)?
@@ -227,6 +281,23 @@ In section~\ref{sec:4} it is suppressed. % chktex -1
\this is
\end{verbatim} FOO
+% WipeArg
+\autocite[34-35]{text--1---1}
+
+% Bug 60197 -- "double math mode" should be handled okay
+\begin{align}
+ \begin{array} {l}
+ abc
+ \end{array} \\
+ 3 - 2 = 1
+ \pi
+\end{align}
+
+
+% Warning 49
+
+\]
+
% Warning 16,15
$$(
diff --git a/support/chktex/Utility.c b/support/chktex/Utility.c
index 6f05e98f61..390d83d28f 100644
--- a/support/chktex/Utility.c
+++ b/support/chktex/Utility.c
@@ -87,8 +87,7 @@ int fexists(const char *Filename)
#else
FILE *fh;
-
- if (fh = fopen(Filename, "r"))
+ if ((fh = fopen(Filename, "r")))
{
Retval = TRUE;
fclose(fh);
@@ -97,6 +96,12 @@ int fexists(const char *Filename)
Retval = FALSE;
#endif
+ /* Ensure that it's not a directory */
+ if (Retval && !IsRegFile(Filename))
+ {
+ Retval = FALSE;
+ }
+
return (Retval);
}
@@ -115,7 +120,7 @@ void *sfmemset(void *to, int c, long n)
{
if (to && (n > 0))
{
- n = min(n, BUFSIZ);
+ n = min(n, BUFFER_SIZE);
return (memset(to, c, (size_t) n));
}
@@ -325,7 +330,7 @@ void strwrite(char *To, const char *From, unsigned long Len)
unsigned long i, j;
unsigned long FromLen = strlen(From);
- Len = min(Len, BUFSIZ);
+ Len = min(Len, BUFFER_SIZE);
if (To && From)
{
@@ -681,7 +686,7 @@ void *StkTop(struct Stack *Stack)
int PushFileName(const char *Name, struct Stack *stack)
{
FILE *fh = NULL;
- static char NameBuf[BUFSIZ];
+ static char NameBuf[BUFFER_SIZE];
if (Name && stack)
{
@@ -701,6 +706,7 @@ int PushFileName(const char *Name, struct Stack *stack)
int PushFile(const char *Name, FILE * fh, struct Stack *stack)
{
struct FileNode *fn;
+ uint64_t *filesupp;
if (Name && fh && stack)
{
@@ -710,6 +716,21 @@ int PushFile(const char *Name, FILE * fh, struct Stack *stack)
{
fn->fh = fh;
fn->Line = 0L;
+ if ((filesupp = malloc(sizeof(uint64_t))))
+ {
+ *filesupp = 0;
+ StkPush(filesupp, &FileSuppStack);
+ }
+ else
+ PrintPrgErr(pmNoStackMem);
+ if ((filesupp = malloc(sizeof(uint64_t))))
+ {
+ *filesupp = 0;
+ StkPush(filesupp, &UserFileSuppStack);
+ }
+ else
+ PrintPrgErr(pmNoStackMem);
+
if (StkPush(fn, stack))
return (TRUE);
free(fn->Name);
@@ -754,6 +775,9 @@ char *FGetsStk(char *Dest, unsigned long len, struct Stack *stack)
free(fn->Name);
free(fn);
HasSeenLong = 0;
+
+ StkPop(&FileSuppStack);
+ StkPop(&UserFileSuppStack);
}
while (!Retval && (fn = StkTop(stack)));
}
@@ -805,8 +829,27 @@ unsigned long CurStkLine(struct Stack *stack)
return (LastLine);
}
+long CurStkMode(struct Stack *stack)
+{
+ long * Mode;
+ if ((Mode = StkTop(stack)))
+ return *Mode;
+ /* printf("Empty stack\n"); */
+ return FALSE;
+}
+long *PushMode(long mode, struct Stack *stack)
+{
+ long *m;
+ if ((m = malloc(sizeof(long))))
+ {
+ *m = mode;
+ StkPush(m, stack);
+ return m;
+ }
+ return NULL;
+}
/************************** CHARACTER STACK ******************************/
/*
diff --git a/support/chktex/Utility.h b/support/chktex/Utility.h
index b1b31ec773..7dc7c9a317 100644
--- a/support/chktex/Utility.h
+++ b/support/chktex/Utility.h
@@ -89,12 +89,6 @@ struct FileNode
unsigned long Line;
};
-/* Rotates x n bits left (should be an int, long, etc.) */
-#define ROTATEL(x,n) ((x<<n) | (x>>((CHAR_BIT*sizeof(x)) - n)))
-
-/* Rotates x n bits right (should be an int, long, etc.) */
-#define ROTATER(x,n) ((x>>n) | (x<<((CHAR_BIT*sizeof(x)) - n)))
-
/* Subtract 1 because sizeof includes the null terminator.
* WARNING: To use this on a variable, the type should be char[]
* rather than char*, since for some versions of gcc these give
@@ -132,6 +126,8 @@ void *StkTop(struct Stack *Stack);
FILE *CurStkFile(struct Stack *stack);
const char *CurStkName(struct Stack *stack);
unsigned long CurStkLine(struct Stack *stack);
+long CurStkMode(struct Stack *stack);
+long *PushMode(long mode, struct Stack *stack);
char *FGetsStk(char *Dest, unsigned long len, struct Stack *stack);
int PushFileName(const char *Name, struct Stack *stack);
int PushFile(const char *, FILE *, struct Stack *);
diff --git a/support/chktex/aclocal.m4 b/support/chktex/aclocal.m4
index 022e3ea7e7..b1f5d91eac 100644
--- a/support/chktex/aclocal.m4
+++ b/support/chktex/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -12,5 +12,7 @@
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_include([m4/ax_append_flag.m4])
m4_include([m4/ax_cflags_strict_prototypes.m4])
+m4_include([m4/ax_require_defined.m4])
m4_include([m4/vl_prog_cc_warnings.m4])
diff --git a/support/chktex/chktexrc b/support/chktex/chktexrc
deleted file mode 100644
index c6355f8db1..0000000000
--- a/support/chktex/chktexrc
+++ /dev/null
@@ -1,802 +0,0 @@
-##
-## ChkTeX, example resource file for ChkTeX.
-## Copyright (C) 1995-96 Jens T. Berger Thielemann
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-##
-## Contact the author at:
-## Jens Berger
-## Spektrumvn. 4
-## N-0666 Oslo
-## Norway
-## E-mail: <jensthi@ifi.uio.no>
-##
-
-#####################################################################
-#
-# Note: The format has changed slightly (again). The { ... }
-# syntax does now mean case-sensitive comparing, while [ ... ] means
-# case-insensitive comparing of the keywords. Case-insensitive
-# comparing of the keywords is only supported on a few of the
-# keywords (it's not meaningful in all contexts, and it slows ChkTeX
-# down). Keywords supporting this are marked throughout the file.
-#
-# You may also reset a list by saying "KEYWORD = { ... }"; it will
-# then be set equal to the contents of the list you specify.
-#
-# Comments begin with `#', and continues for the rest of the line.
-# Blank lines plus leading and trailing spaces are of course ignored.
-#
-# The general format of this file is the following:
-#
-# KEYWORD { item item ...} [ item item ... ] /* Adds items */
-#
-# KEYWORD [ item item ...] { item item ... } /* Adds items */
-#
-# KEYWORD = item
-#
-# KEYWORD = { item item ... } /* Clears list before adding */
-#
-# KEYWORD = [ item item ... ] /* Clears list before adding */
-#
-# This does _not_ mean that you may alternate the forms; certain
-# keywords demands a list, other a single value. You thus have to
-# look at the examples of their use.
-#
-# Please also note that if you specify a list-keyword twice, we'll
-# concatenate the lists. If you specify a item-keyword twice, we'll
-# kill the previous value.
-#
-# We are slightly context-sensitive when detecting tokens like "}"
-# and "]"; they have to be preceded by a space. This generally makes
-# life easier.
-#
-# Items are separated by spaces. Newlines are considered as spaces,
-# but can't be escaped. You may surround items with quotes (`"') to
-# easily put spaces into them.
-#
-# Escape sequences available:
-#
-# Sequence Resulting character
-# ! A space (type `! ', not just a exclamation mark)
-# !" "
-# !# #
-# !! !
-# !{ {
-# !} }
-# ![ [
-# !] ]
-# != =
-# !b Backspace
-# !n New line
-# !r Carriage return
-# !t Tab
-# !f Form feed
-# !xNN NN must be a hexadecimal number (00 - ff),
-# _both_ characters must be included.
-# !dNNN DDD must be a decimal number (000 - 255), all
-# three characters must be included. Unspecified
-# results if DDD > 255.
-# !NNN DDD must be a octal number (000 - 377), all
-# three characters must be included. Unspecified
-# results if DDD > 377.
-#
-# Minor note: As you can see, most of these escape sequences are
-# equal to those in C (with some extensions); however, we use !
-# instead of \ as escape character for obvious reasons.
-#
-#
-# Quick summary of keywords follows. Keywords marked with a * accept
-# keywords accepting case-insensitive lists.
-#
-# Abbrev* - A list of abbreviations not automatically caught.
-# CenterDots - Commands/characters which should have \cdots in
-# between.
-# CmdLine - Default commandline options. These will be
-# processed before the ones you give on the command
-# line.
-# HyphDash \
-# NumDash - Number of dashes allowed in different contexts.
-# WordDash /
-# IJAccent - Commands which puts an accent _over_ their
-# argument.
-# Italic - Commands immediately turning on italic mode.
-# ItalCmd - Commands putting their argument into italic.
-# Linker - Commands which should have a non-breaking space in
-# front.
-# LowDots - Commands/characters which should have \ldots in
-# between.
-# MathEnvir - Environments which turn on math mode.
-# MathCmd - Commands which turn on math mode.
-# TextCmd - Commands which turn off math mode.
-# MathRoman - Mathematical operators with LaTeX replacement
-# defined.
-# NoCharNext - Insists on that certain commands aren't followed by
-# certain characters.
-# NonItalic - Commands immediately turning off italic mode.
-# NotPreSpaced- Commands which should not have a space in front of
-# them.
-# Primitives - Primitive TeX commands.
-# PostLink - Commands which generates a page reference.
-# OutFormat - Formats to use for output. See the -f & -v switch
-# in the main doc.
-# QuoteStyle - Either "Traditional" or "Logical". See main doc,
-# warning 38.
-# Silent - These commands do not produce any textual output;
-# and are thus allowed to have a space after them.
-# TabSize - Tab size you are using.
-# TeXInputs - Paths to search \input and \include files for.
-# UserWarn* - These strings will be searched for throughout the
-# text.
-# VerbEnvir - Environments which contents should be ignored.
-# VerbClear - String we will overwrite unwanted data with.
-# WipeArg - Commands (with arguments) which should be ignored
-# in the checking.
-#
-
-
-#####################################################################
-#
-# Enter which type of quote-style you are using here. Currently, we
-# support the following styles:
-#
-# Style Example of use
-# Traditional "An example," he said, "would be great."
-# Logical "An example", he said, "would be great".
-#
-
-QuoteStyle = Logical
-
-#####################################################################
-#
-# Enter here what interval you have between your tabs. Only regular
-# intervals are supported.
-#
-
-TabSize = 8
-
-#####################################################################
-#
-# Here, you can put default commandline options; most users would for
-# instance like to put -v2 here.
-#
-
-CmdLine
-{
-
-}
-
-#####################################################################
-#
-# These patterns will be searched for through the text; no matter
-# whether they appear as normal text, commands or whatever.
-# Currently case-sensitive. They are not found in comments.
-#
-# I usually define a special command like this:
-#
-# \def\unknown{\large\bf??}
-#
-# which I use whenever there is some information I don't have at the
-# moment of writing. Thus, it makes sense to search for it.
-#
-# You should be able to develop your own uses for this.
-#
-
-UserWarn
-{
-
- \unknown
-###
-#
-# Another example; one should write \chktex or Chk\TeX - never ChkTeX.
-#
-###
-
- ChkTeX
-}
-[
-
-###
-#
-# You may put case-insensitive patterns here.
-#
-###
-
-]
-
-
-###
-#
-# These patterns will be searched for, no matter whether they appear
-# as normal text, commands or arguments. However, they will _not_
-# match in verbatim environments.
-#
-# Remember that you have to escape (with a !) the following
-# characters: "#!= as well as spaces and {}[] if they are proceeded by
-# a space.
-#
-# Since these are PCRE regular expressions, you can use (?i) to make
-# the expression case insensitive. See the man pages (man pcresyntax)
-# or the nicely formatted http://perldoc.perl.org/perlre.html for
-# documentation on the regular expression syntax. Note however that
-# some the features of perl regular expression are not available such
-# as running code (callouts), and replacing.
-#
-# An initial PCRE comment (?# ... ) can be used change what is
-# displayed, thereby reminding yourself how to fix the problem.
-#
-###
-UserWarnRegex
-{
-
- (?!#Always! use! \nmid)\\not! *(\||\\mid)
-
- # capitalize section when saying Section 6.
- (?!#-1:Capitalize! before! references)PCRE:\b(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
- (?!#1:Capitalize! before! references)POSIX:([^[:alnum:]]|^)(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
-
- # spell it out.
- # PCRE:(?i)\bintro\b(?!#Spell! it! out.! This! comment! is! not! used.)
- # POSIX:([^[:alnum:]]|^)intro([^[:alnum:]]|$)
-
- # Pretty tables--see http://texdoc.net/texmf-dist/doc/latex/booktabs/booktabs.pdf
- (?!#-2:Use! \toprule,! midrule,! or! \bottomrule! from! booktabs)\\hline
- # This relies on it being on a single line, and not having anything
- # else on that line. With PCRE we could match balanced [] and {},
- # but I wonder if it's worth the complexity...
- (?!#-2:Vertical! rules! in! tables! are! ugly)\\begin\{(array|tabularx?\*?)\}(\[.*\])?\{.*\|.*\}
-
-}
-
-
-#####################################################################
-#
-# Here you can list the path of where ChkTeX should look for files it
-# \inputs. The // postfix is now supported; if you append a double
-# path-separator we'll recursively search that directory directories.
-# MS-DOS users must append \\ instead, e.g. "C:\EMTEX\\".
-#
-# If you under either MS-DOS or UNIX wish to search an entire
-# partition or the complete directory tree, you must use *three*
-# slashes, e.g. "c:\\\" or "///". This may be considered to be a bug.
-#
-# By default, we'll search the current directory (not recursively,
-# put "//" in the list for this); any paths specified below will be
-# searched in addition to this.
-#
-
-TeXInputs
-{
-
-}
-
-#####################################################################
-#
-# Here you may specify more output formats for use with the -v option,
-# it simply indexes into this list. Remember to use ! instead of \,
-# though.
-#
-# For explanation of how % fields expand; look at ChkTeX.{dvi,ps,pdf}.
-#
-# We will by default select entry number _two_ in this list (we count
-# from 0), and -v without any parameter selects entry number _three_.
-#
-
-OutFormat
-{
-
-# -v0; silent mode
-%f%b%l%b%c%b%n%b%m!n
-
-# -v1; normal mode
-"%k %n in %f line %l: %m!n%r%s%t!n%u!n"
-
-# -v2; fancy mode
-"%k %n in %f line %l: %m!n%r%i%s%I%t!n!n"
-
-# -v3; lacheck mode
-"!"%f!", line %l: %m!n"
-
-# -v4; verbose lacheck mode
-"!"%f!", line %l: %m!n%r%s%t!n%u!n"
-
-# -v5; no line number, ease auto-test
-"%k %n in %f: %m!n%r%s%t!n%u!n"
-
-# -v6; emacs compilation mode
-"!"%f!", line %l.%c:(#%n) %m!n"
-
-}
-
-
-
-#####################################################################
-#
-# These commands should be ignored when detecting whether a command
-# is ended by a space. You can specify regular expressions in the []
-# section in case you have many custom macros that can be safely
-# terminated with a space.
-#
-
-Silent
-{
- \rm \em \bf \it \sl \sf \sc \tt \selectfont
- \rmfamily \sffamily \ttfamily \mdseries \bfseries
- \slshape \scshape \relax
- \vskip \pagebreak \nopagebreak
-
- \textrm \textem \textbf \textit \textsl \textsf \textsc \texttt
-
- \clearpage \ddots \dotfill \flushbottom \fussy \indent \linebreak
- \onecolumn \pagebreak \pushtabs \poptabs \scriptsize \sloppy
- \twocolumn \vdots
- \today \kill \newline \thicklines \thinlines
-
- \columnsep \space \item \tiny \footnotesize \small \normalsize
- \normal \large \Large \LARGE \huge \Huge \printindex
-
- \newpage \listoffigures \listoftables \tableofcontents
- \maketitle \makeindex
-
- \hline \hrule \vrule
-
- \centering
-
- \bigskip \medskip \smallskip
-
- \noindent \expandafter
-
- \makeatletter \makeatother
-
- \columnseprule
-
- \textwidth \textheight \hsize \vsize
-
- \if \fi \else
-
- \csname \endcsname
-
- \z@ \p@ \@warning \typeout
-
- \dots \ldots \input \endinput \nextline \leavevmode \cdots
- \appendix \listfiles \and \quad
- \hskip \vfill \vfil \hfill \hfil \topmargin \oddsidemargin
- \frenchspacing \nonfrenchspacing
- \begingroup \endgroup \par
-
- \vrefwarning \upshape \headheight \headsep \hoffset \voffset
- \cdot \qquad
- \left \right
- \qedhere
-
- \xspace
-
- \addlinespace \cr \fill \frontmatter
- \toprule \midrule \bottomrule
-
-}[
-# Here you can put regular expressions to match Silent macros. It was
-# designed for the case where you have many custom macros sharing a
-# common prefix, but can of course be used for other things.
-
-# Support ConTeXt to at least some extent
-\\start.* \\stop.*
-
-]
-
-#####################################################################
-#
-# Here, you can specify the length of various dashes. We sort the
-# dash according to which type of characters that are on the left and
-# right of it. We are only conclusive if they are the same.
-#
-# We associate as follows:
-#
-# Name Type of character on each side
-# HyphDash Alphabetic (foo-bar)
-# NumDash Numeric (2--3)
-# WordDash Space (like this --- see?)
-#
-# Below you specify how many dashes which are legal in each case. We
-# define 0 as a magic constant which always generates an error. You
-# may specify more than one legal dash-length.
-#
-# Let's look at an example. You use the following dash-syntax:
-#
-# foo-bar
-# 2--3
-# like this---see?
-#
-#
-# HYPHDASH { 1 3 } # Either a hyphen, or inter-word
-# NUMDASH { 2 } # Between words
-# WORDDASH { 0 } # We never use this
-#
-
-HyphDash
-{
- 1 3
-}
-
-NumDash
-{
- 2
-}
-
-WordDash
-{
- 3
-}
-
-#####################################################################
-#
-# Here are exceptions to the dash rules above. For example, an
-# n-dash -- between words is usually wrong, but in some cases it is
-# correct, such as when naming a theorem. The Birch--Swinnerton-Dyer
-# conjecture is one example where the difference matters. You can
-# tell that Birch is one person and Swinnerton-Dyer is another.
-#
-# Adding line suppressions for these is possible, but can quickly
-# become tedious if a certain theorem is referenced often. For this
-# reason exceptions can be specified here. They are case-sensitive.
-#
-
-DashExcpt
-{
- Birch--Swinnerton-Dyer
-}
-
-#####################################################################
-#
-# This keyword indicates commands whose argument isn't LaTeX code,
-# and thus should be ignored.
-#
-# After the command, you may place arguments that you wish that
-# should be wiped in the process; use [] for optional arguments, {}
-# for required ones and * if the command supports an alternative
-# variant. These should be separated from the command with a colon.
-# Some commands (e.g. \cmidrule) use () to delimit and optional
-# argument and so this syntax is supported as well.
-#
-# For instance, if you would like to wipe the \newcommand command,
-# you would declare it as \newcommand:*[][]{}
-#
-# These commands may be "executed" before they're wiped, so you will
-# typically also wish to list filehandling commands and similar here.
-#
-
-WipeArg
-{
- \label:{} \ref:{} \eqref:{} \vref:{} \pageref:{} \index:[]{}
- \cite:[][]{} \nocite:{}
- \input:{} \verbatiminput:[]{} \listinginput:[]{}{}
- \verbatimtabinput:[]{} \include:{} \includeonly:{}
- \bibitem:[]{}
- \cline:{} \cmidrule:[](){}
- \href:{}{}
- # Cleveref -- there are many others that could be here as well...
- \cref:*{} \cpageref:*{} \crefrange:*{}{} \cpagerefrange:*{}{}
- \Cref:*{} \Cpageref:*{} \Crefrange:*{}{} \Cpagerefrange:*{}{}
- # natbib
- \citet:*[][]{} \citep:*[][]{} \citealt:*{} \citealp:*[]{} \citeauthor:*{}
- \Citet:*[][]{} \Citep:*[][]{} \Citealt:*{} \Citealp:*[]{} \Citeauthor:{}
- \citetext:{} \citeyear:*{} \citeyearpar:{}
- # tipa which uses "
- \textipa:{}
-}
-
-#####################################################################
-#
-# These environments contain material which will be typeset as
-# mathematics by LaTeX. This turns on/off some warnings.
-#
-# We will automagically append a * to each keyword.
-#
-
-MathEnvir
-{
- displaymath math eqnarray array equation
- align alignat gather flalign multline
-}
-
-#####################################################################
-#
-# These commands contain material which will be typeset as mathematics
-# by LaTeX. The commands are assumed to have one mandatory argument
-# which is in math mode. This turns on/off some warnings.
-#
-
-MathCmd
-{
- \ensuremath
-}
-
-#####################################################################
-#
-# These commands contain material which will _not_ be typeset as
-# mathematics by LaTeX even if it would otherwise be in mathmode. The
-# commands are assumed to have one mandatory argument which is in text
-# mode. This turns on/off some warnings.
-#
-
-TextCmd
-{
- \text \intertext \shortintertext \mbox
-}
-
-#####################################################################
-#
-# These environments contains material which contents should be
-# ignored.
-#
-# We will automagically append a * to each keyword.
-#
-
-VerbEnvir
-{
- verbatim comment listing verbatimtab rawhtml errexam picture texdraw
- filecontents pgfpicture tikzpicture minted lstlisting IPA
-}
-
-#####################################################################
-#
-# ChkTeX does automagically catch most abbreviations; the ones we
-# need to list here, are those which are most likely to be followed
-# by a word with an upper-case letter (that is not the beginning of a
-# new sentence).
-#
-# The case-insensitive abbreviations are not really case-insensitive,
-# it seems to be more practical to only let the first character be
-# case-insensitive, while the remaining are case-sensitive.
-#
-# To speed up the searching process somewhat, we require that these
-# end in a `.', this should not be a problem.
-#
-# Much of this work (both the abbreviations below, and the regexps
-# necessary to catch the remaining automatically) have been provided
-# by Russ Bubley, <russ@scs.leeds.ac.uk>.
-#
-
-Abbrev
-{
-# Ordinals
-1st. 2nd. 3rd. 4th.
-# Titles
-Mr. Mrs. Miss. Ms. Dr. Prof. St.
-
-#
-# Days
-# Mon. Tue. Wed. Thu. Fri. Sat. Sun.
-#
-# Months
-# Jan. Feb. Mar. Apr. May. Jun. Jul. Aug. Sep. Oct. Nov. Dec.
-#
-# Letters
-# Kt. Jr.
-#
-# Corporate
-# Co. Ltd.
-#
-# Addresses
-# Rd. Dr. St. Ave. Cres. Gdns. Sq. Circ. Terr. Pl. Arc. La. Clo. Ho. Est. Gn.
-#
-# Misc.
-# oe. pbab. ps. rsvp. Tx.
-}
-[
-###
-#
-# The first letter is case-insensitive in the abbrevs in this
-# list. Due to the nature of the checking algorithm used for
-# this, entries consisting of only one character will be
-# silently ignored.
-#
-##
-
-# Latin
-# cf. "et al." etc. qed. qv. viz.
-#
-# Corporate
-# inc. plc.
-#
-# Misc
-# fax. pcs. qty. tel. misc.
-]
-
-#####################################################################
-#
-# Commands which accent characters, meaning that \i or \j (\imath and
-# \jmath in mathmode) should be used instead of `i' and `j'
-#
-
-IJAccent
-{
- \hat \check \breve \acute \grave \tilde \bar \vec \dot \ddot
-
- \' \` \^ \" \~ \= \. \u \v \H \t
-
-###
-#
-# The remaining accent commands (\c,\d,\b) put their accent _under_
-# the character, not above, and should thus be used with normal i's
-# and j's.
-#
-###
-
-}
-
-#####################################################################
-#
-# Commands which, when the group is terminated, needs italic
-# correction.
-#
-
-Italic
-{
- \it \em \sl
- \itshape \slshape
-}
-
-#####################################################################
-#
-# Commands which makes the font non-italic.
-#
-
-NonItalic
-{
- \bf \rm \sf \tt \sc
- \upshape
-}
-
-#####################################################################
-#
-# Commands which put their argument into italic (and thus possibly
-# needs italic correction in the end).
-#
-# This is currently empty, since \textit, \textsl and \emph do that
-# automatically.
-#
-
-ItalCmd
-{
-}
-
-#####################################################################
-#
-# These commands all have in common that a pagebreak right in front
-# of them is highly undesirable; thus there should be no space in
-# front of them.
-#
-
-PostLink
-{
- \index \label
-}
-
-#####################################################################
-#
-# These commands should not have a space in front of them for various
-# reasons. I.e. much the same as POSTLINK, but produces another
-# warning.
-#
-
-NotPreSpaced
-{
- \footnote \footnotemark \/
-}
-
-#####################################################################
-#
-# The commands listed here, should be prepended with a `~', as in
-# "look in table~\ref{foo}", to avoid the references being split
-# across lines.
-#
-
-Linker
-{
- \ref \vref \pageref \eqref \cite
-}
-
-#####################################################################
-#
-# Commands/characters which should have \cdots in between, e.g.
-# $1+2+3+\cdots+n$.
-#
-
-CenterDots
-{
- = + - \cdot \div & \times \geq \leq < >
-}
-
-#####################################################################
-#
-# Commands/characters which should have \ldots in between, e.g.
-# $1,2,3,\ldots,n$.
-#
-
-LowDots
-{
- . , ;
-}
-
-#####################################################################
-#
-# In maths mode, there are certain aliases for mathematical operators
-# like sin, cos, etc. Ignore the leading backslash in the commands,
-# and so forth. You should list these below.
-#
-
-MathRoman
-{
- log lg ln lim limsup liminf sin arcsin sinh cos arccos cosh tan
- arctan tanh cot coth sec csc max min sup inf arg ker dim hom det
- exp Pr gcd deg bmod pmod mod
-}
-
-#####################################################################
-#
-# These TeX commands have become unnecessary, as there are LaTeX
-# commands that does the same. Purists should thus avoid these in
-# their code.
-#
-# (These are a spell-corrected version of those lacheck uses).
-#
-
-Primitives
-{
- \above \advance \catcode \chardef \closein \closeout \copy \count
- \countdef \cr \crcr \csname \delcode \dimendef \dimen \divide
- \expandafter \font \hskip \vskip \openout
-}
-
-#####################################################################
-#
-# Format: \command:characters
-#
-# We'll emit a warning if any of characters are found after the
-# command.
-#
-
-NoCharNext
-{
- \left:{}$ \right:{}$
-}
-
-#####################################################################
-#
-# We're killing \verb@...@ commands and the arguments of the commands
-# listed above in WipeArg by overwriting them with a string or a
-# single character.
-#
-# This should not contain an alphabetic character (in case the user
-# writes (\foo\verb@bar@), neither should it contain be one of
-# LaTeX's reserved characters (`#$%&~_^\{}'), or any parenthesis
-# character ('()[]{}'). If possible, don't use a punctuation
-# character, either, or any spacing character.
-#
-# The asterisk is also unsuitable, as some commands behave in another
-# way if they are appended with an asterisk. Which more or less
-# leaves us with the pipe.
-#
-# Please note that this may also be a _string_, which will be
-# repeated until the proper length is reached.
-#
-
-VerbClear = "|"
-
-#
-# All for now - have fun.
-#
-#####################################################################
diff --git a/support/chktex/chktexrc.in b/support/chktex/chktexrc.in
new file mode 100644
index 0000000000..491a5792fc
--- /dev/null
+++ b/support/chktex/chktexrc.in
@@ -0,0 +1,989 @@
+#### -*- conf -*- ####
+##### TODO: Do I want a TOC? Index?...
+##### TODO: Use something besides errexam?
+##### TODO: Color/frame for default value
+###############################################################################
+#### This fiie is input to a simple "tangle" process. The extions of .in is
+#### a little misleading in that it's not managed by autotools or m4. Sorry.
+####
+#### Two different files are created from this file by calling MakeChkTeXRC.pl
+#### 1. chktexrc, a self-documenting chktecrc example
+#### a. Lines with 3 (or more) leading #'s are discarded
+#### b. Other lines are kept as is
+#### 2. ChkTeXRC.tex, LaTeX documentation for chktecrc.
+#### a. Lines with 4 (or more) leading #'s are discarded
+#### b. Lines with 0 or 2 (exactly) leading #'s are discarded
+#### c. Lines with 1 or 3 (exactly) leading #'s are turned in (LaTeX-only) lines
+####
+#### In other words
+#### 1. Lines with 1 or 3 leading #'s are included in the LaTeX
+#### documentation with the #'s stripped off
+#### 2. Lines with 0, 1 or 2 are included as is in the example
+#### chktexrc file
+#### #
+###############################################################################
+## Example resource file for ChkTeX.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+##
+## For more information visit https://www.nongnu.org/chktex/
+##
+
+### \subsubsection{The \rsrc\ file format}
+## chktexrc file format
+#
+# The chktecrc file is essentially a bunch of variable assignments.
+# There are two types of variables, those that take single items and
+# those that take lists.
+#
+# In turn, there are two types of lists, case-sensitive and case-insentive.
+# Case-sensitive lists are delimited by @verb@{@endverb@ and @verb@}@endverb@
+# while case-insensitive are delimited by @verb@[@endverb@ and @verb@]@endverb@.
+# Only some variables support case insensitive lists, since in many
+# cases it doesn't make sense and would be unnecessarily slow. Those
+# variables that @emph@do@endemph@ support case-insensitive lists will be marked as
+# such throughout the file.
+#
+# Variables can be set with or without an equals sign. If included, the
+# @verb@=@endverb@ causes the variable to be overwritten. This is the only thing
+# that makes sense for varibles taking a single item and so we always
+# include it in that case. For list variables, omitting the equals
+# sign will cause the items in the list to be appended instead of
+# overwriting the entire list.
+#
+# Below are all the ways in which a variable can be set. Note that lists
+# can span lines, though this is not shown here for brevity.
+#
+#
+### \begin{verbatim}
+# VariableName = item
+# # Overwrites
+# VariableName = { Item1 Item2 ... }
+# VariableName = [ item1 item2 ... ]
+# VariableName = { Item1 Item2 ... } [ item item ... ]
+# VariableName = [ item1 item2 ... ] { Item Item ... }
+# # Appends
+# VariableName { Item3 Item4 ... }
+# VariableName [ item3 item4 ... ]
+# VariableName { Item3 Item4 ... } [ item item ... ]
+# VariableName [ item3 item4 ... ] { Item Item ... }
+### \end{verbatim}
+#
+#
+# Comments begin with @verb@#@endverb@, and continue for the end of the line.
+# Blank lines plus leading and trailing spaces are ignored.
+# Items are separated by spaces.
+# Newlines are considered spaces, but can't be escaped.
+# You can use double quotes @verb@"@endverb@ to surround an item with spaces, or you can
+# escape spaces as described later.
+#
+# Detection of tokens like @verb@}@endverb@ are somewhat context sensitve---they
+# have to be preceded by a space (or newline). This allows them to be
+# part of an item without escaping. Since some variables require such
+# characters, this generally makes life easier.
+#
+# To include characters that might otherwise interfere, escape
+# sequences are provided. They are similar to those in C, but use
+# @verb@!@endverb@ instead of @verb@\@endverb@ for obvious reasons.
+# The entire list is below.
+#
+### \vspace{0.5\baselineskip}
+### \begin{tabular}{p{0.2\textwidth}p{0.7\textwidth}}
+# @bf Sequence @&@ @bf Resulting character @\\@
+# @verb@! @endverb@ @&@ Space @\\@
+# @verb@!"@endverb@ @&@ @verb@"@endverb@ @\\@
+# @verb@!#@endverb@ @&@ @verb@#@endverb@ @\\@
+# @verb@!!@endverb@ @&@ @verb@!@endverb@ @\\@
+# @verb@!{@endverb@ @&@ @verb@{@endverb@ @\\@
+# @verb@!}@endverb@ @&@ @verb@}@endverb@ @\\@
+# @verb@![@endverb@ @&@ @verb@[@endverb@ @\\@
+# @verb@!]@endverb@ @&@ @verb@]@endverb@ @\\@
+# @verb@!=@endverb@ @&@ @verb@=@endverb@ @\\@
+# @verb@!b@endverb@ @&@ Backspace @\\@
+# @verb@!n@endverb@ @&@ New line @\\@
+# @verb@!r@endverb@ @&@ Carriage return @\\@
+# @verb@!t@endverb@ @&@ Tab @\\@
+# @verb@!f@endverb@ @&@ Form feed @\\@
+# @verb@!xNN@endverb@ @&@ NN must be a hexadecimal number (00 - ff),
+# both characters must be included. @\\@
+# @verb@!dNNN@endverb@ @&@ NNN must be a decimal number (000 - 255), all
+# three characters must be included.
+# Unspecified results if NNN > 377. @\\@
+# @verb@!NNN@endverb@ @&@ NNN must be a octal number (000 - 377), all
+# three characters must be included.
+# Unspecified results if NNN > 377.
+### \end{tabular}
+
+### \subsubsection{Settings in the \rsrc\ file}
+## Available Settings
+#
+# All avaiable settings follow.
+#
+
+## QuoteStyle
+### \medskip
+### \begin{chktexrcsimplevar}{QuoteStyle}
+#
+# The type of quote-style you are using. There are currently two
+# styles:
+#
+# Traditional:
+### \begin{errexam}
+# "An example," he said, "would be great."
+### \end{errexam}
+#
+# Logical:
+### \begin{errexam}
+# "An example", he said, "would be great".
+### \end{errexam}
+#
+### \chktexrcdefault\begin{verbatim}
+QuoteStyle = Logical
+### \end{verbatim}
+### \end{chktexrcsimplevar}
+
+
+## TabSize
+### \begin{chktexrcsimplevar}{TabSize}
+#
+# The width of a tab. This is used for formatting the error message.
+# Only positive integers are allowed.
+#
+### \chktexrcdefault\begin{verbatim}
+TabSize = 8
+### \end{verbatim}
+### \end{chktexrcsimplevar}
+
+
+## CmdSpaceStyle
+### \medskip
+### \begin{chktexrcsimplevar}{CmdSpaceStyle}
+#
+# How to treat a command is followed by punction. In all cases the
+# warnings are also governed by the main warning settings, namely
+# warnings 12 and 13 about interword and intersentence spacings.
+### These can be found on page~\pageref{warn:interword}.
+#
+# If set to Ignore, then it won't print any warnings when pucntuation
+# follows a command.
+#
+#
+# If CmdSpaceStyle is set to InterWord, then it will print warnings
+# when interword spacing should (potentially) be used. For example,
+# without a command the following will trigger warning 12
+#
+### \begin{errexam}
+# @verb@I've seen a UFOs, etc. in my life.@endverb@
+### \end{errexam}
+#
+# And if set to InterWord, so will
+#
+### \begin{errexam}
+# @verb@I've seen a UFOs, \etc. in my life.@endverb@
+### \end{errexam}
+#
+#
+# If set to InterSentence, then it will print warnings when
+# intersentence spacing should (potentially) be used. For example,
+# without a command the following will trigger warning 13
+#
+### \begin{errexam}
+# @verb@I've seen an UFO! Right over there!@endverb@
+### \end{errexam}
+#
+# And if set to InterSentence, so will
+#
+### \begin{errexam}
+# @verb@I've seen an \UFO! Right over there!@endverb@
+### \end{errexam}
+#
+#
+# Setting CmdSpaceStyle to Both will cause warnings to be printed in
+# both cases.
+#
+### \chktexrcdefault\begin{verbatim}
+CmdSpaceStyle = Ignore
+### \end{verbatim}
+### \end{chktexrcsimplevar}
+
+
+## CmdLine
+### \begin{chktexrclistvar}{CmdLine}
+#
+# Default command-line options. For instance, you might like to put
+# @verb@-v2@endverb@ here.
+#
+### \chktexrcdefault\begin{verbatim}
+CmdLine
+{
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## UserWarn
+### \begin{chktexrclistvar*}{UserWarn}
+#
+# Arbitrary strings to warn about. You can put here to help you find
+# your own little foibles. See also@ref@UserWarnRegex@endref@.
+#
+# These patterns will be searched for throughout the text; regardless
+# of whether they appear as normal text, commands, in math mode, etc.
+# They are @emph@not@endemph@ found in comments.
+#
+# Suppose you define a special command like this:
+### \begin{verbatim}
+# \def\unknown{\large\bf??}
+### \end{verbatim}
+# which you use whenever you don't have some information at the time
+# of writing. Thus, it makes sense to warn on it, and this is a
+# convenient way to do so.
+#
+### \chktexrcdefault\begin{verbatim}
+UserWarn
+{
+ \unknown
+ # One should write \chktex or Chk\TeX - never ChkTeX.
+ ChkTeX
+}
+[ # You may put case-insensitive patterns here.
+]
+### \end{verbatim}
+### \end{chktexrclistvar*}
+
+
+## UserWarnRegex
+### \begin{chktexrclistvar}{UserWarnRegex}
+#
+# A more sophisticated version of@ref@UserWarn@endref@ using regular
+# expressions. Use of these will be automatically disabled if @ChkTeX@
+# was built without regular expression support. Because @ChkTeX@ can be
+# with support for either POSIX or PCRE flavors of regular expression,
+# some of the following will not apply in all cases. An expression
+# can be defined only when PCRE is enabled by prepending the
+# expression with @verb@PCRE:@endverb@ and similarly with @verb@POSIX:@endverb@.
+#
+# These patterns will be searched for, no matter whether they appear
+# as normal text, commands, or arguments. However, they will @emph@not@endemph@
+# match in verbatim environments (see@ref@VerbEnvir@endref@).
+#
+# Remember that you have to escape (with a @verb@!@endverb@) the characters
+# @verb@"#!=@endverb@, as well as spaces and @verb@{}[]@endverb@ if they are
+# proceeded by a space.
+#
+# When using PCRE regular expressions, you can use @verb@(?i)@endverb@ to make
+# the expression case insensitive. See the man pages (man pcresyntax)
+# or the nicely formatted http://perldoc.perl.org/perlre.html for
+# documentation on the regular expression syntax. Note, however, that
+# some the features of perl regular expression are not available such
+# as running code (callouts), and replacing.
+#
+# An initial PCRE-style comment @verb@(?# ... )@endverb@ can be used
+# to change what is displayed, thereby reminding yourself how to fix
+# the problem. This works even for POSIX expressions.
+#
+### \chktexrcdefault\begin{verbatim}
+UserWarnRegex
+{
+ (?!#Always! use! \nmid)\\not! *(\||\\mid)
+
+ # Capitalize section when saying Section 6.
+ (?!#-1:Capitalize! before! references)PCRE:\b(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
+ (?!#1:Capitalize! before! references)POSIX:([^[:alnum:]]|^)(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
+
+ # Spell it introduction
+ # PCRE:(?i)\bintro\b(?!#Spell! it! out.! This! comment! is! not! used.)
+ # POSIX:([^[:alnum:]]|^)intro([^[:alnum:]]|$)
+
+ # Pretty tables--see http://texdoc.net/texmf-dist/doc/latex/booktabs/booktabs.pdf
+ (?!#-2:Use! \toprule,! midrule,! or! \bottomrule! from! booktabs)\\hline
+ # This relies on it being on a single line, and not having anything
+ # else on that line. With PCRE we could match balanced [] and {},
+ # but I wonder if it's worth the complexity...
+ (?!#-2:Vertical! rules! in! tables! are! ugly)\\begin\{(array|tabularx?\*?)\}(\[.*\])?\{.*\|.*\}
+
+ (?!#-3:Optional! arguments! []! inside! optional! arguments! []! must! be! enclosed! in! {})\[(?!![^\]\[{}]*{(?!![^\]\[{}]*}))[^\]]*\[
+
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## TeXInputs
+### \begin{chktexrclistvar}{TeXInputs}
+#
+# A list of paths where @ChkTeX@ should look for files it @verb@\input@endverb@s.
+# By default, the current directory is searched (not recursively, use
+# @verb@//@endverb@ for that, see below).
+#
+# A @verb@//@endverb@ postfix is supported:
+# if you append a double path-separator we'll recursively search that
+# directory's directories. MS-DOS users must append @verb@\\@endverb@
+# instead, e.g. @verb@C:\EMTEX\\@endverb@. In order to search an
+# entire directory tree, you must use @emph@three@endemph@ slashes,
+# e.g. @verb@c:\\\@endverb@ or @verb@///@endverb@.
+#
+### \chktexrcdefault\begin{verbatim}
+TeXInputs
+{
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## OutFormat
+### \begin{chktexrclistvar}{OutFormat}
+#
+# Output formats which can be selected from the command-line. The
+# @verb@-v@endverb@ option simply indexes into this list. By default, entry number
+# @emph@two@endemph@ in this list is chosen (counting from 0), and @verb@-v@endverb@
+# without any parameter selects entry number @emph@three@endemph@.
+#
+# For explanation of the @verb@%@endverb@ format specifiers see the
+# documentation of the @verb@--format@endverb@ command-line argument
+### \begin{comment}
+# in the manual.
+### \end{comment}
+### on page~\pageref{clarg:format}.
+#
+# Recall that to use @verb@!@endverb@ is the escape character, not @verb@\@endverb@.
+#
+### \chktexrcdefault\begin{verbatim}
+OutFormat
+{
+ # -v0; silent mode
+ %f%b%l%b%c%b%n%b%m!n
+ # -v1; normal mode
+ "%k %n in %f line %l: %m!n%r%s%t!n%u!n"
+ # -v2; fancy mode
+ "%k %n in %f line %l: %m!n%r%i%s%I%t!n!n"
+ # -v3; lacheck mode
+ "!"%f!", line %l: %m!n"
+ # -v4; verbose lacheck mode
+ "!"%f!", line %l: %m!n%r%s%t!n%u!n"
+ # -v5; no line number, ease auto-test
+ "%k %n in %f: %m!n%r%s%t!n%u!n"
+ # -v6; emacs compilation mode
+ "!"%f!", line %l.%c:(#%n) %m!n"
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## Silent
+### \begin{chktexrclistvar*}{Silent}
+#
+# Commands which should not trigger a warning if terminated by a space.
+# This warning will not trigger in math mode.
+#
+# You can also specify regular expressions in the @verb@[]@endverb@
+# section in case you have many custom macros that can be safely
+# terminated with a space.
+#
+### \chktexrcdefault\begin{verbatim}
+Silent
+{
+ \rm \em \bf \it \sl \sf \sc \tt \selectfont
+ \rmfamily \sffamily \ttfamily \mdseries \bfseries \itshape
+ \slshape \scshape \relax
+ \vskip \pagebreak \nopagebreak
+
+ \textrm \textem \textbf \textit \textsl \textsf \textsc \texttt
+
+ \clearpage \ddots \dotfill \flushbottom \fussy \indent \linebreak
+ \onecolumn \pagebreak \pushtabs \poptabs \scriptsize \sloppy
+ \twocolumn \vdots
+ \today \kill \newline \thicklines \thinlines
+
+ \columnsep \space \item \tiny \footnotesize \small \normalsize
+ \normal \large \Large \LARGE \huge \Huge \printindex
+
+ \newpage \listoffigures \listoftables \tableofcontents
+ \maketitle \makeindex
+
+ \hline \hrule \vrule
+
+ \centering
+
+ \noindent \expandafter
+
+ \makeatletter \makeatother
+
+ \columnseprule
+
+ \textwidth \textheight \hsize \vsize
+
+ \if \fi \else
+
+ \csname \endcsname
+
+ \z@ \p@ \@warning \typeout
+
+ \dots \ldots \input \endinput \nextline \leavevmode \cdots
+ \appendix \listfiles \and \quad \bigskip \medskip \smallskip
+ \hskip \vfill \vfil \hfill \hfil \topmargin \oddsidemargin
+ \frenchspacing \nonfrenchspacing
+ \begingroup \endgroup \par
+
+ \vrefwarning \upshape \headheight \headsep \hoffset \voffset
+ \cdot \qquad \left \right \qedhere \xspace
+
+ \addlinespace \cr \fill \frontmatter
+ \toprule \midrule \bottomrule
+}[
+ # Here you can put regular expressions to match Silent macros. It
+ # was designed for use with many custom macros sharing a common
+ # prefix, but can of course be used for other things.
+
+ # Support ConTeXt to at least some extent
+ \\start.* \\stop.*
+]
+### \end{verbatim}
+### \end{chktexrclistvar*}
+
+
+## HyphDash
+### \begin{chktexrclistvar}{HyphDash}
+#
+# The number of dashes allowed between two alphabetic characters.
+# Use 0 to always return an error. For example:
+### \begin{errexam}
+# foo-bar @\\@
+# Use of two--dashes is not usually allowed in English. @\\@
+# like this---see?
+### \end{errexam}
+#
+# For English, this will often be a single dash (hyphen). If you like
+# m-dashes with no spaces between them and the surrounding words, then
+# it should include 3 as well. There @emph@are@endemph@ cases when an n-dash
+# is valid between two alphabetic characters. See@ref@DashExcpt@endref@.
+#
+### \chktexrcdefault\begin{verbatim}
+HyphDash { 1 3 }
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## NumDash
+### \begin{chktexrclistvar}{NumDash}
+#
+# The number of dashes allowed between two numeric characters.
+# Use 0 to always return an error. This does @emph@not@endemph@ apply in
+# math mode. For example:
+### \begin{errexam}
+# 123--456 is a range @\\@
+# $12-4$ \% okay because it's in math mode
+### \end{errexam}
+#
+# For English, this should be 2 because an n-dash is used to indicate
+# a range of numbers and subtraction should be in math mode where this
+# does not apply.
+#
+### \chktexrcdefault\begin{verbatim}
+NumDash { 2 }
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## WordDash
+### \begin{chktexrclistvar}{WordDash}
+#
+# The number of dashes allowed between two space characters.
+# Use 0 to always return an error. For example:
+### \begin{errexam}
+# not like - this, @\\@
+# or like -- this. @\\@
+# like this --- see?
+### \end{errexam}
+#
+### \chktexrcdefault\begin{verbatim}
+WordDash { 3 }
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## DashExcpt
+### \begin{chktexrclistvar}{DashExcpt}
+#
+# Exceptions to the dash rules above. For example, an n-dash
+# @verb@--@endverb@ between words is usually wrong, but in some cases it is correct,
+# such as when naming a theorem. The Birch--Swinnerton-Dyer
+# conjecture is one example where the difference matters. You can
+# tell that Birch is one person and Swinnerton-Dyer is another based
+# on the dashes used.
+#
+# Adding line suppressions for these is possible, but can quickly
+# become tedious if a certain theorem is referenced often. For this
+# reason exceptions can be specified here. They are case-sensitive.
+#
+# Unfortunately, there are no warnings if the dashes are surrounded by differing
+# types of characters. For example:
+### \begin{errexam}
+# like this ---see? (space and alphabet) @\\@
+# a--123 (number and alphabet) @\\@
+# a.--b. (other character, namely @verb@.@endverb@)
+### \end{errexam}
+# Similarly, no warnings are issued if the hyphenation is correct,
+# according to the other rules, for example:
+### \begin{errexam}
+# Birch-Swinnerton-Dyer
+### \end{errexam}
+#
+### \chktexrcdefault\begin{verbatim}
+DashExcpt
+{
+ Birch--Swinnerton-Dyer
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## WipeArg
+### \begin{chktexrclistvar}{WipeArg}
+#
+# Commands whose arguments aren't @LaTeX@ code, and thus should be
+# ignored.
+#
+# After the command, you may place arguments (separated from the
+# command with a colon) that should be wiped. Use @verb@[]@endverb@ for optional
+# arguments, @verb@{}@endverb@ for required ones, and @verb@*@endverb@ if the command supports a
+# star variant. Some commands (e.g.\@ @verb@\cmidrule@endverb@) use @verb@()@endverb@ to
+# delimit an optional argument and so this syntax is supported as well.
+#
+# For instance, if you would like to wipe the @verb@\newcommand@endverb@ command,
+# you would declare it as @verb@\newcommand:*[][]{}@endverb@ since it has a
+# star variant, two optional arguments, and one required argument.
+#
+# These commands may be ``evaluated'' before they're wiped, so you will
+# typically list filehandling commands and similar here.
+#
+### \chktexrcdefault\begin{verbatim}
+WipeArg
+{
+ \label:{} \ref:{} \eqref:{} \vref:{} \pageref:{} \index:[]{}
+ \cite:[][]{} \nocite:{}
+ \input:{} \verbatiminput:[]{} \listinginput:[]{}{}
+ \graphicspath:{}
+ \verbatimtabinput:[]{} \include:{} \includeonly:{}
+ \bibitem:[]{}
+ \cline:{} \cmidrule:[](){}
+ \href:{}{}
+ # Cleveref -- there are many others that could be here as well...
+ \cref:*{} \cpageref:*{} \crefrange:*{}{} \cpagerefrange:*{}{}
+ \Cref:*{} \Cpageref:*{} \Crefrange:*{}{} \Cpagerefrange:*{}{}
+ # natbib
+ \citet:*[][]{} \citep:*[][]{} \citealt:*{} \citealp:*[]{} \citeauthor:*{}
+ \Citet:*[][]{} \Citep:*[][]{} \Citealt:*{} \Citealp:*[]{} \Citeauthor:{}
+ \citetext:{} \citeyear:*{} \citeyearpar:{}
+ # biblatex - not including special commands
+ \autocite:*[][]{} \autocites:*[][]{} \Autocite:*[][]{} \Autocites:*[][]{}
+ \parencite:*[][]{} \parencites:*[][]{} \Parencite:*[][]{} \Parencites:*[][]{}
+ \footcite:*{} \footcites:*[][]{} \Footcite:*[][]{} \Footcites:*[][]{}
+ \textcite:*{} \textcites:*[][]{} \Textcite:*[][]{} \Textcites:*[][]{}
+ \citeauthor:*{} \citeauthors:*[][]{} \Citeauthor:*[][]{} \Citeauthors:*[][]{}
+ \citeyear:*{} \citeyears:*[][]{} \Citeyear:*[][]{} \Citeyears:*[][]{}
+ \citetitle:*{} \citetitles:*[][]{} \Citetitle:*[][]{} \Citetitles:*[][]{}
+ # tipa which uses "
+ \textipa:{}
+ # LuaTeX
+ \directlua:{} \luaescapestring:{}
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## MathEnvir
+### \begin{chktexrclistvar}{MathEnvir}
+#
+# Environments which typeset their contents as mathematics.
+# This turns on/off some warnings.
+#
+# A @verb@*@endverb@ variant is automatically added for each keyword.
+#
+### \chktexrcdefault\begin{verbatim}
+MathEnvir
+{
+ displaymath math eqnarray array equation
+ align alignat gather flalign multline
+ dmath dgroup darray
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## TextEnvir
+### \begin{chktexrclistvar}{TextEnvir}
+#
+# Environments which typeset their contents as text, for use inside
+# mathematics. This turns on/off some warnings.
+#
+### \chktexrcdefault\begin{verbatim}
+TextEnvir
+{
+ dsuspend
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## MathCmd
+### \begin{chktexrclistvar}{MathCmd}
+#
+# Commands whose argument will be typeset as mathematics.
+# The commands are assumed to have one mandatory argument which is in
+# math mode. This turns on/off some warnings.
+#
+### \chktexrcdefault\begin{verbatim}
+MathCmd
+{
+ \ensuremath
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## TextCmd
+### \begin{chktexrclistvar}{TextCmd}
+#
+# Commands whose argument will @emph@not@endemph@ be typeset as
+# mathematics even if it would otherwise be in math mode.
+# The commands are assumed to have one mandatory argument which is in
+# text mode. This turns on/off some warnings.
+#
+### \chktexrcdefault\begin{verbatim}
+TextCmd
+{
+ \text \intertext \shortintertext \mbox \condition
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## VerbEnvir
+### \begin{chktexrclistvar}{VerbEnvir}
+#
+# Environments containing non-@LaTeX@ content of some kind, and
+# therefore should not trigger any warnings.
+#
+# A @verb@*@endverb@ variant is automatically added for each keyword.
+#
+### \chktexrcdefault\begin{verbatim}
+VerbEnvir
+{
+ verbatim comment listing verbatimtab rawhtml errexam picture texdraw
+ filecontents pgfpicture tikzpicture minted lstlisting IPA
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## Abbrev
+### \begin{chktexrclistvar*}{Abbrev}
+#
+# Abbreviations not automatically handled by @ChkTeX@.
+#
+# @ChkTeX@ automagically catches most abbreviations; the ones we need to
+# list here, are those which are most likely to be followed by a word
+# with an upper-case letter which is not the beginning of a new
+# sentence.
+#
+# The case-insensitive abbreviations are not fully case-insensitive.
+# Rather, only the first character is case-insensitive, while the
+# remaining characters are case-sensitive.
+#
+# To speed up the searching process somewhat, we require that these
+# end in a @verb@.@endverb@ which should not be a problem in practice.
+#
+# Much of this work (both the abbreviations below, and the regular
+# expressions necessary to catch the remaining automatically) have
+# been provided by Russ Bubley, <russ@scs.leeds.ac.uk>.
+#
+### \chktexrcdefault\begin{verbatim}
+Abbrev
+{
+ # Ordinals
+ 1st. 2nd. 3rd. 4th.
+ # Titles
+ Mr. Mrs. Miss. Ms. Dr. Prof. St.
+ #
+ # Days
+ # Mon. Tue. Wed. Thu. Fri. Sat. Sun.
+ #
+ # Months
+ # Jan. Feb. Mar. Apr. May. Jun. Jul. Aug. Sep. Oct. Nov. Dec.
+ #
+ # Letters
+ # Kt. Jr.
+ #
+ # Corporate
+ # Co. Ltd.
+ #
+ # Addresses
+ # Rd. Dr. St. Ave. Cres. Gdns. Sq. Circ. Terr. Pl. Arc. La. Clo. Ho. Est. Gn.
+ #
+ # Misc.
+ # oe. pbab. ps. rsvp. Tx.
+}
+[
+ # The first letter is case-insensitive in the abbrevs in this
+ # list. Due to the nature of the checking algorithm used for
+ # this, entries consisting of only one character will be
+ # silently ignored.
+ #
+ # Latin
+ # cf. "et al." etc. qed. qv. viz.
+ #
+ # Corporate
+ # inc. plc.
+ #
+ # Misc
+ # fax. pcs. qty. tel. misc.
+]
+### \end{verbatim}
+### \end{chktexrclistvar*}
+
+
+## IJAccent
+### \begin{chktexrclistvar}{IJAccent}
+#
+# Commands which add accents above characters. This means that @verb@\i@endverb@ or @verb@\j@endverb@
+# (@verb@\imath@endverb@ and @verb@\jmath@endverb@ in mathmode) should be used instead of @verb@i@endverb@ and @verb@j@endverb@.
+#
+# Other accent commands such as @verb@\c@endverb@, @verb@\d@endverb@, and @verb@\b@endverb@, put their accent under
+# the character, and thus should be used with normal @verb@i@endverb@s and @verb@j@endverb@s.
+#
+### \chktexrcdefault\begin{verbatim}
+IJAccent
+{
+ \hat \check \breve \acute \grave \tilde \bar \vec \dot \ddot
+ \' \` \^ \" \~ \= \. \u \v \H \t
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## Italic
+### \begin{chktexrclistvar}{Italic}
+#
+# Commands which need italic correction when the group is terminated.
+#
+### \chktexrcdefault\begin{verbatim}
+Italic
+{
+ \it \em \sl \itshape \slshape
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## NonItalic
+### \begin{chktexrclistvar}{NonItalic}
+#
+# Commands which makes the font non-italic.
+#
+### \chktexrcdefault\begin{verbatim}
+NonItalic
+{
+ \bf \rm \sf \tt \sc
+ \upshape
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## ItalCmd
+### \begin{chktexrclistvar}{ItalCmd}
+#
+# Commands which put their argument into italic (and thus possibly
+# needs italic correction in the end).
+#
+# This is currently empty, since @verb@\textit@endverb@, @verb@\textsl@endverb@, and @verb@\emph@endverb@
+# automatically add italic corecction.
+#
+### \chktexrcdefault\begin{verbatim}
+ItalCmd
+{
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## PostLink
+### \begin{chktexrclistvar}{PostLink}
+#
+# Commands in front of which a page break is highly undesirable.
+# Thus there should be no space in front of them.
+#
+### \chktexrcdefault\begin{verbatim}
+PostLink
+{
+ \index \label
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## NotPreSpaced
+### \begin{chktexrclistvar}{NotPreSpaced}
+#
+# Commands that should not have a space in front of them for various
+# reasons. Much the same as@ref@PostLink@endref@, but produces a different warning.
+#
+### \chktexrcdefault\begin{verbatim}
+NotPreSpaced
+{
+ \footnote \footnotemark \/
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## Linker
+### \begin{chktexrclistvar}{Linker}
+#
+# Commands that should be prepended with a @verb@~@endverb@. For example
+### \begin{errexam}
+# @verb@look in table~\ref{foo}@endverb@
+### \end{errexam}
+# to avoid the references being split across lines.
+#
+### \chktexrcdefault\begin{verbatim}
+Linker
+{
+ \ref \vref \pageref \eqref \cite
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## CenterDots
+### \begin{chktexrclistvar}{CenterDots}
+#
+# Commands or characters which should have @verb@\cdots@endverb@ in between.
+# For example, $1+2+3+\cdots+n$.
+#
+### \chktexrcdefault\begin{verbatim}
+CenterDots
+{
+ = + - \cdot \div & \times \geq \leq < >
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## LowDots
+### \begin{chktexrclistvar}{LowDots}
+#
+# Commands or characters which should have @verb@\ldots@endverb@ in between.
+# For example, $1,2,3,\ldots,n$.
+#
+### \chktexrcdefault\begin{verbatim}
+LowDots
+{
+ . , ;
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## MathRoman
+### \begin{chktexrclistvar}{MathRoman}
+#
+# Words that should appear in roman (upright) in math mode. There are
+# certain aliases for mathematical operators (like sin or cos) that
+# appear in roman rather than the usual italic (slanted) font.
+#
+# These entries do not need a leading slash since the mistake is often
+# to @emph@not@endemph@ include the leading slash.
+#
+### \chktexrcdefault\begin{verbatim}
+MathRoman
+{
+ log lg ln lim limsup liminf sin arcsin sinh cos arccos cosh tan
+ arctan tanh cot coth sec csc max min sup inf arg ker dim hom det
+ exp Pr gcd deg bmod pmod mod
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## Primitives
+### \begin{chktexrclistvar}{Primitives}
+#
+# Commands that are used in @TeX@ but have become unnecessary in
+# @LaTeX@, as there are @LaTeX@ commands which do the same. Purists
+# should thus avoid these in their code.
+#
+### \chktexrcdefault\begin{verbatim}
+Primitives
+{
+ \above \advance \catcode \chardef \closein \closeout \copy \count
+ \countdef \cr \crcr \csname \delcode \dimendef \dimen \divide
+ \expandafter \font \hskip \vskip \openout
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## NoCharNext
+### \begin{chktexrclistvar}{NoCharNext}
+#
+# Commands and a set of characters that should @emph@not@endemph@ follow them. For
+# example, in math mode, @verb@\left@endverb@ should be followed by a delimiter
+# which is to change size. Therefore, it should not be followed by the
+# end of math mode @verb@$@endverb@ or a grouping character @verb@{@endverb@ or @verb@}@endverb@.
+#
+# The format is @verb@\command:characters@endverb@.
+#
+### \chktexrcdefault\begin{verbatim}
+NoCharNext
+{
+ \left:{}$ \right:{}$
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## VerbClear
+### \begin{chktexrcsimplevar}{VerbClear}
+#
+# The character to replace verbatim text with.
+#
+# The arguments of commands listed in@ref@WipeArg@endref@, as well as
+# @verb@\verb+...+@endverb@ commands, are replaced with an innocuous character
+# to prevent that data from inadvertantly producing a warning.
+#
+# This should not contain an alphabetic character (in case the user
+# writes (@verb@\foo\verb+bar+@endverb@), neither should it contain be one of
+# @LaTeX@'s reserved characters (@verb@#$%&~_^\{}@endverb@), or any parenthesis
+# character (@verb@()[]{}@endverb@). If possible, don't use a punctuation
+# character or any spacing characters either. All of these characters
+# have warnings associated with them and thus could cause spurious
+# warnings to appear.
+#
+# The asterisk is also unsuitable, as some commands behave in another
+# way if they are appended with an asterisk. Which more or less
+# leaves us with the pipe.
+#
+# Please note that this may also be a @verb@string@endverb@, which will be
+# repeated until the proper length is reached.
+#
+### \chktexrcdefault\begin{verbatim}
+VerbClear = "|"
+### \end{verbatim}
+### \end{chktexrcsimplevar}
+
+
+## That's all for now - Happy @LaTeX@ing!
diff --git a/support/chktex/config.h.in b/support/chktex/config.h.in
index 80401f8e31..8e7e5b994a 100644
--- a/support/chktex/config.h.in
+++ b/support/chktex/config.h.in
@@ -1,4 +1,4 @@
-/* config.h.in. Generated from configure.in by autoheader. */
+/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the `access' function. */
#undef HAVE_ACCESS
@@ -35,9 +35,6 @@
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
@@ -65,6 +62,9 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -130,7 +130,9 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
#undef STDC_HEADERS
/* Strip debug info */
diff --git a/support/chktex/configure b/support/chktex/configure
index d5e4be46f6..a0c627111c 100755
--- a/support/chktex/configure
+++ b/support/chktex/configure
@@ -1,9 +1,10 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ChkTeX 1.7.6.
+# Generated by GNU Autoconf 2.71 for ChkTeX 1.7.8.
#
#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -14,14 +15,16 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -31,46 +34,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -79,13 +82,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -94,8 +90,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -107,30 +107,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
@@ -152,20 +132,22 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
-else
+else \$as_nop
case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
@@ -185,42 +167,53 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
-else
+else \$as_nop
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
+ if (eval "$as_required") 2>/dev/null
+then :
as_have_required=yes
-else
+else $as_nop
as_have_required=no
fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
-else
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
+ as_shell=$as_dir$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
break 2
fi
fi
@@ -228,14 +221,21 @@ fi
esac
as_found=false
done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
- if test "x$CONFIG_SHELL" != x; then :
+ if test "x$CONFIG_SHELL" != x
+then :
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
@@ -253,18 +253,19 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
$0: including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
@@ -291,6 +292,7 @@ as_fn_unset ()
}
as_unset=as_fn_unset
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -308,6 +310,14 @@ as_fn_exit ()
as_fn_set_status $1
exit $1
} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_mkdir_p
# -------------
@@ -322,7 +332,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -331,7 +341,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -370,12 +380,13 @@ as_fn_executable_p ()
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -387,18 +398,27 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
@@ -410,9 +430,9 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -439,7 +459,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -483,7 +503,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
@@ -497,6 +517,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
exit
}
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -510,6 +534,13 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -577,57 +608,55 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ChkTeX'
PACKAGE_TARNAME='chktex'
-PACKAGE_VERSION='1.7.6'
-PACKAGE_STRING='ChkTeX 1.7.6'
+PACKAGE_VERSION='1.7.8'
+PACKAGE_STRING='ChkTeX 1.7.8'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
# Factoring default headers for most tests.
ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
#endif
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
#endif
#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
# include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
+ac_header_c_list=
+ac_func_c_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
-WITH_PCRE
EGREP
GREP
CPP
+WITH_PCRE
LATEX2HTML
LYNX
DVIPS
LATEX
+PDFLATEX
GROFF
PERL5
MKDIR_P
@@ -664,6 +693,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -739,6 +769,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -768,8 +799,6 @@ do
*) ac_optarg=yes ;;
esac
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
case $ac_dashdash$ac_option in
--)
ac_dashdash=yes ;;
@@ -810,9 +839,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -836,9 +865,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -991,6 +1020,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1040,9 +1078,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1056,9 +1094,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1102,9 +1140,9 @@ Try \`$0 --help' for more information"
*)
# FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
: "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
@@ -1120,7 +1158,7 @@ if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1128,7 +1166,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1184,7 +1222,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_myself" : 'X\(//\)[^/]' \| \
X"$as_myself" : 'X\(//\)$' \| \
X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
+printf "%s\n" X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1241,7 +1279,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ChkTeX 1.7.6 to adapt to many kinds of systems.
+\`configure' configures ChkTeX 1.7.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1281,6 +1319,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1302,7 +1341,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ChkTeX 1.7.6:";;
+ short | recursive ) echo "Configuration of ChkTeX 1.7.8:";;
esac
cat <<\_ACEOF
@@ -1353,9 +1392,9 @@ if test "$ac_init_help" = "recursive"; then
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1383,7 +1422,8 @@ esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
if test -f "$ac_srcdir/configure.gnu"; then
echo &&
$SHELL "$ac_srcdir/configure.gnu" --help=recursive
@@ -1391,7 +1431,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1400,10 +1440,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ChkTeX configure 1.7.6
-generated by GNU Autoconf 2.69
+ChkTeX configure 1.7.8
+generated by GNU Autoconf 2.71
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1420,14 +1460,14 @@ fi
ac_fn_c_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
+ rm -f conftest.$ac_objext conftest.beam
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1435,14 +1475,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
+ } && test -s conftest.$ac_objext
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1458,14 +1499,14 @@ fi
ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1473,17 +1514,18 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
- }; then :
+ }
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1498,172 +1540,6 @@ fi
} # ac_fn_c_try_link
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
@@ -1671,26 +1547,28 @@ fi
ac_fn_c_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
@@ -1702,17 +1580,18 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof ($2))
return 0;
@@ -1720,12 +1599,13 @@ if (sizeof ($2))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof (($2)))
return 0;
@@ -1733,18 +1613,19 @@ if (sizeof (($2)))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
eval "$3=yes"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
@@ -1756,11 +1637,12 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_find_uintX_t ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
-$as_echo_n "checking for uint$2_t... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+printf %s "checking for uint$2_t... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
eval "$3=no"
# Order is important - never check a type that is potentially smaller
# than half of the expected target width.
@@ -1770,7 +1652,7 @@ else
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
test_array [0] = 0;
@@ -1780,7 +1662,8 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
case $ac_type in #(
uint$2_t) :
eval "$3=yes" ;; #(
@@ -1788,17 +1671,18 @@ if ac_fn_c_try_compile "$LINENO"; then :
eval "$3=\$ac_type" ;;
esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if eval test \"x\$"$3"\" = x"no"; then :
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ if eval test \"x\$"$3"\" = x"no"
+then :
-else
+else $as_nop
break
fi
done
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_find_uintX_t
@@ -1809,11 +1693,12 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_func ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
@@ -1821,16 +1706,9 @@ else
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+ which can conflict with char $2 (); below. */
+#include <limits.h>
#undef $2
/* Override any GCC internal prototype to avoid an error.
@@ -1848,47 +1726,51 @@ choke me
#endif
int
-main ()
+main (void)
{
return $2 ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
as_decl_name=`echo $2|sed 's/ *(.*//'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ eval ac_save_FLAGS=\$$6
+ as_fn_append $6 " $5"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
#ifndef $as_decl_name
#ifdef __cplusplus
@@ -1902,27 +1784,88 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ eval $6=\$ac_save_FLAGS
+
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_check_decl
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
-} # ac_fn_c_check_decl
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ChkTeX $as_me 1.7.6, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+It was created by ChkTeX $as_me 1.7.8, which was
+generated by GNU Autoconf 2.71. Invocation command line was
- $ $0 $@
+ $ $0$ac_configure_args_raw
_ACEOF
exec 5>>config.log
@@ -1955,8 +1898,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -1991,7 +1938,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
@@ -2026,11 +1973,13 @@ done
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
# Save into config.log some information that might help in debugging.
{
echo
- $as_echo "## ---------------- ##
+ printf "%s\n" "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
echo
@@ -2041,8 +1990,8 @@ trap 'exit_status=$?
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -2066,7 +2015,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- $as_echo "## ----------------- ##
+ printf "%s\n" "## ----------------- ##
## Output variables. ##
## ----------------- ##"
echo
@@ -2074,14 +2023,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
+ printf "%s\n" "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
echo
@@ -2089,15 +2038,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
echo
@@ -2105,8 +2054,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
echo
fi
test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -2120,63 +2069,48 @@ ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
-$as_echo "/* confdefs.h */" > confdefs.h
+printf "%s\n" "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
+ ac_site_files="$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+
+for ac_site_file in $ac_site_files
do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -2186,19 +2120,435 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="install-sh"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -2209,12 +2559,12 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
@@ -2223,24 +2573,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -2250,11 +2600,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2273,82 +2624,96 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
CLEAN=
# Check whether --enable-pcre was given.
-if test "${enable_pcre+set}" = set; then :
+if test ${enable_pcre+y}
+then :
enableval=$enable_pcre;
-else
+else $as_nop
enable_pcre=yes
fi
# Check whether --enable-posixre was given.
-if test "${enable_posixre+set}" = set; then :
+if test ${enable_posixre+y}
+then :
enableval=$enable_posixre;
-else
+else $as_nop
enable_posixre=yes
fi
# Check whether --enable-lacheck-replace was given.
-if test "${enable_lacheck_replace+set}" = set; then :
+if test ${enable_lacheck_replace+y}
+then :
enableval=$enable_lacheck_replace;
-else
+else $as_nop
enable_lacheck_replace=no
fi
# Check whether --enable-debug-info was given.
-if test "${enable_debug_info+set}" = set; then :
+if test ${enable_debug_info+y}
+then :
enableval=$enable_debug_info;
-else
+else $as_nop
enable_debug_info=yes
fi
# Check whether --enable-coverage-testing was given.
-if test "${enable_coverage_testing+set}" = set; then :
+if test ${enable_coverage_testing+y}
+then :
enableval=$enable_coverage_testing;
-else
+else $as_nop
enable_coverage_testing=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lacheck replacement should be installed" >&5
-$as_echo_n "checking whether lacheck replacement should be installed... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lacheck replacement should be installed" >&5
+printf %s "checking whether lacheck replacement should be installed... " >&6; }
if test "$enable_lacheck_replace" = "yes"; then
SCRIPTS="$SCRIPTS lacheck"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether runtime debug info should be used" >&5
-$as_echo_n "checking whether runtime debug info should be used... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether runtime debug info should be used" >&5
+printf %s "checking whether runtime debug info should be used... " >&6; }
if test "$enable_debug_info" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
-$as_echo "#define STRIP_DEBUG 1" >>confdefs.h
+printf "%s\n" "#define STRIP_DEBUG 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether coverage testing is enabled" >&5
-$as_echo_n "checking whether coverage testing is enabled... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether coverage testing is enabled" >&5
+printf %s "checking whether coverage testing is enabled... " >&6; }
if test "$enable_coverage_testing" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage -O0"
CLEAN="${CLEAN} \$(wildcard *.bb *.bbg *.da *.gcov)"
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
+
+
+
+
+
+
+
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2357,11 +2722,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2369,11 +2735,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2384,11 +2754,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2397,11 +2767,12 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -2409,11 +2780,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2424,11 +2799,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -2436,8 +2811,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -2450,11 +2825,12 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2462,11 +2838,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2477,11 +2857,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2490,11 +2870,12 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2503,15 +2884,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2527,18 +2912,18 @@ if test $ac_prog_rejected = yes; then
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2549,11 +2934,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2561,11 +2947,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2576,11 +2966,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2593,11 +2983,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -2605,11 +2996,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2620,11 +3015,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2636,34 +3031,138 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
fi
+else
+ CC="$ac_cv_prog_CC"
fi
fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -2673,7 +3172,7 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -2681,7 +3180,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -2693,9 +3192,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
@@ -2716,11 +3215,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -2737,7 +3237,7 @@ do
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
@@ -2753,44 +3253,46 @@ do
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
-else
+else $as_nop
ac_file=''
fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2804,15 +3306,15 @@ for ac_file in conftest.exe conftest conftest.*; do
* ) break;;
esac
done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
@@ -2821,7 +3323,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
@@ -2833,8 +3335,8 @@ _ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
@@ -2842,10 +3344,10 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if { ac_try='./conftest$ac_cv_exeext'
{ { case "(($ac_try" in
@@ -2853,39 +3355,40 @@ $as_echo "$ac_try_echo"; } >&5
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -2899,11 +3402,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
@@ -2912,31 +3416,32 @@ $as_echo "$ac_try_echo"; } >&5
break;;
esac
done
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -2946,29 +3451,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_compiler_gnu=yes
-else
+else $as_nop
ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
@@ -2977,57 +3486,60 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
-else
+else $as_nop
CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
@@ -3042,94 +3554,144 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
-
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
fi
ac_ext=c
@@ -3139,37 +3701,38 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for strict prototypes" >&5
-$as_echo_n "checking CFLAGS for strict prototypes... " >&6; }
-if ${ac_cv_cflags_strict_prototypes+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_cflags_strict_prototypes="no, unknown"
-
- ac_ext=c
+ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
- ac_save_CFLAGS="$CFLAGS"
-for ac_arg in "-pedantic % -fstrict-prototypes -Wstrict-prototypes" "-pedantic % -Wstrict-prototypes" "-pedantic % -Wmissing-prototypes" "-pedantic % -Werror-implicit-function-declaration" "-pedantic % -Wimplicit-function-declaration" #
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CFLAGS for strict prototypes" >&5
+printf %s "checking CFLAGS for strict prototypes... " >&6; }
+if test ${ac_cv_cflags_strict_prototypes+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_cflags_strict_prototypes="no, unknown"
+ac_save_CFLAGS="$CFLAGS"
+for ac_arg in "-pedantic -Werror % -fstrict-prototypes -Wstrict-prototypes" "-pedantic -Werror % -Wstrict-prototypes" "-pedantic -Werror % -Wmissing-prototypes" "-pedantic -Werror % -Werror-implicit-function-declaration" "-pedantic -Werror % -Wimplicit-function-declaration" "-pedantic % -Wstrict-prototypes %% no, unsupported" #
do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_cflags_strict_prototypes=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
case ".$ac_cv_cflags_strict_prototypes" in
.|.no|.no,*) ;;
@@ -3179,7 +3742,7 @@ case ".$ac_cv_cflags_strict_prototypes" in
/* end confdefs.h. */
#include <signal.h>
int
-main ()
+main (void)
{
if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
@@ -3188,49 +3751,70 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
then ac_cv_cflags_strict_prototypes="no, suppressed, signal.h," ; fi ; fi
-else
+else $as_nop
ac_cv_cflags_strict_prototypes="no, suppressed, signal.h"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
rm config.tmp
;;
esac
- CFLAGS="$ac_save_CFLAGS"
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+CFLAGS="$ac_save_CFLAGS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_strict_prototypes" >&5
-$as_echo "$ac_cv_cflags_strict_prototypes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_strict_prototypes" >&5
+printf "%s\n" "$ac_cv_cflags_strict_prototypes" >&6; }
+
+
case ".$ac_cv_cflags_strict_prototypes" in
.ok|.ok,*) ;;
- .|.no|.no,*)
- ;;
+ .|.no|.no,*) ;;
*)
- if echo " $CFLAGS " | grep " $ac_cv_cflags_strict_prototypes " 2>&1 >/dev/null
- then { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS does contain \$ac_cv_cflags_strict_prototypes"; } >&5
- (: CFLAGS does contain $ac_cv_cflags_strict_prototypes) 2>&5
+if test ${CFLAGS+y}
+then :
+
+ case " $CFLAGS " in #(
+ *" $ac_cv_cflags_strict_prototypes "*) :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$ac_cv_cflags_strict_prototypes"; } >&5
+ (: CFLAGS already contains $ac_cv_cflags_strict_prototypes) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CFLAGS " $ac_cv_cflags_strict_prototypes"
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
+ (: CFLAGS="$CFLAGS") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- else { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_strict_prototypes\""; } >&5
- (: CFLAGS="$CFLAGS $ac_cv_cflags_strict_prototypes") 2>&5
+ ;;
+esac
+
+else $as_nop
+
+ CFLAGS=$ac_cv_cflags_strict_prototypes
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
+ (: CFLAGS="$CFLAGS") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- CFLAGS="$CFLAGS $ac_cv_cflags_strict_prototypes"
- fi
+
+fi
;;
esac
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
ansi=
if test -z "$ansi"; then
@@ -3238,11 +3822,12 @@ esac
else
msg="for C compiler warning and ANSI conformance flags"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking $msg" >&5
-$as_echo_n "checking $msg... " >&6; }
-if ${vl_cv_prog_cc_warnings+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $msg" >&5
+printf %s "checking $msg... " >&6; }
+if test ${vl_cv_prog_cc_warnings+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
cat > conftest.c <<EOF
@@ -3330,40 +3915,13 @@ EOF
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_prog_cc_warnings" >&5
-$as_echo "$vl_cv_prog_cc_warnings" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vl_cv_prog_cc_warnings" >&5
+printf "%s\n" "$vl_cv_prog_cc_warnings" >&6; }
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-# Find a good install program. We prefer a C program (faster),
+ # Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
@@ -3377,20 +3935,25 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
@@ -3400,13 +3963,13 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
@@ -3414,12 +3977,12 @@ case $as_dir/ in #((
echo one > conftest.one
echo two > conftest.two
mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
test -s conftest.one && test -s conftest.two &&
test -s conftest.dir/conftest.one &&
test -s conftest.dir/conftest.two
then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
break 3
fi
fi
@@ -3435,7 +3998,7 @@ IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
fi
- if test "${ac_cv_path_install+set}" = set; then
+ if test ${ac_cv_path_install+y}; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. Don't cache a
@@ -3445,8 +4008,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -3456,36 +4019,42 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
- if ${ac_cv_path_mkdir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${ac_cv_path_mkdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
- 'mkdir (GNU coreutils) '* | \
- 'mkdir (coreutils) '* | \
+ as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir ('*'coreutils) '* | \
+ 'BusyBox '* | \
'mkdir (fileutils) '4.1*)
- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
break 3;;
esac
done
@@ -3496,7 +4065,7 @@ IFS=$as_save_IFS
fi
test -d ./--version && rmdir ./--version
- if test "${ac_cv_path_mkdir+set}" = set; then
+ if test ${ac_cv_path_mkdir+y}; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
# As a last resort, use the slow shell script. Don't cache a
@@ -3506,18 +4075,19 @@ fi
MKDIR_P="$ac_install_sh -d"
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
for ac_prog in perl5 perl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PERL5+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PERL5+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PERL5 in
[\\/]* | ?:[\\/]*)
ac_cv_path_PERL5="$PERL5" # Let the user override the test with a path.
@@ -3528,11 +4098,15 @@ as_dummy="$PATH:/usr/bin:/usr/local/bin"
for as_dir in $as_dummy
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PERL5="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PERL5="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3544,11 +4118,11 @@ esac
fi
PERL5=$ac_cv_path_PERL5
if test -n "$PERL5"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL5" >&5
-$as_echo "$PERL5" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL5" >&5
+printf "%s\n" "$PERL5" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3557,15 +4131,15 @@ done
test -n "$PERL5" || PERL5="no"
if test "$PERL5" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether perl is v5 or higher" >&5
-$as_echo_n "checking whether perl is v5 or higher... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perl is v5 or higher" >&5
+printf %s "checking whether perl is v5 or higher... " >&6; }
if $PERL5 -e 'exit($] >= 5)'; then
PERL5=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
fi
fi
@@ -3573,19 +4147,20 @@ if test "$PERL5" != no; then
BUILT_SCRIPTS="$BUILT_SCRIPTS deweb"
SCRIPTS="$SCRIPTS chkweb"
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: chkweb will not be installed since you do not have perl5." >&5
-$as_echo "$as_me: WARNING: chkweb will not be installed since you do not have perl5." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: chkweb will not be installed since you do not have perl5." >&5
+printf "%s\n" "$as_me: WARNING: chkweb will not be installed since you do not have perl5." >&2;}
fi
for ac_prog in 'groff -man -P-bu -Tlatin1' 'nroff -man'
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_GROFF+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_GROFF+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$GROFF"; then
ac_cv_prog_GROFF="$GROFF" # Let the user override the test.
else
@@ -3593,11 +4168,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_GROFF="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3608,11 +4187,11 @@ fi
fi
GROFF=$ac_cv_prog_GROFF
if test -n "$GROFF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
-$as_echo "$GROFF" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
+printf "%s\n" "$GROFF" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3621,13 +4200,60 @@ done
test -n "$GROFF" || GROFF="'nroff -man'"
+# Extract the first word of "pdflatex", so it can be a program name with args.
+set dummy pdflatex; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PDFLATEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PDFLATEX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PDFLATEX="$PDFLATEX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PDFLATEX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_PDFLATEX" && ac_cv_path_PDFLATEX="no"
+ ;;
+esac
+fi
+PDFLATEX=$ac_cv_path_PDFLATEX
+if test -n "$PDFLATEX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5
+printf "%s\n" "$PDFLATEX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
# Extract the first word of "latex", so it can be a program name with args.
set dummy latex; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_LATEX+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_LATEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $LATEX in
[\\/]* | ?:[\\/]*)
ac_cv_path_LATEX="$LATEX" # Let the user override the test with a path.
@@ -3637,11 +4263,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_LATEX="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_LATEX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3654,22 +4284,23 @@ esac
fi
LATEX=$ac_cv_path_LATEX
if test -n "$LATEX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEX" >&5
-$as_echo "$LATEX" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LATEX" >&5
+printf "%s\n" "$LATEX" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
# Extract the first word of "dvips", so it can be a program name with args.
set dummy dvips; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_DVIPS+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DVIPS+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $DVIPS in
[\\/]* | ?:[\\/]*)
ac_cv_path_DVIPS="$DVIPS" # Let the user override the test with a path.
@@ -3679,11 +4310,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_DVIPS="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DVIPS="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3695,22 +4330,23 @@ esac
fi
DVIPS=$ac_cv_path_DVIPS
if test -n "$DVIPS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DVIPS" >&5
-$as_echo "$DVIPS" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DVIPS" >&5
+printf "%s\n" "$DVIPS" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
# Extract the first word of "lynx", so it can be a program name with args.
set dummy lynx; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_LYNX+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_LYNX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $LYNX in
[\\/]* | ?:[\\/]*)
ac_cv_path_LYNX="$LYNX" # Let the user override the test with a path.
@@ -3720,11 +4356,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_LYNX="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_LYNX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3736,21 +4376,22 @@ esac
fi
LYNX=$ac_cv_path_LYNX
if test -n "$LYNX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LYNX" >&5
-$as_echo "$LYNX" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LYNX" >&5
+printf "%s\n" "$LYNX" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
# Extract the first word of "latex2html", so it can be a program name with args.
set dummy latex2html; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_LATEX2HTML+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_LATEX2HTML+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $LATEX2HTML in
[\\/]* | ?:[\\/]*)
ac_cv_path_LATEX2HTML="$LATEX2HTML" # Let the user override the test with a path.
@@ -3760,11 +4401,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_LATEX2HTML="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_LATEX2HTML="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3776,20 +4421,21 @@ esac
fi
LATEX2HTML=$ac_cv_path_LATEX2HTML
if test -n "$LATEX2HTML"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEX2HTML" >&5
-$as_echo "$LATEX2HTML" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LATEX2HTML" >&5
+printf "%s\n" "$LATEX2HTML" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermlib" >&5
-$as_echo_n "checking for tgetent in -ltermlib... " >&6; }
-if ${ac_cv_lib_termlib_tgetent+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermlib" >&5
+printf %s "checking for tgetent in -ltermlib... " >&6; }
+if test ${ac_cv_lib_termlib_tgetent+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltermlib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3798,43 +4444,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char tgetent ();
int
-main ()
+main (void)
{
return tgetent ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_termlib_tgetent=yes
-else
+else $as_nop
ac_cv_lib_termlib_tgetent=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termlib_tgetent" >&5
-$as_echo "$ac_cv_lib_termlib_tgetent" >&6; }
-if test "x$ac_cv_lib_termlib_tgetent" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBTERMLIB 1
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termlib_tgetent" >&5
+printf "%s\n" "$ac_cv_lib_termlib_tgetent" >&6; }
+if test "x$ac_cv_lib_termlib_tgetent" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBTERMLIB 1" >>confdefs.h
LIBS="-ltermlib $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
-$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
-if ${ac_cv_lib_termcap_tgetent+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
+printf %s "checking for tgetent in -ltermcap... " >&6; }
+if test ${ac_cv_lib_termcap_tgetent+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltermcap $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3843,434 +4487,52 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char tgetent ();
int
-main ()
+main (void)
{
return tgetent ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_termcap_tgetent=yes
-else
+else $as_nop
ac_cv_lib_termcap_tgetent=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
-$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
-if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBTERMCAP 1
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
+printf "%s\n" "$ac_cv_lib_termcap_tgetent" >&6; }
+if test "x$ac_cv_lib_termcap_tgetent" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBTERMCAP 1" >>confdefs.h
LIBS="-ltermcap $LIBS"
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if eval \${$as_ac_Header+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+printf %s "checking for $ac_hdr that defines DIR... " >&6; }
+if eval test \${$as_ac_Header+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <$ac_hdr>
int
-main ()
+main (void)
{
if ((DIR *) 0)
return 0;
@@ -4278,19 +4540,21 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_ac_Header=yes"
-else
+else $as_nop
eval "$as_ac_Header=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$as_ac_Header
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
_ACEOF
ac_header_dirent=$ac_hdr; break
@@ -4299,11 +4563,12 @@ fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4311,56 +4576,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char opendir ();
int
-main ()
+main (void)
{
return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' dir; do
+for ac_lib in '' dir
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_opendir=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if test ${ac_cv_search_opendir+y}
+then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if test ${ac_cv_search_opendir+y}
+then :
-else
+else $as_nop
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4368,93 +4636,144 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char opendir ();
int
-main ()
+main (void)
{
return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' x; do
+for ac_lib in '' x
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_opendir=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if test ${ac_cv_search_opendir+y}
+then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if test ${ac_cv_search_opendir+y}
+then :
-else
+else $as_nop
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
fi
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
+
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
+if test "x$ac_cv_header_limits_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "stat.h" "ac_cv_header_stat_h" "$ac_includes_default"
+if test "x$ac_cv_header_stat_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STAT_H 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
+if test "x$ac_cv_header_strings_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
-for ac_header in limits.h stat.h strings.h stdarg.h sys/stat.h termcap.h termlib.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdarg_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_stat_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
+if test "x$ac_cv_header_termcap_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "termlib.h" "ac_cv_header_termlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_termlib_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TERMLIB_H 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+fi
+ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+printf %s "checking for an ANSI C-conforming const... " >&6; }
+if test ${ac_cv_c_const+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __cplusplus
@@ -4467,7 +4786,7 @@ main ()
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
+ /* IBM XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
@@ -4495,7 +4814,7 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; } bx;
struct s *b = &bx; b->j = 5;
@@ -4511,47 +4830,50 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_const=yes
-else
+else $as_nop
ac_cv_c_const=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+printf "%s\n" "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
-$as_echo "#define const /**/" >>confdefs.h
+printf "%s\n" "#define const /**/" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+printf %s "checking for inline... " >&6; }
+if test ${ac_cv_c_inline+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __cplusplus
typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
+static $ac_kw foo_t static_foo (void) {return 0; }
+$ac_kw foo_t foo (void) {return 0; }
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_inline=$ac_kw
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
test "$ac_cv_c_inline" != no && break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+printf "%s\n" "$ac_cv_c_inline" >&6; }
case $ac_cv_c_inline in
inline | yes) ;;
@@ -4569,13 +4891,12 @@ _ACEOF
esac
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
fi
@@ -4584,72 +4905,210 @@ case $ac_cv_c_uint64_t in #(
no|yes) ;; #(
*)
-$as_echo "#define _UINT64_T 1" >>confdefs.h
+printf "%s\n" "#define _UINT64_T 1" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define uint64_t $ac_cv_c_uint64_t
-_ACEOF
+printf "%s\n" "#define uint64_t $ac_cv_c_uint64_t" >>confdefs.h
;;
esac
-for ac_func in vprintf
-do :
- ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
-if test "x$ac_cv_func_vprintf" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VPRINTF 1
-_ACEOF
+ac_func=
+for ac_item in $ac_func_c_list
+do
+ if test $ac_func; then
+ ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
+ if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
+ echo "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_func=
+ else
+ ac_func=$ac_item
+ fi
+done
-ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
-if test "x$ac_cv_func__doprnt" = xyes; then :
+if test "x$ac_cv_func_vprintf" = xno
+then :
+ ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
+if test "x$ac_cv_func__doprnt" = xyes
+then :
-$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h
fi
fi
-done
+ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
+if test "x$ac_cv_func_access" = xyes
+then :
+ printf "%s\n" "#define HAVE_ACCESS 1" >>confdefs.h
+fi
+ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
+if test "x$ac_cv_func_closedir" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h
-for ac_func in access closedir fileno isatty opendir readdir stat strcasecmp strdup strlwr strtol
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_func "$LINENO" "fileno" "ac_cv_func_fileno"
+if test "x$ac_cv_func_fileno" = xyes
+then :
+ printf "%s\n" "#define HAVE_FILENO 1" >>confdefs.h
fi
-done
+ac_fn_c_check_func "$LINENO" "isatty" "ac_cv_func_isatty"
+if test "x$ac_cv_func_isatty" = xyes
+then :
+ printf "%s\n" "#define HAVE_ISATTY 1" >>confdefs.h
+fi
+ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
+if test "x$ac_cv_func_opendir" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
+if test "x$ac_cv_func_readdir" = xyes
+then :
+ printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "stat" "ac_cv_func_stat"
+if test "x$ac_cv_func_stat" = xyes
+then :
+ printf "%s\n" "#define HAVE_STAT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
+if test "x$ac_cv_func_strcasecmp" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
-ac_fn_c_check_decl "$LINENO" "stpcpy" "ac_cv_have_decl_stpcpy" "$ac_includes_default"
-if test "x$ac_cv_have_decl_stpcpy" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
fi
+ac_fn_c_check_func "$LINENO" "strlwr" "ac_cv_func_strlwr"
+if test "x$ac_cv_func_strlwr" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRLWR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
+if test "x$ac_cv_func_strtol" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
+if test ${ac_cv_c_undeclared_builtin_options+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_CFLAGS=$CFLAGS
+ ac_cv_c_undeclared_builtin_options='cannot detect'
+ for ac_arg in '' -fno-builtin; do
+ CFLAGS="$ac_save_CFLAGS $ac_arg"
+ # This test program should *not* compile successfully.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+(void) strchr;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # This test program should compile successfully.
+ # No library function is consistently available on
+ # freestanding implementations, so test against a dummy
+ # declaration. Include always-available headers on the
+ # off chance that they somehow elicit warnings.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
+
+int
+main (void)
+{
+(void) ac_decl (0, (char *) 0);
+ (void) ac_decl;
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STPCPY $ac_have_decl
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test x"$ac_arg" = x
+then :
+ ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+ ac_cv_c_undeclared_builtin_options=$ac_arg
+fi
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+ CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+ case $ac_cv_c_undeclared_builtin_options in #(
+ 'cannot detect') :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+ 'none needed') :
+ ac_c_undeclared_builtin_options='' ;; #(
+ *) :
+ ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
+
+ac_fn_check_decl "$LINENO" "stpcpy" "ac_cv_have_decl_stpcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_stpcpy" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_STPCPY $ac_have_decl" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PCRE regular expressions are enabled" >&5
-$as_echo_n "checking whether PCRE regular expressions are enabled... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pcre" >&5
-$as_echo "$enable_pcre" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether PCRE regular expressions are enabled" >&5
+printf %s "checking whether PCRE regular expressions are enabled... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pcre" >&5
+printf "%s\n" "$enable_pcre" >&6; }
if test "$enable_pcre" = "yes"; then
# Extract the first word of "pcre-config", so it can be a program name with args.
set dummy pcre-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_WITH_PCRE+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_WITH_PCRE+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$WITH_PCRE"; then
ac_cv_prog_WITH_PCRE="$WITH_PCRE" # Let the user override the test.
else
@@ -4657,11 +5116,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_WITH_PCRE="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -4673,35 +5136,310 @@ fi
fi
WITH_PCRE=$ac_cv_prog_WITH_PCRE
if test -n "$WITH_PCRE"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WITH_PCRE" >&5
-$as_echo "$WITH_PCRE" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WITH_PCRE" >&5
+printf "%s\n" "$WITH_PCRE" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "$WITH_PCRE" = "yes"; then
-$as_echo "#define HAVE_PCRE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_PCRE 1" >>confdefs.h
CFLAGS="${CFLAGS} $(pcre-config --cflags-posix)"
LDFLAGS="${LDFLAGS} $(pcre-config --libs-posix)"
else
- $as_echo "#define HAVE_PCRE 0" >>confdefs.h
+ printf "%s\n" "#define HAVE_PCRE 0" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: PCRE library not found." >&5
+printf "%s\n" "$as_me: WARNING: PCRE library not found." >&2;}
+ fi
+else
+ printf "%s\n" "#define HAVE_PCRE 0" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: PCRE regular expressions not enabled." >&5
+printf "%s\n" "$as_me: WARNING: PCRE regular expressions not enabled." >&2;}
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX extended regular expressions" >&5
+printf %s "checking for POSIX extended regular expressions... " >&6; }
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PCRE library not found." >&5
-$as_echo "$as_me: WARNING: PCRE library not found." >&2;}
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
- $as_echo "#define HAVE_PCRE 0" >>confdefs.h
+ ac_cv_path_GREP=$GREP
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PCRE regular expressions not enabled." >&5
-$as_echo "$as_me: WARNING: PCRE regular expressions not enabled." >&2;}
fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX extended regular expressions" >&5
-$as_echo_n "checking for POSIX extended regular expressions... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <regex.h>
@@ -4711,33 +5449,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
posix_ere=yes
-else
+else $as_nop
posix_ere=no
fi
-rm -f conftest*
+rm -rf conftest*
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $posix_ere" >&5
-$as_echo "$posix_ere" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $posix_ere" >&5
+printf "%s\n" "$posix_ere" >&6; }
if test "$WITH_PCRE" = "yes"; then
-$as_echo "#define HAVE_POSIX_ERE 0" >>confdefs.h
+printf "%s\n" "#define HAVE_POSIX_ERE 0" >>confdefs.h
else
if test "$enable_posixre" = "yes"; then
if test "$posix_ere" = "yes"; then
- $as_echo "#define HAVE_POSIX_ERE 1" >>confdefs.h
+ printf "%s\n" "#define HAVE_POSIX_ERE 1" >>confdefs.h
else
- $as_echo "#define HAVE_POSIX_ERE 0" >>confdefs.h
+ printf "%s\n" "#define HAVE_POSIX_ERE 0" >>confdefs.h
fi
else
- $as_echo "#define HAVE_POSIX_ERE 0" >>confdefs.h
+ printf "%s\n" "#define HAVE_POSIX_ERE 0" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Regular expressions not enabled." >&5
-$as_echo "$as_me: WARNING: Regular expressions not enabled." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Regular expressions not enabled." >&5
+printf "%s\n" "$as_me: WARNING: Regular expressions not enabled." >&2;}
fi
fi
@@ -4775,8 +5514,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -4806,15 +5545,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -4828,8 +5567,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -4846,7 +5585,7 @@ U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -4862,8 +5601,8 @@ LTLIBOBJS=$ac_ltlibobjs
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
@@ -4886,14 +5625,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -4903,46 +5644,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -4951,13 +5692,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -4966,8 +5700,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -4979,30 +5717,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD]
@@ -5015,13 +5733,14 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -5048,18 +5767,20 @@ as_fn_unset ()
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
+
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -5071,12 +5792,13 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
@@ -5107,7 +5829,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -5129,6 +5851,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -5142,6 +5868,12 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -5183,7 +5915,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -5192,7 +5924,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -5254,8 +5986,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ChkTeX $as_me 1.7.6, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+This file was extended by ChkTeX $as_me 1.7.8, which was
+generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5313,14 +6045,16 @@ $config_headers
Report bugs to the package provider."
_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-ChkTeX config.status 1.7.6
-configured by $0, generated by GNU Autoconf 2.69,
+ChkTeX config.status 1.7.8
+configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -5359,15 +6093,15 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
+ printf "%s\n" "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
+ printf "%s\n" "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
@@ -5375,7 +6109,7 @@ do
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
@@ -5384,7 +6118,7 @@ do
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
+ printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
@@ -5412,7 +6146,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
exec "\$@"
@@ -5426,7 +6160,7 @@ exec 5>>config.log
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- $as_echo "$ac_log"
+ printf "%s\n" "$ac_log"
} >&5
_ACEOF
@@ -5456,8 +6190,8 @@ done
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -5793,7 +6527,7 @@ do
esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
@@ -5801,17 +6535,17 @@ do
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
@@ -5828,7 +6562,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+printf "%s\n" X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -5852,9 +6586,9 @@ $as_echo X"$ac_file" |
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -5916,8 +6650,8 @@ ac_sed_dataroot='
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
@@ -5961,9 +6695,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
@@ -5979,20 +6713,20 @@ which seems to be undefined. Please make sure it is defined" >&2;}
#
if test x"$ac_file" != x-; then
{
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
@@ -6038,7 +6772,8 @@ if test "$no_create" != yes; then
$ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+
diff --git a/support/chktex/configure.in b/support/chktex/configure.ac
index 0508bcac25..3cb717df7f 100644
--- a/support/chktex/configure.in
+++ b/support/chktex/configure.ac
@@ -27,7 +27,7 @@ dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ChkTeX, 1.7.6)
+AC_INIT([ChkTeX],[1.7.8])
AC_SUBST(SCRIPTS)
AC_SUBST(BUILT_SCRIPTS)
AC_SUBST(CLEAN)
@@ -111,6 +111,7 @@ fi
AC_CHECK_PROGS(GROFF, 'groff -man -P-bu -Tlatin1' 'nroff -man', 'nroff -man')
+AC_PATH_PROG(PDFLATEX, pdflatex, no)
AC_PATH_PROG(LATEX, latex, no)
dnl if test "$LATEX" = no; then
dnl AC_MSG_ERROR([No LaTeX on the system, cannot find latex program.])
@@ -125,8 +126,6 @@ dnl Checks for libraries.
AC_CHECK_LIB(termlib, tgetent)
AC_CHECK_LIB(termcap, tgetent)
-dnl Checks for header files.
-AC_HEADER_STDC
AC_HEADER_DIRENT
AC_CHECK_HEADERS(limits.h stat.h strings.h stdarg.h dnl
sys/stat.h termcap.h termlib.h unistd.h)
@@ -188,6 +187,7 @@ else
fi
-AC_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
-AC_OUTPUT(Makefile deweb rmeheader ChkTeX.tex)
+AC_CONFIG_FILES([Makefile deweb rmeheader ChkTeX.tex])
+AC_OUTPUT
diff --git a/support/chktex/input/file b/support/chktex/input/file
new file mode 100644
index 0000000000..3ebbc3d6a8
--- /dev/null
+++ b/support/chktex/input/file
@@ -0,0 +1,8 @@
+% -*- TeX -*-
+% chktex-file 22
+% This file tests that file suppressions are only valid in the current file.
+
+% It also ensures that git will create the input/
+% directory. That ensures that the \input input in Test.tex is able
+% to distinguish between directories and regular files.
+% This was bug #56520.
diff --git a/support/chktex/install-sh b/support/chktex/install-sh
index 0b0fdcbba6..ec298b5374 100755
--- a/support/chktex/install-sh
+++ b/support/chktex/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2013-12-25.23; # UTC
+scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -69,6 +69,11 @@ posix_mkdir=
# Desired mode of installed file.
mode=0755
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
@@ -99,18 +104,28 @@ Options:
--version display version info and exit.
-c (ignored)
- -C install only if different (preserve the last data modification time)
+ -C install only if different (preserve data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
+ -p pass -p to $cpprog.
-s $stripprog installed files.
+ -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
@@ -137,8 +152,13 @@ while test $# -ne 0; do
-o) chowncmd="$chownprog $2"
shift;;
+ -p) cpprog="$cpprog -p";;
+
-s) stripcmd=$stripprog;;
+ -S) backupsuffix="$2"
+ shift;;
+
-t)
is_target_a_directory=always
dst_arg=$2
@@ -255,6 +275,10 @@ do
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
+ # Don't chown directories that already exist.
+ if test $dstdir_status = 0; then
+ chowncmd=""
+ fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -271,15 +295,18 @@ do
fi
dst=$dst_arg
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
+ # If destination is a directory, append the input filename.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
- dst=$dstdir/`basename "$src"`
+ dstbase=`basename "$src"`
+ case $dst in
+ */) dst=$dst$dstbase;;
+ *) dst=$dst/$dstbase;;
+ esac
dstdir_status=0
else
dstdir=`dirname "$dst"`
@@ -288,27 +315,16 @@ do
fi
fi
+ case $dstdir in
+ */) dstdirslash=$dstdir;;
+ *) dstdirslash=$dstdir/;;
+ esac
+
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
@@ -318,43 +334,49 @@ do
fi
posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ # The $RANDOM variable is not portable (e.g., dash). Use it
+ # here however when possible just to lower collision chance.
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+ trap '
+ ret=$?
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+ exit $ret
+ ' 0
+
+ # Because "mkdir -p" follows existing symlinks and we likely work
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directory is successfully created first before we actually test
+ # 'mkdir -p'.
+ if (umask $mkdir_umask &&
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ fi
+ trap '' 0;;
esac
if
@@ -365,7 +387,7 @@ do
then :
else
- # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
@@ -394,7 +416,7 @@ do
prefixes=
else
if $posix_mkdir; then
- (umask=$mkdir_umask &&
+ (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
@@ -427,14 +449,25 @@ do
else
# Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
+ dsttmp=${dstdirslash}_inst.$$_
+ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+ (umask $cp_umask &&
+ { test -z "$stripcmd" || {
+ # Create $dsttmp read-write so that cp doesn't create it read-only,
+ # which would cause strip to fail.
+ if test -z "$doit"; then
+ : >"$dsttmp" # No need to fork-exec 'touch'.
+ else
+ $doit touch "$dsttmp"
+ fi
+ }
+ } &&
+ $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -460,6 +493,13 @@ do
then
rm -f "$dsttmp"
else
+ # If $backupsuffix is set, and the file being installed
+ # already exists, attempt a backup. Don't worry if it fails,
+ # e.g., if mv doesn't support -f.
+ if test -n "$backupsuffix" && test -f "$dst"; then
+ $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+ fi
+
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@@ -474,9 +514,9 @@ do
# file should still install successfully.
{
test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
+ $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
@@ -493,9 +533,9 @@ do
done
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/support/chktex/m4/ax_append_flag.m4 b/support/chktex/m4/ax_append_flag.m4
new file mode 100644
index 0000000000..dd6d8b6140
--- /dev/null
+++ b/support/chktex/m4/ax_append_flag.m4
@@ -0,0 +1,50 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
+#
+# DESCRIPTION
+#
+# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
+# added in between.
+#
+# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
+# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
+# FLAG.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 8
+
+AC_DEFUN([AX_APPEND_FLAG],
+[dnl
+AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
+AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
+AS_VAR_SET_IF(FLAGS,[
+ AS_CASE([" AS_VAR_GET(FLAGS) "],
+ [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
+ [
+ AS_VAR_APPEND(FLAGS,[" $1"])
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
+ ],
+ [
+ AS_VAR_SET(FLAGS,[$1])
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
+AS_VAR_POPDEF([FLAGS])dnl
+])dnl AX_APPEND_FLAG
diff --git a/support/chktex/m4/ax_cflags_strict_prototypes.m4 b/support/chktex/m4/ax_cflags_strict_prototypes.m4
index 06ec9e2f27..1a910cfa98 100644
--- a/support/chktex/m4/ax_cflags_strict_prototypes.m4
+++ b/support/chktex/m4/ax_cflags_strict_prototypes.m4
@@ -1,6 +1,6 @@
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_cflags_strict_prototypes.html
-# ===========================================================================
+# ================================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_cflags_strict_prototypes.html
+# ================================================================================
#
# SYNOPSIS
#
@@ -26,145 +26,72 @@
# - $3 action-if-found : add value to shellvariable
# - $4 action-if-not-found : nothing
#
-# LAST MODIFICATION
+# NOTE: These macros depend on AX_APPEND_FLAG.
#
-# 2008-04-12
-#
-# COPYLEFT
+# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Macro Archive. When you make and
-# distribute a modified version of the Autoconf Macro, you may extend this
-# special exception to the GPL to apply to your modified version as well.
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
-AC_DEFUN([AX_CFLAGS_STRICT_PROTOTYPES],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_strict_prototypes])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_C
- ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-pedantic % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
- "-pedantic % -Wstrict-prototypes" dnl try to warn atleast
- "-pedantic % -Wmissing-prototypes" dnl or another warning
- "-pedantic % -Werror-implicit-function-declaration" dnl
- "-pedantic % -Wimplicit-function-declaration" dnl
- #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
-case ".$VAR" in
- .|.no|.no,*) ;;
- *) # sanity check with signal() from sys/signal.h
- cp config.log config.tmp
- AC_TRY_COMPILE([#include <signal.h>],[
- if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
- if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
- dnl the original did use test -n `$CC testprogram.c`
- [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
-then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
-then VAR="no, suppressed, signal.h," ; fi ; fi],
- [VAR="no, suppressed, signal.h"])
- rm config.tmp
- ;;
-esac
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
- .ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
- AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
-])
+#serial 18
-dnl the only difference - the LANG selection... and the default FLAGS
-
-AC_DEFUN([AX_CXXFLAGS_STRICT_PROTOTYPES],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_strict_prototypes])dnl
+AC_DEFUN([AX_FLAGS_STRICT_PROTOTYPES],[dnl
+AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_[]_AC_LANG_ABBREV[]flags_strict_prototypes])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes],
VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- ac_save_[]FLAGS="$[]FLAGS"
+ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic -Werror % -fstrict-prototypes -Wstrict-prototypes" dnl GCC
- "-pedantic -Werror % -Wstrict-prototypes" dnl try to warn atleast
- "-pedantic -Werror % -Wmissing-prototypes" dnl try to warn atleast
+ "-pedantic -Werror % -Wstrict-prototypes" dnl try to warn at least
+ "-pedantic -Werror % -Wmissing-prototypes" dnl try to warn at least
"-pedantic -Werror % -Werror-implicit-function-declaration" dnl
"-pedantic -Werror % -Wimplicit-function-declaration" dnl
- "-pedantic % -Wstrict-prototypes %% no, unsupported in C++" dnl oops
+ "-pedantic % -Wstrict-prototypes %% no, unsupported" dnl oops
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- AC_TRY_COMPILE([],[return 0;],
- [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[return 0;]])],
+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break], [])
done
case ".$VAR" in
.|.no|.no,*) ;;
*) # sanity check with signal() from sys/signal.h
cp config.log config.tmp
- AC_TRY_COMPILE([#include <signal.h>],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]], [[
if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1;
- if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;],
- dnl the original did use test -n `$CC testprogram.c`
- [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
+ if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;]])],
+ [dnl the original did use test -n `$CC testprogram.c`
+ if test `diff config.log config.tmp | grep -i warning | wc -l` != 0
then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1
then VAR="no, suppressed, signal.h," ; fi ; fi],
[VAR="no, suppressed, signal.h"])
rm config.tmp
;;
esac
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
+FLAGS="$ac_save_[]FLAGS"
])
+AS_VAR_POPDEF([FLAGS])dnl
+AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
- .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
- AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
- *) m4_ifvaln($3,$3,[
- if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
- then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
- else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
- m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
- fi ]) ;;
+ .|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;
+ *) m4_default($3,[AX_APPEND_FLAG([$VAR], [$1])]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
+])dnl AX_FLAGS_STRICT_PROTOTYPES
+
+AC_DEFUN([AX_CFLAGS_STRICT_PROTOTYPES],[dnl
+AC_LANG_PUSH([C])
+AX_FLAGS_STRICT_PROTOTYPES([$1], [$2], [$3], [$4])
+AC_LANG_POP([C])
+])
+
+AC_DEFUN([AX_CXXFLAGS_STRICT_PROTOTYPES],[dnl
+AC_LANG_PUSH([C++])
+AX_FLAGS_STRICT_PROTOTYPES([$1], [$2], [$3], [$4])
+AC_LANG_POP([C++])
])
diff --git a/support/chktex/m4/ax_require_defined.m4 b/support/chktex/m4/ax_require_defined.m4
new file mode 100644
index 0000000000..17c3eab7da
--- /dev/null
+++ b/support/chktex/m4/ax_require_defined.m4
@@ -0,0 +1,37 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_REQUIRE_DEFINED(MACRO)
+#
+# DESCRIPTION
+#
+# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
+# been defined and thus are available for use. This avoids random issues
+# where a macro isn't expanded. Instead the configure script emits a
+# non-fatal:
+#
+# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
+#
+# It's like AC_REQUIRE except it doesn't expand the required macro.
+#
+# Here's an example:
+#
+# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
+#
+# LICENSE
+#
+# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 2
+
+AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
+ m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
+])dnl AX_REQUIRE_DEFINED
diff --git a/support/chktex/tests/main.expected b/support/chktex/tests/main.expected
new file mode 100644
index 0000000000..5cf8374c47
--- /dev/null
+++ b/support/chktex/tests/main.expected
@@ -0,0 +1,27 @@
+Message 22 in main.tex: Comment displayed.
+%% main.tex
+^
+Message 22 in sub1/file.tex: Comment displayed.
+%% comment1
+^
+Message 22 in sub1/subsub/subsubfile.tex: Comment displayed.
+%% subsubcomment
+^
+Message 22 in sub1/file.tex: Comment displayed.
+%% comment2
+^
+Message 22 in sub1/subsub/subsubfile.tex: Comment displayed.
+%% subsubcomment
+^
+Message 22 in sub2/file1.tex: Comment displayed.
+%% comment 2.1
+^
+Message 22 in sub2/file2.tex: Comment displayed.
+%% comment 2.2
+^
+Message 22 in sub2/file1.tex: Comment displayed.
+%% comment 2.1 cont.
+^
+Message 22 in sub2/file2.tex: Comment displayed.
+%% comment 2.2
+^
diff --git a/support/chktex/tests/main.tex b/support/chktex/tests/main.tex
new file mode 100644
index 0000000000..027c5a9e27
--- /dev/null
+++ b/support/chktex/tests/main.tex
@@ -0,0 +1,14 @@
+\documentclass{article}
+
+%% main.tex
+\begin{document}
+
+\input{sub1/file.tex}
+
+\input{sub1/subsub/subsubfile.tex}
+
+\input{sub2/file1.tex}
+
+\input{sub2/file2.tex}
+
+\end{document}
diff --git a/support/chktex/tests/run-tests.sh b/support/chktex/tests/run-tests.sh
new file mode 100755
index 0000000000..8d0b4aae1b
--- /dev/null
+++ b/support/chktex/tests/run-tests.sh
@@ -0,0 +1,137 @@
+#!/bin/dash
+# -- remember to change this to sh
+
+set -e
+
+usage() {
+ echo "$0 BUILDDIR SRCDIR"
+}
+
+if [ "x$1" = x ] || [ "x$2" = x ]; then
+ usage
+ exit 1
+fi
+
+builddir="$(cd $1; pwd)"
+srcdir="$(cd $2; pwd)"
+
+testsdir="$srcdir/tests"
+output="$testsdir/main.out"
+expected="$testsdir/main.expected"
+
+check_results() {
+ sed -i -e 's~Message 22 in .*tests/~Message 22 in ~;' "$output"
+ if cmp -s "$expected" "$output"; then
+ echo ">>> OK!"
+ rm -f "$output"
+ return 0
+ else
+ echo "***WARNING***";
+ echo "Unexpected test output";
+ diff -u "$expected" "$output";
+ return 1
+ fi
+}
+
+
+# We don't check in the test files because CTAN can't handle files
+# with the same names, and we need several that are named chktexrc.
+# Also, they don't like invisible files (start with '.') so we
+# generate those as well.
+echo ">>> Generating test files..."
+mkdir -p $testsdir/sub
+cat > $testsdir/sub/chktexrc <<EOF
+OutFormat
+{
+"loaded chktex/tests/sub %f!n"
+}
+EOF
+
+mkdir -p $testsdir/sub1/.config
+cat > $testsdir/sub1/.config/chktexrc <<EOF
+OutFormat
+{
+"loaded chktex/tests/sub1/.config/chktexrc %f!n"
+}
+EOF
+
+cat > $testsdir/sub2/.chktexrc <<EOF
+OutFormat
+{
+"loaded chktex/tests/sub2/.chktexrc %f!n"
+}
+EOF
+
+# Run the actual tests for inclusion
+echo ">>> Testing that inclusion works correctly..."
+# absolute path
+rm -f "$output"
+${builddir}/chktex -mall -r -g0 -l$srcdir/chktexrc -v5 -q \
+ $testsdir/main.tex 2>/dev/null \
+ 1> $testsdir/main.out
+check_results
+
+# relative path
+cd "$srcdir"
+${builddir}/chktex -mall -r -g0 -l$srcdir/chktexrc -v5 -q \
+ tests/main.tex 2>/dev/null \
+ 1> tests/main.out
+check_results
+
+# file in the same directory
+cd "$testsdir"
+${builddir}/chktex -mall -r -g0 -l$srcdir/chktexrc -v5 -q \
+ main.tex 2>/dev/null \
+ 1> main.out
+check_results
+
+echo ">>> Testing that correct chktexrc files are loaded"
+# XDG variables
+unset HOME
+echo '%' \
+ | XDG_CONFIG_HOME=${testsdir}/sub \
+ ${builddir}/chktex -mall -v0 -q \
+ | grep 'loaded chktex/tests/sub stdin' \
+ || (echo XDG_CONFIG_HOME/chktexrc inclusion failed; exit 1)
+echo '%' \
+ | HOME=${testsdir}/sub1 \
+ ${builddir}/chktex -mall -v0 -q \
+ | grep 'loaded chktex/tests/sub1/.config/chktexrc stdin' \
+ || (echo HOME/.config/chktexrc inclusion failed; exit 1)
+
+# HOME, LOGDIR
+echo '%' \
+ | HOME=${testsdir}/sub2 \
+ ${builddir}/chktex -mall -v0 -q \
+ | grep 'loaded chktex/tests/sub2/.chktexrc stdin' \
+ || (echo HOME/.chktexrc inclusion failed; exit 1)
+echo '%' \
+ | LOGDIR=${testsdir}/sub2 \
+ ${builddir}/chktex -mall -v0 -q \
+ | grep 'loaded chktex/tests/sub2/.chktexrc stdin' \
+ || (echo LOGDIR/.chktexrc inclusion failed; exit 1)
+
+# CHKTEXRC
+echo '%' \
+ | CHKTEXRC=${testsdir}/sub2 \
+ ${builddir}/chktex -mall -v0 -q \
+ | grep 'loaded chktex/tests/sub2/.chktexrc stdin' \
+ || (echo CHKTEXRC/.chktexrc inclusion failed; exit 1)
+
+# CWD
+echo '%' \
+ | (cd ${testsdir}/sub2; \
+ ${builddir}/chktex -mall -v0 -q) \
+ | grep 'loaded chktex/tests/sub2/.chktexrc stdin' \
+ || (echo PWD/.chktexrc inclusion failed; exit 1)
+
+# Not sure how to test KPSE variables...
+# TEXMFMAIN CHKTEX_CONFIG
+echo ">>> OK!"
+
+# Command line options
+echo "Checking command line RC settings..."
+(${builddir}/chktex -d 4 -STabSize=7 </dev/null 2>&1 \
+ | grep -A1 TabSize | grep -E '\t7$' >/dev/null) \
+ || (echo Setting TabSize from command line failed; exit 1)
+echo ">>> OK!"
diff --git a/support/chktex/tests/sub1/file.tex b/support/chktex/tests/sub1/file.tex
new file mode 100644
index 0000000000..00870dd841
--- /dev/null
+++ b/support/chktex/tests/sub1/file.tex
@@ -0,0 +1,8 @@
+file1
+%% comment1
+
+\input{sub1/subsub/subsubfile}
+
+%% comment2
+
+more file1
diff --git a/support/chktex/tests/sub1/subsub/subsubfile.tex b/support/chktex/tests/sub1/subsub/subsubfile.tex
new file mode 100644
index 0000000000..fc99c7a58d
--- /dev/null
+++ b/support/chktex/tests/sub1/subsub/subsubfile.tex
@@ -0,0 +1,2 @@
+%% subsubcomment
+subsubfile
diff --git a/support/chktex/tests/sub2/file1.tex b/support/chktex/tests/sub2/file1.tex
new file mode 100644
index 0000000000..3504c7c37d
--- /dev/null
+++ b/support/chktex/tests/sub2/file1.tex
@@ -0,0 +1,7 @@
+subfile 2.1
+
+%% comment 2.1
+\input{sub2/file2.tex}
+
+%% comment 2.1 cont.
+more subfile 2.1
diff --git a/support/chktex/tests/sub2/file2.tex b/support/chktex/tests/sub2/file2.tex
new file mode 100644
index 0000000000..c270ff6372
--- /dev/null
+++ b/support/chktex/tests/sub2/file2.tex
@@ -0,0 +1,2 @@
+%% comment 2.2
+subfile 2.2
diff --git a/support/sty2dtx/README b/support/sty2dtx/README.txt
index 96bed0f02c..6b5d1a6922 100644
--- a/support/sty2dtx/README
+++ b/support/sty2dtx/README.txt
@@ -2,10 +2,17 @@ NAME
sty2dtx -- Converts a LaTeX .sty file to a documented .dtx file
VERSION
- Version: v2.3
+ Version: v2.4 - 2022/10/18
+
+LINKS
+ CTAN: https://ctan.org/pkg/sty2dtx
+
+ Repository: https://github.com/MartinScharrer/sty2dtx
+
+ Issues: https://github.com/MartinScharrer/sty2dtx/issues
COPYRIGHT
- Copyright (c) 2010-2012 Martin Scharrer <martin@scharrer-online.de>
+ Copyright (c) 2010-2022 Martin Scharrer <martin.scharrer@web.de>
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -18,7 +25,7 @@ COPYRIGHT
Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program. If not, see <http://www.gnu.org/licenses/>.
+ with this program. If not, see <https://www.gnu.org/licenses/>.
DESCRIPTION
Converts a .sty file (LaTeX package) to .dtx format (documented LaTeX
@@ -149,7 +156,7 @@ Examples
AUTHOR
Martin Scharrer
- E-mail: martin@scharrer-online.de
+ E-mail: martin.scharrer@web.de
WWW: <http://www.scharrer-online.de>
diff --git a/support/sty2dtx/sty2dtx.1 b/support/sty2dtx/sty2dtx.1
index 692dad8320..e63d5e3e41 100644
--- a/support/sty2dtx/sty2dtx.1
+++ b/support/sty2dtx/sty2dtx.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
+.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -38,27 +38,36 @@
. ds PI \(*p
. ds L" ``
. ds R" ''
+. ds C`
+. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
-.ie \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
..
-. nr % 0
-. rr F
-.\}
-.el \{\
-. de IX
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+. if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
..
+. if !\nF==2 \{\
+. nr % 0
+. nr F 2
+. \}
+. \}
.\}
+.rr rF
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
@@ -124,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "STY2DTX 1"
-.TH STY2DTX 1 "2012-11-07" "perl v5.14.2" "User Contributed Perl Documentation"
+.TH STY2DTX 1 "2022-10-18" "perl v5.30.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -133,10 +142,17 @@
sty2dtx \-\- Converts a LaTeX .sty file to a documented .dtx file
.SH "VERSION"
.IX Header "VERSION"
-Version: v2.3
+Version: v2.4 \- 2022/10/18
+.SH "LINKS"
+.IX Header "LINKS"
+\&\s-1CTAN:\s0 https://ctan.org/pkg/sty2dtx
+.PP
+Repository: https://github.com/MartinScharrer/sty2dtx
+.PP
+Issues: https://github.com/MartinScharrer/sty2dtx/issues
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 2010\-2012 Martin Scharrer <martin@scharrer\-online.de>
+Copyright (c) 2010\-2022 Martin Scharrer <martin.scharrer@web.de>
.PP
This program is free software: you can redistribute it and/or modify
it under the terms of the \s-1GNU\s0 General Public License as published by
@@ -144,12 +160,12 @@ the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.PP
This program is distributed in the hope that it will be useful,
-but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of
-\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the
+but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of
+\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the
\&\s-1GNU\s0 General Public License for more details.
.PP
You should have received a copy of the \s-1GNU\s0 General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+along with this program. If not, see <https://www.gnu.org/licenses/>.
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Converts a .sty file (LaTeX package) to .dtx format (documented LaTeX source),
@@ -204,7 +220,7 @@ a '\f(CW\*(C`}\*(C'\fR' on its own on a line.
.SS "Files"
.IX Subsection "Files"
.IP "\(bu" 2
-can be '\f(CW\*(C`\-\*(C'\fR' for \s-1STDIN\s0 or \s-1STDOUT\s0, which is the default if no files are given
+can be '\f(CW\*(C`\-\*(C'\fR' for \s-1STDIN\s0 or \s-1STDOUT,\s0 which is the default if no files are given
.IP "\(bu" 2
multiple input files are merged to one output file
.SS "Variables"
@@ -335,6 +351,6 @@ Produce \s-1DTX\s0 file for a class:
.IX Header "AUTHOR"
Martin Scharrer
.PP
-E\-mail: martin@scharrer\-online.de
+E\-mail: martin.scharrer@web.de
.PP
-\&\s-1WWW:\s0 http://www.scharrer\-online.de <http://www.scharrer-online.de>
+\&\s-1WWW:\s0 <http://www.scharrer\-online.de>
diff --git a/support/sty2dtx/sty2dtx.pdf b/support/sty2dtx/sty2dtx.pdf
index 57ecc28b3b..14610279ea 100644
--- a/support/sty2dtx/sty2dtx.pdf
+++ b/support/sty2dtx/sty2dtx.pdf
Binary files differ
diff --git a/support/sty2dtx/sty2dtx.pl b/support/sty2dtx/sty2dtx.pl
index e68b667141..7feb7951ba 100755
--- a/support/sty2dtx/sty2dtx.pl
+++ b/support/sty2dtx/sty2dtx.pl
@@ -9,11 +9,19 @@ sty2dtx -- Converts a LaTeX .sty file to a documented .dtx file
=head1 VERSION
-Version: v2.3
+Version: v2.4 - 2022/10/18
+
+=head1 LINKS
+
+CTAN: https://ctan.org/pkg/sty2dtx
+
+Repository: https://github.com/MartinScharrer/sty2dtx
+
+Issues: https://github.com/MartinScharrer/sty2dtx/issues
=head1 COPYRIGHT
-Copyright (c) 2010-2012 Martin Scharrer <martin@scharrer-online.de>
+Copyright (c) 2010-2022 Martin Scharrer <martin.scharrer@web.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,7 +34,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+along with this program. If not, see <https://www.gnu.org/licenses/>.
=head1 DESCRIPTION
@@ -220,7 +228,7 @@ Produce DTX file for a class:
Martin Scharrer
-E-mail: L<martin@scharrer-online.de>
+E-mail: L<martin.scharrer@web.de>
WWW: L<http://www.scharrer-online.de>
@@ -229,7 +237,7 @@ WWW: L<http://www.scharrer-online.de>
################################################################################
use Pod::Usage;
-my $VERSION = "v2.3";
+my $VERSION = "v2.4";
$VERSION =~ tr/-/\//;
my $TITLE = << "EOT";
@@ -329,11 +337,11 @@ my $rmacrodef = qr/
)
\\(
[gex]?def \s* \\ # TeX definitions
- | (?:new|renew|provide)command\s* \*? \s* {? \s* \\ # LaTeX definitions
- | \@namedef{? # Definition by name only
+ | (?:new|renew|provide)command\s* \*? \s* \{? \s* \\ # LaTeX definitions
+ | \@namedef\{? # Definition by name only
)
($rmacroname) # Macro name without backslash
- \s* }? # Potential closing brace
+ \s* \}? # Potential closing brace
(.*) # Rest of line
/xms;
@@ -342,19 +350,19 @@ my $rkeydef = qr/
\\
(define\@[a-z]*key)
\s*
- {([^}]+)} # Key family
+ \{([^}]+)\} # Key family
\s*
- {([^}]+)} # Key name
+ \{([^}]+)\} # Key name
(.*) # Rest of line
/xms;
my $renvdef = qr/
^ # Begin of line (no whitespaces!)
\\(
- (?:new|renew|provide)environment\s* { \s* # LaTeX definitions
+ (?:new|renew|provide)environment\s* \{ \s* # LaTeX definitions
)
($renvname) # Environment names follow same rules as macro names
- \s* } # closing brace
+ \s* \} # closing brace
(.*) # Rest of line
/xms;
@@ -378,6 +386,7 @@ sub close_environment {
}
my ( $mday, $mon, $year ) = ( localtime(time) )[ 3 .. 5 ];
+$mday = sprintf( "%02d", $mday );
$mon = sprintf( "%02d", $mon + 1 );
$year += 1900;
@@ -748,7 +757,7 @@ while (<>) {
# Real comments are either: 1) starting with a '%' at SOL or 2) are followed
# by at least one whitespace. This exclude (most) commented out code.
elsif (/^%|^\s*%\s/) {
- if (!$removeenvs || !/^%\s+\\(?:begin|end){(?:macro|environment|macrocode|key)}/) {
+ if (!$removeenvs || !/^%\s+\\(?:begin|end)\{(?:macro|environment|macrocode|key)\}/) {
$_ =~ s/^\s*//;
if ($comments || !/^%\s*$/){
$comments .= $_;