% \iffalse meta-comment
%
% Copyright (C) 1993 by LaTeX3 project.  All rights reserved.
% For additional copyright information see further down in this file.
% 
% This file is part of the LaTeX2e system (PRELIMINARY TEST RELEASE)
% ------------------------------------------------------------------
% 
%  This system 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.
% 
% 
% IMPORTANT NOTICE:
% 
% For error reports in case of UNCHANGED versions see readme files.
% 
% Please do not request updates from us directly.  Distribution is
% done through Mail-Servers and TeX organizations.
% 
% You are not allowed to change this file.
% 
% You are allowed to distribute this file under the condition that
% it is distributed together with all files mentioned in 00readme.l2e.
% 
% If you receive only some of these files from someone, complain!
% 
% You are NOT ALLOWED to distribute this file alone.  You are NOT
% ALLOWED to take money for the distribution or use of either this
% file or a changed version, except for a nominal charge for copying
% etc.
% \fi
% \iffalse
%%% ====================================================================
%%%  @LaTeX-file{
%%%     author_1        = "David Carlisle",
%%%     version         = "0.2c",
%%%     date            = "20 December 1993,
%%%     time            = "17:51:47 GMT,
%%%     filename        = "dircheck.dtx",
%%%     address_1       = "Computer Science Department
%%%                        Manchester University
%%%                        Oxford Road
%%%                        Manchester
%%%                        England
%%%                        M13 9PL",
%%%     checksum        = "46381 2485 8605 79037",
%%%     email_1         = "carlisle@cs.man.ac.uk (Internet)",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "LaTeX,initialisation
%%%     supported       = "yes",
%%%     docstring       = "
%%%     System dependent initialisations for LaTeX2e
%%%     This file controls the definitions of the macros
%%%     \@currdir \input@path and \filename@parse",
%%%  }
%%% ====================================================================
% \fi
%
%
% This file implements the semi-automatic determination of various
% system dependant parts of the initialisation. The actual definitions
% may be placed in a file |texsys.cfg|. Thus for operating systems for
% which the tests here do not result in acceptable settings, a `hand
% written' |texsys.cfg| may be produced.
%
% The macros that must be defined are:
%
% \DescribeMacro{\@currdir}
% |\@currdir|\meta{filename}\meta{space} should expand to a form of the
% filename that uniquely refers to the `current directory' if this is
% possible. (The expansion should also end with a space.) on UNIX,
% this is |\def\@currdir{./}|. For more exotic operating systems may
% want to make |\@currdir| a macro with arguments delimited by |.|
% and/or \meta{space}. If the operating system has no concept of
% directory structure, this macro should be defined to be empty.
% 
%
% \DescribeMacro{\input@path}
% If the primitive |\openin| searches the same directories as the
% primitive |\input|, then it is possible to tell (using |\ifeof|)
% whether a file exists before trying to input it. For systems like
% this, |\input@path| should be left undefined.
%
% If |\openin| does not `follow' |\input| then |\input@path| must be
% defined to be a list of directories to search for input files. The
% format for each directory is as for |\@currdir|, normally just a
% prefix is required, but it may be a macro with space-delimited
% argument. That is, if \meta{dir} is an entry in the input path, 
% \TeX\ will try to load the expansion of 
%   \meta{dir}\meta{filename}\meta{space}
%
% So either \meta{dir} should be defined as a macro with argument
% delimited by space, or it should just expand to a directory name,
% including the final directory separator, so that it may be
% concatenated with the \meta{filename}. This means that for UNIX-like
% syntax, each \meta{dir} should end with a slash, |/|. One exception to
% this rule is that the input path should \emph{always} contain the
% empty directory |{}| as this will allow `full pathnames' to be used,
% and the  `current directory' to be searched.
%
% |\input@path| should expand to a list of such directories, each in a
% |{}| group. 
%
% \DescribeMacro{\filename@parse}
% After a call of the form: |\filename@parse{|\meta{filename}|}|, the
% three macros |\filename@area|,|\filename@base|,|\filename@ext| should
% be defined to be the `area' (or directory), basename and
% extension respectively. If there was no extension specified in
% \meta{filename}, |\filename@ext| should be |\let| to |\relax| (so this
% case may be tested with |\@ifundefined{filename@ext}| and, perhaps a
% default extension substituted).
% 
% Normally one would not need to define this macro in |texsys.cfg| as
% the automatic tests can supply parsers that work with UNIX and VMS
% syntax, as well as a basic parser that willcover many other cases.
% However some operating systems may need a `hand produced' parser
% in which case it should be defined in this file.
%
% The UNIX parser also works for most MSDOS \TeX\ versions.
% Currently if the UNIX or VMS parser is not used, |\filename@parse| is
% defined to always return an empty area, and to split the argument into
% basename and extension at the first `|.|' that occurs in the name.
% Parsers for other formats may be defined in |texsys.cfg|,
% in which case they will be used in preference to the default
% definitions.
%
%
% After these macros have been defined and/or checked, the following
% macros are defined, with definitions depending on whether
% |\input@path| is defined. these macros should not be defined in
% |texsys.cfg|: 
%
% |\IfFileExists| |\InputIfFileExists|
%
% \section{INITEX}
%    \begin{macrocode}
%<*dircheck>
%<*initex>
\catcode`\{=1
\catcode`\}=2
\catcode`\#=6
\catcode`\^=7
\chardef\active=13
\catcode`\@=11
\countdef\count@=255
\let\bgroup={ \let\egroup=}
\let\@@input\input
\let\@@end\end
\chardef\@inputcheck0
\chardef\sixt@@n=16
\newlinechar`\^^J
\def\typeout{\immediate\write17}
\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
  \do\#\do\^\do\_\do\%\do\~}
\def\@makeother#1{\catcode`#1=12\relax}
\def\space{ }
\def\@tempswafalse{\let\if@tempswa\iffalse}
\def\@tempswatrue{\let\if@tempswa\iftrue}
\let\if@tempswa\iffalse
\def\loop#1\repeat{\def\body{#1}\iterate}
\def\iterate{\body \let\next\iterate \else\let\next\relax\fi \next}
\let\repeat\fi
%</initex>
%    \end{macrocode}
%
\def\fileversion{0.2c}
\def\filedate{1993/12/17}
%
% \section{Some bits of 2e}
%    \begin{macrocode}
%<*2ekernel>
\def\two@digits#1{\ifnum#1<10 0\fi\number#1}
\long\def\@firstoftwo#1#2{#1}
\long\def\@secondoftwo#1#2{#2}
\def\@empty{}
\catcode`\%=12
\def\@percentchar{%}
\catcode`\%=14
\let\@currdir\@undefined
\let\input@path\@undefined
\let\filename@parse\@undefined
%</2ekernel>
%    \end{macrocode}
% \begin{macro}{\strip@meaning}
% \changes{0.2a}{1994/12/13}
%         {modified, name changed from \cmd\stripmeaning}
%    \begin{macrocode}
\def\strip@meaning#1>{}
%    \end{macrocode}
% \end{macro}
%
% \section{texsys.cfg}
% First we input |texsys.cfg|. This had better exist. It would be nice
% if we could check if it existed, but if that were possible, we
% wouldn't need this file at all.
%
%    \begin{macrocode}
\typeout{^^J***^^J%
Inputting the system configuration file texsys.cfg.^^J%
If TeX now produces the line : ! I can't find file `texsys.cfg'.^^J%
Then somethong is wrong with your installation.^^J%
texsys.cfg should have been produced by the first `docstrip' phase,^^J%
and possibly later edited by you to match the current system.^^J%
***}
\input texsys.cfg
\typeout{***^^Jtexsys.cfg loaded.}
%    \end{macrocode}
%
%
% \section{texsys.new}
% After all the tests are done, a version of |texsys.cfg| which is
% possibly more correct is written to |texsys.new|. It is up to the site
% maintainer to copy this to |texsys.cfg| if that is desired.
% |texsys.new| begins with a copy of |texsys.cfg|, but the copy is not
% made yet, until after the |\@currdir| tests, so that we can re-use the
% same file. However we define the command to make the copy here.
%
%    \begin{macrocode}
\begingroup
\catcode`\^^M=\active%
\gdef\@copytexsys{{%
\global\let\@copytexsys\@undefined%
\immediate\closeout15 %
\immediate\openout15=texsys.new %
\endlinechar`\^^M%
  \def\peek{\ifx\@tempa\peek\else\expandafter\writeline\fi}%
  \let\do\@makeother\dospecials%
  \catcode`\^^M=\active%
  \def\writeline##1^^M{%
    \immediate\write15{##1}\futurelet\@tempa\peek}%
  \expandafter\writeline\@@input texsys.cfg %
  \peek}}%
\endgroup
%    \end{macrocode}
%
%    \begin{macrocode}
%</dircheck>
%<ltxcheck>\makeatletter
%<*dircheck|ltxcheck>
%    \end{macrocode}
%
% \section{Setting \texttt{\bslash @currdir}}
%
% \begin{macro}{\@currdir}
% \begin{macro}{\test}
% |\test| is only locally defined, it tries to relocate
% |texsxys.new|. If it succeeds, then the |\@currdir| syntax has been
% determined. If all the tests fail, an interactive request for the
% correct syntax is made.
%    \begin{macrocode}
\begingroup
\count@\time
\divide\count@ 60
\count2=-\count@
\multiply\count2 60
\advance\count2 \time
%    \end{macrocode}
%
% The current date and time stamp.
%    \begin{macrocode}
\edef\stamp{%
  \the\year/\two@digits{\the\month}/\two@digits{\the\day}:%
    \two@digits{\the\count@}:\two@digits{\the\count2}}
%    \end{macrocode}
%
% Create a file |texsys.cfg| (hopefully in the current directory),
% then try to locate it again.
%    \begin{macrocode}
\immediate\openout15=texsys.new
\immediate\write15{\stamp^^J}
\immediate\closeout15 %
%    \end{macrocode}
%
% The test |#1| is the prefix to try |#2| is what to do on success, |#3|
% on failure..
%    \begin{macrocode}
\def\test#1#2#3{%
  \openin\@inputcheck#1 %
  \ifeof\@inputcheck
    \typeout{^^J#1 not found}%
     #3\relax
  \else
    \read\@inputcheck to \@tempa
    \ifx\@tempa\stamp
      \typeout{^^J#1 found}#2\relax
    \else
      \typeout{BAD: old file \@tempa (should be \stamp)}%
      #3\relax
    \fi
  \fi
  \closein\@inputcheck}
%    \end{macrocode}
%
%    \begin{macrocode}
%</dircheck|ltxcheck>
%<*dircheck>
%    \end{macrocode}
%
%    \begin{macrocode}
\bgroup
\endlinechar=-1
%    \end{macrocode}
%
% If |\@currdir| has not been pre-defined in |texsys.cfg| then test for
%  UNIX, VMS and (I think Oz-\TeX-Mac.) syntax.
%    \begin{macrocode}
\ifx\@currdir\@undefined
  \test{./texsys.new}{\gdef\@currdir{./}}{}
  \test{[]texsys.new}{\gdef\@currdir{[]}}{}
  \test{:texsys.new}{\gdef\@currdir{:}}{}
%    \end{macrocode}
% If it is still undefined at this point, all the above tests failed.
% Earlier versions interactively prompted for a definition at this
% point, but it seems impossible to reliably obtain information from
% users at this point in the installation. This version of the file
% produces a format with no user-interaction. Later if the format is not
% suitable for the system, |texsys.cfg| may be edited and the format
% re-made.
% \changes{0.2a}{1994/12/13}
%         {Removed interactive prompting for current directory syntax}
%    \begin{macrocode}
  \ifx\@currdir\@undefined
    \global\let\@currdir\@empty
    \typeout{^^J***^^J%
      No syntax for the current directory could be found^^J%
      ***}%
  \fi
%    \end{macrocode}
% Now copy |texsys.cfg| to |texsys.new| and add the definition of
% |\@currdir| just entered or found by the tests.
%    \begin{macrocode}
  \@copytexsys
  \immediate\write15{%
   ^^J\@percentchar\@percentchar\space\string\@currdir\space%
   <\stamp>^^J%
   \string\def\string\@currdir%
     {\expandafter\strip@meaning\meaning\@currdir}}%
%    \end{macrocode}
% Otherwise |\@currdir| was defined in |texsys.cfg|. In this case check
% that the syntax specified works on this system. (In case a complete
% \LaTeX\  system has been copied from  one system to another.) If the
% test fails, give up. The installer should remove or correct the
% offending |texsys.cfg| and try again. 
%    \begin{macrocode}
\else
  \expandafter\test\expandafter{\@currdir texsys.new }{}{%
    \edef\@tempa{\errhelp{%
      texsys.cfg specifies the current directory syntax to be^^J%
      \meaning\@currdir^^J%
      but this does not work on this system.^^J%
      Remove texsys.cfg and restart.}}\@tempa
    \errmessage{Bad texsys.cfg file: \noexpand\@currdir}\@@end}
%    \end{macrocode}
% The version of |\@currdir| in |texsys.cfg| looks OK, so just copy
% |texsys.cfg|.
%    \begin{macrocode}
  \@copytexsys
\fi
\egroup
%    \end{macrocode}
%
%    \begin{macrocode}
\typeout{^^J***^^J%
         \noexpand\@currdir set to: 
           \expandafter\strip@meaning\meaning\@currdir.^^J%
         ***}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% \changes{0.2a}{1994/12/13}
%         {on the `docstrip' pass, do not check openin path}
%   
%    \begin{macrocode}
%<*docstrip>
\endgroup
\relax\endinput
%</docstrip>
%    \end{macrocode}
%
% \section{Setting \texttt{\bslash input@path}}
%
% Earlier versions of this file attempted to automatically test whether
% |\input@path| was required, and interactively prompt for a path if
% necessary. This was not found to be very reliable The first-time
% installer of \LaTeXe\ can not be expected to have inough information
% to supply the correct information to the prompts. Now the interaction
% is omitted. After the format is made the installer can attempt to run
% the test document |ltxcheck.tex| through \LaTeXe. This will check,
% amongst other things, whether |texsys.cfg| will need to be edited and
% the format remade.
%
% \begin{macro}{\input@path}
% Now set up the |\input@path|.
%
% |input@path| should either be undefined, or a list of directories as
% described in the introduction. In the latter case, the first entry on
% the list should be |{}| i.e., an empty group. This
% results in |\openin| and |\input| being given the filename 
% without any path. This will allow `full path names' to be specified by
% the user, and also hopefully means that the `current directory' is
% always searched.
% 
%    \begin{macrocode}
\ifx\input@path\@undefined
%    \end{macrocode}
% |\input@path| has not been pre-defined.
%    \begin{macrocode}
  \typeout{^^J***^^J%
    Assuming \noexpand\openin and \noexpand\input^^J%
    have the same search path.^^J%
    ***^^J}
\else
%    \end{macrocode}
% |\input@path| has  been defined in |texsys.cfg|.
%    \begin{macrocode}
  \typeout{^^J***^^J%
    Assuming \noexpand\openin and \noexpand\input^^J%
    have different  search paths.^^J%
    LaTeX will use the path specified by \noexpand\input@path:^^J%
    ***}
  \def\@tempc{\relax}
  \def\@tempd{
    \errhelp{%
      texsys.cfg specifies \input@path^^J%
      but {} does not appear as an entry in the path.^^J%
      Edit texsys.cfg and restart.}%
    \errmessage{Bad texsys.cfg file: \noexpand\input@path}\@@end
  \let\@tempd\relax}
  \def\@tempa#1{%
   \def\@tempb{#1}\ifx\@tempb\@tempc\else
   \ifx\@tempb\@empty\let\@tempd\relax\fi
   \typeout{{\expandafter\strip@meaning\meaning\@tempb}}%
   \expandafter\@tempa
  \fi}
  \expandafter\@tempa\input@path\relax
  \typeout{***^^J}
  \@tempd
\fi
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\endgroup
%    \end{macrocode}
%
%
% \section{Filename Parsing}
%
%    \begin{macrocode}
\ifx\filename@parse\@undefined
%    \end{macrocode}
% |\filename@parse| was not specified in |texsys.cfg|, but |\@currdir|
% looks like UNIX \ldots
%    \begin{macrocode}
  \def\@tempa{./}\ifx\@currdir\@tempa
    \typeout{^^J***^^JDefining UNIX/DOS style filename parser.^^J***}
    \def\filename@parse#1{%
      \let\filename@area\@empty
      \let\filename@base\@empty
      \let\filename@ext\relax
      \expandafter\filename@path#1/\\}
%    \end{macrocode}
%
% Search for the last |/|. 
%    \begin{macrocode}
    \def\filename@path#1/#2\\{%
      \ifx\\#2\\%
         \def\@tempa{\filename@simple#1.\\}%
      \else
         \edef\filename@area{\filename@area#1/}%
         \def\@tempa{\filename@path#2\\}%
      \fi
      \@tempa}
%    \end{macrocode}
%
%    \begin{macrocode}
  \else\def\@tempa{[]}\ifx\@currdir\@tempa
%    \end{macrocode}
% |\filename@parse| was not specified in |texsys.cfg|, but |\@currdir|
% looks like VMS\ldots
%    \begin{macrocode}
    \typeout{^^J***^^JDefining VMS style filename parser.^^J***}
    \def\filename@parse#1{%
      \let\filename@area\@empty
      \let\filename@base\@empty
      \let\filename@ext\relax
      \expandafter\filename@path#1]\\}
%    \end{macrocode}
%
% Search for the last |]|.
%    \begin{macrocode}
    \def\filename@path#1]#2\\{%
      \ifx\\#2\\%
         \def\@tempa{\filename@simple#1.\\}%
      \else
         \edef\filename@area{\filename@area#1]}%
         \def\@tempa{\filename@path#2\\}%
      \fi
      \@tempa}
%    \end{macrocode}
%
%    \begin{macrocode}
  \else
%    \end{macrocode}
% |\filename@parse| was not specified in |texsys.cfg|,
% So just make a simple parser that always sets |\filename@area| to
% empty. 
%    \begin{macrocode}
    \typeout{^^J***^^JDefining generic filename parser.^^J***}
    \def\filename@parse#1{%
      \let\filename@area\@empty
      \let\filename@base\@empty
      \let\filename@ext\relax
      \expandafter\filename@simple#1.\\}
  \fi\fi
%    \end{macrocode}
%
% |\filename@simple| is used by all three versions.
% Finally we can split off the extension.
%    \begin{macrocode}
  \def\filename@simple#1.#2\\{%
    \ifx\\#2\\%
    \else
       \edef\filename@ext{\filename@dot#2\\}%
    \fi
    \edef\filename@base{#1}}
%    \end{macrocode}
%
% Remove a final dot, added earlier.
%    \begin{macrocode}
  \def\filename@dot#1.\\{#1}
%    \end{macrocode}
%
%    \begin{macrocode}
\else
%    \end{macrocode}
% Otherwise, |\filename@parse| was specified in |texsys.cfg|.
%    \begin{macrocode}
  \typeout{^^J***^^J%
    \noexpand\filename@parse was defined in texsys.cfg:^^J%
    \expandafter\strip@meaning\meaning\filename@parse.^^J%
    ***}
\fi
%    \end{macrocode}
%
%    \begin{macrocode}
%</dircheck>
%    \end{macrocode}
%
% \section{ltxcheck.tex}
%
%    \begin{macrocode}
%<*ltxcheck>

\typeout{^^J%
LaTeX2e installation check file^^J%
===============================}

\typeout{^^J%
Before running this file through LaTeX2e you should have installed^^J%
the Standard LaTeX2e files in their final `system' directories.^^J%
This file should *not* be run in a directory that contains article.cls}

\def\pause{%
\typeout{**}%
\message{** Hit return to continue: }%
\read -1  to \xxx}

\typeout{^^J%
After certain tests, LaTeX will pause so that you can read the^^J%
output without it scrolling off the screen.^^J%
When you are ready just hit <return> and LaTeX will continue.^^J%
While LaTeX is pausing, you will see a prompt like the one below.^^J^^J%
If a test fails, a message will be displayed followed by^^J%
an error message starting `! BAD'.^^J%
LaTeX will quit if you try to scroll past such an error.}
\pause

\typeout{^^J%
Checking the current directory syntax^^J%
=====================================}

\newif\iftest\testfalse

\ifx\@currdir\@undefined
  \typeout{^^J%
  \noexpand\@currdir is undefined !!^^J%
  Something is seriously wrong with the LaTeX2e initialisation.^^J%
  Either you have corrupted files or this is a LaTeX bug.}
  \errmessage{BAD LaTeX2e system!!}
  \expandafter\@@end
\fi

\ifx\@currdir\@empty
  \typeout{^^J%
  \noexpand\@currdir is defined to be empty.^^J%
  This means that LaTeX can not distinguish between a file^^J%
  aaaaa.tex^^J%
  that exists in the current directory, and  a file aaaaa.tex^^J%
  in another directory.^^J%
  It may be that this Operating System has no concept of `directory'^^J%
  in which case the setting is correct. If however it is possible to^^J%
  uniquely refer to a file then a suitable definition of
    \noexpand\@currdir^^J%
  should be added to texsys.cfg, and the format remade.}
  \pause
\else
  \typeout{^^J%
\noexpand\@currdir is defined as 
    \expandafter\strip@meaning\meaning\@currdir^^J%
  (Testing...)}
\begingroup
\endlinechar=-1
\count@\time
\divide\count@ 60
\count2=-\count@
\multiply\count2 60
\advance\count2 \time
\edef\stamp{%
  \the\year/\two@digits{\the\month}/\two@digits{\the\day}:%
    \two@digits{\the\count@}:\two@digits{\the\count2}}


  \immediate\openout15=ltxcheck.tmp
  \immediate\write15{\stamp^^J}
  \immediate\closeout15 %

  \openin\@inputcheck\@currdir ltxcheck.tmp %
  \ifeof\@inputcheck
    \typeout{\@currdir ltxcheck.tmp  not found}%
  \else
    \read\@inputcheck to \@tempa
    \ifx\@tempa\stamp
      \typeout{\@currdir ltxcheck.tmp found}
      \testtrue
    \else
      \typeout{BAD: old file \@tempa (should be \stamp)}%
      \testfalse
    \fi
  \fi
  \closein\@inputcheck

  \iftest
    \endgroup
    \typeout{\noexpand \@currdir OK!}
  \else
  \endgroup
  \typeout{^^J%
The LaTeX2e installation has definepd \noexpand\@currdir^^J%
to be \expandafter\strip@meaning\meaning\@currdir.^^J%
This appears to be incorrect.^^J%
You should add a correct definition to texsys.cfg^^J%
and rebuild the format.}
  \errmessage{BAD LaTeX2e system!!}
  \expandafter\expandafter\expandafter\@@end
  \fi
\fi

\pause

\typeout{^^J%
Checking the input path^^J%
=======================}

\ifx\@currdir\@empty\else
  \IfFileExists{\@currdir article.cls}
   {\typeout{article.cls in current directory!}%
    \errmessage{This file should not be run in a `system directory'}}
    {\IfFileExists{article.cls}
      {\typeout{input path OK!}}
      {\typeout{^^J%
        LaTeX claims that article.cls is not on the system.^^J%
        Either LaTeX has been incorrectly installed, or the 
        \noexpand\input@path^^J%
        is incorrect. A correct definition should be added to^^J%
        texsys.cfg, and the format remade.}
       \pause
       \typeout{^^J%
        Typical definitions of \noexpand\input@path include:^^J^^J%
        \string\let\string\input@path=\noexpand\@undefined
         (the default definition)^^J^^J%
        \string\def\string\input@path{\@percentchar^^J
        {} {/usr/lib/tex/inputs/} {/usr/local/lib/tex/inputs/} }^^J^^J%
        \string\def\string\input@path{\@percentchar^^J
        {} {c:/tex/inputs/} {a:/} }^^J^^J%
        \string\def\string\input@path{\@percentchar^^J
        {} {tex_inputs:} {[SOMEWHERE.TEX.INPUTS]} }^^J}%
        \pause
        \typeout{^^J%
        Note that \noexpand\input@path should be undefined
            unless your^^J%
        TeX installation does not make 
             \noexpand\openin and \noexpand\input^^J%
        search the same directories.^^J%
        If \noexpand\input@path is being defined, the first entry^^J%
        should be {}^^J%
        and later entries should be in the same syntax as 
                  \noexpand\@currdir^^J%
       ie full directory names that may be concatenated with the^^J%
       basename (note the final / and ] in the above examples).^^J%
       Some systems may need more complicated settings.^^J%
       See texsys.cfg for more examples.}
       \errmessage{BAD \noexpand\input@path!!}
       \expandafter\@@end}}%
\fi

\pause

\typeout{^^J%
Checking the TeX version^^J%
========================}

\ifx\noboundary\@undefined
\typeout{^^J%
This is TeX 2. You will not be able to use all the new features^^J%
of LaTeX2e with such an old TeX. The current version (1994/12/16) is^^J%
TeX 3.1415^^J%
Consider upgrading your TeX}
\else
\typeout{^^J%
This is at least TeX3. Good!^^J%
If the following `lines' appear on the same line, separated by
\string^\string^J^^J%
 then consider upgrading to a TeX newer than 3.141.^^J%
The current version (1994/12/16) is^^J%
TeX 3.1415}
\message{line1^^Jline2^^Jline3}
\pause
\fi
\endgroup

\@@end
%</ltxcheck>
%    \end{macrocode}
%


