Mostly this is about making sure that conditional macros are either
defined or not consistently in each branch of a conditional.
%%% (c) 2006 Mark Wooding
%%%
-\ifx\iffancystyle\xxundefined\newif\iffancystyle\fancystyletrue\fi
-\ifx\ifshort\xxundefined\newif\ifshort\shortfalse\fi
+\makeatletter
+\def\@doit#1{#1}
+\ifx\iffancystyle\xxundefined\expandafter\@doit\else\expandafter\@gobble\fi
+{\newif\iffancystyle\fancystyletrue}
+\ifx\ifshort\xxundefined\expandafter\@doit\else\expandafter\@gobble\fi
+{\newif\ifshort\shortfalse}
+\iffancystyle\expandafter\@gobble\else\expandafter\@doit\fi{\newif\ifpdfing}
+\makeatother
\typeout{Options:}
\typeout{ Fancy style: \iffancystyle ON\else OFF\fi}