#! /bin/csh -f
unset	x10 buttons a4
set	noglob
foreach x ($argv[3-])
	if ($x == -DX10)	set x10
	if ($x == -DBUTTONS)	set buttons
	if ($x == -DA4)		set a4
	if ($x == -DSEARCH_SUBDIRECTORIES) set subdir
end
if ($?x10) then
	echo	/^\#ifx11/,/^\#/d
	echo	s/%%dot%%//
else
	echo	/^\#ifx10/,/^\#/d
	echo	s/%%dot%%/./
endif
if (! $?buttons)	echo /^\#ifbuttons/,/^\#/d
if (! $?subdir)		echo /^\#ifsubdir/,/^\#/d
echo	/^\#/d
if ($?a4) then
	echo	's/%%defaultpagesize%%/21 x 29.7 cm (A4 size)/'
else
	echo	s/%%defaultpagesize%%/8.5 x 11 inches/
endif
echo	"s@%%DEFAULT_FONT_PATH%%@.TP\\
$1@" | sed -e "s@:@\\\\
.TP\\\\
@g"
echo	s/%%DEFAULT_FONT_SIZES%%/$2/ | sed -e "s/:/ :\\\\
/g"
