diff -Nru chktex-1.7.6/aclocal.m4 chktex-1.7.8/aclocal.m4 --- chktex-1.7.6/aclocal.m4 2016-09-10 04:47:17.000000000 +0000 +++ chktex-1.7.8/aclocal.m4 2022-10-18 00:18:36.000000000 +0000 @@ -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 -Nru chktex-1.7.6/ChkTeX.c chktex-1.7.8/ChkTeX.c --- chktex-1.7.6/ChkTeX.c 2016-02-02 05:29:16.000000000 +0000 +++ chktex-1.7.8/ChkTeX.c 2022-10-18 00:17:58.000000000 +0000 @@ -46,15 +46,13 @@ 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 @@ */ -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 @@ " -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 @@ " -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 @@ " -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 @@ "----------------------------------------------------------------------\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 @@ 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 @@ Diff = MaxDiff+1; if ( !HasExpandedTooLong ) { - PrintPrgErr(pmTabExpands, BUFSIZ); + PrintPrgErr(pmTabExpands, BUFFER_SIZE); } HasExpandedTooLong = 1; } @@ -335,6 +348,19 @@ 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 @@ RESOURCE_INFO - while (SetupVars()) - ReadRC(ConfigFile); + ReadRcFiles(); if (CmdLine.Stack.Used) { @@ -432,6 +457,22 @@ 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 @@ if (CurArg < argc) filename = argv[CurArg++]; + AddDirectoryFromRelativeFile(filename,&TeXInputs); if (!PushFileName(filename, &InputStack)) break; } @@ -481,7 +523,7 @@ while (!ferror(OutputFile) && StkTop(&InputStack) && !ferror(CurStkFile(&InputStack)) - && FGetsStk(ReadBuffer, BUFSIZ - 1, + && FGetsStk(ReadBuffer, BUFFER_SIZE - 1, &InputStack)) { @@ -489,7 +531,8 @@ 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 @@ if (DebugLevel & (FLG_DbgListInfo | FLG_DbgListCont)) { + ShowWL("ConfigFilesRead", &ConfigFiles); RESOURCE_INFO } @@ -797,6 +841,7 @@ {"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 @@ 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 @@ nextc = 0; switch (c) { + case 'S': + ReadRCFromCmdLine(optarg); + break; + case 's': if (!(Delimit = strdup(optarg))) { diff -Nru chktex-1.7.6/ChkTeX.h chktex-1.7.8/ChkTeX.h --- chktex-1.7.6/ChkTeX.h 2016-09-10 04:22:18.000000000 +0000 +++ chktex-1.7.8/ChkTeX.h 2022-10-18 00:17:58.000000000 +0000 @@ -233,7 +233,7 @@ 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 @@ 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 @@ 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 @@ 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, ...); Binary files /tmp/tmpnd1ne7gz/5M098zjb2u/chktex-1.7.6/ChkTeX.pdf and /tmp/tmpnd1ne7gz/TJ2KWBYNFU/chktex-1.7.8/ChkTeX.pdf differ diff -Nru chktex-1.7.6/chktexrc chktex-1.7.8/chktexrc --- chktex-1.7.6/chktexrc 2016-02-03 05:20:25.000000000 +0000 +++ chktex-1.7.8/chktexrc 1970-01-01 00:00:00.000000000 +0000 @@ -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: -## - -##################################################################### -# -# 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, . -# - -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 -Nru chktex-1.7.6/chktexrc.in chktex-1.7.8/chktexrc.in --- chktex-1.7.6/chktexrc.in 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/chktexrc.in 2022-10-18 00:17:58.000000000 +0000 @@ -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, . +# +### \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 -Nru chktex-1.7.6/ChkTeX.tex.in chktex-1.7.8/ChkTeX.tex.in --- chktex-1.7.6/ChkTeX.tex.in 2016-02-03 05:18:36.000000000 +0000 +++ chktex-1.7.8/ChkTeX.tex.in 2022-10-18 00:17:58.000000000 +0000 @@ -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 @@ \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 @@ \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 @@ 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 @@ \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 @@ 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 @@ \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 @@ \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 @@ \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 @@ \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 @@ \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 @@ \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 @@ \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 @@ "'" (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 @@ \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 @@ 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 @@ \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 @@ \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 -Nru chktex-1.7.6/config.h.in chktex-1.7.8/config.h.in --- chktex-1.7.6/config.h.in 2013-03-30 22:06:00.000000000 +0000 +++ chktex-1.7.8/config.h.in 2022-10-18 00:17:58.000000000 +0000 @@ -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 header file. */ #undef HAVE_LIMITS_H -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H @@ -65,6 +62,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the 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 -Nru chktex-1.7.6/configure chktex-1.7.8/configure --- chktex-1.7.6/configure 2016-09-10 04:47:18.000000000 +0000 +++ chktex-1.7.8/configure 2022-10-18 00:18:38.000000000 +0000 @@ -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 @@ 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&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 @@ 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 @@ 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 @@ 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 @@ 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_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 @@ 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 @@ 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_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -308,6 +310,14 @@ 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_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 @@ 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 @@ # 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 @@ # 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_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_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 @@ 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 @@ 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 @@ 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 @@ # 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 -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include +#include +#ifdef HAVE_STDIO_H +# include #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #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 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -739,6 +769,7 @@ 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 @@ *) 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 @@ 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 @@ 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 @@ | -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 @@ 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 @@ 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 @@ *) # 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 @@ 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 @@ 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 @@ 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 @@ # 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 @@ --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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ } # 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ /* 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 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 @@ 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 @@ 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 declares $2. @@ -1821,16 +1706,9 @@ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $2 (); below. */ +#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -1848,47 +1726,51 @@ #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 @@ 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 @@ 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 @@ | -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 @@ # 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 @@ 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 @@ ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2074,14 +2023,14 @@ 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 @@ 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 @@ 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 @@ # 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,61 +2120,477 @@ # 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 -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - 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;} - 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;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. +# 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 +#include +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 +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 +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { 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) + { 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=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. 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 @@ 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 @@ 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 @@ 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 @@ 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 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 @@ 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 @@ 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 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 @@ 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 -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 @@ 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 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 @@ 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 @@ 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 @@ # 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 @@ 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 @@ 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 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 @@ 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 @@ 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 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 @@ 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 @@ 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 @@ /* end confdefs.h. */ int -main () +main (void) { ; @@ -2693,9 +3192,9 @@ # 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 @@ *) 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 @@ # 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 @@ 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 @@ * ) 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 @@ /* end confdefs.h. */ #include int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -2833,8 +3335,8 @@ 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 @@ *) 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 @@ *) 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 @@ *) 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 @@ 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 @@ 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 @@ /* 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 @@ 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 -#include -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_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 @@ /* end confdefs.h. */ #include int -main () +main (void) { if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1; @@ -3188,49 +3751,70 @@ 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=$? + 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=$? - $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; } - 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 @@ 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 <&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 @@ # 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 @@ # 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 @@ 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 @@ 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 @@ 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_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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ /* 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,467 +4487,148 @@ /* 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 to if __STDC__ is defined, since - # 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. +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + 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. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error +#include +#include <$ac_hdr> + +int +main (void) +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_ac_Header=yes" +else $as_nop + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$as_ac_Header + { 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 `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue +ac_header_dirent=$ac_hdr; break 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 +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { 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. */ -#include + +/* 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. */ +char opendir (); +int +main (void) +{ +return opendir (); + ; + return 0; +} _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break +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 : + ac_cv_search_opendir=$ac_res 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 : +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_opendir+y} +then : break fi +done +if test ${ac_cv_search_opendir+y} +then : - done - ac_cv_prog_CPP=$CPP - +else $as_nop + ac_cv_search_opendir=no fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS 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 to if __STDC__ is defined, since - # 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 -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +{ 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 : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -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 -_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 -#include -#include -#include - -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 - -_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 - -_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 -#include -#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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" -else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext 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 : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -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,150 +4636,144 @@ /* 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 '' 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 -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 - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi -/* 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 () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" +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_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" + ac_header=$ac_item fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_opendir+:} false; then : - break -fi done -if ${ac_cv_search_opendir+:} false; then : -else - 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; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + + + + + + +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 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 -# 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 +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 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 -done +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 +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 -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" "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 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 -done +fi -{ $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 +{ 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 @@ /* 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 @@ 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 @@ 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 @@ 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 @@ 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 +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 +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 + +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 +#include +#include +#include +extern void ac_decl (int, char *); + +int +main (void) +{ +(void) ac_decl (0, (char *) 0); + (void) ac_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 -done + 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_c_check_decl "$LINENO" "stpcpy" "ac_cv_have_decl_stpcpy" "$ac_includes_default" -if test "x$ac_cv_have_decl_stpcpy" = xyes; then : +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 +else $as_nop ac_have_decl=0 fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STPCPY $ac_have_decl -_ACEOF +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 @@ 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 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 + 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 +_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 + 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 +_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 + + $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 +{ 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 - { $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_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 - $as_echo "#define HAVE_PCRE 0" >>confdefs.h + ac_cv_path_EGREP=$EGREP +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 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 @@ -4711,33 +5449,34 @@ _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 @@ 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 @@ /^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 @@ 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 @@ 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 @@ 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 @@ # 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 @@ 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&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 @@ 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 @@ 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 @@ 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_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 @@ { 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 @@ # 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_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_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 @@ 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_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 @@ 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 @@ # 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 @@ 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 @@ -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 @@ --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 @@ 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 @@ 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 @@ 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 @@ # 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 @@ 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 @@ # 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 @@ 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 @@ 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 @@ 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 @@ { 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 @@ # 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 @@ $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 -Nru chktex-1.7.6/configure.ac chktex-1.7.8/configure.ac --- chktex-1.7.6/configure.ac 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/configure.ac 2022-10-18 00:17:58.000000000 +0000 @@ -0,0 +1,193 @@ +dnl +dnl ChkTeX, configuration file. +dnl Copyright (C) 1995-96 Jens T. Berger Thielemann +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +dnl +dnl Contact the author at: +dnl Jens Berger +dnl Spektrumvn. 4 +dnl N-0666 Oslo +dnl Norway +dnl E-mail: +dnl +dnl + + +dnl Process this file with autoconf to produce a configure script. +AC_INIT([ChkTeX],[1.7.8]) +AC_SUBST(SCRIPTS) +AC_SUBST(BUILT_SCRIPTS) +AC_SUBST(CLEAN) +CLEAN= + +AC_ARG_ENABLE(pcre,[ + --enable-pcre: Use PCRE to allow regular expressions in + user warnings. (Default: yes, if available).],, +enable_pcre=yes) + +AC_ARG_ENABLE(posixre,[ + --enable-posixre: Use POSIX extended regular expressions in + user warnings. (Default: yes, unless using PCRE).],, +enable_posixre=yes) + +AC_ARG_ENABLE(lacheck-replace,[ + --enable-lacheck-replace: Installs a lacheck replacement. (Default: no).],, +enable_lacheck_replace=no) + +AC_ARG_ENABLE(debug-info,[ + --enable-debug-info: Compile in miscellaneous runtime debugging + information. (Default: yes).],, +enable_debug_info=yes) + +AC_ARG_ENABLE(coverage-testing,[ + --enable-coverage-testing: Activate coverage testing with gcov. (Default: no)],, +enable_coverage_testing=no) + +AC_MSG_CHECKING(whether lacheck replacement should be installed) +if test "$enable_lacheck_replace" = "yes"; then + SCRIPTS="$SCRIPTS lacheck" + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(whether runtime debug info should be used) +if test "$enable_debug_info" = "yes"; then + AC_MSG_RESULT(yes) +else + AC_DEFINE(STRIP_DEBUG, 1, Strip debug info) + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(whether coverage testing is enabled) +if test "$enable_coverage_testing" = "yes"; then + AC_MSG_RESULT(yes) + CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage -O0" + CLEAN="${CLEAN} \$(wildcard *.bb *.bbg *.da *.gcov)" +else + AC_MSG_RESULT(no) +fi + + +dnl Check compiler and flags +AC_PROG_CC +AX_CFLAGS_STRICT_PROTOTYPES +VL_PROG_CC_WARNINGS + +dnl Checks for programs. +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MKDIR_P +AC_PATH_PROGS(PERL5, perl5 perl, no, $PATH:/usr/bin:/usr/local/bin) +if test "$PERL5" != no; then + AC_MSG_CHECKING(whether perl is v5 or higher) + if $PERL5 -e 'exit($] >= 5)'; then + PERL5=no + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi +fi + +if test "$PERL5" != no; then + BUILT_SCRIPTS="$BUILT_SCRIPTS deweb" + SCRIPTS="$SCRIPTS chkweb" +else + AC_MSG_WARN(chkweb will not be installed since you do not have perl5.) +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.]) +dnl fi + +AC_PATH_PROG(DVIPS, dvips) + +AC_PATH_PROG(LYNX, lynx) +AC_PATH_PROG(LATEX2HTML, latex2html) + +dnl Checks for libraries. +AC_CHECK_LIB(termlib, tgetent) +AC_CHECK_LIB(termcap, tgetent) + +AC_HEADER_DIRENT +AC_CHECK_HEADERS(limits.h stat.h strings.h stdarg.h dnl +sys/stat.h termcap.h termlib.h unistd.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_TYPE_SIZE_T +AC_TYPE_UINT64_T + +dnl Checks for library functions. +AC_FUNC_VPRINTF +AC_CHECK_FUNCS(access closedir fileno isatty opendir readdir stat dnl +strcasecmp strdup strlwr strtol) + +dnl Checks for declarations. +AC_CHECK_DECLS([stpcpy]) + +dnl Check for PCRE regular expression support +AC_MSG_CHECKING(whether PCRE regular expressions are enabled) +AC_MSG_RESULT($enable_pcre) +if test "$enable_pcre" = "yes"; then + AC_CHECK_PROG(WITH_PCRE, pcre-config, yes, no) + if test "$WITH_PCRE" = "yes"; then + AC_DEFINE(HAVE_PCRE, 1, Whether PCRE can be used for user warnings.) + CFLAGS="${CFLAGS} $(pcre-config --cflags-posix)" + LDFLAGS="${LDFLAGS} $(pcre-config --libs-posix)" + else + AC_DEFINE(HAVE_PCRE, 0) + AC_MSG_WARN(PCRE library not found.) + fi +else + AC_DEFINE(HAVE_PCRE, 0) + AC_MSG_WARN(PCRE regular expressions not enabled.) +fi + +dnl Check for POSIX extended regular expression support +AC_MSG_CHECKING(for POSIX extended regular expressions) +AC_EGREP_CPP([yes], + [#include + #ifdef REG_EXTENDED + yes + # endif + ], posix_ere=yes, posix_ere=no) +AC_MSG_RESULT($posix_ere) +if test "$WITH_PCRE" = "yes"; then + AC_DEFINE(HAVE_POSIX_ERE, 0, Whether POSIX ERE can be used for user warnings.) +else + if test "$enable_posixre" = "yes"; then + if test "$posix_ere" = "yes"; then + AC_DEFINE(HAVE_POSIX_ERE, 1) + else + AC_DEFINE(HAVE_POSIX_ERE, 0) + fi + else + AC_DEFINE(HAVE_POSIX_ERE, 0) + AC_MSG_WARN(Regular expressions not enabled.) + fi +fi + + +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) +AC_CONFIG_FILES([Makefile deweb rmeheader ChkTeX.tex]) +AC_OUTPUT diff -Nru chktex-1.7.6/configure.in chktex-1.7.8/configure.in --- chktex-1.7.6/configure.in 2016-09-10 04:38:03.000000000 +0000 +++ chktex-1.7.8/configure.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ -dnl -dnl ChkTeX, configuration file. -dnl Copyright (C) 1995-96 Jens T. Berger Thielemann -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -dnl -dnl Contact the author at: -dnl Jens Berger -dnl Spektrumvn. 4 -dnl N-0666 Oslo -dnl Norway -dnl E-mail: -dnl -dnl - - -dnl Process this file with autoconf to produce a configure script. -AC_INIT(ChkTeX, 1.7.6) -AC_SUBST(SCRIPTS) -AC_SUBST(BUILT_SCRIPTS) -AC_SUBST(CLEAN) -CLEAN= - -AC_ARG_ENABLE(pcre,[ - --enable-pcre: Use PCRE to allow regular expressions in - user warnings. (Default: yes, if available).],, -enable_pcre=yes) - -AC_ARG_ENABLE(posixre,[ - --enable-posixre: Use POSIX extended regular expressions in - user warnings. (Default: yes, unless using PCRE).],, -enable_posixre=yes) - -AC_ARG_ENABLE(lacheck-replace,[ - --enable-lacheck-replace: Installs a lacheck replacement. (Default: no).],, -enable_lacheck_replace=no) - -AC_ARG_ENABLE(debug-info,[ - --enable-debug-info: Compile in miscellaneous runtime debugging - information. (Default: yes).],, -enable_debug_info=yes) - -AC_ARG_ENABLE(coverage-testing,[ - --enable-coverage-testing: Activate coverage testing with gcov. (Default: no)],, -enable_coverage_testing=no) - -AC_MSG_CHECKING(whether lacheck replacement should be installed) -if test "$enable_lacheck_replace" = "yes"; then - SCRIPTS="$SCRIPTS lacheck" - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(whether runtime debug info should be used) -if test "$enable_debug_info" = "yes"; then - AC_MSG_RESULT(yes) -else - AC_DEFINE(STRIP_DEBUG, 1, Strip debug info) - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(whether coverage testing is enabled) -if test "$enable_coverage_testing" = "yes"; then - AC_MSG_RESULT(yes) - CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage -O0" - CLEAN="${CLEAN} \$(wildcard *.bb *.bbg *.da *.gcov)" -else - AC_MSG_RESULT(no) -fi - - -dnl Check compiler and flags -AC_PROG_CC -AX_CFLAGS_STRICT_PROTOTYPES -VL_PROG_CC_WARNINGS - -dnl Checks for programs. -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MKDIR_P -AC_PATH_PROGS(PERL5, perl5 perl, no, $PATH:/usr/bin:/usr/local/bin) -if test "$PERL5" != no; then - AC_MSG_CHECKING(whether perl is v5 or higher) - if $PERL5 -e 'exit($] >= 5)'; then - PERL5=no - AC_MSG_RESULT(no) - else - AC_MSG_RESULT(yes) - fi -fi - -if test "$PERL5" != no; then - BUILT_SCRIPTS="$BUILT_SCRIPTS deweb" - SCRIPTS="$SCRIPTS chkweb" -else - AC_MSG_WARN(chkweb will not be installed since you do not have perl5.) -fi - -AC_CHECK_PROGS(GROFF, 'groff -man -P-bu -Tlatin1' 'nroff -man', 'nroff -man') - -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.]) -dnl fi - -AC_PATH_PROG(DVIPS, dvips) - -AC_PATH_PROG(LYNX, lynx) -AC_PATH_PROG(LATEX2HTML, latex2html) - -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) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_C_INLINE -AC_TYPE_SIZE_T -AC_TYPE_UINT64_T - -dnl Checks for library functions. -AC_FUNC_VPRINTF -AC_CHECK_FUNCS(access closedir fileno isatty opendir readdir stat dnl -strcasecmp strdup strlwr strtol) - -dnl Checks for declarations. -AC_CHECK_DECLS([stpcpy]) - -dnl Check for PCRE regular expression support -AC_MSG_CHECKING(whether PCRE regular expressions are enabled) -AC_MSG_RESULT($enable_pcre) -if test "$enable_pcre" = "yes"; then - AC_CHECK_PROG(WITH_PCRE, pcre-config, yes, no) - if test "$WITH_PCRE" = "yes"; then - AC_DEFINE(HAVE_PCRE, 1, Whether PCRE can be used for user warnings.) - CFLAGS="${CFLAGS} $(pcre-config --cflags-posix)" - LDFLAGS="${LDFLAGS} $(pcre-config --libs-posix)" - else - AC_DEFINE(HAVE_PCRE, 0) - AC_MSG_WARN(PCRE library not found.) - fi -else - AC_DEFINE(HAVE_PCRE, 0) - AC_MSG_WARN(PCRE regular expressions not enabled.) -fi - -dnl Check for POSIX extended regular expression support -AC_MSG_CHECKING(for POSIX extended regular expressions) -AC_EGREP_CPP([yes], - [#include - #ifdef REG_EXTENDED - yes - # endif - ], posix_ere=yes, posix_ere=no) -AC_MSG_RESULT($posix_ere) -if test "$WITH_PCRE" = "yes"; then - AC_DEFINE(HAVE_POSIX_ERE, 0, Whether POSIX ERE can be used for user warnings.) -else - if test "$enable_posixre" = "yes"; then - if test "$posix_ere" = "yes"; then - AC_DEFINE(HAVE_POSIX_ERE, 1) - else - AC_DEFINE(HAVE_POSIX_ERE, 0) - fi - else - AC_DEFINE(HAVE_POSIX_ERE, 0) - AC_MSG_WARN(Regular expressions not enabled.) - fi -fi - - -AC_CONFIG_HEADER(config.h) -AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) -AC_OUTPUT(Makefile deweb rmeheader ChkTeX.tex) diff -Nru chktex-1.7.6/debian/changelog chktex-1.7.8/debian/changelog --- chktex-1.7.6/debian/changelog 2022-06-22 10:23:44.000000000 +0000 +++ chktex-1.7.8/debian/changelog 2022-12-09 00:28:14.000000000 +0000 @@ -1,8 +1,15 @@ -chktex (1.7.6-5ubuntu1) kinetic; urgency=medium +chktex (1.7.8-1) unstable; urgency=medium - * Export TERM=linux to prevent FTBFS when TERM is not set + * New upstream release. + * debian/rules: export TERM to prevent FTBFS (Closes: #1013358) + thanks to Graham Inggs for the patch + * patches no longer needed and removed: + - make.patch (obsolete) + - strcpy-bug.patch (strcpy replaced by memmove) + - warning-handling-1.patch (applied upstream) + - warning-handling-2.patch (applied upstream) - -- Graham Inggs Wed, 22 Jun 2022 10:23:44 +0000 + -- Thorsten Alteholz Fri, 09 Dec 2022 01:28:14 +0100 chktex (1.7.6-5) unstable; urgency=medium diff -Nru chktex-1.7.6/debian/control chktex-1.7.8/debian/control --- chktex-1.7.6/debian/control 2022-06-22 10:05:34.000000000 +0000 +++ chktex-1.7.8/debian/control 2022-12-09 00:28:14.000000000 +0000 @@ -1,8 +1,7 @@ Source: chktex Section: tex Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Thorsten Alteholz +Maintainer: Thorsten Alteholz Build-Depends: debhelper-compat (= 13), libncurses-dev, texlive, @@ -10,7 +9,8 @@ latex2html, autoconf, libpcre2-dev, - libpcre2-posix3 + libpcre2-posix3, + less Standards-Version: 4.6.1 Homepage: https://www.nongnu.org/chktex/ Vcs-Browser: https://salsa.debian.org/alteholz/chktex diff -Nru chktex-1.7.6/debian/patches/latex2html-date.patch chktex-1.7.8/debian/patches/latex2html-date.patch --- chktex-1.7.6/debian/patches/latex2html-date.patch 2020-12-06 07:40:03.000000000 +0000 +++ chktex-1.7.8/debian/patches/latex2html-date.patch 2022-12-09 00:28:14.000000000 +0000 @@ -1,10 +1,10 @@ Author: Sascha Steinbiss Description: make build of chktex reproducible -Index: chktex/Makefile.in +Index: chktex-1.7.8/Makefile.in =================================================================== ---- chktex.orig/Makefile.in 2016-10-11 12:33:56.000000000 +0200 -+++ chktex/Makefile.in 2016-10-11 12:50:37.000000000 +0200 -@@ -212,14 +212,14 @@ +--- chktex-1.7.8.orig/Makefile.in 2022-12-09 01:28:55.091437505 +0100 ++++ chktex-1.7.8/Makefile.in 2022-12-09 01:28:55.091437505 +0100 +@@ -214,14 +214,14 @@ -rm -r HTML $(MKDIR_P) HTML $(PERL5) $(srcdir)/MakeHTML.pl ChkTeX.tex > HTML/ChkTeX.tex diff -Nru chktex-1.7.6/debian/patches/make.patch chktex-1.7.8/debian/patches/make.patch --- chktex-1.7.6/debian/patches/make.patch 2020-12-06 07:40:03.000000000 +0000 +++ chktex-1.7.8/debian/patches/make.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,7296 +0,0 @@ -Index: chktex/configure.in -=================================================================== ---- chktex.orig/configure.in 2011-09-20 13:56:29.000000000 +0200 -+++ chktex/configure.in 2011-09-20 15:38:42.000000000 +0200 -@@ -125,7 +125,7 @@ - - dnl Check compiler and flags - AC_PROG_CC --AC_PROG_CC_STRICT_PROTOTYPES -+AX_CFLAGS_STRICT_PROTOTYPES - VL_PROG_CC_WARNINGS() - - dnl Checks for programs. ---- chktex-1.6.4.orig/config.h.in -+++ chktex-1.6.4/config.h.in -@@ -114,6 +114,9 @@ - /* Define to the one symbol short name of this package. */ - #undef PACKAGE_TARNAME - -+/* Define to the home page for this package. */ -+#undef PACKAGE_URL -+ - /* Define to the version of this package. */ - #undef PACKAGE_VERSION - ---- chktex-1.6.4.orig/configure -+++ chktex-1.6.4/configure -@@ -1,60 +1,83 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.61 for ChkTeX 1.6.4. -+# Generated by GNU Autoconf 2.68 for ChkTeX 1.6.4. -+# - # - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, --# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -+# Foundation, Inc. -+# -+# - # This configure script is free software; the Free Software Foundation - # gives unlimited permission to copy, distribute and modify it. --## --------------------- ## --## M4sh Initialization. ## --## --------------------- ## -+## -------------------- ## -+## M4sh Initialization. ## -+## -------------------- ## - - # Be more Bourne compatible - DUALCASE=1; export DUALCASE # for MKS sh --if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: -- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which -+ # 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 -- case `(set -o) 2>/dev/null` in -- *posix*) set -o posix ;; -+ case `(set -o) 2>/dev/null` in #( -+ *posix*) : -+ set -o posix ;; #( -+ *) : -+ ;; - esac -- - fi - - -- -- --# PATH needs CR --# Avoid depending upon Character Ranges. --as_cr_letters='abcdefghijklmnopqrstuvwxyz' --as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' --as_cr_Letters=$as_cr_letters$as_cr_LETTERS --as_cr_digits='0123456789' --as_cr_alnum=$as_cr_Letters$as_cr_digits -- --# The user is always right. --if test "${PATH_SEPARATOR+set}" != set; then -- echo "#! /bin/sh" >conf$$.sh -- echo "exit 0" >>conf$$.sh -- chmod +x conf$$.sh -- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then -- PATH_SEPARATOR=';' -+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 -- PATH_SEPARATOR=: -+ 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 -- rm -f conf$$.sh -+ export as_echo_body -+ as_echo='sh -c $as_echo_body as_echo' - fi - --# Support unset when possible. --if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -- as_unset=unset --else -- as_unset=false -+# The user is always right. -+if test "${PATH_SEPARATOR+set}" != set; 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 || -+ PATH_SEPARATOR=';' -+ } - fi - - -@@ -63,20 +86,19 @@ fi - # 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.) --as_nl=' --' - IFS=" "" $as_nl" - - # Find who we are. Look in the path if we contain no directory separator. --case $0 in -+as_myself= -+case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - 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 --done -+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -+ done - IFS=$as_save_IFS - - ;; -@@ -87,354 +109,328 @@ if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then -- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -- { (exit 1); exit 1; } -+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -+ exit 1 - fi - --# Work around bugs in pre-3.0 UWIN ksh. --for as_var in ENV MAIL MAILPATH --do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -+# 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. --for as_var in \ -- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -- LC_TELEPHONE LC_TIME --do -- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then -- eval $as_var=C; export $as_var -- else -- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -- fi --done -- --# Required to use basename. --if expr a : '\(a\)' >/dev/null 2>&1 && -- test "X`expr 00001 : '.*\(...\)'`" = X001; then -- as_expr=expr --else -- as_expr=false --fi -- --if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then -- as_basename=basename --else -- as_basename=false --fi -- -- --# Name of the executable. --as_me=`$as_basename -- "$0" || --$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ -- X"$0" : 'X\(//\)$' \| \ -- X"$0" : 'X\(/\)' \| . 2>/dev/null || --echo X/"$0" | -- sed '/^.*\/\([^/][^/]*\)\/*$/{ -- s//\1/ -- q -- } -- /^X\/\(\/\/\)$/{ -- s//\1/ -- q -- } -- /^X\/\(\/\).*/{ -- s//\1/ -- q -- } -- s/.*/./; q'` -+LC_ALL=C -+export LC_ALL -+LANGUAGE=C -+export LANGUAGE - - # CDPATH. --$as_unset CDPATH -- -+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - if test "x$CONFIG_SHELL" = x; then -- if (eval ":") 2>/dev/null; then -- as_have_required=yes -+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (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 -- as_have_required=no -+ case \`(set -o) 2>/dev/null\` in #( -+ *posix*) : -+ set -o posix ;; #( -+ *) : -+ ;; -+esac - fi -- -- if test $as_have_required = yes && (eval ": --(as_func_return () { -- (exit \$1) --} --as_func_success () { -- as_func_return 0 --} --as_func_failure () { -- as_func_return 1 --} --as_func_ret_success () { -- return 0 --} --as_func_ret_failure () { -- return 1 --} -+" -+ as_required="as_fn_return () { (exit \$1); } -+as_fn_success () { as_fn_return 0; } -+as_fn_failure () { as_fn_return 1; } -+as_fn_ret_success () { return 0; } -+as_fn_ret_failure () { return 1; } - - exitcode=0 --if as_func_success; then -- : --else -- exitcode=1 -- echo as_func_success failed. --fi -- --if as_func_failure; then -- exitcode=1 -- echo as_func_failure succeeded. --fi -- --if as_func_ret_success; then -- : --else -- exitcode=1 -- echo as_func_ret_success failed. --fi -- --if as_func_ret_failure; then -- exitcode=1 -- echo as_func_ret_failure succeeded. --fi -- --if ( set x; as_func_ret_success y && test x = \"\$1\" ); then -- : -+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 : -+ -+else -+ exitcode=1; echo positional parameters were not saved. -+fi -+test x\$exitcode = x0 || 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 : -+ as_have_required=yes - else -- exitcode=1 -- echo positional parameters were not saved. -+ as_have_required=no - fi -+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - --test \$exitcode = 0) || { (exit 1); exit 1; } -- --( -- as_lineno_1=\$LINENO -- as_lineno_2=\$LINENO -- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && -- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } --") 2> /dev/null; then -- : - else -- as_candidate_shells= -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+ 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_found=: -+ case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do -- as_candidate_shells="$as_candidate_shells $as_dir/$as_base" -+ # Try only shells that exist, to save several forks. -+ 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 : -+ 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 : -+ break 2 -+fi -+fi - done;; - 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 - - -- for as_shell in $as_candidate_shells $SHELL; do -- # Try only shells that exist, to save several forks. -- if { test -f "$as_shell" || test -f "$as_shell.exe"; } && -- { ("$as_shell") 2> /dev/null <<\_ASEOF --if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -- emulate sh -- NULLCMD=: -- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which -- # is contrary to our usage. Disable this feature. -- alias -g '${1+"$@"}'='"$@"' -- setopt NO_GLOB_SUBST --else -- case `(set -o) 2>/dev/null` in -- *posix*) set -o posix ;; --esac -- --fi -- -- --: --_ASEOF --}; then -- CONFIG_SHELL=$as_shell -- as_have_required=yes -- if { "$as_shell" 2> /dev/null <<\_ASEOF --if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -- emulate sh -- NULLCMD=: -- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which -- # is contrary to our usage. Disable this feature. -- alias -g '${1+"$@"}'='"$@"' -- setopt NO_GLOB_SUBST --else -- case `(set -o) 2>/dev/null` in -- *posix*) set -o posix ;; --esac -- --fi -- -- --: --(as_func_return () { -- (exit $1) --} --as_func_success () { -- as_func_return 0 --} --as_func_failure () { -- as_func_return 1 --} --as_func_ret_success () { -- return 0 --} --as_func_ret_failure () { -- return 1 --} -- --exitcode=0 --if as_func_success; then -- : --else -- exitcode=1 -- echo as_func_success failed. --fi -- --if as_func_failure; then -- exitcode=1 -- echo as_func_failure succeeded. --fi -- --if as_func_ret_success; then -- : --else -- exitcode=1 -- echo as_func_ret_success failed. -+ if test "x$CONFIG_SHELL" != x; then : -+ # We cannot yet assume a decent shell, so we have to provide a -+ # neutralization value for shells without unset; and this also -+ # works around shells that cannot unset nonexistent variables. -+ # Preserve -v and -x to the replacement shell. -+ BASH_ENV=/dev/null -+ ENV=/dev/null -+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -+ export CONFIG_SHELL -+ case $- in # (((( -+ *v*x* | *x*v* ) as_opts=-vx ;; -+ *v* ) as_opts=-v ;; -+ *x* ) as_opts=-x ;; -+ * ) as_opts= ;; -+ esac -+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} - fi - --if as_func_ret_failure; then -- exitcode=1 -- echo as_func_ret_failure succeeded. -+ 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." -+ else -+ $as_echo "$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." -+ fi -+ exit 1 - fi -- --if ( set x; as_func_ret_success y && test x = "$1" ); then -- : --else -- exitcode=1 -- echo positional parameters were not saved. - fi -- --test $exitcode = 0) || { (exit 1); exit 1; } -- --( -- as_lineno_1=$LINENO -- as_lineno_2=$LINENO -- test "x$as_lineno_1" != "x$as_lineno_2" && -- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } -- --_ASEOF --}; then -- break - fi -+SHELL=${CONFIG_SHELL-/bin/sh} -+export SHELL -+# Unset more variables known to interfere with behavior of common tools. -+CLICOLOR_FORCE= GREP_OPTIONS= -+unset CLICOLOR_FORCE GREP_OPTIONS - --fi -- -- done -- -- if test "x$CONFIG_SHELL" != x; then -- for as_var in BASH_ENV ENV -- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -- done -- export CONFIG_SHELL -- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} --fi -+## --------------------- ## -+## M4sh Shell Functions. ## -+## --------------------- ## -+# as_fn_unset VAR -+# --------------- -+# Portably unset VAR. -+as_fn_unset () -+{ -+ { eval $1=; unset $1;} -+} -+as_unset=as_fn_unset - -+# as_fn_set_status STATUS -+# ----------------------- -+# Set $? to STATUS, without forking. -+as_fn_set_status () -+{ -+ return $1 -+} # as_fn_set_status - -- if test $as_have_required = no; then -- echo This script requires a shell more modern than all the -- echo shells that I found on your system. Please install a -- echo modern shell, or manually run the script under such a -- echo shell if you do have one. -- { (exit 1); exit 1; } --fi -+# as_fn_exit STATUS -+# ----------------- -+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -+as_fn_exit () -+{ -+ set +e -+ as_fn_set_status $1 -+ exit $1 -+} # as_fn_exit -+ -+# as_fn_mkdir_p -+# ------------- -+# Create "$as_dir" as a directory, including parents if necessary. -+as_fn_mkdir_p () -+{ - -+ case $as_dir in #( -+ -*) as_dir=./$as_dir;; -+ esac -+ test -d "$as_dir" || eval $as_mkdir_p || { -+ as_dirs= -+ while :; do -+ case $as_dir in #( -+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( -+ *) as_qdir=$as_dir;; -+ esac -+ as_dirs="'$as_qdir' $as_dirs" -+ as_dir=`$as_dirname -- "$as_dir" || -+$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" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` -+ test -d "$as_dir" && break -+ done -+ test -z "$as_dirs" || eval "mkdir $as_dirs" -+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - --fi - --fi -+} # as_fn_mkdir_p -+# 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 : -+ eval 'as_fn_append () -+ { -+ eval $1+=\$2 -+ }' -+else -+ as_fn_append () -+ { -+ eval $1=\$$1\$2 -+ } -+fi # as_fn_append - -+# as_fn_arith ARG... -+# ------------------ -+# 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 : -+ eval 'as_fn_arith () -+ { -+ as_val=$(( $* )) -+ }' -+else -+ as_fn_arith () -+ { -+ as_val=`expr "$@" || test $? -eq 1` -+ } -+fi # as_fn_arith - - --(eval "as_func_return () { -- (exit \$1) --} --as_func_success () { -- as_func_return 0 --} --as_func_failure () { -- as_func_return 1 --} --as_func_ret_success () { -- return 0 --} --as_func_ret_failure () { -- return 1 --} -+# as_fn_error STATUS ERROR [LINENO LOG_FD] -+# ---------------------------------------- -+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -+# script with STATUS, using 1 if that was 0. -+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 -+ fi -+ $as_echo "$as_me: error: $2" >&2 -+ as_fn_exit $as_status -+} # as_fn_error - --exitcode=0 --if as_func_success; then -- : -+if expr a : '\(a\)' >/dev/null 2>&1 && -+ test "X`expr 00001 : '.*\(...\)'`" = X001; then -+ as_expr=expr - else -- exitcode=1 -- echo as_func_success failed. --fi -- --if as_func_failure; then -- exitcode=1 -- echo as_func_failure succeeded. -+ as_expr=false - fi - --if as_func_ret_success; then -- : -+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then -+ as_basename=basename - else -- exitcode=1 -- echo as_func_ret_success failed. --fi -- --if as_func_ret_failure; then -- exitcode=1 -- echo as_func_ret_failure succeeded. -+ as_basename=false - fi - --if ( set x; as_func_ret_success y && test x = \"\$1\" ); then -- : -+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -+ as_dirname=dirname - else -- exitcode=1 -- echo positional parameters were not saved. -+ as_dirname=false - fi - --test \$exitcode = 0") || { -- echo No shell found that supports shell functions. -- echo Please tell autoconf@gnu.org about your system, -- echo including any error possibly output before this -- echo message --} -+as_me=`$as_basename -- "$0" || -+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ -+ X"$0" : 'X\(//\)$' \| \ -+ X"$0" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X/"$0" | -+ sed '/^.*\/\([^/][^/]*\)\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` - -+# Avoid depending upon Character Ranges. -+as_cr_letters='abcdefghijklmnopqrstuvwxyz' -+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -+as_cr_Letters=$as_cr_letters$as_cr_LETTERS -+as_cr_digits='0123456789' -+as_cr_alnum=$as_cr_Letters$as_cr_digits - - -- as_lineno_1=$LINENO -- as_lineno_2=$LINENO -- test "x$as_lineno_1" != "x$as_lineno_2" && -- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { -- -- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO -- # uniformly replaced by the line number. The first 'sed' inserts a -- # line-number line after each line using $LINENO; the second 'sed' -- # does the real work. The second script uses 'N' to pair each -- # line-number line with the line containing $LINENO, and appends -- # trailing '-' during substitution so that $LINENO is not a special -- # case at line end. -- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the -- # scripts with optimization help from Paolo Bonzini. Blame Lee -- # E. McMahon (1931-1989) for sed's syntax. :-) -+ as_lineno_1=$LINENO as_lineno_1a=$LINENO -+ as_lineno_2=$LINENO 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'"' || { -+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= -@@ -451,8 +447,7 @@ test \$exitcode = 0") || { - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || -- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 -- { (exit 1); exit 1; }; } -+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the -@@ -462,49 +457,40 @@ test \$exitcode = 0") || { - exit - } - -- --if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -- as_dirname=dirname --else -- as_dirname=false --fi -- - ECHO_C= ECHO_N= ECHO_T= --case `echo -n x` in -+case `echo -n x` in #((((( - -n*) -- case `echo 'x\c'` in -+ case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. -- *) ECHO_C='\c';; -+ xy) ECHO_C='\c';; -+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null -+ ECHO_T=' ';; - esac;; - *) - ECHO_N='-n';; - esac - --if expr a : '\(a\)' >/dev/null 2>&1 && -- test "X`expr 00001 : '.*\(...\)'`" = X001; then -- as_expr=expr --else -- as_expr=false --fi -- - rm -f conf$$ conf$$.exe conf$$.file - if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file - else - rm -f conf$$.dir -- mkdir conf$$.dir -+ mkdir conf$$.dir 2>/dev/null - fi --echo >conf$$.file --if ln -s conf$$.file conf$$ 2>/dev/null; then -- as_ln_s='ln -s' -- # ... but there are two gotchas: -- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. -- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. -- # In both cases, we have to default to `cp -p'. -- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || -+if (echo >conf$$.file) 2>/dev/null; then -+ if ln -s conf$$.file conf$$ 2>/dev/null; then -+ as_ln_s='ln -s' -+ # ... but there are two gotchas: -+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. -+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. -+ # In both cases, we have to default to `cp -p'. -+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || -+ as_ln_s='cp -p' -+ elif ln conf$$.file conf$$ 2>/dev/null; then -+ as_ln_s=ln -+ else - as_ln_s='cp -p' --elif ln conf$$.file conf$$ 2>/dev/null; then -- as_ln_s=ln -+ fi - else - as_ln_s='cp -p' - fi -@@ -512,7 +498,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$ - rmdir conf$$.dir 2>/dev/null - - if mkdir -p . 2>/dev/null; then -- as_mkdir_p=: -+ as_mkdir_p='mkdir -p "$as_dir"' - else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -@@ -529,12 +515,12 @@ else - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then -- test -d "$1/."; -+ test -d "$1/."; - else -- case $1 in -- -*)set "./$1";; -+ case $1 in #( -+ -*)set "./$1";; - esac; -- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in -+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -@@ -548,11 +534,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P - as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -- --exec 7<&0 &1 -+test -n "$DJDIR" || exec 7<&0 &1 - - # Name of the host. --# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, - # so uname gets run too. - ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -@@ -567,7 +553,6 @@ cross_compiling=no - subdirs= - MFLAGS= - MAKEFLAGS= --SHELL=${CONFIG_SHELL-/bin/sh} - - # Identity of this package. - PACKAGE_NAME='ChkTeX' -@@ -575,6 +560,7 @@ PACKAGE_TARNAME='chktex' - PACKAGE_VERSION='1.6.4' - PACKAGE_STRING='ChkTeX 1.6.4' - PACKAGE_BUGREPORT='' -+PACKAGE_URL='' - - # Factoring default headers for most tests. - ac_includes_default="\ -@@ -602,80 +588,87 @@ ac_includes_default="\ - #ifdef HAVE_STRINGS_H - # include - #endif --#ifdef HAVE_INTTYPES_H --# include --#endif --#ifdef HAVE_STDINT_H --# include --#endif --#ifdef HAVE_UNISTD_H --# include --#endif" -- --ac_subst_vars='SHELL --PATH_SEPARATOR --PACKAGE_NAME --PACKAGE_TARNAME --PACKAGE_VERSION --PACKAGE_STRING --PACKAGE_BUGREPORT --exec_prefix --prefix --program_transform_name --bindir --sbindir --libexecdir --datarootdir --datadir --sysconfdir --sharedstatedir --localstatedir --includedir --oldincludedir --docdir --infodir --htmldir --dvidir --pdfdir --psdir --libdir --localedir --mandir --DEFS --ECHO_C --ECHO_N --ECHO_T --LIBS --build_alias --host_alias --target_alias --SCRIPTS --ELISPDIR --CLEAN --CC --CFLAGS --LDFLAGS --CPPFLAGS --ac_ct_CC --EXEEXT --OBJEXT -- --INSTALL_PROGRAM --INSTALL_SCRIPT --INSTALL_DATA --LN_S --PERL5 --GROFF --LATEX --DVIPS --LYNX --LATEX2HTML --CPP --GREP --EGREP -+#ifdef HAVE_INTTYPES_H -+# include -+#endif -+#ifdef HAVE_STDINT_H -+# include -+#endif -+#ifdef HAVE_UNISTD_H -+# include -+#endif" -+ -+ac_subst_vars='LTLIBOBJS - LIBOBJS --LTLIBOBJS' -+EGREP -+GREP -+CPP -+LATEX2HTML -+LYNX -+DVIPS -+LATEX -+GROFF -+PERL5 -+LN_S -+INSTALL_DATA -+INSTALL_SCRIPT -+INSTALL_PROGRAM -+OBJEXT -+EXEEXT -+ac_ct_CC -+CPPFLAGS -+LDFLAGS -+CFLAGS -+CC -+CLEAN -+ELISPDIR -+SCRIPTS -+target_alias -+host_alias -+build_alias -+LIBS -+ECHO_T -+ECHO_N -+ECHO_C -+DEFS -+mandir -+localedir -+libdir -+psdir -+pdfdir -+dvidir -+htmldir -+infodir -+docdir -+oldincludedir -+includedir -+localstatedir -+sharedstatedir -+sysconfdir -+datadir -+datarootdir -+libexecdir -+sbindir -+bindir -+program_transform_name -+prefix -+exec_prefix -+PACKAGE_URL -+PACKAGE_BUGREPORT -+PACKAGE_STRING -+PACKAGE_VERSION -+PACKAGE_TARNAME -+PACKAGE_NAME -+PATH_SEPARATOR -+SHELL' - ac_subst_files='' -+ac_user_opts=' -+enable_option_checking -+enable_lacheck_replace -+enable_emacs_hack -+enable_debug_info -+enable_coverage_testing -+' - ac_precious_vars='build_alias - host_alias - target_alias -@@ -690,6 +683,8 @@ CPP' - # Initialize some variables set by options. - ac_init_help= - ac_init_version=false -+ac_unrecognized_opts= -+ac_unrecognized_sep= - # The variables have the same names as the options, with - # dashes changed to underlines. - cache_file=/dev/null -@@ -745,8 +740,9 @@ do - fi - - case $ac_option in -- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; -- *) ac_optarg=yes ;; -+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; -+ *=) ac_optarg= ;; -+ *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. -@@ -788,13 +784,20 @@ do - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) -- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` -+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. -- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && -- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 -- { (exit 1); exit 1; }; } -- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` -- eval enable_$ac_feature=no ;; -+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -+ as_fn_error $? "invalid feature name: $ac_useropt" -+ ac_useropt_orig=$ac_useropt -+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` -+ case $ac_user_opts in -+ *" -+"enable_$ac_useropt" -+"*) ;; -+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" -+ ac_unrecognized_sep=', ';; -+ esac -+ eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; -@@ -807,13 +810,20 @@ do - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) -- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` -+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. -- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && -- { echo "$as_me: error: invalid feature name: $ac_feature" >&2 -- { (exit 1); exit 1; }; } -- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` -- eval enable_$ac_feature=\$ac_optarg ;; -+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -+ as_fn_error $? "invalid feature name: $ac_useropt" -+ ac_useropt_orig=$ac_useropt -+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` -+ case $ac_user_opts in -+ *" -+"enable_$ac_useropt" -+"*) ;; -+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" -+ ac_unrecognized_sep=', ';; -+ esac -+ eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ -@@ -1004,22 +1014,36 @@ do - ac_init_version=: ;; - - -with-* | --with-*) -- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` -+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. -- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && -- { echo "$as_me: error: invalid package name: $ac_package" >&2 -- { (exit 1); exit 1; }; } -- ac_package=`echo $ac_package | sed 's/[-.]/_/g'` -- eval with_$ac_package=\$ac_optarg ;; -+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -+ as_fn_error $? "invalid package name: $ac_useropt" -+ ac_useropt_orig=$ac_useropt -+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` -+ case $ac_user_opts in -+ *" -+"with_$ac_useropt" -+"*) ;; -+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" -+ ac_unrecognized_sep=', ';; -+ esac -+ eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) -- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` -+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. -- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && -- { echo "$as_me: error: invalid package name: $ac_package" >&2 -- { (exit 1); exit 1; }; } -- ac_package=`echo $ac_package | sed 's/[-.]/_/g'` -- eval with_$ac_package=no ;; -+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -+ as_fn_error $? "invalid package name: $ac_useropt" -+ ac_useropt_orig=$ac_useropt -+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` -+ case $ac_user_opts in -+ *" -+"with_$ac_useropt" -+"*) ;; -+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" -+ ac_unrecognized_sep=', ';; -+ esac -+ eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. -@@ -1039,26 +1063,26 @@ do - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - -- -*) { echo "$as_me: error: unrecognized option: $ac_option --Try \`$0 --help' for more information." >&2 -- { (exit 1); exit 1; }; } -+ -*) as_fn_error $? "unrecognized option: \`$ac_option' -+Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. -- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && -- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 -- { (exit 1); exit 1; }; } -+ case $ac_envvar in #( -+ '' | [0-9]* | *[!_$as_cr_alnum]* ) -+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; -+ esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. -- echo "$as_me: WARNING: you should use --build, --host, --target" >&2 -+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && -- echo "$as_me: WARNING: invalid host type: $ac_option" >&2 -- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} -+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 -+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -@@ -1066,23 +1090,36 @@ done - - if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` -- { echo "$as_me: error: missing argument to $ac_option" >&2 -- { (exit 1); exit 1; }; } -+ as_fn_error $? "missing argument to $ac_option" -+fi -+ -+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 ;; -+ esac - fi - --# Be sure to have absolute directory names. -+# Check all directory arguments for consistency. - 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 - do - eval ac_val=\$$ac_var -+ # Remove trailing slashes. -+ case $ac_val in -+ */ ) -+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` -+ eval $ac_var=\$ac_val;; -+ esac -+ # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac -- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 -- { (exit 1); exit 1; }; } -+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" - done - - # There might be people who depend on the old broken behavior: `$host' -@@ -1096,8 +1133,8 @@ target=$target_alias - if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe -- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. -- If a cross compiler is detected then cross compile mode will be used." >&2 -+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. -+ If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -@@ -1112,23 +1149,21 @@ test "$silent" = yes && exec 6>/dev/null - ac_pwd=`pwd` && test -n "$ac_pwd" && - ac_ls_di=`ls -di .` && - ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || -- { echo "$as_me: error: Working directory cannot be determined" >&2 -- { (exit 1); exit 1; }; } -+ as_fn_error $? "working directory cannot be determined" - test "X$ac_ls_di" = "X$ac_pwd_ls_di" || -- { echo "$as_me: error: pwd does not report name of working directory" >&2 -- { (exit 1); exit 1; }; } -+ as_fn_error $? "pwd does not report name of working directory" - - - # Find the source files, if location was not specified. - if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. -- ac_confdir=`$as_dirname -- "$0" || --$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$0" : 'X\(//\)[^/]' \| \ -- X"$0" : 'X\(//\)$' \| \ -- X"$0" : 'X\(/\)' \| . 2>/dev/null || --echo X"$0" | -+ ac_confdir=`$as_dirname -- "$as_myself" || -+$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" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q -@@ -1155,13 +1190,11 @@ else - fi - if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." -- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 -- { (exit 1); exit 1; }; } -+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" - fi - ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" - ac_abs_confdir=`( -- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 -- { (exit 1); exit 1; }; } -+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` - # When building in place, set srcdir=. - if test "$ac_abs_confdir" = "$ac_pwd"; then -@@ -1201,7 +1234,7 @@ Configuration: - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit -- -q, --quiet, --silent do not print \`checking...' messages -+ -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files -@@ -1209,9 +1242,9 @@ Configuration: - - Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX -- [$ac_default_prefix] -+ [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX -- [PREFIX] -+ [PREFIX] - - By default, \`make install' will install all the files in - \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -@@ -1221,25 +1254,25 @@ for instance \`--prefix=\$HOME'. - For better control, use the options below. - - Fine tuning of the installation directories: -- --bindir=DIR user executables [EPREFIX/bin] -- --sbindir=DIR system admin executables [EPREFIX/sbin] -- --libexecdir=DIR program executables [EPREFIX/libexec] -- --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] -- --libdir=DIR object code libraries [EPREFIX/lib] -- --includedir=DIR C header files [PREFIX/include] -- --oldincludedir=DIR C header files for non-gcc [/usr/include] -- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] -- --datadir=DIR read-only architecture-independent data [DATAROOTDIR] -- --infodir=DIR info documentation [DATAROOTDIR/info] -- --localedir=DIR locale-dependent data [DATAROOTDIR/locale] -- --mandir=DIR man documentation [DATAROOTDIR/man] -- --docdir=DIR documentation root [DATAROOTDIR/doc/chktex] -- --htmldir=DIR html documentation [DOCDIR] -- --dvidir=DIR dvi documentation [DOCDIR] -- --pdfdir=DIR pdf documentation [DOCDIR] -- --psdir=DIR ps documentation [DOCDIR] -+ --bindir=DIR user executables [EPREFIX/bin] -+ --sbindir=DIR system admin executables [EPREFIX/sbin] -+ --libexecdir=DIR program executables [EPREFIX/libexec] -+ --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] -+ --libdir=DIR object code libraries [EPREFIX/lib] -+ --includedir=DIR C header files [PREFIX/include] -+ --oldincludedir=DIR C header files for non-gcc [/usr/include] -+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] -+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR] -+ --infodir=DIR info documentation [DATAROOTDIR/info] -+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale] -+ --mandir=DIR man documentation [DATAROOTDIR/man] -+ --docdir=DIR documentation root [DATAROOTDIR/doc/chktex] -+ --htmldir=DIR html documentation [DOCDIR] -+ --dvidir=DIR dvi documentation [DOCDIR] -+ --pdfdir=DIR pdf documentation [DOCDIR] -+ --psdir=DIR ps documentation [DOCDIR] - _ACEOF - - cat <<\_ACEOF -@@ -1253,6 +1286,7 @@ if test -n "$ac_init_help"; then - cat <<\_ACEOF - - Optional Features: -+ --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - -@@ -1276,13 +1310,14 @@ Some influential environment variables: - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l -- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if -+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - - Use these variables to override the choices made by `configure' or to help - it to find libraries and programs with nonstandard names/locations. - -+Report bugs to the package provider. - _ACEOF - ac_status=$? - fi -@@ -1290,15 +1325,17 @@ fi - if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue -- test -d "$ac_dir" || continue -+ test -d "$ac_dir" || -+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || -+ continue - ac_builddir=. - - case "$ac_dir" in - .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) -- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` -+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. -- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` -+ ac_top_builddir_sub=`$as_echo "$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/ ;; -@@ -1334,7 +1371,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_ - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else -- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 -+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -@@ -1344,21 +1381,426 @@ test -n "$ac_init_help" && exit $ac_stat - if $ac_init_version; then - cat <<\_ACEOF - ChkTeX configure 1.6.4 --generated by GNU Autoconf 2.61 -+generated by GNU Autoconf 2.68 - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, --2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -+Copyright (C) 2010 Free Software Foundation, Inc. - This configure script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it. - _ACEOF - exit - fi -+ -+## ------------------------ ## -+## Autoconf initialization. ## -+## ------------------------ ## -+ -+# ac_fn_c_try_compile LINENO -+# -------------------------- -+# Try to compile conftest.$ac_ext, and return whether this succeeded. -+ac_fn_c_try_compile () -+{ -+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ rm -f conftest.$ac_objext -+ 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 -+ (eval "$ac_compile") 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; } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; 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_compile -+ -+# ac_fn_c_try_link LINENO -+# ----------------------- -+# Try to link conftest.$ac_ext, and return whether this succeeded. -+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 -+ 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>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; } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest$ac_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then : -+ ac_retval=0 -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_retval=1 -+fi -+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information -+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would -+ # interfere with the next link command; also delete a directory that is -+ # left behind by Apple's compiler. We do this before executing the actions. -+ 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_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 -+# INCLUDES, setting the cache variable VAR accordingly. -+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 -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$4 -+#include <$2> -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ eval "$3=yes" -+else -+ eval "$3=no" -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+eval ac_res=\$$3 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ -+} # ac_fn_c_check_header_compile -+ -+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -+# ------------------------------------------- -+# Tests whether TYPE exists after having included INCLUDES, setting cache -+# variable VAR accordingly. -+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 -+ eval "$3=no" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$4 -+int -+main () -+{ -+if (sizeof ($2)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$4 -+int -+main () -+{ -+if (sizeof (($2))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ -+else -+ eval "$3=yes" -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+eval ac_res=\$$3 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ -+} # ac_fn_c_check_type -+ -+# ac_fn_c_check_func LINENO FUNC VAR -+# ---------------------------------- -+# Tests whether FUNC exists, setting the cache variable VAR accordingly -+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 -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+/* Define $2 to an innocuous variant, in case declares $2. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $2 innocuous_$2 -+ -+/* System header to define __stub macros and hopefully few prototypes, -+ which can conflict with char $2 (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ -+ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ -+#undef $2 -+ -+/* 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 $2 (); -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined __stub_$2 || defined __stub___$2 -+choke me -+#endif -+ -+int -+main () -+{ -+return $2 (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ eval "$3=yes" -+else -+ eval "$3=no" -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ 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; } -+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -+ -+} # ac_fn_c_check_func - 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.6.4, which was --generated by GNU Autoconf 2.61. Invocation command line was -+generated by GNU Autoconf 2.68. Invocation command line was - - $ $0 $@ - -@@ -1394,8 +1836,8 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- echo "PATH: $as_dir" --done -+ $as_echo "PATH: $as_dir" -+ done - IFS=$as_save_IFS - - } >&5 -@@ -1429,12 +1871,12 @@ do - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) -- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in -- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; -+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) -- ac_configure_args1="$ac_configure_args1 '$ac_arg'" -+ as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else -@@ -1450,13 +1892,13 @@ do - -* ) ac_must_keep_next=true ;; - esac - fi -- ac_configure_args="$ac_configure_args '$ac_arg'" -+ as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done - done --$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } --$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } -+{ ac_configure_args0=; unset ac_configure_args0;} -+{ ac_configure_args1=; unset ac_configure_args1;} - - # When interrupted or exit'd, cleanup temporary files, and complete - # config.log. We remove comments because anyway the quotes in there -@@ -1468,11 +1910,9 @@ trap 'exit_status=$? - { - echo - -- cat <<\_ASBOX --## ---------------- ## -+ $as_echo "## ---------------- ## - ## Cache variables. ## --## ---------------- ## --_ASBOX -+## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, - ( -@@ -1481,12 +1921,13 @@ _ASBOX - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( -- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 --echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; -+ *_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;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( -- *) $as_unset $ac_var ;; -+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( -+ *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done -@@ -1505,128 +1946,136 @@ echo "$as_me: WARNING: Cache variable $a - ) - echo - -- cat <<\_ASBOX --## ----------------- ## -+ $as_echo "## ----------------- ## - ## Output variables. ## --## ----------------- ## --_ASBOX -+## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in -- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; -+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac -- echo "$ac_var='\''$ac_val'\''" -+ $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then -- cat <<\_ASBOX --## ------------------- ## -+ $as_echo "## ------------------- ## - ## File substitutions. ## --## ------------------- ## --_ASBOX -+## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in -- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; -+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac -- echo "$ac_var='\''$ac_val'\''" -+ $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then -- cat <<\_ASBOX --## ----------- ## -+ $as_echo "## ----------- ## - ## confdefs.h. ## --## ----------- ## --_ASBOX -+## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && -- echo "$as_me: caught signal $ac_signal" -- echo "$as_me: exit $exit_status" -+ $as_echo "$as_me: caught signal $ac_signal" -+ $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 - for ac_signal in 1 2 13 15; do -- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal - done - 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 -+ - # Predefined preprocessor variables. - - cat >>confdefs.h <<_ACEOF - #define PACKAGE_NAME "$PACKAGE_NAME" - _ACEOF - -- - cat >>confdefs.h <<_ACEOF - #define PACKAGE_TARNAME "$PACKAGE_TARNAME" - _ACEOF - -- - cat >>confdefs.h <<_ACEOF - #define PACKAGE_VERSION "$PACKAGE_VERSION" - _ACEOF - -- - cat >>confdefs.h <<_ACEOF - #define PACKAGE_STRING "$PACKAGE_STRING" - _ACEOF - -- - cat >>confdefs.h <<_ACEOF --#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -+_ACEOF -+ -+cat >>confdefs.h <<_ACEOF -+#define PACKAGE_URL "$PACKAGE_URL" - _ACEOF - - - # Let the site file select an alternate cache file if it wants to. --# Prefer explicitly selected file to automatically selected ones. -+# Prefer an explicitly selected file to automatically selected ones. -+ac_site_file1=NONE -+ac_site_file2=NONE - if test -n "$CONFIG_SITE"; then -- set x "$CONFIG_SITE" -+ # 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 - elif test "x$prefix" != xNONE; then -- set x "$prefix/share/config.site" "$prefix/etc/config.site" -+ ac_site_file1=$prefix/share/config.site -+ ac_site_file2=$prefix/etc/config.site - else -- set x "$ac_default_prefix/share/config.site" \ -- "$ac_default_prefix/etc/config.site" -+ ac_site_file1=$ac_default_prefix/share/config.site -+ ac_site_file2=$ac_default_prefix/etc/config.site - fi --shift --for ac_site_file -+for ac_site_file in "$ac_site_file1" "$ac_site_file2" - do -- if test -r "$ac_site_file"; then -- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 --echo "$as_me: loading site script $ac_site_file" >&6;} -+ 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;} - sed 's/^/| /' "$ac_site_file" >&5 -- . "$ac_site_file" -+ . "$ac_site_file" \ -+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$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 - done - - if test -r "$cache_file"; then -- # Some versions of bash will fail to source /dev/null (special -- # files actually), so we avoid doing that. -- if test -f "$cache_file"; then -- { echo "$as_me:$LINENO: loading cache $cache_file" >&5 --echo "$as_me: loading cache $cache_file" >&6;} -+ # 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;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi - else -- { echo "$as_me:$LINENO: creating cache $cache_file" >&5 --echo "$as_me: creating cache $cache_file" >&6;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -+$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file - fi - -@@ -1640,68 +2089,56 @@ 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,) -- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 --echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} -+ { $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;} - ac_cache_corrupted=: ;; - ,set) -- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 --echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} -+ { $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;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then -- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 --echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} -- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 --echo "$as_me: former value: $ac_old_val" >&2;} -- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 --echo "$as_me: current value: $ac_new_val" >&2;} -- ac_cache_corrupted=: -+ # differences in whitespace do not lead to failure. -+ 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;} -+ 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;} -+ 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;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in -- *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; -+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. -- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; -+ *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi - done - if $ac_cache_corrupted; then -- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 --echo "$as_me: error: changes in the environment can compromise the build" >&2;} -- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 --echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} -- { (exit 1); exit 1; }; } --fi -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -+ { $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 -+fi -+## -------------------- ## -+## Main body of script. ## -+## -------------------- ## - - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' -@@ -1718,7 +2155,7 @@ ELISPDIR= - CLEAN= - - # Check whether --enable-lacheck-replace was given. --if test "${enable_lacheck_replace+set}" = set; then -+if test "${enable_lacheck_replace+set}" = set; then : - enableval=$enable_lacheck_replace; - else - enable_lacheck_replace=no -@@ -1726,7 +2163,7 @@ fi - - - # Check whether --enable-emacs-hack was given. --if test "${enable_emacs_hack+set}" = set; then -+if test "${enable_emacs_hack+set}" = set; then : - enableval=$enable_emacs_hack; - else - enable_emacs_hack=no -@@ -1734,7 +2171,7 @@ fi - - - # Check whether --enable-debug-info was given. --if test "${enable_debug_info+set}" = set; then -+if test "${enable_debug_info+set}" = set; then : - enableval=$enable_debug_info; - else - enable_debug_info=yes -@@ -1742,7 +2179,7 @@ fi - - - # Check whether --enable-coverage-testing was given. --if test "${enable_coverage_testing+set}" = set; then -+if test "${enable_coverage_testing+set}" = set; then : - enableval=$enable_coverage_testing; - else - enable_coverage_testing=no -@@ -1777,60 +2214,56 @@ EOF - sleep 1 - fi - --{ echo "$as_me:$LINENO: checking whether lacheck replacement should be installed" >&5 --echo $ECHO_N "checking whether lacheck replacement should be installed... $ECHO_C" >&6; } -+{ $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; } - if test "$enable_lacheck_replace" = "yes"; then - SCRIPTS="$SCRIPTS \$(srcdir)/lacheck" -- { echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } - else - SCRIPTS= -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - --{ echo "$as_me:$LINENO: checking whether runtime debug info should be used" >&5 --echo $ECHO_N "checking whether runtime debug info should be used... $ECHO_C" >&6; } -+{ $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; } - if test "$enable_debug_info" = "yes"; then -- { echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } - else - --cat >>confdefs.h <<\_ACEOF --#define STRIP_DEBUG 1 --_ACEOF -+$as_echo "#define STRIP_DEBUG 1" >>confdefs.h - -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - --{ echo "$as_me:$LINENO: checking whether the emacs hack should be installed" >&5 --echo $ECHO_N "checking whether the emacs hack should be installed... $ECHO_C" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the emacs hack should be installed" >&5 -+$as_echo_n "checking whether the emacs hack should be installed... " >&6; } - case $enable_emacs_hack in -- no) { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - ;; - /*|*/*) ELISPDIR=$enable_emacs_hack -- { echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } - ;; - *) echo; -- { { echo "$as_me:$LINENO: error: --enable-emacs-hack needs the *full path* of Elisp files" >&5 --echo "$as_me: error: --enable-emacs-hack needs the *full path* of Elisp files" >&2;} -- { (exit 1); exit 1; }; } -+ as_fn_error $? "--enable-emacs-hack needs the *full path* of Elisp files" "$LINENO" 5 - ;; - esac - --{ echo "$as_me:$LINENO: checking whether coverage testing is enabled" >&5 --echo $ECHO_N "checking whether coverage testing is enabled... $ECHO_C" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether coverage testing is enabled" >&5 -+$as_echo_n "checking whether coverage testing is enabled... " >&6; } - if test "$enable_coverage_testing" = "yes"; then -- { echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } - CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage -O0" - CLEAN="${CLEAN} \$(wildcard *.bb *.bbg *.da *.gcov)" - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - ac_ext=c -@@ -1841,10 +2274,10 @@ 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 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -@@ -1854,25 +2287,25 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - fi - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { echo "$as_me:$LINENO: result: $CC" >&5 --echo "${ECHO_T}$CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+$as_echo "$CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -1881,10 +2314,10 @@ 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 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_ac_ct_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -@@ -1894,25 +2327,25 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - fi - fi - ac_ct_CC=$ac_cv_prog_ac_ct_CC - if test -n "$ac_ct_CC"; then -- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 --echo "${ECHO_T}$ac_ct_CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -+$as_echo "$ac_ct_CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - if test "x$ac_ct_CC" = x; then -@@ -1920,12 +2353,8 @@ fi - else - case $cross_compiling:$ac_tool_warned in - yes:) --{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools --whose name does not start with the host triplet. If you think this --configuration is useful to you, please write to autoconf@gnu.org." >&5 --echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools --whose name does not start with the host triplet. If you think this --configuration is useful to you, please write to autoconf@gnu.org." >&2;} -+{ $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;} - ac_tool_warned=yes ;; - esac - CC=$ac_ct_CC -@@ -1938,10 +2367,10 @@ 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 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -@@ -1951,25 +2380,25 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - fi - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { echo "$as_me:$LINENO: result: $CC" >&5 --echo "${ECHO_T}$CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+$as_echo "$CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -1978,10 +2407,10 @@ 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 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -@@ -1992,18 +2421,18 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - if test $ac_prog_rejected = yes; then -@@ -2022,11 +2451,11 @@ fi - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { echo "$as_me:$LINENO: result: $CC" >&5 --echo "${ECHO_T}$CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+$as_echo "$CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -2037,10 +2466,10 @@ 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 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -@@ -2050,25 +2479,25 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - fi - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { echo "$as_me:$LINENO: result: $CC" >&5 --echo "${ECHO_T}$CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+$as_echo "$CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -2081,10 +2510,10 @@ 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 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_ac_ct_CC+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -@@ -2094,25 +2523,25 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - fi - fi - ac_ct_CC=$ac_cv_prog_ac_ct_CC - if test -n "$ac_ct_CC"; then -- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 --echo "${ECHO_T}$ac_ct_CC" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -+$as_echo "$ac_ct_CC" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -2124,12 +2553,8 @@ done - else - case $cross_compiling:$ac_tool_warned in - yes:) --{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools --whose name does not start with the host triplet. If you think this --configuration is useful to you, please write to autoconf@gnu.org." >&5 --echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools --whose name does not start with the host triplet. If you think this --configuration is useful to you, please write to autoconf@gnu.org." >&2;} -+{ $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;} - ac_tool_warned=yes ;; - esac - CC=$ac_ct_CC -@@ -2139,51 +2564,37 @@ fi - fi - - --test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH --See \`config.log' for more details." >&5 --echo "$as_me: error: no acceptable C compiler found in \$PATH --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$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. --echo "$as_me:$LINENO: checking for C compiler version" >&5 --ac_compiler=`set X $ac_compile; echo $2` --{ (ac_try="$ac_compiler --version >&5" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compiler --version >&5") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } --{ (ac_try="$ac_compiler -v >&5" -+$as_echo "$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 -+ { { ac_try="$ac_compiler $ac_option >&5" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compiler -v >&5") 2>&5 -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 -+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } --{ (ac_try="$ac_compiler -V >&5" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compiler -V >&5") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } -+ if test -s conftest.err; then -+ sed '10a\ -+... rest of stderr output deleted ... -+ 10q' conftest.err >conftest.er1 -+ cat conftest.er1 >&5 -+ fi -+ rm -f conftest.er1 conftest.err -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+done - --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2195,42 +2606,38 @@ main () - } - _ACEOF - ac_clean_files_save=$ac_clean_files --ac_clean_files="$ac_clean_files a.out a.exe b.out" -+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. --{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 --echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } --ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` --# --# List of possible output files, starting from the most likely. --# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) --# only as a last resort. b.out is created by i960 compilers. --ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' --# --# The IRIX 6 linker writes into existing files which may not be --# executable, retaining their permissions. Remove them first so a --# subsequent execution test works. -+{ $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[^ ]*//'` -+ -+# The possible output files: -+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" -+ - ac_rmfiles= - for ac_file in $ac_files - do - case $ac_file in -- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac - done - rm -f $ac_rmfiles - --if { (ac_try="$ac_link_default" -+if { { ac_try="$ac_link_default" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$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, -@@ -2240,14 +2647,14 @@ for ac_file in $ac_files '' - do - test -f "$ac_file" || continue - case $ac_file in -- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) -- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; -+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi -@@ -2266,78 +2673,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeex - else - ac_file='' - fi -- --{ echo "$as_me:$LINENO: result: $ac_file" >&5 --echo "${ECHO_T}$ac_file" >&6; } --if test -z "$ac_file"; then -- echo "$as_me: failed program was:" >&5 -+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 - sed 's/^/| /' conftest.$ac_ext >&5 - --{ { echo "$as_me:$LINENO: error: C compiler cannot create executables --See \`config.log' for more details." >&5 --echo "$as_me: error: C compiler cannot create executables --See \`config.log' for more details." >&2;} -- { (exit 77); exit 77; }; } --fi -- -+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$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; } - ac_exeext=$ac_cv_exeext - --# Check that the compiler produces executables we can run. If not, either --# the compiler is broken, or we cross compile. --{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 --echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } --# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 --# If not cross compiling, check that we can run a simple program. --if test "$cross_compiling" != yes; then -- if { ac_try='./$ac_file' -- { (case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- cross_compiling=no -- else -- if test "$cross_compiling" = maybe; then -- cross_compiling=yes -- else -- { { echo "$as_me:$LINENO: error: cannot run C compiled programs. --If you meant to cross compile, use \`--host'. --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run C compiled programs. --If you meant to cross compile, use \`--host'. --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -- fi -- fi --fi --{ echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -- --rm -f a.out a.exe conftest$ac_cv_exeext b.out -+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out - ac_clean_files=$ac_clean_files_save --# Check that the compiler produces executables we can run. If not, either --# the compiler is broken, or we cross compile. --{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 --echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } --{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 --echo "${ECHO_T}$cross_compiling" >&6; } -- --{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 --echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } --if { (ac_try="$ac_link" -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -+$as_echo_n "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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+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=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$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 -@@ -2345,37 +2715,90 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec - for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in -- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac - done - else -- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot compute suffix of executables: cannot compile and link --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --fi -- --rm -f conftest$ac_cv_exeext --{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 --echo "${ECHO_T}$ac_cv_exeext" >&6; } -+ { { $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 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; } - - rm -f conftest.$ac_ext - EXEEXT=$ac_cv_exeext - ac_exeext=$EXEEXT --{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 --echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } --if test "${ac_cv_objext+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+FILE *f = fopen ("conftest.out", "w"); -+ return ferror (f) || fclose (f) != 0; -+ -+ ; -+ return 0; -+} - _ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_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; } -+if test "$cross_compiling" != yes; then -+ { { 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; } -+ if { ac_try='./conftest$ac_cv_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 -+ 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. -+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; } -+ -+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 -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2387,51 +2810,46 @@ main () - } - _ACEOF - rm -f conftest.o conftest.obj --if { (ac_try="$ac_compile" -+if { { ac_try="$ac_compile" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; then -+ $as_echo "$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 -- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac - done - else -- echo "$as_me: failed program was:" >&5 -+ $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot compute suffix of object files: cannot compile --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+{ { $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 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 --{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 --echo "${ECHO_T}$ac_cv_objext" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -+$as_echo "$ac_cv_objext" >&6; } - OBJEXT=$ac_cv_objext - ac_objext=$OBJEXT --{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 --echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } --if test "${ac_cv_c_compiler_gnu+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2445,54 +2863,34 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_compiler_gnu=no -+ ac_compiler_gnu=no - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_c_compiler_gnu=$ac_compiler_gnu - - fi --{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 --echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } --GCC=`test $ac_compiler_gnu = yes && echo yes` -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -+$as_echo "$ac_cv_c_compiler_gnu" >&6; } -+if test $ac_compiler_gnu = yes; then -+ GCC=yes -+else -+ GCC= -+fi - ac_test_CFLAGS=${CFLAGS+set} - ac_save_CFLAGS=$CFLAGS --{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 --echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } --if test "${ac_cv_prog_cc_g+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2503,34 +2901,11 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- CFLAGS="" -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ CFLAGS="" -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2541,35 +2916,12 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+if ac_fn_c_try_compile "$LINENO"; then : - -- ac_c_werror_flag=$ac_save_c_werror_flag -+else -+ ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -2580,42 +2932,18 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag - fi --{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 --echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } -+{ $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 - CFLAGS=$ac_save_CFLAGS - elif test $ac_cv_prog_cc_g = yes; then -@@ -2631,18 +2959,14 @@ else - CFLAGS= - fi - fi --{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 --echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } --if test "${ac_cv_prog_cc_c89+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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_save_CC=$CC --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - #include -@@ -2699,31 +3023,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlang - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" - do - CC="$ac_save_CC $ac_arg" -- rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+ if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- - fi -- - rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break - done -@@ -2734,17 +3036,19 @@ fi - # AC_CACHE_VAL - case "x$ac_cv_prog_cc_c89" in - x) -- { echo "$as_me:$LINENO: result: none needed" >&5 --echo "${ECHO_T}none needed" >&6; } ;; -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -+$as_echo "none needed" >&6; } ;; - xno) -- { echo "$as_me:$LINENO: result: unsupported" >&5 --echo "${ECHO_T}unsupported" >&6; } ;; -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -+$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" -- { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 --echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -+ { $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 : - -+fi - - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' -@@ -2752,60 +3056,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS con - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - -- -- hard= -- if test -z "$hard"; then -- msg="C to warn at nonstrict prototypes" -- else -- msg="C to require strict prototypes" -- fi -- { echo "$as_me:$LINENO: checking $msg" >&5 --echo $ECHO_N "checking $msg... $ECHO_C" >&6; } --if test "${ac_cv_prog_cc_strict_prototypes+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- -- cat > conftest.c < --int main (void) --{ -- if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 0; -- return 1; --} --EOF -- -- if test "$GCC" = "yes"; then -- if test -z "$hard"; then -- ac_cv_prog_cc_strict_prototypes="-Wstrict-prototypes" -- else -- ac_cv_prog_cc_strict_prototypes="-fstrict-prototypes -Wstrict-prototypes" -- fi -- -- if test -n "`${CC-cc} -c $ac_cv_prog_cc_strict_prototypes conftest.c 2>&1`" ; then -- ac_cv_prog_cc_strict_prototypes="suppressed...sys/stat.h" -- fi -- -- -- -- -- -- -- fi -- rm -f conftest.* -- --fi --{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_strict_prototypes" >&5 --echo "${ECHO_T}$ac_cv_prog_cc_strict_prototypes" >&6; } -- if test -z "$" ; then -- if test -n "$ac_cv_prog_cc_strict_prototypes" ; then -- case "$ac_cv_prog_cc_strict_prototypes" in -- *...*) ="" ;; # known but suppressed -- *) ="$ac_cv_prog_cc_strict_prototypes" ;; -- esac -- fi -- fi -- -- -+AX_CFLAGS_STRICT_PROTOTYPES - - ansi= - if test -z "$ansi"; then -@@ -2813,10 +3064,10 @@ echo "${ECHO_T}$ac_cv_prog_cc_strict_pro - else - msg="for C compiler warning and ANSI conformance flags" - fi -- { echo "$as_me:$LINENO: checking $msg" >&5 --echo $ECHO_N "checking $msg... $ECHO_C" >&6; } --if test "${vl_cv_prog_cc_warnings+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ { $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 - - if test -n "$CC"; then -@@ -2905,8 +3156,8 @@ EOF - fi - - fi --{ echo "$as_me:$LINENO: result: $vl_cv_prog_cc_warnings" >&5 --echo "${ECHO_T}$vl_cv_prog_cc_warnings" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_prog_cc_warnings" >&5 -+$as_echo "$vl_cv_prog_cc_warnings" >&6; } - - - ac_aux_dir= -@@ -2926,9 +3177,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$s - fi - done - if test -z "$ac_aux_dir"; then -- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 --echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} -- { (exit 1); exit 1; }; } -+ 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, -@@ -2953,22 +3202,23 @@ ac_configure="$SHELL $ac_aux_dir/configu - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" - # OS/2's system install, which has a completely different semantic - # ./install, which can be erroneously created by make from ./install.sh. --{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 --echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } -+# 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; } - if test -z "$INSTALL"; then --if test "${ac_cv_path_install+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+if ${ac_cv_path_install+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - 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/* | \ -+ # Account for people who put trailing slashes in PATH elements. -+case $as_dir/ in #(( -+ ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ -- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ -+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. -@@ -2986,17 +3236,29 @@ case $as_dir/ in - # program-specific install script used by HP pwplus--don't use. - : - else -- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" -- break 3 -+ rm -rf conftest.one conftest.two conftest.dir -+ 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" && -+ 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" -+ break 3 -+ fi - fi - fi - done - done - ;; - esac --done -+ -+ done - IFS=$as_save_IFS - -+rm -rf conftest.one conftest.two conftest.dir - - fi - if test "${ac_cv_path_install+set}" = set; then -@@ -3009,8 +3271,8 @@ fi - INSTALL=$ac_install_sh - fi - fi --{ echo "$as_me:$LINENO: result: $INSTALL" >&5 --echo "${ECHO_T}$INSTALL" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -+$as_echo "$INSTALL" >&6; } - - # Use test -z because SunOS4 sh mishandles braces in ${var-val}. - # It thinks the first close brace ends the variable substitution. -@@ -3020,25 +3282,25 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR - - test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - --{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 --echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -+$as_echo_n "checking whether ln -s works... " >&6; } - LN_S=$as_ln_s - if test "$LN_S" = "ln -s"; then -- { echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 --echo "${ECHO_T}no, using $LN_S" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -+$as_echo "no, using $LN_S" >&6; } - fi - - 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 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_path_PERL5+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - case $PERL5 in - [\\/]* | ?:[\\/]*) -@@ -3051,14 +3313,14 @@ for as_dir in $as_dummy - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PERL5="$as_dir/$ac_word$ac_exec_ext" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - ;; -@@ -3066,11 +3328,11 @@ esac - fi - PERL5=$ac_cv_path_PERL5 - if test -n "$PERL5"; then -- { echo "$as_me:$LINENO: result: $PERL5" >&5 --echo "${ECHO_T}$PERL5" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL5" >&5 -+$as_echo "$PERL5" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -3079,23 +3341,23 @@ done - test -n "$PERL5" || PERL5="no" - - if test "$PERL5" != no; then -- { echo "$as_me:$LINENO: checking whether perl is v5 or higher" >&5 --echo $ECHO_N "checking whether perl is v5 or higher... $ECHO_C" >&6; } -+ { $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; } - if $PERL5 -e 'exit($] >= 5)'; then - PERL5=no -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - else -- { echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } - fi - fi - - if test "$PERL5" != no; then -- { echo "$as_me:$LINENO: checking whether #! works in shell scripts" >&5 --echo $ECHO_N "checking whether #! works in shell scripts... $ECHO_C" >&6; } --if test "${ac_cv_sys_interpreter+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5 -+$as_echo_n "checking whether #! works in shell scripts... " >&6; } -+if ${ac_cv_sys_interpreter+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - echo '#! /bin/cat - exit 69 -@@ -3109,31 +3371,31 @@ else - fi - rm -f conftest - fi --{ echo "$as_me:$LINENO: result: $ac_cv_sys_interpreter" >&5 --echo "${ECHO_T}$ac_cv_sys_interpreter" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5 -+$as_echo "$ac_cv_sys_interpreter" >&6; } - interpval=$ac_cv_sys_interpreter - - if test "$ac_cv_sys_interpreter" = "yes"; then - SCRIPTS="$SCRIPTS \$(srcdir)/chkweb deweb" - else -- { echo "$as_me:$LINENO: WARNING: deweb will not be installed since your system does" >&5 --echo "$as_me: WARNING: deweb will not be installed since your system does" >&2;} -- { echo "$as_me:$LINENO: WARNING: not support the pound-bang notation." >&5 --echo "$as_me: WARNING: not support the pound-bang notation." >&2;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: deweb will not be installed since your system does" >&5 -+$as_echo "$as_me: WARNING: deweb will not be installed since your system does" >&2;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not support the pound-bang notation." >&5 -+$as_echo "$as_me: WARNING: not support the pound-bang notation." >&2;} - fi - else -- { echo "$as_me:$LINENO: WARNING: deweb will not be installed since you do not have perl5." >&5 --echo "$as_me: WARNING: deweb will not be installed since you do not have perl5." >&2;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: deweb will not be installed since you do not have perl5." >&5 -+$as_echo "$as_me: WARNING: deweb 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 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_prog_GROFF+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - if test -n "$GROFF"; then - ac_cv_prog_GROFF="$GROFF" # Let the user override the test. -@@ -3143,25 +3405,25 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_GROFF="$ac_prog" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - fi - fi - GROFF=$ac_cv_prog_GROFF - if test -n "$GROFF"; then -- { echo "$as_me:$LINENO: result: $GROFF" >&5 --echo "${ECHO_T}$GROFF" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5 -+$as_echo "$GROFF" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - -@@ -3172,10 +3434,10 @@ test -n "$GROFF" || GROFF="'nroff -man'" - - # Extract the first word of "latex", so it can be a program name with args. - set dummy latex; ac_word=$2 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_path_LATEX+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - case $LATEX in - [\\/]* | ?:[\\/]*) -@@ -3187,14 +3449,14 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_LATEX="$as_dir/$ac_word$ac_exec_ext" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - test -z "$ac_cv_path_LATEX" && ac_cv_path_LATEX="no" -@@ -3203,21 +3465,21 @@ esac - fi - LATEX=$ac_cv_path_LATEX - if test -n "$LATEX"; then -- { echo "$as_me:$LINENO: result: $LATEX" >&5 --echo "${ECHO_T}$LATEX" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEX" >&5 -+$as_echo "$LATEX" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - - - # Extract the first word of "dvips", so it can be a program name with args. - set dummy dvips; ac_word=$2 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_path_DVIPS+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - case $DVIPS in - [\\/]* | ?:[\\/]*) -@@ -3229,14 +3491,14 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_DVIPS="$as_dir/$ac_word$ac_exec_ext" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - ;; -@@ -3244,21 +3506,21 @@ esac - fi - DVIPS=$ac_cv_path_DVIPS - if test -n "$DVIPS"; then -- { echo "$as_me:$LINENO: result: $DVIPS" >&5 --echo "${ECHO_T}$DVIPS" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DVIPS" >&5 -+$as_echo "$DVIPS" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - - - # Extract the first word of "lynx", so it can be a program name with args. - set dummy lynx; ac_word=$2 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_path_LYNX+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - case $LYNX in - [\\/]* | ?:[\\/]*) -@@ -3270,14 +3532,14 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_LYNX="$as_dir/$ac_word$ac_exec_ext" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - ;; -@@ -3285,20 +3547,20 @@ esac - fi - LYNX=$ac_cv_path_LYNX - if test -n "$LYNX"; then -- { echo "$as_me:$LINENO: result: $LYNX" >&5 --echo "${ECHO_T}$LYNX" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LYNX" >&5 -+$as_echo "$LYNX" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - - # Extract the first word of "latex2html", so it can be a program name with args. - set dummy latex2html; ac_word=$2 --{ echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } --if test "${ac_cv_path_LATEX2HTML+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - case $LATEX2HTML in - [\\/]* | ?:[\\/]*) -@@ -3310,14 +3572,14 @@ for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_LATEX2HTML="$as_dir/$ac_word$ac_exec_ext" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done --done -+ done - IFS=$as_save_IFS - - ;; -@@ -3325,29 +3587,24 @@ esac - fi - LATEX2HTML=$ac_cv_path_LATEX2HTML - if test -n "$LATEX2HTML"; then -- { echo "$as_me:$LINENO: result: $LATEX2HTML" >&5 --echo "${ECHO_T}$LATEX2HTML" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEX2HTML" >&5 -+$as_echo "$LATEX2HTML" >&6; } - else -- { echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi - - - - -- --{ echo "$as_me:$LINENO: checking for tgetent in -ltermlib" >&5 --echo $ECHO_N "checking for tgetent in -ltermlib... $ECHO_C" >&6; } --if test "${ac_cv_lib_termlib_tgetent+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - ac_check_lib_save_LIBS=$LIBS - LIBS="-ltermlib $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - /* Override any GCC internal prototype to avoid an error. -@@ -3365,39 +3622,18 @@ return tgetent (); - return 0; - } - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -+if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_termlib_tgetent=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_lib_termlib_tgetent=no -+ ac_cv_lib_termlib_tgetent=no - fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --{ echo "$as_me:$LINENO: result: $ac_cv_lib_termlib_tgetent" >&5 --echo "${ECHO_T}$ac_cv_lib_termlib_tgetent" >&6; } --if test $ac_cv_lib_termlib_tgetent = yes; then -+{ $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 -@@ -3406,19 +3642,14 @@ _ACEOF - - fi - -- --{ echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5 --echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6; } --if test "${ac_cv_lib_termcap_tgetent+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - ac_check_lib_save_LIBS=$LIBS - LIBS="-ltermcap $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - /* Override any GCC internal prototype to avoid an error. -@@ -3430,45 +3661,24 @@ extern "C" - char tgetent (); - int - main () --{ --return tgetent (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -+{ -+return tgetent (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_termcap_tgetent=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_lib_termcap_tgetent=no -+ ac_cv_lib_termcap_tgetent=no - fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5 --echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6; } --if test $ac_cv_lib_termcap_tgetent = yes; then -+{ $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 -@@ -3483,15 +3693,15 @@ 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 --{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 --echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -+{ $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 test "${ac_cv_prog_CPP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ 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" -@@ -3505,11 +3715,7 @@ do - # 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 >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #ifdef __STDC__ - # include -@@ -3518,76 +3724,34 @@ cat >>conftest.$ac_ext <<_ACEOF - #endif - Syntax error - _ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+if ac_fn_c_try_cpp "$LINENO"; then : - -+else - # Broken: fails on valid input. - continue - fi -- --rm -f conftest.err conftest.$ac_ext -+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 >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - _ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -+if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. - continue - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- - # Passes both tests. - ac_preproc_ok=: - break - fi -- --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then -+rm -f conftest.i conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then : - break - fi - -@@ -3599,8 +3763,8 @@ fi - else - ac_cv_prog_CPP=$CPP - fi --{ echo "$as_me:$LINENO: result: $CPP" >&5 --echo "${ECHO_T}$CPP" >&6; } -+{ $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 -@@ -3610,11 +3774,7 @@ do - # 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 >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #ifdef __STDC__ - # include -@@ -3623,83 +3783,40 @@ cat >>conftest.$ac_ext <<_ACEOF - #endif - Syntax error - _ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+if ac_fn_c_try_cpp "$LINENO"; then : - -+else - # Broken: fails on valid input. - continue - fi -- --rm -f conftest.err conftest.$ac_ext -+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 >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - _ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -+if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. - continue - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- - # Passes both tests. - ac_preproc_ok=: - break - fi -- --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then -- : -+rm -f conftest.i conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then : -+ - else -- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check --See \`config.log' for more details." >&5 --echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ { { $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 -@@ -3709,45 +3826,40 @@ ac_link='$CC -o conftest$ac_exeext $CFLA - ac_compiler_gnu=$ac_cv_c_compiler_gnu - - --{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 --echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } --if test "${ac_cv_path_GREP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- # Extract the first word of "grep ggrep" to use in msg output --if test -z "$GREP"; then --set dummy grep ggrep; ac_prog_name=$2 --if test "${ac_cv_path_GREP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 -+ # 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" -- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -- # Check for GNU ac_path_GREP and select it if it is found. -+ 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" -+ { test -f "$ac_path_GREP" && $as_test_x "$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 -- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" -+ $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" -- echo 'GREP' >> "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 -- ac_count=`expr $ac_count + 1` -+ 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" -@@ -3759,77 +3871,61 @@ case `"$ac_path_GREP" --version 2>&1` in - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; - esac - -- -- $ac_path_GREP_found && break 3 -+ $ac_path_GREP_found && break 3 -+ done -+ done - done --done -- --done - IFS=$as_save_IFS -- -- --fi -- --GREP="$ac_cv_path_GREP" --if test -z "$GREP"; then -- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 --echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} -- { (exit 1); exit 1; }; } --fi -- -+ 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 --{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 --echo "${ECHO_T}$ac_cv_path_GREP" >&6; } -+{ $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" - - --{ echo "$as_me:$LINENO: checking for egrep" >&5 --echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } --if test "${ac_cv_path_EGREP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 -- # Extract the first word of "egrep" to use in msg output --if test -z "$EGREP"; then --set dummy egrep; ac_prog_name=$2 --if test "${ac_cv_path_EGREP+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --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 -+ # 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" -- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -- # Check for GNU ac_path_EGREP and select it if it is found. -+ 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" -+ { test -f "$ac_path_EGREP" && $as_test_x "$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 -- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" -+ $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" -- echo 'EGREP' >> "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 -- ac_count=`expr $ac_count + 1` -+ 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" -@@ -3841,46 +3937,31 @@ case `"$ac_path_EGREP" --version 2>&1` i - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; - esac - -- -- $ac_path_EGREP_found && break 3 -+ $ac_path_EGREP_found && break 3 -+ done -+ done - done --done -- --done - IFS=$as_save_IFS -- -- --fi -- --EGREP="$ac_cv_path_EGREP" --if test -z "$EGREP"; then -- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 --echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} -- { (exit 1); exit 1; }; } --fi -- -+ 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 --{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 --echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } -+{ $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" - - --{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 --echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } --if test "${ac_cv_header_stdc+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - #include -@@ -3895,47 +3976,23 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_header_stdc=no -+ 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 >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "memchr" >/dev/null 2>&1; then -- : -+ $EGREP "memchr" >/dev/null 2>&1; then : -+ - else - ac_cv_header_stdc=no - fi -@@ -3945,18 +4002,14 @@ fi - - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "free" >/dev/null 2>&1; then -- : -+ $EGREP "free" >/dev/null 2>&1; then : -+ - else - ac_cv_header_stdc=no - fi -@@ -3966,14 +4019,10 @@ 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 -+ if test "$cross_compiling" = yes; then : - : - else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - #include -@@ -4000,69 +4049,34 @@ main () - return 0; - } - _ACEOF --rm -f conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- : --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+if ac_fn_c_try_run "$LINENO"; then : - --( exit $ac_status ) --ac_cv_header_stdc=no -+else -+ ac_cv_header_stdc=no - fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - -- - fi - fi --{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 --echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -+{ $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 - --cat >>confdefs.h <<\_ACEOF --#define STDC_HEADERS 1 --_ACEOF -+$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=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` --{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 --echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ 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 -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include - #include <$ac_hdr> -@@ -4076,39 +4090,19 @@ return 0; - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- eval "$as_ac_Header=no" -+ eval "$as_ac_Header=no" - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --ac_res=`eval echo '${'$as_ac_Header'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --if test `eval echo '${'$as_ac_Header'}'` = yes; then -+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 : - cat >>confdefs.h <<_ACEOF --#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 - _ACEOF - - ac_header_dirent=$ac_hdr; break -@@ -4117,17 +4111,13 @@ fi - done - # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. - if test $ac_header_dirent = dirent.h; then -- { echo "$as_me:$LINENO: checking for library containing opendir" >&5 --echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } --if test "${ac_cv_search_opendir+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ { $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 - ac_func_search_save_LIBS=$LIBS --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - /* Override any GCC internal prototype to avoid an error. -@@ -4152,66 +4142,39 @@ for ac_lib in '' dir; do - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi -- rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -+ if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- - fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext -- if test "${ac_cv_search_opendir+set}" = set; then -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext -+ if ${ac_cv_search_opendir+:} false; then : - break - fi - done --if test "${ac_cv_search_opendir+set}" = set; then -- : -+if ${ac_cv_search_opendir+:} false; then : -+ - else - ac_cv_search_opendir=no - fi - rm conftest.$ac_ext - LIBS=$ac_func_search_save_LIBS - fi --{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 --echo "${ECHO_T}$ac_cv_search_opendir" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -+$as_echo "$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 -- { echo "$as_me:$LINENO: checking for library containing opendir" >&5 --echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } --if test "${ac_cv_search_opendir+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+ { $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 - ac_func_search_save_LIBS=$LIBS --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - /* Override any GCC internal prototype to avoid an error. -@@ -4236,270 +4199,61 @@ for ac_lib in '' x; do - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi -- rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -+ if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- - fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext -- if test "${ac_cv_search_opendir+set}" = set; then -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext -+ if ${ac_cv_search_opendir+:} false; then : - break - fi - done --if test "${ac_cv_search_opendir+set}" = set; then -- : -+if ${ac_cv_search_opendir+:} false; then : -+ - else - ac_cv_search_opendir=no - fi - rm conftest.$ac_ext --LIBS=$ac_func_search_save_LIBS --fi --{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 --echo "${ECHO_T}$ac_cv_search_opendir" >&6; } --ac_res=$ac_cv_search_opendir --if test "$ac_res" != no; then -- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -- --fi -- --fi -- --ac_config_headers="$ac_config_headers config.h" -- --ac_config_files="$ac_config_files stamp-h" -- --# 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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --{ echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default -- --#include <$ac_header> --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- eval "$as_ac_Header=yes" --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- eval "$as_ac_Header=no" --fi -- --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --ac_res=`eval echo '${'$as_ac_Header'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --if test `eval echo '${'$as_ac_Header'}'` = yes; then -- cat >>confdefs.h <<_ACEOF --#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 --_ACEOF -- --fi -- --done -- -- -- -- -- -- -- -- -- -- --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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- { echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --fi --ac_res=`eval echo '${'$as_ac_Header'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --else -- # Is the header compilable? --{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 --echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include <$ac_header> --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_header_compiler=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+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; } -+ac_res=$ac_cv_search_opendir -+if test "$ac_res" != no; then : -+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -- ac_header_compiler=no - fi - --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6; } -+fi - --# Is the header present? --{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 --echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include <$ac_header> -+ac_config_headers="$ac_config_headers config.h" -+ -+ac_config_files="$ac_config_files stamp-h" -+ -+# 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 --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -- ac_header_preproc=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 - -- ac_header_preproc=no - fi - --rm -f conftest.err conftest.$ac_ext --{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --echo "${ECHO_T}$ac_header_preproc" >&6; } -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 --echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -+done - -- ;; --esac --{ echo "$as_me:$LINENO: checking for $ac_header" >&5 --echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- eval "$as_ac_Header=\$ac_header_preproc" --fi --ac_res=`eval echo '${'$as_ac_Header'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } - --fi --if test `eval echo '${'$as_ac_Header'}'` = yes; then -+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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF - - fi -@@ -4507,16 +4261,12 @@ fi - done - - --{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 --echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } --if test "${ac_cv_c_const+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - - int -@@ -4576,55 +4326,29 @@ main () - return 0; - } - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes - else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_c_const=no -+ ac_cv_c_const=no - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 --echo "${ECHO_T}$ac_cv_c_const" >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -+$as_echo "$ac_cv_c_const" >&6; } - if test $ac_cv_c_const = no; then - --cat >>confdefs.h <<\_ACEOF --#define const --_ACEOF -+$as_echo "#define const /**/" >>confdefs.h - - fi - --{ echo "$as_me:$LINENO: checking for inline" >&5 --echo $ECHO_N "checking for inline... $ECHO_C" >&6; } --if test "${ac_cv_c_inline+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 -+{ $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 - ac_cv_c_inline=no - for ac_kw in inline __inline__ __inline; do -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #ifndef __cplusplus - typedef int foo_t; -@@ -4633,39 +4357,16 @@ $ac_kw foo_t foo () {return 0; } - #endif - - _ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -+if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- - fi -- - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break - done - - fi --{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 --echo "${ECHO_T}$ac_cv_c_inline" >&6; } -- -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -+$as_echo "$ac_cv_c_inline" >&6; } - - case $ac_cv_c_inline in - inline | yes) ;; -@@ -4682,61 +4383,9 @@ _ACEOF - ;; - esac - --{ echo "$as_me:$LINENO: checking for size_t" >&5 --echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } --if test "${ac_cv_type_size_t+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --typedef size_t ac__type_new_; --int --main () --{ --if ((ac__type_new_ *) 0) -- return 0; --if (sizeof (ac__type_new_)) -- return 0; -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_cv_type_size_t=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_type_size_t=no --fi -+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 : - --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 --echo "${ECHO_T}$ac_cv_type_size_t" >&6; } --if test $ac_cv_type_size_t = yes; then -- : - else - - cat >>confdefs.h <<_ACEOF -@@ -4746,183 +4395,18 @@ _ACEOF - fi - - -- - for ac_func in vprintf --do --as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` --{ echo "$as_me:$LINENO: checking for $ac_func" >&5 --echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } --if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define $ac_func to an innocuous variant, in case declares $ac_func. -- For example, HP-UX 11i declares gettimeofday. */ --#define $ac_func innocuous_$ac_func -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char $ac_func (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef $ac_func -- --/* 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 $ac_func (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined __stub_$ac_func || defined __stub___$ac_func --choke me --#endif -- --int --main () --{ --return $ac_func (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -- eval "$as_ac_var=yes" --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- eval "$as_ac_var=no" --fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext --fi --ac_res=`eval echo '${'$as_ac_var'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --if test `eval echo '${'$as_ac_var'}'` = yes; then -+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 `echo "HAVE_$ac_func" | $as_tr_cpp` 1 --_ACEOF -- --{ echo "$as_me:$LINENO: checking for _doprnt" >&5 --echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } --if test "${ac_cv_func__doprnt+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define _doprnt to an innocuous variant, in case declares _doprnt. -- For example, HP-UX 11i declares gettimeofday. */ --#define _doprnt innocuous__doprnt -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char _doprnt (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef _doprnt -- --/* 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 _doprnt (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined __stub__doprnt || defined __stub____doprnt --choke me --#endif -- --int --main () --{ --return _doprnt (); -- ; -- return 0; --} -+#define HAVE_VPRINTF 1 - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -- ac_cv_func__doprnt=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 - -- ac_cv_func__doprnt=no --fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext --fi --{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 --echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } --if test $ac_cv_func__doprnt = yes; then -+ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -+if test "x$ac_cv_func__doprnt" = xyes; then : - --cat >>confdefs.h <<\_ACEOF --#define HAVE_DOPRNT 1 --_ACEOF -+$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h - - fi - -@@ -4930,105 +4414,13 @@ fi - done - - -- -- -- -- -- -- -- -- -- -- -- - for ac_func in access closedir fileno isatty opendir readdir stat strcasecmp strdup strlwr strtol --do --as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` --{ echo "$as_me:$LINENO: checking for $ac_func" >&5 --echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } --if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define $ac_func to an innocuous variant, in case declares $ac_func. -- For example, HP-UX 11i declares gettimeofday. */ --#define $ac_func innocuous_$ac_func -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char $ac_func (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef $ac_func -- --/* 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 $ac_func (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined __stub_$ac_func || defined __stub___$ac_func --choke me --#endif -- --int --main () --{ --return $ac_func (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then -- eval "$as_ac_var=yes" --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- eval "$as_ac_var=no" --fi -- --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext --fi --ac_res=`eval echo '${'$as_ac_var'}'` -- { echo "$as_me:$LINENO: result: $ac_res" >&5 --echo "${ECHO_T}$ac_res" >&6; } --if test `eval echo '${'$as_ac_var'}'` = yes; then -+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 `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - - fi -@@ -5064,12 +4456,13 @@ _ACEOF - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( -- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 --echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; -+ *_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;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( -- *) $as_unset $ac_var ;; -+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( -+ *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done -@@ -5077,8 +4470,8 @@ echo "$as_me: WARNING: Cache variable $a - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) -- # `set' does not quote correctly, so add quotes (double-quote -- # substitution turns \\\\ into \\, and sed turns \\ into \). -+ # `set' does not quote correctly, so add quotes: double-quote -+ # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" -@@ -5100,13 +4493,24 @@ echo "$as_me: WARNING: Cache variable $a - :end' >>confcache - if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then -- test "x$cache_file" != "x/dev/null" && -- { echo "$as_me:$LINENO: updating cache $cache_file" >&5 --echo "$as_me: updating cache $cache_file" >&6;} -- cat confcache >$cache_file -+ 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;} -+ if test ! -f "$cache_file" || test -h "$cache_file"; then -+ cat confcache >"$cache_file" -+ else -+ case $cache_file in #( -+ */* | ?:*) -+ mv -f confcache "$cache_file"$$ && -+ mv -f "$cache_file"$$ "$cache_file" ;; #( -+ *) -+ mv -f confcache "$cache_file" ;; -+ esac -+ fi -+ fi - else -- { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 --echo "$as_me: not updating unwritable cache $cache_file" >&6;} -+ { $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;} - fi - fi - rm -f confcache -@@ -5119,14 +4523,15 @@ DEFS=-DHAVE_CONFIG_H - - ac_libobjs= - ac_ltlibobjs= -+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=`echo "$ac_i" | sed "$ac_script"` -+ ac_i=`$as_echo "$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. -- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" -- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" -+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' - done - LIBOBJS=$ac_libobjs - -@@ -5134,12 +4539,14 @@ LTLIBOBJS=$ac_ltlibobjs - - - --: ${CONFIG_STATUS=./config.status} -+: "${CONFIG_STATUS=./config.status}" -+ac_write_fail=0 - ac_clean_files_save=$ac_clean_files - ac_clean_files="$ac_clean_files $CONFIG_STATUS" --{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 --echo "$as_me: creating $CONFIG_STATUS" >&6;} --cat >$CONFIG_STATUS <<_ACEOF -+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -+as_write_fail=0 -+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 - #! $SHELL - # Generated by $as_me. - # Run this file to recreate the current configuration. -@@ -5149,59 +4556,79 @@ cat >$CONFIG_STATUS <<_ACEOF - debug=false - ac_cs_recheck=false - ac_cs_silent=false --SHELL=\${CONFIG_SHELL-$SHELL} --_ACEOF - --cat >>$CONFIG_STATUS <<\_ACEOF --## --------------------- ## --## M4sh Initialization. ## --## --------------------- ## -+SHELL=\${CONFIG_SHELL-$SHELL} -+export SHELL -+_ASEOF -+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -+## -------------------- ## -+## M4sh Initialization. ## -+## -------------------- ## - - # Be more Bourne compatible - DUALCASE=1; export DUALCASE # for MKS sh --if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: -- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which -+ # 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 -- case `(set -o) 2>/dev/null` in -- *posix*) set -o posix ;; -+ case `(set -o) 2>/dev/null` in #( -+ *posix*) : -+ set -o posix ;; #( -+ *) : -+ ;; - esac -- - fi - - -- -- --# PATH needs CR --# Avoid depending upon Character Ranges. --as_cr_letters='abcdefghijklmnopqrstuvwxyz' --as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' --as_cr_Letters=$as_cr_letters$as_cr_LETTERS --as_cr_digits='0123456789' --as_cr_alnum=$as_cr_Letters$as_cr_digits -- --# The user is always right. --if test "${PATH_SEPARATOR+set}" != set; then -- echo "#! /bin/sh" >conf$$.sh -- echo "exit 0" >>conf$$.sh -- chmod +x conf$$.sh -- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then -- PATH_SEPARATOR=';' -+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 -- PATH_SEPARATOR=: -+ 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 -- rm -f conf$$.sh -+ export as_echo_body -+ as_echo='sh -c $as_echo_body as_echo' - fi - --# Support unset when possible. --if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -- as_unset=unset --else -- as_unset=false -+# The user is always right. -+if test "${PATH_SEPARATOR+set}" != set; 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 || -+ PATH_SEPARATOR=';' -+ } - fi - - -@@ -5210,20 +4637,19 @@ fi - # 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.) --as_nl=' --' - IFS=" "" $as_nl" - - # Find who we are. Look in the path if we contain no directory separator. --case $0 in -+as_myself= -+case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - 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 --done -+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -+ done - IFS=$as_save_IFS - - ;; -@@ -5234,32 +4660,111 @@ if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then -- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -- { (exit 1); exit 1; } -+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -+ exit 1 - fi - --# Work around bugs in pre-3.0 UWIN ksh. --for as_var in ENV MAIL MAILPATH --do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -+# 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. --for as_var in \ -- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -- LC_TELEPHONE LC_TIME --do -- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then -- eval $as_var=C; export $as_var -- else -- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -- fi --done -+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] -+# ---------------------------------------- -+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -+# script with STATUS, using 1 if that was 0. -+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 -+ fi -+ $as_echo "$as_me: error: $2" >&2 -+ as_fn_exit $as_status -+} # as_fn_error -+ -+ -+# as_fn_set_status STATUS -+# ----------------------- -+# Set $? to STATUS, without forking. -+as_fn_set_status () -+{ -+ return $1 -+} # as_fn_set_status -+ -+# as_fn_exit STATUS -+# ----------------- -+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -+as_fn_exit () -+{ -+ set +e -+ as_fn_set_status $1 -+ exit $1 -+} # as_fn_exit -+ -+# as_fn_unset VAR -+# --------------- -+# Portably unset VAR. -+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 : -+ eval 'as_fn_append () -+ { -+ eval $1+=\$2 -+ }' -+else -+ as_fn_append () -+ { -+ eval $1=\$$1\$2 -+ } -+fi # as_fn_append -+ -+# as_fn_arith ARG... -+# ------------------ -+# 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 : -+ eval 'as_fn_arith () -+ { -+ as_val=$(( $* )) -+ }' -+else -+ as_fn_arith () -+ { -+ as_val=`expr "$@" || test $? -eq 1` -+ } -+fi # as_fn_arith -+ - --# Required to use basename. - if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -@@ -5273,13 +4778,17 @@ else - as_basename=false - fi - -+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -+ as_dirname=dirname -+else -+ as_dirname=false -+fi - --# Name of the executable. - as_me=`$as_basename -- "$0" || - $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || --echo X/"$0" | -+$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q -@@ -5294,104 +4803,103 @@ echo X/"$0" | - } - s/.*/./; q'` - --# CDPATH. --$as_unset CDPATH -- -- -- -- as_lineno_1=$LINENO -- as_lineno_2=$LINENO -- test "x$as_lineno_1" != "x$as_lineno_2" && -- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { -- -- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO -- # uniformly replaced by the line number. The first 'sed' inserts a -- # line-number line after each line using $LINENO; the second 'sed' -- # does the real work. The second script uses 'N' to pair each -- # line-number line with the line containing $LINENO, and appends -- # trailing '-' during substitution so that $LINENO is not a special -- # case at line end. -- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the -- # scripts with optimization help from Paolo Bonzini. Blame Lee -- # E. McMahon (1931-1989) for sed's syntax. :-) -- sed -n ' -- p -- /[$]LINENO/= -- ' <$as_myself | -- sed ' -- s/[$]LINENO.*/&-/ -- t lineno -- b -- :lineno -- N -- :loop -- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ -- t loop -- s/-\n.*// -- ' >$as_me.lineno && -- chmod +x "$as_me.lineno" || -- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 -- { (exit 1); exit 1; }; } -- -- # Don't try to exec as it changes $[0], causing all sort of problems -- # (the dirname of $[0] is not the place where we might find the -- # original and so on. Autoconf is especially sensitive to this). -- . "./$as_me.lineno" -- # Exit status is that of the last command. -- exit --} -- -- --if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -- as_dirname=dirname --else -- as_dirname=false --fi -+# Avoid depending upon Character Ranges. -+as_cr_letters='abcdefghijklmnopqrstuvwxyz' -+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -+as_cr_Letters=$as_cr_letters$as_cr_LETTERS -+as_cr_digits='0123456789' -+as_cr_alnum=$as_cr_Letters$as_cr_digits - - ECHO_C= ECHO_N= ECHO_T= --case `echo -n x` in -+case `echo -n x` in #((((( - -n*) -- case `echo 'x\c'` in -+ case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. -- *) ECHO_C='\c';; -+ xy) ECHO_C='\c';; -+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null -+ ECHO_T=' ';; - esac;; - *) - ECHO_N='-n';; - esac - --if expr a : '\(a\)' >/dev/null 2>&1 && -- test "X`expr 00001 : '.*\(...\)'`" = X001; then -- as_expr=expr --else -- as_expr=false --fi -- - rm -f conf$$ conf$$.exe conf$$.file - if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file - else - rm -f conf$$.dir -- mkdir conf$$.dir -+ mkdir conf$$.dir 2>/dev/null - fi --echo >conf$$.file --if ln -s conf$$.file conf$$ 2>/dev/null; then -- as_ln_s='ln -s' -- # ... but there are two gotchas: -- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. -- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. -- # In both cases, we have to default to `cp -p'. -- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || -+if (echo >conf$$.file) 2>/dev/null; then -+ if ln -s conf$$.file conf$$ 2>/dev/null; then -+ as_ln_s='ln -s' -+ # ... but there are two gotchas: -+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. -+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. -+ # In both cases, we have to default to `cp -p'. -+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || -+ as_ln_s='cp -p' -+ elif ln conf$$.file conf$$ 2>/dev/null; then -+ as_ln_s=ln -+ else - as_ln_s='cp -p' --elif ln conf$$.file conf$$ 2>/dev/null; then -- as_ln_s=ln -+ fi - else - as_ln_s='cp -p' - fi - rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file - rmdir conf$$.dir 2>/dev/null - -+ -+# as_fn_mkdir_p -+# ------------- -+# Create "$as_dir" as a directory, including parents if necessary. -+as_fn_mkdir_p () -+{ -+ -+ case $as_dir in #( -+ -*) as_dir=./$as_dir;; -+ esac -+ test -d "$as_dir" || eval $as_mkdir_p || { -+ as_dirs= -+ while :; do -+ case $as_dir in #( -+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( -+ *) as_qdir=$as_dir;; -+ esac -+ as_dirs="'$as_qdir' $as_dirs" -+ as_dir=`$as_dirname -- "$as_dir" || -+$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" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` -+ test -d "$as_dir" && break -+ done -+ test -z "$as_dirs" || eval "mkdir $as_dirs" -+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -+ -+ -+} # as_fn_mkdir_p - if mkdir -p . 2>/dev/null; then -- as_mkdir_p=: -+ as_mkdir_p='mkdir -p "$as_dir"' - else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -@@ -5408,12 +4916,12 @@ else - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then -- test -d "$1/."; -+ test -d "$1/."; - else -- case $1 in -- -*)set "./$1";; -+ case $1 in #( -+ -*)set "./$1";; - esac; -- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in -+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -@@ -5428,13 +4936,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr - - - exec 6>&1 -+## ----------------------------------- ## -+## Main body of $CONFIG_STATUS script. ## -+## ----------------------------------- ## -+_ASEOF -+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - --# Save the log message, to keep $[0] and so on meaningful, and to -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+# Save the log message, to keep $0 and so on meaningful, and to - # 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.6.4, which was --generated by GNU Autoconf 2.61. Invocation command line was -+generated by GNU Autoconf 2.68. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS -@@ -5447,29 +4961,41 @@ on `(hostname || uname -n) 2>/dev/null | - - _ACEOF - --cat >>$CONFIG_STATUS <<_ACEOF -+case $ac_config_files in *" -+"*) set x $ac_config_files; shift; ac_config_files=$*;; -+esac -+ -+case $ac_config_headers in *" -+"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -+esac -+ -+ -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - # Files that config.status was made for. - config_files="$ac_config_files" - config_headers="$ac_config_headers" - - _ACEOF - --cat >>$CONFIG_STATUS <<\_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - ac_cs_usage="\ --\`$as_me' instantiates files from templates according to the --current configuration. -+\`$as_me' instantiates files and other configuration actions -+from templates according to the current configuration. Unless the files -+and actions are specified as TAGs, all are instantiated by default. - --Usage: $0 [OPTIONS] [FILE]... -+Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit -- -q, --quiet do not print progress messages -+ --config print configuration, then exit -+ -q, --quiet, --silent -+ do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions -- --file=FILE[:TEMPLATE] -- instantiate the configuration file FILE -- --header=FILE[:TEMPLATE] -- instantiate the configuration header FILE -+ --file=FILE[:TEMPLATE] -+ instantiate the configuration file FILE -+ --header=FILE[:TEMPLATE] -+ instantiate the configuration header FILE - - Configuration files: - $config_files -@@ -5477,36 +5003,42 @@ $config_files - Configuration headers: - $config_headers - --Report bugs to ." -+Report bugs to the package provider." - - _ACEOF --cat >>$CONFIG_STATUS <<_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" - ac_cs_version="\\ - ChkTeX config.status 1.6.4 --configured by $0, generated by GNU Autoconf 2.61, -- with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -+configured by $0, generated by GNU Autoconf 2.68, -+ with options \\"\$ac_cs_config\\" - --Copyright (C) 2006 Free Software Foundation, Inc. -+Copyright (C) 2010 Free Software Foundation, Inc. - This config.status script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it." - - ac_pwd='$ac_pwd' - srcdir='$srcdir' - INSTALL='$INSTALL' -+test -n "\$AWK" || AWK=awk - _ACEOF - --cat >>$CONFIG_STATUS <<\_ACEOF --# If no file are specified by the user, then we need to provide default --# value. By we need to know if files were specified by the user. -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+# The default lists apply if the user does not specify any file. - ac_need_defaults=: - while test $# != 0 - do - case $1 in -- --*=*) -+ --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; -+ --*=) -+ ac_option=`expr "X$1" : 'X\([^=]*\)='` -+ ac_optarg= -+ ac_shift=: -+ ;; - *) - ac_option=$1 - ac_optarg=$2 -@@ -5519,34 +5051,41 @@ do - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) -- echo "$ac_cs_version"; exit ;; -+ $as_echo "$ac_cs_version"; exit ;; -+ --config | --confi | --conf | --con | --co | --c ) -+ $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift -- CONFIG_FILES="$CONFIG_FILES $ac_optarg" -+ case $ac_optarg in -+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ '') as_fn_error $? "missing file argument" ;; -+ esac -+ as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift -- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" -+ case $ac_optarg in -+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ esac -+ as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header -- { echo "$as_me: error: ambiguous option: $1 --Try \`$0 --help' for more information." >&2 -- { (exit 1); exit 1; }; };; -+ as_fn_error $? "ambiguous option: \`$1' -+Try \`$0 --help' for more information.";; - --help | --hel | -h ) -- echo "$ac_cs_usage"; exit ;; -+ $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. -- -*) { echo "$as_me: error: unrecognized option: $1 --Try \`$0 --help' for more information." >&2 -- { (exit 1); exit 1; }; } ;; -+ -*) as_fn_error $? "unrecognized option: \`$1' -+Try \`$0 --help' for more information." ;; - -- *) ac_config_targets="$ac_config_targets $1" -+ *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac -@@ -5561,30 +5100,32 @@ if $ac_cs_silent; then - fi - - _ACEOF --cat >>$CONFIG_STATUS <<_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - if \$ac_cs_recheck; then -- echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 -- CONFIG_SHELL=$SHELL -+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -+ shift -+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 -+ CONFIG_SHELL='$SHELL' - export CONFIG_SHELL -- exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -+ exec "\$@" - fi - - _ACEOF --cat >>$CONFIG_STATUS <<\_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - exec 5>>config.log - { - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX - ## Running $as_me. ## - _ASBOX -- echo "$ac_log" -+ $as_echo "$ac_log" - } >&5 - - _ACEOF --cat >>$CONFIG_STATUS <<_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - _ACEOF - --cat >>$CONFIG_STATUS <<\_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - - # Handling of arguments. - for ac_config_target in $ac_config_targets -@@ -5598,9 +5139,7 @@ do - "Readme.header") CONFIG_FILES="$CONFIG_FILES Readme.header" ;; - "ChkTeX.tex") CONFIG_FILES="$CONFIG_FILES ChkTeX.tex" ;; - -- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 --echo "$as_me: error: invalid argument: $ac_config_target" >&2;} -- { (exit 1); exit 1; }; };; -+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac - done - -@@ -5622,173 +5161,302 @@ fi - # after its creation but before its name has been assigned to `$tmp'. - $debug || - { -- tmp= -+ tmp= ac_tmp= - trap 'exit_status=$? -- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -+ : "${ac_tmp:=$tmp}" -+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status - ' 0 -- trap '{ (exit 1); exit 1; }' 1 2 13 15 -+ trap 'as_fn_exit 1' 1 2 13 15 - } - # Create a (secure) tmp directory for tmp files. - - { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && -- test -n "$tmp" && test -d "$tmp" -+ test -d "$tmp" - } || - { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") --} || --{ -- echo "$me: cannot create a temporary directory in ." >&2 -- { (exit 1); exit 1; } --} -- --# --# Set up the sed scripts for CONFIG_FILES section. --# -+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -+ac_tmp=$tmp - --# No need to generate the scripts if there are no CONFIG_FILES. --# This happens for instance when ./config.status config.h -+# Set up the scripts for CONFIG_FILES section. -+# No need to generate them if there are no CONFIG_FILES. -+# This happens for instance with `./config.status config.h'. - if test -n "$CONFIG_FILES"; then - --_ACEOF - -+ac_cr=`echo X | tr X '\015'` -+# On cygwin, bash can eat \r inside `` if the user requested igncr. -+# But we know of no other shell where ac_cr would be empty at this -+# point, so we can use a bashism as a fallback. -+if test "x$ac_cr" = x; then -+ eval ac_cr=\$\'\\r\' -+fi -+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then -+ ac_cs_awk_cr='\\r' -+else -+ ac_cs_awk_cr=$ac_cr -+fi -+ -+echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -+_ACEOF - - -+{ -+ echo "cat >conf$$subs.awk <<_ACEOF" && -+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && -+ echo "_ACEOF" -+} >conf$$subs.sh || -+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` - ac_delim='%!_!# ' - for ac_last_try in false false false false false :; do -- cat >conf$$subs.sed <<_ACEOF --SHELL!$SHELL$ac_delim --PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim --PACKAGE_NAME!$PACKAGE_NAME$ac_delim --PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim --PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim --PACKAGE_STRING!$PACKAGE_STRING$ac_delim --PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim --exec_prefix!$exec_prefix$ac_delim --prefix!$prefix$ac_delim --program_transform_name!$program_transform_name$ac_delim --bindir!$bindir$ac_delim --sbindir!$sbindir$ac_delim --libexecdir!$libexecdir$ac_delim --datarootdir!$datarootdir$ac_delim --datadir!$datadir$ac_delim --sysconfdir!$sysconfdir$ac_delim --sharedstatedir!$sharedstatedir$ac_delim --localstatedir!$localstatedir$ac_delim --includedir!$includedir$ac_delim --oldincludedir!$oldincludedir$ac_delim --docdir!$docdir$ac_delim --infodir!$infodir$ac_delim --htmldir!$htmldir$ac_delim --dvidir!$dvidir$ac_delim --pdfdir!$pdfdir$ac_delim --psdir!$psdir$ac_delim --libdir!$libdir$ac_delim --localedir!$localedir$ac_delim --mandir!$mandir$ac_delim --DEFS!$DEFS$ac_delim --ECHO_C!$ECHO_C$ac_delim --ECHO_N!$ECHO_N$ac_delim --ECHO_T!$ECHO_T$ac_delim --LIBS!$LIBS$ac_delim --build_alias!$build_alias$ac_delim --host_alias!$host_alias$ac_delim --target_alias!$target_alias$ac_delim --SCRIPTS!$SCRIPTS$ac_delim --ELISPDIR!$ELISPDIR$ac_delim --CLEAN!$CLEAN$ac_delim --CC!$CC$ac_delim --CFLAGS!$CFLAGS$ac_delim --LDFLAGS!$LDFLAGS$ac_delim --CPPFLAGS!$CPPFLAGS$ac_delim --ac_ct_CC!$ac_ct_CC$ac_delim --EXEEXT!$EXEEXT$ac_delim --OBJEXT!$OBJEXT$ac_delim --INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim --INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim --INSTALL_DATA!$INSTALL_DATA$ac_delim --LN_S!$LN_S$ac_delim --PERL5!$PERL5$ac_delim --GROFF!$GROFF$ac_delim --LATEX!$LATEX$ac_delim --DVIPS!$DVIPS$ac_delim --LYNX!$LYNX$ac_delim --LATEX2HTML!$LATEX2HTML$ac_delim --CPP!$CPP$ac_delim --GREP!$GREP$ac_delim --EGREP!$EGREP$ac_delim --LIBOBJS!$LIBOBJS$ac_delim --LTLIBOBJS!$LTLIBOBJS$ac_delim --_ACEOF -+ . ./conf$$subs.sh || -+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - -- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 62; then -+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` -+ if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then -- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 --echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} -- { (exit 1); exit 1; }; } -+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi - done -+rm -f conf$$subs.sh - --ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` --if test -n "$ac_eof"; then -- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` -- ac_eof=`expr $ac_eof + 1` --fi -- --cat >>$CONFIG_STATUS <<_ACEOF --cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof --/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end --_ACEOF --sed ' --s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g --s/^/s,@/; s/!/@,|#_!!_#|/ --:n --t n --s/'"$ac_delim"'$/,g/; t --s/$/\\/; p --N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n --' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF --:end --s/|#_!!_#|//g --CEOF$ac_eof -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && - _ACEOF -+sed -n ' -+h -+s/^/S["/; s/!.*/"]=/ -+p -+g -+s/^[^!]*!// -+:repl -+t repl -+s/'"$ac_delim"'$// -+t delim -+:nl -+h -+s/\(.\{148\}\)..*/\1/ -+t more1 -+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -+p -+n -+b repl -+:more1 -+s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -+p -+g -+s/.\{148\}// -+t nl -+:delim -+h -+s/\(.\{148\}\)..*/\1/ -+t more2 -+s/["\\]/\\&/g; s/^/"/; s/$/"/ -+p -+b -+:more2 -+s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -+p -+g -+s/.\{148\}// -+t delim -+' >$CONFIG_STATUS || ac_write_fail=1 -+rm -f conf$$subs.awk -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+_ACAWK -+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && -+ for (key in S) S_is_set[key] = 1 -+ FS = "" -+ -+} -+{ -+ line = $ 0 -+ nfields = split(line, field, "@") -+ substed = 0 -+ len = length(field[1]) -+ for (i = 2; i < nfields; i++) { -+ key = field[i] -+ keylen = length(key) -+ if (S_is_set[key]) { -+ value = S[key] -+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) -+ len += length(value) + length(field[++i]) -+ substed = 1 -+ } else -+ len += 1 + keylen -+ } -+ -+ print line -+} - -+_ACAWK -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then -+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -+else -+ cat -+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ -+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -+_ACEOF - --# VPATH may cause trouble with some makes, so we remove $(srcdir), --# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -+# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and - # trailing colons and then remove the whole line if VPATH becomes empty - # (actually we leave an empty line to preserve line numbers). - if test "x$srcdir" = x.; then -- ac_vpsub='/^[ ]*VPATH[ ]*=/{ --s/:*\$(srcdir):*/:/ --s/:*\${srcdir}:*/:/ --s/:*@srcdir@:*/:/ --s/^\([^=]*=[ ]*\):*/\1/ -+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -+h -+s/// -+s/^/:/ -+s/[ ]*$/:/ -+s/:\$(srcdir):/:/g -+s/:\${srcdir}:/:/g -+s/:@srcdir@:/:/g -+s/^:*// - s/:*$// -+x -+s/\(=[ ]*\).*/\1/ -+G -+s/\n// - s/^[^=]*=[ ]*$// - }' - fi - --cat >>$CONFIG_STATUS <<\_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - fi # test -n "$CONFIG_FILES" - -+# Set up the scripts for CONFIG_HEADERS section. -+# No need to generate them if there are no CONFIG_HEADERS. -+# This happens for instance with `./config.status Makefile'. -+if test -n "$CONFIG_HEADERS"; then -+cat >"$ac_tmp/defines.awk" <<\_ACAWK || -+BEGIN { -+_ACEOF -+ -+# Transform confdefs.h into an awk script `defines.awk', embedded as -+# here-document in config.status, that substitutes the proper values into -+# config.h.in to produce config.h. -+ -+# Create a delimiter string that does not exist in confdefs.h, to ease -+# handling of long lines. -+ac_delim='%!_!# ' -+for ac_last_try in false false :; do -+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h` -+ if test -z "$ac_tt"; then -+ break -+ elif $ac_last_try; then -+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 -+ else -+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " -+ fi -+done -+ -+# For the awk script, D is an array of macro values keyed by name, -+# likewise P contains macro parameters if any. Preserve backslash -+# newline sequences. -+ -+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -+sed -n ' -+s/.\{148\}/&'"$ac_delim"'/g -+t rset -+:rset -+s/^[ ]*#[ ]*define[ ][ ]*/ / -+t def -+d -+:def -+s/\\$// -+t bsnl -+s/["\\]/\\&/g -+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -+D["\1"]=" \3"/p -+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -+d -+:bsnl -+s/["\\]/\\&/g -+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -+D["\1"]=" \3\\\\\\n"\\/p -+t cont -+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -+t cont -+d -+:cont -+n -+s/.\{148\}/&'"$ac_delim"'/g -+t clear -+:clear -+s/\\$// -+t bsnlc -+s/["\\]/\\&/g; s/^/"/; s/$/"/p -+d -+:bsnlc -+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -+b cont -+' >$CONFIG_STATUS || ac_write_fail=1 -+ -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ for (key in D) D_is_set[key] = 1 -+ FS = "" -+} -+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { -+ line = \$ 0 -+ split(line, arg, " ") -+ if (arg[1] == "#") { -+ defundef = arg[2] -+ mac1 = arg[3] -+ } else { -+ defundef = substr(arg[1], 2) -+ mac1 = arg[2] -+ } -+ split(mac1, mac2, "(") #) -+ macro = mac2[1] -+ prefix = substr(line, 1, index(line, defundef) - 1) -+ if (D_is_set[macro]) { -+ # Preserve the white space surrounding the "#". -+ print prefix "define", macro P[macro] D[macro] -+ next -+ } else { -+ # Replace #undef with comments. This is necessary, for example, -+ # in the case of _POSIX_SOURCE, which is predefined and required -+ # on some systems where configure will not decide to define it. -+ if (defundef == "undef") { -+ print "/*", prefix defundef, macro, "*/" -+ next -+ } -+ } -+} -+{ print } -+_ACAWK -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -+fi # test -n "$CONFIG_HEADERS" -+ - --for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS -+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " -+shift -+for ac_tag - do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; -- :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 --echo "$as_me: error: Invalid tag $ac_tag." >&2;} -- { (exit 1); exit 1; }; };; -+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac -@@ -5807,7 +5475,7 @@ echo "$as_me: error: Invalid tag $ac_tag - for ac_f - do - case $ac_f in -- -) ac_f="$tmp/stdin";; -+ -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. -@@ -5816,26 +5484,34 @@ echo "$as_me: error: Invalid tag $ac_tag - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || -- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 --echo "$as_me: error: cannot find input file: $ac_f" >&2;} -- { (exit 1); exit 1; }; };; -+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac -- ac_file_inputs="$ac_file_inputs $ac_f" -+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac -+ as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ -- configure_input="Generated from "`IFS=: -- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." -+ configure_input='Generated from '` -+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' -+ `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" -- { echo "$as_me:$LINENO: creating $ac_file" >&5 --echo "$as_me: creating $ac_file" >&6;} -+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -+$as_echo "$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" | -+ sed 's/[\\\\&|]/\\\\&/g'`;; #( -+ *) ac_sed_conf_input=$configure_input;; -+ esac - - case $ac_tag in -- *:-:* | *:-) cat >"$tmp/stdin";; -+ *:-:* | *:-) cat >"$ac_tmp/stdin" \ -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac -@@ -5845,42 +5521,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || --echo X"$ac_file" | -- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -- s//\1/ -- q -- } -- /^X\(\/\/\)[^/].*/{ -- s//\1/ -- q -- } -- /^X\(\/\/\)$/{ -- s//\1/ -- q -- } -- /^X\(\/\).*/{ -- s//\1/ -- q -- } -- s/.*/./; q'` -- { as_dir="$ac_dir" -- case $as_dir in #( -- -*) as_dir=./$as_dir;; -- esac -- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { -- as_dirs= -- while :; do -- case $as_dir in #( -- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( -- *) as_qdir=$as_dir;; -- esac -- as_dirs="'$as_qdir' $as_dirs" -- as_dir=`$as_dirname -- "$as_dir" || --$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$as_dir" : 'X\(//\)[^/]' \| \ -- X"$as_dir" : 'X\(//\)$' \| \ -- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || --echo X"$as_dir" | -+$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q -@@ -5898,20 +5539,15 @@ echo X"$as_dir" | - q - } - s/.*/./; q'` -- test -d "$as_dir" && break -- done -- test -z "$as_dirs" || eval "mkdir $as_dirs" -- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 --echo "$as_me: error: cannot create directory $as_dir" >&2;} -- { (exit 1); exit 1; }; }; } -+ as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - - case "$ac_dir" in - .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) -- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` -+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. -- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` -+ ac_top_builddir_sub=`$as_echo "$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/ ;; -@@ -5951,12 +5587,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_ - esac - _ACEOF - --cat >>$CONFIG_STATUS <<\_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - # If the template does not know about datarootdir, expand it. - # FIXME: This hack should be removed a few years after 2.60. - ac_datarootdir_hack=; ac_datarootdir_seen= -- --case `sed -n '/datarootdir/ { -+ac_sed_dataroot=' -+/datarootdir/ { - p - q - } -@@ -5964,36 +5600,37 @@ case `sed -n '/datarootdir/ { - /@docdir@/p - /@infodir@/p - /@localedir@/p --/@mandir@/p --' $ac_file_inputs` in -+/@mandir@/p' -+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in - *datarootdir*) ac_datarootdir_seen=yes;; - *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) -- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 --echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -+ { $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;} - _ACEOF --cat >>$CONFIG_STATUS <<_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g -- s&\\\${datarootdir}&$datarootdir&g' ;; -+ s&\\\${datarootdir}&$datarootdir&g' ;; - esac - _ACEOF - - # Neutralize VPATH when `$srcdir' = `.'. - # Shell code in configure.ac might set extrasub. - # FIXME: do we really want to maintain this feature? --cat >>$CONFIG_STATUS <<_ACEOF -- sed "$ac_vpsub -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ac_sed_extra="$ac_vpsub - $extrasub - _ACEOF --cat >>$CONFIG_STATUS <<\_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - :t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b --s&@configure_input@&$configure_input&;t t -+s|@configure_input@|$ac_sed_conf_input|;t t - s&@top_builddir@&$ac_top_builddir_sub&;t t -+s&@top_build_prefix@&$ac_top_build_prefix&;t t - s&@srcdir@&$ac_srcdir&;t t - s&@abs_srcdir@&$ac_abs_srcdir&;t t - s&@top_srcdir@&$ac_top_srcdir&;t t -@@ -6003,119 +5640,49 @@ s&@abs_builddir@&$ac_abs_builddir&;t t - s&@abs_top_builddir@&$ac_abs_top_builddir&;t t - s&@INSTALL@&$ac_INSTALL&;t t - $ac_datarootdir_hack --" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out -+" -+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ -+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - - test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && -- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && -- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && -- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' --which seems to be undefined. Please make sure it is defined." >&5 --echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' --which seems to be undefined. Please make sure it is defined." >&2;} -+ { 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' -+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' -+which seems to be undefined. Please make sure it is defined" >&2;} - -- rm -f "$tmp/stdin" -+ rm -f "$ac_tmp/stdin" - case $ac_file in -- -) cat "$tmp/out"; rm -f "$tmp/out";; -- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; -- esac -+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; -+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; -+ esac \ -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # --_ACEOF -- --# Transform confdefs.h into a sed script `conftest.defines', that --# substitutes the proper values into config.h.in to produce config.h. --rm -f conftest.defines conftest.tail --# First, append a space to every undef/define line, to ease matching. --echo 's/$/ /' >conftest.defines --# Then, protect against being on the right side of a sed subst, or in --# an unquoted here document, in config.status. If some macros were --# called several times there might be several #defines for the same --# symbol, which is useless. But do not sort them, since the last --# AC_DEFINE must be honored. --ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* --# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where --# NAME is the cpp macro being defined, VALUE is the value it is being given. --# PARAMS is the parameter list in the macro definition--in most cases, it's --# just an empty string. --ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' --ac_dB='\\)[ (].*,\\1define\\2' --ac_dC=' ' --ac_dD=' ,' -- --uniq confdefs.h | -- sed -n ' -- t rset -- :rset -- s/^[ ]*#[ ]*define[ ][ ]*// -- t ok -- d -- :ok -- s/[\\&,]/\\&/g -- s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p -- s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p -- ' >>conftest.defines -- --# Remove the space that was appended to ease matching. --# Then replace #undef with comments. This is necessary, for --# example, in the case of _POSIX_SOURCE, which is predefined and required --# on some systems where configure will not decide to define it. --# (The regexp can be short, since the line contains either #define or #undef.) --echo 's/ $// --s,^[ #]*u.*,/* & */,' >>conftest.defines -- --# Break up conftest.defines: --ac_max_sed_lines=50 -- --# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" --# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" --# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" --# et cetera. --ac_in='$ac_file_inputs' --ac_out='"$tmp/out1"' --ac_nxt='"$tmp/out2"' -- --while : --do -- # Write a here document: -- cat >>$CONFIG_STATUS <<_ACEOF -- # First, check the format of the line: -- cat >"\$tmp/defines.sed" <<\\CEOF --/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def --/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def --b --:def --_ACEOF -- sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS -- echo 'CEOF -- sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS -- ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in -- sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail -- grep . conftest.tail >/dev/null || break -- rm -f conftest.defines -- mv conftest.tail conftest.defines --done --rm -f conftest.defines conftest.tail -- --echo "ac_result=$ac_in" >>$CONFIG_STATUS --cat >>$CONFIG_STATUS <<\_ACEOF - if test x"$ac_file" != x-; then -- echo "/* $configure_input */" >"$tmp/config.h" -- cat "$ac_result" >>"$tmp/config.h" -- if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then -- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 --echo "$as_me: $ac_file is unchanged" >&6;} -+ { -+ $as_echo "/* $configure_input */" \ -+ && 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;} - else -- rm -f $ac_file -- mv "$tmp/config.h" $ac_file -+ rm -f "$ac_file" -+ mv "$ac_tmp/config.h" "$ac_file" \ -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else -- echo "/* $configure_input */" -- cat "$ac_result" -+ $as_echo "/* $configure_input */" \ -+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ -+ || as_fn_error $? "could not create -" "$LINENO" 5 - fi -- rm -f "$tmp/out12" - ;; - - -@@ -6129,11 +5696,13 @@ echo "$as_me: $ac_file is unchanged" >&6 - done # for ac_tag - - --{ (exit 0); exit 0; } -+as_fn_exit 0 - _ACEOF --chmod +x $CONFIG_STATUS - ac_clean_files=$ac_clean_files_save - -+test $ac_write_fail = 0 || -+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 -+ - - # configure is writing to config.log, and then calls config.status. - # config.status does its own redirection, appending to config.log. -@@ -6153,6 +5722,10 @@ if test "$no_create" != yes; then - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. -- $ac_cs_success || { (exit 1); exit 1; } -+ $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;} - fi - diff -Nru chktex-1.7.6/debian/patches/pcre.patch chktex-1.7.8/debian/patches/pcre.patch --- chktex-1.7.6/debian/patches/pcre.patch 2022-06-19 20:40:03.000000000 +0000 +++ chktex-1.7.8/debian/patches/pcre.patch 2022-12-09 00:28:14.000000000 +0000 @@ -1,27 +1,8 @@ Description: PCRE (= PCRE3) is obsolete and need to be replaces by PCRE2 -Index: chktex-1.7.6/configure.in +Index: chktex-1.7.8/FindErrs.c =================================================================== ---- chktex-1.7.6.orig/configure.in 2016-09-10 06:38:03.000000000 +0200 -+++ chktex-1.7.6/configure.in 2022-06-20 10:59:12.723341641 +0200 -@@ -149,11 +149,11 @@ - AC_MSG_CHECKING(whether PCRE regular expressions are enabled) - AC_MSG_RESULT($enable_pcre) - if test "$enable_pcre" = "yes"; then -- AC_CHECK_PROG(WITH_PCRE, pcre-config, yes, no) -+ AC_CHECK_PROG(WITH_PCRE, pcre2-config, yes, no) - if test "$WITH_PCRE" = "yes"; then - AC_DEFINE(HAVE_PCRE, 1, Whether PCRE can be used for user warnings.) -- CFLAGS="${CFLAGS} $(pcre-config --cflags-posix)" -- LDFLAGS="${LDFLAGS} $(pcre-config --libs-posix)" -+ CFLAGS="${CFLAGS} $(pcre2-config --cflags-posix)" -+ LDFLAGS="${LDFLAGS} $(pcre2-config --libs-posix)" - else - AC_DEFINE(HAVE_PCRE, 0) - AC_MSG_WARN(PCRE library not found.) -Index: chktex-1.7.6/FindErrs.c -=================================================================== ---- chktex-1.7.6.orig/FindErrs.c 2021-11-18 16:36:50.000000000 +0100 -+++ chktex-1.7.6/FindErrs.c 2022-06-16 16:13:28.887251115 +0200 +--- chktex-1.7.8.orig/FindErrs.c 2022-12-10 23:58:35.908406442 +0100 ++++ chktex-1.7.8/FindErrs.c 2022-12-10 23:58:35.904406444 +0100 @@ -36,7 +36,7 @@ #if HAVE_PCRE || HAVE_POSIX_ERE @@ -31,11 +12,11 @@ #else #include #endif -Index: chktex-1.7.6/Makefile.in +Index: chktex-1.7.8/Makefile.in =================================================================== ---- chktex-1.7.6.orig/Makefile.in 2021-11-18 16:36:50.000000000 +0100 -+++ chktex-1.7.6/Makefile.in 2022-06-20 12:29:19.502567466 +0200 -@@ -157,7 +157,7 @@ +--- chktex-1.7.8.orig/Makefile.in 2022-12-10 23:58:35.908406442 +0100 ++++ chktex-1.7.8/Makefile.in 2022-12-10 23:58:35.904406444 +0100 +@@ -159,7 +159,7 @@ chktex: $(OBJS) @@ -44,7 +25,7 @@ install: chktex ChkTeX.dvi $(MKDIR_P) $(DESTDIR)$(bindir) -@@ -183,7 +183,7 @@ +@@ -185,7 +185,7 @@ rm -f $(DESTDIR)$(sysconfdir)/chktexrc $(DESTDIR)$(mandir)/man1/deweb.1 test: @@ -53,3 +34,22 @@ indent: indent -npsl -bli0 -npcs -nut -i4 $(SOURCEFILES) +Index: chktex-1.7.8/configure.ac +=================================================================== +--- chktex-1.7.8.orig/configure.ac 2022-10-18 02:17:58.000000000 +0200 ++++ chktex-1.7.8/configure.ac 2022-12-10 23:59:10.644379232 +0100 +@@ -148,11 +148,11 @@ + AC_MSG_CHECKING(whether PCRE regular expressions are enabled) + AC_MSG_RESULT($enable_pcre) + if test "$enable_pcre" = "yes"; then +- AC_CHECK_PROG(WITH_PCRE, pcre-config, yes, no) ++ AC_CHECK_PROG(WITH_PCRE, pcre2-config, yes, no) + if test "$WITH_PCRE" = "yes"; then + AC_DEFINE(HAVE_PCRE, 1, Whether PCRE can be used for user warnings.) +- CFLAGS="${CFLAGS} $(pcre-config --cflags-posix)" +- LDFLAGS="${LDFLAGS} $(pcre-config --libs-posix)" ++ CFLAGS="${CFLAGS} $(pcre2-config --cflags-posix)" ++ LDFLAGS="${LDFLAGS} $(pcre2-config --libs-posix)" + else + AC_DEFINE(HAVE_PCRE, 0) + AC_MSG_WARN(PCRE library not found.) diff -Nru chktex-1.7.6/debian/patches/series chktex-1.7.8/debian/patches/series --- chktex-1.7.6/debian/patches/series 2021-11-18 17:52:20.000000000 +0000 +++ chktex-1.7.8/debian/patches/series 2022-12-09 00:28:14.000000000 +0000 @@ -1,9 +1,5 @@ manpage.patch -#make.patch -#strcpy-bug.patch latex2html-date.patch spelling.patch tex-inputenc.patch -warning-handling-1.patch -warning-handling-2.patch pcre.patch diff -Nru chktex-1.7.6/debian/patches/strcpy-bug.patch chktex-1.7.8/debian/patches/strcpy-bug.patch --- chktex-1.7.6/debian/patches/strcpy-bug.patch 2020-12-06 07:40:03.000000000 +0000 +++ chktex-1.7.8/debian/patches/strcpy-bug.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ ---- chktex-1.6.4/FindErrs.c 2011-09-17 22:29:30.000000000 +0200 -+++ chktex-1.6.4-work/FindErrs.c 2011-09-17 22:31:14.000000000 +0200 -@@ -184,6 +184,18 @@ static char *GetLTXToken(char *Src, char - #define GET_TOKEN 256 - #define GET_STRIP_TOKEN 257 - -+static void ShiftLeftOne(char *Buf) -+{ -+ char *P; -+ -+ if (*Buf) -+ { -+ for (P = Buf + 1; *P; ++P) -+ *(P - 1) = *P; -+ *(P - 1) = '\0'; -+ } -+} -+ - static char *GetLTXArg(char *SrcBuf, char *OrigDest, const int Until, - struct WordList *wl) - { -@@ -218,7 +230,16 @@ static char *GetLTXArg(char *SrcBuf, cha - - if (Retval && (*OrigDest == '{') && (Until == GET_STRIP_TOKEN)) - { -- strcpy(OrigDest, OrigDest + 1); -+ /* According to strcpy(3): The strings may not overlap -+ So the following call: -+ -+ strcpy(OrigDest, OrigDest + 1); -+ -+ is undefined, and it DOES produce errors in new versions -+ of glibc (checked on glibc-2.12.2). -+ -+ Call safe version. */ -+ ShiftLeftOne(OrigDest); - OrigDest[strlen(OrigDest) - 1] = 0; - } - break; - diff -Nru chktex-1.7.6/debian/patches/warning-handling-1.patch chktex-1.7.8/debian/patches/warning-handling-1.patch --- chktex-1.7.6/debian/patches/warning-handling-1.patch 2020-12-06 07:40:03.000000000 +0000 +++ chktex-1.7.8/debian/patches/warning-handling-1.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -From 127e9ea31f80e6738d137e8a5022cbb2ab601f4c Mon Sep 17 00:00:00 2001 -From: gvol -Date: Wed, 28 Sep 2016 03:52:31 +0000 -Subject: Only return exit failure on an error/warning - -git-svn-id: svn://svn.savannah.nongnu.org/chktex/trunk@314 29f9d7e1-bebc-0310-b7c6-d7abf8ca9c08 ---- - chktex/FindErrs.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/FindErrs.c b/FindErrs.c -index f1a470b..d5494dd 100644 ---- a/FindErrs.c -+++ b/FindErrs.c -@@ -1872,7 +1872,6 @@ PrintError(const char *File, const char *String, - } - else - { -- FoundErr = EXIT_FAILURE; - Context = LaTeXMsgs[Error].Context; - - if (!HeadErrOut) -@@ -1889,9 +1888,11 @@ PrintError(const char *File, const char *String, - { - case etWarn: - WarnPrint++; -+ FoundErr = EXIT_FAILURE; - break; - case etErr: - ErrPrint++; -+ FoundErr = EXIT_FAILURE; - break; - case etMsg: - break; --- -cgit v1.0-41-gc330 - diff -Nru chktex-1.7.6/debian/patches/warning-handling-2.patch chktex-1.7.8/debian/patches/warning-handling-2.patch --- chktex-1.7.6/debian/patches/warning-handling-2.patch 2020-12-06 07:40:03.000000000 +0000 +++ chktex-1.7.8/debian/patches/warning-handling-2.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -From ec0fb9b58f02a62ff0bfec98b997208e9d7a5998 Mon Sep 17 00:00:00 2001 -From: gvol -Date: Thu, 15 Feb 2018 03:40:09 +0000 -Subject: Make exit status 2 or 3 (not 1) when warnings or errors are found - -This was causing problems with callers that expected a return value of -1 to mean an internal error. - -#53129 - - -git-svn-id: svn://svn.savannah.nongnu.org/chktex/trunk@319 29f9d7e1-bebc-0310-b7c6-d7abf8ca9c08 ---- - chktex/FindErrs.c | 6 ++++-- - chktex/OpSys.h | 5 ++++- - 2 files changed, 8 insertions(+), 3 deletions(-) - -Index: chktex-1.7.6/FindErrs.c -=================================================================== ---- chktex-1.7.6.orig/FindErrs.c -+++ chktex-1.7.6/FindErrs.c -@@ -1884,15 +1884,17 @@ PrintError(const char *File, const char - 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 = EXIT_FAILURE; -+ FoundErr = max(FoundErr, EXIT_WARNINGS); - break; - case etErr: - ErrPrint++; -- FoundErr = EXIT_FAILURE; -+ FoundErr = max(FoundErr, EXIT_ERRORS); - break; - case etMsg: - break; -Index: chktex-1.7.6/OpSys.h -=================================================================== ---- chktex-1.7.6.orig/OpSys.h -+++ chktex-1.7.6/OpSys.h -@@ -83,6 +83,9 @@ - # define EXIT_SUCCESS 0 - #endif - -+#define EXIT_WARNINGS 2 -+#define EXIT_ERRORS 3 -+ - /* -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- */ - - /* -@@ -189,7 +192,7 @@ - struct WordList; - #endif - /* Sorry; there are now cyclic dependencies in the --* source tree. :-/ -+* source tree. :-/ - */ - - extern const char *ReverseOn; diff -Nru chktex-1.7.6/FindErrs.c chktex-1.7.8/FindErrs.c --- chktex-1.7.6/FindErrs.c 2016-09-10 04:22:18.000000000 +0000 +++ chktex-1.7.8/FindErrs.c 2022-10-18 00:17:58.000000000 +0000 @@ -54,6 +54,7 @@ int FoundErr = EXIT_SUCCESS; int LastWasComment = FALSE; int SeenSpace = FALSE; +int FrenchSpacing = FALSE; /***************************** ERROR MESSAGES ***************************/ @@ -77,10 +78,10 @@ ((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_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 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 @@ 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 @@ { 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 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 @@ 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 @@ 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 @@ 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 @@ { 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 @@ 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 @@ SKIP_AHEAD(TmpPtr, TmpC, TmpC == '-'); TmpCount = TmpPtr - BufPtr + 1; - if (MathMode) + if (CurStkMode(&MathModeStack)) { if (TmpCount > 1) HERE(TmpCount, emWrongDash); @@ -1088,6 +1120,73 @@ } } + /* 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ ((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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ /* 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 -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 @@ } else { - FoundErr = EXIT_FAILURE; Context = LaTeXMsgs[Error].Context; if (!HeadErrOut) @@ -1880,18 +2010,22 @@ #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 @@ 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 @@ 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 @@ 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 @@ 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 @@ { 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 -Nru chktex-1.7.6/FindErrs.h chktex-1.7.8/FindErrs.h --- chktex-1.7.6/FindErrs.h 2016-02-02 05:31:48.000000000 +0000 +++ chktex-1.7.8/FindErrs.h 2022-10-18 00:17:58.000000000 +0000 @@ -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 @@ 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 -Nru chktex-1.7.6/input/file chktex-1.7.8/input/file --- chktex-1.7.6/input/file 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/input/file 2022-10-18 00:17:58.000000000 +0000 @@ -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 -Nru chktex-1.7.6/install-sh chktex-1.7.8/install-sh --- chktex-1.7.6/install-sh 2016-09-10 04:47:18.000000000 +0000 +++ chktex-1.7.8/install-sh 2022-10-18 00:18:37.000000000 +0000 @@ -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 @@ # 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 @@ --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 @@ -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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ # 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 @@ 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 -Nru chktex-1.7.6/m4/ax_append_flag.m4 chktex-1.7.8/m4/ax_append_flag.m4 --- chktex-1.7.6/m4/ax_append_flag.m4 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/m4/ax_append_flag.m4 2022-10-18 00:17:58.000000000 +0000 @@ -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 +# Copyright (c) 2011 Maarten Bosmans +# +# 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 -Nru chktex-1.7.6/m4/ax_cflags_strict_prototypes.m4 chktex-1.7.8/m4/ax_cflags_strict_prototypes.m4 --- chktex-1.7.6/m4/ax_cflags_strict_prototypes.m4 2008-07-16 10:44:59.000000000 +0000 +++ chktex-1.7.8/m4/ax_cflags_strict_prototypes.m4 2022-10-18 00:17:58.000000000 +0000 @@ -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 # -# 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 . -# -# 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 ],[ - 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 -]) - -dnl the only difference - the LANG selection... and the default FLAGS +#serial 18 -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 ],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ 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 -Nru chktex-1.7.6/m4/ax_require_defined.m4 chktex-1.7.8/m4/ax_require_defined.m4 --- chktex-1.7.6/m4/ax_require_defined.m4 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/m4/ax_require_defined.m4 2022-10-18 00:17:58.000000000 +0000 @@ -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 +# +# 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 -Nru chktex-1.7.6/MakeChkTeXRC.pl chktex-1.7.8/MakeChkTeXRC.pl --- chktex-1.7.6/MakeChkTeXRC.pl 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/MakeChkTeXRC.pl 2022-10-18 00:17:58.000000000 +0000 @@ -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 -Nru chktex-1.7.6/Makefile.in chktex-1.7.8/Makefile.in --- chktex-1.7.6/Makefile.in 2016-09-10 04:14:58.000000000 +0000 +++ chktex-1.7.8/Makefile.in 2022-10-18 00:17:58.000000000 +0000 @@ -47,6 +47,7 @@ LDFLAGS=@LDFLAGS@ LN_S=@LN_S@ LATEX=@LATEX@ +PDFLATEX=@PDFLATEX@ DVIPS=@DVIPS@ PS2PDF=ps2pdf PERL5=@PERL5@ @@ -64,7 +65,7 @@ ##################################################################### -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 @@ $(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 @@ DISTFILES=$(EXTRA_DIST) $(SOURCEFILES) -all: chktex +all: chktex chktexrc DISTDIR:=chktex-@PACKAGE_VERSION@ dist: $(DISTDIR).tar.gz @@ -124,7 +125,7 @@ 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 @@ 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 @@ 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 @@ ###################### 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 @@ %.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 @@ 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 -Nru chktex-1.7.6/NEWS chktex-1.7.8/NEWS --- chktex-1.7.6/NEWS 2016-09-10 04:38:03.000000000 +0000 +++ chktex-1.7.8/NEWS 2022-10-18 00:17:58.000000000 +0000 @@ -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 + + * Fix some packaging issues for CTAN + +1.7.7 (2022-10-17), released by Ivan Andrus + + * 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 * Properly copy and free strings. This caused incorrect file diff -Nru chktex-1.7.6/OpSys.c chktex-1.7.8/OpSys.c --- chktex-1.7.6/OpSys.c 2012-10-27 11:28:32.000000000 +0000 +++ chktex-1.7.8/OpSys.c 2022-10-18 00:17:58.000000000 +0000 @@ -115,7 +115,9 @@ # 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 @@ liMin, liSysDir, liUsrDir, + liXdgDir, liEnvir, liCurDir, liNFound, @@ -177,12 +180,10 @@ 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 @@ *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 @@ } +/* + * 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 @@ 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 -Nru chktex-1.7.6/OpSys.h chktex-1.7.8/OpSys.h --- chktex-1.7.6/OpSys.h 2010-12-18 21:12:10.000000000 +0000 +++ chktex-1.7.8/OpSys.h 2022-10-18 00:17:58.000000000 +0000 @@ -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 @@ 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 -Nru chktex-1.7.6/Resource.c chktex-1.7.8/Resource.c --- chktex-1.7.6/Resource.c 2012-10-27 11:39:34.000000000 +0000 +++ chktex-1.7.8/Resource.c 2022-10-18 00:17:58.000000000 +0000 @@ -90,7 +90,8 @@ 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 @@ * 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 @@ RsrcLine = 0; Expect = FLG_Word | FLG_Eof; - - if ((fh = fopen(Filename, "r"))) + do { - Success = TRUE; - do + Token = ReadWord(ReadBuffer, fh, fgetsfun); + if (!(Expect & 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) { - Token = ReadWord(ReadBuffer, fh); - if (!(Expect & Token)) + case FLG_Word: + for (Counter = 0; Keys[Counter].Name; Counter++) { - switch (Token) + 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 @@ 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 @@ { if (!(String && *String)) { - if (fgets(StatBuf, BUFSIZ - 1, fh)) + if ((fgetsfun)(StatBuf, BUFFER_SIZE - 1, fh)) String = strip(StatBuf, STRP_RGT); RsrcLine++; } diff -Nru chktex-1.7.6/Resource.h chktex-1.7.8/Resource.h --- chktex-1.7.6/Resource.h 2014-05-10 12:42:21.000000000 +0000 +++ chktex-1.7.8/Resource.h 2022-10-18 00:17:58.000000000 +0000 @@ -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 @@ #undef LNEMPTY #undef LIST int ReadRC(const char *); +int ReadRCFromCmdLine(const char *CmdLineArg); #endif /* RESOURCE */ diff -Nru chktex-1.7.6/Test.nore.out chktex-1.7.8/Test.nore.out --- chktex-1.7.6/Test.nore.out 2016-02-02 05:36:26.000000000 +0000 +++ chktex-1.7.8/Test.nore.out 2022-10-18 00:17:58.000000000 +0000 @@ -19,12 +19,6 @@ 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 @@ 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 @@ \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 @@ 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 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 @@ 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 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 @@ 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 @@ 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 @@ \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. % 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 -Nru chktex-1.7.6/Test.pcre.out chktex-1.7.8/Test.pcre.out --- chktex-1.7.6/Test.pcre.out 2016-02-02 05:36:26.000000000 +0000 +++ chktex-1.7.8/Test.pcre.out 2022-10-18 00:17:58.000000000 +0000 @@ -19,9 +19,6 @@ 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 @@ 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 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 @@ \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 @@ 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 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 @@ 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 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 @@ 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 @@ 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 @@ \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. % 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 -Nru chktex-1.7.6/Test.posix-ere.out chktex-1.7.8/Test.posix-ere.out --- chktex-1.7.6/Test.posix-ere.out 2016-02-02 05:36:26.000000000 +0000 +++ chktex-1.7.8/Test.posix-ere.out 2022-10-18 00:17:58.000000000 +0000 @@ -19,9 +19,6 @@ 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 @@ 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 @@ \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 @@ 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 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 @@ 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 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 @@ 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 @@ 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 @@ \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. % 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 -Nru chktex-1.7.6/tests/main.expected chktex-1.7.8/tests/main.expected --- chktex-1.7.6/tests/main.expected 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/tests/main.expected 2022-10-18 00:17:58.000000000 +0000 @@ -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 -Nru chktex-1.7.6/tests/main.tex chktex-1.7.8/tests/main.tex --- chktex-1.7.6/tests/main.tex 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/tests/main.tex 2022-10-18 00:17:58.000000000 +0000 @@ -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 -Nru chktex-1.7.6/tests/run-tests.sh chktex-1.7.8/tests/run-tests.sh --- chktex-1.7.6/tests/run-tests.sh 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/tests/run-tests.sh 2022-10-18 00:17:58.000000000 +0000 @@ -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 < $testsdir/sub1/.config/chktexrc < $testsdir/sub2/.chktexrc <>> 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 &1 \ + | grep -A1 TabSize | grep -E '\t7$' >/dev/null) \ + || (echo Setting TabSize from command line failed; exit 1) +echo ">>> OK!" diff -Nru chktex-1.7.6/tests/sub1/file.tex chktex-1.7.8/tests/sub1/file.tex --- chktex-1.7.6/tests/sub1/file.tex 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/tests/sub1/file.tex 2022-10-18 00:17:58.000000000 +0000 @@ -0,0 +1,8 @@ +file1 +%% comment1 + +\input{sub1/subsub/subsubfile} + +%% comment2 + +more file1 diff -Nru chktex-1.7.6/tests/sub1/subsub/subsubfile.tex chktex-1.7.8/tests/sub1/subsub/subsubfile.tex --- chktex-1.7.6/tests/sub1/subsub/subsubfile.tex 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/tests/sub1/subsub/subsubfile.tex 2022-10-18 00:17:58.000000000 +0000 @@ -0,0 +1,2 @@ +%% subsubcomment +subsubfile diff -Nru chktex-1.7.6/tests/sub2/file1.tex chktex-1.7.8/tests/sub2/file1.tex --- chktex-1.7.6/tests/sub2/file1.tex 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/tests/sub2/file1.tex 2022-10-18 00:17:58.000000000 +0000 @@ -0,0 +1,7 @@ +subfile 2.1 + +%% comment 2.1 +\input{sub2/file2.tex} + +%% comment 2.1 cont. +more subfile 2.1 diff -Nru chktex-1.7.6/tests/sub2/file2.tex chktex-1.7.8/tests/sub2/file2.tex --- chktex-1.7.6/tests/sub2/file2.tex 1970-01-01 00:00:00.000000000 +0000 +++ chktex-1.7.8/tests/sub2/file2.tex 2022-10-18 00:17:58.000000000 +0000 @@ -0,0 +1,2 @@ +%% comment 2.2 +subfile 2.2 diff -Nru chktex-1.7.6/Test.tex chktex-1.7.8/Test.tex --- chktex-1.7.6/Test.tex 2015-12-08 04:48:49.000000000 +0000 +++ chktex-1.7.8/Test.tex 2022-10-18 00:17:58.000000000 +0000 @@ -13,10 +13,6 @@ 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 @@ % 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 @@ \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 @@ 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 @@ \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 @@ 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 @@ \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 -Nru chktex-1.7.6/Utility.c chktex-1.7.8/Utility.c --- chktex-1.7.6/Utility.c 2016-09-10 04:22:18.000000000 +0000 +++ chktex-1.7.8/Utility.c 2022-10-18 00:17:58.000000000 +0000 @@ -87,8 +87,7 @@ #else FILE *fh; - - if (fh = fopen(Filename, "r")) + if ((fh = fopen(Filename, "r"))) { Retval = TRUE; fclose(fh); @@ -97,6 +96,12 @@ Retval = FALSE; #endif + /* Ensure that it's not a directory */ + if (Retval && !IsRegFile(Filename)) + { + Retval = FALSE; + } + return (Retval); } @@ -115,7 +120,7 @@ { if (to && (n > 0)) { - n = min(n, BUFSIZ); + n = min(n, BUFFER_SIZE); return (memset(to, c, (size_t) n)); } @@ -325,7 +330,7 @@ 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 @@ 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 PushFile(const char *Name, FILE * fh, struct Stack *stack) { struct FileNode *fn; + uint64_t *filesupp; if (Name && fh && stack) { @@ -710,6 +716,21 @@ { 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 @@ free(fn->Name); free(fn); HasSeenLong = 0; + + StkPop(&FileSuppStack); + StkPop(&UserFileSuppStack); } while (!Retval && (fn = StkTop(stack))); } @@ -805,8 +829,27 @@ 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 -Nru chktex-1.7.6/Utility.h chktex-1.7.8/Utility.h --- chktex-1.7.6/Utility.h 2012-10-27 10:59:32.000000000 +0000 +++ chktex-1.7.8/Utility.h 2022-10-18 00:17:58.000000000 +0000 @@ -89,12 +89,6 @@ unsigned long Line; }; -/* Rotates x n bits left (should be an int, long, etc.) */ -#define ROTATEL(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 @@ 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 *);