% with minimal changes by Asger Alstrup (alstrup@diku.dk).
%
% This script should only be run from the configure script to update
% with minimal changes by Asger Alstrup (alstrup@diku.dk).
%
% This script should only be run from the configure script to update
%%% 1- Add the command \TestPackage{<name>}. The syntax is:
%%% \TestPackage[<file>]{<name>}, which tests whether <name>.sty
%%% (or <file>, if this optional parameter is provided) exists.
%%% 1- Add the command \TestPackage{<name>}. The syntax is:
%%% \TestPackage[<file>]{<name>}, which tests whether <name>.sty
%%% (or <file>, if this optional parameter is provided) exists.
%%% containing in particular a line like
%%% Found @chk_<name>@
%%% This line will be replaced at configure time by the proper text.
%%% containing in particular a line like
%%% Found @chk_<name>@
%%% This line will be replaced at configure time by the proper text.
%%% For document classes, things are even simpler, since you do not
%%% need to edit this file. Just put your layout file in some place
%%% where LyX can find it and add if you wish a description in
%%% For document classes, things are even simpler, since you do not
%%% need to edit this file. Just put your layout file in some place
%%% where LyX can find it and add if you wish a description in
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%% Initialization part (skip) %%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%% Initialization part (skip) %%%%%%%%%%%%%%%%%%%%%
% we do not want to stop on errors
\nonstopmode\makeatletter
% Have we been called from the configure script?
% we do not want to stop on errors
\nonstopmode\makeatletter
% Have we been called from the configure script?
**** WARNING: For proper results, you should not run this script directly.^^J%
**** Please use the `configure' script.^^J}
**** WARNING: For proper results, you should not run this script directly.^^J%
**** Please use the `configure' script.^^J}
% the variable chk_<name>.
%%%
\newcommand{\prefix}{+} % the character used by grep to filter 'good' output
% the variable chk_<name>.
%%%
\newcommand{\prefix}{+} % the character used by grep to filter 'good' output
-\newcommand{\AddLayout}[3][=]{
- \ifx=#1
- \immediate\write\layouts{"#2" "#2" "#3"}
- \else
- \immediate\write\layouts{"#2" "#1" "#3"}
- \fi}
+\newcommand{\AddLayout}[3][\default]{
+ \def\default{#2}
+ \immediate\write\layouts{"#2" "#1" "#3"}}
\newcommand{\AddVariable}[2]{
\immediate\write\sed{s!@chk_#1@!#2!g}
\immediate\write\vars{chk_#1='#2'}}
\newcommand{\AddVariable}[2]{
\immediate\write\sed{s!@chk_#1@!#2!g}
\immediate\write\vars{chk_#1='#2'}}
% Tests whether an item is present
% Syntax: \TestItem{<file>}{<name>}{<type>}{<ext>}{<iftrue>}{<iffalse>}
\newif\ifexists
% Tests whether an item is present
% Syntax: \TestItem{<file>}{<name>}{<type>}{<ext>}{<iftrue>}{<iffalse>}
\newif\ifexists
-\newcommand{\TestItem}[6]{
- \ifx=#1
- \def\files{#2}
- \message{^^J\prefix checking for #3 #2 [#2.#4]...}
- \else
- \def\files{#1}
- \message{^^J\prefix checking for #3 #2 [#1]...}
- \fi
+\newcommand{\TestItem}[6][\default]{
+ \def\default{#2}
+ \def\files{#1}
+ \message{^^J\prefix checking for #3 #2 [#1]...}
\message{^^J\prefix checking for docbook\space\space class \layoutname... }
\@ifundefined{hasdocbook}
{\message{no^^J}}
\message{^^J\prefix checking for docbook\space\space class \layoutname... }
\@ifundefined{hasdocbook}
{\message{no^^J}}
% Let's do some clever things to guess the default driver for the
% graphics package. The maintainer of the site might have declared it
% in the file 'graphics.cfg'. Let's hope there are no strange commands
% Let's do some clever things to guess the default driver for the
% graphics package. The maintainer of the site might have declared it
% in the file 'graphics.cfg'. Let's hope there are no strange commands